diff --git a/app/assets/javascripts/controllers/admin/invoices.js.erb b/app/assets/javascripts/controllers/admin/invoices.js.erb index 6fb6e1dcd..fd64f3a5f 100644 --- a/app/assets/javascripts/controllers/admin/invoices.js.erb +++ b/app/assets/javascripts/controllers/admin/invoices.js.erb @@ -620,8 +620,8 @@ Application.Controllers.controller('AvoirModalController', ['$scope', '$uibModal */ Application.Controllers.controller('ClosePeriodModalController', ['$scope', '$uibModalInstance', 'Invoice', 'AccountingPeriod', 'periods', 'lastClosingEnd','dialogs', 'growl', '_t', function ($scope, $uibModalInstance, Invoice, AccountingPeriod, periods, lastClosingEnd, dialogs, growl, _t) { - const YESTERDAY = moment().subtract(1, 'day').toDate(); - const LAST_CLOSING = moment(lastClosingEnd.last_end_date).toDate(); + const YESTERDAY = moment.utc({ h: 0, m: 0, s: 0, ms: 0 }).subtract(1, 'day').toDate(); + const LAST_CLOSING = moment.utc(lastClosingEnd.last_end_date).toDate(); /* PUBLIC SCOPE */ $scope.period = { @@ -663,7 +663,10 @@ Application.Controllers.controller('ClosePeriodModalController', ['$scope', '$ui object () { return { title: _t('invoices.confirmation_required'), - msg: _t('invoices.confirm_close') + msg: _t( + 'invoices.confirm_close_START_END', + { START: moment($scope.period.start_at).format('LL'), END: moment($scope.period.end_at).format('LL') } + ) }; } } diff --git a/config/locales/app.admin.en.yml b/config/locales/app.admin.en.yml index bc575fbb5..fa57cd4bb 100644 --- a/config/locales/app.admin.en.yml +++ b/config/locales/app.admin.en.yml @@ -413,7 +413,7 @@ en: closed_at: "Closed at" closed_by: "By" confirmation_required: "Confirmation required" - confirm_close: "Do you really want to close this accounting period ? Any subsequent changes will be impossible." + confirm_close_START_END: "Do you really want to close the accounting period between {{START}} and {{END}}? Any subsequent changes will be impossible." period_START_END_closed_success: "The accounting period from {{START}} to {{END}} has been successfully closed" failed_to_close_period: "An error occurred, unable to close the accounting period" no_periods: "No closings for now" diff --git a/config/locales/app.admin.es.yml b/config/locales/app.admin.es.yml index f2d1db67a..8ec292fb1 100644 --- a/config/locales/app.admin.es.yml +++ b/config/locales/app.admin.es.yml @@ -413,7 +413,7 @@ es: closed_at: "Closed at" # translation_missing closed_by: "By" # translation_missing confirmation_required: "Confirmation required" # translation_missing - confirm_close: "Do you really want to close this accounting period ? Any subsequent changes will be impossible." # translation_missing + confirm_close_START_END: "Do you really want to close the accounting period between {{START}} and {{END}}? Any subsequent changes will be impossible." # translation_missing period_START_END_closed_success: "The accounting period from {{START}} to {{END}} has been successfully closed" # translation_missing failed_to_close_period: "An error occurred, unable to close the accounting period" # translation_missing no_periods: "No closings for now" # translation_missing diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index 1734b8f2e..e385bfada 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -413,7 +413,7 @@ fr: closed_at: "Clôturé le" closed_by: "Par" confirmation_required: "Confirmation requise" - confirm_close: "Êtes-vous sur de vouloir clôturer cette période comptable ? Toute modification ultérieure sera impossible." + confirm_close_START_END: "Êtes-vous sur de vouloir clôturer la période comptable du {{START}} au {{END}} ? Toute modification ultérieure sera impossible." period_START_END_closed_success: "La période comptable du {{START}} au {{END}} a bien été clôturée" failed_to_close_period: "Une erreur est survenue, impossible de clôturer la période comptable" no_periods: "Aucune clôture pour le moment" diff --git a/config/locales/app.admin.pt.yml b/config/locales/app.admin.pt.yml index b569cb3f6..09bf45f61 100755 --- a/config/locales/app.admin.pt.yml +++ b/config/locales/app.admin.pt.yml @@ -413,7 +413,7 @@ pt: closed_at: "Closed at" # translation_missing closed_by: "By" # translation_missing confirmation_required: "Confirmation required" # translation_missing - confirm_close: "Do you really want to close this accounting period ? Any subsequent changes will be impossible." # translation_missing + confirm_close_START_END: "Do you really want to close the accounting period between {{START}} and {{END}}? Any subsequent changes will be impossible." # translation_missing period_START_END_closed_success: "The accounting period from {{START}} to {{END}} has been successfully closed" # translation_missing failed_to_close_period: "An error occurred, unable to close the accounting period" # translation_missing no_periods: "No closings for now" # translation_missing