fixing bugs

This commit is contained in:
omair saleh
2021-05-12 05:19:37 +08:00
parent 760a592d9f
commit 366a4d87b3
21 changed files with 579 additions and 285 deletions
+9 -1
View File
@@ -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]);
}
}