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
}

View File

@@ -23,7 +23,6 @@ export class AccountingSumService {
return result
}
async getCategoryColorMap(database) {
const sql = `
SELECT dtlcod, dtlnam, dtlmsc as dtlclr

View File

@@ -9,8 +9,9 @@ export class ReportService {
async getReportController(database, number) {
const sql = `
SELECT
${database}.translatedtl('ACTTYP', acttyp) AS actnam,
acttyp,
actcat,
${database}.translatedtl_multi(ARRAY['ACTCAT_INC','ACTCAT_EXP'], actcat) AS actcat,
actqty,
actcmt,
actacpdtm