From 3045a809b320ab46e322f96f3b21917aab6b2f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 30 Aug 2022 18:03:55 +0200 Subject: [PATCH 1/2] add missing LDC_STATUS_CHECKER_API_KEY in .env.example --- .env.example | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 86c4f3d..06ee163 100644 --- a/.env.example +++ b/.env.example @@ -29,4 +29,6 @@ MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS=noreply-sw@ldc.fr MAIL_FROM_NAME="${APP_NAME}" MAIL_LIST_SERVICEWEB=equipe.web@ldc.fr -MAIL_ADMIN=equipe.web@ldc.fr \ No newline at end of file +MAIL_ADMIN=equipe.web@ldc.fr + +LDC_STATUS_CHECKER_API_KEY= From 74801fad1bc4f8c948885d25bcd91f30a4c5b31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 31 Aug 2022 12:06:30 +0200 Subject: [PATCH 2/2] Model Invoice : Add missing month on create --- app/Models/Invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index aab0f39..9f113d6 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -251,7 +251,7 @@ class Invoice extends Model static::creating(function (self $model) { $model->ref = \sprintf( '%s_%s_%s', - Carbon::now()->isoFormat('YYYY'), + Carbon::now()->isoFormat('YYYY-MM'), Str::padLeft((Invoice::whereYear('created_at', Carbon::now()->isoFormat('YYYY')) ->whereMonth('created_at', Carbon::now()->isoFormat('MM')) ->count() + 1) ?: 1, 4, '0'),