We are setting up some invoice automation workflows for a new customer. It’s big and ugly, and the bit I’m struggling with is calculating the appropriate taxes per item, based on a tax code.
I live in Canada, and we have GST and PST. Some items on an invoice are subject to both taxes. Some are exempt. Some are only subject to GST. Some are self-assessed. My workflow needs to calculate what taxes to apply based on the code.
An invoice can have many line items, and any of these line items can have different codes. Say for example I have an invoice with 3 items on it. The first item is subject to both taxes, the second is subject to only GST, and the third is exempt. The appropriate tax code would be on the line.
I need a way for my workflow to look at a line, see its tax code, and apply the necessary tax, and then repeat for every line. I’m not sure of the best way to go about this, or even if it’s possible. I’m having trouble with the “if” logic.
I would do this in a bpm in Epicor and then when ECM reads back the invoice they will be there.
I have not done this, but I do have a data directive on SOA that runs if the user is the docstar user and does a lot of cleanup and then ECM gets all of my fixes.
Based on my handling of taxes line taxes are more difficult. If you handle taxes on a line, each line would have a tax amount per line based on your tax liabilities, if the line is one tax have a tax liability linked to gst or if two link to gst/pst tax liability. There is exempt handling if you set taxes as zero and use set tax manual to override the tax values. Most tax scenarios require more testing and validations to make a handler that can handle all scenarios.
If tax is set up on the PO, you should be able to bring it in based on that (possibly need a datalink to update the fields and the tax type would need to be at the line level, not document).