mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-26 07:53:58 +00:00
fix deleted invoices
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ Route::get('/fix_bills', function () {
|
||||
foreach ($invoices as $invoice){
|
||||
$invoice->booking->documents()->where('document_type', DocumentType::INVOICE)->delete();
|
||||
$po = $invoice->booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->first();
|
||||
$supplier = Company::find($this->receiver);
|
||||
$supplier = Company::find($invoice->receiver);
|
||||
$invoice_pdf = LaravelMpdf::loadView('pages.pdfs.invoice', ['invoice_transaction' => $invoice, 'po_order_transaction' => $po, 'supplier' => $supplier]);
|
||||
$document_object = new DocumentObject(
|
||||
DocumentType::SUPPLIER_DELIVER_ORDER,
|
||||
|
||||
Reference in New Issue
Block a user