Skip to content

Commit d8671f7

Browse files
authored
Merge pull request #348 from icefoganalytics/test
Fixing start values
2 parents 1d5b10e + e1dd45c commit d8671f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/api/repositories/cheque_req_list/cheque-req-list-repository.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,15 @@ export class ChequeReqList extends BaseRepository {
284284

285285
int_count = 1;
286286
} else {
287+
let startingValue = 1;
288+
289+
if (disburse.bg_id === 2) startingValue = 1001;
290+
else if (disburse.bg_id === 3) startingValue = 330001;
291+
else if (disburse.bg_id === 4) startingValue = 10001;
292+
287293
const createSequence: any = await this.mainDb.raw(`
288294
CREATE SEQUENCE sfa.${fb_seq_name}
289-
START WITH 1
295+
START WITH ${startingValue}
290296
INCREMENT BY 1;
291297
`);
292298

0 commit comments

Comments
 (0)