DBA Data[Home] [Help]

APPS.PN_REC_CALC_PKG dependencies on PN_PAYMENT_TERMS_ALL

Line 3211: ,pn_payment_terms_all ppt

3207: SELECT nvl(SUM(pitem.actual_amount),0)
3208: INTO l_billed_recovery
3209: FROM pn_payment_items_all pitem
3210: ,pn_payment_schedules_all psched
3211: ,pn_payment_terms_all ppt
3212: WHERE psched.payment_status_lookup_code = 'APPROVED'
3213: AND to_date(to_char(psched.schedule_date,'mm/yyyy'),'mm/yyyy') between
3214: to_date(to_char( p_calc_period_start_date,'mm/yyyy'),'mm/yyyy')
3215: and to_date(to_char(p_calc_period_end_date,'mm/yyyy'),'mm/yyyy')

Line 4156: FROM pn_payment_terms_all term

4152: rec_template pn_term_templates_all%ROWTYPE;
4153:
4154: CURSOR csr_lease_term IS
4155: SELECT term.*
4156: FROM pn_payment_terms_all term
4157: WHERE term.lease_id = p_lease_id
4158: AND term.PAYMENT_TERM_TYPE_CODE = p_billing_type
4159: AND term.PAYMENT_PURPOSE_CODE = p_billing_purpose
4160: AND term.RECOVERABLE_FLAG = 'Y'

Line 4163: rec_lease_term pn_payment_terms_all%ROWTYPE;

4159: AND term.PAYMENT_PURPOSE_CODE = p_billing_purpose
4160: AND term.RECOVERABLE_FLAG = 'Y'
4161: AND rownum = 1;
4162:
4163: rec_lease_term pn_payment_terms_all%ROWTYPE;
4164: l_term_details VARCHAR2(1) := 'N';
4165: rec_distributions pn_distributions%ROWTYPE;
4166: l_rec_agr_line_id number;
4167: l_area pn_payment_terms.area%TYPE;

Line 4665: | before deleting from pn_payment_terms_all

4661: | 19-MAY-2003 Daniel Thota o Created
4662: | 04-SEP-2003 Daniel Thota o Removed DECODE and used IF..THEN..ELSE instead
4663: | Fix for bugs 3123730,3122264
4664: | 05-SEP-2003 Daniel Thota o Added code to delete from pn_distributions_all,
4665: | before deleting from pn_payment_terms_all
4666: | 17-SEP-2003 Daniel Thota o Put in cursors get_distributions_exist_nocons
4667: | and cursors get_distributions_exist_cons
4668: | Fix for bug # 3142328
4669: +===========================================================================*/

Line 4688: ,pn_payment_terms_all term

4684: SELECT 'Y'
4685: FROM dual
4686: WHERE EXISTS (SELECT 1
4687: FROM pn_distributions_all dist
4688: ,pn_payment_terms_all term
4689: WHERE term.payment_term_id = dist.payment_term_id
4690: AND term.period_billrec_id = l_period_bill_record.period_billrec_id
4691: AND term.rec_agr_line_id = p_rec_agr_line_id
4692: AND term.status = 'DRAFT')

Line 4700: ,pn_payment_terms_all term

4696: SELECT 'Y'
4697: FROM dual
4698: WHERE EXISTS (SELECT 1
4699: FROM pn_distributions_all dist
4700: ,pn_payment_terms_all term
4701: WHERE term.payment_term_id = dist.payment_term_id
4702: AND term.period_billrec_id = l_period_bill_record.period_billrec_id
4703: AND term.status = 'DRAFT')
4704: ;

Line 4748: FROM pn_payment_terms_all

4744:
4745: IF (p_consolidate = 'N') THEN
4746: SELECT NVL(SUM(actual_amount),0)
4747: INTO l_period_bill_record.amount
4748: FROM pn_payment_terms_all
4749: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4750: AND rec_agr_line_id = p_rec_agr_line_id
4751: AND status = 'APPROVED';
4752: ELSIF (p_consolidate = 'Y') THEN

Line 4755: FROM pn_payment_terms_all

4751: AND status = 'APPROVED';
4752: ELSIF (p_consolidate = 'Y') THEN
4753: SELECT NVL(SUM(actual_amount),0)
4754: INTO l_period_bill_record.amount
4755: FROM pn_payment_terms_all
4756: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4757: AND status = 'APPROVED';
4758: END IF;
4759:

Line 4777: FROM pn_payment_terms_all

4773: IF l_distributions_exist = 'Y' THEN
4774:
4775: DELETE pn_distributions_all
4776: WHERE payment_term_id in (SELECT payment_term_id
4777: FROM pn_payment_terms_all
4778: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4779: AND rec_agr_line_id = p_rec_agr_line_id
4780: AND status = 'DRAFT')
4781: ;

Line 4786: DELETE pn_payment_terms_all

4782:
4783: END IF;
4784:
4785:
4786: DELETE pn_payment_terms_all
4787: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4788: AND rec_agr_line_id = p_rec_agr_line_id
4789: AND status = 'DRAFT';
4790:

Line 4802: FROM pn_payment_terms_all

4798: IF l_distributions_exist = 'Y' THEN
4799:
4800: DELETE pn_distributions_all
4801: WHERE payment_term_id in (SELECT payment_term_id
4802: FROM pn_payment_terms_all
4803: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4804: AND status = 'DRAFT')
4805: ;
4806:

Line 4809: DELETE pn_payment_terms_all

4805: ;
4806:
4807: END IF;
4808:
4809: DELETE pn_payment_terms_all
4810: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4811: AND status = 'DRAFT';
4812:
4813: END IF;

Line 5122: PROCEDURE lock_area_exp_cls_dtl(p_payment_term_id in pn_payment_terms_all.payment_term_id%TYPE) is

5118: | 26-aug-2003 Ashish o Created
5119: +===========================================================================*/
5120:
5121:
5122: PROCEDURE lock_area_exp_cls_dtl(p_payment_term_id in pn_payment_terms_all.payment_term_id%TYPE) is
5123:
5124: cursor c_term is
5125: select term.period_billrec_id,
5126: term.rec_agr_line_id

Line 5127: from pn_payment_terms_all term

5123:
5124: cursor c_term is
5125: select term.period_billrec_id,
5126: term.rec_agr_line_id
5127: from pn_payment_terms_all term
5128: where term.payment_term_id = p_payment_term_id;
5129:
5130: cursor c_lines_cons is
5131: select

Line 5139: from pn_payment_terms_all term

5135: period.start_date as start_date,
5136: period.end_date as end_date ,
5137: period.as_of_date as as_of_date ,
5138: agrlines.rec_agr_line_id as rec_agr_line_id
5139: from pn_payment_terms_all term
5140: ,pn_rec_period_bill_all bill
5141: ,pn_rec_calc_periods_all period
5142: ,pn_rec_agr_lines_all agrlines
5143: ,pn_rec_agreements_all agr

Line 5161: from pn_payment_terms_all term

5157: period.start_date as start_date,
5158: period.end_date as end_date ,
5159: period.as_of_date as as_of_date ,
5160: agrlines.rec_agr_line_id as rec_agr_line_id
5161: from pn_payment_terms_all term
5162: ,pn_rec_period_bill_all bill
5163: ,pn_rec_calc_periods_all period
5164: ,pn_rec_agr_lines_all agrlines
5165: ,pn_rec_agreements_all agr