Custom Invoice Approval Workflow
I am trying to make a workflow that will approve the customer invoices if it is the first invoice on the order, not the customer. We use the billing operations on a 3 hr schedule to create invoices. I changed it so they are created pending approval.
The exception will be if it is not the first invoice, I want it to check the shipping total and zero it out if shipping was charged on the previous invoice.
Is this even possible in the workflow, or would this be something better suited as a script?
If a workflow will work, can I trigger it off of the system generated invoice, or do I need to run a schedule so it triggers just after the billing operation? I couldn't find anything about triggering a workflow from system transactions, and I couldn't figure it out in SuiteFlow.