Merge branch 'dillon/90-e-invoice-e-1' into vapor/production

This commit is contained in:
Dillon Ngo
2025-10-02 13:17:00 +08:00
3 changed files with 10 additions and 10 deletions
@@ -77,7 +77,7 @@ class UpdateBookingAmountWithPOLogic extends AbstractControllerLogic
$bookingAttribute = $booking->attributesKVP()->where('key', "BOOKING_AMOUNT_UPDATE")->first();
/* cief todo: 90 - BEFORE REVERT
// cief todo: 90 - BEFORE REVERT
$refundAmount = $this->calculatesBookingRefundAmount->execute($booking, $booking->fix_currency_id);
$paidAmount = floatval($this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id)) - floatval($refundAmount);
@@ -86,14 +86,14 @@ class UpdateBookingAmountWithPOLogic extends AbstractControllerLogic
throw new MalformedRequestException('Purchase Order at this point can only be edited after editing the booking amount');
}
}
*/
//
// cief todo: 90 - REVERTED STARTS
$paidAmount = floatval($this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id)) - floatval($this->calculatesBookingRefundAmount->execute($booking, $booking->fix_currency_id));
// $paidAmount = floatval($this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id)) - floatval($this->calculatesBookingRefundAmount->execute($booking, $booking->fix_currency_id));
if($paidAmount > 0 && $outstandingAmount > 0 && !$bookingAttribute){
throw new MalformedRequestException('Purchase Order at this point can only be edited after editing the booking amount');
}
// if($paidAmount > 0 && $outstandingAmount > 0 && !$bookingAttribute){
// throw new MalformedRequestException('Purchase Order at this point can only be edited after editing the booking amount');
// }
// cief todo: 90 - REVERTED ENDS
if($bookingAttribute){
@@ -126,9 +126,9 @@ class UpdateRefundTransactionStatusLogic extends AbstractControllerLogic
}
// cief todo: 90 - REVERTED STARTS (commented before revert)
$request['fix_amount'] = $booking->fix_amount - $refundTransaction->original_amount;
$request->route()->setParameter('id', $booking->id);
$this->updateBookingAmountLogic->execute($request);
// $request['fix_amount'] = $booking->fix_amount - $refundTransaction->original_amount;
// $request->route()->setParameter('id', $booking->id);
// $this->updateBookingAmountLogic->execute($request);
// cief todo: 90 - REVERTED ENDS (commented before revert)
}
@@ -132,7 +132,7 @@
<div class="font-heading fs-12">{{this.data.fixed_currency.short_code}} {{(Math.round((this.data.refunded_amount + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}</div>
</div>
</div>
<div class="row m-t-20" v-if="data.company.employee.status === 2 && data.company.status === 2 && (Math.round((this.data.outstanding_amount + Number.EPSILON) * 100) / 100) > 0">
<div class="row m-t-20" v-if="data.company.employee.status === 2 && data.company.status === 2 && (Math.round((this.data.outstanding_amount_with_refund + Number.EPSILON) * 100) / 100) > 0">
<div class="col">
<button id="payment-btn" class="btn btn-sm all-caps b-rad-none btn-success btn-block" @click="makePayment()">Make Payment</button>
</div>