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):
|
||||
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:
|
||||
forma_pago = ''
|
||||
else:
|
||||
|
@ -3782,6 +3782,7 @@ class PreFacturasDetalle(BaseModel):
|
|||
'rfc': q.cliente.rfc,
|
||||
'forma_pago': forma_pago,
|
||||
'uso_cfdi': uso_cfdi,
|
||||
'notas': q.notas,
|
||||
}
|
||||
|
||||
productos = PreFacturasDetalle.select().where(
|
||||
|
|
|
@ -651,11 +651,13 @@ function search_client_by_id(id){
|
|||
|
||||
|
||||
function set_client(row){
|
||||
showvar(row)
|
||||
var form = $$('form_invoice')
|
||||
var html = '<span class="webix_icon fa-user"></span><span class="lbl_partner">'
|
||||
form.setValues({
|
||||
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>'
|
||||
$$('lbl_client').setValue(html)
|
||||
$$('cmd_cfdi_relacionados').enable()
|
||||
|
@ -1306,6 +1308,7 @@ function cmd_prefactura_click(){
|
|||
data['metodo_pago'] = $$('lst_metodo_pago').getValue()
|
||||
data['uso_cfdi'] = $$('lst_uso_cfdi').getValue()
|
||||
data['regimen_fiscal'] = $$('lst_regimen_fiscal').getValue()
|
||||
data['notas'] = values.notas
|
||||
|
||||
if(!save_preinvoice(data)){
|
||||
return
|
||||
|
@ -1457,7 +1460,6 @@ function refacturar_preinvoice(id){
|
|||
for(var p of values.rows){
|
||||
agregar_preproducto(p)
|
||||
}
|
||||
//~ calculate_taxes()
|
||||
calcular_impuestos()
|
||||
$$('tv_invoice').getTabbar().setValue('Generar')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue