a Hello,
We have a Custom Transaction (Sales) that has posting enabled; however, when we transform the line items to an Invoice via workflow, and then pay the invoice, items on the custom transaction aren't being closed. In other words, I can continue to bill the same line item to an invoice over and over. Any suggestions for how to handle this via script? Looking for behavior similar to a Sales Order. (edited)
k
Kevin
06/30/2021, 4:54 AM
how are you handling through workflow ? with search ?
Kevin
06/30/2021, 4:56 AM
If then, make it as sales order type with Fulfilled, Invoiced Qty, Close. As soon as Invoice being created, Use User event script to close lines on Sales order after setting up Invoiced quantity if necessary
Kevin
06/30/2021, 4:56 AM
Then filter by close or invoiced quantity in search that workflow uses.
s
Suite Deal
06/30/2021, 1:34 PM
Thank you!
The workflow performs a simple "transform record" action to grab the line items from the custom transaction, and create an invoice. No search currently involved.
I'm not sure how to set the Invoice to a Sales Order Type (Fulfilled, Invoiced QTY, Close) via workflow? I don't see any of these options in the workflow.
I'm okay with the rest of the solution: i.e.
Simply use an after submit event (on create) to close the lines? Then, use a Search to filter out the closed items.
Suite Deal
06/30/2021, 8:49 PM
@Kevin
Update: I wrote script that loops through the line items and closes them out after the transformation, but after I add another item to custom transaction, all the line items revert back to false (not closed).
Also, all of our items are service for sale, so inventory isn't part of the equation.
k
Kevin
07/01/2021, 4:07 AM
Why are you adding lines to Sales that already invoiced ?
s
Suite Deal
07/02/2021, 3:11 AM
@Kevin I understand where you're coming from, but these are a "service for sale" items. Additional "Services" may be necessary after original Invoice is created/paid.