Passed
Push — master ( 3a17ef...a7ff16 )
by Joe Nilson
03:12
created
Extension/Controller/EditFacturaProveedor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
 {
30 30
     public function createViews(): Closure
31 31
     {
32
-        return function () {
32
+        return function() {
33 33
             parent::createViews();
34
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
35
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
34
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
35
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
36 36
         };
37 37
     }
38 38
 
39 39
     public function execPreviousAction()
40 40
     {
41
-        return function ($action) {
41
+        return function($action) {
42 42
             switch ($action) {
43 43
                 case 'busca_tipo':
44 44
                     $this->setTemplate(false);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                     if (!$verificacion) {
68 68
                         echo json_encode(['success' => true], JSON_THROW_ON_ERROR);
69 69
                     } else {
70
-                        $message = "Factura: " . $verificacion[0]->idfactura . " Fecha: " . $verificacion[0]->fecha;
70
+                        $message = "Factura: ".$verificacion[0]->idfactura." Fecha: ".$verificacion[0]->fecha;
71 71
                         echo json_encode(['error' => true, 'message' => $message], JSON_THROW_ON_ERROR);
72 72
                     }
73 73
                     break;
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function ncftipo()
85 85
     {
86
-        return function () {
86
+        return function() {
87 87
             return NCFTipo::allVentas();
88 88
         };
89 89
     }
90 90
 
91 91
     public function ncftipoanulacion()
92 92
     {
93
-        return function () {
93
+        return function() {
94 94
             $tiposAnulacion = new NCFTipoAnulacion();
95 95
             return $tiposAnulacion->all();
96 96
         };
Please login to merge, or discard this patch.
Extension/Controller/EditCliente.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
28 28
 {
29 29
     public function createViews(): Closure
30 30
     {
31
-        return function () {
32
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
33
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
34
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/BusquedaRNCDGII.js');
31
+        return function() {
32
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
33
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
34
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/BusquedaRNCDGII.js');
35 35
             $ncfTipo = new NCFTipo();
36 36
             $ncfTipos = $ncfTipo->allFor('ventas', 'suma');
37 37
             $customValues = [];
Please login to merge, or discard this patch.
Extension/Model/FacturaCliente.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function saveBefore(): Closure
67 67
     {
68
-        return function () {
68
+        return function() {
69 69
             $ncfrango = new NCFRango();
70 70
             $cliente = new Cliente();
71 71
             $appSettins = new AppSettings;
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function all(): Closure
103 103
     {
104
-        return function () {
104
+        return function() {
105 105
             $this->facturarectnumero2 = '';
106 106
             if ($this->idfacturarect !== '') {
107 107
                 $facturaRectificativa = $this->get($this->idfacturarect);
108
-                $this->loadFromData(['facturarectnumero2' => 'SI' ]);
108
+                $this->loadFromData(['facturarectnumero2' => 'SI']);
109 109
                 $this->facturarectnumero2 = $facturaRectificativa->numero2;
110 110
             } else {
111 111
                 $this->loadFromData(['facturarectnumero2' => 'NO HAY']);
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
             $cliente = new Proveedor();
Please login to merge, or discard this patch.
Mod/PurchasesFooterMod.php 1 patch
Spacing   +22 added lines, -26 removed lines patch added patch discarded remove patch
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
 
30 30
 class PurchasesFooterMod implements PurchasesModInterface
31 31
 {
32
-    public function apply(PurchaseDocument &$model, array $formData, User $user)
32
+    public function apply(PurchaseDocument & $model, array $formData, User $user)
33 33
     {
34 34
         // TODO: Implement apply() method.
35 35
     }
36 36
 
37
-    public function applyBefore(PurchaseDocument &$model, array $formData, User $user)
37
+    public function applyBefore(PurchaseDocument & $model, array $formData, User $user)
38 38
     {
39 39
         // TODO: Implement applyBefore() method.
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;
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
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function newFields(): array
56 56
     {
57 57
         // TODO: Implement newFields() method.
58
-        return ['numeroncf','tipocomprobante', 'ncffechavencimiento', 'ncftipopago', 'ncftipomovimiento', 'ncftipoanulacion'];
58
+        return ['numeroncf', 'tipocomprobante', 'ncffechavencimiento', 'ncftipopago', 'ncftipomovimiento', 'ncftipoanulacion'];
59 59
     }
60 60
 
61 61
     public function renderField(Translator $i18n, PurchaseDocument $model, string $field): ?string
@@ -104,15 +104,14 @@  discard block
 block discarded – undo
104 104
         $options = ['<option value="">------</option>'];
105 105
         foreach ($tipoComprobante as $row) {
106 106
             $options[] = ($row->tipocomprobante === $invoiceTipoComprobante) ?
107
-                '<option value="' . $row->tipocomprobante . '" selected="">' . $row->descripcion . '</option>' :
108
-                '<option value="' . $row->tipocomprobante . '">' . $row->descripcion . '</option>';
107
+                '<option value="'.$row->tipocomprobante.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->tipocomprobante.'">'.$row->descripcion.'</option>';
109 108
         }
110 109
 
111 110
         $attributes = ($model->editable || $model->numeroncf === '') ? 'name="tipocomprobante" required=""' : 'disabled=""';
112 111
         return '<div class="col-sm-3">'
113 112
             . '<div class="form-group">'
114 113
             .  $i18n->trans('tipocomprobante')
115
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
114
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
116 115
             . '</div>'
117 116
             . '</div>';
118 117
     }
@@ -136,15 +135,14 @@  discard block
 block discarded – undo
136 135
         $options = ['<option value="">------</option>'];
137 136
         foreach ($tipoPago as $row) {
138 137
             $options[] = ($row->codigo === $invoiceTipoPago) ?
139
-                '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' :
140
-                '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>';
138
+                '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>';
141 139
         }
142 140
 
143 141
         $attributes = $model->editable ? 'name="ncftipopago" required=""' : 'disabled=""';
144 142
         return '<div class="col-sm-2">'
145 143
             . '<div class="form-group">'
146 144
             .  $i18n->trans('ncf-payment-type')
147
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
145
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
148 146
             . '</div>'
149 147
             . '</div>';
150 148
     }
@@ -162,15 +160,14 @@  discard block
 block discarded – undo
162 160
         $options = ['<option value="">------</option>'];
163 161
         foreach ($tipoMovimiento as $row) {
164 162
             $options[] = ($row->codigo === $invoiceTipoMovimiento) ?
165
-                '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' :
166
-                '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>';
163
+                '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>';
167 164
         }
168 165
 
169 166
         $attributes = $model->editable ? 'name="ncftipomovimiento" required=""' : 'disabled=""';
170 167
         return '<div class="col-sm-3">'
171 168
             . '<div class="form-group">'
172 169
             .  $i18n->trans('ncf-movement-type')
173
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
170
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
174 171
             . '</div>'
175 172
             . '</div>';
176 173
     }
@@ -188,15 +185,14 @@  discard block
 block discarded – undo
188 185
         $options = ['<option value="">------</option>'];
189 186
         foreach ($tipoAnulacion as $row) {
190 187
             $options[] = ($row->codigo === $invoiceTipoAnulacion) ?
191
-                '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' :
192
-                '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>';
188
+                '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>';
193 189
         }
194 190
 
195 191
         $attributes = $model->editable ? 'name="ncftipoanulacion"' : 'disabled=""';
196 192
         return '<div class="col-sm-2">'
197 193
             . '<div class="form-group">'
198 194
             .  $i18n->trans('ncf-cancellation-type')
199
-            . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>'
195
+            . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>'
200 196
             . '</div>'
201 197
             . '</div>';
202 198
     }
@@ -205,8 +201,8 @@  discard block
 block discarded – undo
205 201
     {
206 202
         $attributes = ($model->editable) ? 'name="ncffechavencimiento"' : 'disabled=""';
207 203
         return '<div class="col-sm-2">'
208
-            . '<div class="form-group">' . $i18n->trans('due-date')
209
-            . '<input type="date" ' . $attributes . ' value="' . date('Y-m-d', strtotime($model->ncffechavencimiento)) . '" class="form-control"/>'
204
+            . '<div class="form-group">'.$i18n->trans('due-date')
205
+            . '<input type="date" '.$attributes.' value="'.date('Y-m-d', strtotime($model->ncffechavencimiento)).'" class="form-control"/>'
210 206
             . '</div>'
211 207
             . '</div>';
212 208
     }
@@ -219,11 +215,11 @@  discard block
 block discarded – undo
219 215
             . '<div class="form-group">'
220 216
             . $i18n->trans('desc-numeroncf-purchases')
221 217
             . '<div class="input-group">'
222
-            . '<input type="text" ' . $attributes . ' value="' . $model->numeroncf . '" class="form-control"/>'
218
+            . '<input type="text" '.$attributes.' value="'.$model->numeroncf.'" class="form-control"/>'
223 219
             . '<div class="input-group-append">'
224
-            . '<button class="btn ' . $btnColor .' btn-spin-action" id="btnVerifyNCF"'
220
+            . '<button class="btn '.$btnColor.' btn-spin-action" id="btnVerifyNCF"'
225 221
             . 'onclick="purchasesNCFVerify()" '
226
-            . 'title="'. $i18n->trans('verify-numproveedor')
222
+            . 'title="'.$i18n->trans('verify-numproveedor')
227 223
             .'" type="button">'
228 224
             . '<i id="iconBtnVerify" class="fas fa-search fa-fw"></i>'
229 225
             . '</button>'
Please login to merge, or discard this patch.
Translation/updater.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 $files = [];
24 24
 $langs = 'ca_ES,de_DE,en_EN,es_AR,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_MX,es_PA,es_PE,es_UY,eu_ES,fr_FR,gl_ES,it_IT,pt_PT,va_ES';
25 25
 foreach (explode(',', $langs) as $lang) {
26
-    $files[] = $lang . '.json';
26
+    $files[] = $lang.'.json';
27 27
 }
28 28
 foreach (scandir(__DIR__, SCANDIR_SORT_ASCENDING) as $filename) {
29 29
     if (is_file($filename) && substr($filename, -5) === '.json' && false === in_array($filename, $files, true)) {
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 // download json from facturascripts.com
35 35
 foreach ($files as $filename) {
36 36
     $url = "https://facturascripts.com/EditLanguage?action=json&idproject=176&code=";
37
-    $json = file_get_contents($url . substr($filename, 0, -5));
37
+    $json = file_get_contents($url.substr($filename, 0, -5));
38 38
     if (empty($json) || strlen($json) < 10) {
39 39
         unlink($filename);
40
-        echo "Remove " . $filename . "\n";
40
+        echo "Remove ".$filename."\n";
41 41
         continue;
42 42
     }
43 43
 
44
-    echo "Download " . $filename . "\n";
44
+    echo "Download ".$filename."\n";
45 45
     file_put_contents($filename, $json);
46 46
 }
47 47
 
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
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $this->loadExtension(new Extension\Controller\EditProveedor());
56 56
         $this->loadExtension(new Extension\Controller\EditFacturaCliente());
57 57
         $this->loadExtension(new Extension\Controller\EditFacturaProveedor());
58
-        AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
58
+        AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
59 59
         SalesFooterHTML::addMod(new Mod\SalesFooterMod());
60 60
         PurchasesFooterHTML::addMod(new Mod\PurchasesFooterMod());
61 61
     }
Please login to merge, or discard this patch.
Model/NCFTipoMovimiento.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -61,23 +61,23 @@  discard block
 block discarded – undo
61 61
      * @var array
62 62
      */
63 63
     private $arrayTiposMovimiento = [
64
-        ['tipomovimiento'=>'COM','codigo' => '01', 'descripcion' => 'GASTOS DE PERSONAL', 'estado' => true],
65
-        ['tipomovimiento'=>'COM','codigo' => '02', 'descripcion' => 'GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS', 'estado' => true],
66
-        ['tipomovimiento'=>'COM','codigo' => '03', 'descripcion' => 'ARRENDAMIENTOS', 'estado' => true],
67
-        ['tipomovimiento'=>'COM','codigo' => '04', 'descripcion' => 'GASTOS DE ACTIVOS FIJOS', 'estado' => true],
68
-        ['tipomovimiento'=>'COM','codigo' => '05', 'descripcion' => 'GASTOS DE REPRESENTACIÓN', 'estado' => true],
69
-        ['tipomovimiento'=>'COM','codigo' => '06', 'descripcion' => 'OTRAS DEDUCCIONES ADMITIDAS', 'estado' => true],
70
-        ['tipomovimiento'=>'COM','codigo' => '07', 'descripcion' => 'GASTOS FINANCIEROS', 'estado' => true],
71
-        ['tipomovimiento'=>'COM','codigo' => '08', 'descripcion' => 'GASTOS EXTRAORDINARIOS', 'estado' => true],
72
-        ['tipomovimiento'=>'COM','codigo' => '09', 'descripcion' => 'COMPRAS Y GASTOS QUE FORMARÁN PARTE DEL COSTO DE VENTA', 'estado' => true],
73
-        ['tipomovimiento'=>'COM','codigo' => '10', 'descripcion' => 'ADQUISICIONES DE ACTIVOS', 'estado' => true],
74
-        ['tipomovimiento'=>'COM','codigo' => '11', 'descripcion' => 'GASTOS DE SEGUROS', 'estado' => true],
75
-        ['tipomovimiento'=>'VEN','codigo' => '1', 'descripcion' => 'Ingresos por operaciones (No financieros)', 'estado' => true],
76
-        ['tipomovimiento'=>'VEN','codigo' => '2', 'descripcion' => 'Ingresos Financieros', 'estado' => true],
77
-        ['tipomovimiento'=>'VEN','codigo' => '3', 'descripcion' => 'Ingresos Extraordinarios', 'estado' => true],
78
-        ['tipomovimiento'=>'VEN','codigo' => '4', 'descripcion' => 'Ingresos por Arrendamientos', 'estado' => true],
79
-        ['tipomovimiento'=>'VEN','codigo' => '5', 'descripcion' => 'Ingresos por Venta de Activo Depreciable', 'estado' => true],
80
-        ['tipomovimiento'=>'VEN','codigo' => '6', 'descripcion' => 'Otros Ingresos', 'estado' => true]
64
+        ['tipomovimiento'=>'COM', 'codigo' => '01', 'descripcion' => 'GASTOS DE PERSONAL', 'estado' => true],
65
+        ['tipomovimiento'=>'COM', 'codigo' => '02', 'descripcion' => 'GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS', 'estado' => true],
66
+        ['tipomovimiento'=>'COM', 'codigo' => '03', 'descripcion' => 'ARRENDAMIENTOS', 'estado' => true],
67
+        ['tipomovimiento'=>'COM', 'codigo' => '04', 'descripcion' => 'GASTOS DE ACTIVOS FIJOS', 'estado' => true],
68
+        ['tipomovimiento'=>'COM', 'codigo' => '05', 'descripcion' => 'GASTOS DE REPRESENTACIÓN', 'estado' => true],
69
+        ['tipomovimiento'=>'COM', 'codigo' => '06', 'descripcion' => 'OTRAS DEDUCCIONES ADMITIDAS', 'estado' => true],
70
+        ['tipomovimiento'=>'COM', 'codigo' => '07', 'descripcion' => 'GASTOS FINANCIEROS', 'estado' => true],
71
+        ['tipomovimiento'=>'COM', 'codigo' => '08', 'descripcion' => 'GASTOS EXTRAORDINARIOS', 'estado' => true],
72
+        ['tipomovimiento'=>'COM', 'codigo' => '09', 'descripcion' => 'COMPRAS Y GASTOS QUE FORMARÁN PARTE DEL COSTO DE VENTA', 'estado' => true],
73
+        ['tipomovimiento'=>'COM', 'codigo' => '10', 'descripcion' => 'ADQUISICIONES DE ACTIVOS', 'estado' => true],
74
+        ['tipomovimiento'=>'COM', 'codigo' => '11', 'descripcion' => 'GASTOS DE SEGUROS', 'estado' => true],
75
+        ['tipomovimiento'=>'VEN', 'codigo' => '1', 'descripcion' => 'Ingresos por operaciones (No financieros)', 'estado' => true],
76
+        ['tipomovimiento'=>'VEN', 'codigo' => '2', 'descripcion' => 'Ingresos Financieros', 'estado' => true],
77
+        ['tipomovimiento'=>'VEN', 'codigo' => '3', 'descripcion' => 'Ingresos Extraordinarios', 'estado' => true],
78
+        ['tipomovimiento'=>'VEN', 'codigo' => '4', 'descripcion' => 'Ingresos por Arrendamientos', 'estado' => true],
79
+        ['tipomovimiento'=>'VEN', 'codigo' => '5', 'descripcion' => 'Ingresos por Venta de Activo Depreciable', 'estado' => true],
80
+        ['tipomovimiento'=>'VEN', 'codigo' => '6', 'descripcion' => 'Otros Ingresos', 'estado' => true]
81 81
     ];
82 82
     
83 83
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function install(): string
103 103
     {
104 104
         parent::install();
105
-        return "INSERT INTO rd_ncftipomovimiento (tipomovimiento, codigo, descripcion, estado) VALUES " .
105
+        return "INSERT INTO rd_ncftipomovimiento (tipomovimiento, codigo, descripcion, estado) VALUES ".
106 106
             "('COM','01','GASTOS DE PERSONAL',true), ".
107 107
             "('COM','02','GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS',true), ".
108 108
             "('COM','03','ARRENDAMIENTOS',true), ".
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     public function restoreData()
126 126
     {
127 127
         $dataBase = new DataBase();
128
-        $sqlClean = "DELETE FROM " . $this->tableName() . ";";
128
+        $sqlClean = "DELETE FROM ".$this->tableName().";";
129 129
         $dataBase->exec($sqlClean);
130 130
         foreach ($this->arrayTiposMovimiento as $arrayItem) {
131 131
             $initialData = new NCFTipoMovimiento($arrayItem);
Please login to merge, or discard this patch.
Model/NCFTipoPago.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
      * @var array
62 62
      */
63 63
     public $arrayTipos = [
64
-        ['tipopago'=>'01','codigo' => '17', 'descripcion' => 'EFECTIVO','estado'=>true],
65
-        ['tipopago'=>'01','codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true],
66
-        ['tipopago'=>'01','codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true],
67
-        ['tipopago'=>'01','codigo' => '20', 'descripcion' => 'VENTA A CREDITO','estado'=>true],
68
-        ['tipopago'=>'01','codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO','estado'=>true],
69
-        ['tipopago'=>'01','codigo' => '22', 'descripcion' => 'PERMUTA','estado'=>true],
70
-        ['tipopago'=>'01','codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS','estado'=>true],
71
-        ['tipopago'=>'02','codigo' => '01', 'descripcion' => 'EFECTIVO','estado'=>true],
72
-        ['tipopago'=>'02','codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true],
73
-        ['tipopago'=>'02','codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true],
74
-        ['tipopago'=>'02','codigo' => '04', 'descripcion' => 'COMPRA A CREDITO','estado'=>true],
75
-        ['tipopago'=>'02','codigo' => '05', 'descripcion' => 'PERMUTA','estado'=>true],
76
-        ['tipopago'=>'02','codigo' => '06', 'descripcion' => 'NOTA DE CREDITO','estado'=>true],
77
-        ['tipopago'=>'02','codigo' => '07', 'descripcion' => 'MIXTO','estado'=>true]
64
+        ['tipopago'=>'01', 'codigo' => '17', 'descripcion' => 'EFECTIVO', 'estado'=>true],
65
+        ['tipopago'=>'01', 'codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true],
66
+        ['tipopago'=>'01', 'codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true],
67
+        ['tipopago'=>'01', 'codigo' => '20', 'descripcion' => 'VENTA A CREDITO', 'estado'=>true],
68
+        ['tipopago'=>'01', 'codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO', 'estado'=>true],
69
+        ['tipopago'=>'01', 'codigo' => '22', 'descripcion' => 'PERMUTA', 'estado'=>true],
70
+        ['tipopago'=>'01', 'codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS', 'estado'=>true],
71
+        ['tipopago'=>'02', 'codigo' => '01', 'descripcion' => 'EFECTIVO', 'estado'=>true],
72
+        ['tipopago'=>'02', 'codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true],
73
+        ['tipopago'=>'02', 'codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true],
74
+        ['tipopago'=>'02', 'codigo' => '04', 'descripcion' => 'COMPRA A CREDITO', 'estado'=>true],
75
+        ['tipopago'=>'02', 'codigo' => '05', 'descripcion' => 'PERMUTA', 'estado'=>true],
76
+        ['tipopago'=>'02', 'codigo' => '06', 'descripcion' => 'NOTA DE CREDITO', 'estado'=>true],
77
+        ['tipopago'=>'02', 'codigo' => '07', 'descripcion' => 'MIXTO', 'estado'=>true]
78 78
     ];
79 79
     
80 80
     /**
@@ -99,27 +99,27 @@  discard block
 block discarded – undo
99 99
     public function install(): string
100 100
     {
101 101
         parent::install();
102
-        return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES " .
103
-            "('01','17','EFECTIVO',true), " .
104
-            "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " .
105
-            "('01','19','TARJETA CRÉDITO/DÉBITO',true), " .
106
-            "('01','20','VENTA A CRÉDITO',true), " .
107
-            "('01','21','BONOS O CERTIFICADOS DE REGALO',true), " .
108
-            "('01','22','PERMUTA',true), " .
109
-            "('01','23','OTRAS FORMAS DE VENTAS',true), " .
110
-            "('02','01','EFECTIVO',true), " .
111
-            "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " .
112
-            "('02','03','TARJETA CRÉDITO/DÉBITO',true), " .
113
-            "('02','04','COMPRA A CREDITO',true), " .
114
-            "('02','05','PERMUTA',true), " .
115
-            "('02','06','NOTA DE CREDITO',true), " .
102
+        return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES ".
103
+            "('01','17','EFECTIVO',true), ".
104
+            "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ".
105
+            "('01','19','TARJETA CRÉDITO/DÉBITO',true), ".
106
+            "('01','20','VENTA A CRÉDITO',true), ".
107
+            "('01','21','BONOS O CERTIFICADOS DE REGALO',true), ".
108
+            "('01','22','PERMUTA',true), ".
109
+            "('01','23','OTRAS FORMAS DE VENTAS',true), ".
110
+            "('02','01','EFECTIVO',true), ".
111
+            "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ".
112
+            "('02','03','TARJETA CRÉDITO/DÉBITO',true), ".
113
+            "('02','04','COMPRA A CREDITO',true), ".
114
+            "('02','05','PERMUTA',true), ".
115
+            "('02','06','NOTA DE CREDITO',true), ".
116 116
             "('02','07','MIXTO',true);";
117 117
     }
118 118
     
119 119
     public function restoreData()
120 120
     {
121 121
         $dataBase = new DataBase();
122
-        $sqlClean = "DELETE FROM " . $this->tableName() . ";";
122
+        $sqlClean = "DELETE FROM ".$this->tableName().";";
123 123
         $dataBase->exec($sqlClean);
124 124
         foreach ($this->arrayTipos as $arrayItem) {
125 125
             $initialData = new NCFTipoMovimiento($arrayItem);
Please login to merge, or discard this patch.