@@ -61,20 +61,20 @@ discard block |
||
61 | 61 | * @var array |
62 | 62 | */ |
63 | 63 | public $arrayTipos = [ |
64 | - ['tipopago'=>'01','codigo' => '17', 'descripcion' => 'EFECTIVO','estado'=>true], |
|
65 | - ['tipopago'=>'01','codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true], |
|
66 | - ['tipopago'=>'01','codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true], |
|
67 | - ['tipopago'=>'01','codigo' => '20', 'descripcion' => 'VENTA A CREDITO','estado'=>true], |
|
68 | - ['tipopago'=>'01','codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO','estado'=>true], |
|
69 | - ['tipopago'=>'01','codigo' => '22', 'descripcion' => 'PERMUTA','estado'=>true], |
|
70 | - ['tipopago'=>'01','codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS','estado'=>true], |
|
71 | - ['tipopago'=>'02','codigo' => '01', 'descripcion' => 'EFECTIVO','estado'=>true], |
|
72 | - ['tipopago'=>'02','codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO','estado'=>true], |
|
73 | - ['tipopago'=>'02','codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO','estado'=>true], |
|
74 | - ['tipopago'=>'02','codigo' => '04', 'descripcion' => 'COMPRA A CREDITO','estado'=>true], |
|
75 | - ['tipopago'=>'02','codigo' => '05', 'descripcion' => 'PERMUTA','estado'=>true], |
|
76 | - ['tipopago'=>'02','codigo' => '06', 'descripcion' => 'NOTA DE CREDITO','estado'=>true], |
|
77 | - ['tipopago'=>'02','codigo' => '07', 'descripcion' => 'MIXTO','estado'=>true] |
|
64 | + ['tipopago'=>'01', 'codigo' => '17', 'descripcion' => 'EFECTIVO', 'estado'=>true], |
|
65 | + ['tipopago'=>'01', 'codigo' => '18', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true], |
|
66 | + ['tipopago'=>'01', 'codigo' => '19', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true], |
|
67 | + ['tipopago'=>'01', 'codigo' => '20', 'descripcion' => 'VENTA A CREDITO', 'estado'=>true], |
|
68 | + ['tipopago'=>'01', 'codigo' => '21', 'descripcion' => 'BONOS O CERTIFICADOS DE REGALO', 'estado'=>true], |
|
69 | + ['tipopago'=>'01', 'codigo' => '22', 'descripcion' => 'PERMUTA', 'estado'=>true], |
|
70 | + ['tipopago'=>'01', 'codigo' => '23', 'descripcion' => 'OTRAS FORMAS DE VENTAS', 'estado'=>true], |
|
71 | + ['tipopago'=>'02', 'codigo' => '01', 'descripcion' => 'EFECTIVO', 'estado'=>true], |
|
72 | + ['tipopago'=>'02', 'codigo' => '02', 'descripcion' => 'CHEQUES/TRANSFERENCIAS/DEPOSITO', 'estado'=>true], |
|
73 | + ['tipopago'=>'02', 'codigo' => '03', 'descripcion' => 'TARJETA CRÉDITO/DÉBITO', 'estado'=>true], |
|
74 | + ['tipopago'=>'02', 'codigo' => '04', 'descripcion' => 'COMPRA A CREDITO', 'estado'=>true], |
|
75 | + ['tipopago'=>'02', 'codigo' => '05', 'descripcion' => 'PERMUTA', 'estado'=>true], |
|
76 | + ['tipopago'=>'02', 'codigo' => '06', 'descripcion' => 'NOTA DE CREDITO', 'estado'=>true], |
|
77 | + ['tipopago'=>'02', 'codigo' => '07', 'descripcion' => 'MIXTO', 'estado'=>true] |
|
78 | 78 | ]; |
79 | 79 | |
80 | 80 | /** |
@@ -99,27 +99,27 @@ discard block |
||
99 | 99 | public function install(): string |
100 | 100 | { |
101 | 101 | parent::install(); |
102 | - return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES " . |
|
103 | - "('01','17','EFECTIVO',true), " . |
|
104 | - "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " . |
|
105 | - "('01','19','TARJETA CRÉDITO/DÉBITO',true), " . |
|
106 | - "('01','20','VENTA A CRÉDITO',true), " . |
|
107 | - "('01','21','BONOS O CERTIFICADOS DE REGALO',true), " . |
|
108 | - "('01','22','PERMUTA',true), " . |
|
109 | - "('01','23','OTRAS FORMAS DE VENTAS',true), " . |
|
110 | - "('02','01','EFECTIVO',true), " . |
|
111 | - "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), " . |
|
112 | - "('02','03','TARJETA CRÉDITO/DÉBITO',true), " . |
|
113 | - "('02','04','COMPRA A CREDITO',true), " . |
|
114 | - "('02','05','PERMUTA',true), " . |
|
115 | - "('02','06','NOTA DE CREDITO',true), " . |
|
102 | + return "INSERT INTO rd_ncftipopagos (tipopago, codigo, descripcion, estado) VALUES ". |
|
103 | + "('01','17','EFECTIVO',true), ". |
|
104 | + "('01','18','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ". |
|
105 | + "('01','19','TARJETA CRÉDITO/DÉBITO',true), ". |
|
106 | + "('01','20','VENTA A CRÉDITO',true), ". |
|
107 | + "('01','21','BONOS O CERTIFICADOS DE REGALO',true), ". |
|
108 | + "('01','22','PERMUTA',true), ". |
|
109 | + "('01','23','OTRAS FORMAS DE VENTAS',true), ". |
|
110 | + "('02','01','EFECTIVO',true), ". |
|
111 | + "('02','02','CHEQUES/TRANSFERENCIAS/DEPOSITO',true), ". |
|
112 | + "('02','03','TARJETA CRÉDITO/DÉBITO',true), ". |
|
113 | + "('02','04','COMPRA A CREDITO',true), ". |
|
114 | + "('02','05','PERMUTA',true), ". |
|
115 | + "('02','06','NOTA DE CREDITO',true), ". |
|
116 | 116 | "('02','07','MIXTO',true);"; |
117 | 117 | } |
118 | 118 | |
119 | 119 | public function restoreData() |
120 | 120 | { |
121 | 121 | $dataBase = new DataBase(); |
122 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
122 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
123 | 123 | $dataBase->exec($sqlClean); |
124 | 124 | foreach ($this->arrayTipos as $arrayItem) { |
125 | 125 | $initialData = new NCFTipoMovimiento($arrayItem); |
@@ -184,7 +184,7 @@ |
||
184 | 184 | . $idempresa |
185 | 185 | . ' AND tipocomprobante = ' |
186 | 186 | . $dataBase->var2str($tipocomprobante) |
187 | - . ' AND estado = ' . $dataBase->var2str(true) |
|
187 | + . ' AND estado = '.$dataBase->var2str(true) |
|
188 | 188 | . ';'; |
189 | 189 | $data = $dataBase->select($sql); |
190 | 190 | if (empty($data) === true || in_array($data[0], [null, ''], true)) { |
@@ -158,17 +158,17 @@ discard block |
||
158 | 158 | parent::install(); |
159 | 159 | $sql = "INSERT INTO rd_ncftipo (". |
160 | 160 | "tipocomprobante, descripcion, estado, clasemovimiento, ventas, compras, contribuyente". |
161 | - " ) VALUES " . |
|
162 | - "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y')," . |
|
163 | - "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y')," . |
|
164 | - "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N')," . |
|
165 | - "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N')," . |
|
166 | - "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y')," . |
|
167 | - "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N')," . |
|
168 | - "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N')," . |
|
169 | - "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y')," . |
|
170 | - "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y')," . |
|
171 | - "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y')," . |
|
161 | + " ) VALUES ". |
|
162 | + "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y'),". |
|
163 | + "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y'),". |
|
164 | + "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N'),". |
|
165 | + "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N'),". |
|
166 | + "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y'),". |
|
167 | + "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N'),". |
|
168 | + "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N'),". |
|
169 | + "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y'),". |
|
170 | + "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y'),". |
|
171 | + "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y'),". |
|
172 | 172 | "('17','COMPROBANTE PARA PAGOS AL EXTERIOR',true, 'suma','N', 'Y','Y');"; |
173 | 173 | return($sql); |
174 | 174 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | public function restoreData() |
177 | 177 | { |
178 | 178 | $dataBase = new DataBase(); |
179 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
179 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
180 | 180 | $dataBase->exec($sqlClean); |
181 | 181 | foreach ($this->arrayComprobantes as $arrayItem) { |
182 | 182 | $initialData = new NCFTipo($arrayItem); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | public function allFor($type = "ventas", $movimiento = "suma") |
189 | 189 | { |
190 | - $where = [new DataBaseWhere($type, 'Y'),new DataBaseWhere('clasemovimiento', $movimiento)]; |
|
190 | + $where = [new DataBaseWhere($type, 'Y'), new DataBaseWhere('clasemovimiento', $movimiento)]; |
|
191 | 191 | return $this->all($where, ['tipocomprobante' => 'ASC'], 0, 50); |
192 | 192 | } |
193 | 193 |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | 'idempresa' => static::MAIN_TABLE.'.idempresa', |
40 | 40 | 'codalmacen' => static::MAIN_TABLE.'.codalmacen', |
41 | 41 | 'ncf' => static::MAIN_TABLE.'.numeroncf', |
42 | - 'tipoanulacion' => 'CASE WHEN ' . |
|
43 | - static::ESTADOSDOC_TABLE . '.nombre = \'Anulada\' AND ' . |
|
44 | - static::MAIN_TABLE.'.ncftipoanulacion is null ' . |
|
45 | - 'THEN CONCAT(\'05\',\' - \',\'Corrección de la Información\') ELSE ' . |
|
46 | - 'concat(' . static::MAIN_TABLE.'.ncftipoanulacion, \' - \', ' . |
|
42 | + 'tipoanulacion' => 'CASE WHEN '. |
|
43 | + static::ESTADOSDOC_TABLE.'.nombre = \'Anulada\' AND '. |
|
44 | + static::MAIN_TABLE.'.ncftipoanulacion is null '. |
|
45 | + 'THEN CONCAT(\'05\',\' - \',\'Corrección de la Información\') ELSE '. |
|
46 | + 'concat('.static::MAIN_TABLE.'.ncftipoanulacion, \' - \', '. |
|
47 | 47 | static::NCFCANCELTYPE_TABLE.'.descripcion) END', |
48 | 48 | 'fecha' => $dateFormat.'('.static::MAIN_TABLE.'.fecha,\''.$dateFormatString.'\')', |
49 | - 'estado' => 'CASE WHEN ' . static::ESTADOSDOC_TABLE . |
|
49 | + 'estado' => 'CASE WHEN '.static::ESTADOSDOC_TABLE. |
|
50 | 50 | '.nombre = \'Emitida\' THEN \'Activo\' ELSE \'Anulado\' END', |
51 | 51 | ]; |
52 | 52 | return $data; |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | protected function getSQLFrom(): string |
60 | 60 | { |
61 | 61 | return static::MAIN_TABLE |
62 | - . ' JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
63 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado AND '.static::ESTADOSDOC_TABLE.'.nombre = \'Anulada\')' |
|
64 | - . ' LEFT JOIN ' . static::NCFCANCELTYPE_TABLE . ' ON (' |
|
65 | - . static::MAIN_TABLE . '.ncftipoanulacion = ' . static::NCFCANCELTYPE_TABLE . '.codigo)'; |
|
62 | + . ' JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
63 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado AND '.static::ESTADOSDOC_TABLE.'.nombre = \'Anulada\')' |
|
64 | + . ' LEFT JOIN '.static::NCFCANCELTYPE_TABLE.' ON (' |
|
65 | + . static::MAIN_TABLE.'.ncftipoanulacion = '.static::NCFCANCELTYPE_TABLE.'.codigo)'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -92,10 +92,10 @@ |
||
92 | 92 | protected function getSQLFrom(): string |
93 | 93 | { |
94 | 94 | return static::MAIN_TABLE |
95 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
96 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
97 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
98 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado AND ' |
|
95 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
96 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
97 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
98 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado AND ' |
|
99 | 99 | . static::ESTADOSDOC_TABLE.'.nombre != \'Anulada\')'; |
100 | 100 | } |
101 | 101 |
@@ -81,10 +81,10 @@ |
||
81 | 81 | /** |
82 | 82 | * @inheritDoc |
83 | 83 | */ |
84 | - public function show(Response &$response) |
|
84 | + public function show(Response & $response) |
|
85 | 85 | { |
86 | 86 | $response->headers->set('Content-Type', 'text/text; charset=utf-8'); |
87 | - $response->headers->set('Content-Disposition', 'attachment;filename=' . $this->getFileName() . '.TXT'); |
|
87 | + $response->headers->set('Content-Disposition', 'attachment;filename='.$this->getFileName().'.TXT'); |
|
88 | 88 | $response->setContent($this->getDoc()); |
89 | 89 | } |
90 | 90 | } |
91 | 91 | \ No newline at end of file |
@@ -29,21 +29,21 @@ discard block |
||
29 | 29 | |
30 | 30 | class PurchasesFooterMod implements PurchasesModInterface |
31 | 31 | { |
32 | - public function apply(PurchaseDocument &$model, array $formData, User $user) |
|
32 | + public function apply(PurchaseDocument & $model, array $formData, User $user) |
|
33 | 33 | { |
34 | 34 | // TODO: Implement apply() method. |
35 | 35 | } |
36 | 36 | |
37 | - public function applyBefore(PurchaseDocument &$model, array $formData, User $user) |
|
37 | + public function applyBefore(PurchaseDocument & $model, array $formData, User $user) |
|
38 | 38 | { |
39 | 39 | // TODO: Implement applyBefore() method. |
40 | 40 | if ($model->modelClassName() === 'FacturaProveedor') { |
41 | - $model->numeroncf = isset($formData['numeroncf']) ? (string)$formData['numeroncf'] : $model->numeroncf; |
|
42 | - $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string)$formData['tipocomprobante'] : $model->tipocomprobante; |
|
43 | - $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string)$formData['ncffechavencimiento'] : $model->ncffechavencimiento; |
|
44 | - $model->ncftipopago = isset($formData['ncftipopago']) ? (string)$formData['ncftipopago'] : $model->ncftipopago; |
|
45 | - $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string)$formData['ncftipomovimiento'] : $model->ncftipomovimiento; |
|
46 | - $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string)$formData['ncftipoanulacion'] : $model->ncftipoanulacion; |
|
41 | + $model->numeroncf = isset($formData['numeroncf']) ? (string) $formData['numeroncf'] : $model->numeroncf; |
|
42 | + $model->tipocomprobante = isset($formData['tipocomprobante']) ? (string) $formData['tipocomprobante'] : $model->tipocomprobante; |
|
43 | + $model->ncffechavencimiento = isset($formData['ncffechavencimiento']) ? (string) $formData['ncffechavencimiento'] : $model->ncffechavencimiento; |
|
44 | + $model->ncftipopago = isset($formData['ncftipopago']) ? (string) $formData['ncftipopago'] : $model->ncftipopago; |
|
45 | + $model->ncftipomovimiento = isset($formData['ncftipomovimiento']) ? (string) $formData['ncftipomovimiento'] : $model->ncftipomovimiento; |
|
46 | + $model->ncftipoanulacion = isset($formData['ncftipoanulacion']) ? (string) $formData['ncftipoanulacion'] : $model->ncftipoanulacion; |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function newFields(): array |
56 | 56 | { |
57 | 57 | // TODO: Implement newFields() method. |
58 | - return ['numeroncf','tipocomprobante', 'ncffechavencimiento', 'ncftipopago', 'ncftipomovimiento', 'ncftipoanulacion']; |
|
58 | + return ['numeroncf', 'tipocomprobante', 'ncffechavencimiento', 'ncftipopago', 'ncftipomovimiento', 'ncftipoanulacion']; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function renderField(Translator $i18n, PurchaseDocument $model, string $field): ?string |
@@ -104,15 +104,14 @@ discard block |
||
104 | 104 | $options = ['<option value="">------</option>']; |
105 | 105 | foreach ($tipoComprobante as $row) { |
106 | 106 | $options[] = ($row->tipocomprobante === $invoiceTipoComprobante) ? |
107 | - '<option value="' . $row->tipocomprobante . '" selected="">' . $row->descripcion . '</option>' : |
|
108 | - '<option value="' . $row->tipocomprobante . '">' . $row->descripcion . '</option>'; |
|
107 | + '<option value="'.$row->tipocomprobante.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->tipocomprobante.'">'.$row->descripcion.'</option>'; |
|
109 | 108 | } |
110 | 109 | |
111 | 110 | $attributes = ($model->editable || $model->numeroncf === '') ? 'name="tipocomprobante" required=""' : 'disabled=""'; |
112 | 111 | return '<div class="col-sm-3">' |
113 | 112 | . '<div class="form-group">' |
114 | 113 | . $i18n->trans('tipocomprobante') |
115 | - . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>' |
|
114 | + . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>' |
|
116 | 115 | . '</div>' |
117 | 116 | . '</div>'; |
118 | 117 | } |
@@ -136,15 +135,14 @@ discard block |
||
136 | 135 | $options = ['<option value="">------</option>']; |
137 | 136 | foreach ($tipoPago as $row) { |
138 | 137 | $options[] = ($row->codigo === $invoiceTipoPago) ? |
139 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
140 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
138 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
141 | 139 | } |
142 | 140 | |
143 | 141 | $attributes = $model->editable ? 'name="ncftipopago" required=""' : 'disabled=""'; |
144 | 142 | return '<div class="col-sm-2">' |
145 | 143 | . '<div class="form-group">' |
146 | 144 | . $i18n->trans('ncf-payment-type') |
147 | - . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>' |
|
145 | + . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>' |
|
148 | 146 | . '</div>' |
149 | 147 | . '</div>'; |
150 | 148 | } |
@@ -162,15 +160,14 @@ discard block |
||
162 | 160 | $options = ['<option value="">------</option>']; |
163 | 161 | foreach ($tipoMovimiento as $row) { |
164 | 162 | $options[] = ($row->codigo === $invoiceTipoMovimiento) ? |
165 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
166 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
163 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
167 | 164 | } |
168 | 165 | |
169 | 166 | $attributes = $model->editable ? 'name="ncftipomovimiento" required=""' : 'disabled=""'; |
170 | 167 | return '<div class="col-sm-3">' |
171 | 168 | . '<div class="form-group">' |
172 | 169 | . $i18n->trans('ncf-movement-type') |
173 | - . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>' |
|
170 | + . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>' |
|
174 | 171 | . '</div>' |
175 | 172 | . '</div>'; |
176 | 173 | } |
@@ -188,15 +185,14 @@ discard block |
||
188 | 185 | $options = ['<option value="">------</option>']; |
189 | 186 | foreach ($tipoAnulacion as $row) { |
190 | 187 | $options[] = ($row->codigo === $invoiceTipoAnulacion) ? |
191 | - '<option value="' . $row->codigo . '" selected="">' . $row->descripcion . '</option>' : |
|
192 | - '<option value="' . $row->codigo . '">' . $row->descripcion . '</option>'; |
|
188 | + '<option value="'.$row->codigo.'" selected="">'.$row->descripcion.'</option>' : '<option value="'.$row->codigo.'">'.$row->descripcion.'</option>'; |
|
193 | 189 | } |
194 | 190 | |
195 | 191 | $attributes = $model->editable ? 'name="ncftipoanulacion"' : 'name="ncftipoanulacion" readonly=""'; |
196 | 192 | return '<div class="col-sm-2">' |
197 | 193 | . '<div class="form-group">' |
198 | 194 | . $i18n->trans('ncf-cancellation-type') |
199 | - . '<select ' . $attributes . ' class="form-control">' . implode('', $options) . '</select>' |
|
195 | + . '<select '.$attributes.' class="form-control">'.implode('', $options).'</select>' |
|
200 | 196 | . '</div>' |
201 | 197 | . '</div>'; |
202 | 198 | } |
@@ -208,9 +204,9 @@ discard block |
||
208 | 204 | ? date('Y-m-d', strtotime($model->ncffechavencimiento)) |
209 | 205 | : ''; |
210 | 206 | return '<div class="col-sm-2">' |
211 | - . '<div class="form-group">' . $i18n->trans('due-date') |
|
212 | - . '<input type="date" ' . $attributes . ' value="' |
|
213 | - . $ncfFechaVencimiento . '" class="form-control"/>' |
|
207 | + . '<div class="form-group">'.$i18n->trans('due-date') |
|
208 | + . '<input type="date" '.$attributes.' value="' |
|
209 | + . $ncfFechaVencimiento.'" class="form-control"/>' |
|
214 | 210 | . '</div>' |
215 | 211 | . '</div>'; |
216 | 212 | } |
@@ -223,11 +219,11 @@ discard block |
||
223 | 219 | . '<div class="form-group">' |
224 | 220 | . $i18n->trans('desc-numeroncf-purchases') |
225 | 221 | . '<div class="input-group">' |
226 | - . '<input type="text" ' . $attributes . ' value="' . $model->numeroncf . '" class="form-control"/>' |
|
222 | + . '<input type="text" '.$attributes.' value="'.$model->numeroncf.'" class="form-control"/>' |
|
227 | 223 | . '<div class="input-group-append">' |
228 | - . '<button class="btn ' . $btnColor .' btn-spin-action" id="btnVerifyNCF"' |
|
224 | + . '<button class="btn '.$btnColor.' btn-spin-action" id="btnVerifyNCF"' |
|
229 | 225 | . 'onclick="purchasesNCFVerify()" ' |
230 | - . 'title="'. $i18n->trans('verify-numproveedor') |
|
226 | + . 'title="'.$i18n->trans('verify-numproveedor') |
|
231 | 227 | .'" type="button">' |
232 | 228 | . '<i id="iconBtnVerify" class="fas fa-search fa-fw"></i>' |
233 | 229 | . '</button>' |
@@ -74,18 +74,18 @@ discard block |
||
74 | 74 | protected function getGroupFields(): string |
75 | 75 | { |
76 | 76 | //return parent::getGroupFields(); // TODO: Change the autogenerated stub |
77 | - return static::MAIN_TABLE.'.idfactura, ' . |
|
78 | - static::MAIN_TABLE.'.idempresa, ' . |
|
79 | - static::MAIN_TABLE.'.codalmacen, ' . |
|
80 | - static::MAIN_TABLE.'.cifnif, ' . |
|
81 | - static::MAIN_TABLE.'.ncftipomovimiento, ' . |
|
82 | - static::MAIN_TABLE.'.numeroncf, ' . |
|
83 | - static::SECONDARY_TABLE_ALIAS.'.numeroncf, ' . |
|
84 | - static::MAIN_TABLE.'.fecha, ' . |
|
85 | - static::RECIBOSPROV_TABLE.'.fechapago, ' . |
|
86 | - static::ESTADOSDOC_TABLE.'.nombre, ' . |
|
87 | - static::MAIN_TABLE.'.neto, ' . |
|
88 | - static::MAIN_TABLE.'.totaliva' . |
|
77 | + return static::MAIN_TABLE.'.idfactura, '. |
|
78 | + static::MAIN_TABLE.'.idempresa, '. |
|
79 | + static::MAIN_TABLE.'.codalmacen, '. |
|
80 | + static::MAIN_TABLE.'.cifnif, '. |
|
81 | + static::MAIN_TABLE.'.ncftipomovimiento, '. |
|
82 | + static::MAIN_TABLE.'.numeroncf, '. |
|
83 | + static::SECONDARY_TABLE_ALIAS.'.numeroncf, '. |
|
84 | + static::MAIN_TABLE.'.fecha, '. |
|
85 | + static::RECIBOSPROV_TABLE.'.fechapago, '. |
|
86 | + static::ESTADOSDOC_TABLE.'.nombre, '. |
|
87 | + static::MAIN_TABLE.'.neto, '. |
|
88 | + static::MAIN_TABLE.'.totaliva'. |
|
89 | 89 | ' '; |
90 | 90 | } |
91 | 91 | |
@@ -96,16 +96,16 @@ discard block |
||
96 | 96 | protected function getSQLFrom(): string |
97 | 97 | { |
98 | 98 | return static::MAIN_TABLE |
99 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
100 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
101 | - . ' LEFT JOIN '. static::RECIBOSPROV_TABLE . ' ON (' |
|
102 | - . static::MAIN_TABLE . '.idfactura = ' . static::RECIBOSPROV_TABLE . '.idfactura)' |
|
103 | - . ' LEFT JOIN '. static::LINES_TABLE . ' ON (' |
|
104 | - . static::MAIN_TABLE . '.idfactura = ' . static::LINES_TABLE . '.idfactura)' |
|
105 | - . ' LEFT JOIN '. static::PRODS_TABLE . ' ON (' |
|
106 | - . static::LINES_TABLE . '.referencia = ' . static::PRODS_TABLE . '.referencia)' |
|
107 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
108 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
99 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
100 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
101 | + . ' LEFT JOIN '.static::RECIBOSPROV_TABLE.' ON (' |
|
102 | + . static::MAIN_TABLE.'.idfactura = '.static::RECIBOSPROV_TABLE.'.idfactura)' |
|
103 | + . ' LEFT JOIN '.static::LINES_TABLE.' ON (' |
|
104 | + . static::MAIN_TABLE.'.idfactura = '.static::LINES_TABLE.'.idfactura)' |
|
105 | + . ' LEFT JOIN '.static::PRODS_TABLE.' ON (' |
|
106 | + . static::LINES_TABLE.'.referencia = '.static::PRODS_TABLE.'.referencia)' |
|
107 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
108 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | { |
30 | 30 | public function createViews(): Closure |
31 | 31 | { |
32 | - return function () { |
|
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 | - AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/BusquedaRNCDGII.js'); |
|
32 | + return function() { |
|
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 | + AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/BusquedaRNCDGII.js'); |
|
36 | 36 | $ncfTipo = new NCFTipo(); |
37 | 37 | $ncfTipos = $ncfTipo->allFor('ventas', 'suma'); |
38 | 38 | $customValues = []; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function execPreviousAction() |
63 | 63 | { |
64 | - return function ($action) { |
|
64 | + return function($action) { |
|
65 | 65 | switch ($action) { |
66 | 66 | case 'busca_rnc': |
67 | 67 | $this->setTemplate(false); |