forked from elmau/empresa-libre
Prefacturas, guardar y recuperar notas
This commit is contained in:
parent
3029f84874
commit
ead466e90c
|
@ -3765,7 +3765,7 @@ class PreFacturasDetalle(BaseModel):
|
||||||
def facturar(cls, id):
|
def facturar(cls, id):
|
||||||
data = []
|
data = []
|
||||||
|
|
||||||
q = PreFacturas.select(PreFacturas.cliente).where(PreFacturas.id==id)[0]
|
q = PreFacturas.select().where(PreFacturas.id==id)[0]
|
||||||
if q.cliente.forma_pago is None:
|
if q.cliente.forma_pago is None:
|
||||||
forma_pago = ''
|
forma_pago = ''
|
||||||
else:
|
else:
|
||||||
|
@ -3782,6 +3782,7 @@ class PreFacturasDetalle(BaseModel):
|
||||||
'rfc': q.cliente.rfc,
|
'rfc': q.cliente.rfc,
|
||||||
'forma_pago': forma_pago,
|
'forma_pago': forma_pago,
|
||||||
'uso_cfdi': uso_cfdi,
|
'uso_cfdi': uso_cfdi,
|
||||||
|
'notas': q.notas,
|
||||||
}
|
}
|
||||||
|
|
||||||
productos = PreFacturasDetalle.select().where(
|
productos = PreFacturasDetalle.select().where(
|
||||||
|
|
|
@ -651,11 +651,13 @@ function search_client_by_id(id){
|
||||||
|
|
||||||
|
|
||||||
function set_client(row){
|
function set_client(row){
|
||||||
|
showvar(row)
|
||||||
var form = $$('form_invoice')
|
var form = $$('form_invoice')
|
||||||
var html = '<span class="webix_icon fa-user"></span><span class="lbl_partner">'
|
var html = '<span class="webix_icon fa-user"></span><span class="lbl_partner">'
|
||||||
form.setValues({
|
form.setValues({
|
||||||
id_partner:row.id, search_client_id:'', search_client_name:'',
|
id_partner:row.id, search_client_id:'', search_client_name:'',
|
||||||
forma_pago: row.forma_pago, uso_cfdi: row.uso_cfdi}, true)
|
forma_pago: row.forma_pago, uso_cfdi: row.uso_cfdi,
|
||||||
|
notas: row.notas}, true)
|
||||||
html += row.nombre + ' (' + row.rfc + ')</span>'
|
html += row.nombre + ' (' + row.rfc + ')</span>'
|
||||||
$$('lbl_client').setValue(html)
|
$$('lbl_client').setValue(html)
|
||||||
$$('cmd_cfdi_relacionados').enable()
|
$$('cmd_cfdi_relacionados').enable()
|
||||||
|
@ -1306,6 +1308,7 @@ function cmd_prefactura_click(){
|
||||||
data['metodo_pago'] = $$('lst_metodo_pago').getValue()
|
data['metodo_pago'] = $$('lst_metodo_pago').getValue()
|
||||||
data['uso_cfdi'] = $$('lst_uso_cfdi').getValue()
|
data['uso_cfdi'] = $$('lst_uso_cfdi').getValue()
|
||||||
data['regimen_fiscal'] = $$('lst_regimen_fiscal').getValue()
|
data['regimen_fiscal'] = $$('lst_regimen_fiscal').getValue()
|
||||||
|
data['notas'] = values.notas
|
||||||
|
|
||||||
if(!save_preinvoice(data)){
|
if(!save_preinvoice(data)){
|
||||||
return
|
return
|
||||||
|
@ -1457,7 +1460,6 @@ function refacturar_preinvoice(id){
|
||||||
for(var p of values.rows){
|
for(var p of values.rows){
|
||||||
agregar_preproducto(p)
|
agregar_preproducto(p)
|
||||||
}
|
}
|
||||||
//~ calculate_taxes()
|
|
||||||
calcular_impuestos()
|
calcular_impuestos()
|
||||||
$$('tv_invoice').getTabbar().setValue('Generar')
|
$$('tv_invoice').getTabbar().setValue('Generar')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue