diff --git a/static/app.js b/static/app.js
index 86e1a64..c28541a 100644
--- a/static/app.js
+++ b/static/app.js
@@ -38,8 +38,8 @@ async function loadDashboard() {
const stats = document.getElementById('dash-stats');
stats.innerHTML = `
${d.active_rentals}
Location(s) en cours
- ${fmt€(d.revenue_month)}
Revenus ce mois
- ${fmt€(d.revenue_total)}
Revenus total
+ ${fmtEuro(d.revenue_month)}
Revenus ce mois
+ ${fmtEuro(d.revenue_total)}
Revenus total
${d.clients_count}
Clients
${d.pending_deposit_return}
Cautions à rendre
@@ -75,9 +75,9 @@ function renderTools() {
${esc(t.name)}
${esc(t.category||'')}
- ${fmt€(t.daily_price)}/j
- ${t.weekend_price ? `${fmt€(t.weekend_price)}/wk` : ''}
- ${t.deposit ? `🔒 ${fmt€(t.deposit)}` : ''}
+ ${fmtEuro(t.daily_price)}/j
+ ${t.weekend_price ? `${fmtEuro(t.weekend_price)}/wk` : ''}
+ ${t.deposit ? `🔒 ${fmtEuro(t.deposit)}` : ''}
`;
@@ -157,9 +157,9 @@ async function openToolDetail(id) {
${esc(t.name)} ${t.category ? `${esc(t.category)}` : ''}
${gallery}
@@ -167,7 +167,7 @@ async function openToolDetail(id) {
${rents.slice(0,5).map(r => `
👤 ${esc(r.client?.name||'')}
-
${fmtDate(r.start_date)} → ${fmtDate(r.end_date)}${fmt€(r.price)}${statusLabel(r.status)}
+
${fmtDate(r.start_date)} → ${fmtDate(r.end_date)}${fmtEuro(r.price)}${statusLabel(r.status)}
`).join('')}
${rents.length > 5 ? `… et ${rents.length-5} autres
` : ''}
@@ -283,7 +283,7 @@ async function openClientDetail(id) {
${c.rentals.slice(0,5).map(r => `
🔨 ${esc(r.tool_name)}
-
${fmtDate(r.start_date)} → ${fmtDate(r.end_date)}${fmt€(r.price)}${statusLabel(r.status)}
+
${fmtDate(r.start_date)} → ${fmtDate(r.end_date)}${fmtEuro(r.price)}${statusLabel(r.status)}
`).join('')}
`;
@@ -336,7 +336,7 @@ function renderRentals() {
🔨 ${esc(r.tool?.name||'')} — 👤 ${esc(r.client?.name||'')}
📅 ${fmtDate(r.start_date)} → ${fmtDate(r.end_date)}
- 💶 ${fmt€(r.price)}
+ 💶 ${fmtEuro(r.price)}
${r.platform ? `🔗 ${esc(r.platform.name)}` : ''}
${statusLabel(r.status)}
${r.deposit_collected && !r.deposit_returned ? '🔒 Caution à rendre' : ''}
@@ -378,7 +378,7 @@ function calcRentalPrice() {
const isWeekend = days <= 3 && [6,0].includes(new Date(start).getDay());
const price = isWeekend && t.weekend_price ? t.weekend_price : t.daily_price * days;
document.getElementById('rental-price').value = price.toFixed(2);
- document.getElementById('rental-price-hint').textContent = `${days} jour(s) × ${fmt€(t.daily_price)} = ${fmt€(price)} (estimé)`;
+ document.getElementById('rental-price-hint').textContent = `${days} jour(s) × ${fmtEuro(t.daily_price)} = ${fmtEuro(price)} (estimé)`;
}
async function saveRental() {
@@ -502,7 +502,7 @@ async function deletePlatform(id) {
}
// ─── Utils ──────────────────────────────────────────────────────────────────
-function fmt€(v) { return Number(v).toLocaleString('fr-FR', {style:'currency', currency:'EUR'}); }
+function fmtEuro(v) { return Number(v).toLocaleString('fr-FR', {style:'currency', currency:'EUR'}); }
function fmtDate(d) { if(!d) return '—'; return new Date(d+'T00:00:00').toLocaleDateString('fr-FR'); }
function esc(s) { return (s||'').replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); }
function statusLabel(s) {