chore: format csv date
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s

This commit is contained in:
Methapon2001 2025-03-05 17:51:48 +07:00
parent 35fe9c69d1
commit ba3ab9f7e4

View file

@ -32,7 +32,9 @@ export class StatsController extends Controller {
@Query() endDate?: Date,
) {
this.setHeader("Content-Type", "text/csv");
return json2csv(await this.quotationReport(req, limit, startDate, endDate));
return json2csv(await this.quotationReport(req, limit, startDate, endDate), {
useDateIso8601Format: true,
});
}
@Get("quotation")
@ -74,7 +76,9 @@ export class StatsController extends Controller {
@Query() endDate?: Date,
) {
this.setHeader("Content-Type", "text/csv");
return json2csv(await this.invoiceReport(req, limit, startDate, endDate));
return json2csv(await this.invoiceReport(req, limit, startDate, endDate), {
useDateIso8601Format: true,
});
}
@Get("invoice")
@ -123,7 +127,9 @@ export class StatsController extends Controller {
@Query() endDate?: Date,
) {
this.setHeader("Content-Type", "text/csv");
return json2csv(await this.receiptReport(req, limit, startDate, endDate));
return json2csv(await this.receiptReport(req, limit, startDate, endDate), {
useDateIso8601Format: true,
});
}
@Get("receipt")