1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-03-21 12:29:03 +01:00

fix date on period closing + improved confirmation msg

This commit is contained in:
Sylvain 2019-01-08 11:58:37 +01:00
parent ccff40b226
commit 84aa0c75ff
5 changed files with 10 additions and 7 deletions

View File

@ -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') }
)
};
}
}

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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