960: /** update invoice amounts and also running totals.
961: Also create payment schedules ***/
962: /*Bug 5382916: Date in the description should be in LE Time zone*/
963:
964: fnd_message.set_name('PO', 'PO_INV_CR_ERS_INVOICE_DESC');
965:
966: X_progress := '100';
967: fnd_message.set_token('RUN_DATE', x_curr_le_transaction_date);
968: X_progress := '110';
963:
964: fnd_message.set_name('PO', 'PO_INV_CR_ERS_INVOICE_DESC');
965:
966: X_progress := '100';
967: fnd_message.set_token('RUN_DATE', x_curr_le_transaction_date);
968: X_progress := '110';
969: X_invoice_description := fnd_message.get;
970:
971: /* Bug 8741094 Setting the values of X_curr_conversion_rate1 and X_curr_conversion_rate_date1 to NULL if the
965:
966: X_progress := '100';
967: fnd_message.set_token('RUN_DATE', x_curr_le_transaction_date);
968: X_progress := '110';
969: X_invoice_description := fnd_message.get;
970:
971: /* Bug 8741094 Setting the values of X_curr_conversion_rate1 and X_curr_conversion_rate_date1 to NULL if the
972: functional currency is the same as the foreign currency, and the currency conversion rate type is not 'User'. */
973: IF (NVL(UPPER(x_curr_conversion_rate_type),'$#%@^$$') <> 'USER'
1338: IF (X_first_rcv_txn_flag = 'N') AND
1339: (X_curr_inv_process_flag = 'Y')
1340: THEN
1341: /*Bug 5382916: Date in the description should be in LE Time zone*/
1342: fnd_message.set_name('PO', 'PO_INV_CR_ERS_INVOICE_DESC');
1343: X_progress := '100';
1344: fnd_message.set_token('RUN_DATE', x_curr_le_transaction_date);
1345: X_progress := '110';
1346: X_invoice_description := fnd_message.get;
1340: THEN
1341: /*Bug 5382916: Date in the description should be in LE Time zone*/
1342: fnd_message.set_name('PO', 'PO_INV_CR_ERS_INVOICE_DESC');
1343: X_progress := '100';
1344: fnd_message.set_token('RUN_DATE', x_curr_le_transaction_date);
1345: X_progress := '110';
1346: X_invoice_description := fnd_message.get;
1347:
1348: /* Bug 8741094 Setting the values of X_curr_conversion_rate and X_curr_conversion_rate_date to NULL if the
1342: fnd_message.set_name('PO', 'PO_INV_CR_ERS_INVOICE_DESC');
1343: X_progress := '100';
1344: fnd_message.set_token('RUN_DATE', x_curr_le_transaction_date);
1345: X_progress := '110';
1346: X_invoice_description := fnd_message.get;
1347:
1348: /* Bug 8741094 Setting the values of X_curr_conversion_rate and X_curr_conversion_rate_date to NULL if the
1349: functional currency is the same as the foreign currency, and the currency conversion rate type is not 'User'. */
1350: IF (NVL(UPPER(x_curr_conversion_rate_type),'$#%@^$$') <> 'USER'
1486: IF (x_group_id is NOT NULL) THEN
1487: FND_PROFILE.GET('USER_ID', l_user_id);
1488:
1489: /*Bug# 1539257 Building the batch name which was earlier NA */
1490: fnd_message.set_name('PO', 'PO_INV_CR_ERS_BATCH_DESC');
1491: X_batch_name := fnd_message.get;
1492:
1493: SELECT ap_batches_s.nextval
1494: INTO X_tmp_batch_id
1487: FND_PROFILE.GET('USER_ID', l_user_id);
1488:
1489: /*Bug# 1539257 Building the batch name which was earlier NA */
1490: fnd_message.set_name('PO', 'PO_INV_CR_ERS_BATCH_DESC');
1491: X_batch_name := fnd_message.get;
1492:
1493: SELECT ap_batches_s.nextval
1494: INTO X_tmp_batch_id
1495: FROM dual;
1520: END IF;
1521:
1522: /*
1523:
1524: fnd_message.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
1525: fnd_message.set_token('REQUEST', TO_CHAR(v_req_id));
1526: fnd_message.set_token('BATCH', x_group_id);
1527:
1528: IF (g_asn_debug = 'Y') THEN
1521:
1522: /*
1523:
1524: fnd_message.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
1525: fnd_message.set_token('REQUEST', TO_CHAR(v_req_id));
1526: fnd_message.set_token('BATCH', x_group_id);
1527:
1528: IF (g_asn_debug = 'Y') THEN
1529: asn_debug.put_line(fnd_message.get);
1522: /*
1523:
1524: fnd_message.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
1525: fnd_message.set_token('REQUEST', TO_CHAR(v_req_id));
1526: fnd_message.set_token('BATCH', x_group_id);
1527:
1528: IF (g_asn_debug = 'Y') THEN
1529: asn_debug.put_line(fnd_message.get);
1530: END IF;
1525: fnd_message.set_token('REQUEST', TO_CHAR(v_req_id));
1526: fnd_message.set_token('BATCH', x_group_id);
1527:
1528: IF (g_asn_debug = 'Y') THEN
1529: asn_debug.put_line(fnd_message.get);
1530: END IF;
1531: END IF;
1532:
1533: RETURN (X_completion_status);
1860:
1861: RETURN (x_tmp_invoice_num);
1862: EXCEPTION
1863: WHEN create_invoice_error THEN
1864: FND_MESSAGE.SET_NAME('PO','RCV_CREATE_INVOICE_NUM_ERROR');
1865: FND_MESSAGE.SET_TOKEN('RECEIPT_NUM',x_receipt_num);
1866: FND_MESSAGE.SET_TOKEN('REASON',x_msg_data);
1867: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1868: RAISE create_invoice_error;
1861: RETURN (x_tmp_invoice_num);
1862: EXCEPTION
1863: WHEN create_invoice_error THEN
1864: FND_MESSAGE.SET_NAME('PO','RCV_CREATE_INVOICE_NUM_ERROR');
1865: FND_MESSAGE.SET_TOKEN('RECEIPT_NUM',x_receipt_num);
1866: FND_MESSAGE.SET_TOKEN('REASON',x_msg_data);
1867: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1868: RAISE create_invoice_error;
1869: WHEN OTHERS THEN
1862: EXCEPTION
1863: WHEN create_invoice_error THEN
1864: FND_MESSAGE.SET_NAME('PO','RCV_CREATE_INVOICE_NUM_ERROR');
1865: FND_MESSAGE.SET_TOKEN('RECEIPT_NUM',x_receipt_num);
1866: FND_MESSAGE.SET_TOKEN('REASON',x_msg_data);
1867: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1868: RAISE create_invoice_error;
1869: WHEN OTHERS THEN
1870: po_message_s.sql_error ('create_invoice_num', x_progress, SQLCODE);
1863: WHEN create_invoice_error THEN
1864: FND_MESSAGE.SET_NAME('PO','RCV_CREATE_INVOICE_NUM_ERROR');
1865: FND_MESSAGE.SET_TOKEN('RECEIPT_NUM',x_receipt_num);
1866: FND_MESSAGE.SET_TOKEN('REASON',x_msg_data);
1867: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1868: RAISE create_invoice_error;
1869: WHEN OTHERS THEN
1870: po_message_s.sql_error ('create_invoice_num', x_progress, SQLCODE);
1871: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1867: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1868: RAISE create_invoice_error;
1869: WHEN OTHERS THEN
1870: po_message_s.sql_error ('create_invoice_num', x_progress, SQLCODE);
1871: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
1872: RAISE;
1873: END create_invoice_num;
1874:
1875: /* =====================================================================
2926: ASN_DEBUG.put_line('group_id = ' || l_group_id);
2927: END IF;
2928:
2929: -- get invoice description
2930: FND_MESSAGE.set_name('PO', 'PO_INV_CR_USE_INVOICE_DESC');
2931: FND_MESSAGE.set_token('RUN_DATE', sysdate);
2932: l_invoice_desc := FND_MESSAGE.get;
2933:
2934: IF (g_asn_debug = 'Y') THEN
2927: END IF;
2928:
2929: -- get invoice description
2930: FND_MESSAGE.set_name('PO', 'PO_INV_CR_USE_INVOICE_DESC');
2931: FND_MESSAGE.set_token('RUN_DATE', sysdate);
2932: l_invoice_desc := FND_MESSAGE.get;
2933:
2934: IF (g_asn_debug = 'Y') THEN
2935: ASN_DEBUG.put_line('invoice_desc = ' || l_invoice_desc);
2928:
2929: -- get invoice description
2930: FND_MESSAGE.set_name('PO', 'PO_INV_CR_USE_INVOICE_DESC');
2931: FND_MESSAGE.set_token('RUN_DATE', sysdate);
2932: l_invoice_desc := FND_MESSAGE.get;
2933:
2934: IF (g_asn_debug = 'Y') THEN
2935: ASN_DEBUG.put_line('invoice_desc = ' || l_invoice_desc);
2936: END IF;
3205: SELECT ap_batches_s.nextval
3206: INTO l_tmp_batch_id
3207: FROM sys.dual;
3208:
3209: FND_MESSAGE.set_name('PO', 'PO_INV_CR_USE_BATCH_DESC');
3210: l_batch_name := FND_MESSAGE.get || '/' || TO_CHAR(sysdate) ||
3211: '/' || TO_CHAR(l_tmp_batch_id);
3212:
3213: IF (g_asn_debug = 'Y') THEN
3206: INTO l_tmp_batch_id
3207: FROM sys.dual;
3208:
3209: FND_MESSAGE.set_name('PO', 'PO_INV_CR_USE_BATCH_DESC');
3210: l_batch_name := FND_MESSAGE.get || '/' || TO_CHAR(sysdate) ||
3211: '/' || TO_CHAR(l_tmp_batch_id);
3212:
3213: IF (g_asn_debug = 'Y') THEN
3214: ASN_DEBUG.put_line('Batch name = ' || l_batch_name);
3231: END IF;
3232:
3233: l_progress := '140';
3234:
3235: FND_MESSAGE.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
3236: FND_MESSAGE.set_token('REQUEST', TO_CHAR(l_request_id));
3237: FND_MESSAGE.set_token('BATCH', l_batch_name);
3238: IF (g_asn_debug = 'Y') THEN
3239: ASN_DEBUG.put_line(FND_MESSAGE.get);
3232:
3233: l_progress := '140';
3234:
3235: FND_MESSAGE.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
3236: FND_MESSAGE.set_token('REQUEST', TO_CHAR(l_request_id));
3237: FND_MESSAGE.set_token('BATCH', l_batch_name);
3238: IF (g_asn_debug = 'Y') THEN
3239: ASN_DEBUG.put_line(FND_MESSAGE.get);
3240: END IF;
3233: l_progress := '140';
3234:
3235: FND_MESSAGE.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
3236: FND_MESSAGE.set_token('REQUEST', TO_CHAR(l_request_id));
3237: FND_MESSAGE.set_token('BATCH', l_batch_name);
3238: IF (g_asn_debug = 'Y') THEN
3239: ASN_DEBUG.put_line(FND_MESSAGE.get);
3240: END IF;
3241:
3235: FND_MESSAGE.set_name('PO', 'PO_ERS_CONC_REQUEST_CHECK');
3236: FND_MESSAGE.set_token('REQUEST', TO_CHAR(l_request_id));
3237: FND_MESSAGE.set_token('BATCH', l_batch_name);
3238: IF (g_asn_debug = 'Y') THEN
3239: ASN_DEBUG.put_line(FND_MESSAGE.get);
3240: END IF;
3241:
3242: END IF; -- l_distr_count > 0
3243: