finish off support for using loan term details of a loan to determine interest due rather than inferring it from the number of repayments and repaid every information. This allows better support for loan schedules where the first repayment is irregular (e.g. not same timescale as repaid every)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE `portfolio_loan` ADD COLUMN `term_frequency` smallint(5) NOT NULL DEFAULT 0 AFTER `interest_calculated_in_period_enum`;
|
||||
ALTER TABLE `portfolio_loan` ADD COLUMN `term_period_frequency_enum` smallint(5) NOT NULL DEFAULT 2 AFTER `term_frequency`;
|
||||
|
||||
|
||||
UPDATE `mifostenant-default`.`portfolio_loan`
|
||||
SET
|
||||
`term_frequency` = `repay_every` * `number_of_repayments`,
|
||||
`term_period_frequency_enum` = `repayment_period_frequency_enum`
|
||||
WHERE id > 0;
|
||||
Reference in New Issue
Block a user