var system=require("../../system")
const http=require("http")
const querystring = require('querystring');
var settings=require("../../../config/settings");
const CtlBase = require("../ctl.base");
const logCtl=system.getObject("web.oplogCtl");
class ExpenseVoucherCtl extends CtlBase{
   constructor(){
     super(CtlBase.getServiceName(ExpenseVoucherCtl));
   }
   async initNewInstance(queryobj,req){
     var rtn={};
     var vcode=await this.service.getBusUid("FYD");
     rtn.code=vcode;
     rtn.sourceType="expensevoucher";
    return system.getResult2(rtn,null);
  }
  async fetchForFinance(pobj,obj,req){
    var result= await this.service.fetchForFinance(req.companyid);
    return system.getResult2(result);
  }

}
module.exports=ExpenseVoucherCtl ;
