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 123: pa_draft_invoices_all di

119: dii.line_num line_num,
120: dii.amount amount,
121: NVL(di.retention_invoice_flag,'N') retention_invoice_flag
122: from pa_draft_invoice_items dii,
123: pa_draft_invoices_all di
124: where dii.project_id = P_Project_Id
125: and dii.draft_invoice_num = P_Draft_Inv_Num
126: and dii.invoice_line_type in ('STANDARD','INVOICE REDUCTION')
127: and dii.project_id = di.project_id

Line 136: pa_draft_invoices_all di

132: dii.line_num line_num,
133: dii.amount amount,
134: NVL(di.retention_invoice_flag,'N') retention_invoice_flag
135: from pa_draft_invoice_items dii,
136: pa_draft_invoices_all di
137: where dii.project_id = P_Project_Id
138: and dii.draft_invoice_num = P_Draft_Inv_Num
139: and dii.invoice_line_type = 'RETENTION'
140: and dii.project_id = di.project_id

Line 331: Update pa_draft_invoices_all

327: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_invproc_currency_code = l_inv_currency_code) AND (l_inv_currency_code = l_func_curr)' );
328: END IF;
329: X_Status := NULL;
330:
331: Update pa_draft_invoices_all
332: set inv_currency_code = l_invproc_currency_code
333: ,inv_rate_type = NULL
334: ,inv_rate_date = NULL
335: ,inv_exchange_rate = NULL

Line 357: Update pa_draft_invoices_all

353: IF g1_debug_mode = 'Y' THEN
354: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_invproc_currency_code = l_inv_currency_code) ');
355: END IF;
356:
357: Update pa_draft_invoices_all
358: set inv_currency_code = l_invproc_currency_code
359: ,inv_rate_type = NULL
360: ,inv_rate_date = NULL
361: ,inv_exchange_rate = NULL

Line 384: Update pa_draft_invoices_all

380:
381: /* The following commented and rewritten for bug#2355135
382: invoice currency = projfunc currency <> invproc currency
383: copy projfunc amount and null out other attributes as AR expects the amounts to be same
384: Update pa_draft_invoices_all
385: set projfunc_invtrans_rate_type = NULL
386: ,projfunc_invtrans_rate_date = NULL
387: ,projfunc_invtrans_ex_rate = NULL
388: where project_id = P_Project_Id

Line 391: Update pa_draft_invoices_all

387: ,projfunc_invtrans_ex_rate = NULL
388: where project_id = P_Project_Id
389: and draft_invoice_num = P_Draft_Inv_Num;
390: */
391: Update pa_draft_invoices_all
392: set projfunc_invtrans_rate_type = NULL
393: ,projfunc_invtrans_rate_date = NULL
394: ,projfunc_invtrans_ex_rate = NULL
395: ,inv_currency_code = l_inv_currency_code

Line 464: Update pa_draft_invoices_all

460: conversion attribute */
461: IF g1_debug_mode = 'Y' THEN
462: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' Update DI ');
463: END IF;
464: Update pa_draft_invoices_all
465: set inv_currency_code = l_inv_currency_code
466: ,inv_rate_type = l_inv_rate_type
467: ,inv_rate_date = l_inv_rate_date
468: ,inv_exchange_rate = l_rate

Line 648: Update pa_draft_invoices_all

644: AND rownum=1;
645: END IF;
646:
647: /****End of code added for 3436063****/
648: Update pa_draft_invoices_all
649: set projfunc_invtrans_rate_type = 'User'
650: /* ,projfunc_invtrans_rate_date = sysdate commented for bug 3485407 and modified as follows ..*/
651: ,projfunc_invtrans_rate_date = invoice_date /* for bug 3485407 */
652: ,projfunc_invtrans_ex_rate = NVL(l_projfunc_invtrans_rate,0)

Line 694: Update pa_draft_invoices_all

690: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_projfunc_Exchg_Rate_type ' || l_projfunc_Exchg_Rate_type);
691: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_Rate ' || l_Rate);
692: PA_MCB_INVOICE_PKG.log_message('recalculATE: l_Projfunc_Exchange_Rate ' || l_Projfunc_Exchange_Rate);
693:
694: Update pa_draft_invoices_all
695: set projfunc_invtrans_rate_type = l_projfunc_Exchg_Rate_type
696: ,projfunc_invtrans_rate_date = DECODE(l_PFC_Exchg_Rate_Date_Code,
697: 'PA_INVOICE_DATE', l_invoice_date, -- Fix for bug 3836514
698: l_projfunc_Exchg_Rate_Date)

Line 749: Update pa_draft_invoices_all

745:
746: );
747:
748: --================================
749: Update pa_draft_invoices_all
750: set projfunc_invtrans_rate_type = l_projfunc_Exchg_Rate_type
751: ,projfunc_invtrans_rate_date = DECODE(l_PFC_Exchg_Rate_Date_Code,
752: 'PA_INVOICE_DATE', l_invoice_date, -- Fix for Bug 3836514
753: l_projfunc_Exchg_Rate_Date)

Line 759: Update pa_draft_invoices_all

755: l_Projfunc_Exchange_Rate)
756: where project_id = P_Project_Id
757: and draft_invoice_num = P_Draft_Inv_Num;
758: Else */
759: Update pa_draft_invoices_all
760: set projfunc_invtrans_rate_type = inv_rate_type
761: ,projfunc_invtrans_rate_date = inv_rate_date
762: ,projfunc_invtrans_ex_rate = inv_exchange_rate
763: where project_id = P_Project_Id

Line 1113: Update pa_draft_invoices_all

1109: END IF;
1110:
1111: -- X_Status := NULL;
1112:
1113: Update pa_draft_invoices_all
1114: set inv_currency_code = l_invproc_currency_code
1115: ,inv_rate_type = NULL
1116: ,inv_rate_date = NULL
1117: ,inv_exchange_rate = NULL

Line 1140: Update pa_draft_invoices_all

1136: IF g1_debug_mode = 'Y' THEN
1137: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_invproc_currency_code = l_inv_currency_code) ');
1138: END IF;
1139:
1140: Update pa_draft_invoices_all
1141: set inv_currency_code = l_invproc_currency_code
1142: ,inv_rate_type = NULL
1143: ,inv_rate_date = NULL
1144: ,inv_exchange_rate = NULL

Line 1162: Update pa_draft_invoices_all

1158: IF g1_debug_mode = 'Y' THEN
1159: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' If (l_inv_currency_code = l_func_curr) ');
1160: END IF;
1161:
1162: Update pa_draft_invoices_all
1163: set projfunc_invtrans_rate_type = NULL
1164: ,projfunc_invtrans_rate_date = NULL
1165: ,projfunc_invtrans_ex_rate = NULL
1166: ,inv_currency_code = l_inv_currency_code

Line 1349: FROM pa_draft_invoices_all di,pa_draft_invoices_all cmdi

1345:
1346: /* commented for bug 6501526
1347: SELECT di.inv_rate_type,di.inv_rate_date
1348: INTO l_inv_rate_type,l_inv_rate_date
1349: FROM pa_draft_invoices_all di,pa_draft_invoices_all cmdi
1350: WHERE cmdi.draft_invoice_num_credited= di.draft_invoice_num
1351: AND cmdi.project_id=di.project_id
1352: AND cmdi.draft_invoice_num=P_Draft_Inv_Num
1353: AND cmdi.project_id=P_Project_Id;

Line 1357: Update pa_draft_invoices_all

1353: AND cmdi.project_id=P_Project_Id;
1354:
1355: -- Update the conversion rate for ITC to IC
1356:
1357: Update pa_draft_invoices_all
1358: set inv_currency_code = l_inv_currency_code
1359: -- ,inv_rate_type = 'User'
1360: --,inv_rate_date = sysdate Should be picked from main invoice: Bug 2689348
1361: -- code changed for bug 2689348

Line 1436: Update pa_draft_invoices_all

1432: /****End of code added for 3436063****/
1433:
1434: -- Update the conversion rate for ITC to PFC
1435:
1436: Update pa_draft_invoices_all
1437: set projfunc_invtrans_rate_type = 'User'
1438: /* ,projfunc_invtrans_rate_date = sysdate commented for bug 3485407 and modified as follows ..*/
1439: ,projfunc_invtrans_rate_date = invoice_date /* for bug 3485407 */
1440: ,projfunc_invtrans_ex_rate = NVL(l_projfunc_invtrans_rate,0)

Line 1450: Update pa_draft_invoices_all

1446: IF g1_debug_mode = 'Y' THEN
1447: PA_MCB_INVOICE_PKG.log_message('recalculATE: ' || ' l_func_curr <> l_inv_currency_code and l_invproc_currency_code = l_func_curr ');
1448: END IF;
1449:
1450: Update pa_draft_invoices_all
1451: set projfunc_invtrans_rate_type = inv_rate_type
1452: ,projfunc_invtrans_rate_date = inv_rate_date
1453: ,projfunc_invtrans_ex_rate = inv_exchange_rate
1454: -- DECODE(NVL(inv_exchange_rate,0),0,0, 1/NVL(inv_exchange_rate,0))

Line 1591: UPDATE pa_draft_invoices_all

1587: THEN
1588: IF g1_debug_mode = 'Y' THEN
1589: PA_MCB_INVOICE_PKG.log_message ('recalculATE: ' || 'Invoice Generation Error is set....'||l_out_status);
1590: END IF;
1591: UPDATE pa_draft_invoices_all
1592: SET generation_error_flag='Y',
1593: transfer_rejection_reason= (SELECT meaning FROM pa_lookups
1594: WHERE lookup_type='INVOICE_CURRENCY'
1595: AND lookup_code=l_out_status)