| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- use Illuminate\Support\Carbon;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Validator;
- class CatalogController extends Controller
- {
- private $responseController;
- private $encController;
- private $resourcesController;
- public function __construct() {
- $this->responseController = new ResponseController();
- $this->encController = new EncryptionController();
- $this->resourcesController = new ResourcesController();
- }
- public function getTaxRegimeActive($line) {
- try {
- $getTaxRegime = DB::table('S002V01TREFI')
- ->where('REFI_ESTA', '=', 'Activo')
- ->where('REFI_NULI', '=', $line)
- ->get([
- 'REFI_CORF',
- 'REFI_VERS',
- 'REFI_DESC',
- 'REFI_FISI',
- 'REFI_MORA',
- 'REFI_FEIV',
- 'REFI_FEFV',
- ]);
- } catch (\Throwable $th) {
- return $this->responseController->makeResponse(true, "ERR_CATALOG_TAXREGIME_GET000: Ocurrió un error al obtener el contenido.", $th->getMessage(), 500);
- }
- $arrTaxRegime = json_decode(json_encode($getTaxRegime), true);
- return $this->responseController->makeResponse(false, "ÉXITO: Consulta Exitosa.", $arrTaxRegime);
- }
- }
|