mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix duplicated currency order booking for payments bug
This commit is contained in:
+2
-6
@@ -102,9 +102,7 @@ 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-');
|
||||
@@ -116,9 +114,7 @@ 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]);
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@ class TransactionResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
if($this->booking === null) {
|
||||
var_dump($this->booking_id);
|
||||
}
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'booking' => new BookingResource($this->booking),
|
||||
|
||||
Reference in New Issue
Block a user