@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function addLine($prefix = '', $suffix = '', $delimiter = ' ') |
33 | 33 | { |
34 | 34 | $initialSpace = str_repeat(" ", $this->initialSpace); |
35 | - $count = $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix); |
|
35 | + $count = $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix); |
|
36 | 36 | if ($count > 0) |
37 | 37 | $delimiter = str_repeat($delimiter, $count); |
38 | 38 | $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n"; |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | public function generatePrintData(Device $device, People $provider, ?array $aditionalData = []): Spool |
51 | 51 | { |
52 | 52 | $printer = null; |
53 | - $device_config = $this->deviceService->discoveryDeviceConfig($device, $provider)->getConfigs(true); |
|
53 | + $device_config = $this->deviceService->discoveryDeviceConfig($device, $provider)->getConfigs(true); |
|
54 | 54 | if (isset($device_config['printer'])) |
55 | 55 | $printer = $this->deviceService->discoveryDevice($device_config['printer']); |
56 | 56 | |
57 | - $content = [ |
|
57 | + $content = [ |
|
58 | 58 | "operation" => "PRINT_TEXT", |
59 | 59 | "styles" => [[]], |
60 | 60 | "value" => [$this->text] |
@@ -33,8 +33,9 @@ discard block |
||
33 | 33 | { |
34 | 34 | $initialSpace = str_repeat(" ", $this->initialSpace); |
35 | 35 | $count = $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix); |
36 | - if ($count > 0) |
|
37 | - $delimiter = str_repeat($delimiter, $count); |
|
36 | + if ($count > 0) { |
|
37 | + $delimiter = str_repeat($delimiter, $count); |
|
38 | + } |
|
38 | 39 | $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n"; |
39 | 40 | } |
40 | 41 | |
@@ -51,8 +52,9 @@ discard block |
||
51 | 52 | { |
52 | 53 | $printer = null; |
53 | 54 | $device_config = $this->deviceService->discoveryDeviceConfig($device, $provider)->getConfigs(true); |
54 | - if (isset($device_config['printer'])) |
|
55 | - $printer = $this->deviceService->discoveryDevice($device_config['printer']); |
|
55 | + if (isset($device_config['printer'])) { |
|
56 | + $printer = $this->deviceService->discoveryDevice($device_config['printer']); |
|
57 | + } |
|
56 | 58 | |
57 | 59 | $content = [ |
58 | 60 | "operation" => "PRINT_TEXT", |
@@ -62,8 +64,9 @@ discard block |
||
62 | 64 | |
63 | 65 | $printData = $this->addToSpool($printer ?: $device, json_encode($content), $aditionalData); |
64 | 66 | |
65 | - if ($printer != $device) |
|
66 | - $x = ''; |
|
67 | + if ($printer != $device) { |
|
68 | + $x = ''; |
|
69 | + } |
|
67 | 70 | |
68 | 71 | return $printData; |
69 | 72 | } |
@@ -76,19 +76,19 @@ |
||
76 | 76 | #[GeneratedValue(strategy: 'IDENTITY')] |
77 | 77 | private int $id = 0; |
78 | 78 | |
79 | - #[Groups(['file:read', 'spool:read', 'order_details:read', 'category:read', 'product_category:read', 'order_product:read', 'product_file:read', 'product:read', 'spool_item:read', 'file_item:read', 'file:write', 'contract:read', 'model:read', 'people:read'])] |
|
79 | + #[Groups(['file:read', 'spool:read', 'order_details:read', 'category:read', 'product_category:read', 'order_product:read', 'product_file:read', 'product:read', 'spool_item:read', 'file_item:read', 'file:write', 'contract:read', 'model:read', 'people:read'])] |
|
80 | 80 | #[NotBlank] |
81 | 81 | #[ApiFilter(filterClass: SearchFilter::class, properties: ['fileType' => 'exact'])] |
82 | 82 | #[Column(type: 'string', length: 255, nullable: false)] |
83 | 83 | private string $fileType; |
84 | 84 | |
85 | - #[Groups(['file:read', 'spool:read', 'order_details:read', 'category:read', 'product_category:read', 'order_product:read', 'product_file:read', 'product:read', 'spool_item:read', 'file_item:read', 'file:write', 'contract:read', 'model:read', 'people:read'])] |
|
85 | + #[Groups(['file:read', 'spool:read', 'order_details:read', 'category:read', 'product_category:read', 'order_product:read', 'product_file:read', 'product:read', 'spool_item:read', 'file_item:read', 'file:write', 'contract:read', 'model:read', 'people:read'])] |
|
86 | 86 | #[NotBlank] |
87 | 87 | #[ApiFilter(filterClass: SearchFilter::class, properties: ['fileName' => 'exact'])] |
88 | 88 | #[Column(type: 'string', length: 255, nullable: false)] |
89 | 89 | private string $fileName; |
90 | 90 | |
91 | - #[Groups(['file:read', 'spool:read', 'order_details:read', 'category:read', 'product_category:read', 'order_product:read', 'product_file:read', 'product:read', 'spool_item:read', 'file_item:read', 'file:write', 'contract:read', 'model:read', 'people:read'])] |
|
91 | + #[Groups(['file:read', 'spool:read', 'order_details:read', 'category:read', 'product_category:read', 'order_product:read', 'product_file:read', 'product:read', 'spool_item:read', 'file_item:read', 'file:write', 'contract:read', 'model:read', 'people:read'])] |
|
92 | 92 | #[NotBlank] |
93 | 93 | #[ApiFilter(filterClass: SearchFilter::class, properties: ['context' => 'exact'])] |
94 | 94 | #[Column(type: 'string', length: 255, nullable: false)] |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
56 | 56 | #[Groups([ |
57 | 57 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
58 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
58 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
59 | 59 | ])] |
60 | 60 | private $id; |
61 | 61 | |
62 | 62 | #[ORM\Column(name: 'status', type: 'string', nullable: false)] |
63 | 63 | #[Groups([ |
64 | 64 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
65 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
65 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
66 | 66 | ])] |
67 | 67 | #[Assert\NotBlank] |
68 | 68 | #[Assert\Type(type: 'string')] |
@@ -71,42 +71,42 @@ discard block |
||
71 | 71 | #[ORM\Column(name: 'real_status', type: 'string', nullable: false)] |
72 | 72 | #[Groups([ |
73 | 73 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
74 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
74 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
75 | 75 | ])] |
76 | 76 | private $realStatus; |
77 | 77 | |
78 | 78 | #[ORM\Column(name: 'visibility', type: 'string', nullable: false)] |
79 | 79 | #[Groups([ |
80 | 80 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
81 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
81 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
82 | 82 | ])] |
83 | 83 | private $visibility = 1; |
84 | 84 | |
85 | 85 | #[ORM\Column(name: 'notify', type: 'boolean', nullable: false)] |
86 | 86 | #[Groups([ |
87 | 87 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
88 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
88 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
89 | 89 | ])] |
90 | 90 | private $notify = 1; |
91 | 91 | |
92 | 92 | #[ORM\Column(name: 'system', type: 'boolean', nullable: false)] |
93 | 93 | #[Groups([ |
94 | 94 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
95 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
95 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
96 | 96 | ])] |
97 | 97 | private $system = 0; |
98 | 98 | |
99 | 99 | #[ORM\Column(name: 'color', type: 'string', nullable: false)] |
100 | 100 | #[Groups([ |
101 | 101 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
102 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
102 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
103 | 103 | ])] |
104 | 104 | private $color = ''; |
105 | 105 | |
106 | 106 | #[ORM\Column(name: 'context', type: 'string', nullable: false)] |
107 | 107 | #[Groups([ |
108 | 108 | 'contract:read', 'task:read', 'display_queue:read', 'display:read', 'order_product_queue:read', 'order:read', 'order_details:read', 'order:write', |
109 | - 'invoice:read', 'invoice_details:read', 'connections:read','status:read','spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
109 | + 'invoice:read', 'invoice_details:read', 'connections:read', 'status:read', 'spool_item:read', 'spool:read', 'spool:write', 'status:write', 'order_detail_status:read', 'logistic:read', 'queue:read', 'queue_people_queue:read' |
|
110 | 110 | ])] |
111 | 111 | private $context; |
112 | 112 |