E-Invoice - One time processing to generate normal invoice for July 2025 (second run)

This commit is contained in:
Dillon Ngo
2025-08-06 22:00:22 +08:00
parent 9f635f40bd
commit 5601bde96a
@@ -48,7 +48,7 @@ class OneTimeBatchProcessEInvoicesV2Command extends Command
*/
public function handle()
{
return;
// return;
$startDate = Carbon::create(2025, 7, 1)->startOfDay();
$endDate = Carbon::create(2025, 7, 31)->endOfDay();
@@ -69,7 +69,8 @@ class OneTimeBatchProcessEInvoicesV2Command extends Command
$normalInvoice = $booking->documents()->where('document_type', DocumentType::INVOICE)->first();
$eInvoice = $booking->documents()->where('document_type', DocumentType::EINVOICE)->first();
if($firstInvoice && !$normalInvoice && !$eInvoice){
// if($firstInvoice && !$normalInvoice && !$eInvoice){
if(!$firstInvoice && !$normalInvoice && !$eInvoice){
OneTimeBatchProcessEInvoicesV2CommandJob::dispatch($booking);
$count++;
Log::info('Processed: ' . $count);