regenerate spdo

This commit is contained in:
omair saleh
2022-03-17 11:29:32 +08:00
parent 4d49ddfdef
commit ff4bce636b
+1
View File
@@ -104,6 +104,7 @@ Route::get('/fix_bills', function () {
$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($booking->transactions()->where('type', TransactionType::PAYMENT)->where('status', 3)->first()->transactions()->first());
$supplier = Company::find($booking->transactions()->where('type', TransactionType::PAYMENT)->first()->transactions()->first()->issuer);
$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(