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 +4 -4
- data/app/models/concerns/api/printer.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c74b9cadc64d8b0f75bd0b67364a79c84117947cf4729f993d4734bd0a9838
|
4
|
+
data.tar.gz: 4ba907d65c9d61530f5da4a26669f686705acf67e62421b7f2a79bec449ed4d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|