DBA Data[Home] [Help]

APPS.AR_CMGT_DATA_POINTS_PKG dependencies on GL_CURRENCY_API

Line 199: SELECT round(gl_currency_api.convert_amount(currency_code,

195: BEGIN
196: SELECT sum(amount_settled), sum(ded_count)
197: INTO l_deduction_amount, l_deduction_count
198: FROM (
199: SELECT round(gl_currency_api.convert_amount(currency_code,
200: p_limit_currency, sysdate,
201: p_exchange_rate_type,
202: sum(amount_settled)),2) amount_settled,
203: count(*) ded_count

Line 257: SELECT round(gl_currency_api.convert_amount(currency_code,

253: BEGIN
254: SELECT sum(amount_settled), sum(ded_count)
255: INTO l_deduction_amount, l_deduction_count
256: FROM (
257: SELECT round(gl_currency_api.convert_amount(currency_code,
258: p_limit_currency, sysdate,
259: p_exchange_rate_type,
260: sum(amount_settled)),2) amount_settled,
261: count(*) ded_count

Line 292: SELECT round(gl_currency_api.convert_amount(currency_code,

288: BEGIN
289: SELECT sum(amount_settled), sum(ded_count)
290: INTO l_deduction_amount, l_deduction_count
291: FROM (
292: SELECT round(gl_currency_api.convert_amount(currency_code,
293: p_limit_currency, sysdate,
294: p_exchange_rate_type,
295: sum(amount_settled)),2) amount_settled,
296: count(*) ded_count

Line 422: gl_currency_api.convert_amount(currency,

418:
419: l_party_sql VARCHAR2(4000) :='select LARGEST_INV_DATE,
420: largest_inv_amount
421: from ( select as_of_date LARGEST_INV_DATE,
422: gl_currency_api.convert_amount(currency,
423: :1,sysdate,
424: :2,
425: largest_inv_amount)largest_inv_amount,
426: RANK() OVER (PARTITION BY currency

Line 464: gl_currency_api.convert_amount(currency,

460:
461: l_account_sql VARCHAR2(4000) :='select LARGEST_INV_DATE,
462: largest_inv_amount
463: from ( select as_of_date LARGEST_INV_DATE,
464: gl_currency_api.convert_amount(currency,
465: :1,sysdate,
466: :2,
467: largest_inv_amount)largest_inv_amount,
468: RANK() OVER (PARTITION BY cust_account_id,currency

Line 484: gl_currency_api.convert_amount(currency,

480:
481: l_site_sql VARCHAR2(4000) :='select LARGEST_INV_DATE,
482: largest_inv_amount
483: from ( select as_of_date LARGEST_INV_DATE,
484: gl_currency_api.convert_amount(currency,
485: :1,sysdate,
486: :2,
487: largest_inv_amount)largest_inv_amount,
488: RANK() OVER (PARTITION BY cust_account_id, site_use_id,currency

Line 504: gl_currency_api.convert_amount(currency,

500: part of bug fix 3557539
501: l_high_credit_party_sql VARCHAR2(4000) :='select op_bal_high_watermark_date,
502: op_bal_high_watermark
503: from ( select as_of_date op_bal_high_watermark_date,
504: gl_currency_api.convert_amount(currency,
505: :1,sysdate,
506: :2,
507: op_bal_high_watermark)op_bal_high_watermark,
508: RANK() OVER (PARTITION BY currency

Line 536: gl_currency_api.convert_amount(currency,

532:
533: l_high_credit_account_sql VARCHAR2(4000) :='select op_bal_high_watermark_date,
534: op_bal_high_watermark
535: from ( select as_of_date op_bal_high_watermark_date,
536: gl_currency_api.convert_amount(currency,
537: :1,sysdate,
538: :2,
539: op_bal_high_watermark)op_bal_high_watermark,
540: RANK() OVER (PARTITION BY cust_account_id,currency,org_id

Line 556: gl_currency_api.convert_amount(currency,

552:
553: l_high_credit_site_sql VARCHAR2(4000) :='select op_bal_high_watermark_date,
554: op_bal_high_watermark
555: from ( select as_of_date op_bal_high_watermark_date,
556: gl_currency_api.convert_amount(currency,
557: :1,sysdate,
558: :2,
559: op_bal_high_watermark)op_bal_high_watermark,
560: RANK() OVER (PARTITION BY cust_account_id, site_use_id,currency

Line 691: to_char( gl_currency_api.convert_amount(currency,

687: logic returned the raw amount (in AR_TRX_SUMMARY currency)
688: rather than the converted amount -- I considered this a bug
689: and now return the converted amount (to CF currency) */
690: SELECT max(ltrim(
691: to_char( gl_currency_api.convert_amount(currency,
692: p_limit_currency,sysdate,
693: p_exchange_rate_type,
694: op_bal_high_watermark),
695: '0999999999999999999D00')) || '~' ||

Line 750: to_char( gl_currency_api.convert_amount(currency,

746: END;
747: ELSE -- p_analysis_level A or S (both)
748: BEGIN
749: SELECT max(ltrim(
750: to_char( gl_currency_api.convert_amount(currency,
751: p_limit_currency,sysdate,
752: p_exchange_rate_type,
753: op_bal_high_watermark),
754: '0999999999999999999D00')) || '~' ||

Line 958: l_last_payment_amount_conv := gl_currency_api.convert_amount

954: BEGIN
955: -- if everything is ok then create record in case folder tables
956: -- convert last payment amount to limit currency amount
957: IF l_last_payment_currency IS NOT NULL THEN
958: l_last_payment_amount_conv := gl_currency_api.convert_amount
959: (l_last_payment_currency,
960: p_limit_currency,sysdate,
961: p_exchange_rate_type,
962: l_last_payment_amount);

Line 4695: round(gl_currency_api.convert_amount(CURRENCY,

4691: '167'||'^'||fnd_number.number_to_canonical(SUM(total_adjustments_count)) total_adjustments_count,
4692: '168'||'^'||fnd_number.number_to_canonical(SUM(total_deposits_value)) total_deposits_value,
4693: '169'||'^'||fnd_number.number_to_canonical(SUM(total_deposits_count)) total_deposits_count
4694: FROM ( SELECT
4695: round(gl_currency_api.convert_amount(CURRENCY,
4696: l_limit_currency,sysdate,
4697: l_exchange_rate_type,
4698: (SUM(INV_INST_PMT_DAYS_SUM)
4699: /decode(SUM(SUM_APP_AMT),0,1,

Line 4701: round(gl_currency_api.convert_amount(currency,

4697: l_exchange_rate_type,
4698: (SUM(INV_INST_PMT_DAYS_SUM)
4699: /decode(SUM(SUM_APP_AMT),0,1,
4700: SUM(SUM_APP_AMT)))),2) avg_pmt_days, -- weighted Average Payment Days
4701: round(gl_currency_api.convert_amount(currency,
4702: l_limit_currency,sysdate,
4703: l_exchange_rate_type,
4704: (SUM(SUM_APP_AMT_DAYS_LATE)
4705: /decode(SUM(SUM_APP_AMT),0,1,SUM(SUM_APP_AMT)))),2) weight_avg_days_late, -- Weighted Average Days Late

Line 4710: round(gl_currency_api.convert_amount(currency,

4706: round(SUM(DAYS_CREDIT_GRANTED_SUM)/
4707: decode(SUM(TOTAL_INVOICES_VALUE),0,1,
4708: SUM(TOTAL_INVOICES_VALUE)),2) days_credit_granted, -- days credit granted
4709: SUM(NSF_STOP_PAYMENT_COUNT) nsf_payment_count, -- NSF/Stop Payment Count
4710: round(gl_currency_api.convert_amount(currency,
4711: l_limit_currency,sysdate,
4712: l_exchange_rate_type,
4713: SUM(NSF_STOP_PAYMENT_AMOUNT)),2) nsf_payment_amount, -- NSF/Stop Payment Amount
4714: round(gl_currency_api.convert_amount(currency,

Line 4714: round(gl_currency_api.convert_amount(currency,

4710: round(gl_currency_api.convert_amount(currency,
4711: l_limit_currency,sysdate,
4712: l_exchange_rate_type,
4713: SUM(NSF_STOP_PAYMENT_AMOUNT)),2) nsf_payment_amount, -- NSF/Stop Payment Amount
4714: round(gl_currency_api.convert_amount(currency,
4715: l_limit_currency,sysdate,
4716: l_exchange_rate_type,
4717: SUM(TOTAL_CREDIT_MEMOS_VALUE)),2) credit_memo_value, -- Credit memos value
4718: SUM(TOTAL_CREDIT_MEMOS_COUNT) credit_memo_count, -- Credit memos count

Line 4719: round(gl_currency_api.convert_amount(currency,

4715: l_limit_currency,sysdate,
4716: l_exchange_rate_type,
4717: SUM(TOTAL_CREDIT_MEMOS_VALUE)),2) credit_memo_value, -- Credit memos value
4718: SUM(TOTAL_CREDIT_MEMOS_COUNT) credit_memo_count, -- Credit memos count
4719: round(gl_currency_api.convert_amount(currency,
4720: l_limit_currency,sysdate,
4721: l_exchange_rate_type,
4722: ((SUM(count_of_tot_inv_inst_paid)-
4723: SUM(count_of_inv_inst_paid_late))*100)/

Line 4726: round(gl_currency_api.convert_amount(currency,

4722: ((SUM(count_of_tot_inv_inst_paid)-
4723: SUM(count_of_inv_inst_paid_late))*100)/
4724: decode(SUM(count_of_tot_inv_inst_paid),0,1,
4725: SUM(count_of_tot_inv_inst_paid))),2) per_inv_paid_promptly, -- % of invoice paid promptly
4726: round(gl_currency_api.convert_amount(currency,
4727: l_limit_currency,sysdate,
4728: l_exchange_rate_type,
4729: ((SUM(count_of_inv_inst_paid_late)*100)/
4730: decode(SUM(count_of_tot_inv_inst_paid),0,1,

Line 4732: round(gl_currency_api.convert_amount(currency,

4728: l_exchange_rate_type,
4729: ((SUM(count_of_inv_inst_paid_late)*100)/
4730: decode(SUM(count_of_tot_inv_inst_paid),0,1,
4731: SUM(count_of_tot_inv_inst_paid)))),2) per_inv_paid_late, -- % of invoice paid late
4732: round(gl_currency_api.convert_amount(currency,
4733: l_limit_currency,sysdate,
4734: l_exchange_rate_type,
4735: ((SUM(count_of_disc_inv_inst)*100)/
4736: decode(SUM(count_of_tot_inv_inst_paid),0,1,

Line 4738: round(gl_currency_api.convert_amount(currency,

4734: l_exchange_rate_type,
4735: ((SUM(count_of_disc_inv_inst)*100)/
4736: decode(SUM(count_of_tot_inv_inst_paid),0,1,
4737: SUM(count_of_tot_inv_inst_paid)))),2) per_inv_with_discount, -- % of invoice with discount taken
4738: round(gl_currency_api.convert_amount(currency,
4739: l_limit_currency,sysdate,
4740: l_exchange_rate_type,
4741: SUM(INV_PAID_AMOUNT)),2) inv_paid_amount, -- invoices paid amount
4742: SUM(count_of_tot_inv_inst_paid) inv_paid_count, -- invoices paid count

Line 4743: round(gl_currency_api.convert_amount(currency,

4739: l_limit_currency,sysdate,
4740: l_exchange_rate_type,
4741: SUM(INV_PAID_AMOUNT)),2) inv_paid_amount, -- invoices paid amount
4742: SUM(count_of_tot_inv_inst_paid) inv_paid_count, -- invoices paid count
4743: round(gl_currency_api.convert_amount(currency,
4744: l_limit_currency,sysdate,
4745: l_exchange_rate_type,
4746: SUM(TOTAL_EARNED_DISC_VALUE)),2) earned_disc_value, -- Earned Dscount Value
4747: SUM(TOTAL_EARNED_DISC_COUNT) earned_disc_count, -- Earned Dscount count

Line 4748: round(gl_currency_api.convert_amount(currency,

4744: l_limit_currency,sysdate,
4745: l_exchange_rate_type,
4746: SUM(TOTAL_EARNED_DISC_VALUE)),2) earned_disc_value, -- Earned Dscount Value
4747: SUM(TOTAL_EARNED_DISC_COUNT) earned_disc_count, -- Earned Dscount count
4748: round(gl_currency_api.convert_amount(currency,
4749: l_limit_currency,sysdate,
4750: l_exchange_rate_type,
4751: SUM(TOTAL_UNEARNED_DISC_VALUE)),2) unearned_disc_value, -- UnEarned Dscount Value
4752: SUM(TOTAL_UNEARNED_DISC_COUNT) unearned_disc_count, -- UnEarned Dscount count

Line 4753: (round(gl_currency_api.convert_amount(currency,

4749: l_limit_currency,sysdate,
4750: l_exchange_rate_type,
4751: SUM(TOTAL_UNEARNED_DISC_VALUE)),2) unearned_disc_value, -- UnEarned Dscount Value
4752: SUM(TOTAL_UNEARNED_DISC_COUNT) unearned_disc_count, -- UnEarned Dscount count
4753: (round(gl_currency_api.convert_amount(currency,
4754: l_limit_currency,sysdate,
4755: l_exchange_rate_type,
4756: SUM(TOTAL_CASH_RECEIPTS_VALUE)),2) * -1) total_cash_receipts_value, -- see the comment above
4757: SUM(TOTAL_CASH_RECEIPTS_COUNT) total_cash_receipts_count,

Line 4758: round(gl_currency_api.convert_amount(currency,

4754: l_limit_currency,sysdate,
4755: l_exchange_rate_type,
4756: SUM(TOTAL_CASH_RECEIPTS_VALUE)),2) * -1) total_cash_receipts_value, -- see the comment above
4757: SUM(TOTAL_CASH_RECEIPTS_COUNT) total_cash_receipts_count,
4758: round(gl_currency_api.convert_amount(currency,
4759: l_limit_currency,sysdate,
4760: l_exchange_rate_type,
4761: SUM(TOTAL_INVOICES_VALUE)),2) total_invoices_value,
4762: SUM(TOTAL_INVOICES_COUNT) total_invoices_count,

Line 4763: round(gl_currency_api.convert_amount(currency,

4759: l_limit_currency,sysdate,
4760: l_exchange_rate_type,
4761: SUM(TOTAL_INVOICES_VALUE)),2) total_invoices_value,
4762: SUM(TOTAL_INVOICES_COUNT) total_invoices_count,
4763: round(gl_currency_api.convert_amount(currency,
4764: l_limit_currency,sysdate,
4765: l_exchange_rate_type,
4766: SUM(TOTAL_BILLS_RECEIVABLES_VALUE)),2) total_bills_receivables_value,
4767: SUM(TOTAL_BILLS_RECEIVABLES_COUNT) TOTAL_BILLS_RECEIVABLES_count,

Line 4768: round(gl_currency_api.convert_amount(currency,

4764: l_limit_currency,sysdate,
4765: l_exchange_rate_type,
4766: SUM(TOTAL_BILLS_RECEIVABLES_VALUE)),2) total_bills_receivables_value,
4767: SUM(TOTAL_BILLS_RECEIVABLES_COUNT) TOTAL_BILLS_RECEIVABLES_count,
4768: round(gl_currency_api.convert_amount(currency,
4769: l_limit_currency,sysdate,
4770: l_exchange_rate_type,
4771: SUM(TOTAL_DEBIT_MEMOS_VALUE)),2) total_debit_memos_value,
4772: SUM(TOTAL_DEBIT_MEMOS_COUNT) TOTAL_debit_memos_count,

Line 4773: round(gl_currency_api.convert_amount(currency,

4769: l_limit_currency,sysdate,
4770: l_exchange_rate_type,
4771: SUM(TOTAL_DEBIT_MEMOS_VALUE)),2) total_debit_memos_value,
4772: SUM(TOTAL_DEBIT_MEMOS_COUNT) TOTAL_debit_memos_count,
4773: round(gl_currency_api.convert_amount(currency,
4774: l_limit_currency,sysdate,
4775: l_exchange_rate_type,
4776: SUM(TOTAL_CHARGEBACK_VALUE)),2) total_chargeback_value,
4777: SUM(TOTAL_chargeback_COUNT) TOTAL_chargeback_count ,

Line 4778: round(gl_currency_api.convert_amount(currency,

4774: l_limit_currency,sysdate,
4775: l_exchange_rate_type,
4776: SUM(TOTAL_CHARGEBACK_VALUE)),2) total_chargeback_value,
4777: SUM(TOTAL_chargeback_COUNT) TOTAL_chargeback_count ,
4778: round(gl_currency_api.convert_amount(currency,
4779: l_limit_currency,sysdate,
4780: l_exchange_rate_type,
4781: SUM(TOTAL_ADJUSTMENTS_VALUE)),2) total_adjustments_value,
4782: SUM(TOTAL_adjustments_COUNT) TOTAL_adjustments_count ,

Line 4783: round(gl_currency_api.convert_amount(currency,

4779: l_limit_currency,sysdate,
4780: l_exchange_rate_type,
4781: SUM(TOTAL_ADJUSTMENTS_VALUE)),2) total_adjustments_value,
4782: SUM(TOTAL_adjustments_COUNT) TOTAL_adjustments_count ,
4783: round(gl_currency_api.convert_amount(currency,
4784: l_limit_currency,sysdate,
4785: l_exchange_rate_type,
4786: SUM(TOTAL_DEPOSITS_VALUE)),2) total_deposits_value,
4787: SUM(TOTAL_deposits_COUNT) TOTAL_deposits_count

Line 4854: round(gl_currency_api.convert_amount(currency,

4850: '167'||'^'||fnd_number.number_to_canonical(SUM(total_adjustments_count)) total_adjustments_count,
4851: '168'||'^'||fnd_number.number_to_canonical(SUM(total_deposits_value)) total_deposits_value,
4852: '169'||'^'||fnd_number.number_to_canonical(SUM(total_deposits_count)) total_deposits_count
4853: FROM ( SELECT
4854: round(gl_currency_api.convert_amount(currency,
4855: l_limit_currency,sysdate,
4856: l_exchange_rate_type,
4857: (SUM(INV_INST_PMT_DAYS_SUM)
4858: /decode(SUM(SUM_APP_AMT),0,1,

Line 4860: round(gl_currency_api.convert_amount(currency,

4856: l_exchange_rate_type,
4857: (SUM(INV_INST_PMT_DAYS_SUM)
4858: /decode(SUM(SUM_APP_AMT),0,1,
4859: SUM(SUM_APP_AMT)))),2) avg_pmt_days, -- weighted Average Payment Days
4860: round(gl_currency_api.convert_amount(currency,
4861: l_limit_currency,sysdate,
4862: l_exchange_rate_type,
4863: (SUM(SUM_APP_AMT_DAYS_LATE)
4864: /decode(SUM(SUM_APP_AMT),0,1,SUM(SUM_APP_AMT)))),2) weight_avg_days_late, -- Weighted Average Days Late

Line 4869: round(gl_currency_api.convert_amount(currency,

4865: round(SUM(DAYS_CREDIT_GRANTED_SUM)/
4866: decode(SUM(TOTAL_INVOICES_VALUE),0,1,
4867: SUM(TOTAL_INVOICES_VALUE)),2) days_credit_granted, -- days credit granted
4868: SUM(NSF_STOP_PAYMENT_COUNT) nsf_payment_count, -- NSF/Stop Payment Count
4869: round(gl_currency_api.convert_amount(currency,
4870: l_limit_currency,sysdate,
4871: l_exchange_rate_type,
4872: SUM(NSF_STOP_PAYMENT_AMOUNT)),2) nsf_payment_amount, -- NSF/Stop Payment Amount
4873: round(gl_currency_api.convert_amount(currency,

Line 4873: round(gl_currency_api.convert_amount(currency,

4869: round(gl_currency_api.convert_amount(currency,
4870: l_limit_currency,sysdate,
4871: l_exchange_rate_type,
4872: SUM(NSF_STOP_PAYMENT_AMOUNT)),2) nsf_payment_amount, -- NSF/Stop Payment Amount
4873: round(gl_currency_api.convert_amount(currency,
4874: l_limit_currency,sysdate,
4875: l_exchange_rate_type,
4876: SUM(TOTAL_CREDIT_MEMOS_VALUE)),2) credit_memo_value, -- Credit memos value
4877: SUM(TOTAL_CREDIT_MEMOS_COUNT) credit_memo_count, -- Credit memos count

Line 4878: round(gl_currency_api.convert_amount(currency,

4874: l_limit_currency,sysdate,
4875: l_exchange_rate_type,
4876: SUM(TOTAL_CREDIT_MEMOS_VALUE)),2) credit_memo_value, -- Credit memos value
4877: SUM(TOTAL_CREDIT_MEMOS_COUNT) credit_memo_count, -- Credit memos count
4878: round(gl_currency_api.convert_amount(currency,
4879: l_limit_currency,sysdate,
4880: l_exchange_rate_type,
4881: ((SUM(count_of_tot_inv_inst_paid)-
4882: SUM(count_of_inv_inst_paid_late))*100)/

Line 4885: round(gl_currency_api.convert_amount(currency,

4881: ((SUM(count_of_tot_inv_inst_paid)-
4882: SUM(count_of_inv_inst_paid_late))*100)/
4883: decode(SUM(count_of_tot_inv_inst_paid),0,1,
4884: SUM(count_of_tot_inv_inst_paid))),2) per_inv_paid_promptly, -- % of invoice paid promptly
4885: round(gl_currency_api.convert_amount(currency,
4886: l_limit_currency,sysdate,
4887: l_exchange_rate_type,
4888: ((SUM(count_of_inv_inst_paid_late)*100)/
4889: decode(SUM(count_of_tot_inv_inst_paid),0,1,

Line 4891: round(gl_currency_api.convert_amount(currency,

4887: l_exchange_rate_type,
4888: ((SUM(count_of_inv_inst_paid_late)*100)/
4889: decode(SUM(count_of_tot_inv_inst_paid),0,1,
4890: SUM(count_of_tot_inv_inst_paid)))),2) per_inv_paid_late, -- % of invoice paid late
4891: round(gl_currency_api.convert_amount(currency,
4892: l_limit_currency,sysdate,
4893: l_exchange_rate_type,
4894: ((SUM(count_of_disc_inv_inst)*100)/
4895: decode(SUM(count_of_tot_inv_inst_paid),0,1,

Line 4897: round(gl_currency_api.convert_amount(currency,

4893: l_exchange_rate_type,
4894: ((SUM(count_of_disc_inv_inst)*100)/
4895: decode(SUM(count_of_tot_inv_inst_paid),0,1,
4896: SUM(count_of_tot_inv_inst_paid)))),2) per_inv_with_discount, -- % of invoice with discount taken
4897: round(gl_currency_api.convert_amount(currency,
4898: l_limit_currency,sysdate,
4899: l_exchange_rate_type,
4900: SUM(INV_PAID_AMOUNT)),2) inv_paid_amount, -- invoices paid amount
4901: SUM(count_of_tot_inv_inst_paid) inv_paid_count, -- invoices paid count

Line 4902: round(gl_currency_api.convert_amount(currency,

4898: l_limit_currency,sysdate,
4899: l_exchange_rate_type,
4900: SUM(INV_PAID_AMOUNT)),2) inv_paid_amount, -- invoices paid amount
4901: SUM(count_of_tot_inv_inst_paid) inv_paid_count, -- invoices paid count
4902: round(gl_currency_api.convert_amount(currency,
4903: l_limit_currency,sysdate,
4904: l_exchange_rate_type,
4905: SUM(TOTAL_EARNED_DISC_VALUE)),2) earned_disc_value, -- Earned Dscount Value
4906: SUM(TOTAL_EARNED_DISC_COUNT) earned_disc_count, -- Earned Dscount count

Line 4907: round(gl_currency_api.convert_amount(currency,

4903: l_limit_currency,sysdate,
4904: l_exchange_rate_type,
4905: SUM(TOTAL_EARNED_DISC_VALUE)),2) earned_disc_value, -- Earned Dscount Value
4906: SUM(TOTAL_EARNED_DISC_COUNT) earned_disc_count, -- Earned Dscount count
4907: round(gl_currency_api.convert_amount(currency,
4908: l_limit_currency,sysdate,
4909: l_exchange_rate_type,
4910: SUM(TOTAL_UNEARNED_DISC_VALUE)),2) unearned_disc_value, -- UnEarned Dscount Value
4911: SUM(TOTAL_UNEARNED_DISC_COUNT) unearned_disc_count, -- UnEarned Dscount count

Line 4912: (round(gl_currency_api.convert_amount(currency,

4908: l_limit_currency,sysdate,
4909: l_exchange_rate_type,
4910: SUM(TOTAL_UNEARNED_DISC_VALUE)),2) unearned_disc_value, -- UnEarned Dscount Value
4911: SUM(TOTAL_UNEARNED_DISC_COUNT) unearned_disc_count, -- UnEarned Dscount count
4912: (round(gl_currency_api.convert_amount(currency,
4913: l_limit_currency,sysdate,
4914: l_exchange_rate_type,
4915: SUM(TOTAL_CASH_RECEIPTS_VALUE)),2) * -1) total_cash_receipts_value, -- see the comments above
4916: SUM(TOTAL_CASH_RECEIPTS_COUNT) total_cash_receipts_count,

Line 4917: round(gl_currency_api.convert_amount(currency,

4913: l_limit_currency,sysdate,
4914: l_exchange_rate_type,
4915: SUM(TOTAL_CASH_RECEIPTS_VALUE)),2) * -1) total_cash_receipts_value, -- see the comments above
4916: SUM(TOTAL_CASH_RECEIPTS_COUNT) total_cash_receipts_count,
4917: round(gl_currency_api.convert_amount(currency,
4918: l_limit_currency,sysdate,
4919: l_exchange_rate_type,
4920: SUM(TOTAL_INVOICES_VALUE)),2) total_invoices_value,
4921: SUM(TOTAL_INVOICES_COUNT) total_invoices_count,

Line 4922: round(gl_currency_api.convert_amount(currency,

4918: l_limit_currency,sysdate,
4919: l_exchange_rate_type,
4920: SUM(TOTAL_INVOICES_VALUE)),2) total_invoices_value,
4921: SUM(TOTAL_INVOICES_COUNT) total_invoices_count,
4922: round(gl_currency_api.convert_amount(currency,
4923: l_limit_currency,sysdate,
4924: l_exchange_rate_type,
4925: SUM(TOTAL_BILLS_RECEIVABLES_VALUE)),2) total_bills_receivables_value,
4926: SUM(TOTAL_BILLS_RECEIVABLES_COUNT) TOTAL_BILLS_RECEIVABLES_count,

Line 4927: round(gl_currency_api.convert_amount(currency,

4923: l_limit_currency,sysdate,
4924: l_exchange_rate_type,
4925: SUM(TOTAL_BILLS_RECEIVABLES_VALUE)),2) total_bills_receivables_value,
4926: SUM(TOTAL_BILLS_RECEIVABLES_COUNT) TOTAL_BILLS_RECEIVABLES_count,
4927: round(gl_currency_api.convert_amount(currency,
4928: l_limit_currency,sysdate,
4929: l_exchange_rate_type,
4930: SUM(TOTAL_DEBIT_MEMOS_VALUE)),2) total_debit_memos_value,
4931: SUM(TOTAL_DEBIT_MEMOS_COUNT) TOTAL_debit_memos_count,

Line 4932: round(gl_currency_api.convert_amount(currency,

4928: l_limit_currency,sysdate,
4929: l_exchange_rate_type,
4930: SUM(TOTAL_DEBIT_MEMOS_VALUE)),2) total_debit_memos_value,
4931: SUM(TOTAL_DEBIT_MEMOS_COUNT) TOTAL_debit_memos_count,
4932: round(gl_currency_api.convert_amount(currency,
4933: l_limit_currency,sysdate,
4934: l_exchange_rate_type,
4935: SUM(TOTAL_CHARGEBACK_VALUE)),2) total_chargeback_value,
4936: SUM(TOTAL_chargeback_COUNT) TOTAL_chargeback_count ,

Line 4937: round(gl_currency_api.convert_amount(currency,

4933: l_limit_currency,sysdate,
4934: l_exchange_rate_type,
4935: SUM(TOTAL_CHARGEBACK_VALUE)),2) total_chargeback_value,
4936: SUM(TOTAL_chargeback_COUNT) TOTAL_chargeback_count ,
4937: round(gl_currency_api.convert_amount(currency,
4938: l_limit_currency,sysdate,
4939: l_exchange_rate_type,
4940: SUM(TOTAL_ADJUSTMENTS_VALUE)),2) total_adjustments_value,
4941: SUM(TOTAL_adjustments_COUNT) TOTAL_adjustments_count ,

Line 4942: round(gl_currency_api.convert_amount(currency,

4938: l_limit_currency,sysdate,
4939: l_exchange_rate_type,
4940: SUM(TOTAL_ADJUSTMENTS_VALUE)),2) total_adjustments_value,
4941: SUM(TOTAL_adjustments_COUNT) TOTAL_adjustments_count ,
4942: round(gl_currency_api.convert_amount(currency,
4943: l_limit_currency,sysdate,
4944: l_exchange_rate_type,
4945: SUM(TOTAL_DEPOSITS_VALUE)),2) total_deposits_value,
4946: SUM(TOTAL_deposits_COUNT) TOTAL_deposits_count

Line 4990: round(gl_currency_api.convert_amount(currency,

4986: '167'||'^'||fnd_number.number_to_canonical(SUM(total_adjustments_count)) total_adjustments_count,
4987: '168'||'^'||fnd_number.number_to_canonical(SUM(total_deposits_value)) total_deposits_value,
4988: '169'||'^'||fnd_number.number_to_canonical(SUM(total_deposits_count)) total_deposits_count
4989: FROM ( SELECT
4990: round(gl_currency_api.convert_amount(currency,
4991: l_limit_currency,sysdate,
4992: l_exchange_rate_type,
4993: (SUM(INV_INST_PMT_DAYS_SUM)
4994: /decode(SUM(SUM_APP_AMT),0,1,

Line 4996: round(gl_currency_api.convert_amount(currency,

4992: l_exchange_rate_type,
4993: (SUM(INV_INST_PMT_DAYS_SUM)
4994: /decode(SUM(SUM_APP_AMT),0,1,
4995: SUM(SUM_APP_AMT)))),2) avg_pmt_days, -- weighted Average Payment Days
4996: round(gl_currency_api.convert_amount(currency,
4997: l_limit_currency,sysdate,
4998: l_exchange_rate_type,
4999: (SUM(SUM_APP_AMT_DAYS_LATE)
5000: /decode(SUM(SUM_APP_AMT),0,1,SUM(SUM_APP_AMT)))),2) weight_avg_days_late, -- Weighted Average Days Late

Line 5005: round(gl_currency_api.convert_amount(currency,

5001: round(SUM(DAYS_CREDIT_GRANTED_SUM)/
5002: decode(SUM(TOTAL_INVOICES_VALUE),0,1,
5003: SUM(TOTAL_INVOICES_VALUE)),2) days_credit_granted, -- days credit granted
5004: SUM(NSF_STOP_PAYMENT_COUNT) nsf_payment_count, -- NSF/Stop Payment Count
5005: round(gl_currency_api.convert_amount(currency,
5006: l_limit_currency,sysdate,
5007: l_exchange_rate_type,
5008: SUM(NSF_STOP_PAYMENT_AMOUNT)),2) nsf_payment_amount, -- NSF/Stop Payment Amount
5009: round(gl_currency_api.convert_amount(currency,

Line 5009: round(gl_currency_api.convert_amount(currency,

5005: round(gl_currency_api.convert_amount(currency,
5006: l_limit_currency,sysdate,
5007: l_exchange_rate_type,
5008: SUM(NSF_STOP_PAYMENT_AMOUNT)),2) nsf_payment_amount, -- NSF/Stop Payment Amount
5009: round(gl_currency_api.convert_amount(currency,
5010: l_limit_currency,sysdate,
5011: l_exchange_rate_type,
5012: SUM(TOTAL_CREDIT_MEMOS_VALUE)),2) credit_memo_value, -- Credit memos value
5013: SUM(TOTAL_CREDIT_MEMOS_COUNT) credit_memo_count, -- Credit memos count

Line 5014: round(gl_currency_api.convert_amount(currency,

5010: l_limit_currency,sysdate,
5011: l_exchange_rate_type,
5012: SUM(TOTAL_CREDIT_MEMOS_VALUE)),2) credit_memo_value, -- Credit memos value
5013: SUM(TOTAL_CREDIT_MEMOS_COUNT) credit_memo_count, -- Credit memos count
5014: round(gl_currency_api.convert_amount(currency,
5015: l_limit_currency,sysdate,
5016: l_exchange_rate_type,
5017: ((SUM(count_of_tot_inv_inst_paid)-
5018: SUM(count_of_inv_inst_paid_late))*100)/

Line 5021: round(gl_currency_api.convert_amount(currency,

5017: ((SUM(count_of_tot_inv_inst_paid)-
5018: SUM(count_of_inv_inst_paid_late))*100)/
5019: decode(SUM(count_of_tot_inv_inst_paid),0,1,
5020: SUM(count_of_tot_inv_inst_paid))),2) per_inv_paid_promptly, -- % of invoice paid promptly
5021: round(gl_currency_api.convert_amount(currency,
5022: l_limit_currency,sysdate,
5023: l_exchange_rate_type,
5024: ((SUM(count_of_inv_inst_paid_late)*100)/
5025: decode(SUM(count_of_tot_inv_inst_paid),0,1,

Line 5027: round(gl_currency_api.convert_amount(currency,

5023: l_exchange_rate_type,
5024: ((SUM(count_of_inv_inst_paid_late)*100)/
5025: decode(SUM(count_of_tot_inv_inst_paid),0,1,
5026: SUM(count_of_tot_inv_inst_paid)))),2) per_inv_paid_late, -- % of invoice paid late
5027: round(gl_currency_api.convert_amount(currency,
5028: l_limit_currency,sysdate,
5029: l_exchange_rate_type,
5030: ((SUM(count_of_disc_inv_inst)*100)/
5031: decode(SUM(count_of_tot_inv_inst_paid),0,1,

Line 5033: round(gl_currency_api.convert_amount(currency,

5029: l_exchange_rate_type,
5030: ((SUM(count_of_disc_inv_inst)*100)/
5031: decode(SUM(count_of_tot_inv_inst_paid),0,1,
5032: SUM(count_of_tot_inv_inst_paid)))),2) per_inv_with_discount, -- % of invoice with discount taken
5033: round(gl_currency_api.convert_amount(currency,
5034: l_limit_currency,sysdate,
5035: l_exchange_rate_type,
5036: SUM(INV_PAID_AMOUNT)),2) inv_paid_amount, -- invoices paid amount
5037: SUM(count_of_tot_inv_inst_paid) inv_paid_count, -- invoices paid count

Line 5038: round(gl_currency_api.convert_amount(currency,

5034: l_limit_currency,sysdate,
5035: l_exchange_rate_type,
5036: SUM(INV_PAID_AMOUNT)),2) inv_paid_amount, -- invoices paid amount
5037: SUM(count_of_tot_inv_inst_paid) inv_paid_count, -- invoices paid count
5038: round(gl_currency_api.convert_amount(currency,
5039: l_limit_currency,sysdate,
5040: l_exchange_rate_type,
5041: SUM(TOTAL_EARNED_DISC_VALUE)),2) earned_disc_value, -- Earned Dscount Value
5042: SUM(TOTAL_EARNED_DISC_COUNT) earned_disc_count, -- Earned Dscount count

Line 5043: round(gl_currency_api.convert_amount(currency,

5039: l_limit_currency,sysdate,
5040: l_exchange_rate_type,
5041: SUM(TOTAL_EARNED_DISC_VALUE)),2) earned_disc_value, -- Earned Dscount Value
5042: SUM(TOTAL_EARNED_DISC_COUNT) earned_disc_count, -- Earned Dscount count
5043: round(gl_currency_api.convert_amount(currency,
5044: l_limit_currency,sysdate,
5045: l_exchange_rate_type,
5046: SUM(TOTAL_UNEARNED_DISC_VALUE)),2) unearned_disc_value, -- UnEarned Dscount Value
5047: SUM(TOTAL_UNEARNED_DISC_COUNT) unearned_disc_count, -- UnEarned Dscount count

Line 5048: (round(gl_currency_api.convert_amount(currency,

5044: l_limit_currency,sysdate,
5045: l_exchange_rate_type,
5046: SUM(TOTAL_UNEARNED_DISC_VALUE)),2) unearned_disc_value, -- UnEarned Dscount Value
5047: SUM(TOTAL_UNEARNED_DISC_COUNT) unearned_disc_count, -- UnEarned Dscount count
5048: (round(gl_currency_api.convert_amount(currency,
5049: l_limit_currency,sysdate,
5050: l_exchange_rate_type,
5051: SUM(TOTAL_CASH_RECEIPTS_VALUE)),2) * -1) total_cash_receipts_value, -- see the comments above
5052: SUM(TOTAL_CASH_RECEIPTS_COUNT) total_cash_receipts_count,

Line 5053: round(gl_currency_api.convert_amount(currency,

5049: l_limit_currency,sysdate,
5050: l_exchange_rate_type,
5051: SUM(TOTAL_CASH_RECEIPTS_VALUE)),2) * -1) total_cash_receipts_value, -- see the comments above
5052: SUM(TOTAL_CASH_RECEIPTS_COUNT) total_cash_receipts_count,
5053: round(gl_currency_api.convert_amount(currency,
5054: l_limit_currency,sysdate,
5055: l_exchange_rate_type,
5056: SUM(TOTAL_INVOICES_VALUE)),2) total_invoices_value,
5057: SUM(TOTAL_INVOICES_COUNT) total_invoices_count,

Line 5058: round(gl_currency_api.convert_amount(currency,

5054: l_limit_currency,sysdate,
5055: l_exchange_rate_type,
5056: SUM(TOTAL_INVOICES_VALUE)),2) total_invoices_value,
5057: SUM(TOTAL_INVOICES_COUNT) total_invoices_count,
5058: round(gl_currency_api.convert_amount(currency,
5059: l_limit_currency,sysdate,
5060: l_exchange_rate_type,
5061: SUM(TOTAL_BILLS_RECEIVABLES_VALUE)),2) total_bills_receivables_value,
5062: SUM(TOTAL_BILLS_RECEIVABLES_COUNT) TOTAL_BILLS_RECEIVABLES_count,

Line 5063: round(gl_currency_api.convert_amount(currency,

5059: l_limit_currency,sysdate,
5060: l_exchange_rate_type,
5061: SUM(TOTAL_BILLS_RECEIVABLES_VALUE)),2) total_bills_receivables_value,
5062: SUM(TOTAL_BILLS_RECEIVABLES_COUNT) TOTAL_BILLS_RECEIVABLES_count,
5063: round(gl_currency_api.convert_amount(currency,
5064: l_limit_currency,sysdate,
5065: l_exchange_rate_type,
5066: SUM(TOTAL_DEBIT_MEMOS_VALUE)),2) total_debit_memos_value,
5067: SUM(TOTAL_DEBIT_MEMOS_COUNT) TOTAL_debit_memos_count,

Line 5068: round(gl_currency_api.convert_amount(currency,

5064: l_limit_currency,sysdate,
5065: l_exchange_rate_type,
5066: SUM(TOTAL_DEBIT_MEMOS_VALUE)),2) total_debit_memos_value,
5067: SUM(TOTAL_DEBIT_MEMOS_COUNT) TOTAL_debit_memos_count,
5068: round(gl_currency_api.convert_amount(currency,
5069: l_limit_currency,sysdate,
5070: l_exchange_rate_type,
5071: SUM(TOTAL_CHARGEBACK_VALUE)),2) total_chargeback_value,
5072: SUM(TOTAL_chargeback_COUNT) TOTAL_chargeback_count ,

Line 5073: round(gl_currency_api.convert_amount(currency,

5069: l_limit_currency,sysdate,
5070: l_exchange_rate_type,
5071: SUM(TOTAL_CHARGEBACK_VALUE)),2) total_chargeback_value,
5072: SUM(TOTAL_chargeback_COUNT) TOTAL_chargeback_count ,
5073: round(gl_currency_api.convert_amount(currency,
5074: l_limit_currency,sysdate,
5075: l_exchange_rate_type,
5076: SUM(TOTAL_ADJUSTMENTS_VALUE)),2) total_adjustments_value,
5077: SUM(TOTAL_adjustments_COUNT) TOTAL_adjustments_count ,

Line 5078: round(gl_currency_api.convert_amount(currency,

5074: l_limit_currency,sysdate,
5075: l_exchange_rate_type,
5076: SUM(TOTAL_ADJUSTMENTS_VALUE)),2) total_adjustments_value,
5077: SUM(TOTAL_adjustments_COUNT) TOTAL_adjustments_count ,
5078: round(gl_currency_api.convert_amount(currency,
5079: l_limit_currency,sysdate,
5080: l_exchange_rate_type,
5081: SUM(TOTAL_DEPOSITS_VALUE)),2) total_deposits_value,
5082: SUM(TOTAL_deposits_COUNT) TOTAL_deposits_count

Line 5125: gl_currency_api.convert_amount(currency,

5121: '209'||'^'||fnd_number.number_to_canonical(SUM(current_invoice_value)) current_invoice_value,
5122: '210'||'^'||fnd_number.number_to_canonical(SUM(current_invoice_count)) current_invoice_count
5123: FROM (
5124: SELECT
5125: gl_currency_api.convert_amount(currency,
5126: l_limit_currency,sysdate,
5127: l_exchange_rate_type,
5128: SUM((nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5129: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5132: gl_currency_api.convert_amount(currency,

5128: SUM((nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5129: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +
5130: nvl(OP_CHARGEBACK_VALUE,0) + nvl(OP_CREDIT_MEMOS_VALUE,0) +
5131: nvl(UNRESOLVED_CASH_VALUE,0) ))) current_receivable_balance, -- Current Receivables Balance (Opening balance)
5132: gl_currency_api.convert_amount(currency,
5133: l_limit_currency,sysdate,
5134: l_exchange_rate_type,
5135: SUM(UNRESOLVED_CASH_VALUE)) unapplied_cash_amount, -- unapplied case amount
5136: SUM(UNRESOLVED_CASH_COUNT) unapplied_cash_count, -- unapplied cash count

Line 5137: gl_currency_api.convert_amount(currency,

5133: l_limit_currency,sysdate,
5134: l_exchange_rate_type,
5135: SUM(UNRESOLVED_CASH_VALUE)) unapplied_cash_amount, -- unapplied case amount
5136: SUM(UNRESOLVED_CASH_COUNT) unapplied_cash_count, -- unapplied cash count
5137: gl_currency_api.convert_amount(currency,
5138: l_limit_currency,sysdate,
5139: l_exchange_rate_type,
5140: SUM(past_due_inv_value)) past_due_inv_value,
5141: SUM(past_due_inv_inst_count) past_due_inv_inst_count,

Line 5142: gl_currency_api.convert_amount(currency,

5138: l_limit_currency,sysdate,
5139: l_exchange_rate_type,
5140: SUM(past_due_inv_value)) past_due_inv_value,
5141: SUM(past_due_inv_inst_count) past_due_inv_inst_count,
5142: gl_currency_api.convert_amount(currency,
5143: l_limit_currency,sysdate,
5144: l_exchange_rate_type,
5145: SUM(inv_amt_in_dispute)) inv_amt_in_dispute,
5146: SUM(disputed_inv_count) disputed_inv_count,

Line 5147: gl_currency_api.convert_amount(currency,

5143: l_limit_currency,sysdate,
5144: l_exchange_rate_type,
5145: SUM(inv_amt_in_dispute)) inv_amt_in_dispute,
5146: SUM(disputed_inv_count) disputed_inv_count,
5147: gl_currency_api.convert_amount(currency,
5148: l_limit_currency,sysdate,
5149: l_exchange_rate_type,
5150: SUM(pending_adj_value)) pending_adj_value,
5151: gl_currency_api.convert_amount(currency,

Line 5151: gl_currency_api.convert_amount(currency,

5147: gl_currency_api.convert_amount(currency,
5148: l_limit_currency,sysdate,
5149: l_exchange_rate_type,
5150: SUM(pending_adj_value)) pending_adj_value,
5151: gl_currency_api.convert_amount(currency,
5152: l_limit_currency,sysdate,
5153: l_exchange_rate_type,
5154: SUM(receipts_at_risk_value)) total_receipts_at_risk_value,
5155: gl_currency_api.convert_amount(currency,

Line 5155: gl_currency_api.convert_amount(currency,

5151: gl_currency_api.convert_amount(currency,
5152: l_limit_currency,sysdate,
5153: l_exchange_rate_type,
5154: SUM(receipts_at_risk_value)) total_receipts_at_risk_value,
5155: gl_currency_api.convert_amount(currency,
5156: l_limit_currency,sysdate,
5157: l_exchange_rate_type,
5158: SUM(op_invoices_value)) op_invoices_value,
5159: SUM(op_invoices_count) op_invoices_count,

Line 5160: gl_currency_api.convert_amount(currency,

5156: l_limit_currency,sysdate,
5157: l_exchange_rate_type,
5158: SUM(op_invoices_value)) op_invoices_value,
5159: SUM(op_invoices_count) op_invoices_count,
5160: gl_currency_api.convert_amount(currency,
5161: l_limit_currency,sysdate,
5162: l_exchange_rate_type,
5163: SUM(op_debit_memos_value)) op_debit_memos_value,
5164: SUM(op_debit_memos_count) op_debit_memos_count,

Line 5165: gl_currency_api.convert_amount(currency,

5161: l_limit_currency,sysdate,
5162: l_exchange_rate_type,
5163: SUM(op_debit_memos_value)) op_debit_memos_value,
5164: SUM(op_debit_memos_count) op_debit_memos_count,
5165: gl_currency_api.convert_amount(currency,
5166: l_limit_currency,sysdate,
5167: l_exchange_rate_type,
5168: SUM(op_deposits_value)) op_deposits_value,
5169: SUM(op_deposits_count) op_deposits_count,

Line 5170: gl_currency_api.convert_amount(currency,

5166: l_limit_currency,sysdate,
5167: l_exchange_rate_type,
5168: SUM(op_deposits_value)) op_deposits_value,
5169: SUM(op_deposits_count) op_deposits_count,
5170: gl_currency_api.convert_amount(currency,
5171: l_limit_currency,sysdate,
5172: l_exchange_rate_type,
5173: SUM(op_bills_receivables_value)) op_bills_receivables_value,
5174: SUM(op_bills_receivables_count) op_bills_receivables_count,

Line 5175: gl_currency_api.convert_amount(currency,

5171: l_limit_currency,sysdate,
5172: l_exchange_rate_type,
5173: SUM(op_bills_receivables_value)) op_bills_receivables_value,
5174: SUM(op_bills_receivables_count) op_bills_receivables_count,
5175: gl_currency_api.convert_amount(currency,
5176: l_limit_currency,sysdate,
5177: l_exchange_rate_type,
5178: SUM(op_chargeback_value)) op_chargeback_value,
5179: SUM(op_chargeback_count) op_chargeback_count,

Line 5180: gl_currency_api.convert_amount(currency,

5176: l_limit_currency,sysdate,
5177: l_exchange_rate_type,
5178: SUM(op_chargeback_value)) op_chargeback_value,
5179: SUM(op_chargeback_count) op_chargeback_count,
5180: gl_currency_api.convert_amount(currency,
5181: l_limit_currency,sysdate,
5182: l_exchange_rate_type,
5183: SUM(op_credit_memos_value)) op_credit_memos_value,
5184: SUM(op_credit_memos_count) op_credit_memos_count,

Line 5185: gl_currency_api.convert_amount(currency,

5181: l_limit_currency,sysdate,
5182: l_exchange_rate_type,
5183: SUM(op_credit_memos_value)) op_credit_memos_value,
5184: SUM(op_credit_memos_count) op_credit_memos_count,
5185: gl_currency_api.convert_amount(currency,
5186: l_limit_currency,sysdate,
5187: l_exchange_rate_type,
5188: SUM(nvl(op_invoices_value,0) - nvl(past_due_inv_value,0))) current_invoice_value,
5189: SUM(nvl(op_invoices_count,0) - nvl(past_due_inv_inst_count,0)) current_invoice_count

Line 5247: gl_currency_api.convert_amount(currency,

5243: '209'||'^'||fnd_number.number_to_canonical(SUM(current_invoice_value)) current_invoice_value,
5244: '210'||'^'||fnd_number.number_to_canonical(SUM(current_invoice_count)) current_invoice_count
5245: FROM (
5246: SELECT
5247: gl_currency_api.convert_amount(currency,
5248: l_limit_currency,sysdate,
5249: l_exchange_rate_type,
5250: SUM((nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5251: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5254: gl_currency_api.convert_amount(currency,

5250: SUM((nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5251: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +
5252: nvl(OP_CHARGEBACK_VALUE,0) + nvl(OP_CREDIT_MEMOS_VALUE,0) +
5253: nvl(UNRESOLVED_CASH_VALUE,0) ))) current_receivable_balance, -- Current Receivables Balance (Opening balance)
5254: gl_currency_api.convert_amount(currency,
5255: l_limit_currency,sysdate,
5256: l_exchange_rate_type,
5257: SUM(UNRESOLVED_CASH_VALUE)) unapplied_cash_amount, -- unapplied case amount
5258: SUM(UNRESOLVED_CASH_COUNT) unapplied_cash_count, -- unapplied cash count

Line 5259: gl_currency_api.convert_amount(currency,

5255: l_limit_currency,sysdate,
5256: l_exchange_rate_type,
5257: SUM(UNRESOLVED_CASH_VALUE)) unapplied_cash_amount, -- unapplied case amount
5258: SUM(UNRESOLVED_CASH_COUNT) unapplied_cash_count, -- unapplied cash count
5259: gl_currency_api.convert_amount(currency,
5260: l_limit_currency,sysdate,
5261: l_exchange_rate_type,
5262: SUM(past_due_inv_value)) past_due_inv_value,
5263: SUM(past_due_inv_inst_count) past_due_inv_inst_count,

Line 5264: gl_currency_api.convert_amount(currency,

5260: l_limit_currency,sysdate,
5261: l_exchange_rate_type,
5262: SUM(past_due_inv_value)) past_due_inv_value,
5263: SUM(past_due_inv_inst_count) past_due_inv_inst_count,
5264: gl_currency_api.convert_amount(currency,
5265: l_limit_currency,sysdate,
5266: l_exchange_rate_type,
5267: SUM(inv_amt_in_dispute)) inv_amt_in_dispute,
5268: SUM(disputed_inv_count) disputed_inv_count,

Line 5269: gl_currency_api.convert_amount(currency,

5265: l_limit_currency,sysdate,
5266: l_exchange_rate_type,
5267: SUM(inv_amt_in_dispute)) inv_amt_in_dispute,
5268: SUM(disputed_inv_count) disputed_inv_count,
5269: gl_currency_api.convert_amount(currency,
5270: l_limit_currency,sysdate,
5271: l_exchange_rate_type,
5272: SUM(pending_adj_value)) pending_adj_value,
5273: gl_currency_api.convert_amount(currency,

Line 5273: gl_currency_api.convert_amount(currency,

5269: gl_currency_api.convert_amount(currency,
5270: l_limit_currency,sysdate,
5271: l_exchange_rate_type,
5272: SUM(pending_adj_value)) pending_adj_value,
5273: gl_currency_api.convert_amount(currency,
5274: l_limit_currency,sysdate,
5275: l_exchange_rate_type,
5276: SUM(receipts_at_risk_value)) total_receipts_at_risk_value,
5277: gl_currency_api.convert_amount(currency,

Line 5277: gl_currency_api.convert_amount(currency,

5273: gl_currency_api.convert_amount(currency,
5274: l_limit_currency,sysdate,
5275: l_exchange_rate_type,
5276: SUM(receipts_at_risk_value)) total_receipts_at_risk_value,
5277: gl_currency_api.convert_amount(currency,
5278: l_limit_currency,sysdate,
5279: l_exchange_rate_type,
5280: SUM(op_invoices_value)) op_invoices_value,
5281: SUM(op_invoices_count) op_invoices_count,

Line 5282: gl_currency_api.convert_amount(currency,

5278: l_limit_currency,sysdate,
5279: l_exchange_rate_type,
5280: SUM(op_invoices_value)) op_invoices_value,
5281: SUM(op_invoices_count) op_invoices_count,
5282: gl_currency_api.convert_amount(currency,
5283: l_limit_currency,sysdate,
5284: l_exchange_rate_type,
5285: SUM(op_debit_memos_value)) op_debit_memos_value,
5286: SUM(op_debit_memos_count) op_debit_memos_count,

Line 5287: gl_currency_api.convert_amount(currency,

5283: l_limit_currency,sysdate,
5284: l_exchange_rate_type,
5285: SUM(op_debit_memos_value)) op_debit_memos_value,
5286: SUM(op_debit_memos_count) op_debit_memos_count,
5287: gl_currency_api.convert_amount(currency,
5288: l_limit_currency,sysdate,
5289: l_exchange_rate_type,
5290: SUM(op_deposits_value)) op_deposits_value,
5291: SUM(op_deposits_count) op_deposits_count,

Line 5292: gl_currency_api.convert_amount(currency,

5288: l_limit_currency,sysdate,
5289: l_exchange_rate_type,
5290: SUM(op_deposits_value)) op_deposits_value,
5291: SUM(op_deposits_count) op_deposits_count,
5292: gl_currency_api.convert_amount(currency,
5293: l_limit_currency,sysdate,
5294: l_exchange_rate_type,
5295: SUM(op_bills_receivables_value)) op_bills_receivables_value,
5296: SUM(op_bills_receivables_count) op_bills_receivables_count,

Line 5297: gl_currency_api.convert_amount(currency,

5293: l_limit_currency,sysdate,
5294: l_exchange_rate_type,
5295: SUM(op_bills_receivables_value)) op_bills_receivables_value,
5296: SUM(op_bills_receivables_count) op_bills_receivables_count,
5297: gl_currency_api.convert_amount(currency,
5298: l_limit_currency,sysdate,
5299: l_exchange_rate_type,
5300: SUM(op_chargeback_value)) op_chargeback_value,
5301: SUM(op_chargeback_count) op_chargeback_count,

Line 5302: gl_currency_api.convert_amount(currency,

5298: l_limit_currency,sysdate,
5299: l_exchange_rate_type,
5300: SUM(op_chargeback_value)) op_chargeback_value,
5301: SUM(op_chargeback_count) op_chargeback_count,
5302: gl_currency_api.convert_amount(currency,
5303: l_limit_currency,sysdate,
5304: l_exchange_rate_type,
5305: SUM(op_credit_memos_value)) op_credit_memos_value,
5306: SUM(op_credit_memos_count) op_credit_memos_count,

Line 5307: gl_currency_api.convert_amount(currency,

5303: l_limit_currency,sysdate,
5304: l_exchange_rate_type,
5305: SUM(op_credit_memos_value)) op_credit_memos_value,
5306: SUM(op_credit_memos_count) op_credit_memos_count,
5307: gl_currency_api.convert_amount(currency,
5308: l_limit_currency,sysdate,
5309: l_exchange_rate_type,
5310: SUM(nvl(op_invoices_value,0) - nvl(past_due_inv_value,0))) current_invoice_value,
5311: SUM(nvl(op_invoices_count,0) - nvl(past_due_inv_inst_count,0)) current_invoice_count

Line 5351: gl_currency_api.convert_amount(currency,

5347: '209'||'^'||fnd_number.number_to_canonical(SUM(current_invoice_value)) current_invoice_value,
5348: '210'||'^'||fnd_number.number_to_canonical(SUM(current_invoice_count)) current_invoice_count
5349: FROM (
5350: SELECT
5351: gl_currency_api.convert_amount(currency,
5352: l_limit_currency,sysdate,
5353: l_exchange_rate_type,
5354: SUM((nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5355: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5358: gl_currency_api.convert_amount(currency,

5354: SUM((nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5355: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +
5356: nvl(OP_CHARGEBACK_VALUE,0) + nvl(OP_CREDIT_MEMOS_VALUE,0) +
5357: nvl(UNRESOLVED_CASH_VALUE,0) ))) current_receivable_balance, -- Current Receivables Balance (Opening balance)
5358: gl_currency_api.convert_amount(currency,
5359: l_limit_currency,sysdate,
5360: l_exchange_rate_type,
5361: SUM(UNRESOLVED_CASH_VALUE)) unapplied_cash_amount, -- unapplied case amount
5362: SUM(UNRESOLVED_CASH_COUNT) unapplied_cash_count, -- unapplied cash count

Line 5363: gl_currency_api.convert_amount(currency,

5359: l_limit_currency,sysdate,
5360: l_exchange_rate_type,
5361: SUM(UNRESOLVED_CASH_VALUE)) unapplied_cash_amount, -- unapplied case amount
5362: SUM(UNRESOLVED_CASH_COUNT) unapplied_cash_count, -- unapplied cash count
5363: gl_currency_api.convert_amount(currency,
5364: l_limit_currency,sysdate,
5365: l_exchange_rate_type,
5366: SUM(past_due_inv_value)) past_due_inv_value,
5367: SUM(past_due_inv_inst_count) past_due_inv_inst_count,

Line 5368: gl_currency_api.convert_amount(currency,

5364: l_limit_currency,sysdate,
5365: l_exchange_rate_type,
5366: SUM(past_due_inv_value)) past_due_inv_value,
5367: SUM(past_due_inv_inst_count) past_due_inv_inst_count,
5368: gl_currency_api.convert_amount(currency,
5369: l_limit_currency,sysdate,
5370: l_exchange_rate_type,
5371: SUM(inv_amt_in_dispute)) inv_amt_in_dispute,
5372: SUM(disputed_inv_count) disputed_inv_count,

Line 5373: gl_currency_api.convert_amount(currency,

5369: l_limit_currency,sysdate,
5370: l_exchange_rate_type,
5371: SUM(inv_amt_in_dispute)) inv_amt_in_dispute,
5372: SUM(disputed_inv_count) disputed_inv_count,
5373: gl_currency_api.convert_amount(currency,
5374: l_limit_currency,sysdate,
5375: l_exchange_rate_type,
5376: SUM(pending_adj_value)) pending_adj_value,
5377: gl_currency_api.convert_amount(currency,

Line 5377: gl_currency_api.convert_amount(currency,

5373: gl_currency_api.convert_amount(currency,
5374: l_limit_currency,sysdate,
5375: l_exchange_rate_type,
5376: SUM(pending_adj_value)) pending_adj_value,
5377: gl_currency_api.convert_amount(currency,
5378: l_limit_currency,sysdate,
5379: l_exchange_rate_type,
5380: SUM(receipts_at_risk_value)) total_receipts_at_risk_value,
5381: gl_currency_api.convert_amount(currency,

Line 5381: gl_currency_api.convert_amount(currency,

5377: gl_currency_api.convert_amount(currency,
5378: l_limit_currency,sysdate,
5379: l_exchange_rate_type,
5380: SUM(receipts_at_risk_value)) total_receipts_at_risk_value,
5381: gl_currency_api.convert_amount(currency,
5382: l_limit_currency,sysdate,
5383: l_exchange_rate_type,
5384: SUM(op_invoices_value)) op_invoices_value,
5385: SUM(op_invoices_count) op_invoices_count,

Line 5386: gl_currency_api.convert_amount(currency,

5382: l_limit_currency,sysdate,
5383: l_exchange_rate_type,
5384: SUM(op_invoices_value)) op_invoices_value,
5385: SUM(op_invoices_count) op_invoices_count,
5386: gl_currency_api.convert_amount(currency,
5387: l_limit_currency,sysdate,
5388: l_exchange_rate_type,
5389: SUM(op_debit_memos_value)) op_debit_memos_value,
5390: SUM(op_debit_memos_count) op_debit_memos_count,

Line 5391: gl_currency_api.convert_amount(currency,

5387: l_limit_currency,sysdate,
5388: l_exchange_rate_type,
5389: SUM(op_debit_memos_value)) op_debit_memos_value,
5390: SUM(op_debit_memos_count) op_debit_memos_count,
5391: gl_currency_api.convert_amount(currency,
5392: l_limit_currency,sysdate,
5393: l_exchange_rate_type,
5394: SUM(op_deposits_value)) op_deposits_value,
5395: SUM(op_deposits_count) op_deposits_count,

Line 5396: gl_currency_api.convert_amount(currency,

5392: l_limit_currency,sysdate,
5393: l_exchange_rate_type,
5394: SUM(op_deposits_value)) op_deposits_value,
5395: SUM(op_deposits_count) op_deposits_count,
5396: gl_currency_api.convert_amount(currency,
5397: l_limit_currency,sysdate,
5398: l_exchange_rate_type,
5399: SUM(op_bills_receivables_value)) op_bills_receivables_value,
5400: SUM(op_bills_receivables_count) op_bills_receivables_count,

Line 5401: gl_currency_api.convert_amount(currency,

5397: l_limit_currency,sysdate,
5398: l_exchange_rate_type,
5399: SUM(op_bills_receivables_value)) op_bills_receivables_value,
5400: SUM(op_bills_receivables_count) op_bills_receivables_count,
5401: gl_currency_api.convert_amount(currency,
5402: l_limit_currency,sysdate,
5403: l_exchange_rate_type,
5404: SUM(op_chargeback_value)) op_chargeback_value,
5405: SUM(op_chargeback_count) op_chargeback_count,

Line 5406: gl_currency_api.convert_amount(currency,

5402: l_limit_currency,sysdate,
5403: l_exchange_rate_type,
5404: SUM(op_chargeback_value)) op_chargeback_value,
5405: SUM(op_chargeback_count) op_chargeback_count,
5406: gl_currency_api.convert_amount(currency,
5407: l_limit_currency,sysdate,
5408: l_exchange_rate_type,
5409: SUM(op_credit_memos_value)) op_credit_memos_value,
5410: SUM(op_credit_memos_count) op_credit_memos_count,

Line 5411: gl_currency_api.convert_amount(currency,

5407: l_limit_currency,sysdate,
5408: l_exchange_rate_type,
5409: SUM(op_credit_memos_value)) op_credit_memos_value,
5410: SUM(op_credit_memos_count) op_credit_memos_count,
5411: gl_currency_api.convert_amount(currency,
5412: l_limit_currency,sysdate,
5413: l_exchange_rate_type,
5414: SUM(nvl(op_invoices_value,0) - nvl(past_due_inv_value,0))) current_invoice_value,
5415: SUM(nvl(op_invoices_count,0) - nvl(past_due_inv_inst_count,0)) current_invoice_count

Line 5430: SELECT gl_currency_api.convert_amount(currency,

5426: CURSOR c_party_numerator_dso IS
5427: SELECT SUM(dso) dso,
5428: SUM(delinquent_dso) delinquent_dso
5429: FROM (
5430: SELECT gl_currency_api.convert_amount(currency,
5431: l_limit_currency,sysdate,
5432: l_exchange_rate_type,
5433: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5434: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5437: gl_currency_api.convert_amount(currency,

5433: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5434: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +
5435: nvl(OP_CHARGEBACK_VALUE,0) + nvl(OP_CREDIT_MEMOS_VALUE,0)
5436: )*l_certified_dso_days)) dso,
5437: gl_currency_api.convert_amount(currency,
5438: l_limit_currency,sysdate,
5439: l_exchange_rate_type,
5440: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5441: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5478: SELECT gl_currency_api.convert_amount (currency,

5474: CURSOR c_account_numerator_dso IS
5475: SELECT SUM(dso) dso,
5476: SUM(delinquent_dso) delinquent_dso
5477: FROM (
5478: SELECT gl_currency_api.convert_amount (currency,
5479: l_limit_currency,sysdate,
5480: l_exchange_rate_type,
5481: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5482: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5485: gl_currency_api.convert_amount(currency,

5481: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5482: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +
5483: nvl(OP_CHARGEBACK_VALUE,0) + nvl(OP_CREDIT_MEMOS_VALUE,0)
5484: )*l_certified_dso_days)) dso,
5485: gl_currency_api.convert_amount(currency,
5486: l_limit_currency,sysdate,
5487: l_exchange_rate_type,
5488: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5489: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5506: SELECT gl_currency_api.convert_amount(currency,

5502: CURSOR c_site_numerator_dso IS
5503: SELECT SUM(dso) dso,
5504: SUM(delinquent_dso) delinquent_dso
5505: FROM (
5506: SELECT gl_currency_api.convert_amount(currency,
5507: l_limit_currency,sysdate,
5508: l_exchange_rate_type,
5509: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5510: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5513: gl_currency_api.convert_amount(currency,

5509: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5510: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +
5511: nvl(OP_CHARGEBACK_VALUE,0) + nvl(OP_CREDIT_MEMOS_VALUE,0) +
5512: nvl(UNRESOLVED_CASH_VALUE,0) )*l_certified_dso_days)) dso,
5513: gl_currency_api.convert_amount(currency,
5514: l_limit_currency,sysdate,
5515: l_exchange_rate_type,
5516: (SUM(nvl(OP_INVOICES_VALUE,0) + nvl(OP_DEBIT_MEMOS_VALUE,0) +
5517: nvl(OP_DEPOSITS_VALUE,0) + nvl(OP_BILLS_RECEIVABLES_VALUE,0) +

Line 5532: SELECT gl_currency_api.convert_amount(currency,

5528: CURSOR c_party_deno_dso IS
5529: SELECT SUM(dso) dso,
5530: SUM(delinquent_dso) delinquent_dso
5531: FROM (
5532: SELECT gl_currency_api.convert_amount(currency,
5533: l_limit_currency,sysdate,
5534: l_exchange_rate_type,
5535: (SUM(nvl(TOTAL_INVOICES_VALUE,0) + nvl(TOTAL_DEBIT_MEMOS_VALUE,0) +
5536: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +

Line 5540: gl_currency_api.convert_amount(currency,

5536: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +
5537: nvl(TOTAL_CHARGEBACK_VALUE,0) + nvl(TOTAL_CREDIT_MEMOS_VALUE,0) +
5538: nvl(TOTAL_ADJUSTMENTS_VALUE,0))
5539: )) dso,
5540: gl_currency_api.convert_amount(currency,
5541: l_limit_currency,sysdate,
5542: l_exchange_rate_type,
5543: ((SUM(nvl(TOTAL_INVOICES_VALUE,0) + nvl(TOTAL_DEBIT_MEMOS_VALUE,0) +
5544: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +

Line 5583: SELECT gl_currency_api.convert_amount(currency,

5579: CURSOR c_account_deno_dso IS
5580: SELECT SUM(dso) dso,
5581: SUM(delinquent_dso) delinquent_dso
5582: FROM (
5583: SELECT gl_currency_api.convert_amount(currency,
5584: l_limit_currency,sysdate,
5585: l_exchange_rate_type,
5586: (SUM(nvl(TOTAL_INVOICES_VALUE,0) + nvl(TOTAL_DEBIT_MEMOS_VALUE,0) +
5587: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +

Line 5591: gl_currency_api.convert_amount(currency,

5587: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +
5588: nvl(TOTAL_CHARGEBACK_VALUE,0) + nvl(TOTAL_CREDIT_MEMOS_VALUE,0) +
5589: nvl(TOTAL_ADJUSTMENTS_VALUE,0))
5590: )) dso,
5591: gl_currency_api.convert_amount(currency,
5592: l_limit_currency,sysdate,
5593: l_exchange_rate_type,
5594: (SUM(nvl(TOTAL_INVOICES_VALUE,0) + nvl(TOTAL_DEBIT_MEMOS_VALUE,0) +
5595: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +

Line 5614: SELECT gl_currency_api.convert_amount(currency,

5610: CURSOR c_site_deno_dso IS
5611: SELECT SUM(dso) dso,
5612: SUM(delinquent_dso) delinquent_dso
5613: FROM (
5614: SELECT gl_currency_api.convert_amount(currency,
5615: l_limit_currency,sysdate,
5616: l_exchange_rate_type,
5617: (SUM(nvl(TOTAL_INVOICES_VALUE,0) + nvl(TOTAL_DEBIT_MEMOS_VALUE,0) +
5618: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +

Line 5622: gl_currency_api.convert_amount(currency,

5618: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +
5619: nvl(TOTAL_CHARGEBACK_VALUE,0) + nvl(TOTAL_CREDIT_MEMOS_VALUE,0) +
5620: nvl(TOTAL_ADJUSTMENTS_VALUE,0))
5621: )) dso,
5622: gl_currency_api.convert_amount(currency,
5623: l_limit_currency,sysdate,
5624: l_exchange_rate_type,
5625: (SUM(nvl(TOTAL_INVOICES_VALUE,0) + nvl(TOTAL_DEBIT_MEMOS_VALUE,0) +
5626: nvl(TOTAL_DEPOSITS_VALUE,0) + nvl(TOTAL_BILLS_RECEIVABLES_VALUE,0) +

Line 5771: IF gl_currency_api.rate_exists(

5767: for i in 1..l_curr_tbl.COUNT
5768: LOOP
5769: IF pg_wf_debug = 'Y'
5770: THEN
5771: IF gl_currency_api.rate_exists(
5772: l_limit_currency,
5773: l_curr_tbl(i).usage_curr_code,
5774: sysdate,
5775: l_exchange_rate_type) = 'Y'