nodebb-plugin-onekite-calendar 2.0.26 → 2.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/lib/admin.js +3 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog – calendar-onekite
|
|
2
2
|
|
|
3
|
+
## 1.3.22
|
|
4
|
+
- ACP / Comptabilisation : le nombre de **sorties gratuites** correspond maintenant au **nombre de matériels sortis** (une réservation pouvant contenir plusieurs matériels).
|
|
5
|
+
|
|
3
6
|
## 1.3.21
|
|
4
7
|
- Comptabilisation : les **sorties gratuites annulées** ne sont plus comptées (elles sont exclues si `cancelledAt` est présent, même si le statut est resté `paid`).
|
|
5
8
|
|
package/lib/admin.js
CHANGED
|
@@ -530,7 +530,9 @@ admin.getAccounting = async function (req, res) {
|
|
|
530
530
|
const endDate = formatFR(r.end);
|
|
531
531
|
|
|
532
532
|
if (isFree) {
|
|
533
|
-
|
|
533
|
+
// In accounting, "Sorties gratuites" should reflect the number of items actually taken out,
|
|
534
|
+
// not the number of reservation lines (a single reservation can include multiple items).
|
|
535
|
+
freeCount += Math.max(1, itemNames.length || 0);
|
|
534
536
|
} else {
|
|
535
537
|
paidCount += 1;
|
|
536
538
|
grandTotal += total;
|
package/package.json
CHANGED
package/plugin.json
CHANGED