mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 10:54:00 +00:00
fixing bugs
This commit is contained in:
@@ -60,7 +60,6 @@ class Transaction extends AbstractModel implements Documentable
|
||||
{
|
||||
if($this->booking()->first()->fix_currency_id !== 1) {
|
||||
$currency_rate = $this->currency()->first()->rates()->where('payment_method_type', $this->payment_method)->first();
|
||||
dd($this->payment_method);
|
||||
|
||||
return number_format($this->original_amount / $currency_rate->selling, 2);
|
||||
}
|
||||
@@ -100,4 +99,13 @@ class Transaction extends AbstractModel implements Documentable
|
||||
{
|
||||
return $query->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeTransferred(Builder $query)
|
||||
{
|
||||
return $query->whereIn('status', [ApprovalStatus::COMPLETED]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user