Passed
Push — master ( f22301...8e49de )
by Joe Nilson
01:58
created
Model/NCFTipo.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -74,17 +74,17 @@  discard block
 block discarded – undo
74 74
      * @var array
75 75
      */
76 76
     public $arrayComprobantes = array(
77
-        array ('tipocomprobante' => '01', 'descripcion' => 'FACTURA DE CREDITO FISCAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
78
-        array ('tipocomprobante' => '02', 'descripcion' => 'FACTURA DE CONSUMO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
79
-        array ('tipocomprobante' => '03', 'descripcion' => 'NOTA DE DEBITO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N', 'estado' => TRUE),
80
-        array ('tipocomprobante' => '04', 'descripcion' => 'NOTA DE CREDITO', 'clasemovimiento'=>'resta', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N', 'estado' => TRUE),
81
-        array ('tipocomprobante' => '11', 'descripcion' => 'COMPROBANTE DE COMPRAS', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
82
-        array ('tipocomprobante' => '12', 'descripcion' => 'REGISTRO UNICO DE INGRESOS', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'N', 'estado' => TRUE),
83
-        array ('tipocomprobante' => '13', 'descripcion' => 'COMPROBANTE PARA GASTOS MENORES', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'N', 'estado' => TRUE),
84
-        array ('tipocomprobante' => '14', 'descripcion' => 'COMPROBANTE DE REGIMENES ESPECIALES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
85
-        array ('tipocomprobante' => '15', 'descripcion' => 'COMPROBANTE GUBERNAMENTAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
86
-        array ('tipocomprobante' => '16', 'descripcion' => 'COMPROBANTE PARA EXPORTACIONES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'Y', 'estado' => TRUE),
87
-        array ('tipocomprobante' => '17', 'descripcion' => 'COMPROBANTE PARA PAGOS AL EXTERIOR', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
77
+        array('tipocomprobante' => '01', 'descripcion' => 'FACTURA DE CREDITO FISCAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
78
+        array('tipocomprobante' => '02', 'descripcion' => 'FACTURA DE CONSUMO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
79
+        array('tipocomprobante' => '03', 'descripcion' => 'NOTA DE DEBITO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N', 'estado' => TRUE),
80
+        array('tipocomprobante' => '04', 'descripcion' => 'NOTA DE CREDITO', 'clasemovimiento'=>'resta', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N', 'estado' => TRUE),
81
+        array('tipocomprobante' => '11', 'descripcion' => 'COMPROBANTE DE COMPRAS', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
82
+        array('tipocomprobante' => '12', 'descripcion' => 'REGISTRO UNICO DE INGRESOS', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'N', 'estado' => TRUE),
83
+        array('tipocomprobante' => '13', 'descripcion' => 'COMPROBANTE PARA GASTOS MENORES', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'N', 'estado' => TRUE),
84
+        array('tipocomprobante' => '14', 'descripcion' => 'COMPROBANTE DE REGIMENES ESPECIALES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
85
+        array('tipocomprobante' => '15', 'descripcion' => 'COMPROBANTE GUBERNAMENTAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
86
+        array('tipocomprobante' => '16', 'descripcion' => 'COMPROBANTE PARA EXPORTACIONES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'Y', 'estado' => TRUE),
87
+        array('tipocomprobante' => '17', 'descripcion' => 'COMPROBANTE PARA PAGOS AL EXTERIOR', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y', 'estado' => TRUE),
88 88
     );
89 89
     
90 90
     /**
@@ -112,17 +112,17 @@  discard block
 block discarded – undo
112 112
     public function install() 
113 113
     {
114 114
         parent::install();
115
-        $sql = "INSERT INTO rd_ncftipo (tipocomprobante, descripcion, estado, clasemovimiento, ventas, compras, contribuyente ) VALUES " .
116
-            "('01','FACTURA DE CREDITO FISCAL',TRUE, 'suma','Y','Y','Y')," .
117
-            "('02','FACTURA DE CONSUMO',TRUE, 'suma','Y','Y','Y')," .
118
-            "('03','NOTA DE DEBITO',TRUE, 'suma','Y','Y','N')," . 
119
-            "('04','NOTA DE CREDITO',TRUE, 'resta','Y','Y','N')," .
120
-            "('11','COMPROBANTE DE COMPRAS',TRUE, 'suma','N','Y','Y')," .
121
-            "('12','REGISTRO UNICO DE INGRESOS',TRUE, 'suma','Y','N','N')," .
122
-            "('13','COMPROBANTE PARA GASTOS MENORES',TRUE, 'suma','N','Y','N')," .
123
-            "('14','COMPROBANTE DE REGIMENES ESPECIALES',TRUE, 'suma','Y','Y','Y')," .
124
-            "('15','COMPROBANTE GUBERNAMENTAL',TRUE, 'suma','Y','Y','Y')," .
125
-            "('16','COMPROBANTE PARA EXPORTACIONES',TRUE, 'suma','Y','N','Y')," .
115
+        $sql = "INSERT INTO rd_ncftipo (tipocomprobante, descripcion, estado, clasemovimiento, ventas, compras, contribuyente ) VALUES ".
116
+            "('01','FACTURA DE CREDITO FISCAL',TRUE, 'suma','Y','Y','Y'),".
117
+            "('02','FACTURA DE CONSUMO',TRUE, 'suma','Y','Y','Y'),".
118
+            "('03','NOTA DE DEBITO',TRUE, 'suma','Y','Y','N'),". 
119
+            "('04','NOTA DE CREDITO',TRUE, 'resta','Y','Y','N'),".
120
+            "('11','COMPROBANTE DE COMPRAS',TRUE, 'suma','N','Y','Y'),".
121
+            "('12','REGISTRO UNICO DE INGRESOS',TRUE, 'suma','Y','N','N'),".
122
+            "('13','COMPROBANTE PARA GASTOS MENORES',TRUE, 'suma','N','Y','N'),".
123
+            "('14','COMPROBANTE DE REGIMENES ESPECIALES',TRUE, 'suma','Y','Y','Y'),".
124
+            "('15','COMPROBANTE GUBERNAMENTAL',TRUE, 'suma','Y','Y','Y'),".
125
+            "('16','COMPROBANTE PARA EXPORTACIONES',TRUE, 'suma','Y','N','Y'),".
126 126
             "('17','COMPROBANTE PARA PAGOS AL EXTERIOR',TRUE, 'suma','N', 'Y','Y');";
127 127
         return($sql);
128 128
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function restoreData()
131 131
     {
132 132
         $dataBase = new DataBase();
133
-        $sqlClean = "DELETE FROM " . $this->tableName() . ";";
133
+        $sqlClean = "DELETE FROM ".$this->tableName().";";
134 134
         $dataBase->exec($sqlClean);
135 135
         foreach ($this->arrayComprobantes as $arrayItem) {
136 136
             $initialData = new NCFTipo($arrayItem);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
     public function allFor($type = "ventas", $movimiento = "suma")
143 143
     {
144
-        $where = [new DataBaseWhere($type, 'Y'),new DataBaseWhere('clasemovimiento', $movimiento)];
144
+        $where = [new DataBaseWhere($type, 'Y'), new DataBaseWhere('clasemovimiento', $movimiento)];
145 145
         return $this->all($where, ['tipocomprobante' => 'ASC'], 0, 50);
146 146
     }
147 147
 }
Please login to merge, or discard this patch.
Controller/ListNCFRango.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $this->addView('ListNCFRango', 'NCFRango');
50 50
         $this->addSearchFields('ListNCFRango', ['tipocomprobante']);
51
-        $this->addOrderBy('ListNCFRango', ['tipocomprobante','correlativo'], 'tipocomprobante');
51
+        $this->addOrderBy('ListNCFRango', ['tipocomprobante', 'correlativo'], 'tipocomprobante');
52 52
         
53 53
         $this->setSettings('ListNCFRango', 'modalInsert', 'ncf-rango-insert');
54 54
         $this->setCustomWidgetValues('ListNCFRango');
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
                 $valueUsuarioCreacion = $this->request->request->get('usuariocreacion');
80 80
                 $valueFechaCreacion = $this->request->request->get('fechacreacion');
81 81
                 $data = $this->request->request->all();
82
-                $data['serie']=($this->inputExists($valueSerie))?$valueSerie:$data['serie'];
83
-                $data['idempresa']=($this->inputExists($valueIdEmpresa))?$valueIdEmpresa:$this->empresa->idempresa;
84
-                $data['usuariomodificacion']=($this->inputExists($valueFechaCreacion))?$this->user->nick:null;
85
-                $data['usuariocreacion']=($this->inputExists($valueUsuarioCreacion))
86
-                                        ?$valueUsuarioCreacion
82
+                $data['serie'] = ($this->inputExists($valueSerie)) ? $valueSerie : $data['serie'];
83
+                $data['idempresa'] = ($this->inputExists($valueIdEmpresa)) ? $valueIdEmpresa : $this->empresa->idempresa;
84
+                $data['usuariomodificacion'] = ($this->inputExists($valueFechaCreacion)) ? $this->user->nick : null;
85
+                $data['usuariocreacion'] = ($this->inputExists($valueUsuarioCreacion))
86
+                                        ? $valueUsuarioCreacion
87 87
                                         :$this->user->nick;
88
-                $data['fechacreacion']=($this->inputExists($valueFechaCreacion))
89
-                                        ?$valueFechaCreacion
88
+                $data['fechacreacion'] = ($this->inputExists($valueFechaCreacion))
89
+                                        ? $valueFechaCreacion
90 90
                                         :\date('Y-m-d');
91 91
                 $rangoNuevo = new NCFRango();
92 92
                 $rangoNuevo->loadFromData($data);
Please login to merge, or discard this patch.
Controller/ListNCFTipoPago.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,13 +61,13 @@
 block discarded – undo
61 61
     protected function createViews()
62 62
     {
63 63
         $this->addView('ListNCFTipoPago-1', 'NCFTipoPago', 'sales', 'fas fa-store');
64
-        $this->addSearchFields('ListNCFTipoPago-1', ['tipopago','codigo','descripcion']);
64
+        $this->addSearchFields('ListNCFTipoPago-1', ['tipopago', 'codigo', 'descripcion']);
65 65
         $this->addOrderBy('ListNCFTipoPago-1', ['codigo'], 'code');
66 66
         $this->addOrderBy('ListNCFTipoPago-1', ['descripcion'], 'description');
67 67
         $this->addRestoreButton('ListNCFTipoPago-1');
68 68
         
69 69
         $this->addView('ListNCFTipoPago-2', 'NCFTipoPago', 'purchases', 'fas fa-credit-card');
70
-        $this->addSearchFields('ListNCFTipoPago-2', ['tipopago','codigo','descripcion']);
70
+        $this->addSearchFields('ListNCFTipoPago-2', ['tipopago', 'codigo', 'descripcion']);
71 71
         $this->addOrderBy('ListNCFTipoPago-2', ['codigo'], 'code');
72 72
         $this->addOrderBy('ListNCFTipoPago-2', ['descripcion'], 'description');
73 73
         $this->addRestoreButton('ListNCFTipoPago-2');
Please login to merge, or discard this patch.
Controller/EditFacturaCliente.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $lines = [];
103 103
         $quantities = [];
104 104
         foreach ($invoice->getLines() as $line) {
105
-            $quantity = (float) $this->request->request->get('refund_' . $line->primaryColumnValue(), '0');
105
+            $quantity = (float) $this->request->request->get('refund_'.$line->primaryColumnValue(), '0');
106 106
             if (empty($quantity)) {
107 107
                 continue;
108 108
             }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         if ($generator->generate($invoice, $invoice->modelClassName(), $lines, $quantities, $properties)) {
130 130
             foreach ($generator->getLastDocs() as $doc) {
131 131
                 $this->toolBox()->i18nLog()->notice('record-updated-correctly');
132
-                $this->redirect($doc->url() . '&action=save-ok');
132
+                $this->redirect($doc->url().'&action=save-ok');
133 133
                 return true;
134 134
             }
135 135
         }
Please login to merge, or discard this patch.
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.