@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | // TODO: Implement addInvoiceHeader() method. |
| 42 | 42 | $html = $this->getInvoiceHeaderBilling($model) |
| 43 | 43 | . $this->getInvoiceHeaderShipping($model); |
| 44 | - $this->writeHTML('<table class="table-big table-border"><tr>' . $html . '</tr></table><br/>'); |
|
| 44 | + $this->writeHTML('<table class="table-big table-border"><tr>'.$html.'</tr></table><br/>'); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function addInvoiceLines($model): void |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $tHead = '<thead><tr>'; |
| 53 | 53 | foreach ($this->getInvoiceLineFields() as $field) { |
| 54 | - $tHead .= '<th class="' . $field['css'] . '" align="' . $field['align'] . '">' . $field['title'] . '</th>'; |
|
| 54 | + $tHead .= '<th class="'.$field['css'].'" align="'.$field['align'].'">'.$field['title'].'</th>'; |
|
| 55 | 55 | } |
| 56 | 56 | $tHead .= '</tr></thead>'; |
| 57 | 57 | |
@@ -63,20 +63,20 @@ discard block |
||
| 63 | 63 | $line->numlinea = $numLinea; |
| 64 | 64 | $tBody .= '<tr>'; |
| 65 | 65 | foreach ($this->getInvoiceLineFields() as $field) { |
| 66 | - $tBody .= '<td class="' . $field['css'] . '" align="' . $field['align'] . '" valign="top">' . $this->getInvoiceLineValue($model, $line, $field) . '</td>'; |
|
| 66 | + $tBody .= '<td class="'.$field['css'].'" align="'.$field['align'].'" valign="top">'.$this->getInvoiceLineValue($model, $line, $field).'</td>'; |
|
| 67 | 67 | } |
| 68 | 68 | $tBody .= '</tr>'; |
| 69 | 69 | $numLinea++; |
| 70 | 70 | |
| 71 | 71 | if (property_exists($line, 'salto_pagina') && $line->salto_pagina) { |
| 72 | - $this->writeHTML('<div class="table-lines"><table class="table-big table-list">' . $tHead . $tBody . '</table></div>'); |
|
| 72 | + $this->writeHTML('<div class="table-lines"><table class="table-big table-list">'.$tHead.$tBody.'</table></div>'); |
|
| 73 | 73 | $this->writeHTML($this->getInvoiceTotalsPartial($model, $tLines, 'mt-20')); |
| 74 | 74 | $this->mpdf->AddPage(); |
| 75 | 75 | $tBody = ''; |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - $this->writeHTML('<div class="table-lines"><table class="table-big table-list">' . $tHead . $tBody . '</table></div>'); |
|
| 79 | + $this->writeHTML('<div class="table-lines"><table class="table-big table-list">'.$tHead.$tBody.'</table></div>'); |
|
| 80 | 80 | |
| 81 | 81 | // clonamos el documento y añadimos los totales para ver si salta de página |
| 82 | 82 | $copier = new DeepCopy(); |
@@ -95,28 +95,28 @@ discard block |
||
| 95 | 95 | protected function css(): string |
| 96 | 96 | { |
| 97 | 97 | return parent::css() |
| 98 | - . '.title {border-bottom: 2px solid ' . $this->get('color1') . ';}' |
|
| 99 | - . '.table-border {border-top: 1px solid ' . $this->get('color1') . '; border-bottom: 1px solid ' . $this->get('color1') . ';}' |
|
| 100 | - . '.table-dual {border-top: 1px solid ' . $this->get('color1') . '; border-bottom: 1px solid ' . $this->get('color1') . ';}' |
|
| 101 | - . '.table-list {border-spacing: 0px; border-top: 1px solid ' . $this->get('color1') . '; border-bottom: 1px solid ' . $this->get('color1') . ';}' |
|
| 102 | - . '.table-list tr:nth-child(even) {background-color: ' . $this->get('color3') . ';}' |
|
| 103 | - . '.table-list th {background-color: ' . $this->get('color1') . '; color: ' . $this->get('color2') . '; padding: 5px; text-transform: uppercase;}' |
|
| 98 | + . '.title {border-bottom: 2px solid '.$this->get('color1').';}' |
|
| 99 | + . '.table-border {border-top: 1px solid '.$this->get('color1').'; border-bottom: 1px solid '.$this->get('color1').';}' |
|
| 100 | + . '.table-dual {border-top: 1px solid '.$this->get('color1').'; border-bottom: 1px solid '.$this->get('color1').';}' |
|
| 101 | + . '.table-list {border-spacing: 0px; border-top: 1px solid '.$this->get('color1').'; border-bottom: 1px solid '.$this->get('color1').';}' |
|
| 102 | + . '.table-list tr:nth-child(even) {background-color: '.$this->get('color3').';}' |
|
| 103 | + . '.table-list th {background-color: '.$this->get('color1').'; color: '.$this->get('color2').'; padding: 5px; text-transform: uppercase;}' |
|
| 104 | 104 | . '.table-list td {padding: 5px;}' |
| 105 | 105 | . '.thanks-title {' |
| 106 | - . 'font-size: ' . $this->get('titlefontsize') . 'px; font-weight: bold; color: ' . $this->get('color1') . '; ' |
|
| 107 | - . 'text-align: right; width: 50%; padding: 15px; border-end: 1px solid ' . $this->get('color1') . ';' |
|
| 106 | + . 'font-size: '.$this->get('titlefontsize').'px; font-weight: bold; color: '.$this->get('color1').'; ' |
|
| 107 | + . 'text-align: right; width: 50%; padding: 15px; border-end: 1px solid '.$this->get('color1').';' |
|
| 108 | 108 | . '}' |
| 109 | 109 | . '.color-navy {color: navy;}' |
| 110 | 110 | . '.color-blue {color: blue;}' |
| 111 | - . '.color-template {color: ' . $this->get('color1') .';}' |
|
| 111 | + . '.color-template {color: '.$this->get('color1').';}' |
|
| 112 | 112 | . '.thanks-text {padding: 15px;}' |
| 113 | - . '.imagetext {margin-top: 15px; text-align: ' . $this->get('endalign') . ';}' |
|
| 114 | - . '.imagefooter {text-align: ' . $this->get('footeralign') . ';}'; |
|
| 113 | + . '.imagetext {margin-top: 15px; text-align: '.$this->get('endalign').';}' |
|
| 114 | + . '.imagefooter {text-align: '.$this->get('footeralign').';}'; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | protected function getSubjectIdFiscalStr($model): string |
| 118 | 118 | { |
| 119 | - return empty($model->cifnif) ? '' : '<b>' . $model->getSubject()->tipoidfiscal . '</b>: ' . $model->cifnif; |
|
| 119 | + return empty($model->cifnif) ? '' : '<b>'.$model->getSubject()->tipoidfiscal.'</b>: '.$model->cifnif; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | protected function getInvoiceHeaderBilling($model): string |
@@ -128,13 +128,13 @@ discard block |
||
| 128 | 128 | $subject = $model->getSubject(); |
| 129 | 129 | $address = isset($model->codproveedor) && !isset($model->direccion) ? $subject->getDefaultAddress() : $model; |
| 130 | 130 | $customerCode = $this->get('showcustomercode') ? $model->subjectColumnValue() : ''; |
| 131 | - $customerEmail = $this->get('showcustomeremail') && !empty($subject->email) ? '<br>' . Tools::lang()->trans('email') . ': ' . $subject->email : ''; |
|
| 131 | + $customerEmail = $this->get('showcustomeremail') && !empty($subject->email) ? '<br>'.Tools::lang()->trans('email').': '.$subject->email : ''; |
|
| 132 | 132 | $break = empty($model->cifnif) ? '' : '<br/>'; |
| 133 | 133 | return '<td align="left" valign="top">' |
| 134 | - . '<br/><b> ' . $this->getSubjectTitle($model) . ':</b> ' . $customerCode |
|
| 135 | - . $this->getSubjectName($model) . $break . $this->getSubjectIdFiscalStr($model) |
|
| 136 | - . '<br/><b>' . Tools::lang()->trans('address'). ':</b> ' .$this->combineAddress($address) . $this->getInvoiceHeaderBillingPhones($subject) |
|
| 137 | - . '<br/><b>' . Tools::lang()->trans('email'). ':</b> ' .$customerEmail |
|
| 134 | + . '<br/><b> '.$this->getSubjectTitle($model).':</b> '.$customerCode |
|
| 135 | + . $this->getSubjectName($model).$break.$this->getSubjectIdFiscalStr($model) |
|
| 136 | + . '<br/><b>'.Tools::lang()->trans('address').':</b> '.$this->combineAddress($address).$this->getInvoiceHeaderBillingPhones($subject) |
|
| 137 | + . '<br/><b>'.Tools::lang()->trans('email').':</b> '.$customerEmail |
|
| 138 | 138 | . '<br/>' |
| 139 | 139 | . '</td>'; |
| 140 | 140 | } |
@@ -154,8 +154,8 @@ discard block |
||
| 154 | 154 | return ''; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - return '<td><b>' . Tools::lang()->trans('shipping-address') . '</b>' |
|
| 158 | - . '<br/>' . $this->combineAddress($contacto, true) . '</td>'; |
|
| 157 | + return '<td><b>'.Tools::lang()->trans('shipping-address').'</b>' |
|
| 158 | + . '<br/>'.$this->combineAddress($contacto, true).'</td>'; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | protected function getInvoiceHeaderBillingPhones($subject): string |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | return ''; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - return '<br/>' . $strPhones; |
|
| 172 | + return '<br/>'.$strPhones; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | protected function headerLeft(): string |
@@ -182,34 +182,34 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - $title = $this->showHeaderTitle ? '<h1 class="title">' . $this->get('headertitle') . '</h1>' . $this->spacer() : ''; |
|
| 185 | + $title = $this->showHeaderTitle ? '<h1 class="title">'.$this->get('headertitle').'</h1>'.$this->spacer() : ''; |
|
| 186 | 186 | if ($this->isSketchInvoice()) { |
| 187 | - $title .= '<div class="color-red font-big font-bold">' . Tools::lang()->trans('invoice-is-sketch') . '</div>'; |
|
| 187 | + $title .= '<div class="color-red font-big font-bold">'.Tools::lang()->trans('invoice-is-sketch').'</div>'; |
|
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | $descTC = ($this->headerModel->tipocomprobante < 30) ? "<b>NCF:</b> " : "<b>e-NCF:</b> "; |
| 191 | - $fechaVencimiento = ($this->headerModel->ncffechavencimiento !== null) ? '<b>Fecha Vencimiento:</b> ' . $this->headerModel->ncffechavencimiento : ''; |
|
| 192 | - $fechaEmision = '<b>Fecha Emisión:</b> ' . $this->headerModel->fecha; |
|
| 191 | + $fechaVencimiento = ($this->headerModel->ncffechavencimiento !== null) ? '<b>Fecha Vencimiento:</b> '.$this->headerModel->ncffechavencimiento : ''; |
|
| 192 | + $fechaEmision = '<b>Fecha Emisión:</b> '.$this->headerModel->fecha; |
|
| 193 | 193 | |
| 194 | 194 | return '<table class="table-big">' |
| 195 | 195 | . '<tr>' |
| 196 | - . '<td valign="top"><img src="' . $this->logoPath . '" height="' . $this->get('logosize') . '"/>' . '</td>' |
|
| 197 | - . '<td align="right" valign="top">' . $title . '</td>' |
|
| 196 | + . '<td valign="top"><img src="'.$this->logoPath.'" height="'.$this->get('logosize').'"/>'.'</td>' |
|
| 197 | + . '<td align="right" valign="top">'.$title.'</td>' |
|
| 198 | 198 | . '</tr>' |
| 199 | 199 | . '<tr>' |
| 200 | 200 | . '<td align="left" valign="top">' |
| 201 | - . '<p><b>' . $this->empresa->nombre . '</b>' |
|
| 202 | - . '<br/>' . $this->empresa->tipoidfiscal . ': ' . $this->empresa->cifnif |
|
| 203 | - . '<br/>' . Tools::lang()->trans('address') . ': ' . $this->combineAddress($this->empresa) . '</p>' |
|
| 204 | - . '<p>' . implode(' · ', $contactData) . '</p>' |
|
| 201 | + . '<p><b>'.$this->empresa->nombre.'</b>' |
|
| 202 | + . '<br/>'.$this->empresa->tipoidfiscal.': '.$this->empresa->cifnif |
|
| 203 | + . '<br/>'.Tools::lang()->trans('address').': '.$this->combineAddress($this->empresa).'</p>' |
|
| 204 | + . '<p>'.implode(' · ', $contactData).'</p>' |
|
| 205 | 205 | . $fechaEmision |
| 206 | 206 | . '</td>' |
| 207 | 207 | . '<td align="right" valign="top">' |
| 208 | - . '<div class="color-template font-big font-bold">' . $this->headerModel->descripcionTipoComprobante() . '</div>' |
|
| 208 | + . '<div class="color-template font-big font-bold">'.$this->headerModel->descripcionTipoComprobante().'</div>' |
|
| 209 | 209 | . $descTC |
| 210 | - . $this->headerModel->numeroncf . '<br/>' |
|
| 211 | - . $fechaVencimiento . '<br/>' |
|
| 212 | - . '<b>' . $i18n->trans('payment-method') . ':</b> ' |
|
| 210 | + . $this->headerModel->numeroncf.'<br/>' |
|
| 211 | + . $fechaVencimiento.'<br/>' |
|
| 212 | + . '<b>'.$i18n->trans('payment-method').':</b> ' |
|
| 213 | 213 | . PaymentMethodBankDataHelper::get($this->headerModel) |
| 214 | 214 | . '</td>' |
| 215 | 215 | . '</tr>' |
@@ -224,20 +224,20 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - $title = $this->showHeaderTitle ? '<h1 class="title">' . $this->get('headertitle') . '</h1>' . $this->spacer() : ''; |
|
| 227 | + $title = $this->showHeaderTitle ? '<h1 class="title">'.$this->get('headertitle').'</h1>'.$this->spacer() : ''; |
|
| 228 | 228 | if ($this->isSketchInvoice()) { |
| 229 | - $title .= '<div class="color-red font-big font-bold">' . Tools::lang()->trans('invoice-is-sketch') . '</div>'; |
|
| 229 | + $title .= '<div class="color-red font-big font-bold">'.Tools::lang()->trans('invoice-is-sketch').'</div>'; |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | return '<table class="table-big">' |
| 233 | 233 | . '<tr>' |
| 234 | - . '<td> Titulo ' . $title |
|
| 235 | - . '<p><b>' . $this->empresa->nombre . '</b>' |
|
| 236 | - . '<br/>' . $this->empresa->tipoidfiscal . ': ' . $this->empresa->cifnif |
|
| 237 | - . '<br/>' . $this->combineAddress($this->empresa) . '</p>' . $this->spacer() |
|
| 238 | - . '<p>' . implode(' · ', $contactData) . '</p>' |
|
| 234 | + . '<td> Titulo '.$title |
|
| 235 | + . '<p><b>'.$this->empresa->nombre.'</b>' |
|
| 236 | + . '<br/>'.$this->empresa->tipoidfiscal.': '.$this->empresa->cifnif |
|
| 237 | + . '<br/>'.$this->combineAddress($this->empresa).'</p>'.$this->spacer() |
|
| 238 | + . '<p>'.implode(' · ', $contactData).'</p>' |
|
| 239 | 239 | . '</td>' |
| 240 | - . '<td align="right"><img src="' . $this->logoPath . '" height="' . $this->get('logosize') . '"/></td>' |
|
| 240 | + . '<td align="right"><img src="'.$this->logoPath.'" height="'.$this->get('logosize').'"/></td>' |
|
| 241 | 241 | . '</tr>' |
| 242 | 242 | . '</table>'; |
| 243 | 243 | } |
@@ -246,13 +246,12 @@ discard block |
||
| 246 | 246 | { |
| 247 | 247 | $observations = ''; |
| 248 | 248 | if (!empty($this->getObservations($model))) { |
| 249 | - $observations .= '<p><b>' . Tools::lang()->trans('observations') . '</b><br/>' |
|
| 250 | - . $this->getObservations($model) . '</p>'; |
|
| 249 | + $observations .= '<p><b>'.Tools::lang()->trans('observations').'</b><br/>' |
|
| 250 | + . $this->getObservations($model).'</p>'; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | return $this->format->hidetotals ? |
| 254 | - $observations : |
|
| 255 | - $this->getInvoiceTotalsPartial($model, [], $css) . $observations; |
|
| 254 | + $observations : $this->getInvoiceTotalsPartial($model, [], $css).$observations; |
|
| 256 | 255 | } |
| 257 | 256 | |
| 258 | 257 | protected function getInvoiceTotalsPartial($model, array $lines = [], string $css = ''): string |
@@ -283,8 +282,8 @@ discard block |
||
| 283 | 282 | // pintamos los irpfs |
| 284 | 283 | foreach ($irpfs as $irpf) { |
| 285 | 284 | $trs .= '<tr>' |
| 286 | - . '<td align="right"><b>' . $irpf['name'] . '</b>:</td>' |
|
| 287 | - . '<td class="nowrap" align="right">' . Tools::money($irpf['total'], $model->coddivisa) . '</td>' |
|
| 285 | + . '<td align="right"><b>'.$irpf['name'].'</b>:</td>' |
|
| 286 | + . '<td class="nowrap" align="right">'.Tools::money($irpf['total'], $model->coddivisa).'</td>' |
|
| 288 | 287 | . '</tr>'; |
| 289 | 288 | } |
| 290 | 289 | |
@@ -308,15 +307,15 @@ discard block |
||
| 308 | 307 | case 'dtopor1': |
| 309 | 308 | case 'dtopor2': |
| 310 | 309 | $trs .= '<tr>' |
| 311 | - . '<td align="right"><b>' . $title . '</b>:</td>' |
|
| 312 | - . '<td class="nowrap" align="right">' . Tools::number($model->{$key}) . '%</td>' |
|
| 310 | + . '<td align="right"><b>'.$title.'</b>:</td>' |
|
| 311 | + . '<td class="nowrap" align="right">'.Tools::number($model->{$key}).'%</td>' |
|
| 313 | 312 | . '</tr>'; |
| 314 | 313 | break; |
| 315 | 314 | |
| 316 | 315 | case 'total': |
| 317 | 316 | $trs .= '<tr>' |
| 318 | - . '<td class="text-end"><b>' . $title . '</b>:</td>' |
|
| 319 | - . '<td class="text-end nowrap">' . Tools::money($model->{$key}, $model->coddivisa) . '</td>' |
|
| 317 | + . '<td class="text-end"><b>'.$title.'</b>:</td>' |
|
| 318 | + . '<td class="text-end nowrap">'.Tools::money($model->{$key}, $model->coddivisa).'</td>' |
|
| 320 | 319 | . '</tr>'; |
| 321 | 320 | break; |
| 322 | 321 | |
@@ -327,24 +326,24 @@ discard block |
||
| 327 | 326 | // no break |
| 328 | 327 | default: |
| 329 | 328 | $trs .= '<tr>' |
| 330 | - . '<td align="right"><b>' . $title . '</b>:</td>' |
|
| 331 | - . '<td class="nowrap" align="right">' . Tools::money($model->{$key}, $model->coddivisa) . '</td>' |
|
| 329 | + . '<td align="right"><b>'.$title.'</b>:</td>' |
|
| 330 | + . '<td class="nowrap" align="right">'.Tools::money($model->{$key}, $model->coddivisa).'</td>' |
|
| 332 | 331 | . '</tr>'; |
| 333 | 332 | break; |
| 334 | 333 | } |
| 335 | 334 | } |
| 336 | 335 | |
| 337 | - return '<table class="table-big table-border ' . $css . '">' |
|
| 336 | + return '<table class="table-big table-border '.$css.'">' |
|
| 338 | 337 | . '<tr>' |
| 339 | - . '<td> ' . $this->getInvoiceTaxes($model, $lines) . '</td>' |
|
| 340 | - . '<td align="right" valign="top"><table>' . $trs . '</table></td>' |
|
| 338 | + . '<td> '.$this->getInvoiceTaxes($model, $lines).'</td>' |
|
| 339 | + . '<td align="right" valign="top"><table>'.$trs.'</table></td>' |
|
| 341 | 340 | . '</tr>' |
| 342 | 341 | . '<tr>' |
| 343 | 342 | . '<td>' |
| 344 | 343 | . '</td>' |
| 345 | 344 | . '</tr>' |
| 346 | 345 | . '</table>' |
| 347 | - . ' <b>Son:</b> ' . $this->convert_to_words($model->total) . ' pesos dominicanos' |
|
| 346 | + . ' <b>Son:</b> '.$this->convert_to_words($model->total).' pesos dominicanos' |
|
| 348 | 347 | . '<br/>'; |
| 349 | 348 | } |
| 350 | 349 | |
@@ -364,43 +363,43 @@ discard block |
||
| 364 | 363 | $trs = ''; |
| 365 | 364 | foreach ($taxes['iva'] as $row) { |
| 366 | 365 | $trs .= '<tr>' |
| 367 | - . '<td class="nowrap" align="left">' . Impuestos::get($row['codimpuesto'])->descripcion . '</td>' |
|
| 368 | - . '<td class="nowrap" align="center">' . Tools::money($row['neto'], $model->coddivisa) . '</td>' |
|
| 369 | - . '<td class="nowrap" align="center">' . Tools::number($row['iva']) . '%</td>' |
|
| 370 | - . '<td class="nowrap" align="center">' . Tools::money($row['totaliva'], $model->coddivisa) . '</td>'; |
|
| 366 | + . '<td class="nowrap" align="left">'.Impuestos::get($row['codimpuesto'])->descripcion.'</td>' |
|
| 367 | + . '<td class="nowrap" align="center">'.Tools::money($row['neto'], $model->coddivisa).'</td>' |
|
| 368 | + . '<td class="nowrap" align="center">'.Tools::number($row['iva']).'%</td>' |
|
| 369 | + . '<td class="nowrap" align="center">'.Tools::money($row['totaliva'], $model->coddivisa).'</td>'; |
|
| 371 | 370 | |
| 372 | 371 | if (empty($model->totalrecargo)) { |
| 373 | 372 | $trs .= '</tr>'; |
| 374 | 373 | continue; |
| 375 | 374 | } |
| 376 | 375 | |
| 377 | - $trs .= '<td class="nowrap" align="center">' . (empty($row['recargo']) ? '-' : Tools::number($row['recargo']) . '%') . '</td>' |
|
| 378 | - . '<td class="nowrap" align="right">' . (empty($row['totalrecargo']) ? '-' : Tools::money($row['totalrecargo'])) . '</td>' |
|
| 376 | + $trs .= '<td class="nowrap" align="center">'.(empty($row['recargo']) ? '-' : Tools::number($row['recargo']).'%').'</td>' |
|
| 377 | + . '<td class="nowrap" align="right">'.(empty($row['totalrecargo']) ? '-' : Tools::money($row['totalrecargo'])).'</td>' |
|
| 379 | 378 | . '</tr>'; |
| 380 | 379 | } |
| 381 | 380 | |
| 382 | 381 | if (empty($model->totalrecargo)) { |
| 383 | - return '<table class="' . $class . '">' |
|
| 382 | + return '<table class="'.$class.'">' |
|
| 384 | 383 | . '<thead>' |
| 385 | 384 | . '<tr>' |
| 386 | - . '<th align="left">' . $i18n->trans('tax') . '</th>' |
|
| 387 | - . '<th align="center">' . $i18n->trans('tax-base') . '</th>' |
|
| 388 | - . '<th align="center">' . $i18n->trans('percentage') . '</th>' |
|
| 389 | - . '<th align="center">' . $i18n->trans('amount') . '</th>' |
|
| 385 | + . '<th align="left">'.$i18n->trans('tax').'</th>' |
|
| 386 | + . '<th align="center">'.$i18n->trans('tax-base').'</th>' |
|
| 387 | + . '<th align="center">'.$i18n->trans('percentage').'</th>' |
|
| 388 | + . '<th align="center">'.$i18n->trans('amount').'</th>' |
|
| 390 | 389 | . '</tr>' |
| 391 | 390 | . '</thead>' |
| 392 | 391 | . $trs |
| 393 | 392 | . '</table>'; |
| 394 | 393 | } |
| 395 | 394 | |
| 396 | - return '<table class="' . $class . '">' |
|
| 395 | + return '<table class="'.$class.'">' |
|
| 397 | 396 | . '<tr>' |
| 398 | - . '<th align="left">' . $i18n->trans('tax') . '</th>' |
|
| 399 | - . '<th align="center">' . $i18n->trans('tax-base') . '</th>' |
|
| 400 | - . '<th align="center">' . $i18n->trans('tax') . '</th>' |
|
| 401 | - . '<th align="center">' . $i18n->trans('amount') . '</th>' |
|
| 402 | - . '<th align="center">' . $i18n->trans('re') . '</th>' |
|
| 403 | - . '<th align="right">' . $i18n->trans('amount') . '</th>' |
|
| 397 | + . '<th align="left">'.$i18n->trans('tax').'</th>' |
|
| 398 | + . '<th align="center">'.$i18n->trans('tax-base').'</th>' |
|
| 399 | + . '<th align="center">'.$i18n->trans('tax').'</th>' |
|
| 400 | + . '<th align="center">'.$i18n->trans('amount').'</th>' |
|
| 401 | + . '<th align="center">'.$i18n->trans('re').'</th>' |
|
| 402 | + . '<th align="right">'.$i18n->trans('amount').'</th>' |
|
| 404 | 403 | . '</tr>' |
| 405 | 404 | . $trs |
| 406 | 405 | . '</table>'; |
@@ -462,7 +461,7 @@ discard block |
||
| 462 | 461 | |
| 463 | 462 | if ($number < 100) { |
| 464 | 463 | return ucfirst($words[10 * floor($number / 10)] |
| 465 | - . ($number % 10 > 0 ? ' y ' . $words[$number % 10] : '')); |
|
| 464 | + . ($number % 10 > 0 ? ' y '.$words[$number % 10] : '')); |
|
| 466 | 465 | } |
| 467 | 466 | |
| 468 | 467 | if ($number < 1000) { |
@@ -474,23 +473,23 @@ discard block |
||
| 474 | 473 | |
| 475 | 474 | if ($number < 1000000) { |
| 476 | 475 | $thousands = floor($number / 1000); |
| 477 | - return ucfirst(($thousands > 1 ? $this->convert_to_words($thousands) . ' ' : '') |
|
| 476 | + return ucfirst(($thousands > 1 ? $this->convert_to_words($thousands).' ' : '') |
|
| 478 | 477 | . 'mil' |
| 479 | - . ($number % 1000 > 0 ? ' ' . $this->convert_to_words($number % 1000) : '')); |
|
| 478 | + . ($number % 1000 > 0 ? ' '.$this->convert_to_words($number % 1000) : '')); |
|
| 480 | 479 | } |
| 481 | 480 | |
| 482 | 481 | if ($number < 1000000000) { |
| 483 | 482 | $millions = floor($number / 1000000); |
| 484 | - return ucfirst(($millions > 1 ? $this->convert_to_words($millions) . ' ' : 'un ') |
|
| 483 | + return ucfirst(($millions > 1 ? $this->convert_to_words($millions).' ' : 'un ') |
|
| 485 | 484 | . 'millón' |
| 486 | 485 | . ($millions > 1 ? 'es' : '') |
| 487 | - . ($number % 1000000 > 0 ? ' ' . $this->convert_to_words($number % 1000000) : '')); |
|
| 486 | + . ($number % 1000000 > 0 ? ' '.$this->convert_to_words($number % 1000000) : '')); |
|
| 488 | 487 | } |
| 489 | 488 | |
| 490 | 489 | $billions = floor($number / 1000000000); |
| 491 | - return ucfirst(($billions > 1 ? $this->convert_to_words($billions) . ' ' : 'un ') |
|
| 490 | + return ucfirst(($billions > 1 ? $this->convert_to_words($billions).' ' : 'un ') |
|
| 492 | 491 | . 'billón' |
| 493 | 492 | . ($billions > 1 ? 'es' : '') |
| 494 | - . ($number % 1000000000 > 0 ? ' ' . $this->convert_to_words($number % 1000000000) : '')); |
|
| 493 | + . ($number % 1000000000 > 0 ? ' '.$this->convert_to_words($number % 1000000000) : '')); |
|
| 495 | 494 | } |
| 496 | 495 | } |
| 497 | 496 | \ No newline at end of file |