how to create a popup in invoice data entry when a price is at zero?

SUGGESTED

How would I go about creating a popup for invoicing department when they are invoicing orders and some line items have a "0" for price? The goal is to eliminate giving things away for free by accident.

Parents
  • 0
    SUGGESTED

    You could write a script for this (PreTotals or PreWrite event is what I'd recommend).

    We've also set up emailed alerts (using 3rd party report automation software) to catch these at the SO stage.

  • 0 in reply to Kevin M

    Thank you! Looks like I'll be learning some script writing in Sage here soon then... Are you by any chance able to provide an example of that script?

  • 0 in reply to JoshBMW

    I tend to encourage DIY, providing guidance instead of full scripts.  There are lots of code snippets on Sage City if you look.

    For this, you'll be starting with a header object, so you open the Lines and loop through them, looking for your error condition (ignoring things like charge codes and comments which will not have unit price values), then use the Sage MessageBox method to present your message to the user.  (Avoid use of the VBScript msgbox method which doesn't work with certain versions of Sage 100). 

    Add a filter to suppress the pop-up when there is no user interface (so you don't run into issues with integrated programs, or VI imports...).

Reply
  • 0 in reply to JoshBMW

    I tend to encourage DIY, providing guidance instead of full scripts.  There are lots of code snippets on Sage City if you look.

    For this, you'll be starting with a header object, so you open the Lines and loop through them, looking for your error condition (ignoring things like charge codes and comments which will not have unit price values), then use the Sage MessageBox method to present your message to the user.  (Avoid use of the VBScript msgbox method which doesn't work with certain versions of Sage 100). 

    Add a filter to suppress the pop-up when there is no user interface (so you don't run into issues with integrated programs, or VI imports...).

Children