mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 10:54:00 +00:00
fix myr fixed invoice bug
This commit is contained in:
@@ -108,16 +108,16 @@ class CreateInvoiceTransactionProcessor
|
||||
return;
|
||||
}
|
||||
|
||||
$payment_amount = $this->calculatesBookingPaidAmount->execute($booking, $booking->fix_currency_id);
|
||||
$payable_amount = $this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id);
|
||||
$booking_amount = $booking->fix_amount;
|
||||
|
||||
// confirm that booking amount has been fully paid
|
||||
if (!(abs(((float) $booking_amount - (float) $payment_amount)/(float) $payment_amount) < 0.009)) {
|
||||
if ((float) $booking_amount > $payable_amount) {
|
||||
return;
|
||||
}
|
||||
|
||||
// confirm that all payments has been transferred
|
||||
if($this->calculatesBookingTransferredAmount->execute($booking) !== $this->calculatesBookingPayableAmount->execute($booking)){
|
||||
if($this->calculatesBookingTransferredAmount->execute($booking) !== $this->calculatesBookingPaidAmount->execute($booking)){
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ class CreateInvoiceTransactionProcessor
|
||||
$transaction->receiver,
|
||||
$transaction->recipient_bank_account_id,
|
||||
$transaction->payment_method,
|
||||
$payment_amount,
|
||||
$payable_amount,
|
||||
$booking_amount,
|
||||
$transaction->currency_id,
|
||||
$transaction->original_currency_id,
|
||||
@@ -218,7 +218,7 @@ class CreateInvoiceTransactionProcessor
|
||||
$transaction->receiver,
|
||||
$transaction->recipient_bank_account_id,
|
||||
$transaction->payment_method,
|
||||
$payment_amount,
|
||||
$payable_amount,
|
||||
$booking_amount,
|
||||
$transaction->currency_id,
|
||||
$transaction->original_currency_id,
|
||||
|
||||
Reference in New Issue
Block a user