mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'dillon/90-e-invoice-e' into vapor/production
This commit is contained in:
@@ -105,5 +105,19 @@ class ProcessBookingForEInvoiceV2CommandJob implements ShouldQueue
|
||||
$firstInvoiceTrx->bill_no = explode('-deleted-', $firstInvoiceTrx->bill_no)[0];
|
||||
$firstInvoiceTrx->save();
|
||||
}
|
||||
else{
|
||||
$transaction = $this->booking->transactions()->whereIn('type', [TransactionType::INVOICE]);
|
||||
Log::info('count again making sure there is an invoice: ' . $transaction->count());
|
||||
if($transaction->count() === 0){
|
||||
$firstInvoiceTrx = $this->booking->transactions()
|
||||
->whereIn('type', [TransactionType::INVOICE])
|
||||
->withTrashed()
|
||||
->orderBy('created_at', 'asc')
|
||||
->first();
|
||||
$firstInvoiceTrx->restore();
|
||||
$firstInvoiceTrx->bill_no = explode('-deleted-', $firstInvoiceTrx->bill_no)[0];
|
||||
$firstInvoiceTrx->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ class BatchBookingsGenerateEInvoiceLogic extends AbstractControllerLogic
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
// Log::info('Booking ID: ' . $booking->marking);
|
||||
// if($booking->marking === '833065'){ //798334, 833065
|
||||
//if($booking->marking === '833065' || $booking->marking === '798334'){ //798334, 833065
|
||||
ProcessBookingForEInvoiceV2CommandJob::dispatch($booking);
|
||||
//}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user