[Vtigercrm-developers] Recurring Invoices?

Alan Lord alanslists at gmail.com
Tue Apr 5 12:07:12 GMT 2016


Thanks Joe,

That helped me find what was going on...

This vtiger system is migrated from vtiger 5.2.1 to vtiger 6.4.0.

When I started investigating I ran the 
cron/modules/SalesOrder/RecurringInvoice.service script from the command 
line (as the apache user).

There were no errors in the debug log and Invoices were being created 
_every_ time I ran it. The last_recurring_date column in the database 
was not getting updated either.

Enabling php errors in the script produced this output:

> alanlord at web-dev2:/var/www/vtiger$ phpwww cron/modules/SalesOrder/RecurringInvoice.service
> PHP Fatal error:  Class 'Vtiger_Language_Handler' not found in /var/www/vtiger/vtlib/Vtiger/Deprecated.php on line 584

Remember that the cron script _was_ still creating a new Invoice every 
time this script ran despite producing this error...

I've seen this error before ;-)

So at the top of the cron script I added the line

> require_once('includes/main/WebUI.php');

Now the script runs silently and only creates one Invoice as it should do.

vtiger devs, can you please confirm if this is the right way to fix this 
problem?

Thanks

Al



On 30/03/16 11:00, Joe Bordes wrote:
> The recurring invoices are created until the internal dates are
> "current". That means, that if you have had the cron stopped for 5
> months, and then put it back on, each run will create a new invoice
> until you are up to date (today). I suspect that the
> "last_recurring_date" is incorrectly set for this (these) SO so each
> time the cron launches it creates new invoices and uptades the
> last_recurring_date one step.




More information about the vtigercrm-developers mailing list