@7365admin1/core 2.36.0 → 2.36.1
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 +6 -0
- package/dist/index.js +13 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31122,18 +31122,16 @@ function useSiteUnitBillingRepo() {
|
|
|
31122
31122
|
const endDate = new Date(dateTo);
|
|
31123
31123
|
endDate.setHours(23, 59, 59, 999);
|
|
31124
31124
|
dateExpr = {
|
|
31125
|
-
|
|
31126
|
-
$
|
|
31127
|
-
|
|
31128
|
-
{ $lte: ["$issueDate", endDate] }
|
|
31129
|
-
]
|
|
31125
|
+
issueDate: {
|
|
31126
|
+
$gte: startDate,
|
|
31127
|
+
$lte: endDate
|
|
31130
31128
|
}
|
|
31131
31129
|
};
|
|
31132
31130
|
}
|
|
31133
31131
|
const query = {
|
|
31134
31132
|
status,
|
|
31135
|
-
...ObjectId86.isValid(unitId) && { unitId: new ObjectId86(unitId) },
|
|
31136
|
-
...ObjectId86.isValid(site) && { site: new ObjectId86(site) },
|
|
31133
|
+
...unitId && ObjectId86.isValid(unitId) && { unitId: new ObjectId86(unitId) },
|
|
31134
|
+
...site && ObjectId86.isValid(site) && { site: new ObjectId86(site) },
|
|
31137
31135
|
...dateExpr
|
|
31138
31136
|
};
|
|
31139
31137
|
try {
|
|
@@ -37282,16 +37280,13 @@ function useStatementOfAccountService() {
|
|
|
37282
37280
|
if (user) {
|
|
37283
37281
|
value.createdByName = user.name;
|
|
37284
37282
|
}
|
|
37285
|
-
let unit_billings = await getUnitBillingBySite(
|
|
37286
|
-
|
|
37287
|
-
|
|
37288
|
-
|
|
37289
|
-
|
|
37290
|
-
|
|
37291
|
-
|
|
37292
|
-
},
|
|
37293
|
-
session
|
|
37294
|
-
);
|
|
37283
|
+
let unit_billings = await getUnitBillingBySite({
|
|
37284
|
+
status: "active",
|
|
37285
|
+
site: value.site.toString() ?? "",
|
|
37286
|
+
dateFrom,
|
|
37287
|
+
dateTo,
|
|
37288
|
+
unitId: value.unitId?.toString() ?? ""
|
|
37289
|
+
});
|
|
37295
37290
|
if (!unit_billings || unit_billings.length === 0) {
|
|
37296
37291
|
return unit_billings;
|
|
37297
37292
|
}
|
|
@@ -40861,8 +40856,7 @@ function useOccurrenceEntryService() {
|
|
|
40861
40856
|
updateOccurrenceEntryById: _updateOccurrenceEntryById,
|
|
40862
40857
|
getOccurrenceEntryById: _getOccurrenceEntryById,
|
|
40863
40858
|
getOccurrenceEntryByBookId: _getOccurrenceEntryByBookId,
|
|
40864
|
-
updateOccurrenceEntryByBookId: _updateOccurrenceEntryByBookId
|
|
40865
|
-
deleteOccurrenceEntryById: _deleteOccurrenceEntryById
|
|
40859
|
+
updateOccurrenceEntryByBookId: _updateOccurrenceEntryByBookId
|
|
40866
40860
|
} = useOccurrenceEntryRepo();
|
|
40867
40861
|
const {
|
|
40868
40862
|
getOccurrenceBookById: _getOccurrenceBookById,
|
|
@@ -40938,7 +40932,6 @@ function useOccurrenceEntryService() {
|
|
|
40938
40932
|
totalInput: book.totalInput + 1
|
|
40939
40933
|
});
|
|
40940
40934
|
await _add(value);
|
|
40941
|
-
await _deleteOccurrenceEntryById(id);
|
|
40942
40935
|
await session?.commitTransaction();
|
|
40943
40936
|
return "Successfully updated daily occurrence entry.";
|
|
40944
40937
|
} catch (error) {
|