@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | protected function saveUpdate(array $values = array()) |
| 175 | 175 | { |
| 176 | - if($this->id and isset($this->usuariomodificacion_view)) { |
|
| 176 | + if ($this->id and isset($this->usuariomodificacion_view)) { |
|
| 177 | 177 | $this->fechamodificacion = \date('d-m-Y'); |
| 178 | 178 | $this->usuariomodificacion = $this->usuariomodificacion_view; |
| 179 | 179 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | . $idempresa |
| 190 | 190 | . ' AND tipocomprobante = ' |
| 191 | 191 | . $dataBase->var2str($tipocomprobante) |
| 192 | - . ' AND estado = ' . $dataBase->var2str(true) |
|
| 192 | + . ' AND estado = '.$dataBase->var2str(true) |
|
| 193 | 193 | . ';'; |
| 194 | 194 | $data = $dataBase->select($sql); |
| 195 | 195 | return new NCFRango($data[0]); |
@@ -147,17 +147,17 @@ discard block |
||
| 147 | 147 | parent::install(); |
| 148 | 148 | $sql = "INSERT INTO rd_ncftipo (". |
| 149 | 149 | "tipocomprobante, descripcion, estado, clasemovimiento, ventas, compras, contribuyente". |
| 150 | - " ) VALUES " . |
|
| 151 | - "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y')," . |
|
| 152 | - "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y')," . |
|
| 153 | - "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N')," . |
|
| 154 | - "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N')," . |
|
| 155 | - "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y')," . |
|
| 156 | - "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N')," . |
|
| 157 | - "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N')," . |
|
| 158 | - "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y')," . |
|
| 159 | - "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y')," . |
|
| 160 | - "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y')," . |
|
| 150 | + " ) VALUES ". |
|
| 151 | + "('01','FACTURA DE CREDITO FISCAL',true, 'suma','Y','Y','Y'),". |
|
| 152 | + "('02','FACTURA DE CONSUMO',true, 'suma','Y','Y','Y'),". |
|
| 153 | + "('03','NOTA DE DEBITO',true, 'suma','Y','Y','N'),". |
|
| 154 | + "('04','NOTA DE CREDITO',true, 'resta','Y','Y','N'),". |
|
| 155 | + "('11','COMPROBANTE DE COMPRAS',true, 'suma','N','Y','Y'),". |
|
| 156 | + "('12','REGISTRO UNICO DE INGRESOS',true, 'suma','Y','N','N'),". |
|
| 157 | + "('13','COMPROBANTE PARA GASTOS MENORES',true, 'suma','N','Y','N'),". |
|
| 158 | + "('14','COMPROBANTE DE REGIMENES ESPECIALES',true, 'suma','Y','Y','Y'),". |
|
| 159 | + "('15','COMPROBANTE GUBERNAMENTAL',true, 'suma','Y','Y','Y'),". |
|
| 160 | + "('16','COMPROBANTE PARA EXPORTACIONES',true, 'suma','Y','N','Y'),". |
|
| 161 | 161 | "('17','COMPROBANTE PARA PAGOS AL EXTERIOR',true, 'suma','N', 'Y','Y');"; |
| 162 | 162 | return($sql); |
| 163 | 163 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | public function restoreData() |
| 166 | 166 | { |
| 167 | 167 | $dataBase = new DataBase(); |
| 168 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
| 168 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
| 169 | 169 | $dataBase->exec($sqlClean); |
| 170 | 170 | foreach ($this->arrayComprobantes as $arrayItem) { |
| 171 | 171 | $initialData = new NCFTipo($arrayItem); |
@@ -176,12 +176,12 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | public function allFor($type = "ventas", $movimiento = "suma") |
| 178 | 178 | { |
| 179 | - $where = [new DataBaseWhere($type, 'Y'),new DataBaseWhere('clasemovimiento', $movimiento)]; |
|
| 179 | + $where = [new DataBaseWhere($type, 'Y'), new DataBaseWhere('clasemovimiento', $movimiento)]; |
|
| 180 | 180 | return $this->all($where, ['tipocomprobante' => 'ASC'], 0, 50); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | public function tipoCliente($codcliente) { |
| 184 | - $where = [new DatabaseWhere( 'codcliente', $_REQUEST['codcliente'])]; |
|
| 184 | + $where = [new DatabaseWhere('codcliente', $_REQUEST['codcliente'])]; |
|
| 185 | 185 | $clientes = new Cliente(); |
| 186 | 186 | $cliente = $clientes->get($codcliente); |
| 187 | 187 | return ['tipocomprobante' => $cliente->tipocomprobante, 'ncftipopago' => $cliente->ncftipopago]; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | public function saveInsert() |
| 66 | 66 | { |
| 67 | - return function () { |
|
| 67 | + return function() { |
|
| 68 | 68 | $ncfrango = new NCFRango(); |
| 69 | 69 | $cliente = new Cliente(); |
| 70 | 70 | $appSettins = new AppSettings; |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | public function all() |
| 86 | 86 | { |
| 87 | 87 | //parent::all(); |
| 88 | - return function () { |
|
| 88 | + return function() { |
|
| 89 | 89 | $this->facturarectnumero2 = ''; |
| 90 | 90 | if ($this->idfacturarect !== '') { |
| 91 | 91 | $facturaRectificativa = $this->get($this->idfacturarect); |
| 92 | - $this->loadFromData(['facturarectnumero2' => 'SI' ]); |
|
| 92 | + $this->loadFromData(['facturarectnumero2' => 'SI']); |
|
| 93 | 93 | $this->facturarectnumero2 = 'SI'; |
| 94 | 94 | } else { |
| 95 | 95 | $this->loadFromData(['facturarectnumero2' => 'NO HAY']); |
@@ -16,23 +16,23 @@ |
||
| 16 | 16 | * along with fsRepublicaDominicana. If not, see <http://www.gnu.org/licenses/>. |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | - namespace FacturaScripts\Plugins\fsRepublicaDominicana\Extension\Model; |
|
| 19 | + namespace FacturaScripts\Plugins\fsRepublicaDominicana\Extension\Model; |
|
| 20 | 20 | |
| 21 | - class Cliente |
|
| 22 | - { |
|
| 21 | + class Cliente |
|
| 22 | + { |
|
| 23 | 23 | /** |
| 24 | - * Type of NCF to generate to the customer |
|
| 25 | - * @var string |
|
| 26 | - */ |
|
| 24 | + * Type of NCF to generate to the customer |
|
| 25 | + * @var string |
|
| 26 | + */ |
|
| 27 | 27 | public $codsubtipodoc; |
| 28 | 28 | /** |
| 29 | 29 | * Payment type based on DGII table |
| 30 | 30 | * @var string |
| 31 | 31 | */ |
| 32 | 32 | public $ncftipopago; |
| 33 | - /** |
|
| 34 | - * Type of NCF to generate to the customer |
|
| 35 | - * @var string |
|
| 36 | - */ |
|
| 37 | - public $tipocomprobante; |
|
| 38 | - } |
|
| 33 | + /** |
|
| 34 | + * Type of NCF to generate to the customer |
|
| 35 | + * @var string |
|
| 36 | + */ |
|
| 37 | + public $tipocomprobante; |
|
| 38 | + } |
|
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | break; |
| 75 | 75 | case 'busca_tipo': |
| 76 | 76 | $this->setTemplate(false); |
| 77 | - $where = [new DatabaseWhere( $_REQUEST['tipodocumento'], 'Y')]; |
|
| 77 | + $where = [new DatabaseWhere($_REQUEST['tipodocumento'], 'Y')]; |
|
| 78 | 78 | $tipocomprobantes = $this->views['ListNCFTipo']->model->all($where); |
| 79 | 79 | if ($tipocomprobantes) { |
| 80 | 80 | echo json_encode(['tipocomprobantes' => $tipocomprobantes], JSON_THROW_ON_ERROR); |