InvoicePlane icon indicating copy to clipboard operation
InvoicePlane copied to clipboard

As soon as i change status 'sent' to viewed' error: The Invoice # field must contain a unique value

Open azmidotmy opened this issue 3 years ago • 8 comments

I have been using InvoicePlane for quite sometime now and no issues been occured so far until yesterday when I tried to change from Sent status Invoice to Viewed, after hit Save button it gave me this error.

Screenshot 2022-07-26 at 11 22 20 Screenshot 2022-07-26 at 11 26 14

Can someone help on this?.

azmidotmy avatar Jul 26 '22 03:07 azmidotmy

Thank you for the screenshots, they give an idea of what's going on. Try to do the following:

  • Go to the Chrome Dev Tools, go to the Console tab.
  • do the exact same steps as you did, right before you got the error
  • when the error comes, check out the console tab, make a screenshot of it
  • go to the network tab, does it show anything?
  • on the console tab, can you click on anything, that shows your error on the network tab?

nielsdrost7 avatar Aug 10 '22 14:08 nielsdrost7

@nielsdrost7 nothing return on console tabs, on network tab only shows some informations like so; Screenshot 2022-08-11 at 14 36 55

I attached har files as well just in case it helps. invoice.azmi.my.har-01.har.tar.gz

azmidotmy avatar Aug 11 '22 06:08 azmidotmy

Great job with the screenshot

Ok, turn on debug mode in ipconfig.php and then do the same steps. Click on that link that ends with ajax I think you can also click to open it in a new window.

It should show some kind of SQL query

nielsdrost7 avatar Aug 11 '22 09:08 nielsdrost7

@azmidotmy awaiting those screenshots

nielsdrost7 avatar Aug 20 '22 07:08 nielsdrost7

Screenshot 2022-08-20 at 22 13 53

@nielsdrost7 , I had turned on debug mode but I dont see SQL query when I clicked mentioned ajax linked.

Screenshot 2022-08-20 at 22 10 29

I clicked other tabs as well but I dont see SQL queries. Anything that I did wrong?.

azmidotmy avatar Aug 20 '22 14:08 azmidotmy

@azmidotmy can you click on 'response' and make a screenshot of that?

nielsdrost7 avatar Aug 20 '22 14:08 nielsdrost7

@nielsdrost7 , sorry for delayed response. I cant screenshot caused it doesnt wrap up whole syntax so I pasted it here.

{"success":0,"validation_errors":{"invoice_number":"<p>The Invoice # field must contain a unique value.<\/p>"}}

Screenshot 2022-08-24 at 09 28 28

azmidotmy avatar Aug 24 '22 01:08 azmidotmy

@azmidotmy sorry, but I cannot reproduce this problem. Right now we're working on version 1.6.1 and whatever I do, I don't get the error

I know exactly in which code to look. It's function validation_rules_save_invoice on Mdl_invoices.php (line 136) But for me, it doesn't go wrong.

Once version 1.6.1 comes out, would you mind trying it again?

nielsdrost7 avatar Aug 05 '23 12:08 nielsdrost7