File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
scheduler/src/common/helper Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import { GarmsExtractType } from 'src/modules/common/enum/garms-extract-type.enu
2020import { DateTransaction } from 'src/modules/garms/dto/DateTransation.dto' ;
2121import { GarmaCashDetail } from 'src/modules/garms/dto/garms-cash-details.dto' ;
2222import { GarmaCashHeader } from 'src/modules/garms/dto/garms-cash-header.dto' ;
23- import { dateFormat } from './date-time.helper' ;
23+ import { convertUtcToPt , dateFormat } from './date-time.helper' ;
2424import * as fs from 'fs' ;
2525import * as path from 'path' ;
2626import { InternalServerErrorException , Logger } from '@nestjs/common' ;
@@ -275,11 +275,9 @@ export const groupTransactionsByDate = (transactions: Transaction[]) => {
275275 // Group transactions by the date (ignoring the time part)
276276 const groupedData : Record < string , Transaction [ ] > = transactions . reduce (
277277 ( acc , transaction ) => {
278+
278279 // Extract just the date part (YYYY-MM-DD)
279- const transactionDate = transaction . transactionSubmitDate
280- . toISOString ( )
281- . split ( 'T' ) [ 0 ] ;
282-
280+ const transactionDate = convertUtcToPt ( transaction . transactionSubmitDate , "YYYY-MM-DD" ) ;
283281 // If the date group doesn't exist, create it
284282 if ( ! acc [ transactionDate ] ) {
285283 acc [ transactionDate ] = [ ] ;
You can’t perform that action at this time.
0 commit comments