diff --git a/backend/pages/rent/view/rent.ejs b/backend/pages/rent/view/rent.ejs index d0c59ee..9988c48 100644 --- a/backend/pages/rent/view/rent.ejs +++ b/backend/pages/rent/view/rent.ejs @@ -46,6 +46,10 @@

<%= t('Rent notice reminder') %>

<%= t('Friendly reminder for rent payment') %>

+ +

<%= t('Last rent notice reminder') %>

+

<%= t('Unfriendly reminder for rent payment') %>

+

<%= t('Rental invoice') %>

<%= t('Invoice stating the payment of the rent') %>

diff --git a/frontend/js/rent/middleware.js b/frontend/js/rent/middleware.js index f147ba0..5dd7fc7 100644 --- a/frontend/js/rent/middleware.js +++ b/frontend/js/rent/middleware.js @@ -140,6 +140,23 @@ class RentMiddleware extends ViewController { return false; }); + $(document).on('click', '#view-rent #emaillastrentcallreminder', () => { + const tenantIds = this.getSelectedIds(); + bootbox.confirm(i18next.t('Are you sure to send rent notices by email?'), (result) => { + if (!result) { + return; + } + application.sendEmail(tenantIds, 'rentcall_last_reminder', LOCA.currentYear, LOCA.currentMonth, status => { + bootbox.alert(this.emailStatus({results: status}), () => { + this.closeForm(() => { + this.loadList(); + }); + }); + }); + }); + return false; + }); + $(document).on('click', '#view-rent #printinvoices', () => { const selection = this.getSelectedIds(); application.openPrintPreview(`/print/invoice/occupants/${selection}/${LOCA.currentYear}/${LOCA.currentMonth}`); diff --git a/frontend/locales/en.json b/frontend/locales/en.json index 39844c9..af003f9 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -114,6 +114,7 @@ "Landloard": "Landloard", "Landloard information": "Landloard information", "Last name": "Last name", + "Last rent notice reminder": "Last rent notice reminder", "late month": "{{count}} month late", "late month_plural": "{{count}} months late", "Late rent - First reminder": "Late rent - First reminder", diff --git a/frontend/locales/fr.json b/frontend/locales/fr.json index e3c61a9..7cec33b 100644 --- a/frontend/locales/fr.json +++ b/frontend/locales/fr.json @@ -114,6 +114,7 @@ "Landloard": "Propriétaire", "Landloard information": "Information sur le propriétaire", "Last name": "Nom", + "Last rent notice reminder": "Dernier rappel d'avis d'échéance", "late month": "{{count}} mois de retard", "late month_plural": "{{count}} mois de retard", "Late rent - First reminder": "Loyer en retard - 1er rappel",