DBA Data[Home] [Help]

APPS.AR_ARXCCS_XMLP_PKG dependencies on AR_CASH_RECEIPTS

Line 206: decode(ar_cash_receipts.currency_code, functional_currency, ' ',

202: SELECT NVL(SUM(DECODE(AR_RECEIVABLE_APPLICATIONS.STATUS, 'ACC',
203: -AMOUNT_APPLIED, 0)),
204: 0) on_account,
205: nvl(max(decode(ar_receivable_applications.status, 'ACC',
206: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
207: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
208: ' ')), ' ') account_convert,
209: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
210: -amount_applied, 0)),

Line 207: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

203: -AMOUNT_APPLIED, 0)),
204: 0) on_account,
205: nvl(max(decode(ar_receivable_applications.status, 'ACC',
206: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
207: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
208: ' ')), ' ') account_convert,
209: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
210: -amount_applied, 0)),
211: 0) unapplied,

Line 213: decode(ar_cash_receipts.currency_code, functional_currency, ' ',

209: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
210: -amount_applied, 0)),
211: 0) unapplied,
212: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
213: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
214: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
215: ' ')), ' ') unapp_convert
216: into l_aging_on_account,
217: l_aging_convert_on_account,

Line 214: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

210: -amount_applied, 0)),
211: 0) unapplied,
212: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
213: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
214: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
215: ' ')), ' ') unapp_convert
216: into l_aging_on_account,
217: l_aging_convert_on_account,
218: l_aging_unapplied,

Line 221: ar_cash_receipts

217: l_aging_convert_on_account,
218: l_aging_unapplied,
219: l_aging_convert_unapplied
220: from ar_receivable_applications,
221: ar_cash_receipts
222: where ar_receivable_applications.cash_receipt_id =
223: ar_cash_receipts.cash_receipt_id
224: and ar_cash_receipts.pay_from_customer = customer_id
225: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 223: ar_cash_receipts.cash_receipt_id

219: l_aging_convert_unapplied
220: from ar_receivable_applications,
221: ar_cash_receipts
222: where ar_receivable_applications.cash_receipt_id =
223: ar_cash_receipts.cash_receipt_id
224: and ar_cash_receipts.pay_from_customer = customer_id
225: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
226: and ar_cash_receipts.currency_code = Currency_Bucket
227: and ar_receivable_applications.gl_date <= sysdate

Line 224: and ar_cash_receipts.pay_from_customer = customer_id

220: from ar_receivable_applications,
221: ar_cash_receipts
222: where ar_receivable_applications.cash_receipt_id =
223: ar_cash_receipts.cash_receipt_id
224: and ar_cash_receipts.pay_from_customer = customer_id
225: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
226: and ar_cash_receipts.currency_code = Currency_Bucket
227: and ar_receivable_applications.gl_date <= sysdate
228: and nvl(ar_receivable_applications.confirmed_flag,'Y') = 'Y'

Line 225: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

221: ar_cash_receipts
222: where ar_receivable_applications.cash_receipt_id =
223: ar_cash_receipts.cash_receipt_id
224: and ar_cash_receipts.pay_from_customer = customer_id
225: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
226: and ar_cash_receipts.currency_code = Currency_Bucket
227: and ar_receivable_applications.gl_date <= sysdate
228: and nvl(ar_receivable_applications.confirmed_flag,'Y') = 'Y'
229: ;

Line 226: and ar_cash_receipts.currency_code = Currency_Bucket

222: where ar_receivable_applications.cash_receipt_id =
223: ar_cash_receipts.cash_receipt_id
224: and ar_cash_receipts.pay_from_customer = customer_id
225: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
226: and ar_cash_receipts.currency_code = Currency_Bucket
227: and ar_receivable_applications.gl_date <= sysdate
228: and nvl(ar_receivable_applications.confirmed_flag,'Y') = 'Y'
229: ;
230:

Line 534: from ar_cash_receipts

530: nvl(count(amount),0) payment_count
531: into l_ytd_payment_amount,
532: l_ytd_convert_payment,
533: l_ytd_payment_count
534: from ar_cash_receipts
535: --where ar_cash_receipts.pay_from_customer = customer_id
536: where ar_cash_receipts.pay_from_customer = customer_id_1
537: and customer_site_use_id = site_use_id
538: and currency_code = Currency_Bucket

Line 535: --where ar_cash_receipts.pay_from_customer = customer_id

531: into l_ytd_payment_amount,
532: l_ytd_convert_payment,
533: l_ytd_payment_count
534: from ar_cash_receipts
535: --where ar_cash_receipts.pay_from_customer = customer_id
536: where ar_cash_receipts.pay_from_customer = customer_id_1
537: and customer_site_use_id = site_use_id
538: and currency_code = Currency_Bucket
539: and ar_cash_receipts.creation_date between

Line 536: where ar_cash_receipts.pay_from_customer = customer_id_1

532: l_ytd_convert_payment,
533: l_ytd_payment_count
534: from ar_cash_receipts
535: --where ar_cash_receipts.pay_from_customer = customer_id
536: where ar_cash_receipts.pay_from_customer = customer_id_1
537: and customer_site_use_id = site_use_id
538: and currency_code = Currency_Bucket
539: and ar_cash_receipts.creation_date between
540: add_months(sysdate, -12) and sysdate

Line 539: and ar_cash_receipts.creation_date between

535: --where ar_cash_receipts.pay_from_customer = customer_id
536: where ar_cash_receipts.pay_from_customer = customer_id_1
537: and customer_site_use_id = site_use_id
538: and currency_code = Currency_Bucket
539: and ar_cash_receipts.creation_date between
540: add_months(sysdate, -12) and sysdate
541: and ar_cash_receipts.status <> 'REV'
542: and nvl(ar_cash_receipts.confirmed_flag,'Y') = 'Y'
543: ;

Line 541: and ar_cash_receipts.status <> 'REV'

537: and customer_site_use_id = site_use_id
538: and currency_code = Currency_Bucket
539: and ar_cash_receipts.creation_date between
540: add_months(sysdate, -12) and sysdate
541: and ar_cash_receipts.status <> 'REV'
542: and nvl(ar_cash_receipts.confirmed_flag,'Y') = 'Y'
543: ;
544: select nvl(sum(amount_due_original ), 0),
545: nvl(max(decode(ar_payment_schedules.invoice_currency_code,

Line 542: and nvl(ar_cash_receipts.confirmed_flag,'Y') = 'Y'

538: and currency_code = Currency_Bucket
539: and ar_cash_receipts.creation_date between
540: add_months(sysdate, -12) and sysdate
541: and ar_cash_receipts.status <> 'REV'
542: and nvl(ar_cash_receipts.confirmed_flag,'Y') = 'Y'
543: ;
544: select nvl(sum(amount_due_original ), 0),
545: nvl(max(decode(ar_payment_schedules.invoice_currency_code,
546: functional_currency, ' ',

Line 661: select nvl(sum(ROUND(decode(ar_cash_receipts.status,'NSF', acrh.acctd_amount, 'STOP', acrh.acctd_amount, 0)

657: and ar_receivable_applications.display = 'Y'
658: and nvl(ar_payment_schedules.receipt_confirmed_flag,'Y') = 'Y'
659: ;
660:
661: select nvl(sum(ROUND(decode(ar_cash_receipts.status,'NSF', acrh.acctd_amount, 'STOP', acrh.acctd_amount, 0)
662: , 2)), 0) nsf_amount,
663: nvl(max(decode(currency_code, functional_currency, ' ',
664: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' '))), ' '),
665: nvl(sum(decode(ar_cash_receipts.status,'NSF', 1, 'STOP', 1, 0)), 0) nsf_count

Line 664: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' '))), ' '),

660:
661: select nvl(sum(ROUND(decode(ar_cash_receipts.status,'NSF', acrh.acctd_amount, 'STOP', acrh.acctd_amount, 0)
662: , 2)), 0) nsf_amount,
663: nvl(max(decode(currency_code, functional_currency, ' ',
664: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' '))), ' '),
665: nvl(sum(decode(ar_cash_receipts.status,'NSF', 1, 'STOP', 1, 0)), 0) nsf_count
666: into l_ytd_nsf_amount,
667: l_ytd_convert_nsf,
668: l_ytd_nsf_count

Line 665: nvl(sum(decode(ar_cash_receipts.status,'NSF', 1, 'STOP', 1, 0)), 0) nsf_count

661: select nvl(sum(ROUND(decode(ar_cash_receipts.status,'NSF', acrh.acctd_amount, 'STOP', acrh.acctd_amount, 0)
662: , 2)), 0) nsf_amount,
663: nvl(max(decode(currency_code, functional_currency, ' ',
664: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' '))), ' '),
665: nvl(sum(decode(ar_cash_receipts.status,'NSF', 1, 'STOP', 1, 0)), 0) nsf_count
666: into l_ytd_nsf_amount,
667: l_ytd_convert_nsf,
668: l_ytd_nsf_count
669: from ar_cash_receipts,

Line 669: from ar_cash_receipts,

665: nvl(sum(decode(ar_cash_receipts.status,'NSF', 1, 'STOP', 1, 0)), 0) nsf_count
666: into l_ytd_nsf_amount,
667: l_ytd_convert_nsf,
668: l_ytd_nsf_count
669: from ar_cash_receipts,
670: ar_cash_receipt_history acrh
671: --where ar_cash_receipts.pay_from_customer = customer_id
672: where ar_cash_receipts.pay_from_customer = customer_id_1
673: and ar_cash_receipts.cash_receipt_id = acrh.cash_receipt_id

Line 671: --where ar_cash_receipts.pay_from_customer = customer_id

667: l_ytd_convert_nsf,
668: l_ytd_nsf_count
669: from ar_cash_receipts,
670: ar_cash_receipt_history acrh
671: --where ar_cash_receipts.pay_from_customer = customer_id
672: where ar_cash_receipts.pay_from_customer = customer_id_1
673: and ar_cash_receipts.cash_receipt_id = acrh.cash_receipt_id
674: and acrh.first_posted_record_flag = 'Y'
675: and customer_site_use_id = site_use_id

Line 672: where ar_cash_receipts.pay_from_customer = customer_id_1

668: l_ytd_nsf_count
669: from ar_cash_receipts,
670: ar_cash_receipt_history acrh
671: --where ar_cash_receipts.pay_from_customer = customer_id
672: where ar_cash_receipts.pay_from_customer = customer_id_1
673: and ar_cash_receipts.cash_receipt_id = acrh.cash_receipt_id
674: and acrh.first_posted_record_flag = 'Y'
675: and customer_site_use_id = site_use_id
676: and currency_code = Currency_Bucket

Line 673: and ar_cash_receipts.cash_receipt_id = acrh.cash_receipt_id

669: from ar_cash_receipts,
670: ar_cash_receipt_history acrh
671: --where ar_cash_receipts.pay_from_customer = customer_id
672: where ar_cash_receipts.pay_from_customer = customer_id_1
673: and ar_cash_receipts.cash_receipt_id = acrh.cash_receipt_id
674: and acrh.first_posted_record_flag = 'Y'
675: and customer_site_use_id = site_use_id
676: and currency_code = Currency_Bucket
677: and ar_cash_receipts.reversal_date between

Line 677: and ar_cash_receipts.reversal_date between

673: and ar_cash_receipts.cash_receipt_id = acrh.cash_receipt_id
674: and acrh.first_posted_record_flag = 'Y'
675: and customer_site_use_id = site_use_id
676: and currency_code = Currency_Bucket
677: and ar_cash_receipts.reversal_date between
678: add_months(sysdate, -12) and sysdate
679:
680: ;
681:

Line 1067: decode(ar_cash_receipts.currency_code,functional_currency, ' ',

1063: NVL(SUM(DECODE(AR_RECEIVABLE_APPLICATIONS.STATUS, 'ACC',
1064: AMOUNT_APPLIED, 0)),
1065: 0) on_account,
1066: nvl(max(decode(ar_receivable_applications.status, 'ACC',
1067: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
1068: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
1069: ' ')), ' ') account_convert,
1070: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
1071: amount_applied, 0)),

Line 1068: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

1064: AMOUNT_APPLIED, 0)),
1065: 0) on_account,
1066: nvl(max(decode(ar_receivable_applications.status, 'ACC',
1067: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
1068: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
1069: ' ')), ' ') account_convert,
1070: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
1071: amount_applied, 0)),
1072: 0) unapplied,

Line 1074: decode(ar_cash_receipts.currency_code,functional_currency, ' ',

1070: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
1071: amount_applied, 0)),
1072: 0) unapplied,
1073: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
1074: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
1075: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
1076: ' ')), ' ') unapp_convert
1077: into
1078: l_aging_on_account_profile,

Line 1075: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

1071: amount_applied, 0)),
1072: 0) unapplied,
1073: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
1074: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
1075: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
1076: ' ')), ' ') unapp_convert
1077: into
1078: l_aging_on_account_profile,
1079: l_aging_conv_on_ac_profile,

Line 1084: ar_cash_receipts

1080: l_aging_unapplied_profile,
1081: l_aging_conv_unap_prof
1082: from
1083: ar_receivable_applications,
1084: ar_cash_receipts
1085: where
1086: ar_receivable_applications.cash_receipt_id =
1087: ar_cash_receipts.cash_receipt_id
1088: and ar_cash_receipts.pay_from_customer = qc_customer

Line 1087: ar_cash_receipts.cash_receipt_id

1083: ar_receivable_applications,
1084: ar_cash_receipts
1085: where
1086: ar_receivable_applications.cash_receipt_id =
1087: ar_cash_receipts.cash_receipt_id
1088: and ar_cash_receipts.pay_from_customer = qc_customer
1089: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1090: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1091: and ar_cash_receipts.currency_code = currency_credit

Line 1088: and ar_cash_receipts.pay_from_customer = qc_customer

1084: ar_cash_receipts
1085: where
1086: ar_receivable_applications.cash_receipt_id =
1087: ar_cash_receipts.cash_receipt_id
1088: and ar_cash_receipts.pay_from_customer = qc_customer
1089: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1090: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1091: and ar_cash_receipts.currency_code = currency_credit
1092: and ar_receivable_applications.gl_date <= sysdate;

Line 1089: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =

1085: where
1086: ar_receivable_applications.cash_receipt_id =
1087: ar_cash_receipts.cash_receipt_id
1088: and ar_cash_receipts.pay_from_customer = qc_customer
1089: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1090: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1091: and ar_cash_receipts.currency_code = currency_credit
1092: and ar_receivable_applications.gl_date <= sysdate;
1093:

Line 1090: NVL(qc_site, ar_cash_receipts.customer_site_use_id)

1086: ar_receivable_applications.cash_receipt_id =
1087: ar_cash_receipts.cash_receipt_id
1088: and ar_cash_receipts.pay_from_customer = qc_customer
1089: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1090: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1091: and ar_cash_receipts.currency_code = currency_credit
1092: and ar_receivable_applications.gl_date <= sysdate;
1093:
1094: for trx_rec in ps_trx loop

Line 1091: and ar_cash_receipts.currency_code = currency_credit

1087: ar_cash_receipts.cash_receipt_id
1088: and ar_cash_receipts.pay_from_customer = qc_customer
1089: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1090: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1091: and ar_cash_receipts.currency_code = currency_credit
1092: and ar_receivable_applications.gl_date <= sysdate;
1093:
1094: for trx_rec in ps_trx loop
1095: curr_exists := instr(CP_related_currencies,trx_rec.invoice_currency_code);

Line 1117: ar_cash_receipts

1113: l_aging_on_account_profile,
1114: l_aging_unapplied_profile
1115: from
1116: ar_receivable_applications,
1117: ar_cash_receipts
1118: where
1119: ar_receivable_applications.cash_receipt_id =
1120: ar_cash_receipts.cash_receipt_id
1121: and ar_cash_receipts.pay_from_customer = qc_customer

Line 1120: ar_cash_receipts.cash_receipt_id

1116: ar_receivable_applications,
1117: ar_cash_receipts
1118: where
1119: ar_receivable_applications.cash_receipt_id =
1120: ar_cash_receipts.cash_receipt_id
1121: and ar_cash_receipts.pay_from_customer = qc_customer
1122: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1123: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1124: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code

Line 1121: and ar_cash_receipts.pay_from_customer = qc_customer

1117: ar_cash_receipts
1118: where
1119: ar_receivable_applications.cash_receipt_id =
1120: ar_cash_receipts.cash_receipt_id
1121: and ar_cash_receipts.pay_from_customer = qc_customer
1122: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1123: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1124: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
1125: and ar_receivable_applications.gl_date <= sysdate;

Line 1122: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =

1118: where
1119: ar_receivable_applications.cash_receipt_id =
1120: ar_cash_receipts.cash_receipt_id
1121: and ar_cash_receipts.pay_from_customer = qc_customer
1122: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1123: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1124: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
1125: and ar_receivable_applications.gl_date <= sysdate;
1126:

Line 1123: NVL(qc_site, ar_cash_receipts.customer_site_use_id)

1119: ar_receivable_applications.cash_receipt_id =
1120: ar_cash_receipts.cash_receipt_id
1121: and ar_cash_receipts.pay_from_customer = qc_customer
1122: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1123: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1124: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
1125: and ar_receivable_applications.gl_date <= sysdate;
1126:
1127: trx_amount := trx_rec.ammount_due -

Line 1124: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code

1120: ar_cash_receipts.cash_receipt_id
1121: and ar_cash_receipts.pay_from_customer = qc_customer
1122: and ar_cash_receipts.CUSTOMER_SITE_USE_ID =
1123: NVL(qc_site, ar_cash_receipts.customer_site_use_id)
1124: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
1125: and ar_receivable_applications.gl_date <= sysdate;
1126:
1127: trx_amount := trx_rec.ammount_due -
1128: l_aging_unapplied_profile -

Line 1822: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,

1818: l_last_payment_rel_invoice VARCHAR2 (100);
1819: l_dummy NUMBER (1);
1820:
1821: CURSOR C_PAYMENT IS
1822: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
1823: AR_LOOKUPS.MEANING,
1824: AR_CASH_RECEIPTS.CURRENCY_CODE,
1825: AR_CASH_RECEIPTS.AMOUNT,
1826: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE, functional_currency, ' ',

Line 1824: AR_CASH_RECEIPTS.CURRENCY_CODE,

1820:
1821: CURSOR C_PAYMENT IS
1822: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
1823: AR_LOOKUPS.MEANING,
1824: AR_CASH_RECEIPTS.CURRENCY_CODE,
1825: AR_CASH_RECEIPTS.AMOUNT,
1826: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE, functional_currency, ' ',
1827: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
1828: CRH.GL_DATE,

Line 1825: AR_CASH_RECEIPTS.AMOUNT,

1821: CURSOR C_PAYMENT IS
1822: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
1823: AR_LOOKUPS.MEANING,
1824: AR_CASH_RECEIPTS.CURRENCY_CODE,
1825: AR_CASH_RECEIPTS.AMOUNT,
1826: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE, functional_currency, ' ',
1827: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
1828: CRH.GL_DATE,
1829: ROUND(TRUNC(SYSDATE) - CRH.GL_DATE),

Line 1826: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE, functional_currency, ' ',

1822: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
1823: AR_LOOKUPS.MEANING,
1824: AR_CASH_RECEIPTS.CURRENCY_CODE,
1825: AR_CASH_RECEIPTS.AMOUNT,
1826: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE, functional_currency, ' ',
1827: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
1828: CRH.GL_DATE,
1829: ROUND(TRUNC(SYSDATE) - CRH.GL_DATE),
1830: RA_CUSTOMER_TRX.TRX_NUMBER

Line 1827: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),

1823: AR_LOOKUPS.MEANING,
1824: AR_CASH_RECEIPTS.CURRENCY_CODE,
1825: AR_CASH_RECEIPTS.AMOUNT,
1826: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE, functional_currency, ' ',
1827: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
1828: CRH.GL_DATE,
1829: ROUND(TRUNC(SYSDATE) - CRH.GL_DATE),
1830: RA_CUSTOMER_TRX.TRX_NUMBER
1831: FROM AR_LOOKUPS,

Line 1832: AR_CASH_RECEIPTS,

1828: CRH.GL_DATE,
1829: ROUND(TRUNC(SYSDATE) - CRH.GL_DATE),
1830: RA_CUSTOMER_TRX.TRX_NUMBER
1831: FROM AR_LOOKUPS,
1832: AR_CASH_RECEIPTS,
1833: AR_CASH_RECEIPT_HISTORY CRH,
1834: AR_RECEIVABLE_APPLICATIONS,
1835: RA_CUSTOMER_TRX
1836: WHERE NVL(AR_CASH_RECEIPTS.TYPE, 'CASH') = AR_LOOKUPS.LOOKUP_CODE

Line 1836: WHERE NVL(AR_CASH_RECEIPTS.TYPE, 'CASH') = AR_LOOKUPS.LOOKUP_CODE

1832: AR_CASH_RECEIPTS,
1833: AR_CASH_RECEIPT_HISTORY CRH,
1834: AR_RECEIVABLE_APPLICATIONS,
1835: RA_CUSTOMER_TRX
1836: WHERE NVL(AR_CASH_RECEIPTS.TYPE, 'CASH') = AR_LOOKUPS.LOOKUP_CODE
1837: AND AR_LOOKUPS.LOOKUP_TYPE = 'PAYMENT_CATEGORY_TYPE'
1838: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
1839: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
1840: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID =

Line 1838: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID

1834: AR_RECEIVABLE_APPLICATIONS,
1835: RA_CUSTOMER_TRX
1836: WHERE NVL(AR_CASH_RECEIPTS.TYPE, 'CASH') = AR_LOOKUPS.LOOKUP_CODE
1837: AND AR_LOOKUPS.LOOKUP_TYPE = 'PAYMENT_CATEGORY_TYPE'
1838: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
1839: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
1840: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID =
1841: AR_RECEIVABLE_APPLICATIONS.CASH_RECEIPT_ID
1842: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID = CRH.CASH_RECEIPT_ID

Line 1839: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id

1835: RA_CUSTOMER_TRX
1836: WHERE NVL(AR_CASH_RECEIPTS.TYPE, 'CASH') = AR_LOOKUPS.LOOKUP_CODE
1837: AND AR_LOOKUPS.LOOKUP_TYPE = 'PAYMENT_CATEGORY_TYPE'
1838: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
1839: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
1840: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID =
1841: AR_RECEIVABLE_APPLICATIONS.CASH_RECEIPT_ID
1842: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID = CRH.CASH_RECEIPT_ID
1843: AND CRH.FIRST_POSTED_RECORD_FLAG = 'Y'

Line 1840: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID =

1836: WHERE NVL(AR_CASH_RECEIPTS.TYPE, 'CASH') = AR_LOOKUPS.LOOKUP_CODE
1837: AND AR_LOOKUPS.LOOKUP_TYPE = 'PAYMENT_CATEGORY_TYPE'
1838: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
1839: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
1840: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID =
1841: AR_RECEIVABLE_APPLICATIONS.CASH_RECEIPT_ID
1842: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID = CRH.CASH_RECEIPT_ID
1843: AND CRH.FIRST_POSTED_RECORD_FLAG = 'Y'
1844: AND AR_RECEIVABLE_APPLICATIONS.APPLIED_CUSTOMER_TRX_ID =

Line 1842: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID = CRH.CASH_RECEIPT_ID

1838: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
1839: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
1840: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID =
1841: AR_RECEIVABLE_APPLICATIONS.CASH_RECEIPT_ID
1842: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID = CRH.CASH_RECEIPT_ID
1843: AND CRH.FIRST_POSTED_RECORD_FLAG = 'Y'
1844: AND AR_RECEIVABLE_APPLICATIONS.APPLIED_CUSTOMER_TRX_ID =
1845: RA_CUSTOMER_TRX.CUSTOMER_TRX_ID (+)
1846: ORDER BY AR_CASH_RECEIPTS.CREATION_DATE DESC,

Line 1846: ORDER BY AR_CASH_RECEIPTS.CREATION_DATE DESC,

1842: AND AR_CASH_RECEIPTS.CASH_RECEIPT_ID = CRH.CASH_RECEIPT_ID
1843: AND CRH.FIRST_POSTED_RECORD_FLAG = 'Y'
1844: AND AR_RECEIVABLE_APPLICATIONS.APPLIED_CUSTOMER_TRX_ID =
1845: RA_CUSTOMER_TRX.CUSTOMER_TRX_ID (+)
1846: ORDER BY AR_CASH_RECEIPTS.CREATION_DATE DESC,
1847: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC,
1848: AR_RECEIVABLE_APPLICATIONS.CREATION_DATE DESC
1849: ;
1850:

Line 1847: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC,

1843: AND CRH.FIRST_POSTED_RECORD_FLAG = 'Y'
1844: AND AR_RECEIVABLE_APPLICATIONS.APPLIED_CUSTOMER_TRX_ID =
1845: RA_CUSTOMER_TRX.CUSTOMER_TRX_ID (+)
1846: ORDER BY AR_CASH_RECEIPTS.CREATION_DATE DESC,
1847: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC,
1848: AR_RECEIVABLE_APPLICATIONS.CREATION_DATE DESC
1849: ;
1850:
1851: BEGIN

Line 2379: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,

2375: l_last_nsf_days_since VARCHAR2 (11);
2376: l_dummy NUMBER (1);
2377:
2378: CURSOR C_NSF IS
2379: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
2380: AR_CASH_RECEIPTS.STATUS,
2381: currency_code,
2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',

Line 2380: AR_CASH_RECEIPTS.STATUS,

2376: l_dummy NUMBER (1);
2377:
2378: CURSOR C_NSF IS
2379: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
2380: AR_CASH_RECEIPTS.STATUS,
2381: currency_code,
2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),

Line 2382: AR_CASH_RECEIPTS.AMOUNT,

2378: CURSOR C_NSF IS
2379: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
2380: AR_CASH_RECEIPTS.STATUS,
2381: currency_code,
2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)

Line 2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',

2379: SELECT AR_CASH_RECEIPTS.RECEIPT_NUMBER,
2380: AR_CASH_RECEIPTS.STATUS,
2381: currency_code,
2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS

Line 2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),

2380: AR_CASH_RECEIPTS.STATUS,
2381: currency_code,
2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')

Line 2385: AR_CASH_RECEIPTS.REVERSAL_DATE,

2381: currency_code,
2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID

Line 2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)

2382: AR_CASH_RECEIPTS.AMOUNT,
2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id

Line 2387: FROM AR_CASH_RECEIPTS

2383: DECODE(AR_CASH_RECEIPTS.CURRENCY_CODE,functional_currency, ' ',
2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,

Line 2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')

2384: DECODE(AR_CASH_RECEIPTS.EXCHANGE_RATE, NULL, '*', ' ')),
2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,
2392: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC

Line 2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID

2385: AR_CASH_RECEIPTS.REVERSAL_DATE,
2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,
2392: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC
2393: ;

Line 2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id

2386: ROUND(TRUNC(SYSDATE) - AR_CASH_RECEIPTS.REVERSAL_DATE)
2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,
2392: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC
2393: ;
2394:

Line 2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,

2387: FROM AR_CASH_RECEIPTS
2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,
2392: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC
2393: ;
2394:
2395: BEGIN

Line 2392: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC

2388: WHERE AR_CASH_RECEIPTS.STATUS IN ('NSF','STOP')
2389: AND AR_CASH_RECEIPTS.PAY_FROM_CUSTOMER = CUSTOMER_ID
2390: AND AR_CASH_RECEIPTS.CUSTOMER_SITE_USE_ID = site_use_id
2391: ORDER BY AR_CASH_RECEIPTS.REVERSAL_DATE DESC,
2392: AR_CASH_RECEIPTS.CASH_RECEIPT_ID DESC
2393: ;
2394:
2395: BEGIN
2396:

Line 3070: ar_cash_receipts

3066: 0) unapplied
3067: into l_aging_on_account_profile,
3068: l_aging_unapplied_profile
3069: from ar_receivable_applications,
3070: ar_cash_receipts
3071: where ar_receivable_applications.cash_receipt_id =
3072: ar_cash_receipts.cash_receipt_id
3073: and ar_cash_receipts.pay_from_customer = customer_id
3074: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 3072: ar_cash_receipts.cash_receipt_id

3068: l_aging_unapplied_profile
3069: from ar_receivable_applications,
3070: ar_cash_receipts
3071: where ar_receivable_applications.cash_receipt_id =
3072: ar_cash_receipts.cash_receipt_id
3073: and ar_cash_receipts.pay_from_customer = customer_id
3074: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3075: and ar_cash_receipts.currency_code = trx_cur
3076: and ar_receivable_applications.gl_date <= sysdate;

Line 3073: and ar_cash_receipts.pay_from_customer = customer_id

3069: from ar_receivable_applications,
3070: ar_cash_receipts
3071: where ar_receivable_applications.cash_receipt_id =
3072: ar_cash_receipts.cash_receipt_id
3073: and ar_cash_receipts.pay_from_customer = customer_id
3074: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3075: and ar_cash_receipts.currency_code = trx_cur
3076: and ar_receivable_applications.gl_date <= sysdate;
3077:

Line 3074: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3070: ar_cash_receipts
3071: where ar_receivable_applications.cash_receipt_id =
3072: ar_cash_receipts.cash_receipt_id
3073: and ar_cash_receipts.pay_from_customer = customer_id
3074: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3075: and ar_cash_receipts.currency_code = trx_cur
3076: and ar_receivable_applications.gl_date <= sysdate;
3077:
3078:

Line 3075: and ar_cash_receipts.currency_code = trx_cur

3071: where ar_receivable_applications.cash_receipt_id =
3072: ar_cash_receipts.cash_receipt_id
3073: and ar_cash_receipts.pay_from_customer = customer_id
3074: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3075: and ar_cash_receipts.currency_code = trx_cur
3076: and ar_receivable_applications.gl_date <= sysdate;
3077:
3078:
3079: cp_adjusted_amount := trx_amount_due - l_aging_unapplied_profile - l_aging_on_account_profile;

Line 3172: ar_cash_receipts

3168: 0) unapplied
3169: into l_aging_on_account_profile,
3170: l_aging_unapplied_profile
3171: from ar_receivable_applications,
3172: ar_cash_receipts
3173: where ar_receivable_applications.cash_receipt_id =
3174: ar_cash_receipts.cash_receipt_id
3175: and ar_cash_receipts.pay_from_customer = customer_id
3176: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 3174: ar_cash_receipts.cash_receipt_id

3170: l_aging_unapplied_profile
3171: from ar_receivable_applications,
3172: ar_cash_receipts
3173: where ar_receivable_applications.cash_receipt_id =
3174: ar_cash_receipts.cash_receipt_id
3175: and ar_cash_receipts.pay_from_customer = customer_id
3176: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3177: and ar_cash_receipts.currency_code = trx_cur2
3178: and ar_receivable_applications.gl_date <= sysdate;

Line 3175: and ar_cash_receipts.pay_from_customer = customer_id

3171: from ar_receivable_applications,
3172: ar_cash_receipts
3173: where ar_receivable_applications.cash_receipt_id =
3174: ar_cash_receipts.cash_receipt_id
3175: and ar_cash_receipts.pay_from_customer = customer_id
3176: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3177: and ar_cash_receipts.currency_code = trx_cur2
3178: and ar_receivable_applications.gl_date <= sysdate;
3179:

Line 3176: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3172: ar_cash_receipts
3173: where ar_receivable_applications.cash_receipt_id =
3174: ar_cash_receipts.cash_receipt_id
3175: and ar_cash_receipts.pay_from_customer = customer_id
3176: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3177: and ar_cash_receipts.currency_code = trx_cur2
3178: and ar_receivable_applications.gl_date <= sysdate;
3179:
3180: /*srw.message(300, 'DEBUG: adjusted amount : '|| to_char(cp_adjusted_amount1));*/null;

Line 3177: and ar_cash_receipts.currency_code = trx_cur2

3173: where ar_receivable_applications.cash_receipt_id =
3174: ar_cash_receipts.cash_receipt_id
3175: and ar_cash_receipts.pay_from_customer = customer_id
3176: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3177: and ar_cash_receipts.currency_code = trx_cur2
3178: and ar_receivable_applications.gl_date <= sysdate;
3179:
3180: /*srw.message(300, 'DEBUG: adjusted amount : '|| to_char(cp_adjusted_amount1));*/null;
3181:

Line 3285: decode(ar_cash_receipts.currency_code,functional_currency, ' ',

3281: NVL(SUM(DECODE(AR_RECEIVABLE_APPLICATIONS.STATUS, 'ACC',
3282: AMOUNT_APPLIED, 0)),
3283: 0) on_account,
3284: nvl(max(decode(ar_receivable_applications.status, 'ACC',
3285: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
3286: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3287: ' ')), ' ') account_convert,
3288: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
3289: amount_applied, 0)),

Line 3286: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

3282: AMOUNT_APPLIED, 0)),
3283: 0) on_account,
3284: nvl(max(decode(ar_receivable_applications.status, 'ACC',
3285: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
3286: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3287: ' ')), ' ') account_convert,
3288: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
3289: amount_applied, 0)),
3290: 0) unapplied,

Line 3292: decode(ar_cash_receipts.currency_code,functional_currency, ' ',

3288: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
3289: amount_applied, 0)),
3290: 0) unapplied,
3291: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
3292: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
3293: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3294: ' ')), ' ') unapp_convert
3295: into
3296: l_aging_on_account_profile,

Line 3293: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

3289: amount_applied, 0)),
3290: 0) unapplied,
3291: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
3292: decode(ar_cash_receipts.currency_code,functional_currency, ' ',
3293: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3294: ' ')), ' ') unapp_convert
3295: into
3296: l_aging_on_account_profile,
3297: l_aging_conv_on_ac_profile,

Line 3301: ar_cash_receipts

3297: l_aging_conv_on_ac_profile,
3298: l_aging_unapplied_profile,
3299: l_aging_conv_unap_prof
3300: from ar_receivable_applications,
3301: ar_cash_receipts
3302: where ar_receivable_applications.cash_receipt_id =
3303: ar_cash_receipts.cash_receipt_id
3304:
3305:

Line 3303: ar_cash_receipts.cash_receipt_id

3299: l_aging_conv_unap_prof
3300: from ar_receivable_applications,
3301: ar_cash_receipts
3302: where ar_receivable_applications.cash_receipt_id =
3303: ar_cash_receipts.cash_receipt_id
3304:
3305:
3306: and ar_cash_receipts.pay_from_customer = customer_id
3307: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 3306: and ar_cash_receipts.pay_from_customer = customer_id

3302: where ar_receivable_applications.cash_receipt_id =
3303: ar_cash_receipts.cash_receipt_id
3304:
3305:
3306: and ar_cash_receipts.pay_from_customer = customer_id
3307: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3308: and ar_cash_receipts.currency_code = org_currency_code
3309: and ar_receivable_applications.gl_date <= sysdate;
3310:

Line 3307: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3303: ar_cash_receipts.cash_receipt_id
3304:
3305:
3306: and ar_cash_receipts.pay_from_customer = customer_id
3307: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3308: and ar_cash_receipts.currency_code = org_currency_code
3309: and ar_receivable_applications.gl_date <= sysdate;
3310:
3311:

Line 3308: and ar_cash_receipts.currency_code = org_currency_code

3304:
3305:
3306: and ar_cash_receipts.pay_from_customer = customer_id
3307: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3308: and ar_cash_receipts.currency_code = org_currency_code
3309: and ar_receivable_applications.gl_date <= sysdate;
3310:
3311:
3312: FOR trx_rec IN ps_trx

Line 3334: ar_cash_receipts

3330: 0) unapplied
3331: into l_aging_on_account_profile,
3332: l_aging_unapplied_profile
3333: from ar_receivable_applications,
3334: ar_cash_receipts
3335: where ar_receivable_applications.cash_receipt_id =
3336: ar_cash_receipts.cash_receipt_id
3337: and ar_cash_receipts.pay_from_customer = customer_id
3338: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 3336: ar_cash_receipts.cash_receipt_id

3332: l_aging_unapplied_profile
3333: from ar_receivable_applications,
3334: ar_cash_receipts
3335: where ar_receivable_applications.cash_receipt_id =
3336: ar_cash_receipts.cash_receipt_id
3337: and ar_cash_receipts.pay_from_customer = customer_id
3338: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3339: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3340: and ar_receivable_applications.gl_date <= sysdate;

Line 3337: and ar_cash_receipts.pay_from_customer = customer_id

3333: from ar_receivable_applications,
3334: ar_cash_receipts
3335: where ar_receivable_applications.cash_receipt_id =
3336: ar_cash_receipts.cash_receipt_id
3337: and ar_cash_receipts.pay_from_customer = customer_id
3338: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3339: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3340: and ar_receivable_applications.gl_date <= sysdate;
3341:

Line 3338: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3334: ar_cash_receipts
3335: where ar_receivable_applications.cash_receipt_id =
3336: ar_cash_receipts.cash_receipt_id
3337: and ar_cash_receipts.pay_from_customer = customer_id
3338: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3339: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3340: and ar_receivable_applications.gl_date <= sysdate;
3341:
3342: trx_amount := trx_rec.ammount_due - l_aging_unapplied_profile - l_aging_on_account_profile;

Line 3339: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code

3335: where ar_receivable_applications.cash_receipt_id =
3336: ar_cash_receipts.cash_receipt_id
3337: and ar_cash_receipts.pay_from_customer = customer_id
3338: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3339: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3340: and ar_receivable_applications.gl_date <= sysdate;
3341:
3342: trx_amount := trx_rec.ammount_due - l_aging_unapplied_profile - l_aging_on_account_profile;
3343:

Line 3463: ar_cash_receipts

3459: 0) unapplied
3460: into l_aging_on_account_profile,
3461: l_aging_unapplied_profile
3462: from ar_receivable_applications,
3463: ar_cash_receipts
3464: where ar_receivable_applications.cash_receipt_id =
3465: ar_cash_receipts.cash_receipt_id
3466: and ar_cash_receipts.pay_from_customer = customer_id
3467: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 3465: ar_cash_receipts.cash_receipt_id

3461: l_aging_unapplied_profile
3462: from ar_receivable_applications,
3463: ar_cash_receipts
3464: where ar_receivable_applications.cash_receipt_id =
3465: ar_cash_receipts.cash_receipt_id
3466: and ar_cash_receipts.pay_from_customer = customer_id
3467: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3468: and ar_cash_receipts.currency_code = org_trx_cur
3469: and ar_receivable_applications.gl_date <= sysdate;

Line 3466: and ar_cash_receipts.pay_from_customer = customer_id

3462: from ar_receivable_applications,
3463: ar_cash_receipts
3464: where ar_receivable_applications.cash_receipt_id =
3465: ar_cash_receipts.cash_receipt_id
3466: and ar_cash_receipts.pay_from_customer = customer_id
3467: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3468: and ar_cash_receipts.currency_code = org_trx_cur
3469: and ar_receivable_applications.gl_date <= sysdate;
3470:

Line 3467: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3463: ar_cash_receipts
3464: where ar_receivable_applications.cash_receipt_id =
3465: ar_cash_receipts.cash_receipt_id
3466: and ar_cash_receipts.pay_from_customer = customer_id
3467: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3468: and ar_cash_receipts.currency_code = org_trx_cur
3469: and ar_receivable_applications.gl_date <= sysdate;
3470:
3471: /*srw.message(300, 'DEBUG: adjusted amount : '|| to_char(cp_adjusted_amount2));*/null;

Line 3468: and ar_cash_receipts.currency_code = org_trx_cur

3464: where ar_receivable_applications.cash_receipt_id =
3465: ar_cash_receipts.cash_receipt_id
3466: and ar_cash_receipts.pay_from_customer = customer_id
3467: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3468: and ar_cash_receipts.currency_code = org_trx_cur
3469: and ar_receivable_applications.gl_date <= sysdate;
3470:
3471: /*srw.message(300, 'DEBUG: adjusted amount : '|| to_char(cp_adjusted_amount2));*/null;
3472:

Line 3747: decode(ar_cash_receipts.currency_code, functional_currency, ' ',

3743: NVL(SUM(DECODE(AR_RECEIVABLE_APPLICATIONS.STATUS, 'ACC',
3744: AMOUNT_APPLIED, 0)),
3745: 0) on_account,
3746: nvl(max(decode(ar_receivable_applications.status, 'ACC',
3747: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
3748: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3749: ' ')), ' ') account_convert,
3750: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
3751: amount_applied, 0)),

Line 3748: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

3744: AMOUNT_APPLIED, 0)),
3745: 0) on_account,
3746: nvl(max(decode(ar_receivable_applications.status, 'ACC',
3747: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
3748: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3749: ' ')), ' ') account_convert,
3750: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
3751: amount_applied, 0)),
3752: 0) unapplied,

Line 3754: decode(ar_cash_receipts.currency_code, functional_currency, ' ',

3750: nvl(sum(decode(ar_receivable_applications.status, 'UNAPP',
3751: amount_applied, 0)),
3752: 0) unapplied,
3753: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
3754: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
3755: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3756: ' ')), ' ') unapp_convert
3757: into
3758: l_aging_on_account_profile,

Line 3755: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),

3751: amount_applied, 0)),
3752: 0) unapplied,
3753: nvl(max(decode(ar_receivable_applications.status, 'UNAPP',
3754: decode(ar_cash_receipts.currency_code, functional_currency, ' ',
3755: decode(ar_cash_receipts.exchange_rate, NULL, '*', ' ')),
3756: ' ')), ' ') unapp_convert
3757: into
3758: l_aging_on_account_profile,
3759: l_aging_conv_on_ac_profile,

Line 3763: ar_cash_receipts

3759: l_aging_conv_on_ac_profile,
3760: l_aging_unapplied_profile,
3761: l_aging_conv_unap_prof
3762: from ar_receivable_applications,
3763: ar_cash_receipts
3764: where ar_receivable_applications.cash_receipt_id =
3765: ar_cash_receipts.cash_receipt_id
3766:
3767: and ar_cash_receipts.pay_from_customer = customer_id

Line 3765: ar_cash_receipts.cash_receipt_id

3761: l_aging_conv_unap_prof
3762: from ar_receivable_applications,
3763: ar_cash_receipts
3764: where ar_receivable_applications.cash_receipt_id =
3765: ar_cash_receipts.cash_receipt_id
3766:
3767: and ar_cash_receipts.pay_from_customer = customer_id
3768: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3769: and ar_cash_receipts.currency_code = currency_credit1

Line 3767: and ar_cash_receipts.pay_from_customer = customer_id

3763: ar_cash_receipts
3764: where ar_receivable_applications.cash_receipt_id =
3765: ar_cash_receipts.cash_receipt_id
3766:
3767: and ar_cash_receipts.pay_from_customer = customer_id
3768: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3769: and ar_cash_receipts.currency_code = currency_credit1
3770: and ar_receivable_applications.gl_date <= sysdate;
3771:

Line 3768: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3764: where ar_receivable_applications.cash_receipt_id =
3765: ar_cash_receipts.cash_receipt_id
3766:
3767: and ar_cash_receipts.pay_from_customer = customer_id
3768: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3769: and ar_cash_receipts.currency_code = currency_credit1
3770: and ar_receivable_applications.gl_date <= sysdate;
3771:
3772:

Line 3769: and ar_cash_receipts.currency_code = currency_credit1

3765: ar_cash_receipts.cash_receipt_id
3766:
3767: and ar_cash_receipts.pay_from_customer = customer_id
3768: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3769: and ar_cash_receipts.currency_code = currency_credit1
3770: and ar_receivable_applications.gl_date <= sysdate;
3771:
3772:
3773: FOR trx_rec IN ps_trx

Line 3794: ar_cash_receipts

3790: 0) unapplied
3791: into l_aging_on_account_profile,
3792: l_aging_unapplied_profile
3793: from ar_receivable_applications,
3794: ar_cash_receipts
3795: where ar_receivable_applications.cash_receipt_id =
3796: ar_cash_receipts.cash_receipt_id
3797: and ar_cash_receipts.pay_from_customer = customer_id
3798: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

Line 3796: ar_cash_receipts.cash_receipt_id

3792: l_aging_unapplied_profile
3793: from ar_receivable_applications,
3794: ar_cash_receipts
3795: where ar_receivable_applications.cash_receipt_id =
3796: ar_cash_receipts.cash_receipt_id
3797: and ar_cash_receipts.pay_from_customer = customer_id
3798: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3799: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3800: and ar_receivable_applications.gl_date <= sysdate;

Line 3797: and ar_cash_receipts.pay_from_customer = customer_id

3793: from ar_receivable_applications,
3794: ar_cash_receipts
3795: where ar_receivable_applications.cash_receipt_id =
3796: ar_cash_receipts.cash_receipt_id
3797: and ar_cash_receipts.pay_from_customer = customer_id
3798: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3799: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3800: and ar_receivable_applications.gl_date <= sysdate;
3801:

Line 3798: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id

3794: ar_cash_receipts
3795: where ar_receivable_applications.cash_receipt_id =
3796: ar_cash_receipts.cash_receipt_id
3797: and ar_cash_receipts.pay_from_customer = customer_id
3798: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3799: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3800: and ar_receivable_applications.gl_date <= sysdate;
3801:
3802: trx_amount := trx_rec.ammount_due - l_aging_unapplied_profile - l_aging_on_account_profile;

Line 3799: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code

3795: where ar_receivable_applications.cash_receipt_id =
3796: ar_cash_receipts.cash_receipt_id
3797: and ar_cash_receipts.pay_from_customer = customer_id
3798: and ar_cash_receipts.CUSTOMER_SITE_USE_ID = site_use_id
3799: and ar_cash_receipts.currency_code = trx_rec.invoice_currency_code
3800: and ar_receivable_applications.gl_date <= sysdate;
3801:
3802: trx_amount := trx_rec.ammount_due - l_aging_unapplied_profile - l_aging_on_account_profile;
3803: