DBA Data[Home] [Help]

APPS.ZX_AR_POPULATE_PKG dependencies on AR_DISTRIBUTIONS_ALL

Line 1110: -- OR REVENU line distributed into multiple rows in the ar_distributions_all--

1106: 'Duplicate rows deleted using 1st Query: '|| to_char(SQL%ROWCOUNT));
1107: END IF;
1108:
1109: -- This query deletes duplicate rows returned by receipts due to 'UNEARN'--
1110: -- OR REVENU line distributed into multiple rows in the ar_distributions_all--
1111: DELETE FROM zx_rep_trx_detail_t dtl1
1112: WHERE trx_line_id <>( SELECT min(dtl2.trx_line_id )
1113: FROM zx_rep_trx_detail_t dtl2
1114: WHERE dtl2.request_id = P_TRL_GLOBAL_VARIABLES_REC.REQUEST_ID

Line 1689: FROM AR_DISTRIBUTIONS_ALL ARDTAX,

1685: C_TAX_ID IN NUMBER ) IS
1686: SELECT SUM(NVL(ARDTAX.AMOUNT_CR,0) - NVL(ARDTAX.AMOUNT_DR,0)),
1687: SUM(NVL(ARDTAX.TAXABLE_ENTERED_CR,0) -
1688: NVL(ARDTAX.TAXABLE_ENTERED_DR,0))
1689: FROM AR_DISTRIBUTIONS_ALL ARDTAX,
1690: AR_RECEIVABLE_APPLICATIONS_ALL APP,
1691: RA_CUSTOMER_TRX_ALL TRXCM
1692: WHERE APP.CASH_RECEIPT_ID = C_TRX_ID
1693: AND APP.APPLIED_CUSTOMER_TRX_ID = TRXCM.CUSTOMER_TRX_ID

Line 2871: FROM ar_distributions_all dist,

2867:
2868: CURSOR trx_ccid (c_actg_source_id number, c_event_id number, c_ae_header_id number) IS
2869: SELECT
2870: ael.code_combination_id
2871: FROM ar_distributions_all dist,
2872: xla_distribution_links lnk,
2873: xla_ae_lines ael
2874: WHERE dist.line_id = c_actg_source_id
2875: AND lnk.application_id = 222

Line 2876: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2872: xla_distribution_links lnk,
2873: xla_ae_lines ael
2874: WHERE dist.line_id = c_actg_source_id
2875: AND lnk.application_id = 222
2876: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2877: AND lnk.source_distribution_id_num_1 = dist.line_id
2878: AND lnk.ae_header_id = ael.ae_header_id
2879: AND lnk.ae_line_num = ael.ae_line_num
2880: AND lnk.event_id = c_event_id

Line 2887: FROM ar_distributions_all dist,

2883: AND rownum =1;
2884:
2885: /* CURSOR trx_dist_ccid (c_actg_source_id number, c_event_id number, c_ae_header_id number) IS
2886: SELECT ael.code_combination_id
2887: FROM ar_distributions_all dist,
2888: ar_distributions_all taxdist,
2889: xla_distribution_links lnk,
2890: xla_ae_lines ael
2891: WHERE taxdist.line_id = p_actg_source_id

Line 2888: ar_distributions_all taxdist,

2884:
2885: /* CURSOR trx_dist_ccid (c_actg_source_id number, c_event_id number, c_ae_header_id number) IS
2886: SELECT ael.code_combination_id
2887: FROM ar_distributions_all dist,
2888: ar_distributions_all taxdist,
2889: xla_distribution_links lnk,
2890: xla_ae_lines ael
2891: WHERE taxdist.line_id = p_actg_source_id
2892: AND NVL(dist.source_table,'X') = NVL(taxdist.source_table_secondary,'X')

Line 2897: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2893: AND dist.tax_link_id = taxdist.tax_link_id
2894: AND dist.source_id = taxdist.source_id
2895: AND lnk.source_distribution_id_num_1 = dist.line_id
2896: AND lnk.application_id = 222
2897: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2898: AND lnk.ae_header_id = ael.ae_header_id
2899: AND lnk.ae_line_num = ael.ae_line_num
2900: AND lnk.event_id = c_event_id
2901: AND lnk.ae_header_id = c_ae_header_id

Line 2908: FROM ar_distributions_all dist,

2904: */
2905:
2906: CURSOR trx_dist_ccid_misc (c_trx_line_id number, c_event_id number, c_ae_header_id number) IS
2907: SELECT ael.code_combination_id
2908: FROM ar_distributions_all dist,
2909: xla_distribution_links lnk,
2910: xla_ae_lines ael
2911: WHERE dist.line_id = c_trx_line_id
2912: AND dist.source_table= 'MCD'

Line 2915: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2911: WHERE dist.line_id = c_trx_line_id
2912: AND dist.source_table= 'MCD'
2913: AND lnk.source_distribution_id_num_1 = dist.line_id
2914: AND lnk.application_id = 222
2915: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2916: AND lnk.ae_header_id = ael.ae_header_id
2917: AND lnk.ae_line_num = ael.ae_line_num
2918: AND lnk.event_id = c_event_id
2919: AND lnk.ae_header_id = c_ae_header_id

Line 2925: FROM ar_distributions_all dist,

2921: AND rownum =1;
2922:
2923: CURSOR trx_dist_ccid_app (c_trx_line_id number, c_event_id number, c_ae_header_id number) IS
2924: SELECT ael.code_combination_id
2925: FROM ar_distributions_all dist,
2926: xla_distribution_links lnk,
2927: xla_ae_lines ael
2928: WHERE dist.line_id = c_trx_line_id
2929: AND dist.source_table= 'RA'

Line 2932: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2928: WHERE dist.line_id = c_trx_line_id
2929: AND dist.source_table= 'RA'
2930: AND lnk.source_distribution_id_num_1 = dist.line_id
2931: AND lnk.application_id = 222
2932: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2933: AND lnk.ae_header_id = ael.ae_header_id
2934: AND lnk.ae_line_num = ael.ae_line_num
2935: AND lnk.event_id = c_event_id
2936: AND lnk.ae_header_id = c_ae_header_id

Line 2942: FROM ar_distributions_all dist,

2938: AND rownum =1;
2939:
2940: CURSOR trx_dist_ccid_adj (c_trx_line_id number, c_event_id number, c_ae_header_id number) IS
2941: SELECT ael.code_combination_id
2942: FROM ar_distributions_all dist,
2943: xla_distribution_links lnk,
2944: xla_ae_lines ael
2945: WHERE dist.line_id = c_trx_line_id
2946: AND dist.source_table= 'ADJ'

Line 2949: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2945: WHERE dist.line_id = c_trx_line_id
2946: AND dist.source_table= 'ADJ'
2947: AND lnk.source_distribution_id_num_1 = dist.line_id
2948: AND lnk.application_id = 222
2949: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2950: AND lnk.ae_header_id = ael.ae_header_id
2951: AND lnk.ae_line_num = ael.ae_line_num
2952: AND lnk.event_id = c_event_id
2953: AND lnk.ae_header_id = c_ae_header_id

Line 2959: FROM ar_distributions_all dist,

2955: AND rownum =1;
2956:
2957: CURSOR tax_ccid (c_actg_source_id number, c_event_id number, c_ae_header_id number) IS
2958: SELECT ael.code_combination_id
2959: FROM ar_distributions_all dist,
2960: ar_distributions_all taxdist,
2961: xla_distribution_links lnk,
2962: xla_ae_lines ael
2963: WHERE dist.line_id = c_actg_source_id

Line 2960: ar_distributions_all taxdist,

2956:
2957: CURSOR tax_ccid (c_actg_source_id number, c_event_id number, c_ae_header_id number) IS
2958: SELECT ael.code_combination_id
2959: FROM ar_distributions_all dist,
2960: ar_distributions_all taxdist,
2961: xla_distribution_links lnk,
2962: xla_ae_lines ael
2963: WHERE dist.line_id = c_actg_source_id
2964: AND NVL(dist.source_table,'X') = NVL(taxdist.source_table_secondary,'X')

Line 2969: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2965: AND dist.tax_link_id = taxdist.tax_link_id
2966: AND dist.source_id = taxdist.source_id
2967: AND lnk.source_distribution_id_num_1 = taxdist.line_id
2968: AND lnk.application_id = 222
2969: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2970: AND lnk.ae_header_id = ael.ae_header_id
2971: AND lnk.ae_line_num = ael.ae_line_num
2972: AND lnk.event_id = c_event_id
2973: AND lnk.ae_header_id = c_ae_header_id

Line 2980: FROM ar_distributions_all taxdist,

2976:
2977: CURSOR tax_dist_ccid (c_actg_source_id number, c_event_id number, c_ae_header_id number) IS
2978: SELECT
2979: ael.code_combination_id
2980: FROM ar_distributions_all taxdist,
2981: xla_distribution_links lnk,
2982: xla_ae_lines ael
2983: WHERE taxdist.line_id = c_actg_source_id
2984: AND lnk.application_id = 222

Line 2985: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

2981: xla_distribution_links lnk,
2982: xla_ae_lines ael
2983: WHERE taxdist.line_id = c_actg_source_id
2984: AND lnk.application_id = 222
2985: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
2986: AND lnk.source_distribution_id_num_1 = taxdist.line_id
2987: AND lnk.ae_header_id = ael.ae_header_id
2988: AND lnk.ae_line_num = ael.ae_line_num
2989: AND ael.accounting_class_code <> 'UNAPP'

Line 3200: FROM AR_DISTRIBUTIONS_ALL

3196: ELSE -- Adjustments for Tax Reconciliation Report ---
3197:
3198: BEGIN
3199: SELECT CODE_COMBINATION_ID INTO l_ccid
3200: FROM AR_DISTRIBUTIONS_ALL
3201: WHERE LINE_ID = P_ACTG_SOURCE_ID;
3202: --SOURCE_ID = P_TRX_LINE_ID
3203:
3204: agt_actg_line_ccid(j) := l_ccid;

Line 3467: FROM ar_distributions_all dist,

3463: -- Transaction Header Level
3464: CURSOR taxable_amount_hdr (c_actg_source_id NUMBER, c_ae_header_id NUMBER,
3465: c_event_id NUMBER,c_ledger_id NUMBER) IS
3466: SELECT sum(lnk.DOC_ROUNDING_ENTERED_AMT), sum(lnk.DOC_ROUNDING_ACCTD_AMT)
3467: FROM ar_distributions_all dist,
3468: xla_distribution_links lnk,
3469: xla_ae_headers aeh,
3470: xla_ae_lines ael
3471: WHERE dist.line_id = c_actg_source_id

Line 3473: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

3469: xla_ae_headers aeh,
3470: xla_ae_lines ael
3471: WHERE dist.line_id = c_actg_source_id
3472: AND lnk.application_id = 222
3473: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
3474: AND lnk.source_distribution_id_num_1 = dist.line_id
3475: AND lnk.ae_header_id = c_ae_header_id
3476: AND lnk.event_id = c_event_id
3477: AND lnk.ae_line_num = ael.ae_line_num

Line 3488: FROM AR_DISTRIBUTIONS_ALL dist,

3484:
3485: CURSOR tax_amount_hdr (c_actg_source_id NUMBER, c_ae_header_id NUMBER,
3486: c_event_id NUMBER,c_ledger_id NUMBER) IS
3487: SELECT sum(lnk.DOC_ROUNDING_ENTERED_AMT), sum(lnk.DOC_ROUNDING_ACCTD_AMT)
3488: FROM AR_DISTRIBUTIONS_ALL dist,
3489: AR_DISTRIBUTIONS_ALL taxdist,
3490: xla_distribution_links lnk,
3491: xla_ae_headers aeh,
3492: xla_ae_lines ael

Line 3489: AR_DISTRIBUTIONS_ALL taxdist,

3485: CURSOR tax_amount_hdr (c_actg_source_id NUMBER, c_ae_header_id NUMBER,
3486: c_event_id NUMBER,c_ledger_id NUMBER) IS
3487: SELECT sum(lnk.DOC_ROUNDING_ENTERED_AMT), sum(lnk.DOC_ROUNDING_ACCTD_AMT)
3488: FROM AR_DISTRIBUTIONS_ALL dist,
3489: AR_DISTRIBUTIONS_ALL taxdist,
3490: xla_distribution_links lnk,
3491: xla_ae_headers aeh,
3492: xla_ae_lines ael
3493: WHERE dist.line_id = c_actg_source_id

Line 3499: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

3495: AND NVL(taxdist.source_type_secondary,'X') = NVL(dist.source_type,'X')
3496: AND taxdist.source_id = dist.source_id
3497: AND lnk.source_distribution_id_num_1 = taxdist.line_id
3498: AND lnk.application_id = 222
3499: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
3500: AND lnk.ae_header_id = c_ae_header_id
3501: AND lnk.event_id = c_event_id
3502: AND lnk.ae_line_num = ael.ae_line_num
3503: AND aeh.ae_header_id = ael.ae_header_id

Line 3516: FROM AR_DISTRIBUTIONS_ALL dist,

3512: CURSOR taxable_amount_dist_misc(c_trx_line_id NUMBER, c_ae_header_id NUMBER, c_event_id NUMBER,c_ledger_id NUMBER) IS
3513: --SELECT sum(lnk.DOC_ROUNDING_ENTERED_AMT), sum(lnk.DOC_ROUNDING_ACCTD_AMT)
3514: SELECT sum(nvl(lnk.UNROUNDED_ENTERED_CR,0)) - sum(nvl(lnk.UNROUNDED_ENTERED_DR,0)),
3515: sum(nvl(lnk.UNROUNDED_ACCOUNTED_CR,0)) - SUM(nvl(lnk.UNROUNDED_ACCOUNTED_DR,0))
3516: FROM AR_DISTRIBUTIONS_ALL dist,
3517: xla_distribution_links lnk,
3518: xla_ae_headers aeh,
3519: xla_ae_lines ael
3520: WHERE dist.line_id = c_trx_line_id

Line 3523: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

3519: xla_ae_lines ael
3520: WHERE dist.line_id = c_trx_line_id
3521: AND lnk.source_distribution_id_num_1 = dist.line_id
3522: AND lnk.application_id = 222
3523: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
3524: AND lnk.ae_header_id = c_ae_header_id
3525: AND lnk.event_id = c_event_id
3526: AND lnk.ae_line_num = ael.ae_line_num
3527: AND aeh.ae_header_id = ael.ae_header_id

Line 3537: FROM AR_DISTRIBUTIONS_ALL dist,

3533:
3534: CURSOR taxable_amount_dist_app(c_trx_line_id NUMBER, c_ae_header_id NUMBER, c_event_id NUMBER,c_ledger_id NUMBER) IS
3535: SELECT sum(nvl(lnk.UNROUNDED_ENTERED_CR,0)) - sum(nvl(lnk.UNROUNDED_ENTERED_DR,0)),
3536: sum(nvl(lnk.UNROUNDED_ACCOUNTED_CR,0)) - SUM(nvl(lnk.UNROUNDED_ACCOUNTED_DR,0))
3537: FROM AR_DISTRIBUTIONS_ALL dist,
3538: xla_distribution_links lnk,
3539: xla_ae_headers aeh,
3540: xla_ae_lines ael
3541: WHERE dist.line_id = c_trx_line_id

Line 3544: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

3540: xla_ae_lines ael
3541: WHERE dist.line_id = c_trx_line_id
3542: AND lnk.source_distribution_id_num_1 = dist.line_id
3543: AND lnk.application_id = 222
3544: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
3545: AND lnk.ae_header_id = c_ae_header_id
3546: AND lnk.event_id = c_event_id
3547: AND lnk.ae_line_num = ael.ae_line_num
3548: AND aeh.ae_header_id = ael.ae_header_id

Line 3558: FROM AR_DISTRIBUTIONS_ALL dist,

3554:
3555: CURSOR taxable_amount_dist_adj(c_trx_line_id NUMBER, c_ae_header_id NUMBER, c_event_id NUMBER,c_ledger_id NUMBER) IS
3556: SELECT sum(nvl(lnk.UNROUNDED_ENTERED_CR,0)) - sum(nvl(lnk.UNROUNDED_ENTERED_DR,0)),
3557: sum(nvl(lnk.UNROUNDED_ACCOUNTED_CR,0)) - SUM(nvl(lnk.UNROUNDED_ACCOUNTED_DR,0))
3558: FROM AR_DISTRIBUTIONS_ALL dist,
3559: xla_distribution_links lnk,
3560: xla_ae_headers aeh,
3561: xla_ae_lines ael
3562: WHERE dist.line_id = c_trx_line_id

Line 3565: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

3561: xla_ae_lines ael
3562: WHERE dist.line_id = c_trx_line_id
3563: AND lnk.source_distribution_id_num_1 = dist.line_id
3564: AND lnk.application_id = 222
3565: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
3566: AND lnk.ae_header_id = c_ae_header_id
3567: AND lnk.event_id = c_event_id
3568: AND lnk.ae_line_num = ael.ae_line_num
3569: AND aeh.ae_header_id = ael.ae_header_id

Line 3581: FROM ar_distributions_all taxdist,

3577: c_event_id NUMBER,c_ledger_id NUMBER) IS
3578: --SELECT sum(lnk.DOC_ROUNDING_ENTERED_AMT), sum(lnk.DOC_ROUNDING_ACCTD_AMT)
3579: SELECT sum(nvl(lnk.UNROUNDED_ENTERED_CR,0)) - sum(nvl(lnk.UNROUNDED_ENTERED_DR,0)),
3580: sum(nvl(lnk.UNROUNDED_ACCOUNTED_CR,0)) - SUM(nvl(lnk.UNROUNDED_ACCOUNTED_DR,0))
3581: FROM ar_distributions_all taxdist,
3582: xla_distribution_links lnk,
3583: xla_ae_headers aeh,
3584: xla_ae_lines ael
3585: WHERE taxdist.line_id = c_actg_source_id

Line 3587: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'

3583: xla_ae_headers aeh,
3584: xla_ae_lines ael
3585: WHERE taxdist.line_id = c_actg_source_id
3586: AND lnk.application_id = 222
3587: AND lnk.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
3588: AND lnk.source_distribution_id_num_1 = taxdist.line_id
3589: AND lnk.ae_header_id = c_ae_header_id
3590: AND lnk.event_id = c_event_id
3591: AND lnk.ae_line_num = ael.ae_line_num