[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
| use to insert the HU data we want and pass back to the JG package |
| indicating that everything passes validation. |
*----------------------------------------------------------------------------*/
PG_DEBUG varchar2(1);
UPDATE zx_lines_det_factors zxld
SET zxld.tax_invoice_date = (SELECT MAX(trxd.gl_date)
FROM ra_cust_trx_line_gl_dist_all trxd
WHERE trxd.request_id= p_request_id
AND trxd.org_id= l_org_id
AND trxd.customer_trx_id=zxld.trx_id
AND trxd.set_of_books_id = zxld.ledger_id
AND trxd.account_class = 'REC'
AND trxd.latest_rec_flag = 'Y'
AND zxld.application_id=222
AND zxld.tax_invoice_date IS NULL)
WHERE EXISTS (SELECT 1
FROM ra_cust_trx_line_gl_dist_all trxd1
WHERE trxd1.request_id= p_request_id
AND trxd1.org_id= l_org_id
AND trxd1.customer_trx_id=zxld.trx_id
AND trxd1.set_of_books_id = zxld.ledger_id
AND trxd1.account_class = 'REC'
AND trxd1.latest_rec_flag = 'Y' )
AND zxld.application_id=222
AND zxld.tax_invoice_date IS NULL ;
arp_standard.debug('validate_gdff: ' || '-- Inserting HU specific GDF data');
update ra_interface_lines_gt
set HEADER_GDF_ATTR_CATEGORY = 'JE.HU.ARXTWMAI.TAX_DATE'
, HEADER_GDF_ATTRIBUTE1 = fnd_date.date_to_canonical(GL_DATE)
where request_id = p_request_id ;
arp_standard.debug('validate_gdff: ' || '-- Inserting PL specific GDF data');
update ra_interface_lines_gt
set HEADER_GDF_ATTR_CATEGORY = 'JE.PL.ARXTWMAI.TAX_DATE'
, HEADER_GDF_ATTRIBUTE1 = fnd_date.date_to_canonical(GL_DATE)
where request_id = p_request_id ;
arp_standard.debug('validate_gdff: ' || '-- Inserting CZ specific GDF data');
update ra_interface_lines_gt
set HEADER_GDF_ATTR_CATEGORY = 'JE.CZ.ARXTWMAI.TAX_DATE'
, HEADER_GDF_ATTRIBUTE1 = fnd_date.date_to_canonical(GL_DATE)
where request_id = p_request_id ;