Closed Ninos closed 1 year ago
@Ninos
Are you referring to the invoice number counter reset? if so, this isn't managed by the crons, we check this every time a number is generated.
Yes, thx for clarifiing, I mean for example the invoice/offer/client/... number. So seems something ist not working there. Can you may show me the relevant line of code, so I can start debugging in easier way?
@Ninos
In the companies table, in the settings column is a json object, let us know the value of these properties
public $reset_counter_frequency_id = '0'; //@implemented
public $reset_counter_date = ''; //@implemented
Sorry for late response. I get following values:
"reset_counter_frequency_id":"1",
"reset_counter_date":"2023-01-18",
reset_counter_date
was set manually in frontend settings (read something in other topic, changing the date manually can fix the problem).
PS: I have a bit crazy schema, looks something like this:
PREFIX-{$date:Ymd}-{$counter}
*
But don't think this could lead to any problems?
*PREFIX
can be one or more uppercase letters, are manually defined for each type & unique
@Ninos
I'm not sure, I cannot recreate this problem. The counter reset date is checked every time a new counter is generated, so it would not depend on any system services.
@turbo124 can you show me the line of code, which is run to reset the counter? I'll debug it directly in code, may I'll find the "bug" & can create a MR :)
@turbo124 thx, created a MR with some enhancements. But seems the reset counter function is not triggered while creating new client... :/
PS: We can move the discussion to the MR
I'm using invoiceninja v5 (latest), seems that counter reset cronjob is not working on-the-fly in docker container.
Which command do I need to trigger, to enforce counter resetting? I tried
php artisan schedule:work
andphp artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600
, but seems they are just checking for new queues, but I never get a reset counter queue.Kindest regards