BPM to not allow an invoice date to be in the future


(Shawn) #1

Hello, I was wondering if anyone had any general ideas on how to create a BPM to not allow an invoice date to be past the current day.


(Brandon Anderson) #2

First step would be to decide whether you wanted it as a data directive (any entry going into the table) or method directive (anything going through that specific process). For your example, I would probably use a data directive. So find the table and the field you want to compare, and create an in-transaction data directive. Then make a condition that compares the invoice date in the TTTable to todays dates and if greater than, raise an exception.

From your question, you sound like you are pretty new to BPMs. I would start with the tools guide in the help system to get you acclimated to what’s available to use. Your specific example should be pretty easy to accomplish.

Once you read through the BPM stuff, give it a shot and let us know where you get stuck.

(Tim Shoemaker) #3

One “trick” might be to force the Invoice Date and the SHIP date to be equal… then disallow packslips that are in the future.
There is already a setting in the Company configuration regarding Invoice/Ship date.
To disallow packslips with future dates is fairly easy… create a Method BPM on the customer shipment Update process (pre processing) that validates the date is today or before… if not, throw an exception message. THEN when Accounting does the "Get shipments, the invoice dates are guaranteed to be today or before.

(Kevin Simon) #4

I would question whether you want an invoice date to NOT be in the future, or an invoice to NOT be posted that is NOT in the future. I could see where you may create a batch at the end of the day with invoices in the next day, with an intent on posting the next day.

I would be inclined to put the BPM on the posting process. There’s a method that gets called when you click Actions -> Group -> Post, you can do a trace but it’s something like “PrePostInvoice”. Then, use advanced code to read through the invoices in the group, and if any have a future date, throw an exception to the screen. You could even add the offending invoices to the error message if you wanted to be really user friendly!!!

Kevin Simon