Invoice lines of old invoices
Hi,
I have an invoice with invoice lines related to products.
My problem is that if I update the price of a service, it changes also the prices on every invoice created in the past.
I need that past invoices maintain prices assigned to the services when they were created.
As an example, if I created an invoiced with a line about “service A” valued in the past 5 USD, and now that service has increased its price to 8 USD, If I recover that old invoice automatically it is updated with new price and that is not real.
Could anyone help me?
Thanks.
5 replies
-
You have encountered a problem with using linked prices. May I recommend that you create a static number field in invoices called price that you copy the data from the product table into. This will allow you to modify the price per invoice if you want to provide discounts and the price field will not get modified in old invoices when you change your prices.
You can call your old price field oldprice and create a new one number field.
Then you can do a bulk edit and for the new price field select Assign calculated value. Then input something like:
oldpricefield
Then click next and see if it is copying the correct value. Then click next to run it.
Now you just need to create a bit of code to copy the price from the product table to the invoice table. Maybe you can use the Trigger after update of the product reference field in Invoices.
-
Hi Raisla67
Yes, Fred is right. Additionally, everything relating to that invoice should be held in a static format, company name, company address, stock code, stock description, stock price, and so on.
I aim to do this in my database but a simple way to help with this would be to hold a pdf copy of the invoice with the invoice record.
Regards John
-
I would also add that even with static fields on the invoice. Once you are done editing/sending etc. you might also want to consider locking that invoice record so that that no unintentional edits take place and so that audit accuracy is maintained.
Content aside
- 10 mths agoLast active
- 5Replies
- 69Views
-
4
Following