test auto generate invoice function

This commit is contained in:
edmondlang
2023-02-21 17:32:20 +08:00
parent 2bd8700a61
commit 4b2daa62d7
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -43,10 +43,11 @@ class AutoGenerateInvoice extends Command
*/
public function handle()
{
$this->info(Carbon::now() . ' : Auto generate invoice cron started.');
$packingLists = (App()->make(ListsPackingLists::class))->execute(['does_not_have_transaction_type' => 1, 'type' => 2]);
if (count($packingLists)) {
$this->info(Carbon::now() . ' : Auto generate invoice cron starrted.');
// $this->info(Carbon::now() . ' : Auto generate invoice cron started.');
$start = new Carbon();
foreach ($packingLists as $packingList) {
+1 -1
View File
@@ -44,7 +44,7 @@ class Kernel extends ConsoleKernel
->appendOutputTo (storage_path().'/logs/departure_email.log');
$schedule->command('invoice:generate')
->hourly()
->everyTenMinutes()
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/auto_generate_invoice.log');
}