spf_barcode 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/spf_barcode/version.rb +1 -1
- data/lib/spf_barcode.rb +13 -33
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTE3NzRiNGMzOTU5ZDQ1OTVmNDI4NmE3OTZkZTQ1YTlhZjA3N2U0Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTQ2MzRhYThhYjBlNDY5ZWIzMzc1YTVjYzFjNmFhMmQ2M2Q4MjRlMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGRjMjc3ZTE3ZDE5NThiNzJjNzcxM2RiYTM4ZWQ2ODA4OTIzY2ZmNjY1Mzg4
|
10
|
+
Y2QyYzM5ZDgxMDM4N2YxMzhlNTY2MjI2ZmYzZDA0ZWI5OWFhMWVjOTYzZDJm
|
11
|
+
YmMyNzU2NDZjNjA2MjVlY2Y0MzNlN2YyZTRmYjFiNmQ3NzJmNjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2E2ODdmMTRhMTI4ZTEwM2RmYWM4MmU1YTM1MzVhYTVhZDEyY2FjZjRmMGI1
|
14
|
+
ODMwMDI4YjY3OTM2MjJmMTkyNjVkNzk4NDFkOWE2ZTY4ODJmZDFlNTRkNTYw
|
15
|
+
YzgxYzIxNWI0OTE1NWFkOTRlZmNiMDUyMDkwYmYxNDBhZjIyZWE=
|
data/lib/spf_barcode/version.rb
CHANGED
data/lib/spf_barcode.rb
CHANGED
@@ -46,39 +46,14 @@ class BarcodeOptimaDecode
|
|
46
46
|
|
47
47
|
def decode
|
48
48
|
|
49
|
-
if @barcode
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
when '
|
55
|
-
when '
|
56
|
-
|
57
|
-
when '*501*' then @accion = 'SELECCIONAR1'
|
58
|
-
when '*502*' then @accion = 'SELECCIONAR2'
|
59
|
-
when '*503*' then @accion = 'SELECCIONAR3'
|
60
|
-
when '*504*' then @accion = 'SELECCIONAR4'
|
61
|
-
when '*505*' then @accion = 'SELECCIONAR5'
|
62
|
-
when '*506*' then @accion = 'SELECCIONAR6'
|
63
|
-
when '*601*' then @accion = 'MOTIVO01'
|
64
|
-
when '*602*' then @accion = 'MOTIVO02'
|
65
|
-
when '*603*' then @accion = 'MOTIVO03'
|
66
|
-
when '*604*' then @accion = 'MOTIVO04'
|
67
|
-
when '*605*' then @accion = 'MOTIVO05'
|
68
|
-
when '*606*' then @accion = 'MOTIVO06'
|
69
|
-
when '*607*' then @accion = 'MOTIVO07'
|
70
|
-
when '*608*' then @accion = 'MOTIVO08'
|
71
|
-
when '*609*' then @accion = 'MOTIVO09'
|
72
|
-
|
73
|
-
when '*701*' then @accion = 'MOMENTO01'
|
74
|
-
when '*702*' then @accion = 'MOMENTO02'
|
75
|
-
when '*703*' then @accion = 'MOMENTO03'
|
76
|
-
when '*704*' then @accion = 'MOMENTO04'
|
77
|
-
when '*705*' then @accion = 'MOMENTO05'
|
78
|
-
when '*706*' then @accion = 'MOMENTO06'
|
79
|
-
when '*707*' then @accion = 'MOMENTO07'
|
80
|
-
when '*708*' then @accion = 'MOMENTO08'
|
81
|
-
when '*709*' then @accion = 'MOMENTO09'
|
49
|
+
if @barcode[/\*\d\d\d\*/]
|
50
|
+
@tipo = @barcode[1]
|
51
|
+
@numero = @barcode[2..3].to_i.to_s # 01=> 1
|
52
|
+
case @tipo
|
53
|
+
when '9' then @accion = 'ROTURA'
|
54
|
+
when '7' then @accion = 'MOMENTO'
|
55
|
+
when '6' then @accion = 'MOTIVO'
|
56
|
+
when '5' then @accion = 'SELECCIONAR'
|
82
57
|
end
|
83
58
|
else
|
84
59
|
|
@@ -90,9 +65,14 @@ class BarcodeOptimaDecode
|
|
90
65
|
self
|
91
66
|
end
|
92
67
|
|
68
|
+
# PARA LOS CODIGOS DE BARRA, SE LES PIDE ACCION Y NUMERO
|
93
69
|
def accion
|
94
70
|
@accion
|
95
71
|
end
|
72
|
+
def numero
|
73
|
+
@numero
|
74
|
+
end
|
75
|
+
########################################################
|
96
76
|
|
97
77
|
def pedido
|
98
78
|
@pedido
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spf_barcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Ramseyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|