diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php index 054513af..86be847a 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php @@ -101,6 +101,9 @@ class CreateSupplierTransactionLogic extends AbstractControllerLogic /** @var Transaction $payment */ $payment = $this->fetchesTransaction->execute(['id' => $payment['id']]); + + if($payment->status !== ApprovalStatus::APPROVED) continue; + $this->updatesTransactionStatus->execute($payment, ApprovalStatus::COMPLETED); $billNumber = $this->generatesTransactionBillNumber->execute('SPLR-'); $object = new TransactionObject($billNumber, TransactionType::BILL, $supplier->id, 1,