sql query to get the Tax and Withholding Amount of AP Invoices
I'm working on retrieving the tax and withholding amount for each line in AP invoices. The AP_INVOICE_LINES_ALL table contains a TAX_RATE column that holds the required tax values. However, the challenge is that tax and withholding amounts appear in separate lines, with LINE_TYPE_LOOKUP_CODE indicating whether the line is for an item, tax (TAX), or withholding tax (AWT).
The issue is that these tax and withholding lines do not explicitly reference the corresponding item line. I need to determine which tax/withholding entry belongs to which item line.
Tagged:
0