Passed
Push — master ( bbf066...10cbd5 )
by Joe Nilson
03:17
created
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/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/Controller/EditProducto.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     public function createViews(): Closure
10 10
     {
11
-        return function () {
11
+        return function() {
12 12
             // tu código aquí
13 13
             // createViews() se ejecuta una vez realizado el createViews() del controlador.
14 14
             parent::createViews();
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function execAfterAction(): Closure
20 20
     {
21
-        return function ($action) {
21
+        return function($action) {
22 22
             // tu código aquí
23 23
             // execAfterAction() se ejecuta tras el execAfterAction() del controlador.
24 24
         };
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function execPreviousAction(): Closure
28 28
     {
29
-        return function ($action) {
29
+        return function($action) {
30 30
             // tu código aquí
31 31
             // execPreviousAction() se ejecuta después del execPreviousAction() del controlador.
32 32
             // Si devolvemos false detenemos la ejecución del controlador.
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function loadData(): Closure
37 37
     {
38
-        return function ($viewName, $view) {
38
+        return function($viewName, $view) {
39 39
             // tu código aquí
40 40
             // loadData() se ejecuta tras el loadData() del controlador. Recibe los parámetros $viewName y $view.
41 41
             switch ($viewName) {
Please login to merge, or discard this patch.
Extension/Controller/EditSettings.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 {
25 25
     public function execAfterAction(): Closure
26 26
     {
27
-         return function($action) {
27
+            return function($action) {
28 28
             //return $action;
29 29
             if ($action === 'fixfacturasprov') {
30 30
                 $dataBase = new DataBase();
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             } elseif ($action === 'fixfacturascli') {
46 46
                 self::toolBox()->i18nLog()->notice('fixfacturascli');
47 47
             }
48
-         };
48
+            };
49 49
     }
50 50
 
51 51
 }
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                     $sqlType = " INDEX ";
34 34
                     $dataBase->exec("set FOREIGN_KEY_CHECKS=0;");
35 35
                 }
36
-                $result = $dataBase->exec("ALTER TABLE facturasprov DROP " . $sqlType .
36
+                $result = $dataBase->exec("ALTER TABLE facturasprov DROP ".$sqlType.
37 37
                                                 " IF EXISTS uniq_empresancf_facturasprov;");
38 38
                 if (strtoupper(FS_DB_TYPE) === 'MYSQL') {
39 39
                     $dataBase->exec("set FOREIGN_KEY_CHECKS=1;");
Please login to merge, or discard this patch.
Extension/Controller/EditFacturaProveedor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
 {
31 31
     public function createViews(): Closure
32 32
     {
33
-        return function () {
33
+        return function() {
34 34
             parent::createViews();
35
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
36
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
35
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
36
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
37 37
         };
38 38
     }
39 39
 
40 40
     public function execPreviousAction()
41 41
     {
42
-        return function ($action) {
42
+        return function($action) {
43 43
             switch ($action) {
44 44
                 case 'busca_tipo':
45 45
                     $this->setTemplate(false);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                     break;
60 60
                 case "verifica_documento":
61 61
                     $this->setTemplate(false);
62
-                    CommonFunctionsDominicanRepublic::verifyDocument($_REQUEST['ncf'],$_REQUEST['proveedor']);
62
+                    CommonFunctionsDominicanRepublic::verifyDocument($_REQUEST['ncf'], $_REQUEST['proveedor']);
63 63
                     break;
64 64
                 case 'busca_correlativo':
65 65
                     $this->setTemplate(false);
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function ncftipo()
97 97
     {
98
-        return function () {
98
+        return function() {
99 99
             return NCFTipo::allVentas();
100 100
         };
101 101
     }
102 102
 
103 103
     public function ncftipoanulacion()
104 104
     {
105
-        return function () {
105
+        return function() {
106 106
             $tiposAnulacion = new NCFTipoAnulacion();
107 107
             return $tiposAnulacion->all();
108 108
         };
Please login to merge, or discard this patch.