@@ -30,20 +30,20 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | class SalesFooterMod implements SalesModInterface |
| 32 | 32 | { |
| 33 | - public function apply(SalesDocument &$model, array $formData): void |
|
| 33 | + public function apply(SalesDocument & $model, array $formData): void |
|
| 34 | 34 | { |
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - public function applyBefore(SalesDocument &$model, array $formData): void |
|
| 38 | + public function applyBefore(SalesDocument & $model, array $formData): void |
|
| 39 | 39 | { |
| 40 | 40 | if ($model->modelClassName() === 'FacturaCliente') { |
| 41 | - $model->numeroncf = isset($formData['numeroncf']) ? (string)$formData['numeroncf'] : $model->numeroncf; |
|
| 42 | - $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string)$formData['tipocomprobante'] : $model->tipocomprobante; |
|
| 43 | - $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string)$formData['ncffechavencimiento'] : $model->ncffechavencimiento; |
|
| 44 | - $model->ncftipopago = isset($formData['ncftipopago']) ? (string)$formData['ncftipopago'] : $model->ncftipopago; |
|
| 45 | - $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string)$formData['ncftipomovimiento'] : $model->ncftipomovimiento; |
|
| 46 | - $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string)$formData['ncftipoanulacion'] : $model->ncftipoanulacion; |
|
| 41 | + $model->numeroncf = isset($formData['numeroncf']) ? (string) $formData['numeroncf'] : $model->numeroncf; |
|
| 42 | + $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string) $formData['tipocomprobante'] : $model->tipocomprobante; |
|
| 43 | + $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string) $formData['ncffechavencimiento'] : $model->ncffechavencimiento; |
|
| 44 | + $model->ncftipopago = isset($formData['ncftipopago']) ? (string) $formData['ncftipopago'] : $model->ncftipopago; |
|
| 45 | + $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string) $formData['ncftipomovimiento'] : $model->ncftipomovimiento; |
|
| 46 | + $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string) $formData['ncftipoanulacion'] : $model->ncftipoanulacion; |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -122,18 +122,16 @@ discard block |
||
| 122 | 122 | $options = ['<option value="">------</option>']; |
| 123 | 123 | foreach ($tipoComprobante as $row) { |
| 124 | 124 | $options[] = ($row->tipocomprobante === $invoiceTipoComprobante) ? |
| 125 | - '<option value="' . $row->tipocomprobante . '" selected="">' . $row->descripcion . '</option>' : |
|
| 126 | - '<option value="' . $row->tipocomprobante . '">' . $row->descripcion . '</option>'; |
|
| 125 | + '<option value="'.$row->tipocomprobante.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->tipocomprobante.'">'.$row->descripcion.'</option>'; |
|
| 127 | 126 | } |
| 128 | 127 | |
| 129 | 128 | $attributes = ($model->editable || $model->numeroncf === '') ? |
| 130 | - 'id="tipocomprobante" name="tipocomprobante" required="" onChange="verificarCorrelativoNCF(this.value,\'Ventas\')"' : |
|
| 131 | - 'disabled=""'; |
|
| 129 | + 'id="tipocomprobante" name="tipocomprobante" required="" onChange="verificarCorrelativoNCF(this.value,\'Ventas\')"' : 'disabled=""'; |
|
| 132 | 130 | |
| 133 | 131 | return '<div class="col-sm-3">' |
| 134 | 132 | . '<div class="mb-3">' |
| 135 | 133 | . $i18n->trans('tipocomprobante') |
| 136 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 134 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 137 | 135 | . '</div>' |
| 138 | 136 | . '</div>'; |
| 139 | 137 | } |
@@ -157,15 +155,14 @@ discard block |
||
| 157 | 155 | $options = ['<option value="">------</option>']; |
| 158 | 156 | foreach ($tipoPago as $row) { |
| 159 | 157 | $options[] = ($row->codigo === $invoiceTipoPago) ? |
| 160 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
| 161 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
| 158 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
| 162 | 159 | } |
| 163 | 160 | |
| 164 | 161 | $attributes = $model->editable ? 'name="ncftipopago" required=""' : 'disabled=""'; |
| 165 | 162 | return '<div class="col-sm-2">' |
| 166 | 163 | . '<div class="mb-3">' |
| 167 | 164 | . $i18n->trans('ncf-payment-type') |
| 168 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 165 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 169 | 166 | . '</div>' |
| 170 | 167 | . '</div>'; |
| 171 | 168 | } |
@@ -183,15 +180,14 @@ discard block |
||
| 183 | 180 | $options = ['<option value="">------</option>']; |
| 184 | 181 | foreach ($tipoMovimiento as $row) { |
| 185 | 182 | $options[] = ($row->codigo === $invoiceTipoMovimiento) ? |
| 186 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
| 187 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
| 183 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
| 188 | 184 | } |
| 189 | 185 | |
| 190 | 186 | $attributes = $model->editable ? 'name="ncftipomovimiento" required=""' : 'disabled=""'; |
| 191 | 187 | return '<div class="col-sm-3">' |
| 192 | 188 | . '<div class="mb-3">' |
| 193 | 189 | . $i18n->trans('ncf-movement-type') |
| 194 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 190 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 195 | 191 | . '</div>' |
| 196 | 192 | . '</div>'; |
| 197 | 193 | } |
@@ -209,15 +205,14 @@ discard block |
||
| 209 | 205 | $options = ['<option value="">------</option>']; |
| 210 | 206 | foreach ($tipoAnulacion as $row) { |
| 211 | 207 | $options[] = ($row->codigo === $invoiceTipoAnulacion) ? |
| 212 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
| 213 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
| 208 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
| 214 | 209 | } |
| 215 | 210 | |
| 216 | 211 | $attributes = $model->editable ? 'name="ncftipoanulacion"' : 'disabled=""'; |
| 217 | 212 | return '<div class="col-sm-2">' |
| 218 | 213 | . '<div class="mb-3">' |
| 219 | 214 | . $i18n->trans('ncf-cancellation-type') |
| 220 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 215 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 221 | 216 | . '</div>' |
| 222 | 217 | . '</div>'; |
| 223 | 218 | } |
@@ -229,8 +224,8 @@ discard block |
||
| 229 | 224 | ? date('Y-m-d', strtotime($model->ncffechavencimiento)) |
| 230 | 225 | : ''; |
| 231 | 226 | return '<div class="col-sm-2">' |
| 232 | - . '<div class="mb-3">' . $i18n->trans('due-date') |
|
| 233 | - . '<input type="date" ' . $attributes . ' value="' . $ncfFechaVencimiento . '" class="form-control"/>' |
|
| 227 | + . '<div class="mb-3">'.$i18n->trans('due-date') |
|
| 228 | + . '<input type="date" '.$attributes.' value="'.$ncfFechaVencimiento.'" class="form-control"/>' |
|
| 234 | 229 | . '</div>' |
| 235 | 230 | . '</div>'; |
| 236 | 231 | } |
@@ -241,7 +236,7 @@ discard block |
||
| 241 | 236 | return empty($model->codcliente) ? '' : '<div class="col-sm">' |
| 242 | 237 | . '<div class="mb-3">' |
| 243 | 238 | . $i18n->trans('desc-numeroncf-sales') |
| 244 | - . '<input type="text" ' . $attributes . ' value="' . $model->numeroncf . '" class="form-control"/>' |
|
| 239 | + . '<input type="text" '.$attributes.' value="'.$model->numeroncf.'" class="form-control"/>' |
|
| 245 | 240 | . '</div>' |
| 246 | 241 | . '</div>'; |
| 247 | 242 | } |
@@ -65,8 +65,8 @@ |
||
| 65 | 65 | |
| 66 | 66 | public function saveBefore(): Closure |
| 67 | 67 | { |
| 68 | - return function () { |
|
| 69 | - $ArrayTipoNCFCompras = ['11', '12', '16', '17','31','32','46','47']; |
|
| 68 | + return function() { |
|
| 69 | + $ArrayTipoNCFCompras = ['11', '12', '16', '17', '31', '32', '46', '47']; |
|
| 70 | 70 | $ncfrango = new NCFRango(); |
| 71 | 71 | $proveedor = new Proveedor(); |
| 72 | 72 | $actualProveedor = $proveedor::find($this->codproveedor); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | public function saveBefore(): Closure |
| 84 | 84 | { |
| 85 | - return function () { |
|
| 85 | + return function() { |
|
| 86 | 86 | if (null !== $this->codigorect && $this->idfactura === null) { |
| 87 | 87 | $this->cleanRefundData(); |
| 88 | 88 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $ncfrango = new NCFRango(); |
| 109 | 109 | if (!CommonModelFunctions::setCFRango($actualCliente, $ncfrango, $tipocomprobante, $this)) return false; |
| 110 | 110 | |
| 111 | - $arrayNCFTypes = ['03','04']; |
|
| 111 | + $arrayNCFTypes = ['03', '04']; |
|
| 112 | 112 | if (in_array($this->tipocomprobante, $arrayNCFTypes) === true) { |
| 113 | 113 | $this->ncftipoanulacion = $_REQUEST['ncftipoanulacionr'] ?? $this->ncftipoanulacion; |
| 114 | 114 | $this->ncffechavencimiento = $_REQUEST['ncffechavencimientor'] ?? $this->ncffechavencimiento; |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | public function all(): Closure |
| 123 | 123 | { |
| 124 | - return function () { |
|
| 124 | + return function() { |
|
| 125 | 125 | $this->facturarectnumero2 = ''; |
| 126 | 126 | if ($this->idfacturarect !== '') { |
| 127 | 127 | $facturaRectificativa = $this->get($this->idfacturarect); |
| 128 | - $this->loadFromData(['facturarectnumero2' => 'SI' ]); |
|
| 128 | + $this->loadFromData(['facturarectnumero2' => 'SI']); |
|
| 129 | 129 | $this->facturarectnumero2 = $facturaRectificativa->numero2; |
| 130 | 130 | } else { |
| 131 | 131 | $this->loadFromData(['facturarectnumero2' => 'NO HAY']); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | public function descripcionTipoComprobante(): Closure |
| 138 | 138 | { |
| 139 | - return function () { |
|
| 139 | + return function() { |
|
| 140 | 140 | $ncftipocomprobante = new NCFTipo(); |
| 141 | 141 | $ncftipocomprobante->load($this->tipocomprobante); |
| 142 | 142 | return $ncftipocomprobante->descripcion; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | protected function cleanRefundData() |
| 146 | 146 | { |
| 147 | - return function () { |
|
| 147 | + return function() { |
|
| 148 | 148 | $this->numeroncf = ''; |
| 149 | 149 | $this->tipocomprobante = null; |
| 150 | 150 | $this->ncffechavencimiento = null; |
@@ -106,7 +106,9 @@ |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | $ncfrango = new NCFRango(); |
| 109 | - if (!CommonModelFunctions::setCFRango($actualCliente, $ncfrango, $tipocomprobante, $this)) return false; |
|
| 109 | + if (!CommonModelFunctions::setCFRango($actualCliente, $ncfrango, $tipocomprobante, $this)) { |
|
| 110 | + return false; |
|
| 111 | + } |
|
| 110 | 112 | |
| 111 | 113 | $arrayNCFTypes = ['03','04']; |
| 112 | 114 | if (in_array($this->tipocomprobante, $arrayNCFTypes) === true) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | // TODO: Implement addInvoiceHeader() method. |
| 43 | 43 | $html = $this->getInvoiceHeaderBilling($model) |
| 44 | 44 | . $this->getInvoiceHeaderShipping($model); |
| 45 | - $this->writeHTML('<table class="table-big table-border"><tr>' . $html . '</tr></table><br/>'); |
|
| 45 | + $this->writeHTML('<table class="table-big table-border"><tr>'.$html.'</tr></table><br/>'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function addInvoiceLines($model) |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $tHead = '<thead><tr>'; |
| 54 | 54 | foreach ($this->getInvoiceLineFields() as $field) { |
| 55 | - $tHead .= '<th class="' . $field['css'] . '" align="' . $field['align'] . '">' . $field['title'] . '</th>'; |
|
| 55 | + $tHead .= '<th class="'.$field['css'].'" align="'.$field['align'].'">'.$field['title'].'</th>'; |
|
| 56 | 56 | } |
| 57 | 57 | $tHead .= '</tr></thead>'; |
| 58 | 58 | |
@@ -64,20 +64,20 @@ discard block |
||
| 64 | 64 | $line->numlinea = $numLinea; |
| 65 | 65 | $tBody .= '<tr>'; |
| 66 | 66 | foreach ($this->getInvoiceLineFields() as $field) { |
| 67 | - $tBody .= '<td class="' . $field['css'] . '" align="' . $field['align'] . '" valign="top">' . $this->getInvoiceLineValue($model, $line, $field) . '</td>'; |
|
| 67 | + $tBody .= '<td class="'.$field['css'].'" align="'.$field['align'].'" valign="top">'.$this->getInvoiceLineValue($model, $line, $field).'</td>'; |
|
| 68 | 68 | } |
| 69 | 69 | $tBody .= '</tr>'; |
| 70 | 70 | $numLinea++; |
| 71 | 71 | |
| 72 | 72 | if (property_exists($line, 'salto_pagina') && $line->salto_pagina) { |
| 73 | - $this->writeHTML('<div class="table-lines"><table class="table-big table-list">' . $tHead . $tBody . '</table></div>'); |
|
| 73 | + $this->writeHTML('<div class="table-lines"><table class="table-big table-list">'.$tHead.$tBody.'</table></div>'); |
|
| 74 | 74 | $this->writeHTML($this->getInvoiceTotalsPartial($model, $tLines, 'mt-20')); |
| 75 | 75 | $this->mpdf->AddPage(); |
| 76 | 76 | $tBody = ''; |
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $this->writeHTML('<div class="table-lines"><table class="table-big table-list">' . $tHead . $tBody . '</table></div>'); |
|
| 80 | + $this->writeHTML('<div class="table-lines"><table class="table-big table-list">'.$tHead.$tBody.'</table></div>'); |
|
| 81 | 81 | |
| 82 | 82 | // clonamos el documento y añadimos los totales para ver si salta de página |
| 83 | 83 | $copier = new DeepCopy(); |
@@ -96,28 +96,28 @@ discard block |
||
| 96 | 96 | protected function css(): string |
| 97 | 97 | { |
| 98 | 98 | return parent::css() |
| 99 | - . '.title {border-bottom: 2px solid ' . $this->get('color1') . ';}' |
|
| 100 | - . '.table-border {border-top: 1px solid ' . $this->get('color1') . '; border-bottom: 1px solid ' . $this->get('color1') . ';}' |
|
| 101 | - . '.table-dual {border-top: 1px solid ' . $this->get('color1') . '; border-bottom: 1px solid ' . $this->get('color1') . ';}' |
|
| 102 | - . '.table-list {border-spacing: 0px; border-top: 1px solid ' . $this->get('color1') . '; border-bottom: 1px solid ' . $this->get('color1') . ';}' |
|
| 103 | - . '.table-list tr:nth-child(even) {background-color: ' . $this->get('color3') . ';}' |
|
| 104 | - . '.table-list th {background-color: ' . $this->get('color1') . '; color: ' . $this->get('color2') . '; padding: 5px; text-transform: uppercase;}' |
|
| 99 | + . '.title {border-bottom: 2px solid '.$this->get('color1').';}' |
|
| 100 | + . '.table-border {border-top: 1px solid '.$this->get('color1').'; border-bottom: 1px solid '.$this->get('color1').';}' |
|
| 101 | + . '.table-dual {border-top: 1px solid '.$this->get('color1').'; border-bottom: 1px solid '.$this->get('color1').';}' |
|
| 102 | + . '.table-list {border-spacing: 0px; border-top: 1px solid '.$this->get('color1').'; border-bottom: 1px solid '.$this->get('color1').';}' |
|
| 103 | + . '.table-list tr:nth-child(even) {background-color: '.$this->get('color3').';}' |
|
| 104 | + . '.table-list th {background-color: '.$this->get('color1').'; color: '.$this->get('color2').'; padding: 5px; text-transform: uppercase;}' |
|
| 105 | 105 | . '.table-list td {padding: 5px;}' |
| 106 | 106 | . '.thanks-title {' |
| 107 | - . 'font-size: ' . $this->get('titlefontsize') . 'px; font-weight: bold; color: ' . $this->get('color1') . '; ' |
|
| 108 | - . 'text-align: right; width: 50%; padding: 15px; border-end: 1px solid ' . $this->get('color1') . ';' |
|
| 107 | + . 'font-size: '.$this->get('titlefontsize').'px; font-weight: bold; color: '.$this->get('color1').'; ' |
|
| 108 | + . 'text-align: right; width: 50%; padding: 15px; border-end: 1px solid '.$this->get('color1').';' |
|
| 109 | 109 | . '}' |
| 110 | 110 | . '.color-navy {color: navy;}' |
| 111 | 111 | . '.color-blue {color: blue;}' |
| 112 | - . '.color-template {color: ' . $this->get('color1') .';}' |
|
| 112 | + . '.color-template {color: '.$this->get('color1').';}' |
|
| 113 | 113 | . '.thanks-text {padding: 15px;}' |
| 114 | - . '.imagetext {margin-top: 15px; text-align: ' . $this->get('endalign') . ';}' |
|
| 115 | - . '.imagefooter {text-align: ' . $this->get('footeralign') . ';}'; |
|
| 114 | + . '.imagetext {margin-top: 15px; text-align: '.$this->get('endalign').';}' |
|
| 115 | + . '.imagefooter {text-align: '.$this->get('footeralign').';}'; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | protected function getSubjectIdFiscalStr(BusinessDocument $model): string |
| 119 | 119 | { |
| 120 | - return empty($model->cifnif) ? '' : '<b>' . $model->getSubject()->tipoidfiscal . '</b>: ' . $model->cifnif; |
|
| 120 | + return empty($model->cifnif) ? '' : '<b>'.$model->getSubject()->tipoidfiscal.'</b>: '.$model->cifnif; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | protected function getInvoiceHeaderBilling($model): string |
@@ -129,13 +129,13 @@ discard block |
||
| 129 | 129 | $subject = $model->getSubject(); |
| 130 | 130 | $address = isset($model->codproveedor) && !isset($model->direccion) ? $subject->getDefaultAddress() : $model; |
| 131 | 131 | $customerCode = $this->get('showcustomercode') ? $model->subjectColumnValue() : ''; |
| 132 | - $customerEmail = $this->get('showcustomeremail') && !empty($subject->email) ? '<br>' . Tools::lang()->trans('email') . ': ' . $subject->email : ''; |
|
| 132 | + $customerEmail = $this->get('showcustomeremail') && !empty($subject->email) ? '<br>'.Tools::lang()->trans('email').': '.$subject->email : ''; |
|
| 133 | 133 | $break = empty($model->cifnif) ? '' : '<br/>'; |
| 134 | 134 | return '<td align="left" valign="top">' |
| 135 | - . '<br/><b> ' . $this->getSubjectTitle($model) . ':</b> ' . $customerCode |
|
| 136 | - . $this->getSubjectName($model) . $break . $this->getSubjectIdFiscalStr($model) |
|
| 137 | - . '<br/><b>' . Tools::lang()->trans('address'). ':</b> ' .$this->combineAddress($address) . $this->getInvoiceHeaderBillingPhones($subject) |
|
| 138 | - . '<br/><b>' . Tools::lang()->trans('email'). ':</b> ' .$customerEmail |
|
| 135 | + . '<br/><b> '.$this->getSubjectTitle($model).':</b> '.$customerCode |
|
| 136 | + . $this->getSubjectName($model).$break.$this->getSubjectIdFiscalStr($model) |
|
| 137 | + . '<br/><b>'.Tools::lang()->trans('address').':</b> '.$this->combineAddress($address).$this->getInvoiceHeaderBillingPhones($subject) |
|
| 138 | + . '<br/><b>'.Tools::lang()->trans('email').':</b> '.$customerEmail |
|
| 139 | 139 | . '<br/>' |
| 140 | 140 | . '</td>'; |
| 141 | 141 | } |
@@ -155,8 +155,8 @@ discard block |
||
| 155 | 155 | return ''; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - return '<td><b>' . Tools::lang()->trans('shipping-address') . '</b>' |
|
| 159 | - . '<br/>' . $this->combineAddress($contacto, true) . '</td>'; |
|
| 158 | + return '<td><b>'.Tools::lang()->trans('shipping-address').'</b>' |
|
| 159 | + . '<br/>'.$this->combineAddress($contacto, true).'</td>'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | protected function getInvoiceHeaderBillingPhones($subject): string |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | return ''; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - return '<br/>' . $strPhones; |
|
| 173 | + return '<br/>'.$strPhones; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | protected function headerLeft(): string |
@@ -183,34 +183,34 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - $title = $this->showHeaderTitle ? '<h1 class="title">' . $this->get('headertitle') . '</h1>' . $this->spacer() : ''; |
|
| 186 | + $title = $this->showHeaderTitle ? '<h1 class="title">'.$this->get('headertitle').'</h1>'.$this->spacer() : ''; |
|
| 187 | 187 | if ($this->isSketchInvoice()) { |
| 188 | - $title .= '<div class="color-red font-big font-bold">' . Tools::lang()->trans('invoice-is-sketch') . '</div>'; |
|
| 188 | + $title .= '<div class="color-red font-big font-bold">'.Tools::lang()->trans('invoice-is-sketch').'</div>'; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | $descTC = ($this->headerModel->tipocomprobante < 30) ? "<b>NCF:</b> " : "<b>e-NCF:</b> "; |
| 192 | - $fechaVencimiento = ($this->headerModel->ncffechavencimiento !== null) ? '<b>Fecha Vencimiento:</b> ' . $this->headerModel->ncffechavencimiento : ''; |
|
| 193 | - $fechaEmision = '<b>Fecha Emisión:</b> ' . $this->headerModel->fecha; |
|
| 192 | + $fechaVencimiento = ($this->headerModel->ncffechavencimiento !== null) ? '<b>Fecha Vencimiento:</b> '.$this->headerModel->ncffechavencimiento : ''; |
|
| 193 | + $fechaEmision = '<b>Fecha Emisión:</b> '.$this->headerModel->fecha; |
|
| 194 | 194 | |
| 195 | 195 | return '<table class="table-big">' |
| 196 | 196 | . '<tr>' |
| 197 | - . '<td valign="top"><img src="' . $this->logoPath . '" height="' . $this->get('logosize') . '"/>' . '</td>' |
|
| 198 | - . '<td align="right" valign="top">' . $title . '</td>' |
|
| 197 | + . '<td valign="top"><img src="'.$this->logoPath.'" height="'.$this->get('logosize').'"/>'.'</td>' |
|
| 198 | + . '<td align="right" valign="top">'.$title.'</td>' |
|
| 199 | 199 | . '</tr>' |
| 200 | 200 | . '<tr>' |
| 201 | 201 | . '<td align="left" valign="top">' |
| 202 | - . '<p><b>' . $this->empresa->nombre . '</b>' |
|
| 203 | - . '<br/>' . $this->empresa->tipoidfiscal . ': ' . $this->empresa->cifnif |
|
| 204 | - . '<br/>' . Tools::lang()->trans('address') . ': ' . $this->combineAddress($this->empresa) . '</p>' |
|
| 205 | - . '<p>' . implode(' · ', $contactData) . '</p>' |
|
| 202 | + . '<p><b>'.$this->empresa->nombre.'</b>' |
|
| 203 | + . '<br/>'.$this->empresa->tipoidfiscal.': '.$this->empresa->cifnif |
|
| 204 | + . '<br/>'.Tools::lang()->trans('address').': '.$this->combineAddress($this->empresa).'</p>' |
|
| 205 | + . '<p>'.implode(' · ', $contactData).'</p>' |
|
| 206 | 206 | . $fechaEmision |
| 207 | 207 | . '</td>' |
| 208 | 208 | . '<td align="right" valign="top">' |
| 209 | - . '<div class="color-template font-big font-bold">' . $this->headerModel->descripcionTipoComprobante() . '</div>' |
|
| 209 | + . '<div class="color-template font-big font-bold">'.$this->headerModel->descripcionTipoComprobante().'</div>' |
|
| 210 | 210 | . $descTC |
| 211 | - . $this->headerModel->numeroncf . '<br/>' |
|
| 212 | - . $fechaVencimiento . '<br/>' |
|
| 213 | - . '<b>' . $i18n->trans('payment-method') . ':</b> ' |
|
| 211 | + . $this->headerModel->numeroncf.'<br/>' |
|
| 212 | + . $fechaVencimiento.'<br/>' |
|
| 213 | + . '<b>'.$i18n->trans('payment-method').':</b> ' |
|
| 214 | 214 | . PaymentMethodBankDataHelper::get($this->headerModel) |
| 215 | 215 | . '</td>' |
| 216 | 216 | . '</tr>' |
@@ -225,20 +225,20 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $title = $this->showHeaderTitle ? '<h1 class="title">' . $this->get('headertitle') . '</h1>' . $this->spacer() : ''; |
|
| 228 | + $title = $this->showHeaderTitle ? '<h1 class="title">'.$this->get('headertitle').'</h1>'.$this->spacer() : ''; |
|
| 229 | 229 | if ($this->isSketchInvoice()) { |
| 230 | - $title .= '<div class="color-red font-big font-bold">' . Tools::lang()->trans('invoice-is-sketch') . '</div>'; |
|
| 230 | + $title .= '<div class="color-red font-big font-bold">'.Tools::lang()->trans('invoice-is-sketch').'</div>'; |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | return '<table class="table-big">' |
| 234 | 234 | . '<tr>' |
| 235 | - . '<td> Titulo ' . $title |
|
| 236 | - . '<p><b>' . $this->empresa->nombre . '</b>' |
|
| 237 | - . '<br/>' . $this->empresa->tipoidfiscal . ': ' . $this->empresa->cifnif |
|
| 238 | - . '<br/>' . $this->combineAddress($this->empresa) . '</p>' . $this->spacer() |
|
| 239 | - . '<p>' . implode(' · ', $contactData) . '</p>' |
|
| 235 | + . '<td> Titulo '.$title |
|
| 236 | + . '<p><b>'.$this->empresa->nombre.'</b>' |
|
| 237 | + . '<br/>'.$this->empresa->tipoidfiscal.': '.$this->empresa->cifnif |
|
| 238 | + . '<br/>'.$this->combineAddress($this->empresa).'</p>'.$this->spacer() |
|
| 239 | + . '<p>'.implode(' · ', $contactData).'</p>' |
|
| 240 | 240 | . '</td>' |
| 241 | - . '<td align="right"><img src="' . $this->logoPath . '" height="' . $this->get('logosize') . '"/></td>' |
|
| 241 | + . '<td align="right"><img src="'.$this->logoPath.'" height="'.$this->get('logosize').'"/></td>' |
|
| 242 | 242 | . '</tr>' |
| 243 | 243 | . '</table>'; |
| 244 | 244 | } |
@@ -247,13 +247,12 @@ discard block |
||
| 247 | 247 | { |
| 248 | 248 | $observations = ''; |
| 249 | 249 | if (!empty($this->getObservations($model))) { |
| 250 | - $observations .= '<p><b>' . Tools::lang()->trans('observations') . '</b><br/>' |
|
| 251 | - . $this->getObservations($model) . '</p>'; |
|
| 250 | + $observations .= '<p><b>'.Tools::lang()->trans('observations').'</b><br/>' |
|
| 251 | + . $this->getObservations($model).'</p>'; |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | return $this->format->hidetotals ? |
| 255 | - $observations : |
|
| 256 | - $this->getInvoiceTotalsPartial($model, [], $css) . $observations; |
|
| 255 | + $observations : $this->getInvoiceTotalsPartial($model, [], $css).$observations; |
|
| 257 | 256 | } |
| 258 | 257 | |
| 259 | 258 | protected function getInvoiceTotalsPartial($model, array $lines = [], string $css = ''): string |
@@ -284,8 +283,8 @@ discard block |
||
| 284 | 283 | // pintamos los irpfs |
| 285 | 284 | foreach ($irpfs as $irpf) { |
| 286 | 285 | $trs .= '<tr>' |
| 287 | - . '<td align="right"><b>' . $irpf['name'] . '</b>:</td>' |
|
| 288 | - . '<td class="nowrap" align="right">' . Tools::money($irpf['total'], $model->coddivisa) . '</td>' |
|
| 286 | + . '<td align="right"><b>'.$irpf['name'].'</b>:</td>' |
|
| 287 | + . '<td class="nowrap" align="right">'.Tools::money($irpf['total'], $model->coddivisa).'</td>' |
|
| 289 | 288 | . '</tr>'; |
| 290 | 289 | } |
| 291 | 290 | |
@@ -309,15 +308,15 @@ discard block |
||
| 309 | 308 | case 'dtopor1': |
| 310 | 309 | case 'dtopor2': |
| 311 | 310 | $trs .= '<tr>' |
| 312 | - . '<td align="right"><b>' . $title . '</b>:</td>' |
|
| 313 | - . '<td class="nowrap" align="right">' . Tools::number($model->{$key}) . '%</td>' |
|
| 311 | + . '<td align="right"><b>'.$title.'</b>:</td>' |
|
| 312 | + . '<td class="nowrap" align="right">'.Tools::number($model->{$key}).'%</td>' |
|
| 314 | 313 | . '</tr>'; |
| 315 | 314 | break; |
| 316 | 315 | |
| 317 | 316 | case 'total': |
| 318 | 317 | $trs .= '<tr>' |
| 319 | - . '<td class="text-end"><b>' . $title . '</b>:</td>' |
|
| 320 | - . '<td class="text-end nowrap">' . Tools::money($model->{$key}, $model->coddivisa) . '</td>' |
|
| 318 | + . '<td class="text-end"><b>'.$title.'</b>:</td>' |
|
| 319 | + . '<td class="text-end nowrap">'.Tools::money($model->{$key}, $model->coddivisa).'</td>' |
|
| 321 | 320 | . '</tr>'; |
| 322 | 321 | break; |
| 323 | 322 | |
@@ -328,24 +327,24 @@ discard block |
||
| 328 | 327 | // no break |
| 329 | 328 | default: |
| 330 | 329 | $trs .= '<tr>' |
| 331 | - . '<td align="right"><b>' . $title . '</b>:</td>' |
|
| 332 | - . '<td class="nowrap" align="right">' . Tools::money($model->{$key}, $model->coddivisa) . '</td>' |
|
| 330 | + . '<td align="right"><b>'.$title.'</b>:</td>' |
|
| 331 | + . '<td class="nowrap" align="right">'.Tools::money($model->{$key}, $model->coddivisa).'</td>' |
|
| 333 | 332 | . '</tr>'; |
| 334 | 333 | break; |
| 335 | 334 | } |
| 336 | 335 | } |
| 337 | 336 | |
| 338 | - return '<table class="table-big table-border ' . $css . '">' |
|
| 337 | + return '<table class="table-big table-border '.$css.'">' |
|
| 339 | 338 | . '<tr>' |
| 340 | - . '<td> ' . $this->getInvoiceTaxes($model, $lines) . '</td>' |
|
| 341 | - . '<td align="right" valign="top"><table>' . $trs . '</table></td>' |
|
| 339 | + . '<td> '.$this->getInvoiceTaxes($model, $lines).'</td>' |
|
| 340 | + . '<td align="right" valign="top"><table>'.$trs.'</table></td>' |
|
| 342 | 341 | . '</tr>' |
| 343 | 342 | . '<tr>' |
| 344 | 343 | . '<td>' |
| 345 | 344 | . '</td>' |
| 346 | 345 | . '</tr>' |
| 347 | 346 | . '</table>' |
| 348 | - . ' <b>Son:</b> ' . $this->convert_to_words($model->total) . ' pesos dominicanos' |
|
| 347 | + . ' <b>Son:</b> '.$this->convert_to_words($model->total).' pesos dominicanos' |
|
| 349 | 348 | . '<br/>'; |
| 350 | 349 | } |
| 351 | 350 | |
@@ -365,43 +364,43 @@ discard block |
||
| 365 | 364 | $trs = ''; |
| 366 | 365 | foreach ($taxes['iva'] as $row) { |
| 367 | 366 | $trs .= '<tr>' |
| 368 | - . '<td class="nowrap" align="left">' . Impuestos::get($row['codimpuesto'])->descripcion . '</td>' |
|
| 369 | - . '<td class="nowrap" align="center">' . Tools::money($row['neto'], $model->coddivisa) . '</td>' |
|
| 370 | - . '<td class="nowrap" align="center">' . Tools::number($row['iva']) . '%</td>' |
|
| 371 | - . '<td class="nowrap" align="center">' . Tools::money($row['totaliva'], $model->coddivisa) . '</td>'; |
|
| 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>'; |
|
| 372 | 371 | |
| 373 | 372 | if (empty($model->totalrecargo)) { |
| 374 | 373 | $trs .= '</tr>'; |
| 375 | 374 | continue; |
| 376 | 375 | } |
| 377 | 376 | |
| 378 | - $trs .= '<td class="nowrap" align="center">' . (empty($row['recargo']) ? '-' : Tools::number($row['recargo']) . '%') . '</td>' |
|
| 379 | - . '<td class="nowrap" align="right">' . (empty($row['totalrecargo']) ? '-' : Tools::money($row['totalrecargo'])) . '</td>' |
|
| 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>' |
|
| 380 | 379 | . '</tr>'; |
| 381 | 380 | } |
| 382 | 381 | |
| 383 | 382 | if (empty($model->totalrecargo)) { |
| 384 | - return '<table class="' . $class . '">' |
|
| 383 | + return '<table class="'.$class.'">' |
|
| 385 | 384 | . '<thead>' |
| 386 | 385 | . '<tr>' |
| 387 | - . '<th align="left">' . $i18n->trans('tax') . '</th>' |
|
| 388 | - . '<th align="center">' . $i18n->trans('tax-base') . '</th>' |
|
| 389 | - . '<th align="center">' . $i18n->trans('percentage') . '</th>' |
|
| 390 | - . '<th align="center">' . $i18n->trans('amount') . '</th>' |
|
| 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>' |
|
| 391 | 390 | . '</tr>' |
| 392 | 391 | . '</thead>' |
| 393 | 392 | . $trs |
| 394 | 393 | . '</table>'; |
| 395 | 394 | } |
| 396 | 395 | |
| 397 | - return '<table class="' . $class . '">' |
|
| 396 | + return '<table class="'.$class.'">' |
|
| 398 | 397 | . '<tr>' |
| 399 | - . '<th align="left">' . $i18n->trans('tax') . '</th>' |
|
| 400 | - . '<th align="center">' . $i18n->trans('tax-base') . '</th>' |
|
| 401 | - . '<th align="center">' . $i18n->trans('tax') . '</th>' |
|
| 402 | - . '<th align="center">' . $i18n->trans('amount') . '</th>' |
|
| 403 | - . '<th align="center">' . $i18n->trans('re') . '</th>' |
|
| 404 | - . '<th align="right">' . $i18n->trans('amount') . '</th>' |
|
| 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>' |
|
| 405 | 404 | . '</tr>' |
| 406 | 405 | . $trs |
| 407 | 406 | . '</table>'; |
@@ -463,7 +462,7 @@ discard block |
||
| 463 | 462 | |
| 464 | 463 | if ($number < 100) { |
| 465 | 464 | return ucfirst($words[10 * floor($number / 10)] |
| 466 | - . ($number % 10 > 0 ? ' y ' . $words[$number % 10] : '')); |
|
| 465 | + . ($number % 10 > 0 ? ' y '.$words[$number % 10] : '')); |
|
| 467 | 466 | } |
| 468 | 467 | |
| 469 | 468 | if ($number < 1000) { |
@@ -475,23 +474,23 @@ discard block |
||
| 475 | 474 | |
| 476 | 475 | if ($number < 1000000) { |
| 477 | 476 | $thousands = floor($number / 1000); |
| 478 | - return ucfirst(($thousands > 1 ? $this->convert_to_words($thousands) . ' ' : '') |
|
| 477 | + return ucfirst(($thousands > 1 ? $this->convert_to_words($thousands).' ' : '') |
|
| 479 | 478 | . 'mil' |
| 480 | - . ($number % 1000 > 0 ? ' ' . $this->convert_to_words($number % 1000) : '')); |
|
| 479 | + . ($number % 1000 > 0 ? ' '.$this->convert_to_words($number % 1000) : '')); |
|
| 481 | 480 | } |
| 482 | 481 | |
| 483 | 482 | if ($number < 1000000000) { |
| 484 | 483 | $millions = floor($number / 1000000); |
| 485 | - return ucfirst(($millions > 1 ? $this->convert_to_words($millions) . ' ' : 'un ') |
|
| 484 | + return ucfirst(($millions > 1 ? $this->convert_to_words($millions).' ' : 'un ') |
|
| 486 | 485 | . 'millón' |
| 487 | 486 | . ($millions > 1 ? 'es' : '') |
| 488 | - . ($number % 1000000 > 0 ? ' ' . $this->convert_to_words($number % 1000000) : '')); |
|
| 487 | + . ($number % 1000000 > 0 ? ' '.$this->convert_to_words($number % 1000000) : '')); |
|
| 489 | 488 | } |
| 490 | 489 | |
| 491 | 490 | $billions = floor($number / 1000000000); |
| 492 | - return ucfirst(($billions > 1 ? $this->convert_to_words($billions) . ' ' : 'un ') |
|
| 491 | + return ucfirst(($billions > 1 ? $this->convert_to_words($billions).' ' : 'un ') |
|
| 493 | 492 | . 'billón' |
| 494 | 493 | . ($billions > 1 ? 'es' : '') |
| 495 | - . ($number % 1000000000 > 0 ? ' ' . $this->convert_to_words($number % 1000000000) : '')); |
|
| 494 | + . ($number % 1000000000 > 0 ? ' '.$this->convert_to_words($number % 1000000000) : '')); |
|
| 496 | 495 | } |
| 497 | 496 | } |
| 498 | 497 | \ No newline at end of file |
@@ -31,21 +31,21 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | class PurchasesFooterMod implements PurchasesModInterface |
| 33 | 33 | { |
| 34 | - public function apply(PurchaseDocument &$model, array $formData): void |
|
| 34 | + public function apply(PurchaseDocument & $model, array $formData): void |
|
| 35 | 35 | { |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - public function applyBefore(PurchaseDocument &$model, array $formData): void |
|
| 38 | + public function applyBefore(PurchaseDocument & $model, array $formData): void |
|
| 39 | 39 | { |
| 40 | 40 | if ($model->modelClassName() === 'FacturaProveedor') { |
| 41 | - $model->numeroncf = isset($formData['numeroncf']) ? (string)$formData['numeroncf'] : $model->numeroncf; |
|
| 42 | - $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string)$formData['tipocomprobante'] : $model->tipocomprobante; |
|
| 43 | - $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string)$formData['ncffechavencimiento'] : $model->ncffechavencimiento; |
|
| 44 | - $model->ncftipopago = isset($formData['ncftipopago']) ? (string)$formData['ncftipopago'] : $model->ncftipopago; |
|
| 45 | - $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string)$formData['ncftipomovimiento'] : $model->ncftipomovimiento; |
|
| 46 | - $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string)$formData['ncftipoanulacion'] : $model->ncftipoanulacion; |
|
| 47 | - $model->ecf_fecha_firma = isset($formData['ecf_fecha_firma']) ? (string)$formData['ecf_fecha_firma'] : $model->ecf_fecha_firma; |
|
| 48 | - $model->ecf_codigo_seguridad = isset($formData['ecf_codigo_seguridad']) ? (string)$formData['ecf_codigo_seguridad'] : $model->ecf_codigo_seguridad; |
|
| 41 | + $model->numeroncf = isset($formData['numeroncf']) ? (string) $formData['numeroncf'] : $model->numeroncf; |
|
| 42 | + $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string) $formData['tipocomprobante'] : $model->tipocomprobante; |
|
| 43 | + $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string) $formData['ncffechavencimiento'] : $model->ncffechavencimiento; |
|
| 44 | + $model->ncftipopago = isset($formData['ncftipopago']) ? (string) $formData['ncftipopago'] : $model->ncftipopago; |
|
| 45 | + $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string) $formData['ncftipomovimiento'] : $model->ncftipomovimiento; |
|
| 46 | + $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string) $formData['ncftipoanulacion'] : $model->ncftipoanulacion; |
|
| 47 | + $model->ecf_fecha_firma = isset($formData['ecf_fecha_firma']) ? (string) $formData['ecf_fecha_firma'] : $model->ecf_fecha_firma; |
|
| 48 | + $model->ecf_codigo_seguridad = isset($formData['ecf_codigo_seguridad']) ? (string) $formData['ecf_codigo_seguridad'] : $model->ecf_codigo_seguridad; |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function newBtnFields(): array |
| 57 | 57 | { |
| 58 | - return ['btnLoadXmlEcf','btnLoadXmlAck','btnLoadPdfEcf']; |
|
| 58 | + return ['btnLoadXmlEcf', 'btnLoadXmlAck', 'btnLoadPdfEcf']; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function newFields(): array |
| 62 | 62 | { |
| 63 | - return ['numeroncf', 'tipocomprobante', 'ncffechavencimiento', 'ncftipopago', 'ncftipomovimiento', 'ncftipoanulacion', 'ecf_xml_firmado','ecf_fecha_firma','ecf_codigo_seguridad']; |
|
| 63 | + return ['numeroncf', 'tipocomprobante', 'ncffechavencimiento', 'ncftipopago', 'ncftipomovimiento', 'ncftipoanulacion', 'ecf_xml_firmado', 'ecf_fecha_firma', 'ecf_codigo_seguridad']; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function newModalFields(): array |
@@ -143,15 +143,14 @@ discard block |
||
| 143 | 143 | $options = ['<option value="">------</option>']; |
| 144 | 144 | foreach ($tipoComprobante as $row) { |
| 145 | 145 | $options[] = ($row->tipocomprobante === $invoiceTipoComprobante) ? |
| 146 | - '<option value="' . $row->tipocomprobante . '" selected="">' . $row->descripcion . '</option>' : |
|
| 147 | - '<option value="' . $row->tipocomprobante . '">' . $row->descripcion . '</option>'; |
|
| 146 | + '<option value="'.$row->tipocomprobante.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->tipocomprobante.'">'.$row->descripcion.'</option>'; |
|
| 148 | 147 | } |
| 149 | 148 | |
| 150 | 149 | $attributes = ($model->editable || $model->numeroncf === '') ? 'name="tipocomprobante" required=""' : 'disabled=""'; |
| 151 | 150 | return '<div class="col-sm-3">' |
| 152 | 151 | . '<div class="mb-3">' |
| 153 | 152 | . $i18n->trans('tipocomprobante') |
| 154 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 153 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 155 | 154 | . '</div>' |
| 156 | 155 | . '</div>'; |
| 157 | 156 | } |
@@ -175,15 +174,14 @@ discard block |
||
| 175 | 174 | $options = ['<option value="">------</option>']; |
| 176 | 175 | foreach ($tipoPago as $row) { |
| 177 | 176 | $options[] = ($row->codigo === $invoiceTipoPago) ? |
| 178 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
| 179 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
| 177 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
| 180 | 178 | } |
| 181 | 179 | |
| 182 | 180 | $attributes = $model->editable ? 'name="ncftipopago" required=""' : 'disabled=""'; |
| 183 | 181 | return '<div class="col-sm-2">' |
| 184 | 182 | . '<div class="mb-3">' |
| 185 | 183 | . $i18n->trans('ncf-payment-type') |
| 186 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 184 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 187 | 185 | . '</div>' |
| 188 | 186 | . '</div>'; |
| 189 | 187 | } |
@@ -201,15 +199,14 @@ discard block |
||
| 201 | 199 | $options = ['<option value="">------</option>']; |
| 202 | 200 | foreach ($tipoMovimiento as $row) { |
| 203 | 201 | $options[] = ($row->codigo === $invoiceTipoMovimiento) ? |
| 204 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
| 205 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
| 202 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
| 206 | 203 | } |
| 207 | 204 | |
| 208 | 205 | $attributes = $model->editable ? 'name="ncftipomovimiento" required=""' : 'disabled=""'; |
| 209 | 206 | return '<div class="col-sm-3">' |
| 210 | 207 | . '<div class="mb-3">' |
| 211 | 208 | . $i18n->trans('ncf-movement-type') |
| 212 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 209 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 213 | 210 | . '</div>' |
| 214 | 211 | . '</div>'; |
| 215 | 212 | } |
@@ -227,15 +224,14 @@ discard block |
||
| 227 | 224 | $options = ['<option value="">------</option>']; |
| 228 | 225 | foreach ($tipoAnulacion as $row) { |
| 229 | 226 | $options[] = ($row->codigo === $invoiceTipoAnulacion) ? |
| 230 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
| 231 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
| 227 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
| 232 | 228 | } |
| 233 | 229 | |
| 234 | 230 | $attributes = $model->editable ? 'name="ncftipoanulacion"' : 'name="ncftipoanulacion" readonly=""'; |
| 235 | 231 | return '<div class="col-sm-2">' |
| 236 | 232 | . '<div class="mb-3">' |
| 237 | 233 | . $i18n->trans('ncf-cancellation-type') |
| 238 | - . '<select ' . $attributes . ' class="form-select">' . implode('', $options) . '</select>' |
|
| 234 | + . '<select '.$attributes.' class="form-select">'.implode('', $options).'</select>' |
|
| 239 | 235 | . '</div>' |
| 240 | 236 | . '</div>'; |
| 241 | 237 | } |
@@ -247,9 +243,9 @@ discard block |
||
| 247 | 243 | ? date('Y-m-d', strtotime($model->ncffechavencimiento)) |
| 248 | 244 | : ''; |
| 249 | 245 | return '<div class="col-sm-2">' |
| 250 | - . '<div class="mb-3">' . $i18n->trans('due-date') |
|
| 251 | - . '<input type="date" ' . $attributes . ' value="' |
|
| 252 | - . $ncfFechaVencimiento . '" class="form-control"/>' |
|
| 246 | + . '<div class="mb-3">'.$i18n->trans('due-date') |
|
| 247 | + . '<input type="date" '.$attributes.' value="' |
|
| 248 | + . $ncfFechaVencimiento.'" class="form-control"/>' |
|
| 253 | 249 | . '</div>' |
| 254 | 250 | . '</div>'; |
| 255 | 251 | } |
@@ -262,10 +258,10 @@ discard block |
||
| 262 | 258 | . '<div class="mb-3">' |
| 263 | 259 | . $i18n->trans('desc-numeroncf-purchases') |
| 264 | 260 | . '<div class="input-group">' |
| 265 | - . '<input type="text" ' . $attributes . ' value="' . $model->numeroncf . '" class="form-control"/>' |
|
| 266 | - . '<button class="btn ' . $btnColor . ' btn-spin-action" id="btnVerifyNCF"' |
|
| 261 | + . '<input type="text" '.$attributes.' value="'.$model->numeroncf.'" class="form-control"/>' |
|
| 262 | + . '<button class="btn '.$btnColor.' btn-spin-action" id="btnVerifyNCF"' |
|
| 267 | 263 | . 'onclick="purchasesNCFVerify()" ' |
| 268 | - . 'title="' . $i18n->trans('verify-numproveedor') |
|
| 264 | + . 'title="'.$i18n->trans('verify-numproveedor') |
|
| 269 | 265 | . '" type="button">' |
| 270 | 266 | . '<i id="iconBtnVerify" class="fa-solid fa-search fa-fw"></i>' |
| 271 | 267 | . '</button>' |
@@ -282,7 +278,7 @@ discard block |
||
| 282 | 278 | . '<div class="mb-4">' |
| 283 | 279 | . $i18n->trans('desc-ecf_fecha_firma') |
| 284 | 280 | . '<div class="input-group">' |
| 285 | - . '<input type="datetime-local" ' . $attributes . ' value="' . $model->ecf_fecha_firma . '" class="form-control"/>' |
|
| 281 | + . '<input type="datetime-local" '.$attributes.' value="'.$model->ecf_fecha_firma.'" class="form-control"/>' |
|
| 286 | 282 | . '</div>' |
| 287 | 283 | . '</div>' |
| 288 | 284 | . '</div>'; |
@@ -296,7 +292,7 @@ discard block |
||
| 296 | 292 | . '<div class="mb-4">' |
| 297 | 293 | . $i18n->trans('desc-ecf_codigo_seguridad') |
| 298 | 294 | . '<div class="input-group">' |
| 299 | - . '<input type="text" ' . $attributes . ' value="' . $model->ecf_codigo_seguridad . '" class="form-control"/>' |
|
| 295 | + . '<input type="text" '.$attributes.' value="'.$model->ecf_codigo_seguridad.'" class="form-control"/>' |
|
| 300 | 296 | . '</div>' |
| 301 | 297 | . '</div>' |
| 302 | 298 | . '</div>'; |