CRON / Recurring invoices error

When I view the recurring invoices url (/invoices/cron/recur/9jGv0KMkP0HlsxCG), I should be getting a blank screen, but I don’t; I get the following errors.

1ST ERROR

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: models/mdl_invoice_groups.php

Line Number: 65

2ND ERROR

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: models/mdl_invoice_groups.php

Line Number: 66

3RD ERROR

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: models/mdl_invoice_groups.php

Line Number: 67

A Database Error Occurred

Error Number: 1048

Column ‘invoice_number’ cannot be null

INSERT INTO ip_invoices (client_id, invoice_date_created, invoice_date_due, invoice_group_id, user_id, invoice_number, invoice_url_key, invoice_terms, invoice_date_modified) VALUES (‘20’, ‘2015-03-21’, ‘2015-04-20’, ‘0’, ‘1’, NULL, ‘AwQB9ZhM2w39qQl’, ‘0’, ‘2015-04-08 21:14:16’)

Filename: /home//public_html/****.pickle-it.co.uk/core/MY_Model.php

Line Number: 208

With regards to the database error; if I reload the page the invoice_url_key, invoice_date_modified values change.

Please help me fix this.

Could you please share the logs from /application/logs with us via pastebin.com?
Seems to be a problem with invoice groups and the invoice numbers which rely on the groups.

Hi

todays log file:
http://pastebin.com/UKf3jFZr

Thanks

Okay the error is related to the formatting of the invoice group. Could you please share the invoice group settings with us?
You can also send them via PM if you don’t want to expose any settings.

Invoice group settings:

Name	          Next ID    Left Pad
Invoice Default	  32	     0	 
Quote Default	  5	     0

I think I have fixed it on my installation, I edited the ip_invoices table in the database. I updated the the invoice_group_id column so that the value for each record matches a row from the ip_invoice_groups table.

Now when the I load the /invoices/cron/recur/*************** url, the loaded page is blank, as it should be.

I think problem started when I imported data from another invoice system. It would be good if invoiceplane could do some sanity checking on imported data and attach the default invoice group if the imported data doesn’t have one.

1 Like