[Home] [Help]
230: l_excl_freight_from_disc po_vendor_sites.exclude_freight_from_discount%TYPE;
231: l_payment_currency po_vendor_sites.payment_currency_code%TYPE;
232:
233: l_inv_payment_curr po_vendor_sites.payment_currency_code%TYPE;
234: l_batch_id ap_batches.batch_id%TYPE;
235: l_rts_txn_date rcv_transactions.transaction_date%TYPE;
236: l_rcv_quantity_billed rcv_transactions.quantity_billed%TYPE;
237: l_invoice_id ap_invoices.invoice_id%TYPE;
238: l_amount ap_invoices.invoice_amount%TYPE;
1052:
1053: Begin
1054: curr_calling_sequence := p_calling_sequence ||' <- Create_Invoice_batch';
1055:
1056: debug_info := 'Insert into ap_batches';
1057:
1058: SELECT ap_batches_s.nextval INTO p_batch_id FROM dual;
1059:
1060: --Bug fix:1858452
1054: curr_calling_sequence := p_calling_sequence ||' <- Create_Invoice_batch';
1055:
1056: debug_info := 'Insert into ap_batches';
1057:
1058: SELECT ap_batches_s.nextval INTO p_batch_id FROM dual;
1059:
1060: --Bug fix:1858452
1061: --Note: When matched to a PO , po_distribution_id is not populated
1062: --in rcv_transactions, hence need to join using po_header_id...
1086:
1087:
1088: IF(l_invoice_exists = 'Y') THEN */
1089:
1090: INSERT INTO ap_batches_all (
1091: batch_id,
1092: batch_name,
1093: batch_date,
1094: invoice_currency_code,
1100: creation_date,
1101: last_update_login)
1102: VALUES (
1103: p_batch_id,
1104: p_receipt_num||'-'||ap_batches_s1.nextval,
1105: trunc(p_rts_txn_date), --Bug 3492081
1106: p_inv_curr,
1107: p_inv_payment_curr,
1108: 'DEBIT',