import { GeneralService } from '../share/generalservice.js'

export class AccountingSetupService {
  constructor() {
    this.generalService = new GeneralService()
  }
  async getAccountingSetup(database) {
    const sql = `
      SELECT 
       dtlnam,
	     dtlcod,
       dtltblcod
      FROM ${database}.dtlmst
      WHERE dtltblcod IN ('ACTTYP', 'ACTCAT_INC', 'ACTCAT_EXP');
      `
    const params = []
    const result = await this.generalService.executeQueryParam(database, sql, params);
    return result
  }
}


      // SELECT 
      //  acttyp,
      //  dtlname
      // FROM ${database}.actmst
      // LEFT JOIN ${database}.dtlmst ON dtltblcod = 'acttyp' and acttyp = dtlcod