mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
-fix issue where cannot approve PO when we have refunded transaction
This commit is contained in:
@@ -13,7 +13,7 @@ class CalculatesBookingTransferredAmount
|
||||
|
||||
public function execute(Booking $booking){
|
||||
return $booking->transactions()->payments()->complete()->whereHas('transactions', function($query){
|
||||
return $query->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
return $query->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->where('type', TransactionType::BILL);
|
||||
})->sum('original_amount');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user