mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 12:34:24 +00:00
fix duplicated currency order booking for payments bug
This commit is contained in:
+6
-2
@@ -102,7 +102,9 @@ class CreateSupplierTransactionLogic extends AbstractControllerLogic
|
||||
/** @var Transaction $payment */
|
||||
$payment = $this->fetchesTransaction->execute(['id' => $payment['id']]);
|
||||
|
||||
if($payment->status !== ApprovalStatus::APPROVED) continue;
|
||||
if($payment->status !== ApprovalStatus::APPROVED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->updatesTransactionStatus->execute($payment, ApprovalStatus::COMPLETED);
|
||||
$billNumber = $this->generatesTransactionBillNumber->execute('SPLR-');
|
||||
@@ -114,7 +116,9 @@ class CreateSupplierTransactionLogic extends AbstractControllerLogic
|
||||
$transactions[] = $this->createsTransaction->execute($payment->booking, $object);
|
||||
}
|
||||
|
||||
if(!count($transactions)) return $this->response([]);
|
||||
if(!count($transactions)){
|
||||
return $this->response([]);
|
||||
}
|
||||
|
||||
$pdf = LaravelMpdf::loadView('pages.pdfs.currency_vendor_order', ['transactions' => $transactions, 'supplier' => $supplier]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user