mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
fix invoice complete bug
This commit is contained in:
@@ -103,7 +103,7 @@ class CallbackBillplzLogic
|
||||
|
||||
$this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
|
||||
|
||||
if($transaction->amount - $invoice->amount < 0.01) {
|
||||
if(($invoice->amount - $transaction->amount) < 0.01) {
|
||||
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
|
||||
|
||||
$packingList->status = ApprovalStatus::APPROVED;
|
||||
|
||||
+3
-3
@@ -81,7 +81,7 @@ class ApprovePaymentTransactionLogic extends AbstractControllerLogic
|
||||
$status = $request->route('status');
|
||||
|
||||
$transaction = $this->fetchesTransaction->execute(['id' => $request->route('transaction_id')]);
|
||||
|
||||
|
||||
$status === 'approve' ? $this->approvesDocument->execute($transaction->documents()->first()) : $this->rejectsDocument->execute($transaction->documents()->first());
|
||||
|
||||
$this->updatesTransactionStatus->execute($transaction, $status === 'approve' ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
|
||||
@@ -90,7 +90,7 @@ class ApprovePaymentTransactionLogic extends AbstractControllerLogic
|
||||
$invoice = $transaction->owner;
|
||||
$packingList = $invoice->owner;
|
||||
|
||||
if($transaction->amount - $invoice->amount < 0.01) {
|
||||
if(($invoice->amount - $transaction->amount) < 0.01) {
|
||||
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
|
||||
|
||||
$packingList->status = ApprovalStatus::APPROVED;
|
||||
@@ -108,4 +108,4 @@ class ApprovePaymentTransactionLogic extends AbstractControllerLogic
|
||||
return $this->response([]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="col p-r-0">
|
||||
<validation-wrapper-component :validator="$v.parameters.amount">
|
||||
<label>Amount</label>
|
||||
<input class="form-control text-black" style="cursor: not-allowed;" v-model="parameters.amount" v-money="{decimal: '.',thousands: '', precision: 2}">
|
||||
<input class="form-control text-black" v-model="parameters.amount" v-money="{decimal: '.',thousands: '', precision: 2}">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-auto b-r b-t b-b b-grey">
|
||||
|
||||
Reference in New Issue
Block a user