feature/cierres #30

Merged
aldarien merged 460 commits from feature/cierres into develop 2025-09-11 15:16:17 -03:00
282 changed files with 1373 additions and 10578 deletions
Showing only changes of commit 418becaeda - Show all commits

View File

@ -18,6 +18,8 @@
</div>
@endsection
@include('layout.body.scripts.rut')
@push('page_scripts')
@include('ventas.facturacion.show.factura')
@include('ventas.facturacion.show.propietario')

View File

@ -28,7 +28,11 @@
facturas.draw().facturas()
},
rut: rut => {
this.props.rut = rut
rut = rut.replaceAll(/~\d|\.|-/g, '')
const digito = rut.slice(-1)
rut = rut.slice(0, -1)
this.props.rut = Rut.format(rut) + '-' + digito
document.getElementById('rut'+this.props.index).value = this.props.rut
facturas.venta.update().facturas()
facturas.draw().facturas()
},
@ -72,7 +76,7 @@
})
},
rut: () => {
document.getElementById('rut'+this.props.index).addEventListener('input', inputEvent => {
document.getElementById('rut'+this.props.index).addEventListener('change', inputEvent => {
const rut = inputEvent.currentTarget.value
if (rut === this.props.rut) {
return
@ -81,7 +85,7 @@
})
},
nombre: () => {
document.getElementById('propietario'+this.props.index).addEventListener('input', inputEvent => {
document.getElementById('propietario'+this.props.index).addEventListener('change', inputEvent => {
const nombre = inputEvent.currentTarget.value
if (nombre === this.props.nombre) {
return
@ -90,7 +94,7 @@
})
},
direccion: () => {
document.getElementById('direccion_propietario'+this.props.index).addEventListener('input', inputEvent => {
document.getElementById('direccion_propietario'+this.props.index).addEventListener('change', inputEvent => {
const direccion = inputEvent.currentTarget.value
if (direccion === this.props.direccion) {
return