Professional Documents
Culture Documents
PPPP
PPPP
PPPP
const masterDays = {
Monthly: 30,
weekly: 7,
['Bi-Weekly']: 14,
};
// Adjust interest based on the actual number of days the payment was
delayed or made early
if (actualRepaymentDate && actualRepaymentDate.getTime() !==
paymentDate.getTime()) {
let daysDifference = Math.floor((actualRepaymentDate - paymentDate) /
(1000 * 60 * 60 * 24));
interest = (outstandingPrincipal * workingInterest * daysDifference) /
(365 * 100);
}
return schedule;
}