@@ -68,36 +68,36 @@ discard block |
||
68 | 68 | |
69 | 69 | // imprimimos el nombre corto de la empresa |
70 | 70 | if ($printer->print_comp_shortname) { |
71 | - static::$escpos->text(static::sanitize($company->nombrecorto) . "\n"); |
|
71 | + static::$escpos->text(static::sanitize($company->nombrecorto)."\n"); |
|
72 | 72 | static::$escpos->setTextSize($printer->head_font_size, $printer->head_font_size); |
73 | 73 | |
74 | 74 | // imprimimos el nombre de la empresa |
75 | - static::$escpos->text(static::sanitize($company->nombre) . "\n"); |
|
75 | + static::$escpos->text(static::sanitize($company->nombre)."\n"); |
|
76 | 76 | } else { |
77 | 77 | // imprimimos el nombre de la empresa |
78 | - static::$escpos->text(static::sanitize($company->nombre) . "\n"); |
|
78 | + static::$escpos->text(static::sanitize($company->nombre)."\n"); |
|
79 | 79 | static::$escpos->setTextSize($printer->head_font_size, $printer->head_font_size); |
80 | 80 | } |
81 | 81 | |
82 | 82 | static::$escpos->setJustification(); |
83 | 83 | |
84 | 84 | // imprimimos la dirección de la empresa |
85 | - static::$escpos->text(static::sanitize($company->direccion) . "\n"); |
|
86 | - static::$escpos->text(static::sanitize("CP: " . $company->codpostal . ', ' . $company->ciudad) . "\n"); |
|
87 | - static::$escpos->text(static::sanitize($company->tipoidfiscal . ': ' . $company->cifnif) . "\n\n"); |
|
85 | + static::$escpos->text(static::sanitize($company->direccion)."\n"); |
|
86 | + static::$escpos->text(static::sanitize("CP: ".$company->codpostal.', '.$company->ciudad)."\n"); |
|
87 | + static::$escpos->text(static::sanitize($company->tipoidfiscal.': '.$company->cifnif)."\n\n"); |
|
88 | 88 | |
89 | 89 | if ($printer->print_comp_tlf) { |
90 | 90 | if (false === empty($company->telefono1) && false === empty($company->telefono2)) { |
91 | - static::$escpos->text(static::sanitize($company->telefono1 . ' / ' . $company->telefono2) . "\n"); |
|
91 | + static::$escpos->text(static::sanitize($company->telefono1.' / '.$company->telefono2)."\n"); |
|
92 | 92 | } elseif (false === empty($company->telefono1)) { |
93 | - static::$escpos->text(static::sanitize($company->telefono1) . "\n"); |
|
93 | + static::$escpos->text(static::sanitize($company->telefono1)."\n"); |
|
94 | 94 | } elseif (false === empty($company->telefono2)) { |
95 | - static::$escpos->text(static::sanitize($company->telefono2) . "\n"); |
|
95 | + static::$escpos->text(static::sanitize($company->telefono2)."\n"); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
99 | 99 | // imprimimos el título del documento |
100 | - static::$escpos->text(static::sanitize($title) . "\n"); |
|
100 | + static::$escpos->text(static::sanitize($title)."\n"); |
|
101 | 101 | |
102 | 102 | static::setHeaderTPV($model, $printer); |
103 | 103 | |
@@ -115,19 +115,19 @@ discard block |
||
115 | 115 | ) |
116 | 116 | ) { |
117 | 117 | static::$escpos->text(static::sanitize( |
118 | - static::$i18n->trans('date') . ': ' . $model->fecha . ' ' . $model->hora |
|
119 | - ) . "\n"); |
|
118 | + static::$i18n->trans('date').': '.$model->fecha.' '.$model->hora |
|
119 | + )."\n"); |
|
120 | 120 | static::$escpos->text(static::sanitize( |
121 | - static::$i18n->trans('customer') . ': ' . $model->nombrecliente |
|
122 | - ) . "\n"); |
|
123 | - if(strlen($model->cifnif) == 9) { |
|
121 | + static::$i18n->trans('customer').': '.$model->nombrecliente |
|
122 | + )."\n"); |
|
123 | + if (strlen($model->cifnif) == 9) { |
|
124 | 124 | static::$escpos->text(static::sanitize( |
125 | - static::$i18n->trans('title-cifnif-rnc') . ': ' . $model->cifnif |
|
126 | - ) . "\n\n"); |
|
125 | + static::$i18n->trans('title-cifnif-rnc').': '.$model->cifnif |
|
126 | + )."\n\n"); |
|
127 | 127 | } else { |
128 | 128 | static::$escpos->text(static::sanitize( |
129 | - static::$i18n->trans('title-cifnif-ci') . ': ' . $model->cifnif |
|
130 | - ) . "\n\n"); |
|
129 | + static::$i18n->trans('title-cifnif-ci').': '.$model->cifnif |
|
130 | + )."\n\n"); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | |
@@ -135,21 +135,21 @@ discard block |
||
135 | 135 | |
136 | 136 | if (property_exists($model, 'tipocomprobante') && $model->tipocomprobante) { |
137 | 137 | static::$escpos->text(static::sanitize( |
138 | - static::$i18n->trans('tipo_comprobante') . ': ' . |
|
138 | + static::$i18n->trans('tipo_comprobante').': '. |
|
139 | 139 | $model->descripcionTipoComprobante() |
140 | - ). "\n"); |
|
140 | + )."\n"); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | if (property_exists($model, 'numeroncf') && $model->numeroncf) { |
144 | 144 | static::$escpos->text(static::sanitize( |
145 | - static::$i18n->trans('ncf-number') . ': ' . $model->numeroncf |
|
146 | - ). "\n"); |
|
145 | + static::$i18n->trans('ncf-number').': '.$model->numeroncf |
|
146 | + )."\n"); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | if (property_exists($model, 'ncffechavencimiento') && $model->ncffechavencimiento) { |
150 | 150 | static::$escpos->text(static::sanitize( |
151 | - static::$i18n->trans('due-date') . ': ' . $model->ncffechavencimiento |
|
152 | - ). "\n\n"); |
|
151 | + static::$i18n->trans('due-date').': '.$model->ncffechavencimiento |
|
152 | + )."\n\n"); |
|
153 | 153 | } else { |
154 | 154 | static::$escpos->text("\n\n"); |
155 | 155 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // añadimos la cabecera |
160 | 160 | if ($printer->head) { |
161 | 161 | static::$escpos->setJustification(Printer::JUSTIFY_CENTER); |
162 | - static::$escpos->text(static::sanitize($printer->head) . "\n\n"); |
|
162 | + static::$escpos->text(static::sanitize($printer->head)."\n\n"); |
|
163 | 163 | static::$escpos->setJustification(); |
164 | 164 | } |
165 | 165 | } |