@@ -77,13 +77,13 @@ |
||
77 | 77 | parent::install(); |
78 | 78 | return "INSERT INTO rd_ncftipoanulacion (codigo, descripcion, estado) VALUES " . |
79 | 79 | "('01','Deterioro de Factura Pre-Imprensa',true), " . |
80 | - "('02','Errores de Impresión (Factura Pre-Impresa)',true), " . |
|
81 | - "('03','Impresión defectuosa',true), " . |
|
82 | - "('04','Duplicidad de Factura',true), " . |
|
83 | - "('05','Corrección de la Información',true), " . |
|
84 | - "('06','Cambio de Productos',true), " . |
|
85 | - "('07','Devolución de Productos',true), " . |
|
86 | - "('08','Omisión de Productos',true);"; |
|
80 | + "('02','Errores de Impresión (Factura Pre-Impresa)',true), " . |
|
81 | + "('03','Impresión defectuosa',true), " . |
|
82 | + "('04','Duplicidad de Factura',true), " . |
|
83 | + "('05','Corrección de la Información',true), " . |
|
84 | + "('06','Cambio de Productos',true), " . |
|
85 | + "('07','Devolución de Productos',true), " . |
|
86 | + "('08','Omisión de Productos',true);"; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | public function restoreData() |
@@ -75,21 +75,21 @@ |
||
75 | 75 | public function install() |
76 | 76 | { |
77 | 77 | parent::install(); |
78 | - return "INSERT INTO rd_ncftipoanulacion (codigo, descripcion, estado) VALUES " . |
|
79 | - "('01','Deterioro de Factura Pre-Imprensa',true), " . |
|
80 | - "('02','Errores de Impresión (Factura Pre-Impresa)',true), " . |
|
81 | - "('03','Impresión defectuosa',true), " . |
|
82 | - "('04','Duplicidad de Factura',true), " . |
|
83 | - "('05','Corrección de la Información',true), " . |
|
84 | - "('06','Cambio de Productos',true), " . |
|
85 | - "('07','Devolución de Productos',true), " . |
|
78 | + return "INSERT INTO rd_ncftipoanulacion (codigo, descripcion, estado) VALUES ". |
|
79 | + "('01','Deterioro de Factura Pre-Imprensa',true), ". |
|
80 | + "('02','Errores de Impresión (Factura Pre-Impresa)',true), ". |
|
81 | + "('03','Impresión defectuosa',true), ". |
|
82 | + "('04','Duplicidad de Factura',true), ". |
|
83 | + "('05','Corrección de la Información',true), ". |
|
84 | + "('06','Cambio de Productos',true), ". |
|
85 | + "('07','Devolución de Productos',true), ". |
|
86 | 86 | "('08','Omisión de Productos',true);"; |
87 | 87 | } |
88 | 88 | |
89 | 89 | public function restoreData() |
90 | 90 | { |
91 | 91 | $dataBase = new DataBase(); |
92 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
92 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
93 | 93 | $dataBase->exec($sqlClean); |
94 | 94 | foreach ($this->arrayTipoAnulacion as $arrayItem) { |
95 | 95 | $initialData = new NCFTipoAnulacion($arrayItem); |
@@ -61,20 +61,20 @@ discard block |
||
61 | 61 | * @var array |
62 | 62 | */ |
63 | 63 | public $arrayTipos = array( |
64 | - array ('tipopago'=>'01','codigo' => '17', 'descripcion' => 'EFECTIVO','estado'=>true), |
|
65 | - array ('tipopago'=>'01','codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true), |
|
66 | - array ('tipopago'=>'01','codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true), |
|
67 | - array ('tipopago'=>'01','codigo' => '20', 'descripcion' => 'VENTA A CREDITO','estado'=>true), |
|
68 | - array ('tipopago'=>'01','codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO','estado'=>true), |
|
69 | - array ('tipopago'=>'01','codigo' => '22', 'descripcion' => 'PERMUTA','estado'=>true), |
|
70 | - array ('tipopago'=>'01','codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS','estado'=>true), |
|
71 | - array ('tipopago'=>'02','codigo' => '01', 'descripcion' => 'EFECTIVO','estado'=>true), |
|
72 | - array ('tipopago'=>'02','codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true), |
|
73 | - array ('tipopago'=>'02','codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true), |
|
74 | - array ('tipopago'=>'02','codigo' => '04', 'descripcion' => 'COMPRA A CREDITO','estado'=>true), |
|
75 | - array ('tipopago'=>'02','codigo' => '05', 'descripcion' => 'PERMUTA','estado'=>true), |
|
76 | - array ('tipopago'=>'02','codigo' => '06', 'descripcion' => 'NOTA DE CREDITO','estado'=>true), |
|
77 | - array ('tipopago'=>'02','codigo' => '07', 'descripcion' => 'MIXTO','estado'=>true) |
|
64 | + array('tipopago'=>'01', 'codigo' => '17', 'descripcion' => 'EFECTIVO', 'estado'=>true), |
|
65 | + array('tipopago'=>'01', 'codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true), |
|
66 | + array('tipopago'=>'01', 'codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true), |
|
67 | + array('tipopago'=>'01', 'codigo' => '20', 'descripcion' => 'VENTA A CREDITO', 'estado'=>true), |
|
68 | + array('tipopago'=>'01', 'codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO', 'estado'=>true), |
|
69 | + array('tipopago'=>'01', 'codigo' => '22', 'descripcion' => 'PERMUTA', 'estado'=>true), |
|
70 | + array('tipopago'=>'01', 'codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS', 'estado'=>true), |
|
71 | + array('tipopago'=>'02', 'codigo' => '01', 'descripcion' => 'EFECTIVO', 'estado'=>true), |
|
72 | + array('tipopago'=>'02', 'codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true), |
|
73 | + array('tipopago'=>'02', 'codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true), |
|
74 | + array('tipopago'=>'02', 'codigo' => '04', 'descripcion' => 'COMPRA A CREDITO', 'estado'=>true), |
|
75 | + array('tipopago'=>'02', 'codigo' => '05', 'descripcion' => 'PERMUTA', 'estado'=>true), |
|
76 | + array('tipopago'=>'02', 'codigo' => '06', 'descripcion' => 'NOTA DE CREDITO', 'estado'=>true), |
|
77 | + array('tipopago'=>'02', 'codigo' => '07', 'descripcion' => 'MIXTO', 'estado'=>true) |
|
78 | 78 | ); |
79 | 79 | |
80 | 80 | /** |
@@ -102,27 +102,27 @@ discard block |
||
102 | 102 | public function install() |
103 | 103 | { |
104 | 104 | parent::install(); |
105 | - return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES " . |
|
106 | - "('01','17','EFECTIVO',true), " . |
|
107 | - "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " . |
|
108 | - "('01','19','TARJETA CRÉDITO/DÉBITO',true), " . |
|
109 | - "('01','20','VENTA A CRÉDITO',true), " . |
|
110 | - "('01','21','BONOS O CERTIFICADOS DE REGALO',true), " . |
|
111 | - "('01','22','PERMUTA',true), " . |
|
112 | - "('01','23','OTRAS FORMAS DE VENTAS',true), " . |
|
113 | - "('02','01','EFECTIVO',true), " . |
|
114 | - "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " . |
|
115 | - "('02','03','TARJETA CRÉDITO/DÉBITO',true), " . |
|
116 | - "('02','04','COMPRA A CREDITO',true), " . |
|
117 | - "('02','05','PERMUTA',true), " . |
|
118 | - "('02','06','NOTA DE CREDITO',true), " . |
|
105 | + return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES ". |
|
106 | + "('01','17','EFECTIVO',true), ". |
|
107 | + "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ". |
|
108 | + "('01','19','TARJETA CRÉDITO/DÉBITO',true), ". |
|
109 | + "('01','20','VENTA A CRÉDITO',true), ". |
|
110 | + "('01','21','BONOS O CERTIFICADOS DE REGALO',true), ". |
|
111 | + "('01','22','PERMUTA',true), ". |
|
112 | + "('01','23','OTRAS FORMAS DE VENTAS',true), ". |
|
113 | + "('02','01','EFECTIVO',true), ". |
|
114 | + "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ". |
|
115 | + "('02','03','TARJETA CRÉDITO/DÉBITO',true), ". |
|
116 | + "('02','04','COMPRA A CREDITO',true), ". |
|
117 | + "('02','05','PERMUTA',true), ". |
|
118 | + "('02','06','NOTA DE CREDITO',true), ". |
|
119 | 119 | "('02','07','MIXTO',true);"; |
120 | 120 | } |
121 | 121 | |
122 | 122 | public function restoreData() |
123 | 123 | { |
124 | 124 | $dataBase = new DataBase(); |
125 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
125 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
126 | 126 | $dataBase->exec($sqlClean); |
127 | 127 | foreach ($this->arrayTipos as $arrayItem) { |
128 | 128 | $initialData = new NCFTipoMovimiento($arrayItem); |
@@ -61,23 +61,23 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -48,7 +48,7 @@ discard block |
||
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 |
||
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); |
@@ -61,13 +61,13 @@ |
||
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'); |
@@ -102,7 +102,7 @@ discard block |
||
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 |
||
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 | } |
@@ -67,13 +67,13 @@ |
||
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'); |
@@ -148,17 +148,17 @@ discard block |
||
148 | 148 | parent::install(); |
149 | 149 | $sql = "INSERT INTO rd_ncftipo (". |
150 | 150 | "tipocomprobante, descripcion, estado, clasemovimiento, ventas, compras, contribuyente". |
151 | - " ) VALUES " . |
|
152 | - "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y')," . |
|
153 | - "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y')," . |
|
154 | - "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N')," . |
|
155 | - "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N')," . |
|
156 | - "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y')," . |
|
157 | - "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N')," . |
|
158 | - "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N')," . |
|
159 | - "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y')," . |
|
160 | - "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y')," . |
|
161 | - "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y')," . |
|
151 | + " ) VALUES ". |
|
152 | + "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y'),". |
|
153 | + "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y'),". |
|
154 | + "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N'),". |
|
155 | + "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N'),". |
|
156 | + "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y'),". |
|
157 | + "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N'),". |
|
158 | + "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N'),". |
|
159 | + "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y'),". |
|
160 | + "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y'),". |
|
161 | + "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y'),". |
|
162 | 162 | "('17','COMPROBANTE PARA PAGOS AL EXTERIOR',true, 'suma','N', 'Y','Y');"; |
163 | 163 | return($sql); |
164 | 164 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | public function restoreData() |
167 | 167 | { |
168 | 168 | $dataBase = new DataBase(); |
169 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
169 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
170 | 170 | $dataBase->exec($sqlClean); |
171 | 171 | foreach ($this->arrayComprobantes as $arrayItem) { |
172 | 172 | $initialData = new NCFTipo($arrayItem); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | public function allFor($type = "ventas", $movimiento = "suma") |
179 | 179 | { |
180 | - $where = [new DataBaseWhere($type, 'Y'),new DataBaseWhere('clasemovimiento', $movimiento)]; |
|
180 | + $where = [new DataBaseWhere($type, 'Y'), new DataBaseWhere('clasemovimiento', $movimiento)]; |
|
181 | 181 | return $this->all($where, ['tipocomprobante' => 'ASC'], 0, 50); |
182 | 182 | } |
183 | 183 | |
@@ -188,14 +188,14 @@ discard block |
||
188 | 188 | } |
189 | 189 | |
190 | 190 | public function tipoCliente($codcliente) { |
191 | - $where = [new DatabaseWhere( 'codcliente', $_REQUEST['codcliente'])]; |
|
191 | + $where = [new DatabaseWhere('codcliente', $_REQUEST['codcliente'])]; |
|
192 | 192 | $clientes = new Cliente(); |
193 | 193 | $cliente = $clientes->get($codcliente); |
194 | 194 | return ['tipocomprobante' => $cliente->tipocomprobante, 'ncftipopago' => $cliente->ncftipopago]; |
195 | 195 | } |
196 | 196 | |
197 | 197 | public function tipoProveedor($codproveedor) { |
198 | - $where = [new DatabaseWhere( 'codproveedor', $_REQUEST['codproveedor'])]; |
|
198 | + $where = [new DatabaseWhere('codproveedor', $_REQUEST['codproveedor'])]; |
|
199 | 199 | $proveedores = new Proveedor(); |
200 | 200 | $proveedor = $proveedores->get($codproveedor); |
201 | 201 | return ['ncftipopago' => $proveedor->ncftipopago]; |
@@ -71,10 +71,10 @@ |
||
71 | 71 | protected function getSQLFrom(): string |
72 | 72 | { |
73 | 73 | return static::MAIN_TABLE |
74 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
75 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
76 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
77 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
74 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
75 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
76 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
77 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |