mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix bug
This commit is contained in:
@@ -52,4 +52,12 @@ class Transaction extends AbstractModel implements Documentable
|
||||
return $this->HasMany(TransactionDetail::class, 'transaction_id', 'id');
|
||||
}
|
||||
|
||||
public function convert_original_amount()
|
||||
{
|
||||
if($this->booking()->first()->fix_currency_id !== 1) {
|
||||
$currency_rate = $this->currency()->first()->rates()->where('payment_method_type', $this->payment_method)->first();
|
||||
return number_format($this->original_amount / $currency_rate->selling, 2);
|
||||
}
|
||||
return $this->original_amount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user