DBA Data[Home] [Help]

APPS.PN_REC_CALC_PKG dependencies on PN_PAYMENT_TERMS

Line 3126: ,pn_payment_terms_all ppt

3122: SELECT nvl(SUM(pitem.actual_amount),0)
3123: INTO l_billed_recovery
3124: FROM pn_payment_items_all pitem
3125: ,pn_payment_schedules_all psched
3126: ,pn_payment_terms_all ppt
3127: WHERE psched.payment_status_lookup_code = 'APPROVED'
3128: AND to_date(to_char(psched.schedule_date,'mm/yyyy'),'mm/yyyy') between
3129: to_date(to_char( p_calc_period_start_date,'mm/yyyy'),'mm/yyyy')
3130: and to_date(to_char(p_calc_period_end_date,'mm/yyyy'),'mm/yyyy')

Line 4016: l_payment_term_id pn_payment_terms.payment_term_id%TYPE;

4012: ) IS
4013:
4014: l_lease_class_code pn_leases.lease_class_code%TYPE;
4015: l_distribution_id pn_distributions.distribution_id%TYPE;
4016: l_payment_term_id pn_payment_terms.payment_term_id%TYPE;
4017: l_lease_change_id pn_lease_details.lease_change_id%TYPE;
4018: l_rowid ROWID;
4019: l_distribution_count NUMBER := 0;
4020: l_payment_start_date pn_payment_terms.start_date%TYPE;

Line 4020: l_payment_start_date pn_payment_terms.start_date%TYPE;

4016: l_payment_term_id pn_payment_terms.payment_term_id%TYPE;
4017: l_lease_change_id pn_lease_details.lease_change_id%TYPE;
4018: l_rowid ROWID;
4019: l_distribution_count NUMBER := 0;
4020: l_payment_start_date pn_payment_terms.start_date%TYPE;
4021: l_payment_end_date pn_payment_terms.end_date%TYPE;
4022: l_frequency pn_payment_terms.frequency_code%type;
4023: l_schedule_day pn_payment_terms.schedule_day%type;
4024: l_set_of_books_id gl_sets_of_books.set_of_books_id%type;

Line 4021: l_payment_end_date pn_payment_terms.end_date%TYPE;

4017: l_lease_change_id pn_lease_details.lease_change_id%TYPE;
4018: l_rowid ROWID;
4019: l_distribution_count NUMBER := 0;
4020: l_payment_start_date pn_payment_terms.start_date%TYPE;
4021: l_payment_end_date pn_payment_terms.end_date%TYPE;
4022: l_frequency pn_payment_terms.frequency_code%type;
4023: l_schedule_day pn_payment_terms.schedule_day%type;
4024: l_set_of_books_id gl_sets_of_books.set_of_books_id%type;
4025: l_context varchar2(2000);

Line 4022: l_frequency pn_payment_terms.frequency_code%type;

4018: l_rowid ROWID;
4019: l_distribution_count NUMBER := 0;
4020: l_payment_start_date pn_payment_terms.start_date%TYPE;
4021: l_payment_end_date pn_payment_terms.end_date%TYPE;
4022: l_frequency pn_payment_terms.frequency_code%type;
4023: l_schedule_day pn_payment_terms.schedule_day%type;
4024: l_set_of_books_id gl_sets_of_books.set_of_books_id%type;
4025: l_context varchar2(2000);
4026: l_period_billrec_id PN_REC_PERIOD_BILL_all.period_billrec_id%TYPE:= NULL;

Line 4023: l_schedule_day pn_payment_terms.schedule_day%type;

4019: l_distribution_count NUMBER := 0;
4020: l_payment_start_date pn_payment_terms.start_date%TYPE;
4021: l_payment_end_date pn_payment_terms.end_date%TYPE;
4022: l_frequency pn_payment_terms.frequency_code%type;
4023: l_schedule_day pn_payment_terms.schedule_day%type;
4024: l_set_of_books_id gl_sets_of_books.set_of_books_id%type;
4025: l_context varchar2(2000);
4026: l_period_billrec_id PN_REC_PERIOD_BILL_all.period_billrec_id%TYPE:= NULL;
4027: l_payment_amount pn_payment_terms.actual_amount%type;

Line 4027: l_payment_amount pn_payment_terms.actual_amount%type;

4023: l_schedule_day pn_payment_terms.schedule_day%type;
4024: l_set_of_books_id gl_sets_of_books.set_of_books_id%type;
4025: l_context varchar2(2000);
4026: l_period_billrec_id PN_REC_PERIOD_BILL_all.period_billrec_id%TYPE:= NULL;
4027: l_payment_amount pn_payment_terms.actual_amount%type;
4028: l_period_bill_record period_bill_record;
4029: l_is_r12 BOOLEAN := pn_r12_util_pkg.is_r12;
4030: l_dummy VARCHAR2(30);
4031:

Line 4071: FROM pn_payment_terms_all term

4067: rec_template pn_term_templates_all%ROWTYPE;
4068:
4069: CURSOR csr_lease_term IS
4070: SELECT term.*
4071: FROM pn_payment_terms_all term
4072: WHERE term.lease_id = p_lease_id
4073: AND term.PAYMENT_TERM_TYPE_CODE = p_billing_type
4074: AND term.PAYMENT_PURPOSE_CODE = p_billing_purpose
4075: AND term.RECOVERABLE_FLAG = 'Y'

Line 4078: rec_lease_term pn_payment_terms_all%ROWTYPE;

4074: AND term.PAYMENT_PURPOSE_CODE = p_billing_purpose
4075: AND term.RECOVERABLE_FLAG = 'Y'
4076: AND rownum = 1;
4077:
4078: rec_lease_term pn_payment_terms_all%ROWTYPE;
4079: l_term_details VARCHAR2(1) := 'N';
4080: rec_distributions pn_distributions%ROWTYPE;
4081: l_rec_agr_line_id number;
4082: l_area pn_payment_terms.area%TYPE;

Line 4082: l_area pn_payment_terms.area%TYPE;

4078: rec_lease_term pn_payment_terms_all%ROWTYPE;
4079: l_term_details VARCHAR2(1) := 'N';
4080: rec_distributions pn_distributions%ROWTYPE;
4081: l_rec_agr_line_id number;
4082: l_area pn_payment_terms.area%TYPE;
4083: l_area_type_code pn_payment_terms.area_type_code%TYPE;
4084:
4085:
4086: CURSOR org_cur IS

Line 4083: l_area_type_code pn_payment_terms.area_type_code%TYPE;

4079: l_term_details VARCHAR2(1) := 'N';
4080: rec_distributions pn_distributions%ROWTYPE;
4081: l_rec_agr_line_id number;
4082: l_area pn_payment_terms.area%TYPE;
4083: l_area_type_code pn_payment_terms.area_type_code%TYPE;
4084:
4085:
4086: CURSOR org_cur IS
4087: SELECT org_id

Line 4580: | before deleting from pn_payment_terms_all

4576: | 19-MAY-2003 Daniel Thota o Created
4577: | 04-SEP-2003 Daniel Thota o Removed DECODE and used IF..THEN..ELSE instead
4578: | Fix for bugs 3123730,3122264
4579: | 05-SEP-2003 Daniel Thota o Added code to delete from pn_distributions_all,
4580: | before deleting from pn_payment_terms_all
4581: | 17-SEP-2003 Daniel Thota o Put in cursors get_distributions_exist_nocons
4582: | and cursors get_distributions_exist_cons
4583: | Fix for bug # 3142328
4584: +===========================================================================*/

Line 4603: ,pn_payment_terms_all term

4599: SELECT 'Y'
4600: FROM dual
4601: WHERE EXISTS (SELECT 1
4602: FROM pn_distributions_all dist
4603: ,pn_payment_terms_all term
4604: WHERE term.payment_term_id = dist.payment_term_id
4605: AND term.period_billrec_id = l_period_bill_record.period_billrec_id
4606: AND term.rec_agr_line_id = p_rec_agr_line_id
4607: AND term.status = 'DRAFT')

Line 4615: ,pn_payment_terms_all term

4611: SELECT 'Y'
4612: FROM dual
4613: WHERE EXISTS (SELECT 1
4614: FROM pn_distributions_all dist
4615: ,pn_payment_terms_all term
4616: WHERE term.payment_term_id = dist.payment_term_id
4617: AND term.period_billrec_id = l_period_bill_record.period_billrec_id
4618: AND term.status = 'DRAFT')
4619: ;

Line 4663: FROM pn_payment_terms_all

4659:
4660: IF (p_consolidate = 'N') THEN
4661: SELECT NVL(SUM(actual_amount),0)
4662: INTO l_period_bill_record.amount
4663: FROM pn_payment_terms_all
4664: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4665: AND rec_agr_line_id = p_rec_agr_line_id
4666: AND status = 'APPROVED';
4667: ELSIF (p_consolidate = 'Y') THEN

Line 4670: FROM pn_payment_terms_all

4666: AND status = 'APPROVED';
4667: ELSIF (p_consolidate = 'Y') THEN
4668: SELECT NVL(SUM(actual_amount),0)
4669: INTO l_period_bill_record.amount
4670: FROM pn_payment_terms_all
4671: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4672: AND status = 'APPROVED';
4673: END IF;
4674:

Line 4692: FROM pn_payment_terms_all

4688: IF l_distributions_exist = 'Y' THEN
4689:
4690: DELETE pn_distributions_all
4691: WHERE payment_term_id in (SELECT payment_term_id
4692: FROM pn_payment_terms_all
4693: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4694: AND rec_agr_line_id = p_rec_agr_line_id
4695: AND status = 'DRAFT')
4696: ;

Line 4701: DELETE pn_payment_terms_all

4697:
4698: END IF;
4699:
4700:
4701: DELETE pn_payment_terms_all
4702: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4703: AND rec_agr_line_id = p_rec_agr_line_id
4704: AND status = 'DRAFT';
4705:

Line 4717: FROM pn_payment_terms_all

4713: IF l_distributions_exist = 'Y' THEN
4714:
4715: DELETE pn_distributions_all
4716: WHERE payment_term_id in (SELECT payment_term_id
4717: FROM pn_payment_terms_all
4718: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4719: AND status = 'DRAFT')
4720: ;
4721:

Line 4724: DELETE pn_payment_terms_all

4720: ;
4721:
4722: END IF;
4723:
4724: DELETE pn_payment_terms_all
4725: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4726: AND status = 'DRAFT';
4727:
4728: END IF;

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

5033: | 26-aug-2003 Ashish o Created
5034: +===========================================================================*/
5035:
5036:
5037: PROCEDURE lock_area_exp_cls_dtl(p_payment_term_id in pn_payment_terms_all.payment_term_id%TYPE) is
5038:
5039: cursor c_term is
5040: select term.period_billrec_id,
5041: term.rec_agr_line_id

Line 5042: from pn_payment_terms_all term

5038:
5039: cursor c_term is
5040: select term.period_billrec_id,
5041: term.rec_agr_line_id
5042: from pn_payment_terms_all term
5043: where term.payment_term_id = p_payment_term_id;
5044:
5045: cursor c_lines_cons is
5046: select

Line 5054: from pn_payment_terms_all term

5050: period.start_date as start_date,
5051: period.end_date as end_date ,
5052: period.as_of_date as as_of_date ,
5053: agrlines.rec_agr_line_id as rec_agr_line_id
5054: from pn_payment_terms_all term
5055: ,pn_rec_period_bill_all bill
5056: ,pn_rec_calc_periods_all period
5057: ,pn_rec_agr_lines_all agrlines
5058: ,pn_rec_agreements_all agr

Line 5076: from pn_payment_terms_all term

5072: period.start_date as start_date,
5073: period.end_date as end_date ,
5074: period.as_of_date as as_of_date ,
5075: agrlines.rec_agr_line_id as rec_agr_line_id
5076: from pn_payment_terms_all term
5077: ,pn_rec_period_bill_all bill
5078: ,pn_rec_calc_periods_all period
5079: ,pn_rec_agr_lines_all agrlines
5080: ,pn_rec_agreements_all agr