mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-02 11:23:58 +00:00
fix bill seeder
This commit is contained in:
@@ -12,7 +12,9 @@ class CalculatesBookingTransferredAmount
|
||||
{
|
||||
|
||||
public function execute(Booking $booking){
|
||||
return $booking->transactions()->bills()->complete()->sum('original_amount');
|
||||
return $booking->transactions()->payments()->complete()->whereHas('transactions', function($query){
|
||||
return $query->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
})->sum('original_amount');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -109,7 +109,6 @@ class CreateInvoiceTransactionProcessor
|
||||
}
|
||||
|
||||
$payable_amount = $this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id);
|
||||
dd($payable_amount);
|
||||
$booking_amount = $booking->fix_amount;
|
||||
|
||||
// confirm that booking amount has been fully paid
|
||||
|
||||
Reference in New Issue
Block a user