@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function saveBefore(): Closure |
68 | 68 | { |
69 | - return function () { |
|
69 | + return function() { |
|
70 | 70 | if (null !== $this->codigorect && $this->idfactura === null) { |
71 | 71 | $this->cleanRefundData(); |
72 | 72 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | //Verificamos si $this->tipoComprobante es una nota de crédito o debito |
104 | - $arrayNCFTypes = ['03','04']; |
|
104 | + $arrayNCFTypes = ['03', '04']; |
|
105 | 105 | if (in_array($this->tipocomprobante, $arrayNCFTypes) === true) { |
106 | 106 | $this->ncftipoanulacion = $_REQUEST['ncftipoanulacionr'] ?? $this->ncftipoanulacion; |
107 | 107 | $this->ncffechavencimiento = $_REQUEST['ncffechavencimientor'] ?? $this->ncffechavencimiento; |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | |
115 | 115 | public function all(): Closure |
116 | 116 | { |
117 | - return function () { |
|
117 | + return function() { |
|
118 | 118 | $this->facturarectnumero2 = ''; |
119 | 119 | if ($this->idfacturarect !== '') { |
120 | 120 | $facturaRectificativa = $this->get($this->idfacturarect); |
121 | - $this->loadFromData(['facturarectnumero2' => 'SI' ]); |
|
121 | + $this->loadFromData(['facturarectnumero2' => 'SI']); |
|
122 | 122 | $this->facturarectnumero2 = $facturaRectificativa->numero2; |
123 | 123 | } else { |
124 | 124 | $this->loadFromData(['facturarectnumero2' => 'NO HAY']); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | public function descripcionTipoComprobante(): Closure |
131 | 131 | { |
132 | - return function () { |
|
132 | + return function() { |
|
133 | 133 | $ncftipocomprobante = new NCFTipo(); |
134 | 134 | $ncftipocomprobante->loadFromCode($this->tipocomprobante); |
135 | 135 | return $ncftipocomprobante->descripcion; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | protected function cleanRefundData() |
139 | 139 | { |
140 | - return function () { |
|
140 | + return function() { |
|
141 | 141 | $this->numeroncf = ''; |
142 | 142 | $this->tipocomprobante = null; |
143 | 143 | $this->ncffechavencimiento = null; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | class SalesLineMod implements SalesLineModInterface |
27 | 27 | { |
28 | 28 | |
29 | - public function apply(SalesDocument &$model, array &$lines, array $formData) |
|
29 | + public function apply(SalesDocument & $model, array &$lines, array $formData) |
|
30 | 30 | { |
31 | 31 | // TODO: Implement apply() method. |
32 | 32 | } |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | * @param string $id |
38 | 38 | * @return void |
39 | 39 | */ |
40 | - public function applyToLine(array $formData, SalesDocumentLine &$line, string $id) |
|
40 | + public function applyToLine(array $formData, SalesDocumentLine & $line, string $id) |
|
41 | 41 | { |
42 | - $line->rdtaxisc = $formData['rdtaxisc_' . $id] ?? null; |
|
43 | - $line->rdtaxcdt = $formData['rdtaxcdt_' . $id] ?? null; |
|
42 | + $line->rdtaxisc = $formData['rdtaxisc_'.$id] ?? null; |
|
43 | + $line->rdtaxcdt = $formData['rdtaxcdt_'.$id] ?? null; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function assets(): void |
@@ -86,8 +86,7 @@ discard block |
||
86 | 86 | protected function rdTax($i18n, $idlinea, $line, $model, $field): string |
87 | 87 | { |
88 | 88 | $attributes = $model->editable ? |
89 | - 'name="'. $field .'_' . $idlinea . '"' : |
|
90 | - 'disabled=""'; |
|
89 | + 'name="'.$field.'_'.$idlinea.'"' : 'disabled=""'; |
|
91 | 90 | |
92 | 91 | $title = $this->rdTaxTitle($i18n, $field); |
93 | 92 | $lineTax = $this->productoTaxValue($line->idproducto, $field); |
@@ -96,14 +95,14 @@ discard block |
||
96 | 95 | |
97 | 96 | return '<div class="col-6">' |
98 | 97 | . $title |
99 | - . '<input type="number" ' . $attributes . ' value="' . $fieldValue. '" class="form-control" readonly=""/>' |
|
98 | + . '<input type="number" '.$attributes.' value="'.$fieldValue.'" class="form-control" readonly=""/>' |
|
100 | 99 | . '</div>' |
101 | 100 | . '</div>'; |
102 | 101 | } |
103 | 102 | |
104 | 103 | protected function rdTaxTitle($i18n, $field): string |
105 | 104 | { |
106 | - return '<div class="mb-2">' . $i18n->trans($field); |
|
105 | + return '<div class="mb-2">'.$i18n->trans($field); |
|
107 | 106 | } |
108 | 107 | |
109 | 108 | protected function productoTaxValue($idproducto, $rdtaxid): ?ImpuestoProducto |