HMG 3.4.4
Moderator: Rathinagiri
-
- Posts: 269
- Joined: Wed Aug 13, 2008 2:35 pm
- Location: Córdoba - Argentina
Re: HMG 3.4.4
Hola Amigos :
he realizado pruebas con el sistema en windows 32 bits sin resultados .
Continuo con el mismo problema a los 15 minutos de uso continuo del sistema , el mismo se cuelga y se sale del sistema .
Tambien realize las mismas pruebas retornando a la version 3.4.3 y 3.4.2 con el mismo resultado .
Tengo una vieja pc con windows xp 32 bits , puedo realizar pruebas alli pero ya no quedan clientes con ese sistema operativo .
Voy a consultar a los colegas que usan minigui extended de Grigory Filatov para conocer si han experimentado este problema .
Estara funcionando bien RELEASE MEMORY como puedo comprobar esto?
Saludos
Mario Mansilla
Hello friends :
I have done tests with the system in windows 32 bits without results.
Continuous with the same problem after 15 minutes of continuous use of the system, it hangs and leaves the system.
Also perform the same tests returning to version 3.4.3 and 3.4.2 with the same result.
I have an old PC with windows xp 32 bits, I can perform tests there but there are no customers with that operating system.
I'm going to consult colleagues who use minigui extended from Grigory Filatov to see if they have experienced this problem.
Will RELEASE MEMORY be working well as I can check this?
regards
Mario Mansilla
he realizado pruebas con el sistema en windows 32 bits sin resultados .
Continuo con el mismo problema a los 15 minutos de uso continuo del sistema , el mismo se cuelga y se sale del sistema .
Tambien realize las mismas pruebas retornando a la version 3.4.3 y 3.4.2 con el mismo resultado .
Tengo una vieja pc con windows xp 32 bits , puedo realizar pruebas alli pero ya no quedan clientes con ese sistema operativo .
Voy a consultar a los colegas que usan minigui extended de Grigory Filatov para conocer si han experimentado este problema .
Estara funcionando bien RELEASE MEMORY como puedo comprobar esto?
Saludos
Mario Mansilla
Hello friends :
I have done tests with the system in windows 32 bits without results.
Continuous with the same problem after 15 minutes of continuous use of the system, it hangs and leaves the system.
Also perform the same tests returning to version 3.4.3 and 3.4.2 with the same result.
I have an old PC with windows xp 32 bits, I can perform tests there but there are no customers with that operating system.
I'm going to consult colleagues who use minigui extended from Grigory Filatov to see if they have experienced this problem.
Will RELEASE MEMORY be working well as I can check this?
regards
Mario Mansilla
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: HMG 3.4.4
Hola Mario, al colgarse el sistema no arroja un errorlog.htm?.
seria bueno poder ver el mensaje de error ya que se puede sacar mucha información.
verifica que modulo es el que te está colgando la aplicación, puede que sea un error en la programación y no te has dado cuenta, suele suceder.
saludos.
seria bueno poder ver el mensaje de error ya que se puede sacar mucha información.
verifica que modulo es el que te está colgando la aplicación, puede que sea un error en la programación y no te has dado cuenta, suele suceder.
saludos.
-
- Posts: 269
- Joined: Wed Aug 13, 2008 2:35 pm
- Location: Córdoba - Argentina
Re: HMG 3.4.4
Hola Luis :
Muchas gracias por tu participacion . El sistema funciona sin problemas durante 10 a 15 minutos , hasta que te empiezan a desaparecer las imagenes de los botones y el fondo de los controles combobox se pone de color negro . Posterior a esa situacion el sistema se cierra en distintos lugares en los que durante los primeros 10 minutos funciono sin problemas .
El mismo o parecido al problema que posee el IDE de HMG.3.4.4 que despues de utilizarlo un tiempo se cuelga en cualquier lugar .
Me gustaria hacer una rutina que monitoree de alguna manera los recursos para identificar porque se produce este problema
Saludos
Mario Mansilla
Hello Luis :
Thank you very much for your participation . The system works without problems for 10 to 15 minutes, until you start to disappear the images of the buttons and the background controls combobox turns black. After that situation the system closes in different places in which during the first 10 minutes worked without problems.
The same or similar to the problem that has the IDE of HMG.3.4.4 that after using it a time hangs anywhere.
I would like to do a routine that somehow monitors resources to identify why this problem occurs
regards
Mario Mansilla
Called from _BROWSEGETVALUE(1282)
Called from _BROWSEREFRESH(1059)
Called from EVENTS(2439)
Called from UPDATEWINDOW(0)
Called from EVENTS(932)
Called from SETFOCUS(0)
Called from _HMG_ONHIDEFOCUSMANAGEMENT(6003)
Called from EVENTS(3525)
Called from SENDMESSAGE(0)
Called from _RELEASEWINDOW(3936)
Called from DOMETHOD(9020)
Called from CANCELAR_TARJETA(1494)
Called from (b)INGRESAR_TARJETA(503)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from INGRESAR_TARJETA(1456)
Called from ACEPTAR_PARCIAL(1397)
Called from (b)PAGO_VENTA(183)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from PAGO_VENTA(1343)
Called from (b)FACTURA(1256)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MODI_VENTA(1250)
Called from (b)ACTUALIZA_VENTA(2629)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MODI_VENTA(1250)
Called from (b)ACTUALIZA_VENTA(2629)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from FACTURA(175)
Called from (b)MAIN(113)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1763)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from DOMETHOD(9003)
Called from MAIN(113)
Muchas gracias por tu participacion . El sistema funciona sin problemas durante 10 a 15 minutos , hasta que te empiezan a desaparecer las imagenes de los botones y el fondo de los controles combobox se pone de color negro . Posterior a esa situacion el sistema se cierra en distintos lugares en los que durante los primeros 10 minutos funciono sin problemas .
El mismo o parecido al problema que posee el IDE de HMG.3.4.4 que despues de utilizarlo un tiempo se cuelga en cualquier lugar .
Me gustaria hacer una rutina que monitoree de alguna manera los recursos para identificar porque se produce este problema
Saludos
Mario Mansilla
Hello Luis :
Thank you very much for your participation . The system works without problems for 10 to 15 minutes, until you start to disappear the images of the buttons and the background controls combobox turns black. After that situation the system closes in different places in which during the first 10 minutes worked without problems.
The same or similar to the problem that has the IDE of HMG.3.4.4 that after using it a time hangs anywhere.
I would like to do a routine that somehow monitors resources to identify why this problem occurs
regards
Mario Mansilla
Called from _BROWSEGETVALUE(1282)
Called from _BROWSEREFRESH(1059)
Called from EVENTS(2439)
Called from UPDATEWINDOW(0)
Called from EVENTS(932)
Called from SETFOCUS(0)
Called from _HMG_ONHIDEFOCUSMANAGEMENT(6003)
Called from EVENTS(3525)
Called from SENDMESSAGE(0)
Called from _RELEASEWINDOW(3936)
Called from DOMETHOD(9020)
Called from CANCELAR_TARJETA(1494)
Called from (b)INGRESAR_TARJETA(503)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from INGRESAR_TARJETA(1456)
Called from ACEPTAR_PARCIAL(1397)
Called from (b)PAGO_VENTA(183)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from PAGO_VENTA(1343)
Called from (b)FACTURA(1256)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MODI_VENTA(1250)
Called from (b)ACTUALIZA_VENTA(2629)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MODI_VENTA(1250)
Called from (b)ACTUALIZA_VENTA(2629)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)BF_CLIENTE(633)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)ACEPTAR_CLIENTE(1064)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(1146)
Called from (b)FACTURA(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from FACTURA(175)
Called from (b)MAIN(113)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1763)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from DOMETHOD(9003)
Called from MAIN(113)
Re: HMG 3.4.4
It looks like a recursive call causing stack overflow.
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
-
- Posts: 269
- Joined: Wed Aug 13, 2008 2:35 pm
- Location: Córdoba - Argentina
Re: HMG 3.4.4
Hola Apais :
haciendo pruebas ahora en una vieja pc con win xp 32 bits .
El sistema con HMG.3.4.4 , despues de 2 horas de uso provoco el error en esta linea (**** Aqui ***) .
Este procedimiento (aceptar_venta()) se ejecuta permanentemente durante el uso del sistema , no es que se ejecuto una vez y el sistema se cerro . En este caso se ejecuto mas de 100 veces y de repente dio ese error .
Saludos
Mario Mansilla
Hello Apais:
doing tests now on an old PC with win xp 32 bits.
The system with HMG.3.4.4, after 2 hours of use caused the error in this line (**** Aqui ***).
This procedure (aceptar_venta ()) is executed permanently during the use of the system, it is not that it was executed once and the system was closed. In this case, it was executed more than 100 times and suddenly it gave that error.
regards
Mario Mansilla
*----------------------
Static Procedure Aceptar_Venta
*----------------------
If Empty(Form_122.Text_1.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El codigo de articulo ingresado es inválido","Atención")
Form_122.Text_1.Setfocus
Return nil
Endif
If Empty(Form_122.Text_2.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El nombre de articulo codigo ingresado es inválido","Atención")
Form_122.Text_2.Setfocus
Return nil
Endif
If Form_122.Text_3.Value <= 0
MsgInfo("Disculpe !!" + chr(10) + ;
"La cantidad de articulo ingresada es inválida","Atención")
Form_122.Text_3.Setfocus
Return nil
Endif
If Form_122.Text_5.Value = 0
MsgInfo("Disculpe !!" + chr(10) + ;
"El precio de articulo ingresado es inválido","Atención")
Form_122.Text_5.Setfocus
Return nil
Endif
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
If c_Modo = 1
Append Blank // Ventas->(DbAppend())
Endif
Replace Tipo With c_TipoFac
Replace Compro With c_Compro
Replace Numero With c_Numero
Replace Fecha With Date()
Replace Hora With c_Hora
Replace Codigo With Form_122.Text_1.Value
Replace Familia With Arti->Familia
Replace Rubro With Arti->Rubro
Replace Articulo With Form_122.Text_2.Value
Replace Cantidad With Form_122.Text_3.Value
Replace Tiva With Arti->Tiva
Replace Impint With Arti->Impint
Replace Descuento With Form_122.Text_4.Value
If c_TipoFac = "A"
Replace Unitario With Form_122.Text_5.Value / (1 + (Tiva/100))
Else
Replace Unitario With Form_122.Text_5.Value
Endif
Replace Importe With Unitario * Cantidad
Thiswindow.Release (****** Aqui ******)
Form_120.Button_2.Enabled := .T.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .T.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF Form_120 ACTION (Modi_Venta())
ON KEY F5 OF Form_120 ACTION (Borra_Venta())
ON KEY F6 OF Form_120 ACTION (Pago_Venta())
ON KEY F8 OF FORM_120 ACTION nil
Actualiza_Venta()
Return
El archivo log es este :
Called from _BROWSEGETVALUE(1282)
Called from _BROWSEREFRESH(1059)
Called from EVENTS(2439)
Called from SETFOCUS(0)
Called from EVENTS(967)
Called from SETFOCUS(0)
Called from _HMG_ONHIDEFOCUSMANAGEMENT(6003)
Called from EVENTS(3525)
Called from SENDMESSAGE(0)
Called from _RELEASEWINDOW(3936)
Called from DOMETHOD(9020)
Called from ACEPTAR_VENTA(1253)
Called from (b)MODI_VENTA(292)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MODI_VENTA(632)
Called from (b)ACTUALIZA_VENTA(1458)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from PRESU(96)
Called from (b)MAIN(115)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1763)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from PRESU(96)
Called from (b)MAIN(115)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1763)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from DOMETHOD(9003)
Called from MAIN(113)
haciendo pruebas ahora en una vieja pc con win xp 32 bits .
El sistema con HMG.3.4.4 , despues de 2 horas de uso provoco el error en esta linea (**** Aqui ***) .
Este procedimiento (aceptar_venta()) se ejecuta permanentemente durante el uso del sistema , no es que se ejecuto una vez y el sistema se cerro . En este caso se ejecuto mas de 100 veces y de repente dio ese error .
Saludos
Mario Mansilla
Hello Apais:
doing tests now on an old PC with win xp 32 bits.
The system with HMG.3.4.4, after 2 hours of use caused the error in this line (**** Aqui ***).
This procedure (aceptar_venta ()) is executed permanently during the use of the system, it is not that it was executed once and the system was closed. In this case, it was executed more than 100 times and suddenly it gave that error.
regards
Mario Mansilla
*----------------------
Static Procedure Aceptar_Venta
*----------------------
If Empty(Form_122.Text_1.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El codigo de articulo ingresado es inválido","Atención")
Form_122.Text_1.Setfocus
Return nil
Endif
If Empty(Form_122.Text_2.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El nombre de articulo codigo ingresado es inválido","Atención")
Form_122.Text_2.Setfocus
Return nil
Endif
If Form_122.Text_3.Value <= 0
MsgInfo("Disculpe !!" + chr(10) + ;
"La cantidad de articulo ingresada es inválida","Atención")
Form_122.Text_3.Setfocus
Return nil
Endif
If Form_122.Text_5.Value = 0
MsgInfo("Disculpe !!" + chr(10) + ;
"El precio de articulo ingresado es inválido","Atención")
Form_122.Text_5.Setfocus
Return nil
Endif
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
If c_Modo = 1
Append Blank // Ventas->(DbAppend())
Endif
Replace Tipo With c_TipoFac
Replace Compro With c_Compro
Replace Numero With c_Numero
Replace Fecha With Date()
Replace Hora With c_Hora
Replace Codigo With Form_122.Text_1.Value
Replace Familia With Arti->Familia
Replace Rubro With Arti->Rubro
Replace Articulo With Form_122.Text_2.Value
Replace Cantidad With Form_122.Text_3.Value
Replace Tiva With Arti->Tiva
Replace Impint With Arti->Impint
Replace Descuento With Form_122.Text_4.Value
If c_TipoFac = "A"
Replace Unitario With Form_122.Text_5.Value / (1 + (Tiva/100))
Else
Replace Unitario With Form_122.Text_5.Value
Endif
Replace Importe With Unitario * Cantidad
Thiswindow.Release (****** Aqui ******)
Form_120.Button_2.Enabled := .T.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .T.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF Form_120 ACTION (Modi_Venta())
ON KEY F5 OF Form_120 ACTION (Borra_Venta())
ON KEY F6 OF Form_120 ACTION (Pago_Venta())
ON KEY F8 OF FORM_120 ACTION nil
Actualiza_Venta()
Return
El archivo log es este :
Called from _BROWSEGETVALUE(1282)
Called from _BROWSEREFRESH(1059)
Called from EVENTS(2439)
Called from SETFOCUS(0)
Called from EVENTS(967)
Called from SETFOCUS(0)
Called from _HMG_ONHIDEFOCUSMANAGEMENT(6003)
Called from EVENTS(3525)
Called from SENDMESSAGE(0)
Called from _RELEASEWINDOW(3936)
Called from DOMETHOD(9020)
Called from ACEPTAR_VENTA(1253)
Called from (b)MODI_VENTA(292)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MODI_VENTA(632)
Called from (b)ACTUALIZA_VENTA(1458)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from PRESU(96)
Called from (b)MAIN(115)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1763)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)ACEPTAR_CLIENTE(518)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)BF_CLIENTE(327)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(828)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from ALTA_VENTA(607)
Called from (b)PRESU(1178)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1801)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from PRESU(96)
Called from (b)MAIN(115)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1763)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from DOMETHOD(9003)
Called from MAIN(113)
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: HMG 3.4.4
Hola Mario, yo también creo que es por recursividad.
Si te das cuenta estas poniendo el foco antes del return, tienes que rehacer el código.
Si te das cuenta estas poniendo el foco antes del return, tienes que rehacer el código.
Code: Select all
If Empty(Form_122.Text_1.Value) .OR. lOk:=.f.
msgInfo("Disculpe !!" + chr(10) + ;
"El codigo de articulo ingresado es inválido","Atención")
Form_122.Text_1.Setfocus //--> Esta línea está mal colocada
Return nil
Endif
If Empty(Form_122.Text_2.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El nombre de articulo codigo ingresado es inválido","Atención")
Form_122.Text_2.Setfocus//--> Esta línea está mal colocada
Return nil
Endif
If Form_122.Text_3.Value <= 0
MsgInfo("Disculpe !!" + chr(10) + ;
"La cantidad de articulo ingresada es inválida","Atención")
Form_122.Text_3.Setfocus//--> Esta línea está mal colocada
Return nil
Endif
If Form_122.Text_5.Value = 0
MsgInfo("Disculpe !!" + chr(10) + ;
"El precio de articulo ingresado es inválido","Atención")
Form_122.Text_5.Setfocus//--> Esta línea está mal colocada
Return nil
Endif
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. ![Shocked :shock:](./images/smilies/icon_eek.gif)
![Shocked :shock:](./images/smilies/icon_eek.gif)
Re: HMG 3.4.4
Mario me imagino que form_122 es una ventana que abres cada que das de alta un articulo, guardas los datos y terminas la ventana, vuelves a dar de alta cargas la ventana , la activas y asi sucesivamente?
creo que con un poco mas de informacion poodriamos tener una vision mas amplia del problema
como te comente anteriormente, tenemos varias aplicaciones que se ejecutan en mas de 40 equipos, en atencion al publico, y algunas aplicaciones automaticas y trabajan topo el dia y no hemos tenido ese tipo de errores
creo que con un poco mas de informacion poodriamos tener una vision mas amplia del problema
como te comente anteriormente, tenemos varias aplicaciones que se ejecutan en mas de 40 equipos, en atencion al publico, y algunas aplicaciones automaticas y trabajan topo el dia y no hemos tenido ese tipo de errores
-
- Posts: 269
- Joined: Wed Aug 13, 2008 2:35 pm
- Location: Córdoba - Argentina
Re: HMG 3.4.4
Hola Amigos :
asi es Martin , el sistema tiene un fmg principal (Fmg_120) y posteriormente se abren Fmg_121 para seleccionar el nombre del cliente , luego Fgm_122 para seleccionar el articulo , luego Fmg_124 para cerrar la venta .
El Fmg_122 lo utilizo para seleccionar el codigo , sino se conoce el codigo se abre el Fmg_123 para busqueda en la base de datos de articulos .
El detalle que menciona Salinetas24 es que antes de grabar la venta el procedimiento evalua los datos , si son incorrectos como espacios vacios en el nombre o importe negativo , coloco el foco en el textbox que corresponde y termino el procedimiento .
Les adjunto el prg completo para que lo analizen .
Muchas gracias por su ayuda .
Saludos
Mario Mansilla
Hello friends :
this is Martin, the system has a main fmg (Fmg_120) and then Fmg_121 is opened to select the customer's name, then Fgm_122 to select the item, then Fmg_124 to close the sale.
The Fmg_122 I use it to select the code, but it is known the code opens the Fmg_123 for search in the database of articles.
The detail mentioned by Salinetas24 is that before recording the sale the procedure evaluates the data, if they are incorrect as empty spaces in the name or negative amount, I place the focus in the corresponding textbox and finish the procedure.
I enclose the complete prg for you to analyze it.
Thank you very much for your help .
regards
Mario Mansilla
*-----------------------------------
* Programa : Presu.prg
* Contenido : Modulo presupuestos
*-----------------------------------
#include <hmg.ch>
*---------------
Function Presu
*---------------
If Verifico() = .F.
Return nil
Endif
nroimpresion := 10
c_Cliente := Space(8)
c_Nombre := Space(32)
c_Riva := Space(2)
c_Cuit := Space(13)
c_Ibruto := Space(13)
c_Dni := Space(13)
c_Domicilio := Space(30)
c_Localidad := Space(20)
c_Provincia := Space(20)
c_Postal := Space(4)
c_Modo := 1
c_Lispre := 1
c_TipoFac := "A"
c_Compro := c_Ptovta
c_Numero := "00000000"
c_Fecha := Date()
c_Hora := Time()
c_Nroid := Strzero(Terminal,2) + Dtos(Date()) + Strzero(Seconds(),5)
c_Total := 0
c_Subtotal := 0
c_Descuento := 0
c_PorcDesc := 0
c_Iva0 := 0
c_Iva1 := 0
c_Iva2 := 0
c_Iva3 := 0
c_Iva4 := 0
c_Iva5 := 0
c_Iva6 := 0
c_Iva7 := 0
c_Iva8 := 0
c_Iva9 := 0
c_Iva10 := 0
c_Tiva0 := 0
c_Tiva1 := 0
c_Tiva2 := 0
c_Tiva3 := 0
c_Tiva4 := 0
c_Tiva5 := 0
c_Tiva6 := 0
c_Tiva7 := 0
c_Tiva8 := 0
c_Tiva9 := 0
c_Tiva10 := 0
c_Impint := 0
c_TipPago := Space(16)
c_NomPago := Space(16)
c_Empleado := 0
c_Sincro := .F.
Do Case
Case Terminal = 3
Cuerpo := "Ventas3"
Case Terminal = 2
Cuerpo := "Ventas2"
Case Terminal = 1
Cuerpo := "Ventas"
Endcase
*--
Select 1
Use Empleado Index Empleado Shared New
Empleado->(DbSetOrder(1))
Empleado->(DbGoTop())
aEmpleado1 := {}
aEmpleado2 := {}
Do While !Eof()
aadd ( aEmpleado1 , { Empleado->Codigo , Empleado->Nombre } )
aadd ( aEmpleado2 , Empleado->Nombre )
Empleado->(DbSkip(1))
Enddo
Close Empleado
*--
Load Window Form_120
Form_120.Button_1.Enabled := .F.
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .F.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .F.
ON KEY F10 OF FORM_120 ACTION THISWINDOW.RELEASE
Center Window Form_120
Activate Window Form_120
Return
*-------------------
Static PROCEDURE Abrir_Bases
*-------------------
*-- Abro Bases
Do Case
Case Terminal = 3
Select 18
Use Ventas3 Exclusive New
Zap
Case Terminal = 2
Select 17
Use Ventas2 Exclusive New
Zap
Case Terminal = 1
Select 16
Use Ventas Exclusive New
Zap
Endcase
Go Top
*--
Select 15
Use Usuario Shared New
Go Top
*--
Select 14
Use Caja Shared New
Go Top
*--
Select 13
Use Nrecibo Shared New
Go Top
c_Numero := Nrecibo->(Strzero(PR + 1,8))
Form_120.Label_4.Value := c_Compro + " - " + Nrecibo->(Strzero(PR + 1,8))
*--
Select 12
Use Empleado Index Empleado Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 11
Use F_pago Index F_pago Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 10
Use Tiva Index Tiva Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 9
Use Mov_stk Index Mov_stk Shared New
Set Order To 1
Go Top
*--
Select 8
Use Rubros Index Rubros Shared New
Set Order To 1
Go Top
*--
Select 7
Use Arti Index Arti Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 6
Use Cliente Index Cliente Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 5
Use Agenda Index Agenda Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 4
Use Histsali Index Histsali Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 3
Use Salida Index Salida Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 2
Use Histpres Index Histpres Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 1
Use Presu Index Presu Shared New
Set Order to Tag Indice_1
Go Top
Form_120.Text_21.Value := 0
Form_120.Text_21.Setfocus
Return
*-----------------------
Static Procedure Cerrar_Bases
*-----------------------
Do Case
Case Terminal = 3
Close Ventas3
Case Terminal = 2
Close Ventas2
Case Terminal = 1
Close Ventas
Endcase
Close Usuario
Close Caja
Close Nrecibo
Close Empleado
Close F_pago
Close Tiva
Close Mov_stk
Close Rubros
Close Arti
Close Cliente
Close Agenda
Close Histsali
Close Salida
Close Histpres
Close Presu
Return
*-------------------
Static Procedure BL_Cliente
*-------------------
Select Agenda
Agenda->(DbSetOrder(1))
Agenda->(DbgoTop())
Load Window Form_121
Form_121.Combo_1a.Value := 2
Form_121.Text_1a.Setfocus
ON KEY ESCAPE OF FORM_121 ACTION (THISWINDOW.RELEASE , Form_120.Text_21.Setfocus)
Actualizar_Cliente()
Center Window Form_121
Activate Window Form_121
Return
*-------------------
Static Procedure BF_Cliente
*-------------------
Local nCodigo := Form_120.Text_21.Value
Local lRefresca := .F.
Select Agenda
Agenda->(DbSetOrder(1))
Agenda->(DbGotop())
If nCodigo = 0
Load Window Form_121
Form_121.Combo_1a.Value := 2
Form_121.Text_1a.Setfocus
ON KEY ESCAPE OF FORM_121 ACTION (THISWINDOW.RELEASE , Form_120.Text_21.Setfocus)
Actualizar_Cliente()
Center Window Form_121
Activate Window Form_121
Else
Agenda->(DbSeek(Str(nCodigo,8)))
If Found()
Form_120.Text_21.Value := Val(Agenda->Codigo)
Form_120.Text_22.Value := Agenda->Nombre1
Form_120.Text_221.Value := Agenda->Direccion
Form_120.Text_222.Value := Agenda->Localidad
Form_120.Text_223.Value := Agenda->Cpostal
Form_120.Text_224.Value := Agenda->Provincia
c_Cliente := Agenda->Codigo
c_Nombre := Agenda->Nombre1
c_Domicilio := Agenda->Direccion
c_Localidad := Agenda->Localidad
c_Provincia := Agenda->Provincia
c_Postal := Agenda->Cpostal
c_Riva := Agenda->Iva
c_Cuit := Agenda->Cuit
c_Ibruto := Agenda->Ib
c_Dni := Agenda->Dni
c_Lispre := Agenda->Lispre
Do Case
Case Agenda->Iva = "RESPONSABLE INSCRIPTO"
Form_120.Combo_3.Value := 1
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "A"
Case Agenda->Iva = "RESP.MONOTRIBUTO "
Form_120.Combo_3.Value := 2
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "EXENTO "
Form_120.Combo_2.Value := 3
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "CONSUMIDOR FINAL "
Form_120.Combo_3.Value := 4
Form_120.Text_23.Value := Agenda->Dni
c_TipoFac := "B"
Endcase
*--
If Form_120.Text_21.Value <> 0
Do Case
Case Terminal = 1
If Ventas->(Recc()) > 0
lRefresca := .T.
Endif
Case Terminal = 2
If Ventas2->(Recc()) > 0
lRefresca := .T.
Endif
Case Terminal = 3
If Ventas3->(Recc()) > 0
lRefresca := .T.
Endif
Endcase
If lRefresca
Refresca_Venta()
Else
Form_120.Button_1.Enabled := .T.
ON KEY F3 OF FORM_120 ACTION (ALTA_VENTA())
Form_120.Button_1.Setfocus
Endif
*--
Form_120.Combo_1.Value := c_Lispre
*--
Endif
Else
Load Window Form_121
Form_121.Combo_1a.Value := 2
Form_121.Text_1a.Setfocus
ON KEY ESCAPE OF FORM_121 ACTION (THISWINDOW.RELEASE , Form_120.Text_21.Setfocus)
Actualizar_Cliente()
Center Window Form_121
Activate Window Form_121
Endif
Endif
Return
*--------------------
Static Procedure Completa_Documento
*--------------------
If c_Riva = "CONSUMIDOR FINAL "
c_Dni := Alltrim(Form_120.Text_23.Value)
Endif
Return
*--------------------
Static Procedure Completa_Provincia
*--------------------
c_Provincia := Alltrim(Form_120.Text_224.Value)
Form_120.Browse_1.Setfocus
Return
*------------------------
Static Procedure Indice_Cliente
*------------------------
Do Case
Case Form_121.Combo_1a.Value = 1
Set Order To Tag Indice_1
Case Form_121.Combo_1a.Value = 2
Set Order To Tag Indice_3
Endcase
Modify Control Text_1a Of Form_121 Value Space(20)
Agenda->(DbGoTop())
Form_121.Browse_1.Refresh
Form_121.Browse_1.Value := Agenda->(Recno())
Form_121.Browse_1.Setfocus
Return
*------------------------
Static Procedure Buscar_Cliente
*------------------------
Local lDigito := .T.
Local cBusca := Alltrim(Form_121.Text_1a.Value)
Do Case
Case Form_121.Combo_1a.Value = 1
For I = 1 To Len(cBusca)
*--
If !IsDigit(Substr(cBusca,I,1))
ldigito := .F.
Exit
Endif
*--
Next
If lDigito
Agenda->(DbSeek(Str(Val(cBusca),8)))
Else
MsgInfo("Disculpe !!" + chr(10) + ;
"Debe ingresar un valor numerico","Atención")
Form_121.Text_10.Value := Space(20)
Endif
Case Form_121.Combo_1a.Value = 2
Agenda->(DbSeek(cBusca))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_121.Text_1a.Value := Substr(Form_121.Text_1a.Value,1,Len(Form_121.Text_1a.Value) - 1)
Form_121.Text_1a.Caretpos := Len(Form_121.Text_1a.Value)
Form_121.Text_1a.Setfocus
Endif
Endcase
Form_121.Browse_1.Value := Recno()
Return
*--------------------------
Static Procedure Actualizar_Cliente
*--------------------------
Form_121.Text_1.Value := Val(Agenda->Codigo)
Form_121.Text_2.Value := Agenda->Nombre
Form_121.Text_3.Value := Agenda->Nombre1
Do Case
Case Agenda->Iva = "RESPONSABLE INSCRIPTO"
Form_121.Combo_1.Value := 1
Case Agenda->Iva = "RESP.MONOTRIBUTO "
Form_121.Combo_1.Value := 2
Case Agenda->Iva = "EXENTO "
Form_121.Combo_1.Value := 3
Case Agenda->Iva = "CONSUMIDOR FINAL "
Form_121.Combo_1.Value := 4
Endcase
Form_121.Text_4.Value := Agenda->Cuit
Form_121.Text_5.Value := Agenda->Dni
Form_121.Text_6.Value := Agenda->Ib
Form_121.Text_7.Value := Agenda->Direccion
Form_121.Text_8.Value := Agenda->Localidad
Form_121.Text_9.Value := Agenda->Provincia
Return
*-----------------------------
Static Procedure Aceptar_Cliente
*-----------------------------
Local c_Refresca := .F.
Thiswindow.Release
*-- Tab 1
Form_120.Text_21.Value := Agenda->(Val(Codigo))
Form_120.Text_22.Value := Agenda->Nombre1
c_Cliente := Agenda->Codigo
c_Nombre := Agenda->Nombre1
c_Domicilio := Agenda->Direccion
c_Localidad := Agenda->Localidad
c_Provincia := Agenda->Provincia
c_Postal := Agenda->Cpostal
c_Riva := Agenda->Iva
c_Cuit := Agenda->Cuit
c_Ibruto := Agenda->Ib
c_Dni := Agenda->Dni
c_Lispre := Agenda->Lispre
Do Case
Case Agenda->Iva = "RESPONSABLE INSCRIPTO"
Form_120.Combo_3.Value := 1
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "A"
Case Agenda->Iva = "RESP.MONOTRIBUTO "
Form_120.Combo_3.Value := 2
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "EXENTO "
Form_120.Combo_3.Value := 3
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "CONSUMIDOR FINAL "
Form_120.Combo_3.Value := 4
Form_120.Text_23.Value := Agenda->Dni
c_TipoFac := "B"
Endcase
*-- Tab 2
Form_120.Text_221.Value := Agenda->Direccion
Form_120.Text_222.Value := Agenda->Localidad
Form_120.Text_223.Value := Agenda->Cpostal
Form_120.Text_224.Value := Agenda->Provincia
Do Case
Case Terminal = 1
If Ventas->(Recc()) > 0
c_Refresca := .T.
Endif
Case Terminal = 2
If Ventas2->(Recc()) > 0
c_Refresca := .T.
Endif
Case Terminal = 3
If Ventas3->(Recc()) > 0
c_Refresca := .T.
Endif
Endcase
If c_Refresca
Refresca_Venta()
Else
Form_120.Button_1.Enabled := .T.
ON KEY F3 OF FORM_120 ACTION (ALTA_VENTA())
Form_120.Button_1.Setfocus
Endif
*--
Form_120.Combo_1.Value := c_Lispre
*--
Return
*----------------------
Static Procedure B_Empleado
*----------------------
If Form_120.Combo_2.Value > 0
c_Empleado := aEmpleado1 [ Form_120.Combo_2.Value , 1 ]
Form_120.Text_12.Value := Val(c_Empleado)
Form_120.Button_1.Setfocus
Else
Msginfo("Disculpe !!" + chr(10) + ;
"Olvida seleccionar el vendedor de la operación","TFWIN Géstion")
Form_120.Combo_2.Setfocus
Endif
Return
*-------------------
Static Procedure Lista_Venta
*-------------------
Local c_Dbf := Select()
Local c_num := 0
Do Case
Case Terminal = 1
Select Ventas
c_num := Recc()
Case Terminal = 2
Select Ventas2
c_num := Recc()
Case Terminal = 3
Select Ventas3
c_num := Recc()
Endcase
Do Case
Case Form_120.Combo_1.Value = 1
c_Lispre := 1
Case Form_120.Combo_1.Value = 2
c_Lispre := 2
Case Form_120.Combo_1.Value = 3
c_Lispre := 3
Endcase
If c_num > 0
Form_120.Browse_1.Setfocus
Refresca_Venta()
Else
If Form_120.Text_21.Value = 0
Form_120.Text_21.Setfocus
Endif
Endif
Return
*-------------------
Static Procedure Alta_Venta
*-------------------
c_Modo := 1
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
If Recc() > 25 // 12 para hoja A4/2
MsgInfo("Limite de articulos en presupuesto","Atención")
Return nil
Endif
Load Window Form_122
ON KEY ESCAPE OF FORM_122 ACTION THISWINDOW.RELEASE
ON KEY UP OF FORM_122 ACTION (Move_Focus())
Form_122.Text_1.Value := Space(13)
Form_122.Text_3.Value := 1
Form_122.Text_4.Value := 0.00
Form_122.Text_5.value := 0.00
Center Window Form_122
Activate Window Form_122
Return
*-------------------
Static Procedure Modi_Venta
*-------------------
c_Modo := 2
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
Load Window Form_122
ON KEY UP OF FORM_122 ACTION (Move_Focus())
Form_122.Text_1.Value := Codigo
Form_122.Text_2.Value := Articulo
Form_122.Text_3.Value := Cantidad
Form_122.Text_4.Value := Descuento
Form_122.Text_5.Value := Importe
Center Window Form_122
Activate Window Form_122
Return
*-------------------
Static Procedure Borra_Venta
*-------------------
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
Delete // Ventas->(DbDelete())
Pack // Ventas->(__DbPack())
Actualiza_Venta()
Return
*-------------------
Static Procedure Pago_Venta
*-------------------
If Empty(c_Empleado)
MsgStop("Disculpe !!" + chr(10) + ;
"Ud.olvida ingresar el vendedor","Atención")
Form_120.Combo_2.Setfocus
Return nil
Endif
If c_Riva = "CONSUMIDOR FINAL " .AND. c_Total >= 1000
If Empty(c_Dni) .or. Empty(c_Domicilio)
MsgStop("Las operaciones a consumidor final superiores a $ 1000.00" + chr(10) + ;
"Obligan a completar los datos del comprador siguientes : " + chr(10) + ;
" 1 - Domicilio " + chr(10) + ;
" 2 - Localidad " + chr(10) + ;
" 3 - Documento " , "Atención")
Return nil
Endif
Endif
Select F_pago
F_pago->(DbSetOrder(1))
F_pago->(DbgoTop())
Load Window Form_124
ON KEY ESCAPE OF FORM_124 ACTION THISWINDOW.RELEASE
Form_124.Label_1.Value := "TOTAL $ " + LTRIM(STR(c_Total,12,2))
Form_124.Text_1.Value := c_Total
Form_124.Label_4.Hide
Form_124.Check_1.Value := .F.
Center Window Form_124
Activate Window Form_124
Return
*------------------------
Static Procedure Sincroniza
*------------------------
Do Case
Case Form_124.Check_1.Value = .T.
c_Sincro := .T.
Case Form_124.Check_1.Value = .F.
c_Sincro := .F.
Endcase
*----------------------------
Static Procedure Cancelar_Pago
*----------------------------
Thiswindow.Release
Do Case
Case Terminal = 3
Select Ventas3
Ventas3->(DbGoTop())
Case Terminal = 2
Select Ventas2
Ventas2->(DbGoTop())
Case Terminal = 1
Select Ventas
Ventas->(DbGoTop())
Endcase
Form_120.Browse_1.Refresh
Form_120.Browse_1.Value := (Recno())
Form_120.Browse_1.Setfocus
Return
*----------------------------
Static Procedure Aceptar_Pago
*----------------------------
Local c_Supago := Form_124.Text_1.Value
If c_Supago >= Round(c_Total,2)
Form_124.Button_1.Hide
Form_124.Button_2.Hide
Form_124.Label_4.Show
*--
* Proceso Nrecibo
*--
Select Nrecibo
Go Top
c_Numero := Strzero(PR + 1,8)
If Nrecibo->(Rlock())
*--
Replace PR With Val(c_Numero)
Unlock
*--
Endif
*--
* Forma de pago
*--
F_Pago->(DbSeek(Str(Form_124.Combo_1.Value,2)))
c_TipPago := F_Pago->Tipo
c_NomPago := F_Pago->Nombre
Do Case
Case Terminal = 1
SELECT VENTAS
GO TOP
Case Terminal = 2
SELECT VENTAS2
GO TOP
Case Terminal = 3
SELECT VENTAS3
GO TOP
Endcase
DO WHILE !EOF()
*--
T_Tipo := c_Tipofac
T_PvtaFac := c_Compro
T_NumFac := c_Numero
T_Articulo := ARTICULO
*--
IF C_TipoFac = "A"
T_Importe := IMPORTE + (IMPORTE * (TIVA/100))
ELSE
T_Importe := IMPORTE
ENDIF
*--
T_Cantidad := CANTIDAD
T_Familia := FAMILIA
T_Rubro := RUBRO
T_Codigo := CODIGO
T_Fecha := FECHA
T_Hora := HORA
T_Tiva := TIVA
T_Impint := IMPINT
T_Unitario := UNITARIO
T_Descuento := DESCUENTO
*--
SKIP
*--
c_Reg = RECNO()
*--
* Grabo Historico
*--
SELECT Histpres
Histpres->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un eror abriendo Histpres.Dbf ..","Atención")
Else
REPLACE HISTPRES->FECHA WITH T_Fecha
REPLACE HISTPRES->HORA WITH T_Hora
REPLACE HISTPRES->TIPO WITH T_Tipo
REPLACE HISTPRES->COMPRO WITH T_PvtaFac
REPLACE HISTPRES->NUMERO WITH T_NumFac
REPLACE HISTPRES->ARTICULO WITH T_Articulo
REPLACE HISTPRES->FAMILIA WITH T_Familia
REPLACE HISTPRES->RUBRO WITH T_Rubro
REPLACE HISTPRES->EMPLEADO WITH c_Empleado
REPLACE HISTPRES->CODIGO WITH T_Codigo
REPLACE HISTPRES->CANTIDAD WITH T_Cantidad
*--
IF C_TipoFac = "A"
REPLACE HISTPRES->IMPORTE WITH ROUND(T_Importe / ((T_Tiva/100)+1), 2)
ELSE
REPLACE HISTPRES->IMPORTE WITH T_Importe
ENDIF
*--
REPLACE HISTPRES->TIVA WITH T_Tiva
REPLACE HISTPRES->IMPINT WITH T_Impint
*--
REPLACE HISTPRES->UNITARIO WITH T_Unitario
REPLACE HISTPRES->DESCUENTO WITH T_Descuento // DESCUENTO UNITARIO
REPLACE HISTPRES->DESC_TOTAL WITH C_PorcDesc // DESCUENTO GENERAL
*--
Unlock
*--
Endif
If c_Sincro = .T.
*--
* Proceso salida
*--
SELECT Histsali
Histsali->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un eror abriendo Histsali.Dbf ..","Atención")
Else
REPLACE HISTSALI->FECHA WITH T_Fecha
REPLACE HISTSALI->HORA WITH T_Hora
REPLACE HISTSALI->TIPO WITH T_Tipo
REPLACE HISTSALI->COMPRO WITH T_PvtaFac
REPLACE HISTSALI->NUMERO WITH T_NumFac
REPLACE HISTSALI->ARTICULO WITH T_Articulo
REPLACE HISTSALI->FAMILIA WITH T_Familia
REPLACE HISTSALI->RUBRO WITH T_Rubro
REPLACE HISTSALI->EMPLEADO WITH c_Empleado
REPLACE HISTSALI->CODIGO WITH T_Codigo
REPLACE HISTSALI->CANTIDAD WITH T_Cantidad
*--
IF C_TipoFac = "A"
REPLACE HISTSALI->IMPORTE WITH ROUND(T_Importe / ((T_Tiva/100)+1), 2)
ELSE
REPLACE HISTSALI->IMPORTE WITH T_Importe
ENDIF
*--
REPLACE HISTSALI->TIVA WITH T_Tiva
REPLACE HISTSALI->IMPINT WITH T_Impint
*--
REPLACE HISTSALI->UNITARIO WITH T_Unitario
REPLACE HISTSALI->DESCUENTO WITH T_Descuento // DESCUENTO UNITARIO
REPLACE HISTSALI->DESC_TOTAL WITH C_PorcDesc // DESCUENTO GENERAL
*--
Unlock
*--
Endif
*--
* Proceso Stock
*--
SELECT Arti
Arti->(DbSetOrder(2))
Arti->(DbGoTop())
Arti->(DbSeek(T_Codigo))
If Arti->(Found())
If Arti->(Rlock())
Ant_Cant := ARTI->STOCK
IF (Ant_Cant - T_Cantidad) < -1000
REPLACE ARTI->STOCK WITH -1000
ELSE
REPLACE ARTI->STOCK WITH Ant_Cant - T_Cantidad
ENDIF
Unlock
Endif
Endif
SELECT Mov_Stk
Mov_Stk->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un error abriendo Mov_Stk.Dbf ..","Atención")
Else
REPLACE MOV_STK->FECHA WITH T_Fecha
REPLACE MOV_STK->CODIGO WITH T_Codigo
REPLACE MOV_STK->ARTICULO WITH T_Articulo
REPLACE MOV_STK->STK_SAL WITH T_Cantidad
REPLACE MOV_STK->STK_ING WITH 0
REPLACE MOV_STK->MOVI WITH "FC"
REPLACE MOV_STK->TIPO WITH T_Tipo
REPLACE MOV_STK->COMPRO WITH T_PvtaFac
REPLACE MOV_STK->NUMERO WITH T_NumFac
REPLACE MOV_STK->PROVEE WITH SPACE(4)
*--
Unlock
*--
Endif
Endif
Do Case
Case Terminal = 1
SELECT VENTAS
Case Terminal = 2
SELECT VENTAS2
Case Terminal = 3
SELECT VENTAS3
Endcase
GO c_Reg
*--
Enddo
*--
* Proceso Presupuestos
*--
*--
SELECT PRESU
PRESU->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un error abriendo Presu.Dbf ..","Atención")
Else
*--
REPLACE PRESU->FECHA WITH C_Fecha
REPLACE PRESU->HORA WITH c_Hora
REPLACE PRESU->MOVI WITH "PR"
REPLACE PRESU->NOMBRE WITH C_Nombre
REPLACE PRESU->CODIGO WITH C_Cliente
REPLACE PRESU->TIPO WITH C_TipoFac
REPLACE PRESU->COMPRO WITH C_Compro
REPLACE PRESU->NUMERO WITH C_Numero
*REPLACE PRESU->REMITO WITH C_Remito
REPLACE PRESU->DOMICILIO WITH c_Domicilio
REPLACE PRESU->LOCALIDAD WITH c_Localidad
REPLACE PRESU->PROVINCIA WITH c_Provincia
REPLACE PRESU->CODPOS WITH c_Postal
REPLACE PRESU->IBRUTO WITH c_Ibruto
REPLACE PRESU->CUIT WITH c_Cuit
REPLACE PRESU->DNI WITH c_Dni
REPLACE PRESU->COND_IVA WITH c_Riva
REPLACE PRESU->NETO WITH c_Total
REPLACE PRESU->DESCUENTO WITH c_Descuento
REPLACE PRESU->PORCEDESC WITH c_PorcDesc
REPLACE PRESU->IMPINT WITH c_Impint
REPLACE PRESU->LISPRE WITH c_Lispre
REPLACE PRESU->EMPLEADO WITH c_Empleado
*--
REPLACE PRESU->TIVA0 WITH C_Tiva0
REPLACE PRESU->TIVA1 WITH C_Tiva1
REPLACE PRESU->TIVA2 WITH C_Tiva2
REPLACE PRESU->TIVA3 WITH C_Tiva3
REPLACE PRESU->TIVA4 WITH C_Tiva4
REPLACE PRESU->TIVA5 WITH C_Tiva5
REPLACE PRESU->TIVA6 WITH C_Tiva6
REPLACE PRESU->TIVA7 WITH C_Tiva7
REPLACE PRESU->TIVA8 WITH C_Tiva8
REPLACE PRESU->TIVA9 WITH C_Tiva9
REPLACE PRESU->TIVA10 WITH C_Tiva10
*--
If C_TipoFac = "B"
REPLACE PRESU->IVA0 WITH C_Iva0
REPLACE PRESU->IVA1 WITH C_Iva1
REPLACE PRESU->IVA2 WITH C_Iva2
REPLACE PRESU->IVA3 WITH C_Iva3
REPLACE PRESU->IVA4 WITH C_Iva4
REPLACE PRESU->IVA5 WITH C_Iva5
REPLACE PRESU->IVA6 WITH C_Iva6
REPLACE PRESU->IVA7 WITH C_Iva7
REPLACE PRESU->IVA8 WITH C_Iva8
REPLACE PRESU->IVA9 WITH C_Iva9
REPLACE PRESU->IVA10 WITH C_Iva10
Else
REPLACE PRESU->IVA0 WITH round(C_Iva0,2)
REPLACE PRESU->IVA1 WITH round(C_Iva1,2)
REPLACE PRESU->IVA2 WITH round(C_Iva2,2)
REPLACE PRESU->IVA3 WITH round(C_Iva3,2)
REPLACE PRESU->IVA4 WITH round(C_Iva4,2)
REPLACE PRESU->IVA5 WITH round(C_Iva5,2)
REPLACE PRESU->IVA6 WITH round(C_Iva6,2)
REPLACE PRESU->IVA7 WITH round(C_Iva7,2)
REPLACE PRESU->IVA8 WITH round(C_Iva8,2)
REPLACE PRESU->IVA9 WITH round(C_Iva9,2)
REPLACE PRESU->IVA10 WITH round(C_Iva10,2)
Endif
*--
REPLACE PRESU->PAGO WITH C_NomPago
REPLACE PRESU->TIPOPAGO WITH C_TipPago
Unlock
*--
Endif
If c_Sincro = .T.
*--
* Proceso salida
*--
*--
SELECT SALIDA
SALIDA->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un error abriendo Salida.Dbf ..","Atención")
Else
*--
REPLACE SALIDA->FECHA WITH C_Fecha
REPLACE SALIDA->HORA WITH c_Hora
REPLACE SALIDA->MOVI WITH "PR"
REPLACE SALIDA->NOMBRE WITH C_Nombre
REPLACE SALIDA->CODIGO WITH C_Cliente
REPLACE SALIDA->TIPO WITH C_TipoFac
REPLACE SALIDA->COMPRO WITH C_Compro
REPLACE SALIDA->NUMERO WITH C_Numero
*REPLACE SALIDA->REMITO WITH C_Remito
REPLACE SALIDA->DOMICILIO WITH c_Domicilio
REPLACE SALIDA->LOCALIDAD WITH c_Localidad
REPLACE SALIDA->PROVINCIA WITH c_Provincia
REPLACE SALIDA->CODPOS WITH c_Postal
REPLACE SALIDA->IBRUTO WITH c_Ibruto
REPLACE SALIDA->CUIT WITH c_Cuit
REPLACE SALIDA->DNI WITH c_Dni
REPLACE SALIDA->COND_IVA WITH c_Riva
REPLACE SALIDA->NETO WITH c_Total
REPLACE SALIDA->DESCUENTO WITH c_Descuento
REPLACE SALIDA->PORCEDESC WITH c_PorcDesc
REPLACE SALIDA->IMPINT WITH c_Impint
REPLACE SALIDA->LISPRE WITH c_Lispre
REPLACE SALIDA->EMPLEADO WITH c_Empleado
*--
REPLACE SALIDA->TIVA0 WITH C_Tiva0
REPLACE SALIDA->TIVA1 WITH C_Tiva1
REPLACE SALIDA->TIVA2 WITH C_Tiva2
REPLACE SALIDA->TIVA3 WITH C_Tiva3
REPLACE SALIDA->TIVA4 WITH C_Tiva4
REPLACE SALIDA->TIVA5 WITH C_Tiva5
REPLACE SALIDA->TIVA6 WITH C_Tiva6
REPLACE SALIDA->TIVA7 WITH C_Tiva7
REPLACE SALIDA->TIVA8 WITH C_Tiva8
REPLACE SALIDA->TIVA9 WITH C_Tiva9
REPLACE SALIDA->TIVA10 WITH C_Tiva10
*--
If C_TipoFac = "B"
REPLACE SALIDA->IVA0 WITH C_Iva0
REPLACE SALIDA->IVA1 WITH C_Iva1
REPLACE SALIDA->IVA2 WITH C_Iva2
REPLACE SALIDA->IVA3 WITH C_Iva3
REPLACE SALIDA->IVA4 WITH C_Iva4
REPLACE SALIDA->IVA5 WITH C_Iva5
REPLACE SALIDA->IVA6 WITH C_Iva6
REPLACE SALIDA->IVA7 WITH C_Iva7
REPLACE SALIDA->IVA8 WITH C_Iva8
REPLACE SALIDA->IVA9 WITH C_Iva9
REPLACE SALIDA->IVA10 WITH C_Iva10
Else
REPLACE SALIDA->IVA0 WITH round(C_Iva0,2)
REPLACE SALIDA->IVA1 WITH round(C_Iva1,2)
REPLACE SALIDA->IVA2 WITH round(C_Iva2,2)
REPLACE SALIDA->IVA3 WITH round(C_Iva3,2)
REPLACE SALIDA->IVA4 WITH round(C_Iva4,2)
REPLACE SALIDA->IVA5 WITH round(C_Iva5,2)
REPLACE SALIDA->IVA6 WITH round(C_Iva6,2)
REPLACE SALIDA->IVA7 WITH round(C_Iva7,2)
REPLACE SALIDA->IVA8 WITH round(C_Iva8,2)
REPLACE SALIDA->IVA9 WITH round(C_Iva9,2)
REPLACE SALIDA->IVA10 WITH round(C_Iva10,2)
Endif
*--
REPLACE SALIDA->NETO1 WITH C_Total
REPLACE SALIDA->PAGO1 WITH C_NomPago
REPLACE SALIDA->TIPOPAGO1 WITH C_TipPago
Unlock
*--
Endif
Endif
If c_Sincro = .T.
*--
* Proceso caja
*--
Select Caja
Go Top
If Rlock()
*--
Replace N_SALI With N_SALI + 1
Do Case
Case c_TipPago = "CUENTA CORRIENTE"
Replace C_SALI With C_SALI + c_Total
Case c_TipPago = "TARJETA CREDITO " .or. c_TipPago = "TARJETA DEBITO "
Replace T_SALI With T_SALI + c_Total
Case c_TipPago = "CHEQUE "
Replace V_SALI With V_SALI + c_Total
Case c_TipPago = "CONTADO "
Replace E_SALI With E_SALI + c_Total
Endcase
*--
Unlock
*--
Endif
Endif
*--
Dialogo_Impresion()
*--
Else
MsgInfo("Su pago es inferior al total de la factura","Atención")
Form_124.Text_1.Value := c_Total
Form_124.Text_1.Setfocus
Return nil
Endif
MsgInfo("!! El presupuesto " + c_Numero + " se grabó correctamente !!","TFWIN Géstion")
Form_124.Release
*---------------*
* Puesta a cero *
RELEASE MEMORY
*---------------*
Select Nrecibo
Go Top
c_Numero := Nrecibo->(Strzero(PR + 1,8))
Form_120.Label_4.Value := c_Compro + " - " + Nrecibo->(Strzero(PR + 1,8))
Do Case
Case Terminal = 1
SELECT VENTAS
Zap
Case Terminal = 2
SELECT VENTAS2
Zap
Case Terminal = 3
SELECT VENTAS3
Zap
Endcase
Form_120.Browse_1.Refresh
Form_120.Button_1.Enabled := .F.
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .F.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .F.
Form_120.Label_41.Value := "0.00"
Form_120.Label_42.Value := "0.00"
Form_120.Label_43.Value := "0.00"
Form_120.Label_44.Value := "0.00"
Form_120.Label_45.Value := "0.00"
Form_120.Label_60.Value := "0.00"
c_Lista := 1
c_Empleado := 0
c_PorcDesc := 0
c_Sincro := .F.
Form_120.Tab_1.Value := 1
Form_120.Text_11.Value := 1
Form_120.Text_12.Value := 0
Form_120.Combo_1.Value := 1
Form_120.Combo_2.Value := 0
Form_120.Text_50.Value := 0
Form_120.Text_21.Value := 0
Form_120.Text_21.Setfocus
Return
*----------------------
Static Procedure Aceptar_Venta
*----------------------
If Empty(Form_122.Text_1.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El codigo de articulo ingresado es inválido","Atención")
Form_122.Text_1.Setfocus
Return nil
Endif
If Empty(Form_122.Text_2.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El nombre de articulo codigo ingresado es inválido","Atención")
Form_122.Text_2.Setfocus
Return nil
Endif
If Form_122.Text_3.Value <= 0
MsgInfo("Disculpe !!" + chr(10) + ;
"La cantidad de articulo ingresada es inválida","Atención")
Form_122.Text_3.Setfocus
Return nil
Endif
If Form_122.Text_5.Value = 0
MsgInfo("Disculpe !!" + chr(10) + ;
"El precio de articulo ingresado es inválido","Atención")
Form_122.Text_5.Setfocus
Return nil
Endif
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
If c_Modo = 1
Append Blank // Ventas->(DbAppend())
Endif
Replace Tipo With c_TipoFac
Replace Compro With c_Compro
Replace Numero With c_Numero
Replace Fecha With Date()
Replace Hora With c_Hora
Replace Codigo With Form_122.Text_1.Value
Replace Familia With Arti->Familia
Replace Rubro With Arti->Rubro
Replace Articulo With Form_122.Text_2.Value
Replace Cantidad With Form_122.Text_3.Value
Replace Tiva With Arti->Tiva
Replace Impint With Arti->Impint
Replace Descuento With Form_122.Text_4.Value
If c_TipoFac = "A"
Replace Unitario With Form_122.Text_5.Value / (1 + (Tiva/100))
Else
Replace Unitario With Form_122.Text_5.Value
Endif
Replace Importe With Unitario * Cantidad
Thiswindow.Release
Form_120.Button_2.Enabled := .T.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .T.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF Form_120 ACTION (Modi_Venta())
ON KEY F5 OF Form_120 ACTION (Borra_Venta())
ON KEY F6 OF Form_120 ACTION (Pago_Venta())
ON KEY F8 OF FORM_120 ACTION nil
Actualiza_Venta()
Return
*---------------------------
Static Procedure Actualiza_Venta
*---------------------------
Local nReg
Local Tempimpo := 0
Local Tempdesc := 0
Local Tempiva := 0
c_Subtotal := 0
c_Descuento := 0
c_Total := 0
c_Iva0 := 0
c_Iva1 := 0
c_Iva2 := 0
c_Iva3 := 0
c_Iva4 := 0
c_Iva5 := 0
c_Iva6 := 0
c_Iva7 := 0
c_Iva8 := 0
c_Iva9 := 0
c_Iva10 := 0
c_Impint := 0
Select Tiva
Set Order To 1
Go Top
Do While !Eof()
*--
Do Case
Case Val(Codigo) = 0
c_Tiva0 := Tasa
Case Val(Codigo) = 1
c_Tiva1 := Tasa
Case Val(Codigo) = 2
c_Tiva2 := Tasa
Case Val(Codigo) = 3
c_Tiva3 := Tasa
Case Val(Codigo) = 4
c_Tiva4 := Tasa
Case Val(Codigo) = 5
c_Tiva5 := Tasa
Case Val(Codigo) = 6
c_Tiva6 := Tasa
Case Val(Codigo) = 7
c_Tiva7 := Tasa
Case Val(Codigo) = 8
c_Tiva8 := Tasa
Case Val(Codigo) = 9
c_Tiva9 := Tasa
Case Val(Codigo) = 10
c_Tiva10 := Tasa
Endcase
*--
Skip
*--
Enddo
Do Case
Case Terminal = 1
Select Ventas
Case Terminal = 2
Select Ventas2
Case Terminal = 3
Select Ventas3
Endcase
nReg := Recno()
Go Top
Do While !(Eof())
*--
IF c_TipoFac = "A"
*--
Tempimpo := IMPORTE - (IMPORTE * (c_PorcDesc / 100))
Tempdesc := IMPORTE * (C_PorcDesc / 100)
C_Descuento := C_Descuento + Tempdesc
c_Impint := c_Impint + (IMPINT * CANTIDAD)
C_Subtotal := C_Subtotal + Tempimpo
*--
IF TIVA = 0.00
C_Iva0 := C_Iva0 + Tempimpo
ENDIF
*--
Do Case
Case Tiva = c_Tiva1
c_Iva1 := c_Iva1 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva2
c_Iva2 := c_Iva2 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva3
c_Iva3 := c_Iva3 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva4
c_Iva4 := c_Iva4 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva5
c_Iva5 := c_Iva5 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva6
c_Iva6 := c_Iva6 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva7
c_Iva7 := c_Iva7 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva8
c_Iva8 := c_Iva8 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva9
c_Iva9 := c_Iva9 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva10
c_Iva10 := c_Iva10 + (Tempimpo * (TIVA/100))
Endcase
*c_Iva := c_Iva + (Tempimp * (TIVA/100))
*--
ELSE
Tempimpo := (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) - (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) * (c_PorcDesc / 100)
Tempdesc := (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) * (c_PorcDesc / 100)
c_Descuento := c_Descuento + Tempdesc
c_Impint := c_Impint + (IMPINT * CANTIDAD)
c_Subtotal := c_Subtotal + Tempimpo
Tempoiva := (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) - (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) * (c_PorcDesc / 100)
*--
IF TIVA = 0.00
C_Iva0 := C_Iva0 + Tempimpo
ENDIF
*--
*--
Do Case
Case Tiva = c_Tiva1
c_Iva1 := c_Iva1 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva2
c_Iva2 := c_Iva2 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva3
c_Iva3 := c_Iva3 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva4
c_Iva4 := c_Iva4 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva5
c_Iva5 := c_Iva5 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva6
c_Iva6 := c_Iva6 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva7
c_Iva7 := c_Iva7 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva8
c_Iva8 := c_Iva8 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva9
c_Iva9 := c_Iva9 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva10
c_Iva10 := c_Iva10 + (Tempoiva * (TIVA/100))
Endcase
*c_Iva := c_Iva + (Imp * (TIVA/100))
*--
ENDIF
*--
Do Events
Skip(1)
*--
Enddo
*--
Go nReg
*--
If c_TipoFac = "A"
c_Total := c_Subtotal + c_Iva1 + c_Iva2 + c_Iva3 + c_Iva4 + c_Impint
Else
c_Total := c_Subtotal + c_Iva1 + c_Iva2 + c_Iva3 + c_Iva4 + c_Impint
Endif
Modify Control Label_41 Of Form_120 Value Str(c_Subtotal,10,2)
Modify Control Label_42 Of Form_120 Value Str(c_Impint,10,2)
Modify Control Label_43 Of Form_120 Value Str(c_Subtotal + c_Impint,10,2)
Modify Control Label_44 Of Form_120 Value Str(c_Iva1,10,2)
Modify Control Label_45 Of Form_120 Value Str(c_Iva2,10,2)
Modify Control Label_60 Of Form_120 Value Str(c_Total,10,2)
If c_Total <= 0
If Recc() > 0
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF FORM_120 ACTION nil
ON KEY F5 OF FORM_120 ACTION (Borra_Venta())
ON KEY F6 OF FORM_120 ACTION nil
ON KEY F8 OF FORM_120 ACTION (Refresca_Venta())
Else
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .F.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .F.
ON KEY F4 OF FORM_120 ACTION nil
ON KEY F5 OF FORM_120 ACTION nil
ON KEY F6 OF FORM_120 ACTION nil
ON KEY F8 OF FORM_120 ACTION nil
Endif
Else
Form_120.Button_2.Enabled := .T.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .T.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF FORM_120 ACTION (Modi_Venta())
ON KEY F5 OF FORM_120 ACTION (Borra_Venta())
ON KEY F6 OF FORM_120 ACTION (Pago_Venta())
ON KEY F8 OF FORM_120 ACTION (Refresca_Venta())
Endif
If c_Modo = 1
INSERT_CTRL_END()
Else
Form_120.Browse_1.Refresh
Endif
Form_120.Browse_1.Value := Recno()
Form_120.Browse_1.Setfocus
Return
*---------------------
Static Procedure Refresca_Venta
*---------------------
Local c_Dbf
Local c_codigo
Local c_articulo
c_Modo := 1 // para no tener que hacer ctrl+end
Do Case
Case Terminal = 1
Select Ventas
Case Terminal = 2
Select Ventas2
Case Terminal = 3
Select Ventas3
Endcase
*--
Go Top
*--
Do While !Eof()
c_codigo := Codigo
c_articulo := Articulo
c_dbf := Select()
Select Arti
Arti->(DbSetOrder(2))
Arti->(DbGotop())
Arti->(DbSeek(c_Codigo))
If Arti->(Found())
Do Case
Case c_Lispre = 1
c_precio := Arti->Preven
Case c_Lispre = 2
c_precio := Arti->Preven2
Case c_Lispre = 3
c_precio := Arti->Preven2
Endcase
Endif
Select(c_Dbf)
Replace Tipo With c_TipoFac
Replace Numero With c_Numero
If c_TipoFac = "A"
Replace Unitario With (c_precio - Impint) / (1 + (Tiva/100))
Else
Replace Unitario With c_precio
Endif
Replace Importe With (Unitario * Cantidad) - ((Unitario * Cantidad * Descuento)/100)
*--
Skip
*--
Enddo
Actualiza_Venta()
Return
*--------------
Static Procedure BL_Articulo
*--------------
Select Arti
Arti->(DbSetorder(2))
Arti->(DbGoTop())
Load Window Form_123
ON KEY ESCAPE OF FORM_123 ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123.Combo_1.Value := 2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Form_123.Text_1.Setfocus
Center Window Form_123
Activate Window Form_123
Return
*------------------------
Static Procedure BF_Articulo
*------------------------
Local l_articulo := Alltrim(Form_122.Text_1.Value)
Select Arti
Arti->(DbSetOrder(2))
Arti->(DbGotop())
If Empty(l_articulo)
Load Window Form_123
ON KEY ESCAPE OF FORM_123 ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123.Combo_1.Value := 2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Form_123.Text_1.Setfocus
Center Window Form_123
Activate Window Form_123
Else
Arti->(DbSeek(Padr(l_articulo,20)))
If Found()
Form_122.Text_1.Value := Arti->Codigo
Form_122.Text_2.Value := Arti->Articulo
Do Case
Case c_Lispre = 1
Form_122.Text_5.Value := Arti->Preven
Case c_Lispre = 2
Form_122.Text_5.Value := Arti->Preven2
Case c_Lispre = 3
Form_122.Text_5.Value := Arti->Preven3
Endcase
Form_122.Text_3.Setfocus
Else
Arti->(DbGoTop())
Load Window Form_123
ON KEY ESCAPE OF FORM_123 ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123.Combo_1.Value := 2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Form_123.Text_1.Setfocus
Center Window Form_123
Activate Window Form_123
Endif
Endif
Return
*------------------------
Static Procedure Indice_Articulo
*------------------------
Do Case
Case Form_123.Combo_1.Value = 1
Set Order To Tag Indice_2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Case Form_123.Combo_1.Value = 2
Set Order To Tag Indice_3
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Case Form_123.Combo_1.Value = 3
Set Order To Tag Indice_4
Form_123.Text_1.Enabled := .F.
Form_123.Combo_2.Enabled := .T.
Form_123.Text_1.Hide
Form_123.Combo_2.Show
Endcase
Modify Control Text_1 Of Form_123 Value Space(20)
Arti->(DbGoTop())
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Setfocus
Return
*------------------------
Static Procedure Buscar_Articulo
*------------------------
Local ldigito := .T.
Local lBusca := Trim(Form_123.Text_1.Value)
If !Empty(lBusca)
Do Case
Case Form_123.Combo_1.Value = 1
Arti->(DbSeek(Trim(Form_123.Text_1.Value)))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_123.Text_1.Value := Substr(Form_123.Text_1.Value,1,Len(Form_123.Text_1.Value) - 1)
Form_123.Text_1.Caretpos := Len(Form_123.Text_1.Value)
Form_123.text_1.Setfocus
Endif
Case Form_123.Combo_1.Value = 2
Arti->(DbSeek(Trim(Form_123.Text_1.Value)))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_123.Text_1.Value := Substr(Form_123.Text_1.Value,1,Len(Form_123.Text_1.Value) - 1)
Form_123.Text_1.Caretpos := Len(Form_123.Text_1.Value)
Form_123.text_1.Setfocus
Endif
Endcase
Endif
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Refresh
Return
*--------------------
STATIC PROCEDURE Filtrar_Articulo
*--------------------
Local Filtro := Str(Form_123.Combo_2.Value,4)
Rubros->(DbSetorder(1))
Rubros->(DbSeek(Filtro))
Arti->(Ordscope(0,Filtro))
Arti->(ordScope(1,Filtro))
Arti->(DbGotop())
Form_123.Browse_1.Refresh
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Setfocus
Return
*------------------------
Static Procedure Existe_Articulo
*------------------------
Local ldigito := .T.
Local lBusca := Trim(Form_123.Text_1.Value)
Do Case
Case Form_123.Combo_1.Value = 1
Arti->(DbSeek(lBusca))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_123.Text_1.Value := Substr(Form_123.Text_1.Value,1,Len(Form_123.Text_1.Value) - 1)
Form_123.Text_1.Caretpos := Len(Form_123.Text_1.Value)
Form_123.Text_1.Setfocus
Endif
Endcase
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Refresh
Return
*-----------------------
Static Procedure Aceptar_Articulo
*-----------------------
Thiswindow.Release
Form_122.Text_1.Value := Arti->Codigo
Form_122.Text_2.Value := Arti->Articulo
Do Case
Case c_Lispre = 1
Form_122.Text_5.Value := Arti->Preven
Case c_Lispre = 2
Form_122.Text_5.Value := Arti->Preven2
Case c_Lispre = 3
Form_122.Text_5.Value := Arti->Preven3
Endcase
Form_122.Text_1.Setfocus
Return
*--------------------------
Static Procedure Move_Focus
*--------------------------
Local c_Objeto := This.FocusedControl
Do Case
Case c_Objeto = "Text_5"
Form_122.Text_4.Setfocus
Case c_Objeto = "Text_4"
Form_122.Text_3.Setfocus
Case c_Objeto = "Text_3"
Form_122.Text_2.Setfocus
Endcase
Return
*--------------
Static Procedure BL_Farticulo
*--------------
Select Arti
Arti->(DbSetorder(1))
Arti->(DbGoTop())
Load Window Form_123a
ON KEY ESCAPE OF FORM_123a ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123a.Combo_1.Value := 2
Form_123a.Text_1.Setfocus
Center Window Form_123a
Activate Window Form_123a
Return
*------------------------
Static Procedure Indice_Farticulo
*------------------------
Do Case
Case Form_123a.Combo_1.Value = 1
Set Order To Tag Indice_2
Case Form_123a.Combo_1.Value = 2
Set Order To Tag Indice_3
Endcase
Modify Control Text_1 Of Form_123a Value Space(20)
Arti->(DbGoTop())
Form_123a.Text_1.Setfocus
Return
*------------------------
Static Procedure Buscar_Farticulo
*------------------------
Local ldigito := .T.
Local cBusca := "*" + AllTrim(Form_123a.Text_1.Value) + "*"
Arti->(DbGoTop())
DELETE ITEM ALL FROM Grid_1 OF Form_123a
If !Empty(Form_123a.Text_1.Value)
Do Case
Case Form_123a.Combo_1.Value = 1
Do While OrdWildSeek( cBusca , .T. )
ADD ITEM { Codigo , Nombre , Str(Preven,10,2) , Str(Preven2,10,2) , Str(Preven3,10,2) , Str(Stock,10,2) } TO Grid_1 OF Form_123a
EndDo
Case Form_123a.Combo_1.Value = 2
Do While OrdWildSeek( cBusca , .T. )
ADD ITEM { Codigo , Nombre , Str(Preven,10,2) , Str(Preven2,10,2) , Str(Preven3,10,2) , Str(Stock,10,2) } TO Grid_1 OF Form_123a
EndDo
Endcase
Endif
Form_123a.Grid_1.Value := Form_123a.Grid_1.ItemCount
*Form_103a.Grid_1.Setfocus
Return
*-----------------------
Static Procedure Cancelar_Farticulo
*-----------------------
Thiswindow.Release
Form_122.Text_1.Setfocus
Return
*-----------------------
Static Procedure Aceptar_Farticulo
*-----------------------
Local i := Form_123a.Grid_1.Value
Local aTemp
If i != 0
aTemp := Form_123a.Grid_1.Item(i)
Thiswindow.Release
Form_122.Text_1.Value := Val(aTemp[1])
Form_122.Text_1.Setfocus
Else
MsgInfo("Disculpe !!" + chr(10) + ;
"No hay articulos seleccionados","Atención")
Thiswindow.Release
Form_122.Text_1.Setfocus
Endif
Return
asi es Martin , el sistema tiene un fmg principal (Fmg_120) y posteriormente se abren Fmg_121 para seleccionar el nombre del cliente , luego Fgm_122 para seleccionar el articulo , luego Fmg_124 para cerrar la venta .
El Fmg_122 lo utilizo para seleccionar el codigo , sino se conoce el codigo se abre el Fmg_123 para busqueda en la base de datos de articulos .
El detalle que menciona Salinetas24 es que antes de grabar la venta el procedimiento evalua los datos , si son incorrectos como espacios vacios en el nombre o importe negativo , coloco el foco en el textbox que corresponde y termino el procedimiento .
Les adjunto el prg completo para que lo analizen .
Muchas gracias por su ayuda .
Saludos
Mario Mansilla
Hello friends :
this is Martin, the system has a main fmg (Fmg_120) and then Fmg_121 is opened to select the customer's name, then Fgm_122 to select the item, then Fmg_124 to close the sale.
The Fmg_122 I use it to select the code, but it is known the code opens the Fmg_123 for search in the database of articles.
The detail mentioned by Salinetas24 is that before recording the sale the procedure evaluates the data, if they are incorrect as empty spaces in the name or negative amount, I place the focus in the corresponding textbox and finish the procedure.
I enclose the complete prg for you to analyze it.
Thank you very much for your help .
regards
Mario Mansilla
*-----------------------------------
* Programa : Presu.prg
* Contenido : Modulo presupuestos
*-----------------------------------
#include <hmg.ch>
*---------------
Function Presu
*---------------
If Verifico() = .F.
Return nil
Endif
nroimpresion := 10
c_Cliente := Space(8)
c_Nombre := Space(32)
c_Riva := Space(2)
c_Cuit := Space(13)
c_Ibruto := Space(13)
c_Dni := Space(13)
c_Domicilio := Space(30)
c_Localidad := Space(20)
c_Provincia := Space(20)
c_Postal := Space(4)
c_Modo := 1
c_Lispre := 1
c_TipoFac := "A"
c_Compro := c_Ptovta
c_Numero := "00000000"
c_Fecha := Date()
c_Hora := Time()
c_Nroid := Strzero(Terminal,2) + Dtos(Date()) + Strzero(Seconds(),5)
c_Total := 0
c_Subtotal := 0
c_Descuento := 0
c_PorcDesc := 0
c_Iva0 := 0
c_Iva1 := 0
c_Iva2 := 0
c_Iva3 := 0
c_Iva4 := 0
c_Iva5 := 0
c_Iva6 := 0
c_Iva7 := 0
c_Iva8 := 0
c_Iva9 := 0
c_Iva10 := 0
c_Tiva0 := 0
c_Tiva1 := 0
c_Tiva2 := 0
c_Tiva3 := 0
c_Tiva4 := 0
c_Tiva5 := 0
c_Tiva6 := 0
c_Tiva7 := 0
c_Tiva8 := 0
c_Tiva9 := 0
c_Tiva10 := 0
c_Impint := 0
c_TipPago := Space(16)
c_NomPago := Space(16)
c_Empleado := 0
c_Sincro := .F.
Do Case
Case Terminal = 3
Cuerpo := "Ventas3"
Case Terminal = 2
Cuerpo := "Ventas2"
Case Terminal = 1
Cuerpo := "Ventas"
Endcase
*--
Select 1
Use Empleado Index Empleado Shared New
Empleado->(DbSetOrder(1))
Empleado->(DbGoTop())
aEmpleado1 := {}
aEmpleado2 := {}
Do While !Eof()
aadd ( aEmpleado1 , { Empleado->Codigo , Empleado->Nombre } )
aadd ( aEmpleado2 , Empleado->Nombre )
Empleado->(DbSkip(1))
Enddo
Close Empleado
*--
Load Window Form_120
Form_120.Button_1.Enabled := .F.
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .F.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .F.
ON KEY F10 OF FORM_120 ACTION THISWINDOW.RELEASE
Center Window Form_120
Activate Window Form_120
Return
*-------------------
Static PROCEDURE Abrir_Bases
*-------------------
*-- Abro Bases
Do Case
Case Terminal = 3
Select 18
Use Ventas3 Exclusive New
Zap
Case Terminal = 2
Select 17
Use Ventas2 Exclusive New
Zap
Case Terminal = 1
Select 16
Use Ventas Exclusive New
Zap
Endcase
Go Top
*--
Select 15
Use Usuario Shared New
Go Top
*--
Select 14
Use Caja Shared New
Go Top
*--
Select 13
Use Nrecibo Shared New
Go Top
c_Numero := Nrecibo->(Strzero(PR + 1,8))
Form_120.Label_4.Value := c_Compro + " - " + Nrecibo->(Strzero(PR + 1,8))
*--
Select 12
Use Empleado Index Empleado Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 11
Use F_pago Index F_pago Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 10
Use Tiva Index Tiva Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 9
Use Mov_stk Index Mov_stk Shared New
Set Order To 1
Go Top
*--
Select 8
Use Rubros Index Rubros Shared New
Set Order To 1
Go Top
*--
Select 7
Use Arti Index Arti Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 6
Use Cliente Index Cliente Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 5
Use Agenda Index Agenda Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 4
Use Histsali Index Histsali Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 3
Use Salida Index Salida Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 2
Use Histpres Index Histpres Shared New
Set Order to Tag Indice_1
Go Top
*--
Select 1
Use Presu Index Presu Shared New
Set Order to Tag Indice_1
Go Top
Form_120.Text_21.Value := 0
Form_120.Text_21.Setfocus
Return
*-----------------------
Static Procedure Cerrar_Bases
*-----------------------
Do Case
Case Terminal = 3
Close Ventas3
Case Terminal = 2
Close Ventas2
Case Terminal = 1
Close Ventas
Endcase
Close Usuario
Close Caja
Close Nrecibo
Close Empleado
Close F_pago
Close Tiva
Close Mov_stk
Close Rubros
Close Arti
Close Cliente
Close Agenda
Close Histsali
Close Salida
Close Histpres
Close Presu
Return
*-------------------
Static Procedure BL_Cliente
*-------------------
Select Agenda
Agenda->(DbSetOrder(1))
Agenda->(DbgoTop())
Load Window Form_121
Form_121.Combo_1a.Value := 2
Form_121.Text_1a.Setfocus
ON KEY ESCAPE OF FORM_121 ACTION (THISWINDOW.RELEASE , Form_120.Text_21.Setfocus)
Actualizar_Cliente()
Center Window Form_121
Activate Window Form_121
Return
*-------------------
Static Procedure BF_Cliente
*-------------------
Local nCodigo := Form_120.Text_21.Value
Local lRefresca := .F.
Select Agenda
Agenda->(DbSetOrder(1))
Agenda->(DbGotop())
If nCodigo = 0
Load Window Form_121
Form_121.Combo_1a.Value := 2
Form_121.Text_1a.Setfocus
ON KEY ESCAPE OF FORM_121 ACTION (THISWINDOW.RELEASE , Form_120.Text_21.Setfocus)
Actualizar_Cliente()
Center Window Form_121
Activate Window Form_121
Else
Agenda->(DbSeek(Str(nCodigo,8)))
If Found()
Form_120.Text_21.Value := Val(Agenda->Codigo)
Form_120.Text_22.Value := Agenda->Nombre1
Form_120.Text_221.Value := Agenda->Direccion
Form_120.Text_222.Value := Agenda->Localidad
Form_120.Text_223.Value := Agenda->Cpostal
Form_120.Text_224.Value := Agenda->Provincia
c_Cliente := Agenda->Codigo
c_Nombre := Agenda->Nombre1
c_Domicilio := Agenda->Direccion
c_Localidad := Agenda->Localidad
c_Provincia := Agenda->Provincia
c_Postal := Agenda->Cpostal
c_Riva := Agenda->Iva
c_Cuit := Agenda->Cuit
c_Ibruto := Agenda->Ib
c_Dni := Agenda->Dni
c_Lispre := Agenda->Lispre
Do Case
Case Agenda->Iva = "RESPONSABLE INSCRIPTO"
Form_120.Combo_3.Value := 1
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "A"
Case Agenda->Iva = "RESP.MONOTRIBUTO "
Form_120.Combo_3.Value := 2
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "EXENTO "
Form_120.Combo_2.Value := 3
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "CONSUMIDOR FINAL "
Form_120.Combo_3.Value := 4
Form_120.Text_23.Value := Agenda->Dni
c_TipoFac := "B"
Endcase
*--
If Form_120.Text_21.Value <> 0
Do Case
Case Terminal = 1
If Ventas->(Recc()) > 0
lRefresca := .T.
Endif
Case Terminal = 2
If Ventas2->(Recc()) > 0
lRefresca := .T.
Endif
Case Terminal = 3
If Ventas3->(Recc()) > 0
lRefresca := .T.
Endif
Endcase
If lRefresca
Refresca_Venta()
Else
Form_120.Button_1.Enabled := .T.
ON KEY F3 OF FORM_120 ACTION (ALTA_VENTA())
Form_120.Button_1.Setfocus
Endif
*--
Form_120.Combo_1.Value := c_Lispre
*--
Endif
Else
Load Window Form_121
Form_121.Combo_1a.Value := 2
Form_121.Text_1a.Setfocus
ON KEY ESCAPE OF FORM_121 ACTION (THISWINDOW.RELEASE , Form_120.Text_21.Setfocus)
Actualizar_Cliente()
Center Window Form_121
Activate Window Form_121
Endif
Endif
Return
*--------------------
Static Procedure Completa_Documento
*--------------------
If c_Riva = "CONSUMIDOR FINAL "
c_Dni := Alltrim(Form_120.Text_23.Value)
Endif
Return
*--------------------
Static Procedure Completa_Provincia
*--------------------
c_Provincia := Alltrim(Form_120.Text_224.Value)
Form_120.Browse_1.Setfocus
Return
*------------------------
Static Procedure Indice_Cliente
*------------------------
Do Case
Case Form_121.Combo_1a.Value = 1
Set Order To Tag Indice_1
Case Form_121.Combo_1a.Value = 2
Set Order To Tag Indice_3
Endcase
Modify Control Text_1a Of Form_121 Value Space(20)
Agenda->(DbGoTop())
Form_121.Browse_1.Refresh
Form_121.Browse_1.Value := Agenda->(Recno())
Form_121.Browse_1.Setfocus
Return
*------------------------
Static Procedure Buscar_Cliente
*------------------------
Local lDigito := .T.
Local cBusca := Alltrim(Form_121.Text_1a.Value)
Do Case
Case Form_121.Combo_1a.Value = 1
For I = 1 To Len(cBusca)
*--
If !IsDigit(Substr(cBusca,I,1))
ldigito := .F.
Exit
Endif
*--
Next
If lDigito
Agenda->(DbSeek(Str(Val(cBusca),8)))
Else
MsgInfo("Disculpe !!" + chr(10) + ;
"Debe ingresar un valor numerico","Atención")
Form_121.Text_10.Value := Space(20)
Endif
Case Form_121.Combo_1a.Value = 2
Agenda->(DbSeek(cBusca))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_121.Text_1a.Value := Substr(Form_121.Text_1a.Value,1,Len(Form_121.Text_1a.Value) - 1)
Form_121.Text_1a.Caretpos := Len(Form_121.Text_1a.Value)
Form_121.Text_1a.Setfocus
Endif
Endcase
Form_121.Browse_1.Value := Recno()
Return
*--------------------------
Static Procedure Actualizar_Cliente
*--------------------------
Form_121.Text_1.Value := Val(Agenda->Codigo)
Form_121.Text_2.Value := Agenda->Nombre
Form_121.Text_3.Value := Agenda->Nombre1
Do Case
Case Agenda->Iva = "RESPONSABLE INSCRIPTO"
Form_121.Combo_1.Value := 1
Case Agenda->Iva = "RESP.MONOTRIBUTO "
Form_121.Combo_1.Value := 2
Case Agenda->Iva = "EXENTO "
Form_121.Combo_1.Value := 3
Case Agenda->Iva = "CONSUMIDOR FINAL "
Form_121.Combo_1.Value := 4
Endcase
Form_121.Text_4.Value := Agenda->Cuit
Form_121.Text_5.Value := Agenda->Dni
Form_121.Text_6.Value := Agenda->Ib
Form_121.Text_7.Value := Agenda->Direccion
Form_121.Text_8.Value := Agenda->Localidad
Form_121.Text_9.Value := Agenda->Provincia
Return
*-----------------------------
Static Procedure Aceptar_Cliente
*-----------------------------
Local c_Refresca := .F.
Thiswindow.Release
*-- Tab 1
Form_120.Text_21.Value := Agenda->(Val(Codigo))
Form_120.Text_22.Value := Agenda->Nombre1
c_Cliente := Agenda->Codigo
c_Nombre := Agenda->Nombre1
c_Domicilio := Agenda->Direccion
c_Localidad := Agenda->Localidad
c_Provincia := Agenda->Provincia
c_Postal := Agenda->Cpostal
c_Riva := Agenda->Iva
c_Cuit := Agenda->Cuit
c_Ibruto := Agenda->Ib
c_Dni := Agenda->Dni
c_Lispre := Agenda->Lispre
Do Case
Case Agenda->Iva = "RESPONSABLE INSCRIPTO"
Form_120.Combo_3.Value := 1
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "A"
Case Agenda->Iva = "RESP.MONOTRIBUTO "
Form_120.Combo_3.Value := 2
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "EXENTO "
Form_120.Combo_3.Value := 3
Form_120.Text_23.Value := Agenda->Cuit
c_TipoFac := "B"
Case Agenda->Iva = "CONSUMIDOR FINAL "
Form_120.Combo_3.Value := 4
Form_120.Text_23.Value := Agenda->Dni
c_TipoFac := "B"
Endcase
*-- Tab 2
Form_120.Text_221.Value := Agenda->Direccion
Form_120.Text_222.Value := Agenda->Localidad
Form_120.Text_223.Value := Agenda->Cpostal
Form_120.Text_224.Value := Agenda->Provincia
Do Case
Case Terminal = 1
If Ventas->(Recc()) > 0
c_Refresca := .T.
Endif
Case Terminal = 2
If Ventas2->(Recc()) > 0
c_Refresca := .T.
Endif
Case Terminal = 3
If Ventas3->(Recc()) > 0
c_Refresca := .T.
Endif
Endcase
If c_Refresca
Refresca_Venta()
Else
Form_120.Button_1.Enabled := .T.
ON KEY F3 OF FORM_120 ACTION (ALTA_VENTA())
Form_120.Button_1.Setfocus
Endif
*--
Form_120.Combo_1.Value := c_Lispre
*--
Return
*----------------------
Static Procedure B_Empleado
*----------------------
If Form_120.Combo_2.Value > 0
c_Empleado := aEmpleado1 [ Form_120.Combo_2.Value , 1 ]
Form_120.Text_12.Value := Val(c_Empleado)
Form_120.Button_1.Setfocus
Else
Msginfo("Disculpe !!" + chr(10) + ;
"Olvida seleccionar el vendedor de la operación","TFWIN Géstion")
Form_120.Combo_2.Setfocus
Endif
Return
*-------------------
Static Procedure Lista_Venta
*-------------------
Local c_Dbf := Select()
Local c_num := 0
Do Case
Case Terminal = 1
Select Ventas
c_num := Recc()
Case Terminal = 2
Select Ventas2
c_num := Recc()
Case Terminal = 3
Select Ventas3
c_num := Recc()
Endcase
Do Case
Case Form_120.Combo_1.Value = 1
c_Lispre := 1
Case Form_120.Combo_1.Value = 2
c_Lispre := 2
Case Form_120.Combo_1.Value = 3
c_Lispre := 3
Endcase
If c_num > 0
Form_120.Browse_1.Setfocus
Refresca_Venta()
Else
If Form_120.Text_21.Value = 0
Form_120.Text_21.Setfocus
Endif
Endif
Return
*-------------------
Static Procedure Alta_Venta
*-------------------
c_Modo := 1
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
If Recc() > 25 // 12 para hoja A4/2
MsgInfo("Limite de articulos en presupuesto","Atención")
Return nil
Endif
Load Window Form_122
ON KEY ESCAPE OF FORM_122 ACTION THISWINDOW.RELEASE
ON KEY UP OF FORM_122 ACTION (Move_Focus())
Form_122.Text_1.Value := Space(13)
Form_122.Text_3.Value := 1
Form_122.Text_4.Value := 0.00
Form_122.Text_5.value := 0.00
Center Window Form_122
Activate Window Form_122
Return
*-------------------
Static Procedure Modi_Venta
*-------------------
c_Modo := 2
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
Load Window Form_122
ON KEY UP OF FORM_122 ACTION (Move_Focus())
Form_122.Text_1.Value := Codigo
Form_122.Text_2.Value := Articulo
Form_122.Text_3.Value := Cantidad
Form_122.Text_4.Value := Descuento
Form_122.Text_5.Value := Importe
Center Window Form_122
Activate Window Form_122
Return
*-------------------
Static Procedure Borra_Venta
*-------------------
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
Delete // Ventas->(DbDelete())
Pack // Ventas->(__DbPack())
Actualiza_Venta()
Return
*-------------------
Static Procedure Pago_Venta
*-------------------
If Empty(c_Empleado)
MsgStop("Disculpe !!" + chr(10) + ;
"Ud.olvida ingresar el vendedor","Atención")
Form_120.Combo_2.Setfocus
Return nil
Endif
If c_Riva = "CONSUMIDOR FINAL " .AND. c_Total >= 1000
If Empty(c_Dni) .or. Empty(c_Domicilio)
MsgStop("Las operaciones a consumidor final superiores a $ 1000.00" + chr(10) + ;
"Obligan a completar los datos del comprador siguientes : " + chr(10) + ;
" 1 - Domicilio " + chr(10) + ;
" 2 - Localidad " + chr(10) + ;
" 3 - Documento " , "Atención")
Return nil
Endif
Endif
Select F_pago
F_pago->(DbSetOrder(1))
F_pago->(DbgoTop())
Load Window Form_124
ON KEY ESCAPE OF FORM_124 ACTION THISWINDOW.RELEASE
Form_124.Label_1.Value := "TOTAL $ " + LTRIM(STR(c_Total,12,2))
Form_124.Text_1.Value := c_Total
Form_124.Label_4.Hide
Form_124.Check_1.Value := .F.
Center Window Form_124
Activate Window Form_124
Return
*------------------------
Static Procedure Sincroniza
*------------------------
Do Case
Case Form_124.Check_1.Value = .T.
c_Sincro := .T.
Case Form_124.Check_1.Value = .F.
c_Sincro := .F.
Endcase
*----------------------------
Static Procedure Cancelar_Pago
*----------------------------
Thiswindow.Release
Do Case
Case Terminal = 3
Select Ventas3
Ventas3->(DbGoTop())
Case Terminal = 2
Select Ventas2
Ventas2->(DbGoTop())
Case Terminal = 1
Select Ventas
Ventas->(DbGoTop())
Endcase
Form_120.Browse_1.Refresh
Form_120.Browse_1.Value := (Recno())
Form_120.Browse_1.Setfocus
Return
*----------------------------
Static Procedure Aceptar_Pago
*----------------------------
Local c_Supago := Form_124.Text_1.Value
If c_Supago >= Round(c_Total,2)
Form_124.Button_1.Hide
Form_124.Button_2.Hide
Form_124.Label_4.Show
*--
* Proceso Nrecibo
*--
Select Nrecibo
Go Top
c_Numero := Strzero(PR + 1,8)
If Nrecibo->(Rlock())
*--
Replace PR With Val(c_Numero)
Unlock
*--
Endif
*--
* Forma de pago
*--
F_Pago->(DbSeek(Str(Form_124.Combo_1.Value,2)))
c_TipPago := F_Pago->Tipo
c_NomPago := F_Pago->Nombre
Do Case
Case Terminal = 1
SELECT VENTAS
GO TOP
Case Terminal = 2
SELECT VENTAS2
GO TOP
Case Terminal = 3
SELECT VENTAS3
GO TOP
Endcase
DO WHILE !EOF()
*--
T_Tipo := c_Tipofac
T_PvtaFac := c_Compro
T_NumFac := c_Numero
T_Articulo := ARTICULO
*--
IF C_TipoFac = "A"
T_Importe := IMPORTE + (IMPORTE * (TIVA/100))
ELSE
T_Importe := IMPORTE
ENDIF
*--
T_Cantidad := CANTIDAD
T_Familia := FAMILIA
T_Rubro := RUBRO
T_Codigo := CODIGO
T_Fecha := FECHA
T_Hora := HORA
T_Tiva := TIVA
T_Impint := IMPINT
T_Unitario := UNITARIO
T_Descuento := DESCUENTO
*--
SKIP
*--
c_Reg = RECNO()
*--
* Grabo Historico
*--
SELECT Histpres
Histpres->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un eror abriendo Histpres.Dbf ..","Atención")
Else
REPLACE HISTPRES->FECHA WITH T_Fecha
REPLACE HISTPRES->HORA WITH T_Hora
REPLACE HISTPRES->TIPO WITH T_Tipo
REPLACE HISTPRES->COMPRO WITH T_PvtaFac
REPLACE HISTPRES->NUMERO WITH T_NumFac
REPLACE HISTPRES->ARTICULO WITH T_Articulo
REPLACE HISTPRES->FAMILIA WITH T_Familia
REPLACE HISTPRES->RUBRO WITH T_Rubro
REPLACE HISTPRES->EMPLEADO WITH c_Empleado
REPLACE HISTPRES->CODIGO WITH T_Codigo
REPLACE HISTPRES->CANTIDAD WITH T_Cantidad
*--
IF C_TipoFac = "A"
REPLACE HISTPRES->IMPORTE WITH ROUND(T_Importe / ((T_Tiva/100)+1), 2)
ELSE
REPLACE HISTPRES->IMPORTE WITH T_Importe
ENDIF
*--
REPLACE HISTPRES->TIVA WITH T_Tiva
REPLACE HISTPRES->IMPINT WITH T_Impint
*--
REPLACE HISTPRES->UNITARIO WITH T_Unitario
REPLACE HISTPRES->DESCUENTO WITH T_Descuento // DESCUENTO UNITARIO
REPLACE HISTPRES->DESC_TOTAL WITH C_PorcDesc // DESCUENTO GENERAL
*--
Unlock
*--
Endif
If c_Sincro = .T.
*--
* Proceso salida
*--
SELECT Histsali
Histsali->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un eror abriendo Histsali.Dbf ..","Atención")
Else
REPLACE HISTSALI->FECHA WITH T_Fecha
REPLACE HISTSALI->HORA WITH T_Hora
REPLACE HISTSALI->TIPO WITH T_Tipo
REPLACE HISTSALI->COMPRO WITH T_PvtaFac
REPLACE HISTSALI->NUMERO WITH T_NumFac
REPLACE HISTSALI->ARTICULO WITH T_Articulo
REPLACE HISTSALI->FAMILIA WITH T_Familia
REPLACE HISTSALI->RUBRO WITH T_Rubro
REPLACE HISTSALI->EMPLEADO WITH c_Empleado
REPLACE HISTSALI->CODIGO WITH T_Codigo
REPLACE HISTSALI->CANTIDAD WITH T_Cantidad
*--
IF C_TipoFac = "A"
REPLACE HISTSALI->IMPORTE WITH ROUND(T_Importe / ((T_Tiva/100)+1), 2)
ELSE
REPLACE HISTSALI->IMPORTE WITH T_Importe
ENDIF
*--
REPLACE HISTSALI->TIVA WITH T_Tiva
REPLACE HISTSALI->IMPINT WITH T_Impint
*--
REPLACE HISTSALI->UNITARIO WITH T_Unitario
REPLACE HISTSALI->DESCUENTO WITH T_Descuento // DESCUENTO UNITARIO
REPLACE HISTSALI->DESC_TOTAL WITH C_PorcDesc // DESCUENTO GENERAL
*--
Unlock
*--
Endif
*--
* Proceso Stock
*--
SELECT Arti
Arti->(DbSetOrder(2))
Arti->(DbGoTop())
Arti->(DbSeek(T_Codigo))
If Arti->(Found())
If Arti->(Rlock())
Ant_Cant := ARTI->STOCK
IF (Ant_Cant - T_Cantidad) < -1000
REPLACE ARTI->STOCK WITH -1000
ELSE
REPLACE ARTI->STOCK WITH Ant_Cant - T_Cantidad
ENDIF
Unlock
Endif
Endif
SELECT Mov_Stk
Mov_Stk->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un error abriendo Mov_Stk.Dbf ..","Atención")
Else
REPLACE MOV_STK->FECHA WITH T_Fecha
REPLACE MOV_STK->CODIGO WITH T_Codigo
REPLACE MOV_STK->ARTICULO WITH T_Articulo
REPLACE MOV_STK->STK_SAL WITH T_Cantidad
REPLACE MOV_STK->STK_ING WITH 0
REPLACE MOV_STK->MOVI WITH "FC"
REPLACE MOV_STK->TIPO WITH T_Tipo
REPLACE MOV_STK->COMPRO WITH T_PvtaFac
REPLACE MOV_STK->NUMERO WITH T_NumFac
REPLACE MOV_STK->PROVEE WITH SPACE(4)
*--
Unlock
*--
Endif
Endif
Do Case
Case Terminal = 1
SELECT VENTAS
Case Terminal = 2
SELECT VENTAS2
Case Terminal = 3
SELECT VENTAS3
Endcase
GO c_Reg
*--
Enddo
*--
* Proceso Presupuestos
*--
*--
SELECT PRESU
PRESU->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un error abriendo Presu.Dbf ..","Atención")
Else
*--
REPLACE PRESU->FECHA WITH C_Fecha
REPLACE PRESU->HORA WITH c_Hora
REPLACE PRESU->MOVI WITH "PR"
REPLACE PRESU->NOMBRE WITH C_Nombre
REPLACE PRESU->CODIGO WITH C_Cliente
REPLACE PRESU->TIPO WITH C_TipoFac
REPLACE PRESU->COMPRO WITH C_Compro
REPLACE PRESU->NUMERO WITH C_Numero
*REPLACE PRESU->REMITO WITH C_Remito
REPLACE PRESU->DOMICILIO WITH c_Domicilio
REPLACE PRESU->LOCALIDAD WITH c_Localidad
REPLACE PRESU->PROVINCIA WITH c_Provincia
REPLACE PRESU->CODPOS WITH c_Postal
REPLACE PRESU->IBRUTO WITH c_Ibruto
REPLACE PRESU->CUIT WITH c_Cuit
REPLACE PRESU->DNI WITH c_Dni
REPLACE PRESU->COND_IVA WITH c_Riva
REPLACE PRESU->NETO WITH c_Total
REPLACE PRESU->DESCUENTO WITH c_Descuento
REPLACE PRESU->PORCEDESC WITH c_PorcDesc
REPLACE PRESU->IMPINT WITH c_Impint
REPLACE PRESU->LISPRE WITH c_Lispre
REPLACE PRESU->EMPLEADO WITH c_Empleado
*--
REPLACE PRESU->TIVA0 WITH C_Tiva0
REPLACE PRESU->TIVA1 WITH C_Tiva1
REPLACE PRESU->TIVA2 WITH C_Tiva2
REPLACE PRESU->TIVA3 WITH C_Tiva3
REPLACE PRESU->TIVA4 WITH C_Tiva4
REPLACE PRESU->TIVA5 WITH C_Tiva5
REPLACE PRESU->TIVA6 WITH C_Tiva6
REPLACE PRESU->TIVA7 WITH C_Tiva7
REPLACE PRESU->TIVA8 WITH C_Tiva8
REPLACE PRESU->TIVA9 WITH C_Tiva9
REPLACE PRESU->TIVA10 WITH C_Tiva10
*--
If C_TipoFac = "B"
REPLACE PRESU->IVA0 WITH C_Iva0
REPLACE PRESU->IVA1 WITH C_Iva1
REPLACE PRESU->IVA2 WITH C_Iva2
REPLACE PRESU->IVA3 WITH C_Iva3
REPLACE PRESU->IVA4 WITH C_Iva4
REPLACE PRESU->IVA5 WITH C_Iva5
REPLACE PRESU->IVA6 WITH C_Iva6
REPLACE PRESU->IVA7 WITH C_Iva7
REPLACE PRESU->IVA8 WITH C_Iva8
REPLACE PRESU->IVA9 WITH C_Iva9
REPLACE PRESU->IVA10 WITH C_Iva10
Else
REPLACE PRESU->IVA0 WITH round(C_Iva0,2)
REPLACE PRESU->IVA1 WITH round(C_Iva1,2)
REPLACE PRESU->IVA2 WITH round(C_Iva2,2)
REPLACE PRESU->IVA3 WITH round(C_Iva3,2)
REPLACE PRESU->IVA4 WITH round(C_Iva4,2)
REPLACE PRESU->IVA5 WITH round(C_Iva5,2)
REPLACE PRESU->IVA6 WITH round(C_Iva6,2)
REPLACE PRESU->IVA7 WITH round(C_Iva7,2)
REPLACE PRESU->IVA8 WITH round(C_Iva8,2)
REPLACE PRESU->IVA9 WITH round(C_Iva9,2)
REPLACE PRESU->IVA10 WITH round(C_Iva10,2)
Endif
*--
REPLACE PRESU->PAGO WITH C_NomPago
REPLACE PRESU->TIPOPAGO WITH C_TipPago
Unlock
*--
Endif
If c_Sincro = .T.
*--
* Proceso salida
*--
*--
SELECT SALIDA
SALIDA->(DbAppend())
If Neterr()
MsgInfo("Disculpe !!" + chr(10) + ;
"Ha ocurrido un error abriendo Salida.Dbf ..","Atención")
Else
*--
REPLACE SALIDA->FECHA WITH C_Fecha
REPLACE SALIDA->HORA WITH c_Hora
REPLACE SALIDA->MOVI WITH "PR"
REPLACE SALIDA->NOMBRE WITH C_Nombre
REPLACE SALIDA->CODIGO WITH C_Cliente
REPLACE SALIDA->TIPO WITH C_TipoFac
REPLACE SALIDA->COMPRO WITH C_Compro
REPLACE SALIDA->NUMERO WITH C_Numero
*REPLACE SALIDA->REMITO WITH C_Remito
REPLACE SALIDA->DOMICILIO WITH c_Domicilio
REPLACE SALIDA->LOCALIDAD WITH c_Localidad
REPLACE SALIDA->PROVINCIA WITH c_Provincia
REPLACE SALIDA->CODPOS WITH c_Postal
REPLACE SALIDA->IBRUTO WITH c_Ibruto
REPLACE SALIDA->CUIT WITH c_Cuit
REPLACE SALIDA->DNI WITH c_Dni
REPLACE SALIDA->COND_IVA WITH c_Riva
REPLACE SALIDA->NETO WITH c_Total
REPLACE SALIDA->DESCUENTO WITH c_Descuento
REPLACE SALIDA->PORCEDESC WITH c_PorcDesc
REPLACE SALIDA->IMPINT WITH c_Impint
REPLACE SALIDA->LISPRE WITH c_Lispre
REPLACE SALIDA->EMPLEADO WITH c_Empleado
*--
REPLACE SALIDA->TIVA0 WITH C_Tiva0
REPLACE SALIDA->TIVA1 WITH C_Tiva1
REPLACE SALIDA->TIVA2 WITH C_Tiva2
REPLACE SALIDA->TIVA3 WITH C_Tiva3
REPLACE SALIDA->TIVA4 WITH C_Tiva4
REPLACE SALIDA->TIVA5 WITH C_Tiva5
REPLACE SALIDA->TIVA6 WITH C_Tiva6
REPLACE SALIDA->TIVA7 WITH C_Tiva7
REPLACE SALIDA->TIVA8 WITH C_Tiva8
REPLACE SALIDA->TIVA9 WITH C_Tiva9
REPLACE SALIDA->TIVA10 WITH C_Tiva10
*--
If C_TipoFac = "B"
REPLACE SALIDA->IVA0 WITH C_Iva0
REPLACE SALIDA->IVA1 WITH C_Iva1
REPLACE SALIDA->IVA2 WITH C_Iva2
REPLACE SALIDA->IVA3 WITH C_Iva3
REPLACE SALIDA->IVA4 WITH C_Iva4
REPLACE SALIDA->IVA5 WITH C_Iva5
REPLACE SALIDA->IVA6 WITH C_Iva6
REPLACE SALIDA->IVA7 WITH C_Iva7
REPLACE SALIDA->IVA8 WITH C_Iva8
REPLACE SALIDA->IVA9 WITH C_Iva9
REPLACE SALIDA->IVA10 WITH C_Iva10
Else
REPLACE SALIDA->IVA0 WITH round(C_Iva0,2)
REPLACE SALIDA->IVA1 WITH round(C_Iva1,2)
REPLACE SALIDA->IVA2 WITH round(C_Iva2,2)
REPLACE SALIDA->IVA3 WITH round(C_Iva3,2)
REPLACE SALIDA->IVA4 WITH round(C_Iva4,2)
REPLACE SALIDA->IVA5 WITH round(C_Iva5,2)
REPLACE SALIDA->IVA6 WITH round(C_Iva6,2)
REPLACE SALIDA->IVA7 WITH round(C_Iva7,2)
REPLACE SALIDA->IVA8 WITH round(C_Iva8,2)
REPLACE SALIDA->IVA9 WITH round(C_Iva9,2)
REPLACE SALIDA->IVA10 WITH round(C_Iva10,2)
Endif
*--
REPLACE SALIDA->NETO1 WITH C_Total
REPLACE SALIDA->PAGO1 WITH C_NomPago
REPLACE SALIDA->TIPOPAGO1 WITH C_TipPago
Unlock
*--
Endif
Endif
If c_Sincro = .T.
*--
* Proceso caja
*--
Select Caja
Go Top
If Rlock()
*--
Replace N_SALI With N_SALI + 1
Do Case
Case c_TipPago = "CUENTA CORRIENTE"
Replace C_SALI With C_SALI + c_Total
Case c_TipPago = "TARJETA CREDITO " .or. c_TipPago = "TARJETA DEBITO "
Replace T_SALI With T_SALI + c_Total
Case c_TipPago = "CHEQUE "
Replace V_SALI With V_SALI + c_Total
Case c_TipPago = "CONTADO "
Replace E_SALI With E_SALI + c_Total
Endcase
*--
Unlock
*--
Endif
Endif
*--
Dialogo_Impresion()
*--
Else
MsgInfo("Su pago es inferior al total de la factura","Atención")
Form_124.Text_1.Value := c_Total
Form_124.Text_1.Setfocus
Return nil
Endif
MsgInfo("!! El presupuesto " + c_Numero + " se grabó correctamente !!","TFWIN Géstion")
Form_124.Release
*---------------*
* Puesta a cero *
RELEASE MEMORY
*---------------*
Select Nrecibo
Go Top
c_Numero := Nrecibo->(Strzero(PR + 1,8))
Form_120.Label_4.Value := c_Compro + " - " + Nrecibo->(Strzero(PR + 1,8))
Do Case
Case Terminal = 1
SELECT VENTAS
Zap
Case Terminal = 2
SELECT VENTAS2
Zap
Case Terminal = 3
SELECT VENTAS3
Zap
Endcase
Form_120.Browse_1.Refresh
Form_120.Button_1.Enabled := .F.
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .F.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .F.
Form_120.Label_41.Value := "0.00"
Form_120.Label_42.Value := "0.00"
Form_120.Label_43.Value := "0.00"
Form_120.Label_44.Value := "0.00"
Form_120.Label_45.Value := "0.00"
Form_120.Label_60.Value := "0.00"
c_Lista := 1
c_Empleado := 0
c_PorcDesc := 0
c_Sincro := .F.
Form_120.Tab_1.Value := 1
Form_120.Text_11.Value := 1
Form_120.Text_12.Value := 0
Form_120.Combo_1.Value := 1
Form_120.Combo_2.Value := 0
Form_120.Text_50.Value := 0
Form_120.Text_21.Value := 0
Form_120.Text_21.Setfocus
Return
*----------------------
Static Procedure Aceptar_Venta
*----------------------
If Empty(Form_122.Text_1.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El codigo de articulo ingresado es inválido","Atención")
Form_122.Text_1.Setfocus
Return nil
Endif
If Empty(Form_122.Text_2.Value)
MsgInfo("Disculpe !!" + chr(10) + ;
"El nombre de articulo codigo ingresado es inválido","Atención")
Form_122.Text_2.Setfocus
Return nil
Endif
If Form_122.Text_3.Value <= 0
MsgInfo("Disculpe !!" + chr(10) + ;
"La cantidad de articulo ingresada es inválida","Atención")
Form_122.Text_3.Setfocus
Return nil
Endif
If Form_122.Text_5.Value = 0
MsgInfo("Disculpe !!" + chr(10) + ;
"El precio de articulo ingresado es inválido","Atención")
Form_122.Text_5.Setfocus
Return nil
Endif
Do Case
Case Terminal = 3
Select Ventas3
Case Terminal = 2
Select Ventas2
Case Terminal = 1
Select Ventas
Endcase
If c_Modo = 1
Append Blank // Ventas->(DbAppend())
Endif
Replace Tipo With c_TipoFac
Replace Compro With c_Compro
Replace Numero With c_Numero
Replace Fecha With Date()
Replace Hora With c_Hora
Replace Codigo With Form_122.Text_1.Value
Replace Familia With Arti->Familia
Replace Rubro With Arti->Rubro
Replace Articulo With Form_122.Text_2.Value
Replace Cantidad With Form_122.Text_3.Value
Replace Tiva With Arti->Tiva
Replace Impint With Arti->Impint
Replace Descuento With Form_122.Text_4.Value
If c_TipoFac = "A"
Replace Unitario With Form_122.Text_5.Value / (1 + (Tiva/100))
Else
Replace Unitario With Form_122.Text_5.Value
Endif
Replace Importe With Unitario * Cantidad
Thiswindow.Release
Form_120.Button_2.Enabled := .T.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .T.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF Form_120 ACTION (Modi_Venta())
ON KEY F5 OF Form_120 ACTION (Borra_Venta())
ON KEY F6 OF Form_120 ACTION (Pago_Venta())
ON KEY F8 OF FORM_120 ACTION nil
Actualiza_Venta()
Return
*---------------------------
Static Procedure Actualiza_Venta
*---------------------------
Local nReg
Local Tempimpo := 0
Local Tempdesc := 0
Local Tempiva := 0
c_Subtotal := 0
c_Descuento := 0
c_Total := 0
c_Iva0 := 0
c_Iva1 := 0
c_Iva2 := 0
c_Iva3 := 0
c_Iva4 := 0
c_Iva5 := 0
c_Iva6 := 0
c_Iva7 := 0
c_Iva8 := 0
c_Iva9 := 0
c_Iva10 := 0
c_Impint := 0
Select Tiva
Set Order To 1
Go Top
Do While !Eof()
*--
Do Case
Case Val(Codigo) = 0
c_Tiva0 := Tasa
Case Val(Codigo) = 1
c_Tiva1 := Tasa
Case Val(Codigo) = 2
c_Tiva2 := Tasa
Case Val(Codigo) = 3
c_Tiva3 := Tasa
Case Val(Codigo) = 4
c_Tiva4 := Tasa
Case Val(Codigo) = 5
c_Tiva5 := Tasa
Case Val(Codigo) = 6
c_Tiva6 := Tasa
Case Val(Codigo) = 7
c_Tiva7 := Tasa
Case Val(Codigo) = 8
c_Tiva8 := Tasa
Case Val(Codigo) = 9
c_Tiva9 := Tasa
Case Val(Codigo) = 10
c_Tiva10 := Tasa
Endcase
*--
Skip
*--
Enddo
Do Case
Case Terminal = 1
Select Ventas
Case Terminal = 2
Select Ventas2
Case Terminal = 3
Select Ventas3
Endcase
nReg := Recno()
Go Top
Do While !(Eof())
*--
IF c_TipoFac = "A"
*--
Tempimpo := IMPORTE - (IMPORTE * (c_PorcDesc / 100))
Tempdesc := IMPORTE * (C_PorcDesc / 100)
C_Descuento := C_Descuento + Tempdesc
c_Impint := c_Impint + (IMPINT * CANTIDAD)
C_Subtotal := C_Subtotal + Tempimpo
*--
IF TIVA = 0.00
C_Iva0 := C_Iva0 + Tempimpo
ENDIF
*--
Do Case
Case Tiva = c_Tiva1
c_Iva1 := c_Iva1 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva2
c_Iva2 := c_Iva2 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva3
c_Iva3 := c_Iva3 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva4
c_Iva4 := c_Iva4 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva5
c_Iva5 := c_Iva5 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva6
c_Iva6 := c_Iva6 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva7
c_Iva7 := c_Iva7 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva8
c_Iva8 := c_Iva8 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva9
c_Iva9 := c_Iva9 + (Tempimpo * (TIVA/100))
Case Tiva = c_Tiva10
c_Iva10 := c_Iva10 + (Tempimpo * (TIVA/100))
Endcase
*c_Iva := c_Iva + (Tempimp * (TIVA/100))
*--
ELSE
Tempimpo := (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) - (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) * (c_PorcDesc / 100)
Tempdesc := (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) * (c_PorcDesc / 100)
c_Descuento := c_Descuento + Tempdesc
c_Impint := c_Impint + (IMPINT * CANTIDAD)
c_Subtotal := c_Subtotal + Tempimpo
Tempoiva := (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) - (IMPORTE - (IMPINT * CANTIDAD)) / ((TIVA/100) + 1) * (c_PorcDesc / 100)
*--
IF TIVA = 0.00
C_Iva0 := C_Iva0 + Tempimpo
ENDIF
*--
*--
Do Case
Case Tiva = c_Tiva1
c_Iva1 := c_Iva1 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva2
c_Iva2 := c_Iva2 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva3
c_Iva3 := c_Iva3 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva4
c_Iva4 := c_Iva4 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva5
c_Iva5 := c_Iva5 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva6
c_Iva6 := c_Iva6 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva7
c_Iva7 := c_Iva7 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva8
c_Iva8 := c_Iva8 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva9
c_Iva9 := c_Iva9 + (Tempoiva * (TIVA/100))
Case Tiva = c_Tiva10
c_Iva10 := c_Iva10 + (Tempoiva * (TIVA/100))
Endcase
*c_Iva := c_Iva + (Imp * (TIVA/100))
*--
ENDIF
*--
Do Events
Skip(1)
*--
Enddo
*--
Go nReg
*--
If c_TipoFac = "A"
c_Total := c_Subtotal + c_Iva1 + c_Iva2 + c_Iva3 + c_Iva4 + c_Impint
Else
c_Total := c_Subtotal + c_Iva1 + c_Iva2 + c_Iva3 + c_Iva4 + c_Impint
Endif
Modify Control Label_41 Of Form_120 Value Str(c_Subtotal,10,2)
Modify Control Label_42 Of Form_120 Value Str(c_Impint,10,2)
Modify Control Label_43 Of Form_120 Value Str(c_Subtotal + c_Impint,10,2)
Modify Control Label_44 Of Form_120 Value Str(c_Iva1,10,2)
Modify Control Label_45 Of Form_120 Value Str(c_Iva2,10,2)
Modify Control Label_60 Of Form_120 Value Str(c_Total,10,2)
If c_Total <= 0
If Recc() > 0
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF FORM_120 ACTION nil
ON KEY F5 OF FORM_120 ACTION (Borra_Venta())
ON KEY F6 OF FORM_120 ACTION nil
ON KEY F8 OF FORM_120 ACTION (Refresca_Venta())
Else
Form_120.Button_2.Enabled := .F.
Form_120.Button_3.Enabled := .F.
Form_120.Button_4.Enabled := .F.
Form_120.Button_5.Enabled := .F.
ON KEY F4 OF FORM_120 ACTION nil
ON KEY F5 OF FORM_120 ACTION nil
ON KEY F6 OF FORM_120 ACTION nil
ON KEY F8 OF FORM_120 ACTION nil
Endif
Else
Form_120.Button_2.Enabled := .T.
Form_120.Button_3.Enabled := .T.
Form_120.Button_4.Enabled := .T.
Form_120.Button_5.Enabled := .T.
ON KEY F4 OF FORM_120 ACTION (Modi_Venta())
ON KEY F5 OF FORM_120 ACTION (Borra_Venta())
ON KEY F6 OF FORM_120 ACTION (Pago_Venta())
ON KEY F8 OF FORM_120 ACTION (Refresca_Venta())
Endif
If c_Modo = 1
INSERT_CTRL_END()
Else
Form_120.Browse_1.Refresh
Endif
Form_120.Browse_1.Value := Recno()
Form_120.Browse_1.Setfocus
Return
*---------------------
Static Procedure Refresca_Venta
*---------------------
Local c_Dbf
Local c_codigo
Local c_articulo
c_Modo := 1 // para no tener que hacer ctrl+end
Do Case
Case Terminal = 1
Select Ventas
Case Terminal = 2
Select Ventas2
Case Terminal = 3
Select Ventas3
Endcase
*--
Go Top
*--
Do While !Eof()
c_codigo := Codigo
c_articulo := Articulo
c_dbf := Select()
Select Arti
Arti->(DbSetOrder(2))
Arti->(DbGotop())
Arti->(DbSeek(c_Codigo))
If Arti->(Found())
Do Case
Case c_Lispre = 1
c_precio := Arti->Preven
Case c_Lispre = 2
c_precio := Arti->Preven2
Case c_Lispre = 3
c_precio := Arti->Preven2
Endcase
Endif
Select(c_Dbf)
Replace Tipo With c_TipoFac
Replace Numero With c_Numero
If c_TipoFac = "A"
Replace Unitario With (c_precio - Impint) / (1 + (Tiva/100))
Else
Replace Unitario With c_precio
Endif
Replace Importe With (Unitario * Cantidad) - ((Unitario * Cantidad * Descuento)/100)
*--
Skip
*--
Enddo
Actualiza_Venta()
Return
*--------------
Static Procedure BL_Articulo
*--------------
Select Arti
Arti->(DbSetorder(2))
Arti->(DbGoTop())
Load Window Form_123
ON KEY ESCAPE OF FORM_123 ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123.Combo_1.Value := 2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Form_123.Text_1.Setfocus
Center Window Form_123
Activate Window Form_123
Return
*------------------------
Static Procedure BF_Articulo
*------------------------
Local l_articulo := Alltrim(Form_122.Text_1.Value)
Select Arti
Arti->(DbSetOrder(2))
Arti->(DbGotop())
If Empty(l_articulo)
Load Window Form_123
ON KEY ESCAPE OF FORM_123 ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123.Combo_1.Value := 2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Form_123.Text_1.Setfocus
Center Window Form_123
Activate Window Form_123
Else
Arti->(DbSeek(Padr(l_articulo,20)))
If Found()
Form_122.Text_1.Value := Arti->Codigo
Form_122.Text_2.Value := Arti->Articulo
Do Case
Case c_Lispre = 1
Form_122.Text_5.Value := Arti->Preven
Case c_Lispre = 2
Form_122.Text_5.Value := Arti->Preven2
Case c_Lispre = 3
Form_122.Text_5.Value := Arti->Preven3
Endcase
Form_122.Text_3.Setfocus
Else
Arti->(DbGoTop())
Load Window Form_123
ON KEY ESCAPE OF FORM_123 ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123.Combo_1.Value := 2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Form_123.Text_1.Setfocus
Center Window Form_123
Activate Window Form_123
Endif
Endif
Return
*------------------------
Static Procedure Indice_Articulo
*------------------------
Do Case
Case Form_123.Combo_1.Value = 1
Set Order To Tag Indice_2
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Case Form_123.Combo_1.Value = 2
Set Order To Tag Indice_3
Form_123.Text_1.Enabled := .T.
Form_123.Combo_2.Enabled := .F.
Form_123.Text_1.Show
Form_123.Combo_2.Hide
Case Form_123.Combo_1.Value = 3
Set Order To Tag Indice_4
Form_123.Text_1.Enabled := .F.
Form_123.Combo_2.Enabled := .T.
Form_123.Text_1.Hide
Form_123.Combo_2.Show
Endcase
Modify Control Text_1 Of Form_123 Value Space(20)
Arti->(DbGoTop())
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Setfocus
Return
*------------------------
Static Procedure Buscar_Articulo
*------------------------
Local ldigito := .T.
Local lBusca := Trim(Form_123.Text_1.Value)
If !Empty(lBusca)
Do Case
Case Form_123.Combo_1.Value = 1
Arti->(DbSeek(Trim(Form_123.Text_1.Value)))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_123.Text_1.Value := Substr(Form_123.Text_1.Value,1,Len(Form_123.Text_1.Value) - 1)
Form_123.Text_1.Caretpos := Len(Form_123.Text_1.Value)
Form_123.text_1.Setfocus
Endif
Case Form_123.Combo_1.Value = 2
Arti->(DbSeek(Trim(Form_123.Text_1.Value)))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_123.Text_1.Value := Substr(Form_123.Text_1.Value,1,Len(Form_123.Text_1.Value) - 1)
Form_123.Text_1.Caretpos := Len(Form_123.Text_1.Value)
Form_123.text_1.Setfocus
Endif
Endcase
Endif
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Refresh
Return
*--------------------
STATIC PROCEDURE Filtrar_Articulo
*--------------------
Local Filtro := Str(Form_123.Combo_2.Value,4)
Rubros->(DbSetorder(1))
Rubros->(DbSeek(Filtro))
Arti->(Ordscope(0,Filtro))
Arti->(ordScope(1,Filtro))
Arti->(DbGotop())
Form_123.Browse_1.Refresh
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Setfocus
Return
*------------------------
Static Procedure Existe_Articulo
*------------------------
Local ldigito := .T.
Local lBusca := Trim(Form_123.Text_1.Value)
Do Case
Case Form_123.Combo_1.Value = 1
Arti->(DbSeek(lBusca))
If !Found()
MsgInfo("No hay coincidencias" + chr(10) + "Se regresa al ultimo valor hallado","Busqueda")
Form_123.Text_1.Value := Substr(Form_123.Text_1.Value,1,Len(Form_123.Text_1.Value) - 1)
Form_123.Text_1.Caretpos := Len(Form_123.Text_1.Value)
Form_123.Text_1.Setfocus
Endif
Endcase
Form_123.Browse_1.Value := Arti->(Recno())
Form_123.Browse_1.Refresh
Return
*-----------------------
Static Procedure Aceptar_Articulo
*-----------------------
Thiswindow.Release
Form_122.Text_1.Value := Arti->Codigo
Form_122.Text_2.Value := Arti->Articulo
Do Case
Case c_Lispre = 1
Form_122.Text_5.Value := Arti->Preven
Case c_Lispre = 2
Form_122.Text_5.Value := Arti->Preven2
Case c_Lispre = 3
Form_122.Text_5.Value := Arti->Preven3
Endcase
Form_122.Text_1.Setfocus
Return
*--------------------------
Static Procedure Move_Focus
*--------------------------
Local c_Objeto := This.FocusedControl
Do Case
Case c_Objeto = "Text_5"
Form_122.Text_4.Setfocus
Case c_Objeto = "Text_4"
Form_122.Text_3.Setfocus
Case c_Objeto = "Text_3"
Form_122.Text_2.Setfocus
Endcase
Return
*--------------
Static Procedure BL_Farticulo
*--------------
Select Arti
Arti->(DbSetorder(1))
Arti->(DbGoTop())
Load Window Form_123a
ON KEY ESCAPE OF FORM_123a ACTION (THISWINDOW.RELEASE , Form_122.Text_1.Setfocus)
Form_123a.Combo_1.Value := 2
Form_123a.Text_1.Setfocus
Center Window Form_123a
Activate Window Form_123a
Return
*------------------------
Static Procedure Indice_Farticulo
*------------------------
Do Case
Case Form_123a.Combo_1.Value = 1
Set Order To Tag Indice_2
Case Form_123a.Combo_1.Value = 2
Set Order To Tag Indice_3
Endcase
Modify Control Text_1 Of Form_123a Value Space(20)
Arti->(DbGoTop())
Form_123a.Text_1.Setfocus
Return
*------------------------
Static Procedure Buscar_Farticulo
*------------------------
Local ldigito := .T.
Local cBusca := "*" + AllTrim(Form_123a.Text_1.Value) + "*"
Arti->(DbGoTop())
DELETE ITEM ALL FROM Grid_1 OF Form_123a
If !Empty(Form_123a.Text_1.Value)
Do Case
Case Form_123a.Combo_1.Value = 1
Do While OrdWildSeek( cBusca , .T. )
ADD ITEM { Codigo , Nombre , Str(Preven,10,2) , Str(Preven2,10,2) , Str(Preven3,10,2) , Str(Stock,10,2) } TO Grid_1 OF Form_123a
EndDo
Case Form_123a.Combo_1.Value = 2
Do While OrdWildSeek( cBusca , .T. )
ADD ITEM { Codigo , Nombre , Str(Preven,10,2) , Str(Preven2,10,2) , Str(Preven3,10,2) , Str(Stock,10,2) } TO Grid_1 OF Form_123a
EndDo
Endcase
Endif
Form_123a.Grid_1.Value := Form_123a.Grid_1.ItemCount
*Form_103a.Grid_1.Setfocus
Return
*-----------------------
Static Procedure Cancelar_Farticulo
*-----------------------
Thiswindow.Release
Form_122.Text_1.Setfocus
Return
*-----------------------
Static Procedure Aceptar_Farticulo
*-----------------------
Local i := Form_123a.Grid_1.Value
Local aTemp
If i != 0
aTemp := Form_123a.Grid_1.Item(i)
Thiswindow.Release
Form_122.Text_1.Value := Val(aTemp[1])
Form_122.Text_1.Setfocus
Else
MsgInfo("Disculpe !!" + chr(10) + ;
"No hay articulos seleccionados","Atención")
Thiswindow.Release
Form_122.Text_1.Setfocus
Endif
Return
Re: HMG 3.4.4
Greeting.
You should need help
How to connect to Microsoft sql server and retrieve data
Thanks a lot
You should need help
How to connect to Microsoft sql server and retrieve data
Thanks a lot