| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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_CRFI',
- 'REFI_NULI',
- 'REFI_DRFI',
- 'REFI_APFI',
- 'REFI_APMO',
- ]);
- } 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);
- }
- }
|