Passed
Push — master ( d67ac1...039879 )
by Joe Nilson
01:55
created
Controller/FiscalReports.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $fileName = 'MyFiles/DGII_F_'.$reportCode.'_'.$this->empresa->cifnif.'_'.$year.'_'.$month.'.TXT';
117 117
             $commonFunctions->exportTXT($reportCode, $fileName, $this->empresa->cifnif, $year, $month, $whereReport);
118 118
             $this->response->headers->set('Content-type', 'text/plain');
119
-            $this->response->headers->set('Content-Disposition', 'attachment;filename=' . $fileName);
119
+            $this->response->headers->set('Content-Disposition', 'attachment;filename='.$fileName);
120 120
             $this->response->setContent(
121 121
                 file_get_contents(
122 122
                 \FS_FOLDER
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         $periodStartDate = \date('Y-m-01');
224 224
         $periodEndDate = \date('Y-m-d');
225 225
         PeriodTools::applyPeriod('last-month', $periodStartDate, $periodEndDate);
226
-        if (in_array($this->request->request->get('filterfecha'), ['',null], true) === false) {
226
+        if (in_array($this->request->request->get('filterfecha'), ['', null], true) === false) {
227 227
             PeriodTools::applyPeriod($this->request->request->get('filterfecha'), $periodStartDate, $periodEndDate);
228 228
         } else {
229 229
             $periodStartDate = $this->request->request->get('filterstartfecha') ?? $periodStartDate;
Please login to merge, or discard this patch.
Extension/Model/FacturaProveedor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
     public function saveBefore(): Closure
55 55
     {
56
-        return function () {
56
+        return function() {
57 57
             $ArrayTipoNCFCompras = ['11', '12', '16', '17'];
58 58
             $ncfrango = new NCFRango();
59 59
             $proveedor = new Proveedor();
Please login to merge, or discard this patch.
Lib/CommonFunctionsDominicanRepublic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
             if (!$verificacion) {
140 140
                 echo json_encode(['success' => true], JSON_THROW_ON_ERROR);
141 141
             } else {
142
-                $message = "Factura: " . $verificacion[0]->idfactura . " Fecha: " . $verificacion[0]->fecha;
142
+                $message = "Factura: ".$verificacion[0]->idfactura." Fecha: ".$verificacion[0]->fecha;
143 143
                 echo json_encode(['error' => true, 'message' => $message], JSON_THROW_ON_ERROR);
144 144
             }
145 145
         }
Please login to merge, or discard this patch.
Init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $this->loadExtension(new Extension\Controller\EditFacturaProveedor());
62 62
         $this->loadExtension(new Extension\Controller\EditProducto());
63 63
         $this->loadExtension(new Extension\Controller\EditSettings());
64
-        AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
64
+        AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
65 65
         SalesLineHTML::addMod(new Mod\SalesLineMod());
66 66
         SalesFooterHTML::addMod(new Mod\SalesFooterMod());
67 67
         PurchasesFooterHTML::addMod(new Mod\PurchasesFooterMod());
Please login to merge, or discard this patch.
Mod/SalesLineMod.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
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
     }
33 33
 
34
-    public function applyToLine(array $formData, SalesDocumentLine &$line, string $id)
34
+    public function applyToLine(array $formData, SalesDocumentLine & $line, string $id)
35 35
     {
36
-        $line->rdtaxisc = $formData['rdtaxisc_' . $id] ?? null;
37
-        $line->rdtaxcdt = $formData['rdtaxcdt_' . $id] ?? null;
36
+        $line->rdtaxisc = $formData['rdtaxisc_'.$id] ?? null;
37
+        $line->rdtaxcdt = $formData['rdtaxcdt_'.$id] ?? null;
38 38
     }
39 39
 
40 40
     public function assets(): void
@@ -80,8 +80,7 @@  discard block
 block discarded – undo
80 80
     protected function rdTax($i18n, $idlinea, $line, $model, $field): string
81 81
     {
82 82
         $attributes = $model->editable ?
83
-            'name="'. $field .'_' . $idlinea . '"' :
84
-            'disabled=""';
83
+            'name="'.$field.'_'.$idlinea.'"' : 'disabled=""';
85 84
 
86 85
         $title = $this->rdTaxTitle($i18n, $field);
87 86
         $lineTax = $this->productoTaxValue($line->idproducto, $field);
@@ -90,14 +89,14 @@  discard block
 block discarded – undo
90 89
 
91 90
         return '<div class="col-6">'
92 91
             . $title
93
-            . '<input type="number" ' . $attributes . ' value="' . $fieldValue. '" class="form-control" readonly=""/>'
92
+            . '<input type="number" '.$attributes.' value="'.$fieldValue.'" class="form-control" readonly=""/>'
94 93
             . '</div>'
95 94
             . '</div>';
96 95
     }
97 96
 
98 97
     protected function rdTaxTitle($i18n, $field): string
99 98
     {
100
-        return '<div class="mb-2">' . $i18n->trans($field);
99
+        return '<div class="mb-2">'.$i18n->trans($field);
101 100
     }
102 101
 
103 102
     protected function productoTaxValue($idproducto, $rdtaxid): ?ImpuestoProducto
Please login to merge, or discard this patch.
Mod/SalesFooterMod.php 1 patch
Spacing   +20 added lines, -24 removed lines patch added patch discarded remove patch
@@ -28,21 +28,21 @@  discard block
 block discarded – undo
28 28
 
29 29
 class SalesFooterMod implements SalesModInterface
30 30
 {
31
-    public function apply(SalesDocument &$model, array $formData, User $user)
31
+    public function apply(SalesDocument & $model, array $formData, User $user)
32 32
     {
33 33
         // TODO: Implement apply() method.
34 34
     }
35 35
 
36
-    public function applyBefore(SalesDocument &$model, array $formData, User $user)
36
+    public function applyBefore(SalesDocument & $model, array $formData, User $user)
37 37
     {
38 38
         // TODO: Implement applyBefore() method.
39 39
         if ($model->modelClassName() === 'FacturaCliente') {
40
-            $model->numeroncf = isset($formData['numeroncf']) ? (string)$formData['numeroncf'] : $model->numeroncf;
41
-            $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string)$formData['tipocomprobante'] : $model->tipocomprobante;
42
-            $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string)$formData['ncffechavencimiento'] : $model->ncffechavencimiento;
43
-            $model->ncftipopago = isset($formData['ncftipopago']) ? (string)$formData['ncftipopago'] : $model->ncftipopago;
44
-            $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string)$formData['ncftipomovimiento'] : $model->ncftipomovimiento;
45
-            $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string)$formData['ncftipoanulacion'] : $model->ncftipoanulacion;
40
+            $model->numeroncf = isset($formData['numeroncf']) ? (string) $formData['numeroncf'] : $model->numeroncf;
41
+            $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string) $formData['tipocomprobante'] : $model->tipocomprobante;
42
+            $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string) $formData['ncffechavencimiento'] : $model->ncffechavencimiento;
43
+            $model->ncftipopago = isset($formData['ncftipopago']) ? (string) $formData['ncftipopago'] : $model->ncftipopago;
44
+            $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string) $formData['ncftipomovimiento'] : $model->ncftipomovimiento;
45
+            $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string) $formData['ncftipoanulacion'] : $model->ncftipoanulacion;
46 46
         }
47 47
     }
48 48
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         if (!$model->editable) {
104 104
             $invoiceTipoComprobante = $model->tipocomprobante;
105 105
         } elseif ($model->editable === true && ($cliente->tipocomprobante !== $model->tipocomprobante) && $model->tipocomprobante !== null) {
106
-            $invoiceTipoComprobante =  $model->tipocomprobante;
106
+            $invoiceTipoComprobante = $model->tipocomprobante;
107 107
         } elseif ($model->editable === true && ($cliente->tipocomprobante === $model->tipocomprobante) && $model->tipocomprobante !== null) {
108 108
             $invoiceTipoComprobante = $cliente->tipocomprobante;
109 109
         }
@@ -111,15 +111,14 @@  discard block
 block discarded – undo
111 111
         $options = ['<option value="">------</option>'];
112 112
         foreach ($tipoComprobante as $row) {
113 113
             $options[] = ($row->tipocomprobante === $invoiceTipoComprobante) ?
114
-                '<option value="' . $row->tipocomprobante . '" selected="">' . $row->descripcion . '</option>' :
115
-                '<option value="' . $row->tipocomprobante . '">' . $row->descripcion . '</option>';
114
+                '<option value="'.$row->tipocomprobante.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->tipocomprobante.'">'.$row->descripcion.'</option>';
116 115
         }
117 116
 
118 117
         $attributes = ($model->editable || $model->numeroncf === '') ? 'id="tipocomprobante" name="tipocomprobante" required="" onChange="verificarCorrelativoNCF(this.value,\'Ventas\')"' : 'disabled=""';
119 118
         return '<div class="col-sm-3">'
120 119
             . '<div class="form-group">'
121 120
             .  $i18n->trans('tipocomprobante')
122
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
121
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
123 122
             . '</div>'
124 123
             . '</div>';
125 124
     }
@@ -143,15 +142,14 @@  discard block
 block discarded – undo
143 142
         $options = ['<option value="">------</option>'];
144 143
         foreach ($tipoPago as $row) {
145 144
             $options[] = ($row->codigo === $invoiceTipoPago) ?
146
-                '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' :
147
-                '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>';
145
+                '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>';
148 146
         }
149 147
 
150 148
         $attributes = $model->editable ? 'name="ncftipopago" required=""' : 'disabled=""';
151 149
         return '<div class="col-sm-2">'
152 150
             . '<div class="form-group">'
153 151
             .  $i18n->trans('ncf-payment-type')
154
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
152
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
155 153
             . '</div>'
156 154
             . '</div>';
157 155
     }
@@ -171,15 +169,14 @@  discard block
 block discarded – undo
171 169
         $options = ['<option value="">------</option>'];
172 170
         foreach ($tipoMovimiento as $row) {
173 171
             $options[] = ($row->codigo === $invoiceTipoMovimiento) ?
174
-                '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' :
175
-                '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>';
172
+                '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>';
176 173
         }
177 174
 
178 175
         $attributes = $model->editable ? 'name="ncftipomovimiento" required=""' : 'disabled=""';
179 176
         return '<div class="col-sm-3">'
180 177
             . '<div class="form-group">'
181 178
             .  $i18n->trans('ncf-movement-type')
182
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
179
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
183 180
             . '</div>'
184 181
             . '</div>';
185 182
     }
@@ -197,15 +194,14 @@  discard block
 block discarded – undo
197 194
         $options = ['<option value="">------</option>'];
198 195
         foreach ($tipoAnulacion as $row) {
199 196
             $options[] = ($row->codigo === $invoiceTipoAnulacion) ?
200
-                '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' :
201
-                '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>';
197
+                '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>';
202 198
         }
203 199
 
204 200
         $attributes = $model->editable ? 'name="ncftipoanulacion"' : 'disabled=""';
205 201
         return '<div class="col-sm-2">'
206 202
             . '<div class="form-group">'
207 203
             .  $i18n->trans('ncf-cancellation-type')
208
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
204
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
209 205
             . '</div>'
210 206
             . '</div>';
211 207
     }
@@ -217,8 +213,8 @@  discard block
 block discarded – undo
217 213
             ? date('Y-m-d', strtotime($model->ncffechavencimiento))
218 214
             : '';
219 215
         return '<div class="col-sm-2">'
220
-            . '<div class="form-group">' . $i18n->trans('due-date')
221
-            . '<input type="date" ' . $attributes . ' value="' . $ncfFechaVencimiento . '" class="form-control"/>'
216
+            . '<div class="form-group">'.$i18n->trans('due-date')
217
+            . '<input type="date" '.$attributes.' value="'.$ncfFechaVencimiento.'" class="form-control"/>'
222 218
             . '</div>'
223 219
             . '</div>';
224 220
     }
@@ -229,7 +225,7 @@  discard block
 block discarded – undo
229 225
         return empty($model->codcliente) ? '' : '<div class="col-sm">'
230 226
             . '<div class="form-group">'
231 227
             . $i18n->trans('desc-numeroncf-sales')
232
-            . '<input type="text" ' . $attributes . ' value="' . $model->numeroncf . '" class="form-control"/>'
228
+            . '<input type="text" '.$attributes.' value="'.$model->numeroncf.'" class="form-control"/>'
233 229
             . '</div>'
234 230
             . '</div>';
235 231
     }
Please login to merge, or discard this patch.
Mod/CalculatorMod.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 class CalculatorMod implements CalculatorModInterface
27 27
 {
28 28
 
29
-    public function apply(BusinessDocument &$doc, array &$lines): bool
29
+    public function apply(BusinessDocument & $doc, array &$lines): bool
30 30
     {
31 31
         //TODO: Implement apply() method.
32 32
         return true;
33 33
     }
34 34
 
35
-    public function calculate(BusinessDocument &$doc, array &$lines): bool
35
+    public function calculate(BusinessDocument & $doc, array &$lines): bool
36 36
     {
37 37
         // calculamos el total de impuestos
38 38
 //        $totalTaxes = 0.0;
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
         return true;
45 45
     }
46 46
 
47
-    public function calculateLine(BusinessDocument $doc, BusinessDocumentLine &$line): bool
47
+    public function calculateLine(BusinessDocument $doc, BusinessDocumentLine & $line): bool
48 48
     {
49 49
         // TODO: Implement calculateLine() method.
50 50
         return true;
51 51
     }
52 52
 
53
-    public function clear(BusinessDocument &$doc, array &$lines): bool
53
+    public function clear(BusinessDocument & $doc, array &$lines): bool
54 54
     {
55 55
         // TODO: Implement clear() method.
56 56
         return true;
Please login to merge, or discard this patch.
Extension/Lib/PointOfSaleVoucher.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $this->printer->text($this->document->codigo, true, true);
40 40
         $this->printer->lineSeparator('-');
41
-        $this->printer->text('NCF: ' . $this->document->numeroncf, true, true);
41
+        $this->printer->text('NCF: '.$this->document->numeroncf, true, true);
42 42
         //$this->printer->text('TIPO: ' . $this->document->descripcionTipoComprobante(), true, true);
43
-        $this->printer->text('F. VENC. NCF: ' . $this->document->ncffechavencimiento, true, true);
43
+        $this->printer->text('F. VENC. NCF: '.$this->document->ncffechavencimiento, true, true);
44 44
         $this->printer->lineSeparator('-');
45
-        $fechacompleta = $this->document->fecha . ' ' . $this->document->hora;
45
+        $fechacompleta = $this->document->fecha.' '.$this->document->hora;
46 46
         $this->printer->text($fechacompleta, true, true);
47 47
 
48
-        $this->printer->text('CLIENTE: ' . $this->document->nombrecliente);
48
+        $this->printer->text('CLIENTE: '.$this->document->nombrecliente);
49 49
         $this->printer->lineSeparator('=');
50 50
 
51 51
         $this->printer->text('ARTICULO');
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
                 $this->printer->textColumns('IMPORTE', NumberTools::format($line->pvpsindto));
61 61
 
62 62
                 $descuento = $line->pvpsindto - ($line->pvpsindto * $line->getEUDiscount());
63
-                $this->printer->textColumns('Descuento:', '- ' . NumberTools::format($descuento));
63
+                $this->printer->textColumns('Descuento:', '- '.NumberTools::format($descuento));
64 64
 
65 65
                 $impuestoLinea = $line->pvptotal * $line->iva / 100;
66
-                $this->printer->textColumns("Impuesto $line->iva%:", '+ ' . NumberTools::format($impuestoLinea));
66
+                $this->printer->textColumns("Impuesto $line->iva%:", '+ '.NumberTools::format($impuestoLinea));
67 67
                 $this->printer->textColumns('Total linea:', NumberTools::format($line->pvptotal + $impuestoLinea));
68 68
             }
69 69
 
Please login to merge, or discard this patch.
Extension/Model/FacturaCliente.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     public function saveBefore(): Closure
68 68
     {
69
-        return function () {
69
+        return function() {
70 70
             $ncfrango = new NCFRango();
71 71
             $cliente = new Cliente();
72 72
             $appSettins = new AppSettings;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 $ncfRangoToUse->correlativo++;
96 96
                 $ncfRangoToUse->save();
97 97
                 //Verificamos si $this->tipoComprobante es una nota de crédito o debito
98
-                $arrayNCFTypes = ['03','04'];
98
+                $arrayNCFTypes = ['03', '04'];
99 99
                 if (in_array($this->tipocomprobante, $arrayNCFTypes) === true) {
100 100
                     $this->ncftipoanulacion = isset($_REQUEST['ncftipoanulacionr'])
101 101
                         ? $_REQUEST['ncftipoanulacionr']
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function all(): Closure
114 114
     {
115
-        return function () {
115
+        return function() {
116 116
             $this->facturarectnumero2 = '';
117 117
             if ($this->idfacturarect !== '') {
118 118
                 $facturaRectificativa = $this->get($this->idfacturarect);
119
-                $this->loadFromData(['facturarectnumero2' => 'SI' ]);
119
+                $this->loadFromData(['facturarectnumero2' => 'SI']);
120 120
                 $this->facturarectnumero2 = $facturaRectificativa->numero2;
121 121
             } else {
122 122
                 $this->loadFromData(['facturarectnumero2' => 'NO HAY']);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     public function descripcionTipoComprobante(): Closure
129 129
     {
130
-        return function () {
130
+        return function() {
131 131
             $ncftipocomprobante = new NCFTipo();
132 132
             $ncftipocomprobante->loadFromCode($this->tipocomprobante);
133 133
             return $ncftipocomprobante->descripcion;
Please login to merge, or discard this patch.