190: ln_batch_id NUMBER;
191: ln_no_of_invoice_generated NUMBER;
192:
193: ln_req_id NUMBER;
194: ln_uid NUMBER; --File.Sql.35 Cbabu := fnd_global.user_id;
195: lv_temp VARCHAR2(100);
196: ln_org_id NUMBER; /*Added by aiyer for the bug 5490479 */
197:
198: begin
196: ln_org_id NUMBER; /*Added by aiyer for the bug 5490479 */
197:
198: begin
199:
200: ln_uid := fnd_global.user_id;
201: /*
202: || Start of bug 5490479
203: || Added by aiyer for the bug 5490479
204: || Get the operating unit (org_id)
334: 'Debug Level 1 : Invoking APXIIMPT as no of invoices created is :'
335: || to_char(ln_no_of_invoice_generated) );
336: end if;
337:
338: ln_uid := fnd_global.user_id;
339: ln_req_id :=
340: Fnd_Request.submit_request
341: (
342: 'SQLAP',
622: ln_tax_amount number;
623: lv_currency_conversion_type rcv_transactions.currency_conversion_type%type;
624: lv_currency_conversion_rate rcv_transactions.currency_conversion_rate%type;
625: lv_currency_conversion_date date;
626: ln_uid number; --File.Sql.35 Cbabu := fnd_global.user_id;
627: ln_inv_run_no number;
628: lv_invoice_num ap_invoices_all.invoice_num%type;
629: lv_func_currency gl_sets_of_books.currency_code%type;
630: ln_gl_set_of_books_id gl_sets_of_books.set_of_books_id%type;
696:
697:
698: begin
699:
700: ln_uid := fnd_global.user_id;
701: ln_vendor_id := -999;
702: ln_vendor_site := -999;
703: lv_currency := '$$$';
704: lv_vendor_has_changed := 'TRUE';
1340: Tax_rec.tax_id ,
1341: tax_Rec.tax_amount ,
1342: tax_rec.tax_rate ,
1343: tax_rec.tax_type ,
1344: fnd_global.user_id ,
1345: sysdate ,
1346: sysdate ,
1347: fnd_global.user_id ,
1348: fnd_global.login_id
1343: tax_rec.tax_type ,
1344: fnd_global.user_id ,
1345: sysdate ,
1346: sysdate ,
1347: fnd_global.user_id ,
1348: fnd_global.login_id
1349: ) returning BATCH_LINE_ID into ln_BATCH_LINE_ID;
1350: Fnd_File.put_line(Fnd_File.LOG, ' DEBUG : 8. After insert into jai_rcv_tp_inv_details' );
1351: --added by eric for inclusive tax on 20-dec,2007, Begin
1344: fnd_global.user_id ,
1345: sysdate ,
1346: sysdate ,
1347: fnd_global.user_id ,
1348: fnd_global.login_id
1349: ) returning BATCH_LINE_ID into ln_BATCH_LINE_ID;
1350: Fnd_File.put_line(Fnd_File.LOG, ' DEBUG : 8. After insert into jai_rcv_tp_inv_details' );
1351: --added by eric for inclusive tax on 20-dec,2007, Begin
1352: -----------------------------------------------------------------------
1479:
1480: UPDATE jai_rcv_tp_invoices
1481: SET invoice_id = p_invoice_id ,
1482: last_update_date = sysdate ,
1483: last_updated_by = fnd_global.user_id
1484: WHERE invoice_num = p_invoice_num
1485: AND vendor_id = p_vendor_id
1486: AND vendor_site_id = p_vendor_site_id;
1487: