From 30f8387ee89512a35710be72de8ced473c4ab51d Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Wed, 13 Sep 2023 11:10:10 +0100 Subject: [PATCH] fix: missing traductions and some issues --- app/Traits/Helper.php | 5 +++-- resources/lang/en/errors.php | 3 ++- resources/lang/fr/errors.php | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/Traits/Helper.php b/app/Traits/Helper.php index 53cab4d..5382203 100644 --- a/app/Traits/Helper.php +++ b/app/Traits/Helper.php @@ -440,9 +440,10 @@ trait Helper ->whereDate('next_payment_reminder', date('Y-m-d'))->get(); foreach ($invoices as $invoice) { - if (in_array($invoice->insurance->monthsGrid->payment_period, ['DAILY', 'MONTHLY'])) { + $paymentPeriod = $invoice->insurance->monthsGrid->payment_period; + if (in_array($paymentPeriod, ['DAILY', 'MONTHLY'])) { // Si le paiement est mensuel, se rassurer que cela fait deja 1 mois - if ($invoice->monthsGrid->payment_period == 'MONTHLY' && date_create($invoice->next_payment_deadline)->diff(new DateTime())->m < 1) { + if ($paymentPeriod == 'MONTHLY' && date_create($invoice->next_payment_deadline)->diff(new DateTime())->m < 1) { continue; } diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index 2140a1b..dc8fb69 100755 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -76,5 +76,6 @@ return [ "amount_not_allowed" => "This amount is not allowed. It must be between :min and :max", 'payment_not_available' => "Payment not available at this time. Please try again later", 'payment_not_found' => "Payment not found", - 'payment_invalid' => "Invalid payment" + 'payment_invalid' => "Invalid payment", + "transaction_already_completed" => "This transaction has already been completed", ]; diff --git a/resources/lang/fr/errors.php b/resources/lang/fr/errors.php index 291fbcf..8f194ce 100755 --- a/resources/lang/fr/errors.php +++ b/resources/lang/fr/errors.php @@ -79,5 +79,6 @@ return [ "amount_not_allowed" => "Ce montant n'est pas autorisé. Il doit être compris entre :min et :max", 'payment_not_available' => "Paiement non disponible pour le moment. Veuillez réessayer plus tard", 'payment_not_found' => "Paiement non trouvé", - 'payment_invalid' => "Paiement invalide" + 'payment_invalid' => "Paiement invalide", + "transaction_already_completed" => "Cette transaction a déjà été éffectuée", ];