mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
E-Invoice - Update 'Process E-Invoice' date range filtering target
This commit is contained in:
+9
-5
@@ -63,11 +63,15 @@ class CreateBatchProcessingAutoCountImportLogic extends AbstractControllerLogic
|
||||
$query->whereIn('type', [TransactionType::SHIPPING_INVOICE, TransactionType::STORAGE_INVOICE])
|
||||
->where('status', $approvalStatus);
|
||||
|
||||
$transactions = $query->whereHas('transactions', function($transaction) use ($startDate, $endDate) {
|
||||
$transaction->where('type', TransactionType::PAYMENT)
|
||||
->whereBetween('updated_at', [$startDate, $endDate])
|
||||
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
})->get();
|
||||
// $transactions = $query->whereHas('transactions', function($transaction) use ($startDate, $endDate) {
|
||||
// $transaction->where('type', TransactionType::PAYMENT)
|
||||
// ->whereBetween('updated_at', [$startDate, $endDate])
|
||||
// ->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
// })->get();
|
||||
Log::info('CreateBatchProcessingAutoCountImportLogic startDate: ' . json_encode($startDate));
|
||||
Log::info('CreateBatchProcessingAutoCountImportLogic endDate: ' . json_encode($endDate));
|
||||
|
||||
$transactions = $query->whereBetween('created_at', [$startDate, $endDate])->get();
|
||||
|
||||
$count = 0;
|
||||
foreach ($transactions as $transaction) {
|
||||
|
||||
Reference in New Issue
Block a user