From 4e5fc70eea82ae93bfdffbf656c1df55934d0e83 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 14 Apr 2022 11:53:50 +0800 Subject: [PATCH] fix rack do's --- routes/web.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index e304edb2..d7382c01 100644 --- a/routes/web.php +++ b/routes/web.php @@ -106,9 +106,10 @@ Route::get('/fix_bills', function () { }); })->get(); foreach ($bookings as $booking){ - $booking->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->delete(); +// $booking->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->delete(); $po = $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->first(); $supplier_deliver_order_transaction = $booking->transactions()->where('type', TransactionType::SUPPLIER_DELIVER)->first(); + dd($supplier_deliver_order_transaction); $supplier = Company::find($booking->transactions()->where('type', TransactionType::PAYMENT)->where('status', 3)->first()->transactions()->first()); $supplier_order_pdf = LaravelMpdf::loadView('pages.pdfs.supplier_deliver_order', ['supplier_deliver_order_transaction' => $supplier_deliver_order_transaction, 'po_order_transaction' => $po, 'supplier' => $supplier]); $document_object = new DocumentObject(