@prestamype/financial-functions
Version:
Implementación de funciones financieras
26 lines (19 loc) • 582 B
JavaScript
import Payment from '../_lib/Payment.js'
class Flexible extends Payment {
static amort_payment(amount, commission_rate) {
return amount * commission_rate
}
}
class Fija extends Payment {
static amort_payment(amount, commission_rate) {
return amount + amount * commission_rate
}
}
class Puente extends Payment {
static amort_payment(amount, commission_rate) {
return 0
}
}
export const flexible = (...args) => Flexible.gen_schedule(...args)
export const fija = (...args) => Fija.gen_schedule(...args)
export const puente = (...args) => Puente.gen_schedule(...args)