mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
fix bug invoices/approve
This commit is contained in:
+4
-1
@@ -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')){
|
||||
|
||||
Reference in New Issue
Block a user