X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/439d9f9ac17b496b8f90857995271bc17fa5600e..24b28f65b96a6b8d067751e3bf6715453df781aa:/emufs_gui/facturas.c diff --git a/emufs_gui/facturas.c b/emufs_gui/facturas.c index 9410c19..9573213 100644 --- a/emufs_gui/facturas.c +++ b/emufs_gui/facturas.c @@ -418,6 +418,7 @@ void fact_modificar(char *s) { WINDOW *win, *items, *nota, *subnota; t_Form *form, *form_nota; + t_Reg_Factura *nodo; t_Factura *fact; EMUFS_REG_SIZE size; EMUFS_REG_ID id, id_texto; @@ -429,7 +430,20 @@ void fact_modificar(char *s) win = newwin(LINES-4, COLS-2, 2, 1); box(win, 0, 0); - fact = fact_form_buscar(win, &id, &id_texto); + if (s == NULL) { + fact = fact_form_buscar(win, &id, &id_texto); + } else { + id = atoi(s); + fact = NULL; + nodo = lst_facturas->primero; + while (nodo) { + if (nodo->num_reg == id) { + fact = fact_buscar(lst_facturas, nodo->numero, &id, &id_texto); + break; + } + nodo = nodo->sig; + } + } if (fact == NULL) { wattron(win, COLOR_PAIR(COLOR_YELLOW));