Passed
Push — master ( 1582ee...f22301 )
by Joe Nilson
01:53
created
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 = array(
64
-        array ('tipomovimiento'=>'COM','codigo' => '01', 'descripcion' => 'GASTOS DE PERSONAL', 'estado' => true),
65
-        array ('tipomovimiento'=>'COM','codigo' => '02', 'descripcion' => 'GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS', 'estado' => true),
66
-        array ('tipomovimiento'=>'COM','codigo' => '03', 'descripcion' => 'ARRENDAMIENTOS', 'estado' => true),
67
-        array ('tipomovimiento'=>'COM','codigo' => '04', 'descripcion' => 'GASTOS DE ACTIVOS FIJOS', 'estado' => true),
68
-        array ('tipomovimiento'=>'COM','codigo' => '05', 'descripcion' => 'GASTOS DE REPRESENTACIÓN', 'estado' => true),
69
-        array ('tipomovimiento'=>'COM','codigo' => '06', 'descripcion' => 'OTRAS DEDUCCIONES ADMITIDAS', 'estado' => true),
70
-        array ('tipomovimiento'=>'COM','codigo' => '07', 'descripcion' => 'GASTOS FINANCIEROS', 'estado' => true),
71
-        array ('tipomovimiento'=>'COM','codigo' => '08', 'descripcion' => 'GASTOS EXTRAORDINARIOS', 'estado' => true),
72
-        array ('tipomovimiento'=>'COM','codigo' => '09', 'descripcion' => 'COMPRAS Y GASTOS QUE FORMARÁN PARTE DEL COSTO DE VENTA', 'estado' => true),
73
-        array ('tipomovimiento'=>'COM','codigo' => '10', 'descripcion' => 'ADQUISICIONES DE ACTIVOS', 'estado' => true),
74
-        array ('tipomovimiento'=>'COM','codigo' => '11', 'descripcion' => 'GASTOS DE SEGUROS', 'estado' => true),
75
-        array ('tipomovimiento'=>'VEN','codigo' => '1', 'descripcion' => 'Ingresos por operaciones (No financieros)', 'estado' => true),
76
-        array ('tipomovimiento'=>'VEN','codigo' => '2', 'descripcion' => 'Ingresos Financieros', 'estado' => true),
77
-        array ('tipomovimiento'=>'VEN','codigo' => '3', 'descripcion' => 'Ingresos Extraordinarios', 'estado' => true),
78
-        array ('tipomovimiento'=>'VEN','codigo' => '4', 'descripcion' => 'Ingresos por Arrendamientos', 'estado' => true),
79
-        array ('tipomovimiento'=>'VEN','codigo' => '5', 'descripcion' => 'Ingresos por Venta de Activo Depreciable', 'estado' => true),
80
-        array ('tipomovimiento'=>'VEN','codigo' => '6', 'descripcion' => 'Otros Ingresos', 'estado' => true)
64
+        array('tipomovimiento'=>'COM', 'codigo' => '01', 'descripcion' => 'GASTOS DE PERSONAL', 'estado' => true),
65
+        array('tipomovimiento'=>'COM', 'codigo' => '02', 'descripcion' => 'GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS', 'estado' => true),
66
+        array('tipomovimiento'=>'COM', 'codigo' => '03', 'descripcion' => 'ARRENDAMIENTOS', 'estado' => true),
67
+        array('tipomovimiento'=>'COM', 'codigo' => '04', 'descripcion' => 'GASTOS DE ACTIVOS FIJOS', 'estado' => true),
68
+        array('tipomovimiento'=>'COM', 'codigo' => '05', 'descripcion' => 'GASTOS DE REPRESENTACIÓN', 'estado' => true),
69
+        array('tipomovimiento'=>'COM', 'codigo' => '06', 'descripcion' => 'OTRAS DEDUCCIONES ADMITIDAS', 'estado' => true),
70
+        array('tipomovimiento'=>'COM', 'codigo' => '07', 'descripcion' => 'GASTOS FINANCIEROS', 'estado' => true),
71
+        array('tipomovimiento'=>'COM', 'codigo' => '08', 'descripcion' => 'GASTOS EXTRAORDINARIOS', 'estado' => true),
72
+        array('tipomovimiento'=>'COM', 'codigo' => '09', 'descripcion' => 'COMPRAS Y GASTOS QUE FORMARÁN PARTE DEL COSTO DE VENTA', 'estado' => true),
73
+        array('tipomovimiento'=>'COM', 'codigo' => '10', 'descripcion' => 'ADQUISICIONES DE ACTIVOS', 'estado' => true),
74
+        array('tipomovimiento'=>'COM', 'codigo' => '11', 'descripcion' => 'GASTOS DE SEGUROS', 'estado' => true),
75
+        array('tipomovimiento'=>'VEN', 'codigo' => '1', 'descripcion' => 'Ingresos por operaciones (No financieros)', 'estado' => true),
76
+        array('tipomovimiento'=>'VEN', 'codigo' => '2', 'descripcion' => 'Ingresos Financieros', 'estado' => true),
77
+        array('tipomovimiento'=>'VEN', 'codigo' => '3', 'descripcion' => 'Ingresos Extraordinarios', 'estado' => true),
78
+        array('tipomovimiento'=>'VEN', 'codigo' => '4', 'descripcion' => 'Ingresos por Arrendamientos', 'estado' => true),
79
+        array('tipomovimiento'=>'VEN', 'codigo' => '5', 'descripcion' => 'Ingresos por Venta de Activo Depreciable', 'estado' => true),
80
+        array('tipomovimiento'=>'VEN', 'codigo' => '6', 'descripcion' => 'Otros Ingresos', 'estado' => true)
81 81
     );
82 82
     
83 83
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function install() 
106 106
     {
107 107
         parent::install();
108
-        return "INSERT INTO rd_ncftipomovimiento (tipomovimiento, codigo, descripcion, estado) VALUES " .
108
+        return "INSERT INTO rd_ncftipomovimiento (tipomovimiento, codigo, descripcion, estado) VALUES ".
109 109
             "('COM','01','GASTOS DE PERSONAL',true), ".
110 110
             "('COM','02','GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS',true), ".
111 111
             "('COM','03','ARRENDAMIENTOS',true), ".
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function restoreData()
129 129
     {
130 130
         $dataBase = new DataBase();
131
-        $sqlClean = "DELETE FROM " . $this->tableName() . ";";
131
+        $sqlClean = "DELETE FROM ".$this->tableName().";";
132 132
         $dataBase->exec($sqlClean);
133 133
         foreach ($this->arrayTiposMovimiento as $arrayItem) {
134 134
             $initialData = new NCFTipoMovimiento($arrayItem);
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
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
     public function createViews(): \Closure
30 30
     {
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
             $ncfTipoPago = new NCFTipoPago();
37 37
             $ncfTiposPago = $ncfTipoPago->findAllByTipopago('01');
38 38
             $customValuesNTP = [];
Please login to merge, or discard this patch.
Extension/Controller/EditFacturaProveedor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
 {
28 28
     public function createViews(): \Closure
29 29
     {
30
-        return function () {
30
+        return function() {
31 31
             parent::createViews();
32
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js');
33
-            AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
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 34
             $ncfTipoPago = new NCFTipoPago();
35 35
             $ncfTiposPago = $ncfTipoPago->findAllByTipopago('02');
36 36
             $customValuesNTP = [];
Please login to merge, or discard this patch.
Extension/Model/FacturaProveedor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function saveInsert()
53 53
     {
54
-        return function () {
55
-            $ArrayTipoNCFCompras = ['11','12','16','17'];
54
+        return function() {
55
+            $ArrayTipoNCFCompras = ['11', '12', '16', '17'];
56 56
             $ncfrango = new NCFRango();
57 57
             $cliente = new Proveedor();
58 58
             $appSettings = new AppSettings;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $codsubtipodoc = $this->codsubtipodoc;
62 62
             $ncfRangoToUse = $ncfrango->getByTipoComprobante($actualProveedor->idempresa, $codsubtipodoc);
63 63
 
64
-            if(in_array($codsubtipodoc, $ArrayTipoNCFCompras, true)) {
64
+            if (in_array($codsubtipodoc, $ArrayTipoNCFCompras, true)) {
65 65
                 $ncf = $ncfRangoToUse->generateNCF();
66 66
                 $this->numproveedor = $ncf;
67 67
                 $this->ncffechavencimiento = $ncfRangoToUse->fechavencimiento;
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
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $this->loadExtension(new Extension\Controller\EditCliente());
40 40
         $this->loadExtension(new Extension\Controller\EditFacturaCliente());
41 41
         $this->loadExtension(new Extension\Controller\EditFacturaProveedor());
42
-        AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
42
+        AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
43 43
     }
44 44
     
45 45
     public function update()
Please login to merge, or discard this patch.
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.