DBA Data[Home] [Help]

APPS.AP_PAY_INVOICE_PKG dependencies on AP_PAYMENT_SCHEDULES

Line 200: * -- Step 2 : case for all : Update AP_PAYMENT_SCHEDULES

196: --
197: if (P_PAYMENT_MODE = 'PAY') then
198:
199: /*--------------------------------------------------------------------------
200: * -- Step 2 : case for all : Update AP_PAYMENT_SCHEDULES
201: * Call ap_pay_update_payment_schedules :
202: *
203: *--------------------------------------------------------------------------*/
204: ap_pay_invoice_pkg.ap_pay_update_payment_schedule(

Line 459: FROM ap_payment_schedules PS, ap_invoices AI

455: AI_exchange_rate,
456: AI_exchange_date,
457: AI_exchange_rate_type,
458: c_inv_currency_code
459: FROM ap_payment_schedules PS, ap_invoices AI
460: WHERE PS.invoice_id = P_invoice_id
461: AND PS.payment_num = P_payment_num
462: AND AI.invoice_id = P_invoice_id;
463:

Line 570: FROM ap_payment_schedules ps

566: nvl(PS.third_disc_amt_available,0)),
567: ps.gross_amount
568: INTO PS_disc_amt_available,
569: PS_gross_amount
570: FROM ap_payment_schedules ps
571: WHERE invoice_id = P_invoice_id
572: AND payment_num = P_payment_num;
573:
574: --

Line 1033: l_pmt_status_flag AP_PAYMENT_SCHEDULES_ALL.payment_status_flag%TYPE ; -- Bug 8300099

1029: P_calling_sequence IN VARCHAR2) IS
1030:
1031: debug_info VARCHAR2(100);
1032: current_calling_sequence VARCHAR2(2000);
1033: l_pmt_status_flag AP_PAYMENT_SCHEDULES_ALL.payment_status_flag%TYPE ; -- Bug 8300099
1034: l_another_pmt VARCHAR2(1);
1035: l_prepay_applied VARCHAR2(1);
1036:
1037: BEGIN

Line 1046: debug_info := 'Update ap_payment_schedules (pay)';

1042: if (P_PAYMENT_MODE = 'PAY') then
1043:
1044: if (P_REPLACE_FLAG = 'N') then
1045:
1046: debug_info := 'Update ap_payment_schedules (pay)';
1047:
1048: UPDATE ap_payment_schedules
1049: SET amount_remaining = amount_remaining - P_amount -
1050: NVL(P_discount_taken, 0),

Line 1048: UPDATE ap_payment_schedules

1044: if (P_REPLACE_FLAG = 'N') then
1045:
1046: debug_info := 'Update ap_payment_schedules (pay)';
1047:
1048: UPDATE ap_payment_schedules
1049: SET amount_remaining = amount_remaining - P_amount -
1050: NVL(P_discount_taken, 0),
1051: discount_amount_remaining = 0,
1052: payment_status_flag = DECODE(amount_remaining -

Line 1065: debug_info := 'Update ap_payment_schedules (reissue)';

1061: AND payment_num = P_payment_num;
1062:
1063: elsif (P_REPLACE_FLAG = 'Y') then
1064:
1065: debug_info := 'Update ap_payment_schedules (reissue)';
1066:
1067: UPDATE ap_payment_schedules
1068: SET last_update_date = P_last_update_date,
1069: last_updated_by = P_last_updated_by

Line 1067: UPDATE ap_payment_schedules

1063: elsif (P_REPLACE_FLAG = 'Y') then
1064:
1065: debug_info := 'Update ap_payment_schedules (reissue)';
1066:
1067: UPDATE ap_payment_schedules
1068: SET last_update_date = P_last_update_date,
1069: last_updated_by = P_last_updated_by
1070: WHERE invoice_id = P_invoice_id
1071: AND payment_num = P_payment_num;

Line 1079: debug_info := 'Update ap_payment_schedules (reverse, non-prepayment)';

1075: elsif (P_PAYMENT_MODE = 'REV') then
1076:
1077: if (P_REPLACE_FLAG = 'N') then
1078:
1079: debug_info := 'Update ap_payment_schedules (reverse, non-prepayment)';
1080:
1081: -- SELECT statement added by Bug 8300099
1082: /* Bug 10640186 begin */
1083: SELECT DECODE( NVL( SUM(AIP.amount), 0 ), 0, 'N', 'Y' )

Line 1132: , ap_payment_schedules APS

1128: + SUM(AIP.amount)
1129: + SUM(NVL(AIP.discount_taken,0)), 'N', 'P')
1130: INTO l_pmt_status_flag
1131: FROM ap_invoice_payments AIP
1132: , ap_payment_schedules APS
1133: WHERE AIP.invoice_id = P_invoice_id
1134: AND AIP.payment_num = P_payment_num
1135: AND AIP.check_id = P_check_id
1136: AND AIP.invoice_id = APS.invoice_id

Line 1150: UPDATE ap_payment_schedules APS

1146: /* END bug 10640186 */
1147:
1148: -- bug7353248 nvl added for aps.amount_remaining
1149:
1150: UPDATE ap_payment_schedules APS
1151: SET (amount_remaining
1152: , discount_amount_remaining
1153: , payment_status_flag
1154: , last_update_date

Line 1192: debug_info := 'Update ap_payment_schedules (reverse, prepayment)';

1188: --Split the UPDATE into two. First for non-prepayment as above
1189: --and next for PREPAYMENT as below
1190: --
1191:
1192: debug_info := 'Update ap_payment_schedules (reverse, prepayment)';
1193:
1194: UPDATE ap_payment_schedules APS
1195: SET (amount_remaining
1196: , payment_status_flag

Line 1194: UPDATE ap_payment_schedules APS

1190: --
1191:
1192: debug_info := 'Update ap_payment_schedules (reverse, prepayment)';
1193:
1194: UPDATE ap_payment_schedules APS
1195: SET (amount_remaining
1196: , payment_status_flag
1197: , last_update_date
1198: , last_updated_by)

Line 1223: debug_info := 'Update ap_payment_schedules (replace)';

1219: AND AI.invoice_type_lookup_code = 'PREPAYMENT');
1220:
1221: elsif (P_REPLACE_FLAG = 'Y') then
1222:
1223: debug_info := 'Update ap_payment_schedules (replace)';
1224:
1225: UPDATE ap_payment_schedules
1226: SET last_update_date = P_last_update_date,
1227: last_updated_by = P_last_updated_by

Line 1225: UPDATE ap_payment_schedules

1221: elsif (P_REPLACE_FLAG = 'Y') then
1222:
1223: debug_info := 'Update ap_payment_schedules (replace)';
1224:
1225: UPDATE ap_payment_schedules
1226: SET last_update_date = P_last_update_date,
1227: last_updated_by = P_last_updated_by
1228: WHERE invoice_id = P_invoice_id
1229: AND payment_num = P_payment_num;

Line 1289: It is used to update the ap_invoices table and ap_payment_schedules

1285:
1286:
1287: /****************************************************************
1288: The procedure was created due to bugs 467167, 661795 .
1289: It is used to update the ap_invoices table and ap_payment_schedules
1290: table when reversing an invoice payment. It is called from the
1291: payment workbench.
1292: ******************************************************************/
1293:

Line 1326: -- Update ap_payment_schedules

1322: -- statment for ap_pyment_schedules has been moved from here to after the update
1323: -- statment for ap_pyment_schedules in this procedure.
1324:
1325:
1326: -- Update ap_payment_schedules
1327: --
1328: UPDATE ap_payment_schedules
1329: SET amount_remaining = amount_remaining + P_amount +
1330: nvl(P_discount,0),

Line 1328: UPDATE ap_payment_schedules

1324:
1325:
1326: -- Update ap_payment_schedules
1327: --
1328: UPDATE ap_payment_schedules
1329: SET amount_remaining = amount_remaining + P_amount +
1330: nvl(P_discount,0),
1331: discount_amount_remaining = 0,
1332: payment_status_flag = DECODE(amount_remaining +

Line 1344: -- in AP_INVOICES after ap_payment_schedules is updates. This will cause

1340: WHERE invoice_id = P_invoice_id
1341: AND payment_num = P_payment_line_number;
1342:
1343: -- Bug 1544895 - Moved the following update statement so that it inserts values
1344: -- in AP_INVOICES after ap_payment_schedules is updates. This will cause
1345: -- the payment_status_flag in AP_INVOICES to have the correct value.
1346:
1347: -- Update ap_invoices
1348: