fix: marcar pagada en cuentas por pagar sobreescribía datos con ceros
UpdateCuentaPagar actualizaba TODAS las columnas incluyendo entidad_id=0, valor=0, descripcion='' cuando solo se enviaba estado+fecha_pago. Se agrega MarcarCuentaPagarPagada que solo toca estado y fecha_pago, con su endpoint POST /cuentas-pagar/:id/pagar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
2ee5e2ea83
commit
daf0b2c2a1
@@ -174,7 +174,7 @@ function pagarApp() {
|
||||
async doPagar(){
|
||||
this.saving=true;
|
||||
try {
|
||||
await axios.put(`/app/contabilidad/cuentas-pagar/${this.pagarId}`, {estado:'pagado',fecha_pago:this.pagoFecha});
|
||||
await axios.post(`/app/contabilidad/cuentas-pagar/${this.pagarId}/pagar`, {fecha_pago:this.pagoFecha});
|
||||
this.showPagarModal=false; await this.load();
|
||||
} catch(e){ this.error=e.response?.data?.error||'Error'; }
|
||||
finally{ this.saving=false; }
|
||||
|
||||
Reference in New Issue
Block a user