Fixed bug where incorrect currency symbol was showing on organiser dashbaord.
This commit is contained in:
parent
25b1b03b68
commit
f689ff3b1e
|
|
@ -95,7 +95,7 @@ class Account extends MyBaseModel
|
|||
*/
|
||||
public function currency()
|
||||
{
|
||||
return $this->hasOne('\App\Models\Currency');
|
||||
return $this->belongsTo('\App\Models\Currency');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class Event extends MyBaseModel
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the currency sybol.
|
||||
* Get the currency symbol.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -29,6 +29,16 @@ class Organiser extends MyBaseModel
|
|||
'organiser_logo.mimes' => 'Please select a valid image type (jpeg, jpg, png)',
|
||||
];
|
||||
|
||||
/**
|
||||
* The account associated with the organiser
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function account()
|
||||
{
|
||||
return $this->belongsTo('\App\Models\Account');
|
||||
}
|
||||
|
||||
/**
|
||||
* The events associated with the organizer.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
<div class="col-sm-4">
|
||||
<div class="stat-box">
|
||||
<h3>
|
||||
{{ money($organiser->events->sum('sales_volume') + $organiser->events->sum('organiser_fees_volume'), 'EUR') }}
|
||||
{{ money($organiser->events->sum('sales_volume') + $organiser->events->sum('organiser_fees_volume'), $organiser->account->currency->code) }}
|
||||
</h3>
|
||||
<span>
|
||||
Sales Volume
|
||||
|
|
|
|||
Loading…
Reference in New Issue