-เส้น search

This commit is contained in:
2025-11-13 16:25:50 +07:00
parent 968f3efd52
commit 69261c05ab
7 changed files with 107 additions and 7 deletions

View File

@@ -25,8 +25,13 @@ export class accountingSetup {
try {
// let username = req.body.request.username;
// let password = req.body.request.password;
let token = req.body.request.token;
const decoded = verifyToken(token);
result = await this.AccountingSetupService.getAccountingSetup(database); // เช็คกับ db กลาง ส่ง jwttoken ออกมา
database = decoded.organization
result = await this.AccountingSetupService.getAccountingSetup(database); // เช็คกับ db กลาง ส่ง jwttoken ออกมา
// this.generalService.devhint(1, 'accountingSetup.js', 'Login success');
} catch (error) {
idx = 1;
@@ -36,9 +41,13 @@ export class accountingSetup {
// แยกกลุ่ม income / expense
let income = result.filter(item => item.dtltblcod === 'ACTCAT_INC').map(({ dtltblcod, ...rest }) => rest);
let expense = result.filter(item => item.dtltblcod === 'ACTCAT_EXP').map(({ dtltblcod, ...rest }) => rest);
let expense = result.filter(item => item.dtltblcod === 'ACTCAT_EXP').map(({ dtltblcod, ...rest }) => rest);
let arydiy = {
income ,
expense
};
let arydiy = { income , expense };
return arydiy
}
}