DBA Data[Home] [Help]

APPS.IEX_UTILITIES dependencies on FND_FILE

Line 1715: FND_FILE.PUT_LINE(FND_FILE.LOG,'"Begining of Minimum Dunning Amount check" ');

1711: order by 1;
1712:
1713: Begin
1714: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - "Begining of Minimum Dunning Amount check" ');
1715: FND_FILE.PUT_LINE(FND_FILE.LOG,'"Begining of Minimum Dunning Amount check" ');
1716: l_cust_prof_chk := fnd_profile.value('IEX_DUNNING_CUST_PROF_CHECK');
1717: l_dunning_letters :='Y';
1718: l_cust_account_id :=p_cust_account_id;
1719: l_site_use_id :=p_site_use_id;

Line 1733: FND_FILE.PUT_LINE(FND_FILE.LOG, ' IEX: Minimum Dunning Amount Profile Check is Null, so using dunning level');

1729: /*
1730: If IEX: Minimum Dunning Amount Profile Check is null then Running level is assigned to it.
1731: */
1732: if l_cust_prof_chk is NULL then
1733: FND_FILE.PUT_LINE(FND_FILE.LOG, ' IEX: Minimum Dunning Amount Profile Check is Null, so using dunning level');
1734: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' IEX: Minimum Dunning Amount Profile Check is NULL , so using dunning level');
1735: if l_running_level = 'DELINQUENCY' then
1736: l_cust_prof_chk := 'BILL_TO';
1737: else

Line 1741: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Profile - IEX: Minimum Dunning Amount Profile Check = '||l_cust_prof_chk||' so no minimum dunning amount check will be done');

1737: else
1738: l_cust_prof_chk := l_running_level;
1739: end if;
1740: elsif l_cust_prof_chk = 'NONE' then
1741: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Profile - IEX: Minimum Dunning Amount Profile Check = '||l_cust_prof_chk||' so no minimum dunning amount check will be done');
1742: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Returning value "Y"');
1743: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Profile - IEX: Minimum Dunning Amount Profile Check-->'||l_cust_prof_chk||' so no minimum dunning amount check will be done');
1744: return l_dunning_letters; -- default value is Y
1745: else /* If IEX: Minimum Dunning Amount Profile Check = NONE then letter will be sent without

Line 1742: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Returning value "Y"');

1738: l_cust_prof_chk := l_running_level;
1739: end if;
1740: elsif l_cust_prof_chk = 'NONE' then
1741: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Profile - IEX: Minimum Dunning Amount Profile Check = '||l_cust_prof_chk||' so no minimum dunning amount check will be done');
1742: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Returning value "Y"');
1743: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Profile - IEX: Minimum Dunning Amount Profile Check-->'||l_cust_prof_chk||' so no minimum dunning amount check will be done');
1744: return l_dunning_letters; -- default value is Y
1745: else /* If IEX: Minimum Dunning Amount Profile Check = NONE then letter will be sent without
1746: checking for profile amount */

Line 1747: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Profile - IEX: Minimum Dunning Amount Profile Check= '||l_cust_prof_chk);

1743: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Profile - IEX: Minimum Dunning Amount Profile Check-->'||l_cust_prof_chk||' so no minimum dunning amount check will be done');
1744: return l_dunning_letters; -- default value is Y
1745: else /* If IEX: Minimum Dunning Amount Profile Check = NONE then letter will be sent without
1746: checking for profile amount */
1747: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Profile - IEX: Minimum Dunning Amount Profile Check= '||l_cust_prof_chk);
1748: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Profile - IEX: Minimum Dunning Amount Profile Check -->'||l_cust_prof_chk);
1749: end if;
1750:
1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);

Line 1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);

1747: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Profile - IEX: Minimum Dunning Amount Profile Check= '||l_cust_prof_chk);
1748: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Profile - IEX: Minimum Dunning Amount Profile Check -->'||l_cust_prof_chk);
1749: end if;
1750:
1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);
1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);
1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);

Line 1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);

1748: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Profile - IEX: Minimum Dunning Amount Profile Check -->'||l_cust_prof_chk);
1749: end if;
1750:
1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);
1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);
1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);

Line 1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);

1749: end if;
1750:
1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);
1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);
1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);
1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);

Line 1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);

1750:
1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);
1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);
1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);
1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);
1758: FND_FILE.PUT_LINE(FND_FILE.LOG, 'correspondence date - '||l_correspondence_date);

Line 1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);

1751: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dunning Level - '||l_running_level);
1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);
1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);
1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);
1758: FND_FILE.PUT_LINE(FND_FILE.LOG, 'correspondence date - '||l_correspondence_date);
1759:

Line 1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);

1752: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust account id - '||l_cust_account_id);
1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);
1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);
1758: FND_FILE.PUT_LINE(FND_FILE.LOG, 'correspondence date - '||l_correspondence_date);
1759:
1760: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Dunning Level - '||l_running_level );

Line 1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);

1753: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site use id - '||l_site_use_id);
1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);
1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);
1758: FND_FILE.PUT_LINE(FND_FILE.LOG, 'correspondence date - '||l_correspondence_date);
1759:
1760: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Dunning Level - '||l_running_level );
1761: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - cust account id - '||l_cust_account_id);

Line 1758: FND_FILE.PUT_LINE(FND_FILE.LOG, 'correspondence date - '||l_correspondence_date);

1754: FND_FILE.PUT_LINE(FND_FILE.LOG, 'delinquency id - '||l_delinquency_id);
1755: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org id - '||l_org_id);
1756: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Grace Days - '||l_grace_days);
1757: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Disputed Items - '||l_dun_disputed_items);
1758: FND_FILE.PUT_LINE(FND_FILE.LOG, 'correspondence date - '||l_correspondence_date);
1759:
1760: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Dunning Level - '||l_running_level );
1761: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - cust account id - '||l_cust_account_id);
1762: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - site use id - '|| l_site_use_id);

Line 1773: FND_FILE.PUT_LINE(FND_FILE.LOG, ' When Dunning level is Account, value of profile "IEX: Minimum Dunning Amount Profile Check" can''t be "Bill To" or "Bill To and Account"');

1769: --Checking if Total accounted amount due reamining is <=0
1770: if l_running_level='ACCOUNT' and l_cust_account_id is not null then
1771: if l_cust_prof_chk = 'BILL_TO' or l_cust_prof_chk = 'BILLTOACCOUNT' then
1772: l_dunning_letters := 'E';
1773: FND_FILE.PUT_LINE(FND_FILE.LOG, ' When Dunning level is Account, value of profile "IEX: Minimum Dunning Amount Profile Check" can''t be "Bill To" or "Bill To and Account"');
1774: FND_FILE.PUT_LINE(FND_FILE.LOG, ', Returning value "E"');
1775: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Invalid value for profile IEX: Minimum Dunning Amount Profile Check');
1776: return l_dunning_letters;
1777: else

Line 1774: FND_FILE.PUT_LINE(FND_FILE.LOG, ', Returning value "E"');

1770: if l_running_level='ACCOUNT' and l_cust_account_id is not null then
1771: if l_cust_prof_chk = 'BILL_TO' or l_cust_prof_chk = 'BILLTOACCOUNT' then
1772: l_dunning_letters := 'E';
1773: FND_FILE.PUT_LINE(FND_FILE.LOG, ' When Dunning level is Account, value of profile "IEX: Minimum Dunning Amount Profile Check" can''t be "Bill To" or "Bill To and Account"');
1774: FND_FILE.PUT_LINE(FND_FILE.LOG, ', Returning value "E"');
1775: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Invalid value for profile IEX: Minimum Dunning Amount Profile Check');
1776: return l_dunning_letters;
1777: else
1778: l_acct_total_acctd_amount := acct_total_acctd_amt(l_cust_account_id,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items);

Line 1779: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at Account level= '||l_acct_total_acctd_amount);

1775: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Invalid value for profile IEX: Minimum Dunning Amount Profile Check');
1776: return l_dunning_letters;
1777: else
1778: l_acct_total_acctd_amount := acct_total_acctd_amt(l_cust_account_id,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items);
1779: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at Account level= '||l_acct_total_acctd_amount);
1780: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total accounted amount at Account level -> '||l_acct_total_acctd_amount);
1781: if l_acct_total_acctd_amount<=0 then
1782: l_dunning_letters := 'N';
1783: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');

Line 1783: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');

1779: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at Account level= '||l_acct_total_acctd_amount);
1780: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total accounted amount at Account level -> '||l_acct_total_acctd_amount);
1781: if l_acct_total_acctd_amount<=0 then
1782: l_dunning_letters := 'N';
1783: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');
1784: return l_dunning_letters;
1785: end if;
1786: end if;
1787: elsif l_running_level = 'BILL_TO' and l_site_use_id is not null

Line 1792: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at Billto level= '||l_billto_total_acctd_amount);

1788: or
1789: l_running_level = 'DELINQUENCY' and l_delinquency_id is not null then
1790: if l_cust_prof_chk = 'BILL_TO' or l_cust_prof_chk = 'BILLTOACCOUNT' then
1791: l_billto_total_acctd_amount := billto_total_acctd_amt(l_site_use_id,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items);
1792: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at Billto level= '||l_billto_total_acctd_amount);
1793: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total Accounted Amount at Billto level -> '|| l_billto_total_acctd_amount);
1794: if l_billto_total_acctd_amount <=0 then
1795: l_dunning_letters := 'N';
1796: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');

Line 1796: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');

1792: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at Billto level= '||l_billto_total_acctd_amount);
1793: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total Accounted Amount at Billto level -> '|| l_billto_total_acctd_amount);
1794: if l_billto_total_acctd_amount <=0 then
1795: l_dunning_letters := 'N';
1796: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');
1797: return l_dunning_letters;
1798: end if;
1799: elsif l_cust_prof_chk = 'ACCOUNT' then
1800: l_acct_total_acctd_amount := acct_total_acctd_amt(l_cust_account_id,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items);

Line 1801: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at ACCOUNT level -> '||l_acct_total_acctd_amount);

1797: return l_dunning_letters;
1798: end if;
1799: elsif l_cust_prof_chk = 'ACCOUNT' then
1800: l_acct_total_acctd_amount := acct_total_acctd_amt(l_cust_account_id,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items);
1801: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at ACCOUNT level -> '||l_acct_total_acctd_amount);
1802: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total accounted Amount at Account level -> '|| l_acct_total_acctd_amount);
1803: if l_acct_total_acctd_amount<=0 then
1804: l_dunning_letters := 'N';
1805: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');

Line 1805: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');

1801: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due reamining at ACCOUNT level -> '||l_acct_total_acctd_amount);
1802: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total accounted Amount at Account level -> '|| l_acct_total_acctd_amount);
1803: if l_acct_total_acctd_amount<=0 then
1804: l_dunning_letters := 'N';
1805: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than or equal to zero, so returning value "N"');
1806: return l_dunning_letters;
1807: end if;
1808: end if;
1809: End if;

Line 1813: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is YES');

1809: End if;
1810: -- If IEX: Check Dunning amount at functional currency profile is Yes
1811: l_func_curr_prf_chk := nvl(fnd_profile.value('IEX_CHK_DUNN_AT_FUNC_CURR'), 'Y');
1812: if l_func_curr_prf_chk = 'Y' then
1813: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is YES');
1814: else
1815: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is NO');
1816: end if;
1817:

Line 1815: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is NO');

1811: l_func_curr_prf_chk := nvl(fnd_profile.value('IEX_CHK_DUNN_AT_FUNC_CURR'), 'Y');
1812: if l_func_curr_prf_chk = 'Y' then
1813: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is YES');
1814: else
1815: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is NO');
1816: end if;
1817:
1818: if l_func_curr_prf_chk = 'Y' then
1819: FND_FILE.PUT_LINE(FND_FILE.LOG,'Checking Dunning amount at Functional Currency');

Line 1819: FND_FILE.PUT_LINE(FND_FILE.LOG,'Checking Dunning amount at Functional Currency');

1815: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Profile - IEX: Check Dunning amount at functional currency is NO');
1816: end if;
1817:
1818: if l_func_curr_prf_chk = 'Y' then
1819: FND_FILE.PUT_LINE(FND_FILE.LOG,'Checking Dunning amount at Functional Currency');
1820: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- IEX: Check Dunning amount at functional currency is Yes');
1821: l_amount := 0;
1822: l_invoice_amount := 0;
1823: l_cm_ar_total_amount := 0;

Line 1831: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount at Account level= '||l_min_dun_amount);

1827: l_min_dun_amount := x_min_dun_amount;
1828: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1829: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Minimum Dunning amount at Account level -> '||l_min_dun_amount);
1830: if l_min_dun_amount IS NOT NULL then
1831: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount at Account level= '||l_min_dun_amount);
1832: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1833: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items,
1834: l_min_currency_code , l_min_dun_amount,l_min_dun_invoice_amount);
1835: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due remaining at Account level= '||l_amount);

Line 1832: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);

1828: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1829: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Minimum Dunning amount at Account level -> '||l_min_dun_amount);
1830: if l_min_dun_amount IS NOT NULL then
1831: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount at Account level= '||l_min_dun_amount);
1832: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1833: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items,
1834: l_min_currency_code , l_min_dun_amount,l_min_dun_invoice_amount);
1835: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due remaining at Account level= '||l_amount);
1836: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total amount due remaining at Account level -> '||l_amount);

Line 1835: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due remaining at Account level= '||l_amount);

1831: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount at Account level= '||l_min_dun_amount);
1832: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1833: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days,l_dun_disputed_items,
1834: l_min_currency_code , l_min_dun_amount,l_min_dun_invoice_amount);
1835: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due remaining at Account level= '||l_amount);
1836: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total amount due remaining at Account level -> '||l_amount);
1837: if (l_amount < l_min_dun_amount)then
1838: l_dunning_letters := 'N';
1839: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

Line 1839: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

1835: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due remaining at Account level= '||l_amount);
1836: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total amount due remaining at Account level -> '||l_amount);
1837: if (l_amount < l_min_dun_amount)then
1838: l_dunning_letters := 'N';
1839: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1840: return l_dunning_letters;
1841: else
1842: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum Dunning amount, so letter will be sent');
1843: end if;

Line 1842: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum Dunning amount, so letter will be sent');

1838: l_dunning_letters := 'N';
1839: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1840: return l_dunning_letters;
1841: else
1842: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum Dunning amount, so letter will be sent');
1843: end if;
1844: else
1845: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exists at Account level so send Dunning letter');
1846: end if;

Line 1845: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exists at Account level so send Dunning letter');

1841: else
1842: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum Dunning amount, so letter will be sent');
1843: end if;
1844: else
1845: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exists at Account level so send Dunning letter');
1846: end if;
1847:
1848: elsif (l_running_level = 'BILL_TO' and l_site_use_id is not null)
1849: or

Line 1858: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);

1854: l_min_dun_amount := x_min_dun_amount;
1855: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1856: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Minimum dunning amount at Billto level -> '||l_min_dun_amount);
1857: If l_min_dun_amount is not null then
1858: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);
1859: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);
1860: l_amount:= amount_billto(l_site_use_id, l_org_id, l_correspondence_date,l_grace_days, l_dun_disputed_items, l_min_currency_code
1861: , l_min_dun_amount,l_min_dun_invoice_amount);
1862: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);

Line 1859: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);

1855: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1856: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Minimum dunning amount at Billto level -> '||l_min_dun_amount);
1857: If l_min_dun_amount is not null then
1858: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);
1859: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);
1860: l_amount:= amount_billto(l_site_use_id, l_org_id, l_correspondence_date,l_grace_days, l_dun_disputed_items, l_min_currency_code
1861: , l_min_dun_amount,l_min_dun_invoice_amount);
1862: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);
1863: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total amount due remaining at Billto level -> '||l_amount);

Line 1862: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);

1858: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);
1859: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);
1860: l_amount:= amount_billto(l_site_use_id, l_org_id, l_correspondence_date,l_grace_days, l_dun_disputed_items, l_min_currency_code
1861: , l_min_dun_amount,l_min_dun_invoice_amount);
1862: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);
1863: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total amount due remaining at Billto level -> '||l_amount);
1864: if (l_amount < l_min_dun_amount) then
1865: l_dunning_letters := 'N';
1866: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

Line 1866: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

1862: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);
1863: WriteLog(G_PKG_NAME || ' ' || l_api_name || '- Total amount due remaining at Billto level -> '||l_amount);
1864: if (l_amount < l_min_dun_amount) then
1865: l_dunning_letters := 'N';
1866: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1867: return l_dunning_letters;
1868: else
1869: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1870: end if;

Line 1869: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');

1865: l_dunning_letters := 'N';
1866: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1867: return l_dunning_letters;
1868: else
1869: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1870: end if;
1871: else
1872: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount does not exists at Billto level so send Dunning letter');
1873: End if;

Line 1872: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount does not exists at Billto level so send Dunning letter');

1868: else
1869: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1870: end if;
1871: else
1872: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount does not exists at Billto level so send Dunning letter');
1873: End if;
1874:
1875: elsif l_cust_prof_chk = 'BILLTOACCOUNT' then
1876: billto_prf_amt(l_site_use_id,l_org_id, x_min_currency_code, x_min_dun_amount, x_min_dun_invoice_amount);

Line 1882: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);

1878: l_min_dun_amount := x_min_dun_amount;
1879: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1880: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Billto level -> '||l_min_dun_amount);
1881: If l_min_dun_amount is not null then
1882: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);
1883: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);
1884: l_amount:= amount_billto(l_site_use_id, l_org_id, l_correspondence_date
1885: ,l_grace_days, l_dun_disputed_items, l_min_currency_code, l_min_dun_amount
1886: ,l_min_dun_invoice_amount);

Line 1883: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);

1879: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1880: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Billto level -> '||l_min_dun_amount);
1881: If l_min_dun_amount is not null then
1882: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Billto level = '||l_min_dun_amount);
1883: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);
1884: l_amount:= amount_billto(l_site_use_id, l_org_id, l_correspondence_date
1885: ,l_grace_days, l_dun_disputed_items, l_min_currency_code, l_min_dun_amount
1886: ,l_min_dun_invoice_amount);
1887: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);

Line 1887: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);

1883: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Billto level= '||l_min_dun_invoice_amount);
1884: l_amount:= amount_billto(l_site_use_id, l_org_id, l_correspondence_date
1885: ,l_grace_days, l_dun_disputed_items, l_min_currency_code, l_min_dun_amount
1886: ,l_min_dun_invoice_amount);
1887: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);
1888: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Billto level -> '||l_amount);
1889: if (l_amount < l_min_dun_amount) then
1890: l_dunning_letters := 'N';
1891: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

Line 1891: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

1887: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Billto level= '||l_amount);
1888: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Billto level -> '||l_amount);
1889: if (l_amount < l_min_dun_amount) then
1890: l_dunning_letters := 'N';
1891: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1892: return l_dunning_letters;
1893: else
1894: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1895: end if;

Line 1894: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');

1890: l_dunning_letters := 'N';
1891: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1892: return l_dunning_letters;
1893: else
1894: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1895: end if;
1896: else -- If profile amount doesnt exists at billto level check for account level
1897: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount does not exists at Billto level, so check at Account level');
1898: acct_prf_amt(l_cust_account_id,l_org_id, x_min_currency_code, x_min_dun_amount,x_min_dun_invoice_amount);

Line 1897: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount does not exists at Billto level, so check at Account level');

1893: else
1894: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1895: end if;
1896: else -- If profile amount doesnt exists at billto level check for account level
1897: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount does not exists at Billto level, so check at Account level');
1898: acct_prf_amt(l_cust_account_id,l_org_id, x_min_currency_code, x_min_dun_amount,x_min_dun_invoice_amount);
1899: l_min_currency_code := x_min_currency_code;
1900: l_min_dun_amount := x_min_dun_amount;
1901: l_min_dun_invoice_amount := x_min_dun_invoice_amount;

Line 1904: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);

1900: l_min_dun_amount := x_min_dun_amount;
1901: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1902: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Account level -> '||l_min_dun_amount);
1903: if l_min_dun_amount IS NOT NULL then
1904: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);
1905: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1906: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items
1907: , l_min_currency_code, l_min_dun_amount, l_min_dun_invoice_amount);
1908: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);

Line 1905: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);

1901: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1902: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Account level -> '||l_min_dun_amount);
1903: if l_min_dun_amount IS NOT NULL then
1904: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);
1905: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1906: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items
1907: , l_min_currency_code, l_min_dun_amount, l_min_dun_invoice_amount);
1908: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);
1909: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Account level -> '||l_amount);

Line 1908: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);

1904: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);
1905: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1906: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items
1907: , l_min_currency_code, l_min_dun_amount, l_min_dun_invoice_amount);
1908: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);
1909: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Account level -> '||l_amount);
1910: if (l_amount < l_min_dun_amount) then
1911: l_dunning_letters := 'N';
1912: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

Line 1912: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

1908: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);
1909: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Account level -> '||l_amount);
1910: if (l_amount < l_min_dun_amount) then
1911: l_dunning_letters := 'N';
1912: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1913: return l_dunning_letters;
1914: else
1915: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1916: end if;

Line 1915: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');

1911: l_dunning_letters := 'N';
1912: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1913: return l_dunning_letters;
1914: else
1915: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1916: end if;
1917: else
1918: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning profile amount does not exist at Account level so send Dunning letter');
1919: end if;

Line 1918: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning profile amount does not exist at Account level so send Dunning letter');

1914: else
1915: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1916: end if;
1917: else
1918: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning profile amount does not exist at Account level so send Dunning letter');
1919: end if;
1920: End if;
1921: elsif l_cust_prof_chk = 'ACCOUNT' then
1922: acct_prf_amt(l_cust_account_id,l_org_id, x_min_currency_code, x_min_dun_amount,x_min_dun_invoice_amount);

Line 1928: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);

1924: l_min_dun_amount := x_min_dun_amount;
1925: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1926: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Account level -> '||l_min_dun_amount);
1927: if l_min_dun_amount IS NOT NULL then
1928: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);
1929: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1930: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items
1931: , l_min_currency_code, l_min_dun_amount, l_min_dun_invoice_amount);
1932: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);

Line 1929: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);

1925: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1926: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Account level -> '||l_min_dun_amount);
1927: if l_min_dun_amount IS NOT NULL then
1928: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);
1929: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1930: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items
1931: , l_min_currency_code, l_min_dun_amount, l_min_dun_invoice_amount);
1932: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);
1933: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Account level -> '||l_amount);

Line 1932: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);

1928: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning amount at Account level = '||l_min_dun_amount);
1929: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning Invoice amount at Account level= '||l_min_dun_invoice_amount);
1930: l_amount:= amount_account(l_cust_account_id ,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items
1931: , l_min_currency_code, l_min_dun_amount, l_min_dun_invoice_amount);
1932: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total amount due remaining at Account level= '||l_amount);
1933: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Account level -> '||l_amount);
1934: if (l_amount < l_min_dun_amount) then
1935: l_dunning_letters := 'N';
1936: return l_dunning_letters;

Line 1937: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');

1933: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total amount due remaining at Account level -> '||l_amount);
1934: if (l_amount < l_min_dun_amount) then
1935: l_dunning_letters := 'N';
1936: return l_dunning_letters;
1937: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1938: else
1939: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1940: end if;
1941: else

Line 1939: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');

1935: l_dunning_letters := 'N';
1936: return l_dunning_letters;
1937: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is less than Minimum dunning amount, so returning value "N"');
1938: else
1939: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1940: end if;
1941: else
1942: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning profile amount does not exist at Account level so send Dunning letter');
1943: end if;

Line 1942: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning profile amount does not exist at Account level so send Dunning letter');

1938: else
1939: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total amount due is greater than Minimum dunning amount, so letter will be sent');
1940: end if;
1941: else
1942: FND_FILE.PUT_LINE(FND_FILE.LOG,'Minimum dunning profile amount does not exist at Account level so send Dunning letter');
1943: end if;
1944: end if; -- end of l_cust_prof_chk
1945: end if; -- end if of if p_running_level='ACCOUNT' and l_cust_account_id is not null then
1946: ELSE

Line 1949: FND_FILE.PUT_LINE(FND_FILE.LOG,'Checking Dunning amount for distinct invoice currencies');

1945: end if; -- end if of if p_running_level='ACCOUNT' and l_cust_account_id is not null then
1946: ELSE
1947: -- if IEX: Check Dunning amount at functional currency is NO
1948: -- follwing Code for distinct invoice currency codes will be executed
1949: FND_FILE.PUT_LINE(FND_FILE.LOG,'Checking Dunning amount for distinct invoice currencies');
1950: if l_running_level='ACCOUNT' and l_cust_account_id is not null then
1951: open c_acc_dist_inv_cur (l_cust_account_id,l_org_id);
1952: loop
1953: fetch c_acc_dist_inv_cur into l_invoice_currency_code;

Line 1957: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Checking Minimum Dunning amount at Account level for Invoice Currency code '||l_invoice_currency_code);

1953: fetch c_acc_dist_inv_cur into l_invoice_currency_code;
1954: if c_acc_dist_inv_cur%notfound then
1955: exit;
1956: end if;
1957: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Checking Minimum Dunning amount at Account level for Invoice Currency code '||l_invoice_currency_code);
1958: acc_min_dunn_amt (l_cust_account_id,l_invoice_currency_code,x_min_dun_amount,x_min_dun_invoice_amount);
1959: l_min_dun_amount := x_min_dun_amount;
1960: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
1961:

Line 1967: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '||l_min_dun_amount);

1963: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Dunning amount at Account level for Invoice Currency Code-> '||l_invoice_currency_code);
1964: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Account level -> '||l_min_dun_amount);
1965: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Invoice amount at Account level -> '||l_min_dun_invoice_amount);
1966:
1967: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '||l_min_dun_amount);
1968: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Invoice amount= '||l_min_dun_invoice_amount);
1969:
1970: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
1971: , l_min_dun_invoice_amount, l_org_id, l_correspondence_date,l_grace_days, l_dun_disputed_items);

Line 1968: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Invoice amount= '||l_min_dun_invoice_amount);

1964: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Account level -> '||l_min_dun_amount);
1965: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Invoice amount at Account level -> '||l_min_dun_invoice_amount);
1966:
1967: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '||l_min_dun_amount);
1968: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Invoice amount= '||l_min_dun_invoice_amount);
1969:
1970: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
1971: , l_min_dun_invoice_amount, l_org_id, l_correspondence_date,l_grace_days, l_dun_disputed_items);
1972: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining at Account level -> '||l_acc_tot_amt_due_rem);

Line 1973: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due Remaining at Account level= '||l_acc_tot_amt_due_rem);

1969:
1970: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
1971: , l_min_dun_invoice_amount, l_org_id, l_correspondence_date,l_grace_days, l_dun_disputed_items);
1972: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining at Account level -> '||l_acc_tot_amt_due_rem);
1973: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due Remaining at Account level= '||l_acc_tot_amt_due_rem);
1974: if l_acc_tot_amt_due_rem < l_min_dun_amount then
1975: l_dunning_letters := 'N';
1976: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');
1977: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining < Minimum Dunning Amount, so cant send dunning letters');

Line 1976: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');

1972: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining at Account level -> '||l_acc_tot_amt_due_rem);
1973: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due Remaining at Account level= '||l_acc_tot_amt_due_rem);
1974: if l_acc_tot_amt_due_rem < l_min_dun_amount then
1975: l_dunning_letters := 'N';
1976: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');
1977: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining < Minimum Dunning Amount, so cant send dunning letters');
1978: return l_dunning_letters;
1979: else
1980: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is greater than Minimum Dunning Amount, so letter will be sent');

Line 1980: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is greater than Minimum Dunning Amount, so letter will be sent');

1976: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');
1977: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining < Minimum Dunning Amount, so cant send dunning letters');
1978: return l_dunning_letters;
1979: else
1980: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is greater than Minimum Dunning Amount, so letter will be sent');
1981: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
1982: end if;
1983: else
1984: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);

Line 1984: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);

1980: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is greater than Minimum Dunning Amount, so letter will be sent');
1981: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
1982: end if;
1983: else
1984: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);
1985: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning profile amount does not exist at Account level ');
1986: end if;
1987: end loop;
1988: close c_acc_dist_inv_cur;

Line 1999: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Checking Minimum Dunning amount at Billto level for Invoice Currency code '||l_invoice_currency_code);

1995: fetch c_billto_dist_inv_cur into l_invoice_currency_code;
1996: if c_billto_dist_inv_cur%notfound then
1997: exit;
1998: end if;
1999: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Checking Minimum Dunning amount at Billto level for Invoice Currency code '||l_invoice_currency_code);
2000: t_site_use_id := get_BR_BillTOID(l_site_use_id);
2001: billto_min_dunn_amt (p_site_use_id, l_invoice_currency_code, x_min_dun_amount, x_min_dun_invoice_amount);
2002: l_min_dun_amount := x_min_dun_amount;
2003: l_min_dun_invoice_amount := x_min_dun_invoice_amount;

Line 2010: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum dunning amount = '|| l_min_dun_amount);

2006: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Invoice Currency Code -> '|| l_invoice_currency_code);
2007: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Billto level -> '|| l_min_dun_amount);
2008: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning invoice amount at Billto level -> '|| l_min_dun_invoice_amount);
2009:
2010: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum dunning amount = '|| l_min_dun_amount);
2011: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum dunning invoice amount = '|| l_min_dun_invoice_amount);
2012:
2013: l_billto_tot_amt_due_rem := billto_tot_amt_due_rem(l_site_use_id, l_invoice_currency_code,
2014: l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);

Line 2011: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum dunning invoice amount = '|| l_min_dun_invoice_amount);

2007: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning amount at Billto level -> '|| l_min_dun_amount);
2008: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum dunning invoice amount at Billto level -> '|| l_min_dun_invoice_amount);
2009:
2010: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum dunning amount = '|| l_min_dun_amount);
2011: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum dunning invoice amount = '|| l_min_dun_invoice_amount);
2012:
2013: l_billto_tot_amt_due_rem := billto_tot_amt_due_rem(l_site_use_id, l_invoice_currency_code,
2014: l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2015:

Line 2016: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);

2012:
2013: l_billto_tot_amt_due_rem := billto_tot_amt_due_rem(l_site_use_id, l_invoice_currency_code,
2014: l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2015:
2016: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);
2017: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining at Billto level -> '||l_billto_tot_amt_due_rem);
2018: if l_billto_tot_amt_due_rem < l_min_dun_amount then
2019: l_dunning_letters := 'N';
2020: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');

Line 2020: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');

2016: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);
2017: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining at Billto level -> '||l_billto_tot_amt_due_rem);
2018: if l_billto_tot_amt_due_rem < l_min_dun_amount then
2019: l_dunning_letters := 'N';
2020: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');
2021: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - '||' Total Amount due remaining < Minimum dunning amount');
2022: return l_dunning_letters;
2023: else
2024: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

Line 2024: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

2020: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount Due is less than Minimum Dunning Amount, so returning value "N"');
2021: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - '||' Total Amount due remaining < Minimum dunning amount');
2022: return l_dunning_letters;
2023: else
2024: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2025: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2026: end if;
2027: else
2028: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Billto level for Invoice currency code '||l_invoice_currency_code);

Line 2028: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Billto level for Invoice currency code '||l_invoice_currency_code);

2024: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2025: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2026: end if;
2027: else
2028: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Billto level for Invoice currency code '||l_invoice_currency_code);
2029: WriteLog(G_PKG_NAME || ' ' || l_api_name ||' - '||'Minimum Dunning profile amount does not exist at Billto level ');
2030: end if;
2031: end loop;
2032: close c_billto_dist_inv_cur;

Line 2040: FND_FILE.PUT_LINE(FND_FILE.LOG,' Checking Minimum Dunning amount at Billto level for Invoice Currency code '||l_invoice_currency_code);

2036: fetch c_billto_dist_inv_cur into l_invoice_currency_code;
2037: if c_billto_dist_inv_cur%notfound then
2038: exit;
2039: end if;
2040: FND_FILE.PUT_LINE(FND_FILE.LOG,' Checking Minimum Dunning amount at Billto level for Invoice Currency code '||l_invoice_currency_code);
2041: t_site_use_id := get_BR_BillTOID(l_site_use_id);
2042: billto_min_dunn_amt (l_site_use_id, l_invoice_currency_code, x_min_dun_amount, x_min_dun_invoice_amount);
2043: l_min_dun_amount := x_min_dun_amount;
2044: l_min_dun_invoice_amount := x_min_dun_invoice_amount;

Line 2051: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning amount = '|| l_min_dun_amount);

2047: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Invoice Currency Code -> '|| l_invoice_currency_code);
2048: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Billto level -> '||l_min_dun_amount);
2049: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Invoice Amount at Billto level -> '||l_min_dun_invoice_amount);
2050:
2051: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning amount = '|| l_min_dun_amount);
2052: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning invoice amount= '|| l_min_dun_invoice_amount);
2053: l_prf_amt_chk := 'Y';
2054: l_billto_tot_amt_due_rem := billto_tot_amt_due_rem(l_site_use_id, l_invoice_currency_code,
2055: l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);

Line 2052: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning invoice amount= '|| l_min_dun_invoice_amount);

2048: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Billto level -> '||l_min_dun_amount);
2049: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Invoice Amount at Billto level -> '||l_min_dun_invoice_amount);
2050:
2051: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning amount = '|| l_min_dun_amount);
2052: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning invoice amount= '|| l_min_dun_invoice_amount);
2053: l_prf_amt_chk := 'Y';
2054: l_billto_tot_amt_due_rem := billto_tot_amt_due_rem(l_site_use_id, l_invoice_currency_code,
2055: l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);

Line 2056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);

2052: FND_FILE.PUT_LINE(FND_FILE.LOG,' Minimum dunning invoice amount= '|| l_min_dun_invoice_amount);
2053: l_prf_amt_chk := 'Y';
2054: l_billto_tot_amt_due_rem := billto_tot_amt_due_rem(l_site_use_id, l_invoice_currency_code,
2055: l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);
2057: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining at Billto level -> '||l_billto_tot_amt_due_rem);
2058: if l_billto_tot_amt_due_rem < l_min_dun_amount then
2059: l_dunning_letters := 'N';
2060: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');

Line 2060: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');

2056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Billto level= '||l_billto_tot_amt_due_rem);
2057: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining at Billto level -> '||l_billto_tot_amt_due_rem);
2058: if l_billto_tot_amt_due_rem < l_min_dun_amount then
2059: l_dunning_letters := 'N';
2060: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2061: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Total Amount due remaining < Minimum Dunning Amount, so cant send dunning letters');
2062: return l_dunning_letters;
2063: else
2064: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

Line 2064: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

2060: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2061: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Total Amount due remaining < Minimum Dunning Amount, so cant send dunning letters');
2062: return l_dunning_letters;
2063: else
2064: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2065: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2066: end if;
2067: else
2068: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Billto level for Invoice currency code '||l_invoice_currency_code);

Line 2068: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Billto level for Invoice currency code '||l_invoice_currency_code);

2064: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2065: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2066: end if;
2067: else
2068: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Billto level for Invoice currency code '||l_invoice_currency_code);
2069: WriteLog(G_PKG_NAME || ' ' || l_api_name ||'Minimum Dunning Profile amount doesnt exist at Billto level ');
2070: end if;
2071: end loop;
2072: If l_prf_amt_chk = 'Y' and l_dunning_letters = 'Y' then

Line 2077: FND_FILE.PUT_LINE(FND_FILE.LOG,'Hence Check Minimum Dunning Profile amount at Account level');

2073: return l_dunning_letters;
2074: elsif l_prf_amt_chk = 'Y' and l_dunning_letters = 'N' then
2075: return l_dunning_letters;
2076: else --check at account level if profile amts doesn't exist for all the currencies at billto level
2077: FND_FILE.PUT_LINE(FND_FILE.LOG,'Hence Check Minimum Dunning Profile amount at Account level');
2078: open c_acc_dist_inv_cur (l_cust_account_id, l_org_id);
2079: loop
2080: fetch c_acc_dist_inv_cur into l_invoice_currency_code;
2081: if c_acc_dist_inv_cur%notfound then

Line 2084: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Checking Minimum Dunning amount at Account level for Invoice Currency code '||l_invoice_currency_code);

2080: fetch c_acc_dist_inv_cur into l_invoice_currency_code;
2081: if c_acc_dist_inv_cur%notfound then
2082: exit;
2083: end if;
2084: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Checking Minimum Dunning amount at Account level for Invoice Currency code '||l_invoice_currency_code);
2085: acc_min_dunn_amt (l_cust_account_id,l_invoice_currency_code,x_min_dun_amount,x_min_dun_invoice_amount);
2086: l_min_dun_amount := x_min_dun_amount;
2087: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
2088:

Line 2094: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '|| l_min_dun_amount);

2090: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Invoice Currency Code -> '|| l_invoice_currency_code);
2091: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Account level -> '||l_min_dun_amount);
2092: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning invoice amount at Account level -> '||l_min_dun_invoice_amount);
2093:
2094: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '|| l_min_dun_amount);
2095: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);
2096: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
2097: , l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2098: WriteLog(G_PKG_NAME || ' ' || l_api_name ||' - Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);

Line 2095: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);

2091: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Account level -> '||l_min_dun_amount);
2092: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning invoice amount at Account level -> '||l_min_dun_invoice_amount);
2093:
2094: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '|| l_min_dun_amount);
2095: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);
2096: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
2097: , l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2098: WriteLog(G_PKG_NAME || ' ' || l_api_name ||' - Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);
2099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);

Line 2099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);

2095: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);
2096: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
2097: , l_min_dun_invoice_amount,l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2098: WriteLog(G_PKG_NAME || ' ' || l_api_name ||' - Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);
2099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);
2100:
2101: if l_acc_tot_amt_due_rem < l_min_dun_amount then
2102: l_dunning_letters := 'N';
2103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');

Line 2103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');

2099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);
2100:
2101: if l_acc_tot_amt_due_rem < l_min_dun_amount then
2102: l_dunning_letters := 'N';
2103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2104: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Total Amount due remaining < Minimum Dunning Amount,so cant send dunning letters');
2105: return l_dunning_letters;
2106: else
2107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

Line 2107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

2103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2104: WriteLog(G_PKG_NAME || ' ' || l_api_name || 'Total Amount due remaining < Minimum Dunning Amount,so cant send dunning letters');
2105: return l_dunning_letters;
2106: else
2107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2108: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2109: end if;
2110: else
2111: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);

Line 2111: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);

2107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2108: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2109: end if;
2110: else
2111: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);
2112: WriteLog(G_PKG_NAME || ' ' || l_api_name ||'Minimum Dunning Profile amount doesnt exist at Account level ');
2113: end if;
2114: end loop;
2115: close c_acc_dist_inv_cur;

Line 2124: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Dunning amount at Account level for Invoice Currency code '||l_invoice_currency_code);

2120: fetch c_acc_dist_inv_cur into l_invoice_currency_code;
2121: if c_acc_dist_inv_cur%notfound then
2122: exit;
2123: end if;
2124: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Dunning amount at Account level for Invoice Currency code '||l_invoice_currency_code);
2125: acc_min_dunn_amt (l_cust_account_id,l_invoice_currency_code,x_min_dun_amount,x_min_dun_invoice_amount);
2126: l_min_dun_amount := x_min_dun_amount;
2127: l_min_dun_invoice_amount := x_min_dun_invoice_amount;
2128:

Line 2134: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '|| l_min_dun_amount);

2130: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Invoice Currency Code -> '|| l_invoice_currency_code);
2131: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Account level -> '||l_min_dun_amount);
2132: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning invoice amount at Account level -> '||l_min_dun_invoice_amount);
2133:
2134: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '|| l_min_dun_amount);
2135: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);
2136: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
2137: , l_min_dun_invoice_amount, l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2138: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - '||'Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);

Line 2135: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);

2131: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning Amount at Account level -> '||l_min_dun_amount);
2132: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Minimum Dunning invoice amount at Account level -> '||l_min_dun_invoice_amount);
2133:
2134: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning Amount = '|| l_min_dun_amount);
2135: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);
2136: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
2137: , l_min_dun_invoice_amount, l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2138: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - '||'Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);
2139: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);

Line 2139: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);

2135: FND_FILE.PUT_LINE(FND_FILE.LOG, ' Minimum Dunning invoice amount= '|| l_min_dun_invoice_amount);
2136: l_acc_tot_amt_due_rem := acc_tot_amt_due_rem(l_cust_account_id, l_invoice_currency_code
2137: , l_min_dun_invoice_amount, l_org_id,l_correspondence_date,l_grace_days, l_dun_disputed_items);
2138: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - '||'Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);
2139: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);
2140: if l_acc_tot_amt_due_rem < l_min_dun_amount then
2141: l_dunning_letters := 'N';
2142: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2143: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining < Minimum dunning amount, so cant send dunning letters');

Line 2142: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');

2138: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - '||'Total Amount due remaining at Account level -> '||l_acc_tot_amt_due_rem);
2139: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Amount due remaining at Account level= '||l_acc_tot_amt_due_rem);
2140: if l_acc_tot_amt_due_rem < l_min_dun_amount then
2141: l_dunning_letters := 'N';
2142: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2143: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining < Minimum dunning amount, so cant send dunning letters');
2144: return l_dunning_letters;
2145: else
2146: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

Line 2146: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');

2142: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is less than Minimum Dunning Amount, so returning value is "N"');
2143: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount due remaining < Minimum dunning amount, so cant send dunning letters');
2144: return l_dunning_letters;
2145: else
2146: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2147: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2148: end if;
2149: else
2150: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);

Line 2150: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);

2146: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Amount due is greater than Minimum Dunning Amount, so letter will be sent');
2147: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - Total Amount Due Remaining > Minimum Dunning Amount');
2148: end if;
2149: else
2150: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Minimum Dunning amount does not exist at Account level for Invoice currency code '||l_invoice_currency_code);
2151: WriteLog(G_PKG_NAME || ' ' || l_api_name ||'Minimum Dunning Profile amount doesnt exist at Account level ');
2152: end if;
2153: end loop;
2154: close c_acc_dist_inv_cur;

Line 2159: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning value= '||l_dunning_letters);

2155: End if; ---end if of if l_cust_prof_chk = 'BILL_TO' then
2156: End if; -- end if of if l_running_level='ACCOUNT' and l_cust_account_id is not null then
2157: END if; --end if of if l_check_dunn_profile = 'Y' then
2158: IF l_dunning_letters = 'Y' then
2159: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning value= '||l_dunning_letters);
2160: END IF;
2161: return l_dunning_letters;
2162: Exception
2163: when others then

Line 2166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2162: Exception
2163: when others then
2164: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE -> '||SQLCODE);
2165: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM -> '||SQLERRM);
2166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2168: End DunningMinAmountCheck;
2169: /*
2170: Total accounted amount due remaining at Account level

Line 2167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2163: when others then
2164: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE -> '||SQLCODE);
2165: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM -> '||SQLERRM);
2166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2168: End DunningMinAmountCheck;
2169: /*
2170: Total accounted amount due remaining at Account level
2171: - Called to check total amt due >= 0*/

Line 2232: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2228: Exception
2229: when others then
2230: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2231: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2232: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2233: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2234: End acct_total_acctd_amt;
2235:
2236: /*

Line 2233: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2229: when others then
2230: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2231: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2232: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2233: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2234: End acct_total_acctd_amt;
2235:
2236: /*
2237: Total accounted amount due remaining at billto level

Line 2289: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2285: Exception
2286: when others then
2287: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2288: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2289: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2290: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2291: End billto_total_acctd_amt;
2292:
2293: /* To get Minimum dunning amount and Minimum dunning invoice amount at account level*/

Line 2290: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2286: when others then
2287: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2288: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2289: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2290: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2291: End billto_total_acctd_amt;
2292:
2293: /* To get Minimum dunning amount and Minimum dunning invoice amount at account level*/
2294: Procedure acct_prf_amt(p_cust_account_id in number

Line 2326: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2322: Exception
2323: when others then
2324: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE -> '||SQLCODE);
2325: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM -> '||SQLERRM);
2326: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2327: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2328: End acct_prf_amt;
2329:
2330: /* To get Minimum dunning amount and Minimum dunning invoice amount at Billto level*/

Line 2327: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2323: when others then
2324: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE -> '||SQLCODE);
2325: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM -> '||SQLERRM);
2326: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2327: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2328: End acct_prf_amt;
2329:
2330: /* To get Minimum dunning amount and Minimum dunning invoice amount at Billto level*/
2331: Procedure billto_prf_amt(p_site_use_id in number

Line 2361: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2357: Exception
2358: when others then
2359: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2360: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2361: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2362: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2363: end billto_prf_amt;
2364:
2365: /* Minimum dunning amount and Minimum dunning invoice amount at account level

Line 2362: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2358: when others then
2359: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2360: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2361: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2362: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2363: end billto_prf_amt;
2364:
2365: /* Minimum dunning amount and Minimum dunning invoice amount at account level
2366: for specific currency*/

Line 2392: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2388: Exception
2389: when others then
2390: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2391: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2392: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2393: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2394: End acc_min_dunn_amt;
2395:
2396: /* Total amount due remaining in functional currency at account level */

Line 2393: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2389: when others then
2390: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2391: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2392: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2393: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2394: End acc_min_dunn_amt;
2395:
2396: /* Total amount due remaining in functional currency at account level */
2397: Function acc_tot_amt_due_rem(p_cust_account_id number, p_invoice_currency_code varchar2 -- for 3rd case

Line 2448: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount = '||l_tot_amt_due_rem);

2444: end if;
2445: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
2446: end loop;
2447: close c_cm_ar_amount_account_curr;
2448: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount = '||l_tot_amt_due_rem);
2449: FND_FILE.PUT_LINE(FND_FILE.LOG,'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);
2450:
2451: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
2452: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)

Line 2449: FND_FILE.PUT_LINE(FND_FILE.LOG,'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);

2445: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
2446: end loop;
2447: close c_cm_ar_amount_account_curr;
2448: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount = '||l_tot_amt_due_rem);
2449: FND_FILE.PUT_LINE(FND_FILE.LOG,'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);
2450:
2451: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
2452: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
2453:

Line 2459: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2455: Exception
2456: when others then
2457: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2458: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2459: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2460: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2461: End acc_tot_amt_due_rem;
2462:
2463: /* Minimum dunning amount and Minimum dunning invoice amount at billto level

Line 2460: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2456: when others then
2457: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2458: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2459: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2460: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2461: End acc_tot_amt_due_rem;
2462:
2463: /* Minimum dunning amount and Minimum dunning invoice amount at billto level
2464: for specific currency*/

Line 2490: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2486: Exception
2487: when others then
2488: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2489: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2490: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2491: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2492: end billto_min_dunn_amt;
2493:
2494: /* Total amount due remaining in functional currency at billto level */

Line 2491: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2487: when others then
2488: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2489: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2490: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2491: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2492: end billto_min_dunn_amt;
2493:
2494: /* Total amount due remaining in functional currency at billto level */
2495: Function billto_tot_amt_due_rem (p_site_use_id number, p_invoice_currency_code varchar2 --for 3rd case

Line 2547: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount= '||l_tot_amt_due_rem);

2543: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
2544: end loop;
2545: close c_cm_ar_amount_billto_curr;
2546:
2547: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount= '||l_tot_amt_due_rem);
2548: FND_FILE.PUT_LINE(FND_FILE.LOG,'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);
2549: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
2550: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
2551:

Line 2548: FND_FILE.PUT_LINE(FND_FILE.LOG,'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);

2544: end loop;
2545: close c_cm_ar_amount_billto_curr;
2546:
2547: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount= '||l_tot_amt_due_rem);
2548: FND_FILE.PUT_LINE(FND_FILE.LOG,'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);
2549: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
2550: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
2551:
2552: Return l_tot_amt_due_rem;

Line 2557: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2553: Exception
2554: when others then
2555: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2556: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2557: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2558: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2559: End billto_tot_amt_due_rem;
2560:
2561: Function amount_account(p_cust_account_id in number, p_org_id in number,p_correspondence_date date

Line 2558: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2554: when others then
2555: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2556: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2557: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2558: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2559: End billto_tot_amt_due_rem;
2560:
2561: Function amount_account(p_cust_account_id in number, p_org_id in number,p_correspondence_date date
2562: , p_grace_days in number, p_dun_disputed_items in varchar2, p_min_currency_code in varchar2

Line 2599: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Collections Rate Type = '||l_rate_type);

2595: l_cm_ar_currency_code varchar2(15);
2596: l_rate_type varchar2(100);
2597: Begin
2598: l_rate_type := nvl(fnd_profile.value('IEX_COLLECTIONS_RATE_TYPE'), 'Corporate');
2599: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Collections Rate Type = '||l_rate_type);
2600: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Functional Currency code= '||p_min_currency_code);
2601: open c_amount_account(p_cust_account_id,p_org_id, p_correspondence_date, p_grace_days, p_dun_disputed_items);
2602: loop
2603: fetch c_amount_account into l_amount_due_remaining, l_invoice_currency_code, l_class;

Line 2600: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Functional Currency code= '||p_min_currency_code);

2596: l_rate_type varchar2(100);
2597: Begin
2598: l_rate_type := nvl(fnd_profile.value('IEX_COLLECTIONS_RATE_TYPE'), 'Corporate');
2599: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Collections Rate Type = '||l_rate_type);
2600: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Functional Currency code= '||p_min_currency_code);
2601: open c_amount_account(p_cust_account_id,p_org_id, p_correspondence_date, p_grace_days, p_dun_disputed_items);
2602: loop
2603: fetch c_amount_account into l_amount_due_remaining, l_invoice_currency_code, l_class;
2604: if c_amount_account%notfound then

Line 2617: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

2613: ,x_conversion_type => l_rate_type
2614: ,x_amount => l_amount_due_remaining);
2615: exception
2616: when others then
2617: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2618: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2619: return l_amount;
2620: end;
2621: l_invoice_amount := nvl(l_convert_amount,0);

Line 2618: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

2614: ,x_amount => l_amount_due_remaining);
2615: exception
2616: when others then
2617: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2618: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2619: return l_amount;
2620: end;
2621: l_invoice_amount := nvl(l_convert_amount,0);
2622: if l_invoice_amount > p_min_dun_invoice_amount then

Line 2635: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Invoice amount= '||l_amount);

2631: end if;
2632: end if;
2633: end loop;
2634: close c_amount_account;
2635: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Invoice amount= '||l_amount);
2636: open c_cm_ar_amount_account(p_cust_account_id,p_org_id);
2637: loop
2638: fetch c_cm_ar_amount_account into l_cm_ar_amount,l_cm_ar_currency_code;
2639: if c_cm_ar_amount_account%notfound then

Line 2640: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'No open Account Receipts and credit memos');

2636: open c_cm_ar_amount_account(p_cust_account_id,p_org_id);
2637: loop
2638: fetch c_cm_ar_amount_account into l_cm_ar_amount,l_cm_ar_currency_code;
2639: if c_cm_ar_amount_account%notfound then
2640: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'No open Account Receipts and credit memos');
2641: exit;
2642: end if;
2643: if (l_cm_ar_currency_code <> p_min_currency_code) then
2644: begin

Line 2654: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

2650: ,x_amount => l_cm_ar_amount);
2651: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);
2652: exception
2653: when others then
2654: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2655: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2656: return l_amount;
2657: end;
2658: else

Line 2655: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

2651: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);
2652: exception
2653: when others then
2654: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2655: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2656: return l_amount;
2657: end;
2658: else
2659: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);

Line 2663: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);

2659: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
2660: end if;
2661: end loop;
2662: close c_cm_ar_amount_account;
2663: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit memos and open account Receipts total= '||l_cm_ar_total_amount);
2664:
2665: l_amount := nvl(l_amount,0) + nvl(l_cm_ar_total_amount,0) ;-- substracting sum of credit memo amount and ar receipt amount from total amount due
2666: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
2667: Return l_amount;

Line 2672: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2668: Exception
2669: when others then
2670: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2671: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2672: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2673: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2674: End amount_account;
2675:
2676: Function amount_billto(p_site_use_id in number,p_org_id in number,p_correspondence_date in date -- for 2nd case

Line 2673: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2669: when others then
2670: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2671: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2672: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2673: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2674: End amount_account;
2675:
2676: Function amount_billto(p_site_use_id in number,p_org_id in number,p_correspondence_date in date -- for 2nd case
2677: ,p_grace_days in number, p_dun_disputed_items in varchar2, p_min_currency_code in varchar2, p_min_dun_amount in number

Line 2715: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Collections Rate Type = '||l_rate_type);

2711: l_cm_ar_currency_code varchar2(15);
2712: l_rate_type varchar2(100);
2713: Begin
2714: l_rate_type := nvl(fnd_profile.value('IEX_COLLECTIONS_RATE_TYPE'), 'Corporate');
2715: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Collections Rate Type = '||l_rate_type);
2716: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Functional Currency code= '||p_min_currency_code);
2717:
2718: open c_amount_billto(p_site_use_id, p_org_id, p_correspondence_date, p_grace_days, p_dun_disputed_items);
2719: loop

Line 2716: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Functional Currency code= '||p_min_currency_code);

2712: l_rate_type varchar2(100);
2713: Begin
2714: l_rate_type := nvl(fnd_profile.value('IEX_COLLECTIONS_RATE_TYPE'), 'Corporate');
2715: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Collections Rate Type = '||l_rate_type);
2716: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Functional Currency code= '||p_min_currency_code);
2717:
2718: open c_amount_billto(p_site_use_id, p_org_id, p_correspondence_date, p_grace_days, p_dun_disputed_items);
2719: loop
2720: fetch c_amount_billto into l_amount_due_remaining, l_invoice_currency_code, l_class;

Line 2735: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

2731: ,x_amount => l_amount_due_remaining);
2732:
2733: exception
2734: when others then
2735: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2736: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2737: return l_amount;
2738: end;
2739: l_invoice_amount := nvl(l_convert_amount,0);

Line 2736: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

2732:
2733: exception
2734: when others then
2735: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2736: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2737: return l_amount;
2738: end;
2739: l_invoice_amount := nvl(l_convert_amount,0);
2740: if l_invoice_amount > p_min_dun_invoice_amount then

Line 2752: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount= '||l_amount);

2748: end if;
2749: end if;
2750: end loop;
2751: close c_amount_billto;
2752: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total Invoice amount= '||l_amount);
2753:
2754: open c_cm_ar_amount_billto(p_site_use_id,p_org_id);
2755: loop
2756: fetch c_cm_ar_amount_billto into l_cm_ar_amount,l_cm_ar_currency_code;

Line 2770: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

2766: , x_conversion_type => l_rate_type
2767: , x_amount => l_cm_ar_amount);
2768: exception
2769: when others then
2770: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2771: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2772: return l_amount;
2773: end;
2774: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);

Line 2771: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

2767: , x_amount => l_cm_ar_amount);
2768: exception
2769: when others then
2770: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
2771: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
2772: return l_amount;
2773: end;
2774: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);
2775: else

Line 2780: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total of open Account Receipts and credit memos= '||l_cm_ar_total_amount);

2776: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
2777: end if;
2778: end loop;
2779: close c_cm_ar_amount_billto;
2780: FND_FILE.PUT_LINE(FND_FILE.LOG,'Total of open Account Receipts and credit memos= '||l_cm_ar_total_amount);
2781:
2782: l_amount := nvl(l_amount,0) + nvl(l_cm_ar_total_amount,0) ;-- substracting sum of credit memo amount and ar receipt amount from total amount due
2783: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
2784: Return l_amount;

Line 2789: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);

2785: Exception
2786: when others then
2787: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2788: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2789: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2790: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2791: End amount_billto;
2792: /*
2793: Overview: This function is to determine if the required min_dunning and min_invoice_dunning amount are

Line 2790: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);

2786: when others then
2787: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLCODE - '||SQLCODE);
2788: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' - SQLERRM - '||SQLERRM);
2789: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLCODE-->'||SQLCODE);
2790: FND_FILE.PUT_LINE(FND_FILE.LOG, 'SQLERRM-->'||SQLERRM);
2791: End amount_billto;
2792: /*
2793: Overview: This function is to determine if the required min_dunning and min_invoice_dunning amount are
2794: met before sending the dunning letter.

Line 3044: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Inside minimum dunning amount check ');

3040: t_site_use_id number; -- Bills Receivables
3041:
3042: BEGIN
3043:
3044: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Inside minimum dunning amount check ');
3045:
3046: -- default to no dunning letter to send
3047: l_dunning_letters := 'Y';
3048: l_amount := 0 ;

Line 3052: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust_account_id-->'||p_cust_account_id);

3048: l_amount := 0 ;
3049: l_invoice_amount := 0 ;
3050: l_convert_amount := 0 ;
3051: l_amount_due_remaining := 0 ;
3052: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust_account_id-->'||p_cust_account_id);
3053: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site_use_id-->'||p_site_use_id);
3054: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org_id-->'||p_org_id);
3055:
3056:

Line 3053: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site_use_id-->'||p_site_use_id);

3049: l_invoice_amount := 0 ;
3050: l_convert_amount := 0 ;
3051: l_amount_due_remaining := 0 ;
3052: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust_account_id-->'||p_cust_account_id);
3053: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site_use_id-->'||p_site_use_id);
3054: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org_id-->'||p_org_id);
3055:
3056:
3057: l_cust_account_id := p_cust_account_id;

Line 3054: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org_id-->'||p_org_id);

3050: l_convert_amount := 0 ;
3051: l_amount_due_remaining := 0 ;
3052: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cust_account_id-->'||p_cust_account_id);
3053: FND_FILE.PUT_LINE(FND_FILE.LOG, 'site_use_id-->'||p_site_use_id);
3054: FND_FILE.PUT_LINE(FND_FILE.LOG, 'org_id-->'||p_org_id);
3055:
3056:
3057: l_cust_account_id := p_cust_account_id;
3058: l_site_use_id := p_site_use_id;

Line 3071: --FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_check_dunn_prf_val-->'||l_check_dunn_profile);

3067: l_rate_type := nvl(fnd_profile.value('IEX_COLLECTIONS_RATE_TYPE'), 'Corporate');
3068:
3069: --Start bug 7026222 gnramasa 20th July 08
3070: l_check_dunn_profile := nvl(fnd_profile.value('IEX_CHK_DUNN_AT_FUNC_CURR'), 'Y');
3071: --FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_check_dunn_prf_val-->'||l_check_dunn_profile);
3072: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_rate_type-->'||l_rate_type);
3073: --Begin Bug 10401991 14-Feb-2011 barathsr
3074: l_billto_tot_acctd_amt_rem:=0;
3075: l_billto_cm_tot_acctd_amt_rem:=0;

Line 3072: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_rate_type-->'||l_rate_type);

3068:
3069: --Start bug 7026222 gnramasa 20th July 08
3070: l_check_dunn_profile := nvl(fnd_profile.value('IEX_CHK_DUNN_AT_FUNC_CURR'), 'Y');
3071: --FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_check_dunn_prf_val-->'||l_check_dunn_profile);
3072: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_rate_type-->'||l_rate_type);
3073: --Begin Bug 10401991 14-Feb-2011 barathsr
3074: l_billto_tot_acctd_amt_rem:=0;
3075: l_billto_cm_tot_acctd_amt_rem:=0;
3076: l_billto_total_acctd_amount:=0;

Line 3081: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);

3077: l_acct_tot_acctd_amt_rem:=0;
3078: l_acct_cm_tot_acctd_amt_rem:=0;
3079: l_acct_total_acctd_amount:=0;
3080:
3081: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);
3082: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_grace_days = '||p_grace_days);
3083: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_dun_disputed_items = '||p_dun_disputed_items);
3084:
3085: WriteLog('DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);

Line 3082: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_grace_days = '||p_grace_days);

3078: l_acct_cm_tot_acctd_amt_rem:=0;
3079: l_acct_total_acctd_amount:=0;
3080:
3081: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);
3082: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_grace_days = '||p_grace_days);
3083: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_dun_disputed_items = '||p_dun_disputed_items);
3084:
3085: WriteLog('DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);
3086: WriteLog('DunningMinAmountCheck - p_grace_days = '||p_grace_days);

Line 3083: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_dun_disputed_items = '||p_dun_disputed_items);

3079: l_acct_total_acctd_amount:=0;
3080:
3081: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);
3082: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_grace_days = '||p_grace_days);
3083: FND_FILE.PUT_LINE(FND_FILE.LOG, 'DunningMinAmountCheck - p_dun_disputed_items = '||p_dun_disputed_items);
3084:
3085: WriteLog('DunningMinAmountCheck - p_correspondence_date = '||p_correspondence_date);
3086: WriteLog('DunningMinAmountCheck - p_grace_days = '||p_grace_days);
3087: WriteLog('DunningMinAmountCheck - p_dun_disputed_items = '||p_dun_disputed_items);

Line 3103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);

3099:
3100:
3101: l_billto_total_acctd_amount := nvl(l_billto_tot_acctd_amt_rem,0)+nvl(l_billto_cm_tot_acctd_amt_rem,0);
3102:
3103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);
3104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);
3105: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);
3106:
3107: if l_billto_total_acctd_amount <= 0 then

Line 3104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);

3100:
3101: l_billto_total_acctd_amount := nvl(l_billto_tot_acctd_amt_rem,0)+nvl(l_billto_cm_tot_acctd_amt_rem,0);
3102:
3103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);
3104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);
3105: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);
3106:
3107: if l_billto_total_acctd_amount <= 0 then
3108: l_dunning_letters:='N';

Line 3105: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);

3101: l_billto_total_acctd_amount := nvl(l_billto_tot_acctd_amt_rem,0)+nvl(l_billto_cm_tot_acctd_amt_rem,0);
3102:
3103: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);
3104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);
3105: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);
3106:
3107: if l_billto_total_acctd_amount <= 0 then
3108: l_dunning_letters:='N';
3109: return l_dunning_letters;

Line 3122: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);

3118: close c_acct_cm_tot_acctd_amt_rem;
3119:
3120: l_acct_total_acctd_amount:=nvl(l_acct_tot_acctd_amt_rem,0)+nvl(l_acct_cm_tot_acctd_amt_rem,0);
3121:
3122: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);
3123: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);
3124: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
3125:
3126: if l_acct_total_acctd_amount <= 0 then

Line 3123: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);

3119:
3120: l_acct_total_acctd_amount:=nvl(l_acct_tot_acctd_amt_rem,0)+nvl(l_acct_cm_tot_acctd_amt_rem,0);
3121:
3122: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);
3123: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);
3124: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
3125:
3126: if l_acct_total_acctd_amount <= 0 then
3127: l_dunning_letters:='N';

Line 3124: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);

3120: l_acct_total_acctd_amount:=nvl(l_acct_tot_acctd_amt_rem,0)+nvl(l_acct_cm_tot_acctd_amt_rem,0);
3121:
3122: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);
3123: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);
3124: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
3125:
3126: if l_acct_total_acctd_amount <= 0 then
3127: l_dunning_letters:='N';
3128: return l_dunning_letters;

Line 3137: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Check Dunning amount at functional currency is Yes');

3133: --If the profile 'IEX: Check Dunning amount at function currency' is set to 'Yes' then the current functionality will continue
3134: --and if the profile is set to 'No' then we can check amount at currency level. By default the profile value is 'Yes'
3135: if l_check_dunn_profile = 'Y' then
3136: -- determine the min dunning and min dunning invoice amount first
3137: FND_FILE.PUT_LINE(FND_FILE.LOG, 'IEX: Check Dunning amount at functional currency is Yes');
3138: if (l_site_use_id is not null) Then
3139: --Begin Bug 10401991 17-Jan-2011 barathsr -- Included org_id parameter to all the cursors wherever applicable.
3140: t_site_use_id := get_BR_BillTOID(l_site_use_id); -- Bills Receivables
3141: open c_billto(t_site_use_id,l_org_id); -- Bills Receivables

Line 3153: FND_FILE.PUT_LINE(FND_FILE.LOG,'cust_acct_id-->'||l_cust_account_id);

3149: fetch c_account into l_min_currency_code, l_min_dunning_amount, l_min_dunning_invoice_amount;
3150: close c_account;
3151: end if;
3152:
3153: FND_FILE.PUT_LINE(FND_FILE.LOG,'cust_acct_id-->'||l_cust_account_id);
3154: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_min_currency_code-->'||l_min_currency_code);
3155: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_amount-->'||l_min_dunning_amount);
3156: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_inv_amount-->'||l_min_dunning_invoice_amount);
3157:

Line 3154: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_min_currency_code-->'||l_min_currency_code);

3150: close c_account;
3151: end if;
3152:
3153: FND_FILE.PUT_LINE(FND_FILE.LOG,'cust_acct_id-->'||l_cust_account_id);
3154: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_min_currency_code-->'||l_min_currency_code);
3155: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_amount-->'||l_min_dunning_amount);
3156: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_inv_amount-->'||l_min_dunning_invoice_amount);
3157:
3158: -- no amout record to check

Line 3155: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_amount-->'||l_min_dunning_amount);

3151: end if;
3152:
3153: FND_FILE.PUT_LINE(FND_FILE.LOG,'cust_acct_id-->'||l_cust_account_id);
3154: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_min_currency_code-->'||l_min_currency_code);
3155: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_amount-->'||l_min_dunning_amount);
3156: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_inv_amount-->'||l_min_dunning_invoice_amount);
3157:
3158: -- no amout record to check
3159: if (l_min_currency_code is null) then

Line 3156: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_inv_amount-->'||l_min_dunning_invoice_amount);

3152:
3153: FND_FILE.PUT_LINE(FND_FILE.LOG,'cust_acct_id-->'||l_cust_account_id);
3154: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_min_currency_code-->'||l_min_currency_code);
3155: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_amount-->'||l_min_dunning_amount);
3156: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dunn_inv_amount-->'||l_min_dunning_invoice_amount);
3157:
3158: -- no amout record to check
3159: if (l_min_currency_code is null) then
3160: return l_dunning_letters;

Line 3188: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

3184: ,x_amount => l_amount_due_remaining);
3185: -- l_amount := nvl(l_amount,0) + nvl(l_convert_amount,0);
3186: exception
3187: when others then
3188: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3189: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3190: l_dunning_letters:='N';
3191: return l_dunning_letters;
3192: end;

Line 3189: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

3185: -- l_amount := nvl(l_amount,0) + nvl(l_convert_amount,0);
3186: exception
3187: when others then
3188: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3189: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3190: l_dunning_letters:='N';
3191: return l_dunning_letters;
3192: end;
3193: -- also calculate the invoice amount

Line 3237: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

3233: ,x_conversion_type => l_rate_type
3234: ,x_amount => l_cm_ar_amount);
3235: exception
3236: when others then
3237: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3238: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3239: l_dunning_letters:='N';
3240: return l_dunning_letters;
3241: end;

Line 3238: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

3234: ,x_amount => l_cm_ar_amount);
3235: exception
3236: when others then
3237: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3238: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3239: l_dunning_letters:='N';
3240: return l_dunning_letters;
3241: end;
3242: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);

Line 3260: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_inv_curr_code-->'||l_invoice_currency_code);

3256: elsif (l_cust_account_id is not null ) Then -- account level calculation
3257: open c_amount_account(l_cust_account_id,l_org_id,p_correspondence_date,p_grace_days,p_dun_disputed_items);
3258: loop
3259: fetch c_amount_account into l_amount_due_remaining, l_invoice_currency_code, l_class;
3260: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_inv_curr_code-->'||l_invoice_currency_code);
3261: if c_amount_account%notfound then
3262: exit;
3263: end if;
3264: if (l_invoice_currency_code <> l_min_currency_code) then

Line 3265: FND_FILE.PUT_LINE(FND_FILE.LOG,'curr not equal..converting...');

3261: if c_amount_account%notfound then
3262: exit;
3263: end if;
3264: if (l_invoice_currency_code <> l_min_currency_code) then
3265: FND_FILE.PUT_LINE(FND_FILE.LOG,'curr not equal..converting...');
3266: begin
3267: l_convert_amount := gl_currency_api.convert_amount(
3268: x_from_currency => l_invoice_currency_code
3269: ,x_to_currency => l_min_currency_code

Line 3277: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

3273: -- l_amount := nvl(l_amount,0) + nvl(l_convert_amount,0);
3274:
3275: exception
3276: when others then
3277: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3278: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3279: l_dunning_letters:='N';
3280: return l_dunning_letters;
3281: end;

Line 3278: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

3274:
3275: exception
3276: when others then
3277: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3278: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3279: l_dunning_letters:='N';
3280: return l_dunning_letters;
3281: end;
3282: -- also calculate the invoice amount

Line 3306: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_amount-->'||l_amount);

3302: end if;
3303: end loop;
3304: close c_amount_account;
3305: WriteLog('l_amount = '||l_amount);
3306: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_amount-->'||l_amount);
3307: -- WriteLog('l_invoice_amount = '||l_invoice_amount);
3308: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_inv_amount-->'||l_invoice_amount);
3309:
3310:

Line 3308: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_inv_amount-->'||l_invoice_amount);

3304: close c_amount_account;
3305: WriteLog('l_amount = '||l_amount);
3306: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_amount-->'||l_amount);
3307: -- WriteLog('l_invoice_amount = '||l_invoice_amount);
3308: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_inv_amount-->'||l_invoice_amount);
3309:
3310:
3311: open c_cm_ar_amount_account(l_cust_account_id,l_org_id);
3312: loop

Line 3316: FND_FILE.PUT_LINE(FND_FILE.LOG, 'No open Account Receipts and credit memos');

3312: loop
3313: fetch c_cm_ar_amount_account into l_cm_ar_amount,l_cm_ar_currency_code;
3314: if c_cm_ar_amount_account%notfound then
3315: WriteLog('No open Account Receipts and credit memos');
3316: FND_FILE.PUT_LINE(FND_FILE.LOG, 'No open Account Receipts and credit memos');
3317: exit;
3318: end if;
3319: if (l_cm_ar_currency_code <> l_min_currency_code) then
3320: begin

Line 3330: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');

3326: ,x_amount => l_cm_ar_amount);
3327: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);
3328: exception
3329: when others then
3330: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3331: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3332: l_dunning_letters:='N';
3333: return l_dunning_letters;
3334: end;

Line 3331: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

3327: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_convert_amount,0);
3328: exception
3329: when others then
3330: FND_FILE.PUT_LINE(FND_FILE.LOG,'error in currency conversion..pl check whether exchange rates are defined');
3331: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
3332: l_dunning_letters:='N';
3333: return l_dunning_letters;
3334: end;
3335: else

Line 3344: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cm_ar_total_amount-->'||l_cm_ar_total_amount);

3340:
3341:
3342:
3343: WriteLog('l_cm_ar_total_amount = '||l_cm_ar_total_amount);
3344: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cm_ar_total_amount-->'||l_cm_ar_total_amount);
3345:
3346: l_amount := nvl(l_amount,0) + nvl(l_cm_ar_total_amount,0) ;-- substracting sum of credit memo amount and ar receipt amount from total amount due
3347: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
3348:

Line 3352: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_total_amount-->'||l_amount);

3348:
3349:
3350: end if;
3351:
3352: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_total_amount-->'||l_amount);
3353:
3354: -- determine the flag
3355: if (l_amount < l_min_dunning_amount) --or l_invoice_amount < l_min_dunning_invoice_amount
3356: then

Line 3358: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cant send dunning letters');

3354: -- determine the flag
3355: if (l_amount < l_min_dunning_amount) --or l_invoice_amount < l_min_dunning_invoice_amount
3356: then
3357: l_dunning_letters := 'N';
3358: FND_FILE.PUT_LINE(FND_FILE.LOG, 'cant send dunning letters');
3359: end if;
3360: else
3361:
3362: if (l_site_use_id is not null) Then

Line 3417: FND_FILE.PUT_LINE(FND_FILE.LOG, 'acct lvl calc');

3413: end if;
3414: end loop;
3415: close c_billto_dist_inv_cur;
3416: elsif (l_cust_account_id is not null ) Then -- account level calculation
3417: FND_FILE.PUT_LINE(FND_FILE.LOG, 'acct lvl calc');
3418: l_dunning_letters := 'N'; --initially set it no
3419: open c_acc_dist_inv_cur(l_cust_account_id,l_org_id);
3420: loop
3421: fetch c_acc_dist_inv_cur into l_invoice_currency_code;

Line 3426: FND_FILE.PUT_LINE(FND_FILE.LOG, 'curr_code-->'||l_invoice_currency_code);

3422: if c_acc_dist_inv_cur%notfound then
3423: exit;
3424: end if;
3425:
3426: FND_FILE.PUT_LINE(FND_FILE.LOG, 'curr_code-->'||l_invoice_currency_code);
3427:
3428: open c_acc_min_dunn_amt (l_cust_account_id, l_invoice_currency_code);
3429: fetch c_acc_min_dunn_amt into l_min_dunning_amount, l_min_dunning_invoice_amount;
3430: close c_acc_min_dunn_amt;

Line 3432: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dun_amt-->'||l_min_dunning_amount);

3428: open c_acc_min_dunn_amt (l_cust_account_id, l_invoice_currency_code);
3429: fetch c_acc_min_dunn_amt into l_min_dunning_amount, l_min_dunning_invoice_amount;
3430: close c_acc_min_dunn_amt;
3431:
3432: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dun_amt-->'||l_min_dunning_amount);
3433: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dun_inv_amt-->'||l_min_dunning_invoice_amount);
3434:
3435:
3436: if l_min_dunning_amount is null then

Line 3433: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dun_inv_amt-->'||l_min_dunning_invoice_amount);

3429: fetch c_acc_min_dunn_amt into l_min_dunning_amount, l_min_dunning_invoice_amount;
3430: close c_acc_min_dunn_amt;
3431:
3432: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dun_amt-->'||l_min_dunning_amount);
3433: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_min_dun_inv_amt-->'||l_min_dunning_invoice_amount);
3434:
3435:
3436: if l_min_dunning_amount is null then
3437: l_min_dunning_amount := 0;

Line 3448: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_tot_amt_due_rem-->'||l_tot_amt_due_rem);

3444: open c_acc_tot_amt_due_rem (l_cust_account_id, l_invoice_currency_code, l_min_dunning_invoice_amount,l_org_id,p_correspondence_date,p_grace_days,p_dun_disputed_items);
3445: fetch c_acc_tot_amt_due_rem into l_tot_amt_due_rem;
3446: close c_acc_tot_amt_due_rem;
3447:
3448: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_tot_amt_due_rem-->'||l_tot_amt_due_rem);
3449:
3450: open c_cm_ar_amount_account_curr(l_cust_account_id,l_invoice_currency_code,l_org_id);
3451: loop
3452: fetch c_cm_ar_amount_account_curr into l_cm_ar_amount;

Line 3455: FND_FILE.PUT_LINE(FND_FILE.LOG,'No open Account Receipts and credit memos');

3451: loop
3452: fetch c_cm_ar_amount_account_curr into l_cm_ar_amount;
3453: if c_cm_ar_amount_account_curr%notfound then
3454: WriteLog('No open Account Receipts and credit memos');
3455: FND_FILE.PUT_LINE(FND_FILE.LOG,'No open Account Receipts and credit memos');
3456: exit;
3457: end if;
3458:
3459: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt-->'||l_cm_ar_total_amount);

Line 3459: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt-->'||l_cm_ar_total_amount);

3455: FND_FILE.PUT_LINE(FND_FILE.LOG,'No open Account Receipts and credit memos');
3456: exit;
3457: end if;
3458:
3459: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt-->'||l_cm_ar_total_amount);
3460: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
3461:
3462: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_amt -->'||l_cm_ar_amount);
3463: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt after adding-->'||l_cm_ar_total_amount);

Line 3462: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_amt -->'||l_cm_ar_amount);

3458:
3459: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt-->'||l_cm_ar_total_amount);
3460: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
3461:
3462: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_amt -->'||l_cm_ar_amount);
3463: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt after adding-->'||l_cm_ar_total_amount);
3464:
3465: end loop;
3466: close c_cm_ar_amount_account_curr;

Line 3463: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt after adding-->'||l_cm_ar_total_amount);

3459: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt-->'||l_cm_ar_total_amount);
3460: l_cm_ar_total_amount := nvl(l_cm_ar_total_amount,0) + nvl(l_cm_ar_amount,0);
3461:
3462: -- FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_amt -->'||l_cm_ar_amount);
3463: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt after adding-->'||l_cm_ar_total_amount);
3464:
3465: end loop;
3466: close c_cm_ar_amount_account_curr;
3467: --If any currency group satisfies the condition then we have to send the dunning letter,

Line 3470: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt before adding to tot_amt-->'||l_cm_ar_total_amount);

3466: close c_cm_ar_amount_account_curr;
3467: --If any currency group satisfies the condition then we have to send the dunning letter,
3468: --so no need to check for other currencies.
3469:
3470: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt before adding to tot_amt-->'||l_cm_ar_total_amount);
3471: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt before adding-->'||l_tot_amt_due_rem);
3472: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
3473: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
3474:

Line 3471: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt before adding-->'||l_tot_amt_due_rem);

3467: --If any currency group satisfies the condition then we have to send the dunning letter,
3468: --so no need to check for other currencies.
3469:
3470: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_cm_ar_tot_amt before adding to tot_amt-->'||l_cm_ar_total_amount);
3471: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt before adding-->'||l_tot_amt_due_rem);
3472: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
3473: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
3474:
3475: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt_due_rem-->'||l_tot_amt_due_rem);

Line 3475: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt_due_rem-->'||l_tot_amt_due_rem);

3471: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt before adding-->'||l_tot_amt_due_rem);
3472: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);-- substracting sum of credit memo amount and ar receipt amount from total amount due
3473: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
3474:
3475: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_tot_amt_due_rem-->'||l_tot_amt_due_rem);
3476: --If any currency group satisfies the condition then we have to send the dunning letter,
3477: --so no need to check for other currencies.
3478: if l_tot_amt_due_rem >= l_min_dunning_amount then
3479: l_dunning_letters := 'Y';

Line 3480: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'send dunning letter');

3476: --If any currency group satisfies the condition then we have to send the dunning letter,
3477: --so no need to check for other currencies.
3478: if l_tot_amt_due_rem >= l_min_dunning_amount then
3479: l_dunning_letters := 'Y';
3480: -- FND_FILE.PUT_LINE(FND_FILE.LOG, 'send dunning letter');
3481: exit;
3482: end if;
3483: end loop;
3484: close c_acc_dist_inv_cur;

Line 4091: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_cust_account_id : '||p_cust_account_id);

4087: l_org_id := p_org_id;
4088: l_min_dunning_amount := 0;
4089: l_min_dunning_invoice_amount := 0;
4090:
4091: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_cust_account_id : '||p_cust_account_id);
4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);
4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);

Line 4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);

4088: l_min_dunning_amount := 0;
4089: l_min_dunning_invoice_amount := 0;
4090:
4091: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_cust_account_id : '||p_cust_account_id);
4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);
4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);

Line 4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);

4089: l_min_dunning_invoice_amount := 0;
4090:
4091: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_cust_account_id : '||p_cust_account_id);
4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);
4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );

Line 4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);

4090:
4091: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_cust_account_id : '||p_cust_account_id);
4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);
4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );
4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);

Line 4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);

4091: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_cust_account_id : '||p_cust_account_id);
4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);
4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );
4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);
4099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_org_id : '||p_org_id);

Line 4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);

4092: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_site_use_id : '||p_site_use_id);
4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );
4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);
4099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_org_id : '||p_org_id);
4100:

Line 4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );

4093: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_party_id : '|| p_party_id);
4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );
4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);
4099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_org_id : '||p_org_id);
4100:
4101: WriteLog('p_cust_account_id : '||p_cust_account_id);

Line 4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);

4094: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dunning_plan_id : '||p_dunning_plan_id);
4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );
4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);
4099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_org_id : '||p_org_id);
4100:
4101: WriteLog('p_cust_account_id : '||p_cust_account_id);
4102: WriteLog('p_site_use_id : '||p_site_use_id);

Line 4099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_org_id : '||p_org_id);

4095: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_grace_days : '||p_grace_days);
4096: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_dun_disputed_items : '||p_dun_disputed_items);
4097: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_correspondence_date :'||p_correspondence_date );
4098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_running_level : '||p_running_level);
4099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'p_org_id : '||p_org_id);
4100:
4101: WriteLog('p_cust_account_id : '||p_cust_account_id);
4102: WriteLog('p_site_use_id : '||p_site_use_id);
4103: WriteLog('p_party_id : '|| p_party_id);

Line 4158: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_amt_rem_BR : '||l_billto_tot_amt_rem_BR);

4154: l_billto_total_acctd_amount := l_billto_total_acctd_amount + nvl(l_billto_tot_amt_rem_BR,0) + nvl(l_billto_cm_tot_amt_rem_BR,0);
4155: end if;
4156: end if;
4157:
4158: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_amt_rem_BR : '||l_billto_tot_amt_rem_BR);
4159: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_amt_rem_BR : '||l_billto_cm_tot_amt_rem_BR);
4160:
4161: exception
4162: when others then null;

Line 4159: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_amt_rem_BR : '||l_billto_cm_tot_amt_rem_BR);

4155: end if;
4156: end if;
4157:
4158: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_amt_rem_BR : '||l_billto_tot_amt_rem_BR);
4159: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_amt_rem_BR : '||l_billto_cm_tot_amt_rem_BR);
4160:
4161: exception
4162: when others then null;
4163: end;

Line 4166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);

4162: when others then null;
4163: end;
4164: -- Bills Receivables bug 16303059 end....
4165:
4166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);
4167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);
4168: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);
4169: if l_billto_total_acctd_amount <= 0 then
4170: l_dunning_letters:='N';

Line 4167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);

4163: end;
4164: -- Bills Receivables bug 16303059 end....
4165:
4166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);
4167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);
4168: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);
4169: if l_billto_total_acctd_amount <= 0 then
4170: l_dunning_letters:='N';
4171: p_dunning_letters := l_dunning_letters;

Line 4168: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);

4164: -- Bills Receivables bug 16303059 end....
4165:
4166: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_tot_acctd_amt_rem : '||l_billto_tot_acctd_amt_rem);
4167: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_cm_tot_acctd_amt_rem : '||l_billto_cm_tot_acctd_amt_rem);
4168: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_billto_total_acctd_amount : '||l_billto_total_acctd_amount);
4169: if l_billto_total_acctd_amount <= 0 then
4170: l_dunning_letters:='N';
4171: p_dunning_letters := l_dunning_letters;
4172: return ;

Line 4175: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cust_account_id : '||l_cust_account_id);

4171: p_dunning_letters := l_dunning_letters;
4172: return ;
4173: end if;
4174: elsif l_cust_account_id is not null then
4175: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cust_account_id : '||l_cust_account_id);
4176: open c_acct_tot_acctd_amt_rem(l_cust_account_id,l_org_id);
4177: fetch c_acct_tot_acctd_amt_rem into l_acct_tot_acctd_amt_rem;
4178: close c_acct_tot_acctd_amt_rem;
4179:

Line 4185: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);

4181: fetch c_acct_cm_tot_acctd_amt_rem into l_acct_cm_tot_acctd_amt_rem;
4182: close c_acct_cm_tot_acctd_amt_rem;
4183:
4184: l_acct_total_acctd_amount:=nvl(l_acct_tot_acctd_amt_rem,0)+nvl(l_acct_cm_tot_acctd_amt_rem,0);
4185: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);
4186: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);
4187: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
4188:
4189:

Line 4186: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);

4182: close c_acct_cm_tot_acctd_amt_rem;
4183:
4184: l_acct_total_acctd_amount:=nvl(l_acct_tot_acctd_amt_rem,0)+nvl(l_acct_cm_tot_acctd_amt_rem,0);
4185: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);
4186: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);
4187: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
4188:
4189:
4190: if l_acct_total_acctd_amount <= 0 then

Line 4187: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);

4183:
4184: l_acct_total_acctd_amount:=nvl(l_acct_tot_acctd_amt_rem,0)+nvl(l_acct_cm_tot_acctd_amt_rem,0);
4185: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_tot_acctd_amt_rem : '||l_acct_tot_acctd_amt_rem);
4186: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_cm_tot_acctd_amt_rem : '||l_acct_cm_tot_acctd_amt_rem);
4187: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
4188:
4189:
4190: if l_acct_total_acctd_amount <= 0 then
4191: FND_FILE.PUT_LINE(FND_FILE.LOG, 'setting l_dunning_letters to : '||l_dunning_letters);

Line 4191: FND_FILE.PUT_LINE(FND_FILE.LOG, 'setting l_dunning_letters to : '||l_dunning_letters);

4187: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_acct_total_acctd_amount : '||l_acct_total_acctd_amount);
4188:
4189:
4190: if l_acct_total_acctd_amount <= 0 then
4191: FND_FILE.PUT_LINE(FND_FILE.LOG, 'setting l_dunning_letters to : '||l_dunning_letters);
4192: l_dunning_letters:='N';
4193: p_dunning_letters := l_dunning_letters;
4194: return ;
4195: end if;

Line 4227: FND_FILE.PUT_LINE(FND_FILE.LOG, '******* iexvutlb.pls : Stage Dunning Plan ID ==> '||p_dunning_plan_id);

4223: l_min_dunning_invoice_amount := 0;
4224: end if;
4225: l_amount := 0;
4226: l_tot_amt_due_rem := 0;
4227: FND_FILE.PUT_LINE(FND_FILE.LOG, '******* iexvutlb.pls : Stage Dunning Plan ID ==> '||p_dunning_plan_id);
4228:
4229: open c_dunningplan_lines (p_dunning_plan_id);
4230: loop
4231:

Line 4237: FND_FILE.PUT_LINE(FND_FILE.LOG, '*******HHHHHH Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined *****');

4233: exit when c_dunningplan_lines%NOTFOUND;
4234: /*
4235: --start added to fix 13519559 12/23/2011 snuthala
4236: if c_dunningplan_lines%NOTFOUND then
4237: FND_FILE.PUT_LINE(FND_FILE.LOG, '*******HHHHHH Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined *****');
4238: WriteLog('Staged Dunning Plan '||p_dunning_plan_id||' has no as no dunning stages defined');
4239: exit;
4240: end if;
4241: --exit when c_dunningplan_lines%notfound;

Line 4338: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cm_ar_total_amount-->'||l_cm_ar_total_amount);

4334: l_cm_ar_amount := 0;
4335: end if;
4336: close c_cm_ar_amount_billto_curr; */
4337:
4338: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cm_ar_total_amount-->'||l_cm_ar_total_amount);
4339: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_tot_amt_due_rem--> '||l_tot_amt_due_rem);
4340: WriteLog('l_cm_ar_amount = '||l_cm_ar_amount);
4341:
4342: -- substracting credit memo amount and ar receipr amount from total amount due

Line 4339: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_tot_amt_due_rem--> '||l_tot_amt_due_rem);

4335: end if;
4336: close c_cm_ar_amount_billto_curr; */
4337:
4338: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_cm_ar_total_amount-->'||l_cm_ar_total_amount);
4339: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_tot_amt_due_rem--> '||l_tot_amt_due_rem);
4340: WriteLog('l_cm_ar_amount = '||l_cm_ar_amount);
4341:
4342: -- substracting credit memo amount and ar receipr amount from total amount due
4343: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)

Line 4346: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Final l_tot_amt_due_rem--> '||l_tot_amt_due_rem);

4342: -- substracting credit memo amount and ar receipr amount from total amount due
4343: --(but here i used + sign because the credit memo and account recipt amount will be negitive values)
4344:
4345: l_tot_amt_due_rem := nvl(l_tot_amt_due_rem,0) + nvl(l_cm_ar_total_amount,0);--Added for Bug 10401991 02-Feb-2011 barathsr
4346: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Final l_tot_amt_due_rem--> '||l_tot_amt_due_rem);
4347:
4348: --If any currency group satisfies the condition then we have to send the dunning letter,
4349: --so no need to check for other currencies.
4350: if l_tot_amt_due_rem >= l_min_dunning_amount then

Line 4398: FND_FILE.PUT_LINE(FND_FILE.LOG, '****** Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined *****');

4394: loop
4395: fetch c_dunningplan_lines into l_dunningplan_lines;
4396: --start added to fix 13519559 12/23/2011 snuthala
4397: if c_dunningplan_lines%notfound then
4398: FND_FILE.PUT_LINE(FND_FILE.LOG, '****** Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined *****');
4399: WriteLog('Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined');
4400: exit;
4401: end if;
4402: --exit when c_dunningplan_lines%notfound;

Line 4505: FND_FILE.PUT_LINE(FND_FILE.LOG, '****** Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined *****');

4501: loop
4502: fetch c_dunningplan_lines into l_dunningplan_lines;
4503: --Start added to fix 13519559 12/23/2011 anunthala
4504: if c_dunningplan_lines%notfound then
4505: FND_FILE.PUT_LINE(FND_FILE.LOG, '****** Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined *****');
4506: WriteLog('Stage Dunning Plan '||p_dunning_plan_id||' has no dunning stages defined');
4507: exit;
4508: end if;
4509: --exit when c_dunningplan_lines%notfound;