GS1 Function's - Funciones GS1
Moderator: Rathinagiri
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
GS1 Function's - Funciones GS1
I create some functions for a program and share them with sample.
Tuve que crear unas funciones para un programa y las comparto con un "main" para ejemplo de uso.
EanCheck () ---> Verifica en un codigo EAN-8 o EAN-13 si el Checksum es correcto (devuelve .T.)
EanCheckSum () ---> Genera el digito verificador acorde al standard EAN (Checksum) del codigo ingresado
GS1 () ---> Recibe los 3 primeros digitos y retorna un Array de 3 Items (Paises)
It is not multilingual but can be easily modified.
No es multilingue pero se puede modificar fácil.
I hope someone will find it useful !
Tuve que crear unas funciones para un programa y las comparto con un "main" para ejemplo de uso.
EanCheck () ---> Verifica en un codigo EAN-8 o EAN-13 si el Checksum es correcto (devuelve .T.)
EanCheckSum () ---> Genera el digito verificador acorde al standard EAN (Checksum) del codigo ingresado
GS1 () ---> Recibe los 3 primeros digitos y retorna un Array de 3 Items (Paises)
It is not multilingual but can be easily modified.
No es multilingue pero se puede modificar fácil.
I hope someone will find it useful !
- Attachments
-
- Funciones_GS1.zip
- (1.79 MiB) Downloaded 153 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: GS1 Function's - Funciones GS1
Claudio, hace varios años ya subí un ejemplo sobre gs1 ahí tenías todo armado
https://hmgforum.com/viewtopic.php?f=9&t=2449
https://hmgforum.com/viewtopic.php?f=9&t=2449
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: GS1 Function's - Funciones GS1
Hola Daniel... Vi tu código, está muy bueno, pero necesitaba algo específico para un cliente/amigo,
El creó códigos al azar para productos internos (preparados) y se encontró que el scanner no los leía
y necesitaba modificarlos, por eso cree EanCheckSum () (basado en un FoxPro que vi en Wikipedia)
para que sólo cambie el último dígito a los códigos que tiene creados.
También un generador de etiquetas (copié de acá y adapté a la necesidad)
EanCheck () la hice para filtrar:
Local cCodigo := AllTrim (GetProperty ("Articulo_Nuevo","Text_Codigo","Value"))
If Empty (cCodigo)
MsgStop ("Debe asignarle un código al nuevo artículo !","Atención !")
Return Nil
ElseIf ! EanCheck (cCodigo)
MsgStop ("Código incorrecto, Error de checksum !","Atención !")
Return Nil
EndIf
Y la otra por autónoma (no DB) sólo agregarla al compendio de funciones que ya tengo,
las banderitas fué un adorno extra para un antiguo programa de utilidades que pasé a HMG.
Siempre hice las funciones que fuí necesitando, subo unas con más de 20 años,
que incluia (#Include "Funcion.prg") en mis viejos programas... época Clipper
El creó códigos al azar para productos internos (preparados) y se encontró que el scanner no los leía
y necesitaba modificarlos, por eso cree EanCheckSum () (basado en un FoxPro que vi en Wikipedia)
para que sólo cambie el último dígito a los códigos que tiene creados.
También un generador de etiquetas (copié de acá y adapté a la necesidad)
EanCheck () la hice para filtrar:
Local cCodigo := AllTrim (GetProperty ("Articulo_Nuevo","Text_Codigo","Value"))
If Empty (cCodigo)
MsgStop ("Debe asignarle un código al nuevo artículo !","Atención !")
Return Nil
ElseIf ! EanCheck (cCodigo)
MsgStop ("Código incorrecto, Error de checksum !","Atención !")
Return Nil
EndIf
Y la otra por autónoma (no DB) sólo agregarla al compendio de funciones que ya tengo,
las banderitas fué un adorno extra para un antiguo programa de utilidades que pasé a HMG.
Siempre hice las funciones que fuí necesitando, subo unas con más de 20 años,
que incluia (#Include "Funcion.prg") en mis viejos programas... época Clipper
- Attachments
-
- FUNCION.PRG.zip
- (5.92 KiB) Downloaded 141 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: GS1 Function's - Funciones GS1
Hola Claudio. Gs1 tiene numeración personal (código interno) de productos, los mismos comienzan con el código 999..El creó códigos al azar para productos internos (preparados) y se encontró que el scanner no los leía
La BD contiene la bandera de los países conformados por Gs1 y así saber el origen del producto. Pero la BD de los productos son pagas y nose como con seguirlas para evitar el rellenado del nombre de producto para un nuevo alta de ese mismo producto..
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: GS1 Function's - Funciones GS1
Claudio, I am not sure if this is what you need.
In the order system of my pos I print labels for all items in order to put on items for resale so they have on them what my clients want.
On the label is a bar code so they can scan it at sale. The bar code is the internal part number. Eg: PART123.
I had to add the font free 3 of 9 to the windows font folder if it was not there. I printed on label paper and had 2 different sizes of labels
To print this I found I need a * before and after part number. In the printout I print my partnumber desc price an barcode Like
@ 1,1 print "*"+alltrim(mypart)+"*" font free 3 of 9 extended size 17 // 17 small label size 24 large label.
@ 1+4.5,1 print mypart font arial size 5
@1+6.5, 1 print desc font arial size 6
and so on.
If this is what you need I could send the complete procedure. It is set to to skip the number of labels missing on page, plus label print.
In the order system of my pos I print labels for all items in order to put on items for resale so they have on them what my clients want.
On the label is a bar code so they can scan it at sale. The bar code is the internal part number. Eg: PART123.
I had to add the font free 3 of 9 to the windows font folder if it was not there. I printed on label paper and had 2 different sizes of labels
To print this I found I need a * before and after part number. In the printout I print my partnumber desc price an barcode Like
@ 1,1 print "*"+alltrim(mypart)+"*" font free 3 of 9 extended size 17 // 17 small label size 24 large label.
@ 1+4.5,1 print mypart font arial size 5
@1+6.5, 1 print desc font arial size 6
and so on.
If this is what you need I could send the complete procedure. It is set to to skip the number of labels missing on page, plus label print.
All The Best,
Franco
Canada
Franco
Canada
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: GS1 Function's - Funciones GS1
Thank you very much Franco
But what I needed is that the user does not write a code
incorrect (with checksum error) when creating new ones that the scanner will not read later.
That's why I made the EanCheck () function and shared it with an example of use, in case it was useful to someone.
To generate the barcode tag I adapted a code from this forum and it worked perfect.
But what I needed is that the user does not write a code
incorrect (with checksum error) when creating new ones that the scanner will not read later.
That's why I made the EanCheck () function and shared it with an example of use, in case it was useful to someone.
To generate the barcode tag I adapted a code from this forum and it worked perfect.
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: GS1 Function's - Funciones GS1
Hola Claudio : Mi aplicacion POS tiene en la parte de venta un textbox multiproposito donde se puede ingresar un codigo EAN, un precio y un multiplicador de articulo ya ingresado.
EJ : 7790895646775
este automaticamente se ingresa al GRID de venta y se imprime en el ticket (conmitancia que pide la AFIP)
EJ : 55.00
se ingresa al GRID en forma de articulo varios y se imprime en el ticket (IDEM)
EJ: 2+
se multiplica X2 el ultimo ingreso del GRID, para casos que lleva el mismo producto en X cantidad. evita pasar varias veces el mismo producto por el scanner y que el ticket resulte largo, tamb de imprime en el TICKET como pide la afip por conmitancia.
la pregunta es.. tienes algo parecido ya que debo modificar este textbox para hacerlo mas legible y mas robusto el codigo ya que presenta falencias (en algunos casos se debe cerrar el modulo de venta)
todo esto es parecido a como se maneja una caja registradora Sweda en el mismo supermercado donde implemente hace mas de 10 años este POS
EJ : 7790895646775
este automaticamente se ingresa al GRID de venta y se imprime en el ticket (conmitancia que pide la AFIP)
EJ : 55.00
se ingresa al GRID en forma de articulo varios y se imprime en el ticket (IDEM)
EJ: 2+
se multiplica X2 el ultimo ingreso del GRID, para casos que lleva el mismo producto en X cantidad. evita pasar varias veces el mismo producto por el scanner y que el ticket resulte largo, tamb de imprime en el TICKET como pide la afip por conmitancia.
la pregunta es.. tienes algo parecido ya que debo modificar este textbox para hacerlo mas legible y mas robusto el codigo ya que presenta falencias (en algunos casos se debe cerrar el modulo de venta)
todo esto es parecido a como se maneja una caja registradora Sweda en el mismo supermercado donde implemente hace mas de 10 años este POS
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: GS1 Function's - Funciones GS1
Daniel, Are the items you are selling inventory items.
If so, this is what I use in my pos system.
In my inventory table I have 2 item fields.
The first is the main inventory number, which could be a barcode or manufacturers number. field num1 indexed
The second is what I call the alternate number and is the barcode if the first is not a barcode. field num2 indexed
When a sales person enters a number in your entry text box the system looks for num1, if found it uses the table information .
If not found I switch the index to num2 and seek the alternate number which is the bar code , if found I make record of recno() and switch the
index back to num1 and go to recno I then use the num1 part number and any record field information I want for the grid and update qty on hand.
There are 3 tables involved here. A postedinvoice table, posteditem table and an inventory table.
There are more things I also do here Like when items not found and so on, but the above is the barcode part.
This seems to work very well for me.
If so, this is what I use in my pos system.
In my inventory table I have 2 item fields.
The first is the main inventory number, which could be a barcode or manufacturers number. field num1 indexed
The second is what I call the alternate number and is the barcode if the first is not a barcode. field num2 indexed
When a sales person enters a number in your entry text box the system looks for num1, if found it uses the table information .
If not found I switch the index to num2 and seek the alternate number which is the bar code , if found I make record of recno() and switch the
index back to num1 and go to recno I then use the num1 part number and any record field information I want for the grid and update qty on hand.
There are 3 tables involved here. A postedinvoice table, posteditem table and an inventory table.
There are more things I also do here Like when items not found and so on, but the above is the barcode part.
This seems to work very well for me.
All The Best,
Franco
Canada
Franco
Canada
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: GS1 Function's - Funciones GS1
Hola Daniel...
Estas son las ventanas de venta de dos programas que hice.
En el primero pueden escribir *2 o *x para que cambie la cantidad (solo venta por unidad)
antes de scanear o ingresar a mano el codigo (viene del ticket de balanza Systel)
y los botones muestran (con un icono redondo verde) si es codigo de la balanza (carniceria)
o de un producto como carbon, condimentos, etc.
Son tres sucursales y la db es MariaDB en hosting remoto Centos 7 contratado.
En el segundo la cantidad se cambia con las flechas del teclado. Es solo DBF local.
En ambos con doble click sobre el browse habilita borrar ese registro.
Si te sirve algo de eso te paso los .prg y .fmg de ventas de esos,
y sinó podemos ver cómo modificar el tuyo.
Estas son las ventanas de venta de dos programas que hice.
En el primero pueden escribir *2 o *x para que cambie la cantidad (solo venta por unidad)
antes de scanear o ingresar a mano el codigo (viene del ticket de balanza Systel)
y los botones muestran (con un icono redondo verde) si es codigo de la balanza (carniceria)
o de un producto como carbon, condimentos, etc.
Son tres sucursales y la db es MariaDB en hosting remoto Centos 7 contratado.
En el segundo la cantidad se cambia con las flechas del teclado. Es solo DBF local.
En ambos con doble click sobre el browse habilita borrar ese registro.
Si te sirve algo de eso te paso los .prg y .fmg de ventas de esos,
y sinó podemos ver cómo modificar el tuyo.
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: GS1 Function's - Funciones GS1
Aqui ambos prg de la parte ventas.
- Attachments
-
- Carniceria.zip
- (10.18 KiB) Downloaded 132 times
-
- Quimica.zip
- (4.95 KiB) Downloaded 130 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162