accountingweb-api and ttc-api: initial with modified .env

Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
2025-11-19 15:06:20 +07:00
parent a705281ad7
commit 21bd8c64ff
10 changed files with 280 additions and 24 deletions

View File

@@ -6,15 +6,29 @@ export class AccountingAddService {
this.generalService = new GeneralService()
}
async getAccountingAdd(database, name) {
async getAccountingAdd(database, number) {
const sql = `
SELECT
actseq,
actnam
actnum
FROM ${database}.actmst
WHERE actnam = $1
`
const params = [name]
WHERE actnum = $1
`
const params = [number]
const result = await this.generalService.executeQueryParam(database, sql, params);
return result
}
async getLatestAccountingSeq(database) {
const sql = `
SELECT
actseq
FROM ${database}.actmst
WHERE actseq=(SELECT max(actseq) FROM ${database}.actmst)
`
const params = []
const result = await this.generalService.executeQueryParam(database, sql, params);
return result
}