DBA Data[Home] [Help]

APPS.AP_XML_TAX_DERIVATION_PKG dependencies on AP_INVOICE_LINES_INTERFACE

Line 11: | AP_INVOICE_LINES_INTERFACE is updated with this tax code. |

7: | Called by AP_XML_INVOICE_INBOUND_PKG |
8: | |
9: | DESCRIPTION |
10: | This package gets the tax code for the Receiving country and State and |
11: | AP_INVOICE_LINES_INTERFACE is updated with this tax code. |
12: | Note : If Tax Code is Null, we use -Taxable as the tax code | | |
13: +===========================================================================*/
14: PROCEDURE correct_tax(p_invoice_id in NUMBER, p_vendor_id in NUMBER) as
15:

Line 17: select count(*) from ap_invoice_lines_interface

13: +===========================================================================*/
14: PROCEDURE correct_tax(p_invoice_id in NUMBER, p_vendor_id in NUMBER) as
15:
16: cursor num_of_tax_lines is
17: select count(*) from ap_invoice_lines_interface
18: where invoice_id = p_invoice_id and
19: line_type_lookup_code = 'TAX';
20:
21: cursor org_id is

Line 50: from ap_invoice_lines_interface

46: and vendor_id = p_vendor_id;
47:
48: cursor po_number is
49: select distinct po_number
50: from ap_invoice_lines_interface
51: where invoice_id = p_invoice_id and
52: po_number is not null;
53:
54: type char_table_type is table of varchar2(256) index by binary_integer;

Line 83: select ap_invoice_lines_interface_s.nextval

79:
80: arp_util_tax.debug('num_of_tax_lines:'||to_char(l_num_of_tax_lines));
81:
82: if l_num_of_tax_lines = 0 and nvl(l_po_numbers.last, 0) = 1 then
83: select ap_invoice_lines_interface_s.nextval
84: into l_invoice_line_id
85: from dual ;
86:
87: INSERT INTO AP_INVOICE_LINES_INTERFACE

Line 87: INSERT INTO AP_INVOICE_LINES_INTERFACE

83: select ap_invoice_lines_interface_s.nextval
84: into l_invoice_line_id
85: from dual ;
86:
87: INSERT INTO AP_INVOICE_LINES_INTERFACE
88: (ORG_ID, INVOICE_ID, INVOICE_LINE_ID, AMOUNT,
89: LINE_NUMBER, LINE_TYPE_LOOKUP_CODE)
90: VALUES
91: (l_org_id, p_invoice_id, l_invoice_line_id, 0, NULL, 'TAX');

Line 121: UPDATE AP_INVOICE_LINES_INTERFACE

117: end if;
118:
119: arp_util_tax.debug('tax_code:'||l_tax_code);
120:
121: UPDATE AP_INVOICE_LINES_INTERFACE
122: SET TAX_CODE = l_tax_code
123: WHERE INVOICE_ID = p_invoice_id and
124: TAX_CODE is NULL;
125: end if;