From 960a50d6ba349f0b2607fffb5b0f60882bddc5b6 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Mon, 24 Jan 2022 09:04:44 +0100 Subject: [PATCH] Implements generation of invoice of health care sheets --- .env.example | 7 + .gitignore | 1 + app/BillingPeriodType.php | 11 + app/Http/Controllers/Controller.php | 2 + .../Controllers/HealthCareSheetController.php | 15 +- app/Http/Controllers/InsuranceController.php | 1 - .../InsuranceSubscriptionController.php | 2 - app/Http/Controllers/InsuredController.php | 3 - app/Http/Controllers/InvoiceController.php | 241 ++++++ app/Http/Controllers/QRCodeController.php | 138 --- app/InsuranceSubscriptionState.php | 1 + app/Models/NhHealthCareSheet.php | 4 +- app/Models/NhInvoice.php | 54 ++ bootstrap/app.php | 5 + composer.json | 6 +- config/mail.php | 110 +++ config/services.php | 3 +- ...144019_create_nh_infos_insurances_view.php | 1 + ..._01_18_154629_create_nh_invoices_table.php | 40 + ...oice_id_to_nh_health_care_sheets_table.php | 35 + ...1_162807_create_nh_infos_invoices_view.php | 38 + public/logo.png | Bin 0 -> 8001 bytes resources/lang/en/messages.php | 14 + resources/lang/en/states.php | 3 +- resources/lang/fr/messages.php | 14 + resources/lang/fr/states.php | 3 +- resources/views/emails/invoice.blade.php | 437 ++++++++++ resources/views/emails/qr_code.blade.php | 200 ----- resources/views/emails/tax_notice.blade.php | 795 ------------------ routes/web.php | 5 +- 30 files changed, 1032 insertions(+), 1157 deletions(-) create mode 100644 app/BillingPeriodType.php create mode 100755 app/Http/Controllers/InvoiceController.php delete mode 100755 app/Http/Controllers/QRCodeController.php create mode 100644 app/Models/NhInvoice.php create mode 100644 config/mail.php create mode 100644 database/migrations/2022_01_18_154629_create_nh_invoices_table.php create mode 100644 database/migrations/2022_01_18_160934_add_invoice_id_to_nh_health_care_sheets_table.php create mode 100644 database/migrations/2022_01_21_162807_create_nh_infos_invoices_view.php create mode 100644 public/logo.png create mode 100755 resources/views/emails/invoice.blade.php delete mode 100755 resources/views/emails/qr_code.blade.php delete mode 100755 resources/views/emails/tax_notice.blade.php diff --git a/.env.example b/.env.example index 1e84e37..3481adc 100644 --- a/.env.example +++ b/.env.example @@ -15,6 +15,13 @@ DB_DATABASE=iLink_prod DB_USERNAME=root DB_PASSWORD=vps@2017GA +MAIL_HOST=mail.ilink-app.com +MAIL_USERNAME=noreply@ilink-app.com +MAIL_PASSWORD=ilink2017GA +MAIL_FROM_ADDRESS=noreply@ilink-app.com +MAIL_FROM_NAME="iLink World" +MAIL_ENCRYPTION=tls + CACHE_DRIVER=file QUEUE_CONNECTION=sync diff --git a/.gitignore b/.gitignore index 5cf2731..446ec14 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ Homestead.yaml /public/swagger-ui-assets /public/insurances-subscriptions-docs /public/qrcodes +/public/invoices composer.lock diff --git a/app/BillingPeriodType.php b/app/BillingPeriodType.php new file mode 100644 index 0000000..f818416 --- /dev/null +++ b/app/BillingPeriodType.php @@ -0,0 +1,11 @@ +input('performances', []) as $p) { + $fees = !empty($p['home_visit_fees']) ? $p['home_visit_fees'] : 0; $performance = NhPerformance::create([ 'act_id' => $p['act_id'], 'amount' => $p['amount'], - 'home_visit_fees' => !empty($p['home_visit_fees']) ? $p['home_visit_fees'] : null, - 'moderator_ticket' => $parts->insured_part * $p['amount'], // to calculate, - 'insurance_amount' => $parts->insurer_part * $p['amount'], // to calculate, montant de l'assurance + 'home_visit_fees' => $fees != 0 ? $fees : null, + 'moderator_ticket' => $parts->insured_part * ($p['amount'] + $fees), // to calculate, + 'insurance_amount' => $parts->insurer_part * ($p['amount'] + $fees), // to calculate, montant de l'assurance 'created_at' => $datetime, 'updated_at' => $datetime, ]); @@ -1599,10 +1597,11 @@ class HealthCareSheetController extends Controller $performance->act_id = !empty($p['act_id']) ? $p['act_id'] : $performance->act_id; $performance->home_visit_fees = !empty($p['home_visit_fees']) ? $p['home_visit_fees'] : $performance->home_visit_fees; + $fees = !empty($performance->home_visit_fees) ? $performance->home_visit_fees : 0; if (!empty($p['amount'])) { $performance->amount = $p['amount']; - $performance->moderator_ticket = $parts->insured_part * $p['amount']; // to calculate, - $performance->insurance_amount = $parts->insurer_part * $p['amount']; // to calculate, montant de l'assurance + $performance->moderator_ticket = $parts->insured_part * ($p['amount'] + $fees); // to calculate, + $performance->insurance_amount = $parts->insurer_part * ($p['amount'] + $fees); // to calculate, montant de l'assurance } $performance->updated_at = $datetime; $performance->save(); diff --git a/app/Http/Controllers/InsuranceController.php b/app/Http/Controllers/InsuranceController.php index d572cc0..1e08a53 100644 --- a/app/Http/Controllers/InsuranceController.php +++ b/app/Http/Controllers/InsuranceController.php @@ -20,7 +20,6 @@ use Throwable; class InsuranceController extends Controller { - use Helper; /** * Create a new controller instance. diff --git a/app/Http/Controllers/InsuranceSubscriptionController.php b/app/Http/Controllers/InsuranceSubscriptionController.php index 5179f74..9e6bff8 100644 --- a/app/Http/Controllers/InsuranceSubscriptionController.php +++ b/app/Http/Controllers/InsuranceSubscriptionController.php @@ -32,8 +32,6 @@ use Throwable; class InsuranceSubscriptionController extends Controller { - use Helper; - /** * Create a new controller instance. * diff --git a/app/Http/Controllers/InsuredController.php b/app/Http/Controllers/InsuredController.php index 6bbfe8b..05ce1a1 100755 --- a/app/Http/Controllers/InsuredController.php +++ b/app/Http/Controllers/InsuredController.php @@ -18,9 +18,6 @@ use stdClass; class InsuredController extends Controller { - use ApiResponser; - use Helper; - /** * @OA\Get( * path="/insured", diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php new file mode 100755 index 0000000..33109f2 --- /dev/null +++ b/app/Http/Controllers/InvoiceController.php @@ -0,0 +1,241 @@ +validate($request, [ + 'network_agent_id' => 'required|integer|exists:networks_agents,id' + ]); + $network_agent_id = $request->input('network_agent_id'); + $agent = AgentPlus::where('network_agent_id', $network_agent_id)->first(); + $hyper = AgentPlus::where('network_id', $agent->network_id)->where('category', 'hyper')->first(); + $config = NhNetworksConfig::where('network_id', $agent->network_id)->first(); + if (!isset($config)) { + return $this->errorResponse("Le nano sante n'est pas actif pour ce reseau"); + } + + // executer le script chaque Dimanche a minuit + $start_at = new DateTime(); + switch ($config->provider_billing_period) { + case BillingPeriodType::WEEKLY: + $start_at->modify('-7 days'); + break; + case BillingPeriodType::BIMONTHLY: + $start_at->modify('-14 days'); + break; + case BillingPeriodType::MONTHLY: + $start_at->modify('-28 days'); + break; + default: + $start_at = new DateTime(); + } + + $end_at = new DateTime(); + + + $invoice_id = $this->generateInvoiceID($agent->code_membre); + $country = CountriesCurrency::findOrFail($agent->country_id); + $datetime = $this->getCurrentTimeByCountryCode($country->code_country); + + $totalInsurerAmount = 0; + $totalInsuredAmount = 0; + $sheets = NhHealthCareSheet::with(['insurance'])->where('network_agent_id', $network_agent_id)->where('state', InsuranceSubscriptionState::ACCEPTED) + ->where('created_at', '>=', $start_at)->where('created_at', '<=', $end_at)->get(); + + if (sizeof($sheets) == 0) { + return $this->errorResponse("Aucune feuille de soins acceptée"); + } + + foreach ($sheets as $sheet) { + $insurerAmount = 0; + $insuredAmount = 0; + + foreach ($sheet->performances as $p) { + $insurerAmount += ($p->moderator_ticket ?? 0); + $insuredAmount += ($p->insurance_amount ?? 0); + } + + foreach ($sheet->performances as $p) { + $insurerAmount += ($p->insured_paid_amount ?? 0); + $insuredAmount += ($p->insurer_paid_amount ?? 0); + } + + foreach ($sheet->performances as $p) { + $insurerAmount += ($p->insured_paid_amount ?? 0); + $insuredAmount += ($p->insurer_paid_amount ?? 0); + } + + $sheet->insurer_amount = $insurerAmount; + $sheet->insured_amount = $insuredAmount; + + $totalInsuredAmount += $insuredAmount; + $totalInsurerAmount += $insurerAmount; + + $sheet->date = $sheet->created_at->format('d/m/Y'); + } + + try { + DB::beginTransaction(); + + $directoryName = '/invoices/'; + $filename = $start_at->format('dmY') . '_' . $end_at->format('dmY') . '_' . $agent->code_membre . '.pdf'; + + $invoice = NhInvoice::create([ + 'invoice_id' => $invoice_id, + 'network_agent_id' => $agent->network_agent_id, + 'amount' => $totalInsuredAmount + $totalInsurerAmount, + 'insured_amount' => $totalInsuredAmount, + 'insurer_amount' => $totalInsurerAmount, + 'period_start_at' => $start_at, + 'period_end_at' => $end_at, + 'file_url' => config('services.app_url') . $directoryName . $filename, + 'created_at' => $datetime, + 'updated_at' => $datetime + ]); + + $invoice->amount = $this->toMoneyWithCurrencyCode($invoice->amount, $country->currency_code); + $invoice->insured_amount = $this->toMoneyWithCurrencyCode($invoice->insured_amount, $country->currency_code); + $invoice->insurer_amount = $this->toMoneyWithCurrencyCode($invoice->insurer_amount, $country->currency_code); + $invoice->home_visit_fees = $this->toMoneyWithCurrencyCode($invoice->home_visit_fees, $country->currency_code); + + $ids = array_map(function ($r) { + return $r['id']; + }, $sheets->toArray()); + + DB::update("UPDATE nh_health_care_sheets SET state = :state_ , invoice_id = :id WHERE id IN (" . implode(',', $ids) . ")", + ['id' => $invoice->id, 'state_' => InsuranceSubscriptionState::INVOICE_ISSUED]); + + $invoice->sheets = $sheets; + $invoice->agent = $agent; + $invoice->hyper = $hyper; + $invoice->period = $start_at->format('d/m/Y') . ' ' . trans('messages.to') . ' ' . $end_at->format('d/m/Y'); + + //Check if the directory already exists. + if (!is_dir(public_path($directoryName))) { + //Directory does not exist, so lets create it. + mkdir($directoryName, 0755); + } + + $title = trans('messages.invoice') . ' ' . $invoice->period; + $message = ""; + + $file = PDF::loadView('emails.invoice', $invoice->toArray())->setPaper('a4', 'landscape')->setWarnings(false)->save(public_path($directoryName . $filename)); + + DB::commit(); + $recipients = [preg_replace("/\s+/", "", $hyper->email)]; // Supprimer les espaces dans le mail + Mail::mailer('smtp')->raw($message, function ($message) use ($recipients, $title, $file) { + $message->subject($title) + ->to($recipients) + ->attachData($file->output(), $title . '.pdf'); + }); + + } catch (\Throwable $t) { + DB::rollBack(); + Log::error('-------- Mail not sent -----------'); + Log::error($t->getMessage() . " :\n" . $t->getTraceAsString()); + } + + return $this->successResponse("Invoice generated"); + } + + private function generateInvoiceID($agent_code) + { + return date('d') . '/' . date('m') . '/' . date('Y') . '/' . $agent_code; + } +} diff --git a/app/Http/Controllers/QRCodeController.php b/app/Http/Controllers/QRCodeController.php deleted file mode 100755 index 1666123..0000000 --- a/app/Http/Controllers/QRCodeController.php +++ /dev/null @@ -1,138 +0,0 @@ - $user->lastname, 'data' => $user->id]) - ->setPaper('a4', 'portrait')->setWarnings(false)->save(public_path($directoryName . $user->id . '.pdf')); -// $recipients = [preg_replace("/\s+/", "", $email)]; // Supprimer les espaces dans le mail -// Mail::mailer('smtp')->raw($messageText, function ($message) use ($recipients, $title, $pdf, $notice) { -// $message->subject($title) -// ->to($recipients) -// ->attachData($pdf->output(), $title . ' - ' . $notice->id_tax_notice . ".pdf"); -// }); - - $user->has_qr_code = 1; - $user->save(); - return $this->successResponse(trans('messages.successful_transaction')); - } catch (\Throwable $t) { - Log::error('-------- Mail not sent -----------'); - Log::error($t->getMessage()); - return $this->errorResponse(trans('errors.unexpected_error')); - } - } - - /** - * @OA\Get( - * path="/qrcode/read/{id_user}", - * summary="Lire les informations à partir de l'id de l'utilisateur obtenu en scanant le QRCode", - * tags={"QRCode"}, - * security={{"api_key":{}}}, - * @OA\Parameter( - * parameter="id_user", - * name="id_user", - * description="ID de l'utilisateur", - * @OA\Schema( - * type="integer" - * ), - * in="path", - * required=true - * ), - * @OA\Response( - * response=200, - * description="OK", - * @OA\JsonContent( - * ref="#/components/schemas/ApiResponse", - * example = { - * "status" : 200, - * "response" : {"id":349,"uid":"5fcb90ab7197f8.26608831", - * "firstname":null,"lastname":"Tom Di","phone":"+237690716648","email":"ddoubletom@gmail.com","user_code":"vdVtq7ym9S","numero_carte":null, - * "expiration_date":null,"adresse":"kotto","solde":0,"salt":"dbbaea33d9","validation_code":"xuty8dbq","active":1,"date_modified":"2020-12-05T14:52:43.000000Z", - * "date_created":"2020-12-05T14:52:43.000000Z","network_id":185,"group_id":null,"balance_credit":0,"balance_epargne":0,"balance_nano_health":11335000, - * "date_adhesion":null,"id_bank_country":null,"iban":null}, - * "error":null - * } - * ) - * ) - * ) - */ - //Lire les infos d'un utilisateur à partir de son id - public function read($id_user) - { - $user = User::findOrFail($id_user); - return $this->successResponse($user); - } - - /** - * @OA\Get( - * path="/qrcode/image/{id_user}", - * summary="Generer l'image du QRCode d'un utilisateur à partir de son id", - * tags={"QRCode"}, - * security={{"api_key":{}}}, - * @OA\Parameter( - * parameter="id_user", - * name="id_user", - * description="ID de l'utilisateur", - * @OA\Schema( - * type="integer" - * ), - * in="path", - * required=true - * ), - * @OA\Response( - * response=200, - * description="OK", - * @OA\JsonContent( - * ref="#/components/schemas/ApiResponse", - * example = { - * "status" : 200, - * "response" : "image en base64", - * "error":null - * } - * ) - * ) - * ) - */ - //Generer l'image du QRCode d'un utilisateur à partir de son id - public function image($id_user) - { - $user = User::findOrFail($id_user); - return $this->successResponse(base64_encode(\SimpleSoftwareIO\QrCode\Facades\QrCode::format('svg') - ->size(300)->errorCorrection('H') - ->generate($user->id))); - } -} diff --git a/app/InsuranceSubscriptionState.php b/app/InsuranceSubscriptionState.php index 44b3a89..ccbf3c5 100644 --- a/app/InsuranceSubscriptionState.php +++ b/app/InsuranceSubscriptionState.php @@ -8,4 +8,5 @@ abstract class InsuranceSubscriptionState const AWAITING_FURTHER_INFORMATION = 'AWAITING_FURTHER_INFORMATION'; const ACCEPTED = 'ACCEPTED'; const REJECTED = 'REJECTED'; + const INVOICE_ISSUED = 'INVOICE_ISSUED'; } diff --git a/app/Models/NhHealthCareSheet.php b/app/Models/NhHealthCareSheet.php index fa7cf5c..9783be8 100644 --- a/app/Models/NhHealthCareSheet.php +++ b/app/Models/NhHealthCareSheet.php @@ -30,6 +30,7 @@ use Illuminate\Database\Eloquent\Model; * @property string $type * @property string $state * @property int $prescription_sheet_id + * @property int $invoice_id * @property Carbon $created_at * @property Carbon $updated_at * @@ -69,7 +70,8 @@ class NhHealthCareSheet extends Model 'pregnancy_end_at', 'type', 'state', - 'prescription_sheet_id' + 'prescription_sheet_id', + 'invoice_id' ]; public function institution() diff --git a/app/Models/NhInvoice.php b/app/Models/NhInvoice.php new file mode 100644 index 0000000..c674c93 --- /dev/null +++ b/app/Models/NhInvoice.php @@ -0,0 +1,54 @@ + 'int', + ]; + + protected $dates = [ + 'period_start_at', + 'period_end_at' + ]; + + protected $fillable = [ + 'invoice_id', + 'network_agent_id', + 'amount', + 'insured_amount', + 'insurer_amount', + 'period_start_at', + 'period_end_at', + 'file_url', + 'created_at', + 'updated_at' + ]; +} diff --git a/bootstrap/app.php b/bootstrap/app.php index 8dee8e8..98328bf 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -64,6 +64,10 @@ $app->configure('swagger-lume'); $app->configure('services'); $app->configure('sentry'); $app->configure('dompdf'); +$app->configure('mail'); +$app->alias('mailer', Illuminate\Mail\Mailer::class); +$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class); +$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class); /* |-------------------------------------------------------------------------- @@ -105,6 +109,7 @@ $app->register(\MigrationsGenerator\MigrationsGeneratorServiceProvider::class); $app->register('Sentry\Laravel\ServiceProvider'); $app->register('Sentry\Laravel\Tracing\ServiceProvider'); $app->register(\Barryvdh\DomPDF\ServiceProvider::class); +$app->register(Illuminate\Mail\MailServiceProvider::class); /* |-------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index be28a44..eeccfa5 100644 --- a/composer.json +++ b/composer.json @@ -7,15 +7,17 @@ "require": { "php": "^7.3|^8.0", "ext-gd": "*", + "ext-intl": "*", "ext-json": "*", "barryvdh/laravel-dompdf": "^0.9.0", "brick/money": "^0.5.2", "darkaonline/swagger-lume": "^8.0", + "fightbulc/moment": "^1.33", "guzzlehttp/guzzle": "^7.3", + "illuminate/mail": "^8.80", "kitloong/laravel-migrations-generator": "^5.0", "laravel/lumen-framework": "^8.0", - "sentry/sentry-laravel": "^2.9", - "simplesoftwareio/simple-qrcode": "^4.2" + "sentry/sentry-laravel": "^2.9" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 0000000..54299aa --- /dev/null +++ b/config/mail.php @@ -0,0 +1,110 @@ + env('MAIL_MAILER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" + | + */ + + 'mailers' => [ + 'smtp' => [ + 'transport' => 'smtp', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'port' => env('MAIL_PORT', 587), + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'auth_mode' => null, + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + ], + + 'postmark' => [ + 'transport' => 'postmark', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => '/usr/sbin/sendmail -bs', + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/config/services.php b/config/services.php index 5f43c97..6f959ad 100755 --- a/config/services.php +++ b/config/services.php @@ -5,5 +5,6 @@ return [ 'notification_service' => [ 'base_uri' => env('NOTIFICATION_SERVICE_URL'), 'key' => env('NOTIFICATION_SERVICE_KEY') - ] + ], + 'app_url' => env('APP_URL') ]; diff --git a/database/migrations/2021_11_04_144019_create_nh_infos_insurances_view.php b/database/migrations/2021_11_04_144019_create_nh_infos_insurances_view.php index f4385e4..1f3294e 100644 --- a/database/migrations/2021_11_04_144019_create_nh_infos_insurances_view.php +++ b/database/migrations/2021_11_04_144019_create_nh_infos_insurances_view.php @@ -2,6 +2,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; class CreateNhInfosInsurancesView extends Migration diff --git a/database/migrations/2022_01_18_154629_create_nh_invoices_table.php b/database/migrations/2022_01_18_154629_create_nh_invoices_table.php new file mode 100644 index 0000000..b000d74 --- /dev/null +++ b/database/migrations/2022_01_18_154629_create_nh_invoices_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('invoice_id'); + $table->integer('network_agent_id'); + $table->decimal('amount', 12, 2); + $table->decimal('insured_amount', 10, 2)->comment("Part à payer par assuré"); + $table->decimal('insurer_amount', 10, 2)->comment("Part à la charge assureur"); + $table->date('period_start_at'); + $table->date('period_end_at'); + $table->string('file_url')->nullable(); + $table->timestamp('created_at')->useCurrent(); + $table->timestamp('updated_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('nh_invoices'); + } +} diff --git a/database/migrations/2022_01_18_160934_add_invoice_id_to_nh_health_care_sheets_table.php b/database/migrations/2022_01_18_160934_add_invoice_id_to_nh_health_care_sheets_table.php new file mode 100644 index 0000000..0911f70 --- /dev/null +++ b/database/migrations/2022_01_18_160934_add_invoice_id_to_nh_health_care_sheets_table.php @@ -0,0 +1,35 @@ +integer('invoice_id')->after('prescription_sheet_id')->nullable(); + DB::statement("ALTER TABLE nh_health_care_sheets MODIFY state + ENUM('UNDER_VALIDATION', 'ACCEPTED', 'REJECTED', 'INVOICE_ISSUED') DEFAULT 'UNDER_VALIDATION' NOT NULL;"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nh_health_care_sheets', function (Blueprint $table) { + $table->dropColumn('invoice_id'); + }); + } +} diff --git a/database/migrations/2022_01_21_162807_create_nh_infos_invoices_view.php b/database/migrations/2022_01_21_162807_create_nh_infos_invoices_view.php new file mode 100644 index 0000000..215f47d --- /dev/null +++ b/database/migrations/2022_01_21_162807_create_nh_infos_invoices_view.php @@ -0,0 +1,38 @@ +ApSy_jyT!WEtYul6vc& zd{q}+92WSZU zx$oGGtlOiM;oAU!P1X}EVe)yDPXwr9;G_bC6p%Xs0Q_niK!D9NWo7_ClMV?0m_)~t z0)D;;7X<*4|7Yv}9|S;sEMZX8GHT&bxFlv7pE=q>8xTIul%Xil7;PH&t<{* z;JIa>vAa&|-Zo)_eJ0f~vA}=-2TB%j>Pd~St1qf`{pndsW58FoINJ2VkCnE9ARsWD z))%bs)>_wb!PeXgM_3t%pj|-0$pWMo8UnwHh$d`ar2a@}hC+*}n%$-!k$!bNExF+R==#x8f1Q{i_Q5Coi_-MXf#yNY{6xCw# z9r?09B<(Yl0W;0pxcZVpW^yQh**Ia*atM-jK`B3>ZKdD{9fnOECQRg_m->} z?C=07m*E;ID^a1?M(wcmDF?-?`P-u-vhYpgrToI#?S#V@e1zE#d0JT`t`I+v^u4G#y9Ezmqm9 z^LwZIRF6+o?d*L7tEFyu5}NEl(lbwhW^#2_pO&F20*`naUA)fyL(-e#T91^ zBn0rzf4Lcyip9eWDnmO8o1Ng%g&$7;P4$)F^PYpWwRE4Psp?Fj#}c%nJii)`q6%h4 z3hG8z?mU^cA_@JSL1Ub8F`#hq4zB+B zp~>{l+zY#sJ8S#}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H#&Ue!j>bS0Br zV$OIzt0Wuuo{w|PakK_0{cn13J!uPPS%G_(8Brs>|11fS7Bh#NW46k^0H!l6t>h$BRB?fw}QP z`fx(qRX>X{t8DMv^kDGzbxd+bDWvooysiu>tO%~Kazpy{Tn!j#9jh zIeSEXIdWTID*o$`ZC0{Q*Tm$#+17VUi-*-I&JD$usSmH$j2%pFsx1&BN3g~>gq|=P z>OSn-Sk%JRmZqi)6GkW^kSlkQis4mKk~VNq**b27;PIOXdO0a?0_OlJwKWF!xCp1c z(%HOE$+#|fPr#IoG1naSGC1XRCV7SRGa>95iguIS|2*cg6A~LG)$+|C_hiBCsw02W9boj?m=Z_Y<(8CygN@P#I?b_bdkJupbbD$H_Ff z(J8wi#v4m2>n~6I$I5N`gaEWDD(@Xb@7p~iGTlAIdAgo0M!%uF!#OIr=5a)vJ?6Qu z>_{PJ?0inh$XFgLY5=RO-~&d@g=gYD!EVQq< z7bN1O;$V>PDv2y{V)0*K@iW%5J#fazw>QpON5zubyxj#_4&6N4xOL6^858KZ%A~hO zxL=ETWxz0~^V>as+Dz{fc+emL=P%&U{p-foB+XgUQoXFaJohNFl>)aNpANzs>=Zix zIAvi9guPR~^E!r%Gqc8*K5Ng()ssDKA~{jRZ;2v$tc(&=BAd>z13%?K&mHLRzca zU8Q5MP@0VaO%9zAk zi+Mx9+$?LuN#iYt=-8L0P?9Q<*&){6E$Nzz+s360V>>H#ZlR3fu^+uH9%r83doM*= zC89U9g!DdNy4wN>qCSsMNdcF1$l+C9{r&O{NnG@8 zJ3#S^@RPe>+qS+_Y_aB)j?)hg(h$awSfA>rUv!&Douq*ECM|aXM&B7(kY-tjqfFhi zmYJD1X$VaKK)o-rj#(R17rn7765P$$T^CIR&@>X_#PEW!UJ=m5JcMpjq0odeCBUSi zhSJFx5nxVVy>tSiOtdbsItf01Sw!Sb2S$`Kjzy!{3HH0KjVlh{mvz{Sw3s "The care sheet has been resubmitted", 'execution_carried_out' => "Execution of prescription carried out", 'consultation_or_prescription_updated' => "Consultation or prescription updated", + 'amount' => 'Amount', + 'total_amount' => 'Total Amount', + 'insured_part' => 'Insured Part', + 'total_insured_part' => 'Total Insured Part', + 'insurance_part' => 'Insurance_part', + 'total_insurance_part' => 'Total Insurance Part', + 'to' => 'to', + 'invoice' => 'Invoice', + 'provider_institution_code' => 'provider_institution_code', + 'insurance_name' => 'Insurance name', + 'institution_name' => "Institution name", + 'phone' => "Telephone", + 'transmitter' => "Transmitter", + 'recipient' => "Recipient" ]; diff --git a/resources/lang/en/states.php b/resources/lang/en/states.php index 34645ce..7ca150d 100755 --- a/resources/lang/en/states.php +++ b/resources/lang/en/states.php @@ -24,5 +24,6 @@ return [ 'LONG_TERM_AFFECTION' => "LONG TERM AFFECTION", 'EXONERATION' => "EXONERATION", 'HAVING_RIGHT' => "HAVING RIGHT", - 'INSURED' => 'INSURED' + 'INSURED' => 'INSURED', + 'INVOICE_ISSUED' => 'INVOICE ISSUED' ]; diff --git a/resources/lang/fr/messages.php b/resources/lang/fr/messages.php index e6dc951..cba8f19 100755 --- a/resources/lang/fr/messages.php +++ b/resources/lang/fr/messages.php @@ -130,4 +130,18 @@ Une nouvelle execution de prescription vient d'etre effectuée sur votre assuran Connectez-vous à l'application pour avoir plus de details et valider cette opération. ", 'consultation_or_prescription_updated' => "Consultation ou prescription mise à jour", + 'amount' => 'Montant', + 'total_amount' => 'Total Montant', + 'insured_part' => 'Part assuré', + 'total_insured_part' => 'Total Part assuré', + 'insurance_part' => 'Part assurance', + 'total_insurance_part' => 'Total Part assurance', + 'to' => 'au', + 'invoice' => 'Facture', + 'provider_institution_code' => 'Code établissement prestataire', + 'insurance_name' => 'Nom assurance', + 'institution_name' => "Nom établissement", + 'phone' => "Téléphone", + 'transmitter' => "Émetteur", + 'recipient' => "Destinataire" ]; diff --git a/resources/lang/fr/states.php b/resources/lang/fr/states.php index 0c2b54d..0d61c2e 100755 --- a/resources/lang/fr/states.php +++ b/resources/lang/fr/states.php @@ -24,5 +24,6 @@ return [ 'LONG_TERM_AFFECTION' => "AFFECTION LONGUE DURÉE", 'EXONERATION' => "EXONERATION", 'HAVING_RIGHT' => "AYANT DROIT", - 'INSURED' => 'ASSURÉ' + 'INSURED' => 'ASSURÉ', + 'INVOICE_ISSUED' => 'FACTURE ÉMISE' ]; diff --git a/resources/views/emails/invoice.blade.php b/resources/views/emails/invoice.blade.php new file mode 100755 index 0000000..2f1193e --- /dev/null +++ b/resources/views/emails/invoice.blade.php @@ -0,0 +1,437 @@ + + + + + + + + + + + + + +
+ + iLink World Corporation + +

-------------------

+ +

Le numérique au service de l'inclusion financière

+ +

+ + {{__('messages.invoice')}} N° {{$invoice_id}} +
{{$period}} +

+ + {{--

--}} + {{-- En application de la loi des finances rectificative 2009, Titre III relatives aux ressources des collectivités--}} + {{-- locales en son article 15--}} + {{-- et de la Délibération n°006/PE/DKM/CA/CM/SG du 26 juin 2014 portant prélèvement des droits et taxes sur--}} + {{-- le territoire de la Commune d’Akanda.--}} + {{--

--}} + + + + + + + + + + + + + + + + {{-- --}} + {{-- --}} + + + + + {{-- --}} + {{-- --}} + +
+

{{__('messages.transmitter')}} +

+
+

{{__('messages.recipient')}} +

+
+

{{__('messages.provider_institution_code')}} +

+
+

{{$agent->code_membre}}

+
+

{{__('messages.insurance_name')}}

+
+

{{$hyper->lastname}} +

+
+

{{__('messages.insurance_name')}} +

+
+

{{$agent->lastname}}

+
--}} + {{--

Quartier

--}} + {{--
--}} + {{--

{{$neighborhood}}--}} + {{--

--}} + {{--
+

{{__('messages.phone')}} +

+
+

{{$agent->phone}}

+
--}} + {{--

Année N-1 {{$registration_year-1}}

--}} + {{--
--}} + {{--

{{ $year_tax_paid_N_1 ? 'Payé' : 'Non Payé' }}--}} + {{--

--}} + {{--
+ +

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +

+ +

Détail des feuilles de soins pour la période: +

+ + + + + + + + + + + + + + + + @foreach($sheets as $sheet) + + + + + + + + + + + + + @endforeach +
+

N° Feuille +

+
+

Type +

+
+

Patient

+
+

Praticien

+
+

N° Assuré +

+
+

{{__('messages.amount')}} +

+
+

{{__('messages.insured_part')}} +

+
+

{{__('messages.insurance_part')}} +

+
+

Date +

+
+

{{$sheet->health_care_sheet_id}}

+
+

{{$sheet->type}}

+
+

{{$sheet->patient_lastname.' '.$sheet->patient_firstname}}

+
+

{{$sheet->practitioner_lastname.' '.$sheet->practitioner_firstname}}

+
+

{{$sheet->insurance->insured_id}} +

+
+

{{$fmt->format($sheet->insured_amount + $sheet->insurer_amount)}} +

+
+

{{$fmt->format($sheet->insured_amount)}} +

+
+

{{$fmt->format($sheet->insurer_amount)}} +

+
+

{{$sheet->date}} +

+
+ +

 

+ + + + + + + + + + + + + + +
+

{{strtoupper(__('messages.total_amount'))}}

+
+

{{$amount}} +

+
+

{{mb_strtoupper(__('messages.total_insured_part'),'UTF-8')}}

+
+

{{$insured_amount}} +

+
+

{{strtoupper(__('messages.total_insurance_part'))}}

+
+

{{$insurer_amount}} +

+
+ + + + + diff --git a/resources/views/emails/qr_code.blade.php b/resources/views/emails/qr_code.blade.php deleted file mode 100755 index 59a88fa..0000000 --- a/resources/views/emails/qr_code.blade.php +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - - -
- -

- REPUBLIQUE GABONAISE - - ------------------- - - Union-Travail-Justice - - PROVINCE -DE L’ESTUAIRE

- -

-------------------

- -

DEPARTEMENT DU KOMO-MONDAH

- -

-----------------

- -

COMMUNE D’AKANDA

- -

---------------

- -

SECRETARIAT GENERAL

- -

-----------------

- -

SERVICE FISCALITE ET RECOUVREMENT

- -

QR CODE - {{$lastname}} -

- -
- -
-
- - - diff --git a/resources/views/emails/tax_notice.blade.php b/resources/views/emails/tax_notice.blade.php deleted file mode 100755 index 80e00fe..0000000 --- a/resources/views/emails/tax_notice.blade.php +++ /dev/null @@ -1,795 +0,0 @@ - - - - - - - - - - - - - -
- -

- REPUBLIQUE GABONAISE - - ------------------- - - Union-Travail-Justice - - PROVINCE -DE L’ESTUAIRE

- -

-------------------

- -

DEPARTEMENT DU KOMO-MONDAH

- -

-----------------

- -

COMMUNE D’AKANDA

- -

---------------

- -

SECRETARIAT GENERAL

- -

-----------------

- -

SERVICE FISCALITE ET RECOUVREMENT

- -

AVIS -DE RECOUVREMENT N° {{$id_tax_notice}}

- -

- En application de la loi des finances rectificative 2009, Titre III relatives aux ressources des collectivités - locales en son article 15 - et de la Délibération n°006/PE/DKM/CA/CM/SG du 26 juin 2014 portant prélèvement des droits et taxes sur - le territoire de la Commune d’Akanda. -

- - -

Il est établi un avis de recouvrement relatif à vos activités ci-après défini : -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opérateur - économique d’Akanda

-
-

Administration - Municipale

-
-

Nom/Identifiant - OPEC

-
-

{{$lastname}}

-
-

Arrondissement

-
-

{{$district}} -

-
-

Non du - Responsable

-
-

{{$responsable_name}}

-
-

Quartier

-
-

{{$neighborhood}} -

-
-

N° RCCM -

-
-

{{$trade_registry}}

-
-

Activité

-
-

{{$activity_type}} -

-
-

NIF -

-
-

{{$identification_number}}

-
-

Année N-1 {{$registration_year-1}}

-
-

{{ $year_tax_paid_N_1 ? 'Payé' : 'Non Payé' }} -

-
-

Patente -

-
-

{{ isset($id_patente) ? 'N° '.$id_patente : 'Non' }}

-
-

Année N-2 {{$registration_year-2}}

-
-

{{ $year_tax_paid_N_2 ? 'Payé' : 'Non Payé' }} -

-
-

Agrément -

-
-

{{ isset($technical_approval) ? 'N° '.$technical_approval : 'Non' }}

-
-

Année N-3 {{$registration_year-3}}

-
-

{{ $year_tax_paid_N_3 ? 'Payé' : 'Non Payé' }} -

-
-

TVA -

-
-

{{ $TVA ? 'Oui' : 'Non' }}

-
-

 

-
-

  -

-
-

IRPP -

-
-

{{ $IRPP ? 'Oui' : 'Non' }}

-
-

 

-
-

  -

-
-

Localisation -

-
-

N_____E_____O_____S_____

-
-

-
-

-

-
-

{{ $adresse }}

-
-

Pénalité d’office

-
-

{{$office_penalties}} -

-
-

Contact(s) -

-
-

{{$phone}}

-
-

Pénalités par mois de retard

-
-

{{$month_delay_penalties}} -

-
- -

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -

- - - - - - - - - - - - - @foreach($taxes as $tax) - format($tax->amount); - $unit = $tax->measurement_unit; - if ($tax->measurement_unit == 'forfait') { - $quantity = $tax->count; - if ($tax->billing_period == 'jour') { - $quantity = $jours * $quantity; - $unit = 'jour'; - } - if ($tax->billing_period == 'trimestre') { - $quantity = 4 * $quantity; - $unit = 'trimestre'; - } - if ($tax->billing_period == 'semestre') { - $quantity = 2 * $quantity; - $unit = 'semestre'; - } - } elseif (strpos($tax->measurement_unit, '/')) { - $quantity = $fmt->format($tax->tax_units_count) . ' / ' . $fmt->format($tax->units_per_tax_unit_count); - } else { - $quantity = $fmt->format($tax->tax_units_count); - } - - if ($tax->measurement_unit == '%') { - $unit_price = $fmt->format($tax->unit_price) . ' %'; - } else { - $unit_price = $fmt->format($tax->unit_price); - } - ?> - - - - - - - - - @endforeach -
-

Imputation -

-
-

Libellé - taxe(s) ou redevance(s)

-
-

Unité -

-
-

Qté -

-
-

Prix - Unitaire

-
-

Total -

-
-

{{$tax->imputation}}

-
-

{{$tax->name}}

-
-

{{$unit}} -

-
-

{{$quantity}} -

-
-

{{$unit_price}} -

-
-

{{$tax_amount}} -

-
- -

 

- @if(isset($penalties) and sizeof($penalties) > 0) - - - - - - - - - - - - @foreach($penalties as $penalty) - - - - - - - - - - - @endforeach -
-

Imputation -

-
-

Libellé pénalité(s) -

-
-

Unité -

-
-

Qté -

-
-

Prix - Unitaire

-
-

Taux

-
-

Total -

-
-

{{$penalty->imputation}}

-
-

{{$penalty->name}}

-
-

{{$penalty->n_order == 2 ? $penalty->unit : ''}} -

-
-

{{$penalty->n_order == 2 ? $penalty->quantity : ''}} -

-
-

{{$penalty->n_order == 2 ? $fmt->format($penalty->unit_price_no_formatted) : ''}} -

-
-

{{$penalty->n_order == 1 ?$penalty->rate.'%' : ''}} -

-
-

{{$penalty->n_order == 1 ? $fmt->format($penalty->amount) : $fmt->format($penalty->tax_amount)}} -

-
- -

  - @endif - - - - - -
-

TOTAL A PAYER

-
-

{{$amount}} -

-
- -

 

- -

 

- -

Arrêté le présent avis à la -somme de {{$amount}}

- -

Date limite de paiement : {{$payment_deadline_date}}

- -

 

- -

Les règlements s’effectuent à la Perception Municipale d’Okala -sur présentation d’un(es) ordre(s) de recette(s) préalablement établi(s) au -Service Finances et Comptabilité à l’Hôtel de Ville de la Mairie d’Akanda (heures -d’ouverture de 09H-15H). En cas de règlement par chèque (CERTIFIE), le -libeller au nom du Receveur municipale. 

- -

 

- -

Toute infraction aux -dispositions de la présente délibération entraine l’application des sanctions -prévues au code des impôts relatives à l’application des pénalités :

- -

 

- -

-        -Pénalité d’office de {{$officePenaltyPercent ?? 10}} % des droits éludés passé le délai de -paiement ;

- -

-        -{{$monthDelayPenaltyPercent ?? 3}} % par mois de retard ;

- -

-        -Enfin, en cas de contestation ou de réclamation, vous munir des -pièces justificatives.

- -

 

- -

 

- -
- -

_____________________________________________________________________________________________________________________ -

-

Service Comptabilité, Fiscalité et recouvrement I Mairie d’Akanda-Hôtel de Ville

-

Contacts : +241 00 000 000 0 / +241 002 6660 50

-

 

- - - - diff --git a/routes/web.php b/routes/web.php index 1f5ccfc..556fdd7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -50,8 +50,5 @@ $router->group(['prefix' => '', 'middleware' => 'auth'], function () use ($route $router->get('health-care-sheets/{id}', 'HealthCareSheetController@getOneHealthCareSheets'); $router->put('health-care-sheets/{id}', 'HealthCareSheetController@updateHealthCareSheet'); - //QRCode for agents - $router->get('qrcode/generate/{id_user}', 'QRCodeController@generate'); - $router->get('qrcode/read/{id_user}', 'QRCodeController@read'); - $router->get('qrcode/image/{id_user}', 'QRCodeController@image'); + $router->get('generate-invoice', 'InvoiceController@generateInvoice'); });