Passed
Push — master ( 8a423f...9c95d4 )
by Joe Nilson
01:52
created
Model/NCFTipoPago.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
      * @var array
61 61
      */
62 62
     public $arrayTipos = array(
63
-        array ('tipopago'=>'01','codigo' => '17', 'descripcion' => 'EFECTIVO','estado'=>true),
64
-        array ('tipopago'=>'01','codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true),
65
-        array ('tipopago'=>'01','codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true),
66
-        array ('tipopago'=>'01','codigo' => '20', 'descripcion' => 'VENTA A CREDITO','estado'=>true),
67
-        array ('tipopago'=>'01','codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO','estado'=>true),
68
-        array ('tipopago'=>'01','codigo' => '22', 'descripcion' => 'PERMUTA','estado'=>true),
69
-        array ('tipopago'=>'01','codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS','estado'=>true),
70
-        array ('tipopago'=>'02','codigo' => '01', 'descripcion' => 'EFECTIVO','estado'=>true),
71
-        array ('tipopago'=>'02','codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true),
72
-        array ('tipopago'=>'02','codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true),
73
-        array ('tipopago'=>'02','codigo' => '04', 'descripcion' => 'COMPRA A CREDITO','estado'=>true),
74
-        array ('tipopago'=>'02','codigo' => '05', 'descripcion' => 'PERMUTA','estado'=>true),
75
-        array ('tipopago'=>'02','codigo' => '06', 'descripcion' => 'NOTA DE CREDITO','estado'=>true),
76
-        array ('tipopago'=>'02','codigo' => '07', 'descripcion' => 'MIXTO','estado'=>true)
63
+        array('tipopago'=>'01', 'codigo' => '17', 'descripcion' => 'EFECTIVO', 'estado'=>true),
64
+        array('tipopago'=>'01', 'codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true),
65
+        array('tipopago'=>'01', 'codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true),
66
+        array('tipopago'=>'01', 'codigo' => '20', 'descripcion' => 'VENTA A CREDITO', 'estado'=>true),
67
+        array('tipopago'=>'01', 'codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO', 'estado'=>true),
68
+        array('tipopago'=>'01', 'codigo' => '22', 'descripcion' => 'PERMUTA', 'estado'=>true),
69
+        array('tipopago'=>'01', 'codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS', 'estado'=>true),
70
+        array('tipopago'=>'02', 'codigo' => '01', 'descripcion' => 'EFECTIVO', 'estado'=>true),
71
+        array('tipopago'=>'02', 'codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true),
72
+        array('tipopago'=>'02', 'codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true),
73
+        array('tipopago'=>'02', 'codigo' => '04', 'descripcion' => 'COMPRA A CREDITO', 'estado'=>true),
74
+        array('tipopago'=>'02', 'codigo' => '05', 'descripcion' => 'PERMUTA', 'estado'=>true),
75
+        array('tipopago'=>'02', 'codigo' => '06', 'descripcion' => 'NOTA DE CREDITO', 'estado'=>true),
76
+        array('tipopago'=>'02', 'codigo' => '07', 'descripcion' => 'MIXTO', 'estado'=>true)
77 77
     );
78 78
     
79 79
     /**
@@ -101,27 +101,27 @@  discard block
 block discarded – undo
101 101
     public function install() 
102 102
     {
103 103
         parent::install();
104
-        return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES " .
105
-            "('01','17','EFECTIVO',true), " .
106
-            "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " .
107
-            "('01','19','TARJETA CRÉDITO/DÉBITO',true), " .
108
-            "('01','20','VENTA A CRÉDITO',true), " .
109
-            "('01','21','BONOS O CERTIFICADOS DE REGALO',true), " .
110
-            "('01','22','PERMUTA',true), " .
111
-            "('01','23','OTRAS FORMAS DE VENTAS',true), " .
112
-            "('02','01','EFECTIVO',true), " .
113
-            "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " .
114
-            "('02','03','TARJETA CRÉDITO/DÉBITO',true), " .
115
-            "('02','04','COMPRA A CREDITO',true), " .
116
-            "('02','05','PERMUTA',true), " .
117
-            "('02','06','NOTA DE CREDITO',true), " .
104
+        return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES ".
105
+            "('01','17','EFECTIVO',true), ".
106
+            "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ".
107
+            "('01','19','TARJETA CRÉDITO/DÉBITO',true), ".
108
+            "('01','20','VENTA A CRÉDITO',true), ".
109
+            "('01','21','BONOS O CERTIFICADOS DE REGALO',true), ".
110
+            "('01','22','PERMUTA',true), ".
111
+            "('01','23','OTRAS FORMAS DE VENTAS',true), ".
112
+            "('02','01','EFECTIVO',true), ".
113
+            "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ".
114
+            "('02','03','TARJETA CRÉDITO/DÉBITO',true), ".
115
+            "('02','04','COMPRA A CREDITO',true), ".
116
+            "('02','05','PERMUTA',true), ".
117
+            "('02','06','NOTA DE CREDITO',true), ".
118 118
             "('02','07','MIXTO',true);";
119 119
     }
120 120
     
121 121
     public function restoreData()
122 122
     {
123 123
         $dataBase = new DataBase();
124
-        $sqlClean = "DELETE FROM " . $this->tableName() . ";";
124
+        $sqlClean = "DELETE FROM ".$this->tableName().";";
125 125
         $dataBase->exec($sqlClean);
126 126
         foreach ($this->arrayTipos as $arrayItem) {
127 127
             $initialData = new NCFTipoPago($arrayItem);
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'),
78
-        array ('tipocomprobante' => '02', 'descripcion' => 'FACTURA DE CONSUMO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'Y'),
79
-        array ('tipocomprobante' => '03', 'descripcion' => 'NOTA DE DEBITO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N'),
80
-        array ('tipocomprobante' => '04', 'descripcion' => 'NOTA DE CREDITO', 'clasemovimiento'=>'resta', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N'),
81
-        array ('tipocomprobante' => '11', 'descripcion' => 'COMPROBANTE DE COMPRAS', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y'),
82
-        array ('tipocomprobante' => '12', 'descripcion' => 'REGISTRO UNICO DE INGRESOS', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'N'),
83
-        array ('tipocomprobante' => '13', 'descripcion' => 'COMPROBANTE PARA GASTOS MENORES', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'N'),
84
-        array ('tipocomprobante' => '14', 'descripcion' => 'COMPROBANTE DE REGIMENES ESPECIALES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
85
-        array ('tipocomprobante' => '15', 'descripcion' => 'COMPROBANTE GUBERNAMENTAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
86
-        array ('tipocomprobante' => '16', 'descripcion' => 'COMPROBANTE PARA EXPORTACIONES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
87
-        array ('tipocomprobante' => '17', 'descripcion' => 'COMPROBANTE PARA PAGOS AL EXTERIOR', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y'),
77
+        array('tipocomprobante' => '01', 'descripcion' => 'FACTURA DE CREDITO FISCAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
78
+        array('tipocomprobante' => '02', 'descripcion' => 'FACTURA DE CONSUMO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'Y'),
79
+        array('tipocomprobante' => '03', 'descripcion' => 'NOTA DE DEBITO', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N'),
80
+        array('tipocomprobante' => '04', 'descripcion' => 'NOTA DE CREDITO', 'clasemovimiento'=>'resta', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'N'),
81
+        array('tipocomprobante' => '11', 'descripcion' => 'COMPROBANTE DE COMPRAS', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y'),
82
+        array('tipocomprobante' => '12', 'descripcion' => 'REGISTRO UNICO DE INGRESOS', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'N', 'contribuyente'=>'N'),
83
+        array('tipocomprobante' => '13', 'descripcion' => 'COMPROBANTE PARA GASTOS MENORES', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'N'),
84
+        array('tipocomprobante' => '14', 'descripcion' => 'COMPROBANTE DE REGIMENES ESPECIALES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
85
+        array('tipocomprobante' => '15', 'descripcion' => 'COMPROBANTE GUBERNAMENTAL', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
86
+        array('tipocomprobante' => '16', 'descripcion' => 'COMPROBANTE PARA EXPORTACIONES', 'clasemovimiento'=>'suma', 'ventas'=>'Y', 'compras'=>'Y', 'contribuyente'=>'Y'),
87
+        array('tipocomprobante' => '17', 'descripcion' => 'COMPROBANTE PARA PAGOS AL EXTERIOR', 'clasemovimiento'=>'suma', 'ventas'=>'N', 'compras'=>'Y', 'contribuyente'=>'Y'),
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','N','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','Y','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','N','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','Y','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.