DBA Data[Home] [Help]

APPS.PA_INVOICE_CURRENCY dependencies on PA_DRAFT_INVOICES_ALL

Line 84: FROM PA_Draft_Invoices_ALL

80: CREATION_DATE, CREATED_BY, REQUEST_ID, WARNING_MESSAGE
81: )
82: SELECT Project_ID, Draft_Invoice_Num, sysdate, P_User_ID,
83: sysdate, P_User_ID, P_Request_ID, l_error_message
84: FROM PA_Draft_Invoices_ALL
85: WHERE Invoice_Set_ID = P_Invoice_Set_ID
86: AND project_id = p_project_id ; /* Fix for Performance bug 4942339 */
87:
88: END IF;

Line 127: pa_draft_invoices_all di

123: ,nvl(dii.credit_process_flag,'N') credit_process_flag
124: ,dii.inv_exchange_rate
125: /* Added for Payroll Billing ER #11847630 - End */
126: from pa_draft_invoice_items dii,
127: pa_draft_invoices_all di
128: where dii.project_id = P_Project_Id
129: and dii.draft_invoice_num = P_Draft_Inv_Num
130: and dii.invoice_line_type in ('STANDARD','INVOICE REDUCTION')
131: and dii.project_id = di.project_id

Line 144: pa_draft_invoices_all di

140: ,nvl(dii.credit_process_flag,'N') credit_process_flag
141: ,dii.inv_exchange_rate
142: /* Added for Payroll Billing ER #11847630 - End */
143: from pa_draft_invoice_items dii,
144: pa_draft_invoices_all di
145: where dii.project_id = P_Project_Id
146: and dii.draft_invoice_num = P_Draft_Inv_Num
147: and dii.invoice_line_type = 'RETENTION'
148: and dii.project_id = di.project_id

Line 257: FROM pa_draft_invoices_all di

253:
254: /*Added the following code for bug9453939*/
255: SELECT NVL(di.retention_invoice_flag,'N')
256: INTO l_retention_invoice_flag
257: FROM pa_draft_invoices_all di
258: WHERE di.project_id = P_Project_Id
259: AND di.draft_invoice_num = P_Draft_Inv_Num;
260:
261: IF g1_debug_mode = 'Y' THEN

Line 364: Update pa_draft_invoices_all

360: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_invproc_currency_code = l_inv_currency_code) AND (l_inv_currency_code = l_func_curr)' );
361: END IF;
362: X_Status := NULL;
363:
364: Update pa_draft_invoices_all
365: set inv_currency_code = l_invproc_currency_code
366: ,inv_rate_type = NULL
367: ,inv_rate_date = NULL
368: ,inv_exchange_rate = NULL

Line 390: Update pa_draft_invoices_all

386: IF g1_debug_mode = 'Y' THEN
387: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_invproc_currency_code = l_inv_currency_code) ');
388: END IF;
389:
390: Update pa_draft_invoices_all
391: set inv_currency_code = l_invproc_currency_code
392: ,inv_rate_type = NULL
393: ,inv_rate_date = NULL
394: ,inv_exchange_rate = NULL

Line 417: Update pa_draft_invoices_all

413:
414: /* The following commented and rewritten for bug#2355135
415: invoice currency = projfunc currency <> invproc currency
416: copy projfunc amount and null out other attributes as AR expects the amounts to be same
417: Update pa_draft_invoices_all
418: set projfunc_invtrans_rate_type = NULL
419: ,projfunc_invtrans_rate_date = NULL
420: ,projfunc_invtrans_ex_rate = NULL
421: where project_id = P_Project_Id

Line 424: Update pa_draft_invoices_all

420: ,projfunc_invtrans_ex_rate = NULL
421: where project_id = P_Project_Id
422: and draft_invoice_num = P_Draft_Inv_Num;
423: */
424: Update pa_draft_invoices_all
425: set projfunc_invtrans_rate_type = NULL
426: ,projfunc_invtrans_rate_date = NULL
427: ,projfunc_invtrans_ex_rate = NULL
428: ,inv_currency_code = l_inv_currency_code

Line 527: Update pa_draft_invoices_all

523: conversion attribute */
524: IF g1_debug_mode = 'Y' THEN
525: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' Update DI ');
526: END IF;
527: Update pa_draft_invoices_all
528: set inv_currency_code = l_inv_currency_code
529: ,inv_rate_type = l_inv_rate_type
530: ,inv_rate_date = l_inv_rate_date
531: ,inv_exchange_rate = l_rate

Line 624: Update pa_draft_invoices_all

620: conversion attribute */
621: IF g1_debug_mode = 'Y' THEN
622: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' Update DI ');
623: END IF;
624: Update pa_draft_invoices_all
625: set inv_currency_code = l_inv_currency_code
626: ,inv_rate_type = l_inv_rate_type
627: ,inv_rate_date = l_inv_rate_date
628: ,inv_exchange_rate = l_rate

Line 790: Update pa_draft_invoices_all

786: AND rownum=1;
787: END IF;
788:
789: /****End of code added for 3436063****/
790: Update pa_draft_invoices_all
791: set projfunc_invtrans_rate_type = 'User'
792: /* ,projfunc_invtrans_rate_date = sysdate commented for bug 3485407 and modified as follows ..*/
793: ,projfunc_invtrans_rate_date = invoice_date /* for bug 3485407 */
794: ,projfunc_invtrans_ex_rate = NVL(l_projfunc_invtrans_rate,0)

Line 836: Update pa_draft_invoices_all

832: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_projfunc_Exchg_Rate_type ' || l_projfunc_Exchg_Rate_type);
833: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_Rate ' || l_Rate);
834: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_Projfunc_Exchange_Rate ' || l_Projfunc_Exchange_Rate);
835:
836: Update pa_draft_invoices_all
837: set projfunc_invtrans_rate_type = l_projfunc_Exchg_Rate_type
838: ,projfunc_invtrans_rate_date = DECODE(l_PFC_Exchg_Rate_Date_Code,
839: 'PA_INVOICE_DATE', l_invoice_date, -- Fix for bug 3836514
840: l_projfunc_Exchg_Rate_Date)

Line 892: Update pa_draft_invoices_all

888:
889: );
890:
891: --================================
892: Update pa_draft_invoices_all
893: set projfunc_invtrans_rate_type = l_projfunc_Exchg_Rate_type
894: ,projfunc_invtrans_rate_date = DECODE(l_PFC_Exchg_Rate_Date_Code,
895: 'PA_INVOICE_DATE', l_invoice_date, -- Fix for Bug 3836514
896: l_projfunc_Exchg_Rate_Date)

Line 902: Update pa_draft_invoices_all

898: l_Projfunc_Exchange_Rate)
899: where project_id = P_Project_Id
900: and draft_invoice_num = P_Draft_Inv_Num;
901: Else */
902: Update pa_draft_invoices_all
903: set projfunc_invtrans_rate_type = inv_rate_type
904: ,projfunc_invtrans_rate_date = inv_rate_date
905: ,projfunc_invtrans_ex_rate = inv_exchange_rate
906: where project_id = P_Project_Id

Line 1277: Update pa_draft_invoices_all

1273: END IF;
1274:
1275: -- X_Status := NULL;
1276:
1277: Update pa_draft_invoices_all
1278: set inv_currency_code = l_invproc_currency_code
1279: ,inv_rate_type = NULL
1280: ,inv_rate_date = NULL
1281: ,inv_exchange_rate = NULL

Line 1304: Update pa_draft_invoices_all

1300: IF g1_debug_mode = 'Y' THEN
1301: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_invproc_currency_code = l_inv_currency_code) ');
1302: END IF;
1303:
1304: Update pa_draft_invoices_all
1305: set inv_currency_code = l_invproc_currency_code
1306: ,inv_rate_type = NULL
1307: ,inv_rate_date = NULL
1308: ,inv_exchange_rate = NULL

Line 1326: Update pa_draft_invoices_all

1322: IF g1_debug_mode = 'Y' THEN
1323: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_inv_currency_code = l_func_curr) ');
1324: END IF;
1325:
1326: Update pa_draft_invoices_all
1327: set projfunc_invtrans_rate_type = NULL
1328: ,projfunc_invtrans_rate_date = NULL
1329: ,projfunc_invtrans_ex_rate = NULL
1330: ,inv_currency_code = l_inv_currency_code

Line 1513: FROM pa_draft_invoices_all di,pa_draft_invoices_all cmdi

1509:
1510: /* commented for bug 6501526
1511: SELECT di.inv_rate_type,di.inv_rate_date
1512: INTO l_inv_rate_type,l_inv_rate_date
1513: FROM pa_draft_invoices_all di,pa_draft_invoices_all cmdi
1514: WHERE cmdi.draft_invoice_num_credited= di.draft_invoice_num
1515: AND cmdi.project_id=di.project_id
1516: AND cmdi.draft_invoice_num=P_Draft_Inv_Num
1517: AND cmdi.project_id=P_Project_Id;

Line 1521: Update pa_draft_invoices_all

1517: AND cmdi.project_id=P_Project_Id;
1518:
1519: -- Update the conversion rate for ITC to IC
1520:
1521: Update pa_draft_invoices_all
1522: set inv_currency_code = l_inv_currency_code
1523: -- ,inv_rate_type = 'User'
1524: --,inv_rate_date = sysdate Should be picked from main invoice: Bug 2689348
1525: -- code changed for bug 2689348

Line 1603: Update pa_draft_invoices_all

1599: /****End of code added for 3436063****/
1600:
1601: -- Update the conversion rate for ITC to PFC
1602:
1603: Update pa_draft_invoices_all
1604: set projfunc_invtrans_rate_type = 'User'
1605: /* ,projfunc_invtrans_rate_date = sysdate commented for bug 3485407 and modified as follows ..*/
1606: ,projfunc_invtrans_rate_date = invoice_date /* for bug 3485407 */
1607: ,projfunc_invtrans_ex_rate = NVL(l_projfunc_invtrans_rate,0)

Line 1617: from pa_draft_invoices_all

1613: l_Rate := 0;
1614: l_inv_amt := 1;
1615: select invoice_date
1616: into l_invoice_date
1617: from pa_draft_invoices_all
1618: where project_id = P_Project_Id
1619: and draft_invoice_num = P_Draft_Inv_Num;
1620:
1621: pa_multi_currency.convert_amount (

Line 1645: Update pa_draft_invoices_all

1641: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_projfunc_Exchg_Rate_type ' || l_projfunc_Exchg_Rate_type);
1642: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_Rate ' || l_Rate);
1643: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_Projfunc_Exchange_Rate ' || l_Projfunc_Exchange_Rate);
1644:
1645: Update pa_draft_invoices_all
1646: set projfunc_invtrans_rate_type = l_projfunc_Exchg_Rate_type
1647: ,projfunc_invtrans_rate_date = DECODE(l_PFC_Exchg_Rate_Date_Code,
1648: 'PA_INVOICE_DATE', l_invoice_date,
1649: l_projfunc_Exchg_Rate_Date)

Line 1662: Update pa_draft_invoices_all

1658: IF g1_debug_mode = 'Y' THEN
1659: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' l_func_curr <> l_inv_currency_code and l_invproc_currency_code = l_func_curr ');
1660: END IF;
1661:
1662: Update pa_draft_invoices_all
1663: set projfunc_invtrans_rate_type = inv_rate_type
1664: ,projfunc_invtrans_rate_date = inv_rate_date
1665: ,projfunc_invtrans_ex_rate = inv_exchange_rate
1666: -- DECODE(NVL(inv_exchange_rate,0),0,0, 1/NVL(inv_exchange_rate,0))

Line 1803: UPDATE pa_draft_invoices_all

1799: THEN
1800: IF g1_debug_mode = 'Y' THEN
1801: PA_MCB_INVOICE_PKG.log_message ('recalculATE: ' || 'Invoice Generation Error is set....'||l_out_status);
1802: END IF;
1803: UPDATE pa_draft_invoices_all
1804: SET generation_error_flag='Y',
1805: transfer_rejection_reason= (SELECT meaning FROM pa_lookups
1806: WHERE lookup_type='INVOICE_CURRENCY'
1807: AND lookup_code=l_out_status)