Beispiel #1
0
 static function Get($where = '', $whereParams = array())
 {
     return parent::runquery_fetchMode("select f.*,GroupDesc \n\t\t\tfrom VOT_FormItems f join VOT_FormGroups g using(GroupID)\n\t\t\twhere 1=1 " . $where, $whereParams);
 }
Beispiel #2
0
 public static function Get($content = false, $where = '', $whereParams = array(), $order = "")
 {
     return parent::runquery_fetchMode("\n\t\t\tselect c.ContractID,\n\t\t\t\tc.TemplateID,\n\t\t\t\tc.RegPersonID,\n\t\t\t\tc.RegDate,\n\t\t\t\tc.description,\n\t\t\t\tc.PersonID,\n\t\t\t\tc.PersonID2,\n\t\t\t\tc.StartDate,\n\t\t\t\tc.EndDate,\n\t\t\t\tc.StatusID,\n\t\t\t\tbf.InfoDesc StatusDesc," . ($content ? "c.content," : "") . "c.ContractType,\n\t\t\t\tc.LoanRequestID,\n\t\t\t\tc.ContractAmount,\n\t\t\t\tt.TemplateTitle ,\n\n\t\t\t\tconcat_ws(' ',p1.fname,p1.lname,p1.CompanyName) PersonFullname,\n\t\t\t\tp1.NationalID,\n\t\t\t\tp1.address,\n\t\t\t\tp1.mobile,\n\t\t\t\tp1.WebSite,\n\t\t\t\tp1.email,\n\t\t\t\tbfp1.InfoDesc CompanyTypeDesc,\n\t\t\t\t\n\t\t\t\tconcat_ws(' ',p2.fname,p2.lname,p2.CompanyName) PersonFullname2,\n\t\t\t\tp2.NationalID NationalID2,\n\t\t\t\tp2.address address2,\n\t\t\t\tp2.mobile mobile2,\n\t\t\t\tp2.WebSite WebSite2,\n\t\t\t\tp2.email email2,\n\t\t\t\tbfp2.InfoDesc CompanyTypeDesc2,\n\n\t\t\t\tr.RequestID,\n\t\t\t\tr.ReqAmount,\n\t\t\t\trp.InstallmentCount,\n\t\t\t\trp.CustomerWage\n\t\t\t\n\t\t\tfrom CNT_contracts c \n\t\t\tjoin CNT_templates t using(TemplateID) \n\t\t\tjoin BaseInfo bf on(TypeID=19 AND StatusID=InfoID)\n\t\t\tleft join LON_requests r on(LoanRequestID=RequestID)\n\t\t\tleft join LON_ReqParts rp on(rp.RequestID=r.RequestID)\n\t\t\tleft join BSC_persons p1 on(c.PersonID=p1.PersonID)\n\t\t\tleft join BaseInfo bfp1 on(bfp1.TypeID=14 AND p1.CompanyType=bfp1.InfoID)\n\t\t\tleft join BSC_persons p2 on(c.PersonID2=p2.PersonID)\n\t\t\tleft join BaseInfo bfp2 on(bfp2.TypeID=14 AND p2.CompanyType=bfp2.InfoID)\n\t\t\t\n\t\t\twhere 1=1 " . $where . " group by ContractID " . $order, $whereParams);
 }
Beispiel #3
0
 static function Get($where = '', $whereParams = array(), $order = "")
 {
     return parent::runquery_fetchMode("\r\n\t\t\tSELECT i.*,InfoDesc ObjectDesc,bf.param1,bf.param2,bf.param3,\r\n\t\t\t\tconcat_ws(' ',fname,lname,CompanyName) fullname,\r\n\t\t\t\td.DocumentID,d.DocDesc,d.ObjectType,d.IsConfirm, \r\n\t\t\t\tif(count(df.RowID) >0,'true','false') HaveFile\t\r\n\t\t\t\t\r\n\t\t\tFROM DMS_PackageItems i\r\n\t\t\tjoin BaseInfo bf on(TypeID=11 AND ObjectType=InfoID)\r\n\r\n\t\t\tleft join LON_requests\to1 on(i.ObjectType=1 AND i.ObjectID=RequestID)\r\n\t\t\tleft join CNT_contracts\to3 on(i.ObjectType=2 AND i.ObjectID=ContractID)\r\n\t\t\tleft join PLN_plans\t\to2 on(i.ObjectType=3 AND i.ObjectID=PlanID)\r\n\t\t\t\r\n\t\t\tleft join BSC_persons p on(\tp.PersonID=o1.LoanPersonID or \r\n\t\t\t\t\t\t\t\t\t\tp.PersonID=o2.PersonID or\r\n\t\t\t\t\t\t\t\t\t\tp.PersonID=o3.PersonID or p.PersonID=o3.PersonID2)\r\n\r\n\t\t\tleft join DMS_documents d on(d.ObjectType=param4 AND i.ObjectID=d.ObjectID)\r\n\t\t\tleft join DMS_DocFiles df using(DocumentID)\r\n\t\t\t\r\n\t\t\twhere 1=1" . $where . " " . $order . "\r\n\t\t\t\r\n\t\t\tgroup by d.DocumentID\r\n\t\t\t", $whereParams);
 }
Beispiel #4
0
 public static function Get($where = '', $whereParams = array())
 {
     return parent::runquery_fetchMode("\r\n\t\t\tselect e.*, concat_ws(' ',fname, lname,CompanyName) fullname,\r\n\t\t\t\tInfoDesc ScopeDesc\r\n\t\t\tfrom PLN_experts e\r\n\t\t\tjoin BaseInfo bf on(TypeID=21 AND InfoID=ScopeID)\r\n\t\t\tleft join BSC_persons p1 using(PersonID) where 1=1 " . $where, $whereParams);
 }
Beispiel #5
0
 static function Get($where = '', $whereParams = array())
 {
     $query = "select t.*,concat(p1.fname,' ',p1.lname) fullname,\r\n\t\t\t\tbf1.InfoDesc GoMeanDesc,bf2.InfoDesc ReturnMeanDesc,bf3.InfoDesc OffTypeDesc,\r\n\t\t\t\tconcat(p2.fname,' ',p2.lname) OffFullname,\r\n\t\t\t\tconcat(p3.fname,' ',p3.lname) SurveyFullname\r\n\t\t\tfrom ATN_requests t\r\n\t\t\tjoin BSC_persons p1 using(PersonID)\r\n\t\t\tleft join BSC_persons p2 on(OffPersonID=p2.PersonID)\r\n\t\t\tleft join BSC_persons p3 on(SurveyPersonID=p3.PersonID)\r\n\t\t\tleft join BaseInfo bf1 on(bf1.TypeID=21 AND bf1.InfoID=GoMean)\r\n\t\t\tleft join BaseInfo bf2 on(bf2.TypeID=21 AND bf2.InfoID=ReturnMean)\r\n\t\t\tleft join BaseInfo bf3 on(bf3.TypeID=20 AND bf3.InfoID=OffType)\r\n\t\t\twhere 1=1 " . $where;
     return parent::runquery_fetchMode($query, $whereParams);
 }
Beispiel #6
0
 static function Get($where = '', $whereParams = array(), $order = "")
 {
     $query = "select ps.*,concat_ws(' ',fname,lname,CompanyName) fullname , s.ShiftTitle\r\n\t\t\tfrom ATN_PersonShifts ps \r\n\t\t\tjoin BSC_persons p using(PersonID) \r\n\t\t\tjoin ATN_shifts s using(ShiftID) \r\n\t\t\twhere 1=1" . $where . " " . $order;
     return parent::runquery_fetchMode($query, $whereParams);
 }
Beispiel #7
0
 static function Get($where = "", $param = array())
 {
     $query = "\n\t\t\tSELECT cb.*,\n\t\t\t\tcc.CostCode,\n\t\t\t\tconcat_ws('-', b1.blockDesc, b2.blockDesc, b3.blockDesc) CostDesc,\n\t\t\t\tbf1.InfoDesc TafsiliTypeDesc,\n\t\t\t\tTafsiliDesc\n\t\t\t\n\t\t\tFROM ACC_CostBlocks cb\n\n\t\t\tjoin ACC_CostCodes cc using(CostID)\n\t\t\tleft join ACC_blocks b1 on(cc.level1=b1.BlockID)\n\t\t\tleft join ACC_blocks b2 on(cc.level2=b2.BlockID)\n\t\t\tleft join ACC_blocks b3 on(cc.level3=b3.BlockID)\n\n\t\t\tjoin BaseInfo bf1 on(bf1.TypeID=2 AND bf1.InfoID=cb.TafsiliType)\n\t\t\tjoin ACC_tafsilis using(TafsiliID)\n\t\t";
     return parent::runquery_fetchMode($query, $param);
 }
Beispiel #8
0
 static function Get($where = "", $param = array())
 {
     $query = "\n\t\t\tSELECT o.*,\n\t\t\t\tcc.CostCode,\n\t\t\t\tconcat_ws('-', b1.blockDesc, b2.blockDesc, b3.blockDesc) CostDesc,\n\t\t\t\tb.BankDesc, \n\t\t\t\tbi2.InfoDesc ChequeStatusDesc,\n\t\t\t\td.LocalNo,\n\t\t\t\td.DocStatus\n\t\t\t\n\t\t\tFROM ACC_IncomeCheques o\n\n\t\t\tjoin ACC_CostCodes cc using(CostID)\n\t\t\tleft join ACC_blocks b1 on(cc.level1=b1.BlockID)\n\t\t\tleft join ACC_blocks b2 on(cc.level2=b2.BlockID)\n\t\t\tleft join ACC_blocks b3 on(cc.level3=b3.BlockID)\n\n\t\t\tleft join ACC_banks b on(ChequeBank=BankID)\n\t\t\tleft join BaseInfo bi2 on(bi2.TypeID=16 AND bi2.InfoID=o.ChequeStatus)\n\t\t\t\n\t\t\tleft join ACC_DocItems di on(SourceID=IncomeChequeID AND SourceType=" . DOCTYPE_INCOMERCHEQUE . ")\n\t\t\tleft join ACC_docs d on(di.DocID=d.DocID)\n\t\t\t\n\t\t\twhere 1=1 " . $where;
     return parent::runquery_fetchMode($query, $param);
 }
Beispiel #9
0
 static function Get($where = '', $whereParams = array())
 {
     return parent::runquery_fetchMode("select p.*,c.LocalNo,c.DocStatus \r\n\t\t\tfrom LON_payments p\r\n\t\t\tleft join ACC_docs c using(DocID) where 1=1 " . $where, $whereParams);
 }