fix bug invoices/approve

This commit is contained in:
edmondlang
2023-08-24 14:36:47 +08:00
parent 90c599049b
commit 60ceac645f
+4 -1
View File
@@ -865,11 +865,14 @@ Route::get('/invoices/combine/{ids}', function($ids){
// })->name('generate.invoices');
Route::get('/invoices/approve', function(Request $request){
// whereDoesntHave
$invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)->where('status', ApprovalStatus::PENDING_SUBMISSION)->get();
foreach ($invoices as $invoice) {
$packingList = $invoice->owner;
if (!$packingList) {
dump ('Error packingList not found. Invoice ID - ' . $invoice->id);
continue;
}
$order = $packingList->owner;
if ($request->input('exclude')){