DBA Data[Home] [Help]

APPS.PN_REC_CALC_PKG dependencies on PN_DISTRIBUTIONS

Line 4100: l_distribution_id pn_distributions.distribution_id%TYPE;

4096: ,p_error_code IN OUT NOCOPY NUMBER
4097: ) IS
4098:
4099: l_lease_class_code pn_leases.lease_class_code%TYPE;
4100: l_distribution_id pn_distributions.distribution_id%TYPE;
4101: l_payment_term_id pn_payment_terms.payment_term_id%TYPE;
4102: l_lease_change_id pn_lease_details.lease_change_id%TYPE;
4103: l_rowid ROWID;
4104: l_distribution_count NUMBER := 0;

Line 4124: FROM pn_distributions_all pd

4120:
4121: CURSOR csr_temp_dist(p_term_template_id IN NUMBER)
4122: IS
4123: SELECT pd.*
4124: FROM pn_distributions_all pd
4125: WHERE pd.term_template_id = p_term_template_id;
4126:
4127: CURSOR csr_term_dist(p_term_id IN NUMBER)
4128: IS

Line 4130: FROM pn_distributions_all pd

4126:
4127: CURSOR csr_term_dist(p_term_id IN NUMBER)
4128: IS
4129: SELECT pd.*
4130: FROM pn_distributions_all pd
4131: WHERE pd.payment_term_id = p_term_id;
4132:
4133: CURSOR csr_template (p_rec_agreement_id IN NUMBER)
4134: IS

Line 4165: rec_distributions pn_distributions%ROWTYPE;

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;
4168: l_area_type_code pn_payment_terms.area_type_code%TYPE;
4169:

Line 4554: /* Create a record in pn_distributions */

4550: ,x_area_type_code => l_area_type_code
4551: );
4552:
4553:
4554: /* Create a record in pn_distributions */
4555:
4556:
4557: l_context := 'Creating Account Distributions ';
4558:

Line 4588: pn_distributions_pkg.insert_row (

4584: pnp_debug_pkg.log(' account_id '||rec_distributions.account_id);
4585: pnp_debug_pkg.log(' account_class '||rec_distributions.account_id);
4586:
4587: l_context := 'Inserting Account Distributions ';
4588: pn_distributions_pkg.insert_row (
4589: x_rowid => l_rowid
4590: ,x_distribution_id => l_distribution_id
4591: ,x_account_id => rec_distributions.account_id
4592: ,x_payment_term_id => l_payment_term_id

Line 4664: | 05-SEP-2003 Daniel Thota o Added code to delete from pn_distributions_all,

4660: |
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

Line 4687: FROM pn_distributions_all dist

4683: CURSOR get_distributions_exist_nocons IS
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

Line 4699: FROM pn_distributions_all dist

4695: CURSOR get_distributions_exist_cons IS
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')

Line 4775: DELETE pn_distributions_all

4771:
4772: pnp_debug_pkg.log('now deleting terms l_distributions_exist: '||l_distributions_exist);
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

Line 4800: DELETE pn_distributions_all

4796: CLOSE get_distributions_exist_cons;
4797:
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')