UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_3fa2e970a29f
/
app
/
Console
/
Commands
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
GenerateBoleto.php
<?php namespace EstudioLMS\Console\Commands; use Carbon\Carbon; use EstudioLMS\Repositories\Financial\BillingRepository; use EstudioLMS\Repositories\Financial\HireHeaderRepository; use EstudioLMS\Services\Admin\ConfigurationServices; use EstudioLMS\Services\Hires\BoletoService; use Illuminate\Console\Command; use EstudioLMS\Repositories\Financial\HiringInterface; /** * Class GenerateBoleto * @package EstudioLMS\Console\Commands */ class GenerateBoleto extends Command { protected $signature = 'generate:boleto'; /** * The console command description. * * @var string */ protected $description = 'Gera Boletos Paghiper das parcelas em aberto à vencer com x dias de antecedência de acordo com o dia de vencimento definido na configuração da instância'; /** * @var BillingRepository */ private $billingRepository; /** * @var ConfigurationServices */ private $configurationServices; /** * @var HireHeaderRepository */ private $header; /** * @var BoletoService */ private $boletoService; /** * @var HiringInterface */ private $hiring; /** * Create a new command instance. * * @return void */ /** * Create a new console command instance. * * @param BillingRepository $billingRepository * @param ConfigurationServices $configurationServices * @param HireHeaderRepository $header * @param BoletoService $boletoService * @param HiringInterface $hiring */ public function __construct( BillingRepository $billingRepository, ConfigurationServices $configurationServices, HireHeaderRepository $header, BoletoService $boletoService, HiringInterface $hiring ) { parent::__construct(); $this->billingRepository = $billingRepository; $this->configurationServices = $configurationServices; $this->header = $header; $this->boletoService = $boletoService; $this->hiring = $hiring; } /** * Execute the console command. * * @return string */ public function handle() { $boletoConf = $this->configurationServices->boletoPaghiperConfiguration(); if ($boletoConf && !empty($boletoConf->submit_billet)) { $dueDate = Carbon::now(); $dueDate->addDays($boletoConf->submit_billet); $due = $dueDate->year.'-'.$dueDate->month.'-'.$dueDate->day; $due_ini = $due.' 00:00:00'; $due_fim = $due.' 23:59:59'; $billings = $this->billingRepository->findWhere( [ ['due_date', '>=', $due_ini], ['due_date', '<=', $due_fim], ['billing_status_id', '=', 1] ] )->all(); foreach ($billings as $item) { $hire_id = $item->hirings_id; $installment = $item->installment; $hired = $this->hiring->findByField('id', $hire_id)->first(); $this->boletoService->makeBilletPaghiper($hired->payment_code, $installment); } \Log::useDailyFiles(storage_path() . '/logs/command.log'); \Log::alert('GenerateBoleto - Executado - ' . date('Y-m-d H:i:s')); return count($billings).' Boletos Gerados'; } } }
Copyright © 2026 - UnknownSec