thecore_print_commons 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a75ca48646863e62f33479174c453305b81aa9e907d3b5606e009fce8b7f4eb4
4
- data.tar.gz: 34200d7c4a43265887eba4a02d46af283b61a258f29c6f0d1c9480fdc46722c6
3
+ metadata.gz: 86c74b9cadc64d8b0f75bd0b67364a79c84117947cf4729f993d4734bd0a9838
4
+ data.tar.gz: 4ba907d65c9d61530f5da4a26669f686705acf67e62421b7f2a79bec449ed4d3
5
5
  SHA512:
6
- metadata.gz: 01744f41db8ab1352823a83c0e25565edd7252935fd8c50a783ad67187b5fbdcbd4903540e7b3da937d15efca05a4ff940c1dad6c94e2bb601305fb83b590eca
7
- data.tar.gz: f8fb937db80a18c5a317258008c86784ddcc02372cf93a2b4014a10f19136f0509af01e4907c7e071fe4300e7a6da90f86e8c9b181d85848ae48a2b61cd8e82b
6
+ metadata.gz: 5496efffaa44df68348d5a8622bde49880f133990dafd1f59716c21f7f7900830d1a8e4c1c7a74fb3372ded750e91fcc709d6dfb8442219f8754db9912d25910
7
+ data.tar.gz: e2ca1d4b65cbcd51ab76488e38bbc53346266dff3aec30c252a53bb598e3e05f6a34ae250835098408723c492d79673da85a176a630fc19916b66a096e29e3be
@@ -27,7 +27,7 @@ module Api::Printer
27
27
  # { test: [ :first, :second, :third ], id: id, params: params}
28
28
  # end
29
29
 
30
- def self.custom_action_print_single_barcode id, barcode
30
+ def self.custom_action_print_single_barcode id, params
31
31
  # Example Usage:
32
32
  # item = ::Item.joins(:projects).where(projects: {id: params[:order_id].to_i}).first
33
33
  # printer = ::Printer.where(supplier_id: current_user.supplier_id, default: true).first
@@ -37,7 +37,7 @@ module Api::Printer
37
37
  # ::PrintWorker.perform_async(printer.ip, text)
38
38
 
39
39
  printer = Printer.find(id)
40
- text = printer.print_template.template.gsub(printer.print_template.translation_matrix.lines.first, barcode)
40
+ text = printer.print_template.template.gsub(printer.print_template.translation_matrix.lines.first, params[:barcode])
41
41
  ::PrintWorker.perform_async(printer.ip, printer.port, text)
42
42
  { info: "Print job sent in background to #{printer.ip} on port #{printer.port}" }
43
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_print_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni