BNPL | EMI conversion fee calculation
Table changes:
m_charge:
Create new event_based charge as EMI conversion charge.
INSERT INTO m_charge ( name, system_code, currency_code, charge_applies_to_enum, charge_time_enum, charge_calculation_enum, charge_payment_mode_enum, amount, fee_on_day, fee_interval, fee_on_month, is_penalty, is_active, is_deleted, min_cap, max_cap, fee_frequency, income_or_liability_account_id, tax_group_id, emi_rounding_goalseek, is_glim_charge, glim_charge_calculation_enum, is_capitalized, charge_percentage_type, charge_percentage_period_type, version, is_slab_based, decimal_places, rounding_mode, charge_category_enum, is_accruable, charge_event_type, is_collected_as_cash, score_name, charge_percentage_calc_days_in_year_type, is_update_through_discount, min_amount, max_amount, business_identification_code, add_to_disbursal, charge_identifier, is_charge_calculation_inclusive_of_tax)
VALUES
('EMI Conversion Charge', NULL, 'INR', 5, 51, 2, 0, 15.000000, NULL, NULL, NULL, 0, 1, 0, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0, 1, 1, 2, 0, NULL, NULL, NULL, 1, 4, 0, NULL, 1, 0, NULL, NULL, NULL, 0, 'EMIC', 0);
Without Tax
INSERT INTO `m_charge` ( `name`, `system_code`, `currency_code`, `charge_applies_to_enum`, `charge_time_enum`, `charge_calculation_enum`, `charge_payment_mode_enum`, `amount`, `fee_on_day`, `fee_interval`, `fee_on_month`, `is_penalty`, `is_active`, `is_deleted`, `min_cap`, `max_cap`, `fee_frequency`, `income_or_liability_account_id`, `tax_group_id`, `emi_rounding_goalseek`, `is_glim_charge`, `glim_charge_calculation_enum`, `is_capitalized`, `charge_percentage_type`, `charge_percentage_period_type`, `version`, `is_slab_based`, `decimal_places`, `rounding_mode`, `charge_category_enum`, `is_accruable`, `charge_event_type`, `is_collected_as_cash`, `score_name`, `charge_percentage_calc_days_in_year_type`, `is_update_through_discount`, `min_amount`, `max_amount`, `business_identification_code`, `add_to_disbursal`, `charge_identifier`, `is_charge_calculation_inclusive_of_tax`)
VALUES
( 'EMI Conversion Charge', NULL, 'INR', 5, 51, 2, 0, 15.000000, NULL, NULL, NULL, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 1, 1, 2, 0, NULL, NULL, NULL, 1, 4, 0, NULL, 1, 0, NULL, NULL, NULL, 0, 'EMIC', 0);
Configure this charge identifier
INSERT INTO m_credit_line_charge_details ( charge_id, charge_identity, should_impact_available_limit, version)
VALUES
( (SELECT id from m_charge where charge_identifier='EMIC' ), 'EMIC', 0, 0);