Passed
Push — master ( ae433a...e40575 )
by Joe Nilson
02:04
created
Controller/ListNCFTipoMovimiento.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@
 block discarded – undo
67 67
             'sales',
68 68
             'fas fa-store'
69 69
         );
70
-        $this->addSearchFields('ListNCFTipoMovimiento-1', ['tipomovimiento','codigo','descripcion']);
70
+        $this->addSearchFields('ListNCFTipoMovimiento-1', ['tipomovimiento', 'codigo', 'descripcion']);
71 71
         $this->addOrderBy('ListNCFTipoMovimiento-1', ['id'], 'code');
72 72
         $this->addOrderBy('ListNCFTipoMovimiento-1', ['descripcion'], 'description');
73 73
         $this->addRestoreButton('ListNCFTipoMovimiento-1');
74 74
         
75 75
         $this->addView('ListNCFTipoMovimiento-2', 'NCFTipoMovimiento', 'purchases', 'fas fa-credit-card');
76
-        $this->addSearchFields('ListNCFTipoMovimiento-2', ['tipomovimiento','codigo','descripcion']);
76
+        $this->addSearchFields('ListNCFTipoMovimiento-2', ['tipomovimiento', 'codigo', 'descripcion']);
77 77
         $this->addOrderBy('ListNCFTipoMovimiento-2', ['id'], 'code');
78 78
         $this->addOrderBy('ListNCFTipoMovimiento-2', ['descripcion'], 'description');
79 79
         $this->addRestoreButton('ListNCFTipoMovimiento-2');
Please login to merge, or discard this patch.
Extension/Controller/EditFacturaCliente.php 1 patch
Spacing   +3 added lines, -3 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 () {
31
+        return function() {
32 32
             parent::createViews();
33
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
34
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
33
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
34
+            AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
35 35
             $ncfTipoPago = new NCFTipoPago();
36 36
             $ncfTiposPago = $ncfTipoPago->findAllByTipopago('01');
37 37
             $customValuesNTP = [];
Please login to merge, or discard this patch.
Extension/Controller/EditCliente.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function createViews()
28 28
     {
29
-        return function () {
29
+        return function() {
30 30
             $ncfTipo = new NCFTipo();
31 31
             $ncfTipos = $ncfTipo->allFor('ventas', 'suma');
32 32
             $customValues = [];
Please login to merge, or discard this patch.
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.
Model/FiscalReports.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@
 block discarded – undo
63 63
 
64 64
     protected function getSQLFrom(): string
65 65
     {
66
-        return static::MAIN_TABLE . ''
67
-            . ' LEFT JOIN '. static::CLIENTES_TABLE . ' ON '
68
-            . static::MAIN_TABLE . '.codcliente = ' . static::CLIENTES_TABLE . '.codcliente'
69
-            . ' LEFT JOIN '. static::NCFTIPO_TABLE . ' ON '
70
-            . static::MAIN_TABLE . '.tipocomprobante = ' . static::NCFTIPO_TABLE . '.tipocomprobante'
71
-            . ' LEFT JOIN ' . static::NCFTIPOPAGO_TABLE . ' ON '
72
-            . static::MAIN_TABLE . '.ncftipopago = ' . static::NCFTIPOPAGO_TABLE . '.tipopago';
66
+        return static::MAIN_TABLE.''
67
+            . ' LEFT JOIN '.static::CLIENTES_TABLE.' ON '
68
+            . static::MAIN_TABLE.'.codcliente = '.static::CLIENTES_TABLE.'.codcliente'
69
+            . ' LEFT JOIN '.static::NCFTIPO_TABLE.' ON '
70
+            . static::MAIN_TABLE.'.tipocomprobante = '.static::NCFTIPO_TABLE.'.tipocomprobante'
71
+            . ' LEFT JOIN '.static::NCFTIPOPAGO_TABLE.' ON '
72
+            . static::MAIN_TABLE.'.ncftipopago = '.static::NCFTIPOPAGO_TABLE.'.tipopago';
73 73
     }
74 74
 }
75 75
\ No newline at end of file
Please login to merge, or discard this patch.
Extension/Model/Cliente.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,18 +16,18 @@
 block discarded – undo
16 16
  * along with fsRepublicaDominicana. If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19
- namespace FacturaScripts\Plugins\fsRepublicaDominicana\Extension\Model;
19
+    namespace FacturaScripts\Plugins\fsRepublicaDominicana\Extension\Model;
20 20
 
21
- class Cliente 
22
- {
21
+    class Cliente 
22
+    {
23 23
     /**
24 24
      * Payment type based on DGII table
25 25
      * @var string
26 26
      */
27 27
     public $ncftipopago;
28
-     /**
29
-      * Type of NCF to generate to the customer
30
-      * @var string
31
-      */
32
-     public $tipocomprobante;
33
- }
28
+        /**
29
+         * Type of NCF to generate to the customer
30
+         * @var string
31
+         */
32
+        public $tipocomprobante;
33
+    }
Please login to merge, or discard this patch.