Passed
Push — master ( 8e49de...855750 )
by Joe Nilson
03:05
created
Model/NCFRango.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     
174 174
     protected function saveUpdate(array $values = array())
175 175
     {
176
-        if($this->id and isset($this->usuariomodificacion_view)) {
176
+        if ($this->id and isset($this->usuariomodificacion_view)) {
177 177
             $this->fechamodificacion = \date('d-m-Y');
178 178
             $this->usuariomodificacion = $this->usuariomodificacion_view;
179 179
         }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                 . $idempresa
190 190
                 . ' AND tipocomprobante = '
191 191
                 . $dataBase->var2str($tipocomprobante)
192
-                . ' AND estado = ' . $dataBase->var2str(true)
192
+                . ' AND estado = '.$dataBase->var2str(true)
193 193
                 . ';';
194 194
         $data = $dataBase->select($sql);
195 195
         return new NCFRango($data[0]);
Please login to merge, or discard this patch.
Model/NCFTipo.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -147,17 +147,17 @@  discard block
 block discarded – undo
147 147
         parent::install();
148 148
         $sql = "INSERT INTO rd_ncftipo (".
149 149
             "tipocomprobante, descripcion, estado, clasemovimiento, ventas, compras, contribuyente".
150
-            " ) VALUES " .
151
-            "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y')," .
152
-            "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y')," .
153
-            "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N')," .
154
-            "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N')," .
155
-            "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y')," .
156
-            "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N')," .
157
-            "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N')," .
158
-            "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y')," .
159
-            "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y')," .
160
-            "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y')," .
150
+            " ) VALUES ".
151
+            "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y'),".
152
+            "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y'),".
153
+            "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N'),".
154
+            "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N'),".
155
+            "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y'),".
156
+            "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N'),".
157
+            "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N'),".
158
+            "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y'),".
159
+            "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y'),".
160
+            "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y'),".
161 161
             "('17','COMPROBANTE PARA PAGOS AL EXTERIOR',true, 'suma','N', 'Y','Y');";
162 162
         return($sql);
163 163
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function restoreData()
166 166
     {
167 167
         $dataBase = new DataBase();
168
-        $sqlClean = "DELETE FROM " . $this->tableName() . ";";
168
+        $sqlClean = "DELETE FROM ".$this->tableName().";";
169 169
         $dataBase->exec($sqlClean);
170 170
         foreach ($this->arrayComprobantes as $arrayItem) {
171 171
             $initialData = new NCFTipo($arrayItem);
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
 
177 177
     public function allFor($type = "ventas", $movimiento = "suma")
178 178
     {
179
-        $where = [new DataBaseWhere($type, 'Y'),new DataBaseWhere('clasemovimiento', $movimiento)];
179
+        $where = [new DataBaseWhere($type, 'Y'), new DataBaseWhere('clasemovimiento', $movimiento)];
180 180
         return $this->all($where, ['tipocomprobante' => 'ASC'], 0, 50);
181 181
     }
182 182
 
183 183
     public function tipoCliente($codcliente) {
184
-        $where = [new DatabaseWhere( 'codcliente', $_REQUEST['codcliente'])];
184
+        $where = [new DatabaseWhere('codcliente', $_REQUEST['codcliente'])];
185 185
         $clientes = new Cliente();
186 186
         $cliente = $clientes->get($codcliente);
187 187
         return ['tipocomprobante' => $cliente->tipocomprobante, 'ncftipopago' => $cliente->ncftipopago];
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
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     
65 65
     public function saveInsert()
66 66
     {
67
-        return function () {
67
+        return function() {
68 68
             $ncfrango = new NCFRango();
69 69
             $cliente = new Cliente();
70 70
             $appSettins = new AppSettings;
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
     public function all()
86 86
     {
87 87
         //parent::all();
88
-        return function () {
88
+        return function() {
89 89
             $this->facturarectnumero2 = '';
90 90
             if ($this->idfacturarect !== '') {
91 91
                 $facturaRectificativa = $this->get($this->idfacturarect);
92
-                $this->loadFromData(['facturarectnumero2' => 'SI' ]);
92
+                $this->loadFromData(['facturarectnumero2' => 'SI']);
93 93
                 $this->facturarectnumero2 = 'SI';
94 94
             } else {
95 95
                 $this->loadFromData(['facturarectnumero2' => 'NO HAY']);
Please login to merge, or discard this patch.
Controller/ListNCFTipo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
                 break;
75 75
             case 'busca_tipo':
76 76
                 $this->setTemplate(false);
77
-                $where = [new DatabaseWhere( $_REQUEST['tipodocumento'], 'Y')];
77
+                $where = [new DatabaseWhere($_REQUEST['tipodocumento'], 'Y')];
78 78
                 $tipocomprobantes = $this->views['ListNCFTipo']->model->all($where);
79 79
                 if ($tipocomprobantes) {
80 80
                     echo json_encode(['tipocomprobantes' => $tipocomprobantes], JSON_THROW_ON_ERROR);
Please login to merge, or discard this patch.