891:
892: /*End - Create new charge schedules when amounts are updated at customer level - mbremkum*/
893:
894: -- Update Customer Profiles
895: UPDATE hz_customer_profiles hcp
896: SET late_charge_type = (SELECT DECODE(dunning_charge_type, 'A', 'ADJ',
897: 'I', 'INV', dunning_charge_type)
898: FROM igi_dun_cust_prof idcp
899: WHERE idcp.customer_profile_id = hcp.cust_account_profile_id
897: 'I', 'INV', dunning_charge_type)
898: FROM igi_dun_cust_prof idcp
899: WHERE idcp.customer_profile_id = hcp.cust_account_profile_id
900: AND idcp.use_dunning_flag = 'Y'),
901: /*Added the following to update hz_customer_profiles if Dunning Flaf is enabled - mbremkum*/
902: dunning_letters = (SELECT idcp.use_dunning_flag
903: FROM igi_dun_cust_prof idcp
904: WHERE idcp.customer_profile_id = hcp.cust_account_profile_id
905: AND idcp.use_dunning_flag = 'Y')
907: FROM igi_dun_cust_prof idcp1
908: WHERE idcp1.customer_profile_id = hcp.cust_account_profile_id
909: AND idcp1.use_dunning_flag = 'Y');
910:
911: --dbms_output.put_line('Updated Rows in hz_customer_profiles : '|| SQL%ROWCOUNT);
912:
913: -- Update Customer Profile Classes
914: UPDATE hz_cust_profile_classes hcpc
915: SET late_charge_type = (SELECT DECODE(dunning_charge_type, 'A', 'ADJ',