DBA Data[Home] [Help]

APPS.AR_CALC_LATE_CHARGE dependencies on AR_PAYMENT_SCHEDULES

Line 526: from ar_payment_schedules ps

522: END IF;
523:
524: select min(trx_date) -1
525: into l_next_date
526: from ar_payment_schedules ps
527: where customer_id = p_customer_id
528: and decode(ps.class,
529: 'BR',ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,
530: ps.customer_site_use_id,

Line 653: from ar_payment_schedules

649: select sum(amount_due_original), sum(fin_charge_charged)
650: into l_balance_due,l_fin_chrg_adjustment
651: from
652: (select amount_due_original,0 fin_charge_charged
653: from ar_payment_schedules
654: where payment_schedule_id = p_payment_schedule_id
655: union all
656: select nvl(-1 *(ra.amount_applied
657: + nvl(ra.earned_discount_taken,0)

Line 662: ar_payment_schedules ps_cm_cr

658: + nvl(ra.unearned_discount_taken,0))
659: ,0) amount_applied,
660: 0 fin_charge_charged
661: from ar_receivable_applications ra,
662: ar_payment_schedules ps_cm_cr
663: where applied_payment_schedule_id = p_payment_schedule_id
664: and ra.status = 'APP'
665: and nvl(ra.confirmed_flag,'Y') = 'Y'
666: and ps_cm_cr.payment_schedule_id = ra.payment_schedule_id

Line 702: /* For receipts the balance should be directly taken from ar_payment_schedules.

698:
699: ELSIF p_class ='PMT' THEN
700: /* Compound and Simple Interest doesn't matter for Payments as there can not be any
701: adjustments against receipts */
702: /* For receipts the balance should be directly taken from ar_payment_schedules.
703: amount_due_remaining. The receipt date is considered for calculating the balances
704: of the transaction and not the application date */
705: select ps.amount_due_remaining
706: into l_balance_due

Line 707: from ar_payment_schedules ps

703: amount_due_remaining. The receipt date is considered for calculating the balances
704: of the transaction and not the application date */
705: select ps.amount_due_remaining
706: into l_balance_due
707: from ar_payment_schedules ps
708: where ps.payment_schedule_id = p_payment_schedule_id
709: and ps.class ='PMT'
710: and nvl(ps.receipt_confirmed_flag,'Y') = 'Y';
711: END IF;

Line 754: from ar_payment_schedules ps

750: and ci2.billing_date <= p_as_of_date
751: and ci2.status in ('FINAL', 'ACCEPTED','IMPORTED'))
752: union all
753: select sum(amount_due_original)
754: from ar_payment_schedules ps
755: where ps.customer_id = p_customer_id
756: and decode(ps.class,
757: 'BR',ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,
758: ps.customer_site_use_id,

Line 866: ar_payment_schedules ps

862: and ci.status in ('FINAL', 'ACCEPTED','IMPORTED')
863: union all
864: select sum(ps.amount_due_original)
865: from ar_cons_inv ci,
866: ar_payment_schedules ps
867: where ci.customer_id = p_customer_id
868: and ci.site_use_id = p_site_use_id
869: and ci.currency_code = p_currency_code
870: and ci.org_id = p_org_id

Line 942: from ar_payment_schedules ps

938: l_first_activity_date DATE;
939: BEGIN
940: select min(trx_date)
941: into l_first_activity_date
942: from ar_payment_schedules ps
943: where ps.customer_id = p_customer_id
944: and decode(ps.class,
945: 'BR',ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,
946: ps.customer_site_use_id,

Line 1230: from ar_payment_schedules ps,

1226: prof_amts.penalty_fixed_amount,
1227: prof_amts.penalty_schedule_id,
1228: site_use.last_accrue_charge_date,
1229: ps.org_id
1230: from ar_payment_schedules ps,
1231: ar_transaction_history th,
1232: ra_customer_trx trx,
1233: hz_cust_accounts cust_acct,
1234: hz_parties party,

Line 1445: ar_payment_schedules ps,

1441: cr.legal_entity_id,
1442: cr.org_id,
1443: -1* ps.amount_due_remaining balance_due
1444: from ar_cash_receipts cr,
1445: ar_payment_schedules ps,
1446: ar_lc_cust_sites_t cust_site,
1447: ar_late_charge_cust_balance_gt bal
1448: where ps.actual_date_closed > l_fin_charge_date
1449: and ps.class ='PMT'

Line 1492: from ar_payment_schedules ps,

1488: -1*ar_calc_late_charge.get_balance_as_of(ps.payment_schedule_id,
1489: l_fin_charge_date,
1490: 'CM',
1491: 'Y') balance_due
1492: from ar_payment_schedules ps,
1493: ra_customer_trx trx,
1494: ra_cust_trx_types types,
1495: ar_lc_cust_sites_t cust_site,
1496: ar_late_charge_cust_balance_gt bal

Line 1561: | i) amount_due_remaining from ar_payment_schedules |

1557: | |
1558: | PSEUDO CODE/LOGIC |
1559: | |
1560: | a) Get the overdue balances of the debit items as sum of |
1561: | i) amount_due_remaining from ar_payment_schedules |
1562: | ii) amount_applied + discount from ar_receivable_applications after the |
1563: | finance charge date. Note that the trx_date of the credit items is considered |
1564: | for determining this as compared to the application date |
1565: | iii) amount_adjusted from ar_adjustments after the finance charge date |

Line 1966: from ar_payment_schedules ps,

1962: cust_site.hold_charged_invoices_flag,
1963: ps.org_id,
1964: ps.cash_receipt_id,
1965: 'OVERDUE' charge_type
1966: from ar_payment_schedules ps,
1967: ar_adjustments adj,
1968: ar_lc_cust_sites_t cust_site,
1969: ar_late_charge_cust_balance_gt bal
1970: where ps.customer_id = cust_site.customer_id

Line 2088: from ar_payment_schedules ps,

2084: cust_site.hold_charged_invoices_flag,
2085: ps.org_id,
2086: ps.cash_receipt_id,
2087: 'OVERDUE' charge_type
2088: from ar_payment_schedules ps,
2089: ar_receivable_applications app,
2090: ar_payment_schedules ps_cm_cr,
2091: ar_lc_cust_sites_t cust_site,
2092: ar_late_charge_cust_balance_gt bal

Line 2090: ar_payment_schedules ps_cm_cr,

2086: ps.cash_receipt_id,
2087: 'OVERDUE' charge_type
2088: from ar_payment_schedules ps,
2089: ar_receivable_applications app,
2090: ar_payment_schedules ps_cm_cr,
2091: ar_lc_cust_sites_t cust_site,
2092: ar_late_charge_cust_balance_gt bal
2093: where ps.customer_id = cust_site.customer_id
2094: and cust_site.customer_site_use_id = decode(ps.class,

Line 2213: from ar_payment_schedules ps,

2209: cust_site.hold_charged_invoices_flag,
2210: ps.org_id,
2211: ps.cash_receipt_id,
2212: 'OVERDUE' charge_type
2213: from ar_payment_schedules ps,
2214: ar_lc_cust_sites_t cust_site,
2215: ar_late_charge_cust_balance_gt bal
2216: where ps.customer_id = cust_site.customer_id
2217: and cust_site.customer_site_use_id = decode(ps.class,

Line 2378: | i) amount_due_remaining from ar_payment_schedules |

2374: | |
2375: | PSEUDO CODE/LOGIC |
2376: | |
2377: | a) Get the overdue balances of the items as sum of |
2378: | i) amount_due_remaining from ar_payment_schedules |
2379: | ii) amount_applied + discount from ar_receivable_applications after the |
2380: | finance charge date. The data on which the credit item is created is used |
2381: | instead of the application date |
2382: | iii) amount_adjusted from ar_adjustments after the finance charge date |

Line 2664: from ar_payment_schedules ps,

2660: cust_site.hold_charged_invoices_flag,
2661: ps.org_id,
2662: ps.cash_receipt_id,
2663: 'OVERDUE' charge_type
2664: from ar_payment_schedules ps,
2665: ar_adjustments adj,
2666: ar_lc_cust_sites_t cust_site,
2667: ar_late_charge_cust_balance_gt bal
2668: where ps.customer_id = cust_site.customer_id

Line 2803: from ar_payment_schedules ps,

2799: cust_site.hold_charged_invoices_flag,
2800: ps.org_id,
2801: ps.cash_receipt_id,
2802: 'OVERDUE' charge_type
2803: from ar_payment_schedules ps,
2804: ar_receivable_applications app,
2805: ar_payment_schedules ps_cm_cr,
2806: ar_lc_cust_sites_t cust_site,
2807: ar_late_charge_cust_balance_gt bal

Line 2805: ar_payment_schedules ps_cm_cr,

2801: ps.cash_receipt_id,
2802: 'OVERDUE' charge_type
2803: from ar_payment_schedules ps,
2804: ar_receivable_applications app,
2805: ar_payment_schedules ps_cm_cr,
2806: ar_lc_cust_sites_t cust_site,
2807: ar_late_charge_cust_balance_gt bal
2808: where ps.customer_id = cust_site.customer_id
2809: and cust_site.customer_site_use_id = decode(ps.class,

Line 2937: from ar_payment_schedules ps,

2933: cust_site.hold_charged_invoices_flag,
2934: ps.org_id,
2935: ps.cash_receipt_id,
2936: 'OVERDUE' charge_type
2937: from ar_payment_schedules ps,
2938: ar_receivable_applications app,
2939: ar_lc_cust_sites_t cust_site,
2940: ar_late_charge_cust_balance_gt bal
2941: where ps.customer_id = cust_site.customer_id

Line 3061: from ar_payment_schedules ps,

3057: cust_site.hold_charged_invoices_flag,
3058: ps.org_id,
3059: ps.cash_receipt_id,
3060: 'OVERDUE' charge_type
3061: from ar_payment_schedules ps,
3062: ar_lc_cust_sites_t cust_site,
3063: ar_late_charge_cust_balance_gt bal
3064: where ps.customer_id = cust_site.customer_id
3065: and cust_site.customer_site_use_id = decode(ps.class,

Line 3515: from ar_payment_schedules ps,

3511: 'DAILY',ps.due_date,
3512: 'MONTHLY',first_day(ps.due_date)) eff_due_date,
3513: 'LATE' charge_type,
3514: cust_site.late_charge_calculation_trx eff_charge_type
3515: from ar_payment_schedules ps,
3516: ar_lc_cust_sites_t cust_site,
3517: ar_late_charge_cust_balance_gt bal,
3518: ar_receivable_applications app,
3519: ar_cash_receipts cr,

Line 3524: from ar_payment_schedules ps,

3520: ra_cust_trx_types types,
3521: ra_customer_trx trx,
3522: ar_transaction_history th,
3523: (select ps.payment_schedule_id ,sum(adj.amount) fin_charge_charged
3524: from ar_payment_schedules ps,
3525: ar_adjustments adj,
3526: ar_lc_cust_sites_t cust_site
3527: where ps.customer_id = cust_site.customer_id
3528: and decode(cust_site.customer_site_use_id,'','X', ps.customer_site_use_id)

Line 4076: from ar_payment_schedules ps,

4072: cust_sites.payment_grace_days,
4073: cust_sites.min_fc_balance_overdue_type,
4074: cust_sites.min_fc_balance_amount,
4075: cust_sites.min_fc_balance_percent
4076: from ar_payment_schedules ps,
4077: ar_lc_cust_sites_t cust_sites,
4078: ar_system_parameters sysparam
4079: where ps.customer_id = cust_sites.customer_id
4080: and decode(ps.class,

Line 4388: from ar_payment_schedules ps,

4384: cust_sites.payment_grace_days,
4385: cust_sites.min_fc_balance_overdue_type,
4386: cust_sites.min_fc_balance_amount,
4387: cust_sites.min_fc_balance_percent
4388: from ar_payment_schedules ps,
4389: ar_lc_cust_sites_t cust_sites,
4390: ar_system_parameters sysparam
4391: where ps.customer_id = cust_sites.customer_id
4392: and decode(ps.class,

Line 4509: FROM ar_payment_schedules ps,

4505: sum(ps.amount_due_remaining) open_bal,
4506: sum((case when ps.due_date < p_as_of_date then 1 else 0 end)
4507: * ps.amount_due_remaining) overdue_bal,
4508: ps.org_id
4509: FROM ar_payment_schedules ps,
4510: ar_lc_cust_sites_t cust_site
4511: WHERE ps.customer_id = cust_site.customer_id
4512: AND cust_site.customer_site_use_id = decode(ps.class,
4513: 'BR',ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,

Line 4541: FROM ar_payment_schedules ps,

4537: sum((case when ps.due_date < p_as_of_date then 1 else 0 end)
4538: * (ra.amount_applied + NVL(ra.earned_discount_taken,0)
4539: + NVL(ra.unearned_discount_taken,0))) overdue_bal,
4540: ps.org_id
4541: FROM ar_payment_schedules ps,
4542: ar_receivable_applications ra,
4543: ar_payment_schedules ps_cm_cr,
4544: ar_lc_cust_sites_t cust_site
4545: WHERE ps.customer_id = cust_site.customer_id

Line 4543: ar_payment_schedules ps_cm_cr,

4539: + NVL(ra.unearned_discount_taken,0))) overdue_bal,
4540: ps.org_id
4541: FROM ar_payment_schedules ps,
4542: ar_receivable_applications ra,
4543: ar_payment_schedules ps_cm_cr,
4544: ar_lc_cust_sites_t cust_site
4545: WHERE ps.customer_id = cust_site.customer_id
4546: AND cust_site.customer_site_use_id = decode(ps.class,
4547: 'BR',ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,

Line 4579: FROM ar_payment_schedules ps,

4575: sum (-1*(case when ps.due_date < p_as_of_date then 1 else 0 end)
4576: *(ra.amount_applied + NVL(ra.earned_discount_taken,0)
4577: + NVL(ra.unearned_discount_taken,0))) overdue_bal,
4578: ps.org_id
4579: FROM ar_payment_schedules ps,
4580: ar_receivable_applications ra,
4581: ar_lc_cust_sites_t cust_site
4582: WHERE ps.customer_id = cust_site.customer_id
4583: AND cust_site.customer_site_use_id = decode(ps.class,

Line 4616: ar_payment_schedules ps,

4612: sum(-1*(case when ps.due_date < p_as_of_date then 1 else 0 end)
4613: *(adj.amount)) overdue_bal,
4614: ps.org_id
4615: FROM ar_adjustments adj ,
4616: ar_payment_schedules ps,
4617: ar_lc_cust_sites_t cust_site
4618: WHERE ps.customer_id = cust_site.customer_id
4619: AND cust_site.customer_site_use_id = decode(ps.class,
4620: 'BR',ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,

Line 4649: FROM ar_payment_schedules ps,

4645: ps.invoice_currency_code currency_code,
4646: sum(ps.amount_due_remaining) open_bal,
4647: sum(ps.amount_due_remaining) overdue_bal,
4648: ps.org_id
4649: FROM ar_payment_schedules ps,
4650: ar_lc_cust_sites_t cust_site
4651: WHERE ps.customer_id = cust_site.customer_id
4652: AND cust_site.customer_site_use_id = ar_calc_late_charge.get_bill_to_site_use_id(ps.customer_id,
4653: ps.customer_site_use_id,

Line 4680: FROM ar_payment_schedules ps,

4676: sum((case when ps.trx_date < p_as_of_date then 1 else 0 end)
4677: *(decode(nvl(ard.amount_cr,0), 0, nvl(ard.amount_dr,0),
4678: (ard.amount_cr * -1)))) overdue_bal,
4679: ps.org_id
4680: FROM ar_payment_schedules ps,
4681: ar_distributions ard,
4682: ar_transaction_history ath,
4683: ra_customer_trx_lines lines,
4684: ar_lc_cust_sites_t cust_site

Line 6517: | from ar_payment_schedules). |

6513: | |
6514: | 2. Invoice Level Tolerances : Similar to the case above. Instead of the overdue |
6515: | customer balance, the overdue invoice amount will be used. Instead of the Open |
6516: | customer balance, the original invoice amount will be used (amount_due_original |
6517: | from ar_payment_schedules). |
6518: | |
6519: | In my example above, as of 31-Jan-2006, the invoice 101 is overdue by 600 USD and|
6520: | the original invoice amount is 1000 USD . So 60% of this invoice is overdue as of |
6521: | this date. Invoice 102 will not be considered as it is not overdue. |