transaction status downgrade

This commit is contained in:
glovetleong
2021-10-27 14:22:32 +08:00
parent beed76c407
commit 70f95f511d
4 changed files with 4 additions and 4 deletions
@@ -83,7 +83,7 @@ class CreatePaymentProofDocumentLogic extends AbstractControllerLogic
$this->createsFile->execute($document, $object);
$this->updatesTransactionStatus->execute($transaction, ApprovalStatus::COMPLETED);
$this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
$this->createInvoiceTransactionProcessor->execute($transaction->booking);
@@ -109,7 +109,7 @@ class CreateSupplierTransactionLogic extends AbstractControllerLogic
$object = new TransactionObject($billNumber, TransactionType::BILL, $supplier->id, 1,
$supplier->banks()->where('default', true)->first()->id, PaymentMethodType::CASH,
$payment->original_amount * (1 / $rate), $payment->original_amount, 1, $payment->original_currency_id,
$rate, 0, 0, null, ApprovalStatus:: APPROVED);
$rate, 0, 0, null, ApprovalStatus::PENDING_VERIFICATION);
$transactions[] = $this->createsTransaction->execute($payment->booking, $object);
}
+1 -1
View File
@@ -157,6 +157,6 @@ class Transaction extends AbstractModel implements Documentable
*/
public function scopeTransferred(Builder $query)
{
return $query->whereIn('status', [ApprovalStatus::COMPLETED]);
return $query->whereIn('status', [ApprovalStatus::APPROVED]);
}
}
@@ -328,7 +328,7 @@
<div class="col">
<div class="row">
<div class="col">
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 2, type: 3, issuer_in: [2]}">
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [2]}">
<template slot="list" slot-scope="{data}">
<payment-proof-component :data="data"></payment-proof-component>
</template>