We have TM (Time and Materials) calls and CS (Contract Services) calls. Some of our customers are in taxed areas and some are in tax exempt areas. Any service call that is in CS should not have tax applied, and we are looking for a way to catch CS calls that are being taxed before invoicing the call. The issue is, Great Plains only calculates the sales tax (for example on a part added to the call) when the "Totals" button is pressed, or when the call is invoiced.
What I am looking for is a SQL statement that will allow me to pre-calculate the sales tax that will be applied, prior to invoicing. I need to do it this way as opposed to simply clicking the "Totals" button, as expecting the dispatchers to click the "Totals" button on each call has proven to be... unreliable.
The solution was to base the query off the following where clause:
WHERE dbo.SVC00200.SRVSTAT = 'CALL_STATUS_VALUE' AND dbo.SVC00203.LINITMTYP = 'ITEM_TYPE_VALUE' AND dbo.TX00102.TXDTLBSE = '4' AND dbo.IV00101.TAXOPTNS <> '2'
Where TX00102.TXDTLBSE of 4 is equal to "Percent of Cost" and IV00101.TAXOPTNS of 2 is equal to nontaxable.