Descuento cero en traslados
This commit is contained in:
parent
2d45a8258f
commit
ef076a9085
|
@ -4920,22 +4920,12 @@ class PreFacturasDetalle(BaseModel):
|
|||
data = []
|
||||
|
||||
q = PreFacturas.select().where(PreFacturas.id==id)[0]
|
||||
if q.cliente.forma_pago is None:
|
||||
forma_pago = ''
|
||||
else:
|
||||
forma_pago = q.cliente.forma_pago.key
|
||||
|
||||
if q.cliente.uso_cfdi is None:
|
||||
uso_cfdi = ''
|
||||
else:
|
||||
uso_cfdi = q.cliente.uso_cfdi.key
|
||||
|
||||
receptor = {
|
||||
'id': q.cliente.id,
|
||||
'nombre': q.cliente.nombre,
|
||||
'rfc': q.cliente.rfc,
|
||||
'forma_pago': forma_pago,
|
||||
'uso_cfdi': uso_cfdi,
|
||||
'forma_pago': q.forma_pago,
|
||||
'uso_cfdi': q.uso_cfdi,
|
||||
'notas': q.notas,
|
||||
}
|
||||
|
||||
|
|
|
@ -981,6 +981,10 @@ function grid_details_before_edit_start(id){
|
|||
if(!columns.indexOf(id.column)){
|
||||
return !this.getItem(id.row)[id.column]
|
||||
}
|
||||
var tc = $$('lst_tipo_comprobante').getValue()
|
||||
if(tc=='T' && id.column=='descuento'){
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1895,6 +1899,14 @@ function lst_tipo_relacion_change(nv, ov){
|
|||
|
||||
|
||||
function lst_tipo_comprobante_change(nv, ov){
|
||||
if(nv=='T'){
|
||||
grid.eachRow(function(row){
|
||||
var p = grid.getItem(row)
|
||||
p.descuento = 0.0
|
||||
p.importe = (p.cantidad * p.valor_unitario).round(DECIMALES)
|
||||
grid.updateItem(row, p)
|
||||
})
|
||||
}
|
||||
if(nv=='T' || ov=='T'){
|
||||
calcular_impuestos()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue