fix(server): date format of filtering transactions by date range

This commit is contained in:
Ahmed Bouhuolia
2023-08-29 02:41:40 +02:00
parent 75d8864aae
commit 84445d4bac
4 changed files with 6 additions and 13 deletions

View File

@@ -36,7 +36,7 @@ export default class InventoryTransaction extends TenantModel {
static get modifiers() {
return {
filterDateRange(query, startDate, endDate, type = 'day') {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
const dateFormat = 'YYYY-MM-DD';
const fromDate = moment(startDate).startOf(type).format(dateFormat);
const toDate = moment(endDate).endOf(type).format(dateFormat);