@@ -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'); |
@@ -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'); |
@@ -94,22 +94,22 @@ |
||
| 94 | 94 | protected function getSQLFrom(): string |
| 95 | 95 | { |
| 96 | 96 | return static::MAIN_TABLE |
| 97 | - . ' LEFT JOIN ' . static::LINES_TABLE . ' ON (' |
|
| 98 | - . static::MAIN_TABLE . '.idfactura = ' . static::LINES_TABLE . '.idfactura)' |
|
| 99 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
| 100 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
| 101 | - . ' LEFT JOIN '. static::ALMACENES_TABLE . ' ON (' |
|
| 102 | - . static::MAIN_TABLE . '.codalmacen = ' . static::ALMACENES_TABLE . '.codalmacen)' |
|
| 103 | - . ' LEFT JOIN '. static::NCFTIPO_TABLE . ' ON (' |
|
| 104 | - . static::MAIN_TABLE . '.tipocomprobante = ' . static::NCFTIPO_TABLE . '.tipocomprobante)' |
|
| 105 | - . ' LEFT JOIN ' . static::NCFTIPOPAGO_TABLE . ' ON (' |
|
| 106 | - . static::MAIN_TABLE . '.ncftipopago = ' . static::NCFTIPOPAGO_TABLE . '.codigo)' |
|
| 107 | - . ' LEFT JOIN ' . static::NCFTIPOMOV_TABLE . ' ON (' |
|
| 108 | - . static::MAIN_TABLE . '.ncftipomovimiento = ' . static::NCFTIPOMOV_TABLE . '.codigo)' |
|
| 109 | - . ' LEFT JOIN ' . static::NCFTIPOANUL_TABLE . ' ON (' |
|
| 110 | - . static::MAIN_TABLE . '.ncftipoanulacion = ' . static::NCFTIPOANUL_TABLE . '.codigo)' |
|
| 111 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
| 112 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
| 97 | + . ' LEFT JOIN '.static::LINES_TABLE.' ON (' |
|
| 98 | + . static::MAIN_TABLE.'.idfactura = '.static::LINES_TABLE.'.idfactura)' |
|
| 99 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
| 100 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
| 101 | + . ' LEFT JOIN '.static::ALMACENES_TABLE.' ON (' |
|
| 102 | + . static::MAIN_TABLE.'.codalmacen = '.static::ALMACENES_TABLE.'.codalmacen)' |
|
| 103 | + . ' LEFT JOIN '.static::NCFTIPO_TABLE.' ON (' |
|
| 104 | + . static::MAIN_TABLE.'.tipocomprobante = '.static::NCFTIPO_TABLE.'.tipocomprobante)' |
|
| 105 | + . ' LEFT JOIN '.static::NCFTIPOPAGO_TABLE.' ON (' |
|
| 106 | + . static::MAIN_TABLE.'.ncftipopago = '.static::NCFTIPOPAGO_TABLE.'.codigo)' |
|
| 107 | + . ' LEFT JOIN '.static::NCFTIPOMOV_TABLE.' ON (' |
|
| 108 | + . static::MAIN_TABLE.'.ncftipomovimiento = '.static::NCFTIPOMOV_TABLE.'.codigo)' |
|
| 109 | + . ' LEFT JOIN '.static::NCFTIPOANUL_TABLE.' ON (' |
|
| 110 | + . static::MAIN_TABLE.'.ncftipoanulacion = '.static::NCFTIPOANUL_TABLE.'.codigo)' |
|
| 111 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
| 112 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | protected function insertBusinessDocHeader($model): void |
| 27 | 27 | { |
| 28 | 28 | $headerData = [ |
| 29 | - 'title' => $this->i18n->trans($model->modelClassName() . '-min'), |
|
| 29 | + 'title' => $this->i18n->trans($model->modelClassName().'-min'), |
|
| 30 | 30 | 'subject' => $this->i18n->trans('customer'), |
| 31 | 31 | 'fieldName' => 'nombrecliente' |
| 32 | 32 | ]; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $headerData['title'] = Utils::fixHtml($this->format->titulo); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - $this->pdf->ezText("\n" . $headerData['title'] . ': ' . $model->codigo . "\n", self::FONT_SIZE + 6); |
|
| 43 | + $this->pdf->ezText("\n".$headerData['title'].': '.$model->codigo."\n", self::FONT_SIZE + 6); |
|
| 44 | 44 | $this->newLine(); |
| 45 | 45 | |
| 46 | 46 | $subject = $model->getSubject(); |
@@ -28,16 +28,16 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | public function createViews(): Closure |
| 30 | 30 | { |
| 31 | - return function () { |
|
| 31 | + return function() { |
|
| 32 | 32 | parent::createViews(); |
| 33 | - AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js'); |
|
| 34 | - AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js'); |
|
| 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 | 35 | }; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function execPreviousAction() |
| 39 | 39 | { |
| 40 | - return function ($action) { |
|
| 40 | + return function($action) { |
|
| 41 | 41 | switch ($action) { |
| 42 | 42 | case 'busca_infocliente': |
| 43 | 43 | $this->setTemplate(false); |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function ncftipo() |
| 73 | 73 | { |
| 74 | - return function () { |
|
| 74 | + return function() { |
|
| 75 | 75 | return NCFTipo::allVentas(); |
| 76 | 76 | }; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function ncftipoanulacion() |
| 80 | 80 | { |
| 81 | - return function () { |
|
| 81 | + return function() { |
|
| 82 | 82 | $tiposAnulacion = new NCFTipoAnulacion(); |
| 83 | 83 | return $tiposAnulacion->all(); |
| 84 | 84 | }; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $files = []; |
| 24 | 24 | $langs = 'ca_ES,de_DE,en_EN,es_AR,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_MX,es_PA,es_PE,es_UY,eu_ES,fr_FR,gl_ES,it_IT,pt_PT,va_ES'; |
| 25 | 25 | foreach (explode(',', $langs) as $lang) { |
| 26 | - $files[] = $lang . '.json'; |
|
| 26 | + $files[] = $lang.'.json'; |
|
| 27 | 27 | } |
| 28 | 28 | foreach (scandir(__DIR__, SCANDIR_SORT_ASCENDING) as $filename) { |
| 29 | 29 | if (is_file($filename) && substr($filename, -5) === '.json' && false === in_array($filename, $files, true)) { |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | // download json from facturascripts.com |
| 35 | 35 | foreach ($files as $filename) { |
| 36 | 36 | $url = "https://facturascripts.com/EditLanguage?action=json&idproject=176&code="; |
| 37 | - $json = file_get_contents($url . substr($filename, 0, -5)); |
|
| 37 | + $json = file_get_contents($url.substr($filename, 0, -5)); |
|
| 38 | 38 | if (empty($json) || strlen($json) < 10) { |
| 39 | 39 | unlink($filename); |
| 40 | - echo "Remove " . $filename . "\n"; |
|
| 40 | + echo "Remove ".$filename."\n"; |
|
| 41 | 41 | continue; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - echo "Download " . $filename . "\n"; |
|
| 44 | + echo "Download ".$filename."\n"; |
|
| 45 | 45 | file_put_contents($filename, $json); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -61,23 +61,23 @@ discard block |
||
| 61 | 61 | * @var array |
| 62 | 62 | */ |
| 63 | 63 | private $arrayTiposMovimiento = [ |
| 64 | - ['tipomovimiento'=>'COM','codigo' => '01', 'descripcion' => 'GASTOS DE PERSONAL', 'estado' => true], |
|
| 65 | - ['tipomovimiento'=>'COM','codigo' => '02', 'descripcion' => 'GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS', 'estado' => true], |
|
| 66 | - ['tipomovimiento'=>'COM','codigo' => '03', 'descripcion' => 'ARRENDAMIENTOS', 'estado' => true], |
|
| 67 | - ['tipomovimiento'=>'COM','codigo' => '04', 'descripcion' => 'GASTOS DE ACTIVOS FIJOS', 'estado' => true], |
|
| 68 | - ['tipomovimiento'=>'COM','codigo' => '05', 'descripcion' => 'GASTOS DE REPRESENTACIÓN', 'estado' => true], |
|
| 69 | - ['tipomovimiento'=>'COM','codigo' => '06', 'descripcion' => 'OTRAS DEDUCCIONES ADMITIDAS', 'estado' => true], |
|
| 70 | - ['tipomovimiento'=>'COM','codigo' => '07', 'descripcion' => 'GASTOS FINANCIEROS', 'estado' => true], |
|
| 71 | - ['tipomovimiento'=>'COM','codigo' => '08', 'descripcion' => 'GASTOS EXTRAORDINARIOS', 'estado' => true], |
|
| 72 | - ['tipomovimiento'=>'COM','codigo' => '09', 'descripcion' => 'COMPRAS Y GASTOS QUE FORMARÁN PARTE DEL COSTO DE VENTA', 'estado' => true], |
|
| 73 | - ['tipomovimiento'=>'COM','codigo' => '10', 'descripcion' => 'ADQUISICIONES DE ACTIVOS', 'estado' => true], |
|
| 74 | - ['tipomovimiento'=>'COM','codigo' => '11', 'descripcion' => 'GASTOS DE SEGUROS', 'estado' => true], |
|
| 75 | - ['tipomovimiento'=>'VEN','codigo' => '1', 'descripcion' => 'Ingresos por operaciones (No financieros)', 'estado' => true], |
|
| 76 | - ['tipomovimiento'=>'VEN','codigo' => '2', 'descripcion' => 'Ingresos Financieros', 'estado' => true], |
|
| 77 | - ['tipomovimiento'=>'VEN','codigo' => '3', 'descripcion' => 'Ingresos Extraordinarios', 'estado' => true], |
|
| 78 | - ['tipomovimiento'=>'VEN','codigo' => '4', 'descripcion' => 'Ingresos por Arrendamientos', 'estado' => true], |
|
| 79 | - ['tipomovimiento'=>'VEN','codigo' => '5', 'descripcion' => 'Ingresos por Venta de Activo Depreciable', 'estado' => true], |
|
| 80 | - ['tipomovimiento'=>'VEN','codigo' => '6', 'descripcion' => 'Otros Ingresos', 'estado' => true] |
|
| 64 | + ['tipomovimiento'=>'COM', 'codigo' => '01', 'descripcion' => 'GASTOS DE PERSONAL', 'estado' => true], |
|
| 65 | + ['tipomovimiento'=>'COM', 'codigo' => '02', 'descripcion' => 'GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS', 'estado' => true], |
|
| 66 | + ['tipomovimiento'=>'COM', 'codigo' => '03', 'descripcion' => 'ARRENDAMIENTOS', 'estado' => true], |
|
| 67 | + ['tipomovimiento'=>'COM', 'codigo' => '04', 'descripcion' => 'GASTOS DE ACTIVOS FIJOS', 'estado' => true], |
|
| 68 | + ['tipomovimiento'=>'COM', 'codigo' => '05', 'descripcion' => 'GASTOS DE REPRESENTACIÓN', 'estado' => true], |
|
| 69 | + ['tipomovimiento'=>'COM', 'codigo' => '06', 'descripcion' => 'OTRAS DEDUCCIONES ADMITIDAS', 'estado' => true], |
|
| 70 | + ['tipomovimiento'=>'COM', 'codigo' => '07', 'descripcion' => 'GASTOS FINANCIEROS', 'estado' => true], |
|
| 71 | + ['tipomovimiento'=>'COM', 'codigo' => '08', 'descripcion' => 'GASTOS EXTRAORDINARIOS', 'estado' => true], |
|
| 72 | + ['tipomovimiento'=>'COM', 'codigo' => '09', 'descripcion' => 'COMPRAS Y GASTOS QUE FORMARÁN PARTE DEL COSTO DE VENTA', 'estado' => true], |
|
| 73 | + ['tipomovimiento'=>'COM', 'codigo' => '10', 'descripcion' => 'ADQUISICIONES DE ACTIVOS', 'estado' => true], |
|
| 74 | + ['tipomovimiento'=>'COM', 'codigo' => '11', 'descripcion' => 'GASTOS DE SEGUROS', 'estado' => true], |
|
| 75 | + ['tipomovimiento'=>'VEN', 'codigo' => '1', 'descripcion' => 'Ingresos por operaciones (No financieros)', 'estado' => true], |
|
| 76 | + ['tipomovimiento'=>'VEN', 'codigo' => '2', 'descripcion' => 'Ingresos Financieros', 'estado' => true], |
|
| 77 | + ['tipomovimiento'=>'VEN', 'codigo' => '3', 'descripcion' => 'Ingresos Extraordinarios', 'estado' => true], |
|
| 78 | + ['tipomovimiento'=>'VEN', 'codigo' => '4', 'descripcion' => 'Ingresos por Arrendamientos', 'estado' => true], |
|
| 79 | + ['tipomovimiento'=>'VEN', 'codigo' => '5', 'descripcion' => 'Ingresos por Venta de Activo Depreciable', 'estado' => true], |
|
| 80 | + ['tipomovimiento'=>'VEN', 'codigo' => '6', 'descripcion' => 'Otros Ingresos', 'estado' => true] |
|
| 81 | 81 | ]; |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | public function install(): string |
| 103 | 103 | { |
| 104 | 104 | parent::install(); |
| 105 | - return "INSERT INTO rd_ncftipomovimiento (tipomovimiento, codigo, descripcion, estado) VALUES " . |
|
| 105 | + return "INSERT INTO rd_ncftipomovimiento (tipomovimiento, codigo, descripcion, estado) VALUES ". |
|
| 106 | 106 | "('COM','01','GASTOS DE PERSONAL',true), ". |
| 107 | 107 | "('COM','02','GASTOS POR TRABAJOS, SUMINISTROS Y SERVICIOS',true), ". |
| 108 | 108 | "('COM','03','ARRENDAMIENTOS',true), ". |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | public function restoreData() |
| 126 | 126 | { |
| 127 | 127 | $dataBase = new DataBase(); |
| 128 | - $sqlClean = "DELETE FROM " . $this->tableName() . ";"; |
|
| 128 | + $sqlClean = "DELETE FROM ".$this->tableName().";"; |
|
| 129 | 129 | $dataBase->exec($sqlClean); |
| 130 | 130 | foreach ($this->arrayTiposMovimiento as $arrayItem) { |
| 131 | 131 | $initialData = new NCFTipoMovimiento($arrayItem); |
@@ -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); |