FIX: edit payments

This commit is contained in:
Juan Pablo Vial
2025-11-25 13:22:52 -03:00
parent c9056451eb
commit 5f348e954e
6 changed files with 50 additions and 13 deletions

View File

@ -120,12 +120,12 @@
birthdate.getDate().toString().padStart(2, '0')].join('-'))
body.set(`${this.prefix}_broker_rut`, Rut.clean(this.components.$broker.dropdown('get value')))
if (this.components.payments.components.pie.$checkbox.checkbox('is unchecked')) {
if (!this.components.payments.components.pie.$checkbox.is(':checked')) {
body.delete(`${this.prefix}_payment_pie`)
body.delete(`${this.prefix}_payment_cuotas`)
}
body.delete(`${this.prefix}_payment_has_pie`)
if (this.components.payments.components.credit.$checkbox.checkbox('is unchecked')) {
if (!this.components.payments.components.credit.$checkbox.is(':checked')) {
body.delete(`${this.prefix}_payment_credit`)
}
body.delete(`${this.prefix}_payment_has_credit`)