1 Reply Latest reply on Dec 23, 2014 5:38 AM by SteveMartino

    Quotation to Invoice Problem

    GrahamKeogh

      Title

      Quotation to Invoice Problem

      Post

      Hi all

      I have a query regarding creating an invoice.

      I have a 'Quotations 'table, with a portal populated from my 'line items' table which has all my items, quantities etc. Then when I want to create an invoice, I have a script that uses the Quote ID as a variable, and then copies the data to my invoices table, as was suggested on the forum on another thread. (screenshot of script attached)

      However if someone then alters the original quote for whatever reason, the invoice changes which I don't want obviously. Just wondering how to make the invoice uneditable, so essentially a snapshot of when it was created at that time.

      Thanks a million

      Screen_Shot_2014-12-23_at_11.30.27.png

        • 1. Re: Quotation to Invoice Problem
          SteveMartino

          I think you should make the quote uneditable once the invoice has been created.  There are various ways, but one would be once they click a button to create an invoice from this quote, you check for a flag.  If the flag does not exist, set flag, create invoice.  If flag does exist, show custom dialog, "This quote has already been converted to an invoice." Exit script.

          Now if you have a situation where you may have to change a quote (typo, wrong info etc., after the show custom dialog, you can give them the option to send the altered quote to create an invoice. But in that case you would have to find/delete the previous invoice, or find/edit the previous invoice.  Putting housekeeping fields in the invoice, created by:......on........ and modified by:..........on........could help.

          I've seen (on the VTC videos) a technique, where the 'quote' was tied to an OnRecordCommit (I think), to run a script. If the record was altered, and the user wanted to change it, the script re-logged in under the admin and paused, the admin had to physically put in their password, then the script continued with a re-log in of the user, and allowed the changes to be saved.