Issuing With Cron Invoices Does Not Work

1

Issuing with CRON invoices does not work on the settings of the PL-PL region

The problem will reach both settings:
On Server Side (PHP)

I also do not understand the message that is displayed all the time even on printed farms.
...
Recurring Invoice
The Will Be Automatically Generate New Invoice Every 6 Months (Semiannuly) system.
Cron job must be setup other invoice will be generated.
...

...
$ php82 artisan app:generate-invoice
...
...
Call to a member function subDays() on string

at app/Console/Commands/CreateRecurringInvoices.php:31
27▕ $query->whereNull('next_create_date')->orWhere('next_create_date', '<=', now()->format('Y-m-d'));
28▕ })->get()->filter(function ($recurring_invoice) {
29▕ $date = $recurring_invoice->last_created_at ? $recurring_invoice->last_created_at : $recurring_invoice->date;
30▕ if ($recurring_invoice->create_before) {
➜ 31▕ $date = $recurring_invoice->create_before == 1 ? $date->subDay() : $date->subDays($recurring_invoice->create_before);
32▕ }
33▕
34▕ if ($recurring_invoice->repeat) {
35▕ return $this->{$recurring_invoice->repeat}($date);

1 [internal]:0
App\Console\Commands\CreateRecurringInvoices::App\Console\Commands{closure}(Object(App\Models\Invoice))
+2 vendor frames

4 app/Console/Commands/CreateRecurringInvoices.php:28
Illuminate\Support\Collection::filter(Object(Closure))
...

Attachments
Bug Unresolved For: Simple Invoice Manager - Invoicing Made Easy 1 Votes 7 Replies 73 Views
Reported by Mateusz 1 month ago

0

Replied by Mian Saleem 1 month ago

Hello,

The recurring alert is display on invoice that will be carted by system. This is for staff only.

I have fixed the command and released update. Please download the file and update.

Thank you

0

Replied by Mateusz 1 month ago

great, thank you, I'll check it and let you know

0

Replied by Mateusz 1 month ago

Well, not much has changed, now I can't execute the command, and the fireplace I had for the staff is still on PDF.
Nothing happened, Cron didn't issue any invoices. and I set it for the next day for the test.

0

Replied by Mateusz 1 month ago

...
$ php82 artisan app:generate-invoice

Carbon\Exceptions\InvalidFormatException

Could not parse '8 paź 2024': Failed to parse time string (8 paź 2024) at position 0 (8): Unexpected character

at vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:198
194▕ }
195▕ // @codeCoverageIgnoreEnd
196▕
197▕ if (!$date) {
➜ 198▕ throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception);
199▕ }
200▕
201▕ return $date;
202▕ }

1 [internal]:0
App\Console\Commands\CreateRecurringInvoices::App\Console\Commands{closure}(Object(App\Models\Invoice))
+1 vendor frames

3 [internal]:0
App\Console\Commands\CreateRecurringInvoices::App\Console\Commands{closure}(Object(App\Models\Invoice))
...

0

Replied by Mateusz 1 month ago

the fix is ​​issued as I changed In Browser (Javascript). what will be the correct command for cron ?

          • cd /path-to-your-project && php82 artisan app:generate-invoice >> /dev/null 2>&1

0

Replied by Mateusz 1 month ago

Format and time zone, despite the PL_PL settings, I have invoices issued by the command from SSH for a test with 7:33 am and I sent around 09:00 in the morning.

0

Replied by Mian Saleem 1 month ago

Hello,

I have fixed the cron job for non-english dates. For cron job please refer to the documentation.pdf in your download.

Thank you

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.