1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

close periods at 1 year minus 1 day + fix alert reminder transalation

This commit is contained in:
Sylvain 2019-03-18 14:45:21 +01:00
parent 7b0824a4a3
commit 03c0c0d4fb
2 changed files with 3 additions and 3 deletions

View File

@ -659,7 +659,7 @@ Application.Controllers.controller('ClosePeriodModalController', ['$scope', '$ui
function ($scope, $uibModalInstance, $window, Invoice, AccountingPeriod, periods, lastClosingEnd, dialogs, growl, _t) { function ($scope, $uibModalInstance, $window, Invoice, AccountingPeriod, periods, lastClosingEnd, dialogs, growl, _t) {
const YESTERDAY = moment.utc({ h: 0, m: 0, s: 0, ms: 0 }).subtract(1, 'day').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(); const LAST_CLOSING = moment.utc(lastClosingEnd.last_end_date).toDate();
const MAX_END = moment.utc(lastClosingEnd.last_end_date).add(1, 'year').toDate(); const MAX_END = moment.utc(lastClosingEnd.last_end_date).add(1, 'year').subtract(1, 'day').toDate();
/* PUBLIC SCOPE */ /* PUBLIC SCOPE */

View File

@ -1,7 +1,7 @@
json.title notification.notification_type json.title notification.notification_type
if notification.attached_object.class.name == AccountingPeriod.name if notification.attached_object.class.name == AccountingPeriod.name
json.description t('warning_last_closed_period_over_1_year', LAST_END: notification.attached_object.end_at) json.description t('.warning_last_closed_period_over_1_year', LAST_END: notification.attached_object.end_at)
else else
json.description t('warning_no_closed_periods', FIRST_DATE: notification.attached_object.created_at.to_date) json.description t('.warning_no_closed_periods', FIRST_DATE: notification.attached_object.created_at.to_date)
end end
json.url notification_url(notification, format: :json) json.url notification_url(notification, format: :json)