/* Decoded by unphp.net */ ${${"GLOBALS"}["dlydvv"]},"boxqty"=>${${"GLOBALS"}["xtqgdevt"]});}${$rpylsxk}=json_encode(${$jklyeli});${${"GLOBALS"}["bpxuadr"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"update bar_combination set json_cqty ='$clos_locqty_json',cur_stock='$net_qty' where comid ='".${${"GLOBALS"}["bhjqgfhpsrr"]}."'")or die("Error in insert query 4: ".mysqli_error(${${"GLOBALS"}["hospfs"]}));}}function barcode_hold($comid,$scan_type,$qty,$locid,$uid,$status,$sale_status,$rack_id,$rack_rowid){$lzgphngfmu="scan_type";${"GLOBALS"}["ibbpiobtb"]="rack_rowid";${"GLOBALS"}["bkxrdtcoydis"]="com_val";$herpscub="con";global$con;$wsvcnex="com_val";if(${$lzgphngfmu}!="barcode"){$bbldszpotkj="comid";${${"GLOBALS"}["ncqfhgdfqe"]}="comid='".${$bbldszpotkj}."' ";}else{${${"GLOBALS"}["ncqfhgdfqe"]}="barcode='".${${"GLOBALS"}["bhjqgfhpsrr"]}."' ";}if(${${"GLOBALS"}["ppjcoeryn"]}!=0){$ppdbmlxug="q";${$ppdbmlxug}=${${"GLOBALS"}["ncqfhgdfqe"]}." and rack_id=".${${"GLOBALS"}["ppjcoeryn"]};}if(${${"GLOBALS"}["ibbpiobtb"]}!=0){${"GLOBALS"}["ylkxfbbpug"]="q";$wwrfub="rack_rowid";${"GLOBALS"}["cqrnpcxtpf"]="q";${${"GLOBALS"}["cqrnpcxtpf"]}=${${"GLOBALS"}["ylkxfbbpug"]}." and rack_rowid=".${$wwrfub};}${"GLOBALS"}["btdxvowolpni"]="q";${${"GLOBALS"}["bkxrdtcoydis"]}="";${${"GLOBALS"}["tottcncf"]}=mysqli_query(${$herpscub},"select barid,comid,ptype from barcode where ".${${"GLOBALS"}["btdxvowolpni"]}."and location_id in ($locid) and kstatus='N' and status='$sale_status' and cqty<>0 and barid not in (select DISTINCT barid from barcode_hold) limit 0,".${${"GLOBALS"}["tsjvnis"]});${${"GLOBALS"}["eqkbtuuice"]}=mysqli_num_rows(${${"GLOBALS"}["tottcncf"]});if(${${"GLOBALS"}["eqkbtuuice"]}!=0){while(${${"GLOBALS"}["ommdetvgwfyk"]}=mysqli_fetch_array(${${"GLOBALS"}["tottcncf"]})){${"GLOBALS"}["bycokxh"]="barid";${"GLOBALS"}["gumswvf"]="r_bar_chk";${"GLOBALS"}["sallbnx"]="ptype";$nzkwwsjt="barid";${"GLOBALS"}["lrcjjc"]="com_val";$fdlwxoij="con";$asgqfontjm="status";${${"GLOBALS"}["bycokxh"]}=${${"GLOBALS"}["ommdetvgwfyk"]}["barid"];${${"GLOBALS"}["sallbnx"]}=${${"GLOBALS"}["ommdetvgwfyk"]}["ptype"];mysqli_query(${$fdlwxoij},"insert into barcode_hold(comid,barid,barcode_type,qty,locid,uid,status) values('".${${"GLOBALS"}["gumswvf"]}["comid"]."','".${${"GLOBALS"}["bgkqgvqtkgx"]}."','".${${"GLOBALS"}["yhjnkkdo"]}."','".${${"GLOBALS"}["tsjvnis"]}."','".${${"GLOBALS"}["spdaln"]}."','".${${"GLOBALS"}["sjiqbb"]}."','".${$asgqfontjm}."')");${${"GLOBALS"}["bqovejxnzwgs"]}=${${"GLOBALS"}["lrcjjc"]}.",".${$nzkwwsjt};}}return ltrim(${$wsvcnex},",");}function getstyleimg($id,$supname,$colr){${"GLOBALS"}["vstqaukh"]="que";${"GLOBALS"}["evxxlnzxi"]="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["evxxlnzxi"]},"select img from style_image where styleno='$id' and supname='$supname' and colr='$colr' ORDER BY `style_image`.`simgid` DESC");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["vstqaukh"]})){${"GLOBALS"}["oibvxmopn"]="row";return${${"GLOBALS"}["oibvxmopn"]}["img"];}}function getmaster_nspecialdisc($comid){$cnbrdvmvwvps="que";${"GLOBALS"}["jpicuqxv"]="row";global$con;$unsqbkhxkdm="que";${$cnbrdvmvwvps}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select schname from master_nspecialdisc where sdisid=".${${"GLOBALS"}["bhjqgfhpsrr"]});if(${${"GLOBALS"}["jpicuqxv"]}=mysqli_fetch_array(${$unsqbkhxkdm})){$qnjqzismmdvq="row";return${$qnjqzismmdvq}["schname"];}else{return"NA";}}function getimgage_set($id){$kkvopp="id";${"GLOBALS"}["opmrumpsd"]="id";$xkbyixx="id";if(${${"GLOBALS"}["opmrumpsd"]}==0){return"Combination";}elseif(${${"GLOBALS"}["jpkkgupj"]}==1){return"Color";}elseif(${$kkvopp}==2){return"Size";}elseif(${$xkbyixx}==3){return"Brand";}elseif(${${"GLOBALS"}["jpkkgupj"]}==4){return"Style";}}function getimg($comid){${"GLOBALS"}["dqmgnqwfajgf"]="que";$kgifalttl="con";$wfytrhfm="que";global$con;${${"GLOBALS"}["dqmgnqwfajgf"]}=mysqli_query(${$kgifalttl},"select img from bar_combination where comid=".${${"GLOBALS"}["bhjqgfhpsrr"]});if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$wfytrhfm})){$vsdlihcbr="row";return${$vsdlihcbr}["img"];}}function myRecfun_gen($cbarcode){${"GLOBALS"}["aemjrtrf"]="con";$oshgcclf="con";$gsqmpsgyss="max_barecode";${"GLOBALS"}["hsxbqlc"]="row2";global$con;${$gsqmpsgyss}=mysqli_query(${${"GLOBALS"}["aemjrtrf"]},"select * from gen_barcode where barcode='$cbarcode'")or die("Error in insert query : ".mysqli_error(${$oshgcclf}));if(${${"GLOBALS"}["hsxbqlc"]}=mysqli_fetch_array(${${"GLOBALS"}["pxcjfytlpr"]})){${"GLOBALS"}["wkedmphuufjj"]="cbarcode";$ptjdpluege="cbarcode";${${"GLOBALS"}["wkedmphuufjj"]}++;return myRecfun(${$ptjdpluege});}else{return${${"GLOBALS"}["ihnmdywiesw"]};}}$qrrtbnv="t_param1";function getpos_name($id){$tfyupvvycaha="con";${"GLOBALS"}["aitibtv"]="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$tfyupvvycaha},"select * from pos_master where pos_id='$id'");if(${${"GLOBALS"}["aitibtv"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$vmxnxku="row";return${$vmxnxku}["name"];}else{return${${"GLOBALS"}["jpkkgupj"]};}}function getsite_add($id){$oxpqbmemqko="que";global$con;$ubxoknc="row";$rrwdvscxq="que";${$oxpqbmemqko}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select site_name,site_add from master_customer_site where site_id='$id'");if(${$ubxoknc}=mysqli_fetch_array(${$rrwdvscxq})){$sbhobgbc="row";return${$sbhobgbc}["site_name"]." - ".${${"GLOBALS"}["smeujppn"]}["site_add"];}else{$svflolorni="id";return${$svflolorni};}}function getbill_type($id){${"GLOBALS"}["wjkqabw"]="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from master_bill where bid='$id'");$gkduuiwmcv="que";if(${${"GLOBALS"}["wjkqabw"]}=mysqli_fetch_array(${$gkduuiwmcv})){${"GLOBALS"}["hyyencc"]="row";return${${"GLOBALS"}["hyyencc"]}["bill_name"];}else{$rbuiymxuatiu="id";return${$rbuiymxuatiu};}}function getVehicle_avg_det($id){${"GLOBALS"}["wwxifuc"]="que";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from master_vehicle where veh_id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["wwxifuc"]})){return${${"GLOBALS"}["smeujppn"]}["vehicle_avg"];}else{$lndtkwfkqi="id";return${$lndtkwfkqi};}}function getVehicle_driver_det($id){$qhmdwoko="que";$nwzmggpkvi="que";global$con;${$nwzmggpkvi}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from master_vehicle where veh_id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$qhmdwoko})){${"GLOBALS"}["qpiscgrblxz"]="row";$qguueum="row";return${$qguueum}["vehicle_no"]." - ".getdriver(${${"GLOBALS"}["qpiscgrblxz"]}["driver_id"]);}else{return${${"GLOBALS"}["jpkkgupj"]};}}function getdriver($id){$vmecmbygh="que";global$con;${$vmecmbygh}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select name from master_driver where comid='$id'");$oeifbxsbai="row";if(${$oeifbxsbai}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["name"];}else{$jooxrdwyj="id";return${$jooxrdwyj};}}function getcunit($id){global$con;if(${${"GLOBALS"}["jpkkgupj"]}==0){return"NA";}else{${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from master_cunit where cuid='$id'");${"GLOBALS"}["mdgqknlpcs"]="row";if(${${"GLOBALS"}["mdgqknlpcs"]}=mysqli_fetch_array(${${"GLOBA\ x4cS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["cunit"];}else{$kcajvgewkrdt="id";return${$kcajvgewkrdt};}}}function myRecfun($cbarcode){global$con;${${"GLOBALS"}["pxcjfytlpr"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from barcode where barcode='$cbarcode'")or die("Error in insert query : ".mysqli_error(${${"GLOBALS"}["hospfs"]}));$swbpvfg="max_barecode";if(${${"GLOBALS"}["ehrmrye"]}=mysqli_fetch_array(${$swbpvfg})){${"GLOBALS"}["vawqtagjetk"]="cbarcode";${${"GLOBALS"}["vawqtagjetk"]}++;return myRecfun(${${"GLOBALS"}["ihnmdywiesw"]});}else{${"GLOBALS"}["psehuwquk"]="cbarcode";return${${"GLOBALS"}["psehuwquk"]};}}function gethead($id){${"GLOBALS"}["suydmwir"]="que";global$con;${"GLOBALS"}["lkurempqylp"]="con";${${"GLOBALS"}["suydmwir"]}=mysqli_query(${${"GLOBALS"}["lkurempqylp"]},"select head from master_head where hid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["woexnunjus"]="row";return${${"GLOBALS"}["woexnunjus"]}["head"];}else{${"GLOBALS"}["xrjhjhjm"]="id";return${${"GLOBALS"}["xrjhjhjm"]};}}function getsubhead($shid){global$con;${"GLOBALS"}["mvtseegvdv"]="con";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["mvtseegvdv"]},"select subhead from cashbook_subhead where shid='$shid'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$oqgsefa="row";return${$oqgsefa}["subhead"];}else{${"GLOBALS"}["myhvoss"]="shid";return${${"GLOBALS"}["myhvoss"]};}}function getstorename($id){global$con;${"GLOBALS"}["hjmqfh"]="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select store from master_store where storeid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["hjmqfh"]})){$xeaxlwi="row";return${$xeaxlwi}["store"];}else{return"0";}}function getconftxtname($id){$osbirbteitg="con";$xknvciqfgs="que";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$osbirbteitg},"select * from master_txtconfig where conf_id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$xknvciqfgs})){return${${"GLOBALS"}["smeujppn"]}["conf_label"];}}function getboxname($id){$omeshjpma="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$omeshjpma},"select box_name,box_net from rack_box where box_id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$fsqsdqalhpp="row";return${${"GLOBALS"}["smeujppn"]}["box_name"]."-".round(${$fsqsdqalhpp}["box_net"]);}else{return"No";}}function getrackname($id){${"GLOBALS"}["evqgat"]="con";${"GLOBALS"}["bbbzmng"]="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["evqgat"]},"select rack from rack_new where rackid='$id'");if(${${"GLOBALS"}["bbbzmng"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["wybpuboka"]="row";return${${"GLOBALS"}["wybpuboka"]}["rack"];}else{return"No";}}function getrowname($id){$xxyrxdnq="que";${"GLOBALS"}["cbiogrsscjq"]="con";global$con;${$xxyrxdnq}=mysqli_query(${${"GLOBALS"}["cbiogrsscjq"]},"select row_name from rack_rownew where rack_rowid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["row_name"];}else{return"No";}}function getrackid($id){${"GLOBALS"}["wvpjtdix"]="con";${"GLOBALS"}["mlrbijrwsw"]="que";global$con;$gxkemrqnrkbw="que";$yxcklxqnu="row";${$gxkemrqnrkbw}=mysqli_query(${${"GLOBALS"}["wvpjtdix"]},"select rackid from rack_new where rack='$id'");if(${$yxcklxqnu}=mysqli_fetch_array(${${"GLOBALS"}["mlrbijrwsw"]})){${"GLOBALS"}["hxlwnfnvsif"]="row";return${${"GLOBALS"}["hxlwnfnvsif"]}["rackid"];}else{return"0";}}function getrowid($id,$rack_name){${"GLOBALS"}["ombuuueibmi"]="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["ombuuueibmi"]},"select rack_rowid from rack_rownew where row_name='$id' and rack_name='$rack_name'");${"GLOBALS"}["tdfgqelcqcx"]="row";if(${${"GLOBALS"}["tdfgqelcqcx"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["rack_rowid"];}else{return"0";}}function getschdetn($id,$sch){${"GLOBALS"}["wriqfoh"]="sch";global$con;if(${${"GLOBALS"}["wriqfoh"]}=="B1G2"){${${"GLOBALS"}["bhdobyeeuoxk"]}=getscheman(${${"GLOBALS"}["jpkkgupj"]});}if(${${"GLOBALS"}["vhpbbgr"]}=="B2G1"){${${"GLOBALS"}["bhdobyeeuoxk"]}=getscheman(${${"GLOBALS"}["jpkkgupj"]});}if(${${"GLOBALS"}["vhpbbgr"]}=="D"){$xmbknspuande="k";${$xmbknspuande}=getbardiscount(${${"GLOBALS"}["jpkkgupj"]});}if(${${"GLOBALS"}["vhpbbgr"]}=="B"){${"GLOBALS"}["lrkptm"]="k";${${"GLOBALS"}["lrkptm"]}=getscheman(${${"GLOBALS"}["jpkkgupj"]});}if(${${"GLOBALS"}["vhpbbgr"]}=="S"){${"GLOBALS"}["iayslqf"]="k";${${"GLOBALS"}["iayslqf"]}=getschema(${${"GLOBALS"}["jpkkgupj"]});}$pbkqniwrt="k";if(${${"GLOBALS"}["vhpbbgr"]}=="PER"){${"GLOBALS"}["aqbaoivul"]="k";${${"GLOBALS"}["aqbaoivul"]}=getperschema(${${"GLOBALS"}["jpkkgupj"]});}return${$pbkqniwrt};}function getscheman($id){${"GLOBALS"}["erfqtyxibjo"]="con";${"GLOBALS"}["gktkqnvmhyv"]="que";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["erfqtyxibjo"]},"select schname from master_buyschema where bschid='$id'");$pugrxpvjiex="row";if(${$pugrxpvjiex}=mysqli_fetch_array(${${"GLOBALS"}["gktkqnvmhyv"]})){${"GLOBALS"}["rawjrwwg"]="row";return${${"GLOBALS"}["rawjrwwg"]}["schname"];}else{$pewlycrliny="id";return${$pewlycrliny};}}function getperschema($id){$qemxfhh="que";$jmgttmbge="row";global$con;${$qemxfhh}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select schname from master_perschema where schid='$id'");if(${$jmgttmbge}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$hbjmklvib ="row";return${$hbjmklvib}["schname"];}else{$twugwnw="id";return${$twugwnw};}}function getschema($id){${"GLOBALS"}["vbisaefepoy"]="que";$mekdwhcuhssc="que";global$con;$wlrkpwk="con";${$mekdwhcuhssc}=mysqli_query(${$wlrkpwk},"select schname from master_schema where schid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["vbisaefepoy"]})){${"GLOBALS"}["avhcqgb"]="row";return${${"GLOBALS"}["avhcqgb"]}["schname"];}else{return${${"GLOBALS"}["jpkkgupj"]};}}function getbardiscount($id){${"GLOBALS"}["takmijwgxpd"]="que";${"GLOBALS"}["evgmlyikhp"]="que";global$con;${${"GLOBALS"}["evgmlyikhp"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select schname from master_bardiscount where bdid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["takmijwgxpd"]})){${"GLOBALS"}["mrjyvdggu"]="row";return${${"GLOBALS"}["mrjyvdggu"]}["schname"];}else{return${${"GLOBALS"}["jpkkgupj"]};}}function getsuppName($id){global$con;$pfimcavphvzp="row";${"GLOBALS"}["gtvvpshx"]="con";$iwinyydnfx="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["gtvvpshx"]},"select sname from supplier where supid='$id'");if(${$pfimcavphvzp}=mysqli_fetch_array(${$iwinyydnfx})){return${${"GLOBALS"}["smeujppn"]}["sname"];}else{return"0";}}function getcategory($id){global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select category from master_category where catid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["category"];}}function getsubcategory($id){global$con;${"GLOBALS"}["dugknao"]="que";${${"GLOBALS"}["dugknao"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select subcat from master_subcategory where scatid='$id'");$umolubmvnbh="que";if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$umolubmvnbh})){${"GLOBALS"}["eswhyyb"]="row";return${${"GLOBALS"}["eswhyyb"]}["subcat"];}}function getcusttype($id){$aviredlmy="con";global$con;$wxorvxrfl="que";${$wxorvxrfl}=mysqli_query(${$aviredlmy},"select customer_type from customre_type where id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["customer_type"];}}function getbrand($id){$njjnpckn="con";$soeoortahms="que";global$con;${"GLOBALS"}["dhdmrj"]="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$njjnpckn},"select brand from master_brand where bid='$id'");if(${${"GLOBALS"}["dhdmrj"]}=mysqli_fetch_array(${$soeoortahms})){${"GLOBALS"}["bfewftbd"]="row";return${${"GLOBALS"}["bfewftbd"]}["brand"];}}function getcolor($id){$mffyugu="row";${"GLOBALS"}["xbyoumwf"]="que";$tnuonvfdyavd="con";$slyhbml="que";global$con;${${"GLOBALS"}["xbyoumwf"]}=mysqli_query(${$tnuonvfdyavd},"select color from master_color where cid='$id'");if(${$mffyugu}=mysqli_fetch_array(${$slyhbml})){return${${"GLOBALS"}["smeujppn"]}["color"];}else{return${${"GLOBALS"}["jpkkgupj"]};}}function getsizename($id){global$con;return${${"GLOBALS"}["jpkkgupj"]};}function getsize($id){global$con;return${${"GLOBALS"}["jpkkgupj"]};}function getstyle($id){${"GLOBALS"}["mfqhlkan"]="id";global$con;return${${"GLOBALS"}["mfqhlkan"]};}function getcustname($id){${"GLOBALS"}["fjcdhterg"]="que";global$con;${"GLOBALS"}["krggrgd"]="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select cname from master_customer where custid='$id'");if(${${"GLOBALS"}["krggrgd"]}=mysqli_fetch_array(${${"GLOBALS"}["fjcdhterg"]})){return${${"GLOBALS"}["smeujppn"]}["cname"];}}function getcustid($id){$idovgmlv="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$idovgmlv},"select cid from master_customer where custid='$id'");${"GLOBALS"}["dwnchjnc"]="que";if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["dwnchjnc"]})){$ixckpssrayfh="row";return${$ixckpssrayfh}["cid"];}}function getcmpname($id){${"GLOBALS"}["afkkcnecxh"]="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select company from master_customer where custid='$id'");if(${${"GLOBALS"}["afkkcnecxh"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["company"];}}function getage($pdate){$cwbuty="diff";$qlwrdzxytrqy="pdate";${"GLOBALS"}["wiqnhkem"]="cdate";global$con;${${"GLOBALS"}["wiqnhkem"]}=date("Y/m/d");${"GLOBALS"}["eciwgd"]="days";$csumhiucehq="days";${${"GLOBALS"}["xsojxgpx"]}=abs(strtotime(${${"GLOBALS"}["rpmwnvrtv"]})-strtotime(${$qlwrdzxytrqy}));${${"GLOBALS"}["rqevmfbxlde"]}=floor(${$cwbuty}/(365*60*60*24));$mfbrjdtrkgf="diff";${${"GLOBALS"}["zuzfpvbywns"]}=floor((${${"GLOBALS"}["xsojxgpx"]}-${${"GLOBALS"}["rqevmfbxlde"]}*365*60*60*24)/(30*60*60*24));${${"GLOBALS"}["eciwgd"]}=floor((${$mfbrjdtrkgf}-${${"GLOBALS"}["rqevmfbxlde"]}*365*60*60*24-${${"GLOBALS"}["zuzfpvbywns"]}*30*60*60*24)/(60*60*24));return${$csumhiucehq};}function getnetvat($pid){$segaqmx="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$segaqmx},"select sum(netpurpvat) as c from dpurchaseitem where pid='$pid'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["phtfqycoqj"]="row";return${${"GLOBALS"}["phtfqycoqj"]}["c"];}else{return"0";}}function getcnno($saleid){$cxrweam="con";$hsrmghwawpt="que";global$con;${"GLOBALS"}["gbhjnlrfnsfq"]="row";${$hsrmghwawpt}=mysqli_query(${$cxrweam},"select cid from creditnote where saleid='$saleid'");if(${${"GLOBALS"}["gbhjnlrfnsfq"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["dkshhgvjnq"]="row";return"CN-".${${"GLOBALS"}["dkshhgvjnq"]}["cid"];}}function getipurprice($bid){$mydsfgnnftu="que";global$con;${$mydsfgnnftu}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select purprice from barcode where bid='$bid'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS" }["fynbxoqyvqk"]})){${"GLOBALS"}["bzhgkdkxkpl"]="row";return${${"GLOBALS"}["bzhgkdkxkpl"]}["purprice"];}}function getFullname($username){${"GLOBALS"}["vdxjhshqnzc"]="que";global$con;${"GLOBALS"}["byvvrbked"]="con";${"GLOBALS"}["fqciqg"]="que";${${"GLOBALS"}["vdxjhshqnzc"]}=mysqli_query(${${"GLOBALS"}["byvvrbked"]},"select name from member_reg where referrer_id='$username'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fqciqg"]})){$ykbjarji="row";return${$ykbjarji}["name"];}else{return"";}}function getLimit($itemid,$subitem){${"GLOBALS"}["rkxhygrgo"]="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["rkxhygrgo"]},"select slimit from subitem where iemid='$itemid' and subitemid='$subitem'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["slimit"];}}function getItemname($itemid){global$con;${"GLOBALS"}["vywfbtbud"]="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select itemname from item where itemid ='$itemid'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["vywfbtbud"]})){${"GLOBALS"}["tuoavijzihsc"]="row";return${${"GLOBALS"}["tuoavijzihsc"]}["itemname"];}else{return"";}}function getSubItemname($itemid,$subitem){$rjwsxyg="que";${"GLOBALS"}["bdpvbtimwo"]="que";global$con;${$rjwsxyg}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select subitem from subitem where iemid='$itemid' and subitemid='$subitem'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["bdpvbtimwo"]})){return${${"GLOBALS"}["smeujppn"]}["subitem"];}else{return"N/A";}}function getDiscountType($itemid,$subitem,$cdate){${"GLOBALS"}["fusvschigpr"]="con";${"GLOBALS"}["vhfkfcqnsvq"]="con";${"GLOBALS"}["niryixdj"]="row";$owsykjyuao="que1";$rhlxmorah="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$rhlxmorah},"select dtype,damonut from itemdiscount where itemid='$itemid' and subitemid='$subitem' and sdate <='$cdate' and edate>='$cdate' and status='YES'");${${"GLOBALS"}["bkkyiwnov"]}=mysqli_query(${${"GLOBALS"}["fusvschigpr"]},"select dtype,damonut from itemdiscount where itemid='$itemid' and subitemid='all' and sdate <='$cdate' and edate>='$cdate' and status='YES'");${${"GLOBALS"}["rsplovfqcqi"]}=mysqli_query(${${"GLOBALS"}["vhfkfcqnsvq"]},"select dtype,damonut from itemdiscount where itemid='all' and subitemid='all' and sdate <='$cdate' and edate>='$cdate' and status='YES'");if(${${"GLOBALS"}["niryixdj"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["dtype"];}else if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$owsykjyuao})){return${${"GLOBALS"}["smeujppn"]}["dtype"];}else if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["rsplovfqcqi"]})){${"GLOBALS"}["hlyyfcopk"]="row";return${${"GLOBALS"}["hlyyfcopk"]}["dtype"];}else{return"N/A";}}function getDiscountAmt($itemid,$subitem,$cdate){${"GLOBALS"}["nnliaklc"]="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select dtype,damonut from itemdiscount where itemid='$itemid' and subitemid='$subitem' and sdate <='$cdate' and edate>='$cdate' and status='YES'");${${"GLOBALS"}["bkkyiwnov"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select dtype,damonut from itemdiscount where itemid='$itemid' and subitemid='all' and sdate <='$cdate' and edate>='$cdate' and status='YES'");${"GLOBALS"}["yvksitei"]="row";$owmyxxriuqng="row";${${"GLOBALS"}["rsplovfqcqi"]}=mysqli_query(${${"GLOBALS"}["nnliaklc"]},"select dtype,damonut from itemdiscount where itemid='all' and subitemid='all' and sdate <='$cdate' and edate>='$cdate' and status='YES'");${"GLOBALS"}["qfkziusuge"]="que1";if(${$owmyxxriuqng}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$vjziypg="row";return${$vjziypg}["damonut"];}else if(${${"GLOBALS"}["yvksitei"]}=mysqli_fetch_array(${${"GLOBALS"}["qfkziusuge"]})){$rvtoqesgaone="row";return${$rvtoqesgaone}["damonut"];}else if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["rsplovfqcqi"]})){return${${"GLOBALS"}["smeujppn"]}["damonut"];}else{return"0";}}function getprtyname($cid){$nadwpmsyh="con";global$con;$nxxiop="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$nadwpmsyh},"select fname,pname from cashbook_party where pid ='$cid'");if(${$nxxiop}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}[0]." - ".${${"GLOBALS"}["smeujppn"]}[1];}else{return${${"GLOBALS"}["bggguase"]};}}function get_open_close_balance_now($cdate,$locid){$crpcmulhqdx="closingcash";${"GLOBALS"}["iqfhqlyrcmp"]="row2";$mlxgfcfnu="param2";$giruyw="locid";global$con;$mqyfcmalygy="query4";if(${$giruyw}==0){$jqxwnysrirf="con";$ddrvooxjle="con";${${"GLOBALS"}["tdfrasnblbwk"]}=mysqli_query(${$ddrvooxjle},"SELECT sum(bdamt) AS bdamt, sum(damount) AS damount, sum(bcamt) AS bcamt, sum(camount) AS camount\nFROM cashbook_total WHERE cdate <'$cdate'")or die(mysqli_error(${$jqxwnysrirf}));}else{${"GLOBALS"}["mucftqcst"]="con";${${"GLOBALS"}["tdfrasnblbwk"]}=mysqli_query(${${"GLOBALS"}["mucftqcst"]},"SELECT sum(bdamt) AS bdamt, sum(damount) AS damount, sum(bcamt) AS bcamt, sum(camount) AS camount\nFROM cashbook_total WHERE cdate <'$cdate' and locid='$locid' ")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));}$uchiommpli="casinbank";${"GLOBALS"}["driylte"]="c";if(${${"GLOBALS"}["iqfhqlyrcmp"]}=mysqli_fetch_array(${$mqyfcmalygy})){$ddbuvuy="casouthand";${"GLOBALS"}["yxrjwgmn"]="casinhand";${" GLOBALS"}["ycxjujmbxx"]="casoutbank";$rivhvpvlvij="row2";${${"GLOBALS"}["ycxjujmbxx"]}=${$rivhvpvlvij}["bdamt"];${$ddbuvuy}=${${"GLOBALS"}["ehrmrye"]}["damount"];${${"GLOBALS"}["qwlugmuq"]}=${${"GLOBALS"}["ehrmrye"]}["bcamt"];${${"GLOBALS"}["yxrjwgmn"]}=${${"GLOBALS"}["ehrmrye"]}["camount"];}${"GLOBALS"}["vlxgwoglwaff"]="casouthand";${"GLOBALS"}["vsqsyvq"]="c";$gbtcfvikwc="c1";${${"GLOBALS"}["vsqsyvq"]}=${${"GLOBALS"}["vuniweqbsr"]}+${${"GLOBALS"}["irhbwj"]}-${${"GLOBALS"}["vlxgwoglwaff"]};${${"GLOBALS"}["zrofnmo"]}=${$mlxgfcfnu}+${$uchiommpli}-${${"GLOBALS"}["grzvdzgw"]};${$crpcmulhqdx}=${${"GLOBALS"}["driylte"]};$uuxxyf="closingbank";${${"GLOBALS"}["pftixxurllcr"]}=${$gbtcfvikwc};return round(${${"GLOBALS"}["ikrtiplyy"]})."~".round(${$uuxxyf},2);}function get_open_close_balance_current($cdate,$locid){${"GLOBALS"}["hykyucgg"]="casinbank";global$con;$hcxodkfyn="c";$wawpgrg="casinhand";$uwfyhfui="closingbank";${"GLOBALS"}["jsosmmbnp"]="query4";${"GLOBALS"}["lmalalses"]="closingcash";${"GLOBALS"}["osxqifxr"]="c1";if(${${"GLOBALS"}["spdaln"]}==0){${"GLOBALS"}["nozqjcel"]="con";${${"GLOBALS"}["tdfrasnblbwk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"SELECT sum(bdamt) AS bdamt, sum(damount) AS damount, sum(bcamt) AS bcamt, sum(camount) AS camount\nFROM cashbook_total WHERE cdate <='$cdate'")or die(mysqli_error(${${"GLOBALS"}["nozqjcel"]}));}else{$jznldbrukpd="con";${${"GLOBALS"}["tdfrasnblbwk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"SELECT sum(bdamt) AS bdamt, sum(damount) AS damount, sum(bcamt) AS bcamt, sum(camount) AS camount\nFROM cashbook_total WHERE cdate <='$cdate' and locid='$locid' ")or die(mysqli_error(${$jznldbrukpd}));}if(${${"GLOBALS"}["ehrmrye"]}=mysqli_fetch_array(${${"GLOBALS"}["jsosmmbnp"]})){${"GLOBALS"}["uxpsdoimcxb"]="casinbank";$uebaobqscm="casouthand";${${"GLOBALS"}["grzvdzgw"]}=${${"GLOBALS"}["ehrmrye"]}["bdamt"];${"GLOBALS"}["rjgqbpoqaw"]="casinhand";${$uebaobqscm}=${${"GLOBALS"}["ehrmrye"]}["damount"];${${"GLOBALS"}["uxpsdoimcxb"]}=${${"GLOBALS"}["ehrmrye"]}["bcamt"];${${"GLOBALS"}["rjgqbpoqaw"]}=${${"GLOBALS"}["ehrmrye"]}["camount"];}${${"GLOBALS"}["mjtevwhlb"]}=${${"GLOBALS"}["vuniweqbsr"]}+${$wawpgrg}-${${"GLOBALS"}["shdeizhirnw"]};${${"GLOBALS"}["zrofnmo"]}=${${"GLOBALS"}["xwtlphrmf"]}+${${"GLOBALS"}["hykyucgg"]}-${${"GLOBALS"}["grzvdzgw"]};${${"GLOBALS"}["ikrtiplyy"]}=${$hcxodkfyn};${${"GLOBALS"}["pftixxurllcr"]}=${${"GLOBALS"}["osxqifxr"]};return round(${${"GLOBALS"}["lmalalses"]})."~".round(${$uwfyhfui},2);}function getEmpname($itemid){${"GLOBALS"}["rahtcyeqmmrn"]="con";global$con;$dcihdzecj="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["rahtcyeqmmrn"]},"select username from user_reg where id='$itemid'");if(${$dcihdzecj}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["username"];}else{return"N/A";}}function getstoreCName($storeid){${"GLOBALS"}["dodofgmyjgw"]="row";global$con;$phktjsvk="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sname from master_store where storeid='$storeid'");if(${${"GLOBALS"}["dodofgmyjgw"]}=mysqli_fetch_array(${$phktjsvk})){${"GLOBALS"}["xxyuccsdjo"]="row";return${${"GLOBALS"}["xxyuccsdjo"]}["sname"];}}function getstoreAdd($storeid){$swoodbzeoig="row";$aaghgpuo="que";global$con;${$aaghgpuo}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sadd from master_store where storeid='$storeid'");if(${$swoodbzeoig}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$fklrtdot="row";return${$fklrtdot}["sadd"];}}function getGstinNo($storeid){$jlfpym="con";${"GLOBALS"}["betvvkfe"]="row";$rqapjgng="que";global$con;${$rqapjgng}=mysqli_query(${$jlfpym},"select gstin_no from master_store where storeid='$storeid'");if(${${"GLOBALS"}["betvvkfe"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$xryckvqm="row";return${$xryckvqm}["gstin_no"];}}function getCenterName($wid){$jqtdelv="wid";${"GLOBALS"}["gngliyo"]="a";$obmlvemiev="wid";$jxyxqeefkdw="wid";$dmynixdjb="wid";if(${$jqtdelv}=="2"){$easmzrl="a";${$easmzrl}="UTSAV";}else if(${$obmlvemiev}=="3"){${${"GLOBALS"}["qgsdxbwdkw"]}="Shree Ji Creation";}else if(${$jxyxqeefkdw}=="4"){${"GLOBALS"}["ntenlk"]="a";${${"GLOBALS"}["ntenlk"]}="Shree Ji Synthetics";}else if(${$dmynixdjb}=="5"){$lmoxjeixz="a";${$lmoxjeixz}="Shree Ji Exclusive";}return${${"GLOBALS"}["gngliyo"]};}function getAddr($type,$wid){$bsjgokds="type";$rgidyuwn="wid";${"GLOBALS"}["viokmslpcfoq"]="type";$zkwpmrrrvg="wid";if(${${"GLOBALS"}["femmjphln"]}=="2"&&${$bsjgokds}=="s"){${${"GLOBALS"}["qgsdxbwdkw"]}="S-40A 2nd Floor, DB City Bhopal M.P 462011
Ph:0755-6644063";}else if(${$rgidyuwn}=="3"&&${${"GLOBALS"}["wdhvejbxcwc"]}=="s"){${${"GLOBALS"}["qgsdxbwdkw"]}="First Floor Rang Mahal Tower T.T Nagar Bhopal";}else if(${$zkwpmrrrvg}=="4"&&${${"GLOBALS"}["viokmslpcfoq"]}=="s"){${${"GLOBALS"}["qgsdxbwdkw"]}="Behind Police Chwki Chowk Bazar Bhopal\nPH:0755-2738276";}else if(${${"GLOBALS"}["femmjphln"]}=="5"&&${${"GLOBALS"}["wdhvejbxcwc"]}=="s"){${${"GLOBALS"}["qgsdxbwdkw"]}="Mukhar Ji Cloth Market Main Road Bairagarh Bhopal\nPH:0755-2640912";}return${${"GLOBALS"}["qgsdxbwdkw"]};}function getSupAdd($itemid){$fwthpgv="que";$trciwnaojsgz="que";global$con;${$fwthpgv}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sadd from supplier where supid ='$itemid'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$trciwnaojsgz})){${"GLOBALS"}["pqdueqsibp"]="row";return${${"GLOBALS"}["pqdueqsibp"]}["sadd"];}else{return"N/A";}}function getcustadd($aid){${"GLOBALS"}["layrexdure"]="con";$zxjubowx="que";$zgglqnrkdgt="que";global$con;${$zgglqnrkdgt}=mysqli_query(${${"GLOBALS"}["layrexdure"]},"select address from master_cust_address where aid ='$aid'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$zxjubowx})){return${${"GLOBALS"}["smeujppn"]}["address"];}else{return"N/A";}}function getSupcno($itemid){${"GLOBALS"}["crmleukd"]="que";$ervsquv="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select mobno from supplier where supid ='$itemid'");if(${$ervsquv}=mysqli_fetch_array(${${"GLOBALS"}["crmleukd"]})){return${${"GLOBALS"}["smeujppn"]}["mobno"];}else{return"N/A";}}function getSupname($itemid){global$con;${"GLOBALS"}["euuimdw"]="row";$qjnfgmqux="con";$ezjdjg="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${$qjnfgmqux},"select sname from supplier where supid ='$itemid'");if(${${"GLOBALS"}["euuimdw"]}=mysqli_fetch_array(${$ezjdjg})){${"GLOBALS"}["hyjdkbuev"]="row";return${${"GLOBALS"}["hyjdkbuev"]}["sname"];}else{return"N/A";}}function getSupCity($itemid){$kwycdudwxsvq="que";$mrqfkwjej="que";global$con;${"GLOBALS"}["hmphbgl"]="row";${$mrqfkwjej}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select city from supplier where supid ='$itemid'");if(${${"GLOBALS"}["hmphbgl"]}=mysqli_fetch_array(${$kwycdudwxsvq})){${"GLOBALS"}["flgcladmfiq"]="row";return${${"GLOBALS"}["flgcladmfiq"]}["city"];}else{return"N/A";}}function GDis($id,$typ){${"GLOBALS"}["padsdovbsjmc"]="con";global$con;$jmjnudzptgrb="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["padsdovbsjmc"]},"select gname from newgift where gid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$jmjnudzptgrb})){$ytllbbvocglp="row";return${$ytllbbvocglp}["gname"];}else{return"N/A";}}function Vamt($id){global$con;${"GLOBALS"}["oqkyxchixwle"]="vnamt";$gwrphfwmru="row";${${"GLOBALS"}["oqkyxchixwle"]}=0;${"GLOBALS"}["ekzxteb"]="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select vnamt from voucherdispatch where saleid='$id'");while(${$gwrphfwmru}=mysqli_fetch_array(${${"GLOBALS"}["ekzxteb"]})){${"GLOBALS"}["fgohleay"]="vnamt";${${"GLOBALS"}["aqcckiqks"]}=${${"GLOBALS"}["fgohleay"]}+${${"GLOBALS"}["smeujppn"]}["vnamt"];}return${${"GLOBALS"}["aqcckiqks"]};}function getMobname($cus,$m){$mxmtpoucvoy="que";global$con;${$mxmtpoucvoy}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select mobno from customer where cid ='$cus'");$jyrijwpy="row";if(${$jyrijwpy}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["kxrgcgw"]="row";return${${"GLOBALS"}["kxrgcgw"]}["mobno"];}else{return${${"GLOBALS"}["hkfylp"]};}}function getCusname($cus){$fmbbmc="que";global$con;${$fmbbmc}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select cname from customer where cid ='$cus'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["cname"];}else{return${${"GLOBALS"}["krbpjhowng"]};}}function getQty($cus){$twqekin="que";global$con;${$twqekin}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select count(sitemid) from saleitem where sid ='$cus' and stat='n'");${"GLOBALS"}["abzvrnmll"]="que";if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["abzvrnmll"]})){return${${"GLOBALS"}["smeujppn"]}[0];}else{return"No";}}function getpurPrice($itemid,$subid,$typ,$id){${"GLOBALS"}["kvcwim"]="row";$urltotsfntx="que";global$con;${$urltotsfntx}=mysqli_query(${${"GLOBALS"}["hospfs"]},"SELECT count(barcode.bid),sum(barcode.purprice) as s FROM `barcode` WHERE barcode.status='rec' and itemid='$itemid' and subitemid='$subid' and type='s'");if(${${"GLOBALS"}["kvcwim"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["tlwtfciqz"]="row";return${${"GLOBALS"}["tlwtfciqz"]}[1];}}function getmrpPrice($itemid,$subid,$typ,$id){$rqbytsttogr="typ";${"GLOBALS"}["ysaohkxdxxu"]="typ";$uiwedjv="row";global$con;if(${$rqbytsttogr}=="w"){${"GLOBALS"}["dxptxveufzu"]="con";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["dxptxveufzu"]},"select count(bid),sum(saleprice) as s from barcode where itemid='$itemid' and subitemid='$subid' and type='$typ' and barcode.warid='$id' and (barcode.status='Pur' or barcode.status='wrec')");}else if(${${"GLOBALS"}["ysaohkxdxxu"]}=="s"){${"GLOBALS"}["gvogorj"]="con";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["gvogorj"]},"select count(bid),sum(saleprice) as s from barcode where itemid='$itemid' and subitemid='$subid' and warid='$id' and barcode.status='rec' and type='$typ' ");}if(${$uiwedjv}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["nnskvvofvoun"]="row";return${${"GLOBALS"}["nnskvvofvoun"]}[1];}}function getComEmpName($id){global$con;${"GLOBALS"}["rtcaeovbiy"]="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from empcommision where comid='$id'");if(${${"GLOBALS"}["rtcaeovbiy"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["name"];}}function getComEmpCode($id){${"GLOBALS"}["syxlfjj"]="con";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["syxlfjj"]},"select * from empcommision where comid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["vgdetgdxxjqt"]="row";return${${"GLOBALS"}["vgdetgdxxjqt"]}["code"];}}function getMrp($id){${"GLOBALS"}["aydripc"]="row";${"GLOBALS"}["sexlfrcdthm"]="que";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from barcode where barcode='$id'");if(${${"GLOBALS"}["aydripc"]}=mysqli_fetch_array(${${"GLOBALS"}["sexlfrcdthm"]})){return${${"GLOBALS"}["smeujppn"]}["purprice"];}}function geTtQty($id){$foedjnjtve="que";${"GLOBALS"}["klepcyhk"]="que";${"GLOBALS"}["ylwwqjdyr"]="con";global$con;${${"GLOBALS"}["klepcyhk"]}=mysqli_query(${${"GLOBALS"}["ylwwqjdyr"]},"select Sum(qty) from dpurchaseitem where pid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$foedjnjtve})){${"GLOBALS"}["hscsugoltkyu"]="row";return${${"GLOBALS"}["hscsugoltkyu"]}[0];}}function getvat($id){$kgcrnyd="row";global$con;${"GLOBALS"}["hnckjiul"]="que";${${"GLOBALS"}["hnckjiul"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select vat from item where itemid='$id'");if(${$kgcrnyd}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){${"GLOBALS"}["lcbvrtkbnq"]="row";return${${"GLOBALS"}["lcbvrtkbnq"]}[0];}}function getvName($id){${"GLOBALS"}["eqfjopab"]="que";global$con;$juooummr="que";${${"GLOBALS"}["eqfjopab"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select vname from voucher where vid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$juooummr})){return${${"GLOBALS"}["smeujppn"]}[0];}else{return"N/A";}}function Sdate($id){global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select pdate from sale where saleid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){$gnwtvolaj="row";return${$gnwtvolaj}[0];}}function CashAmt($id){global$con;$phwxfkmhik="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select cash from payment where saleid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$phwxfkmhik})){${"GLOBALS"}["chbcfu"]="row";return${${"GLOBALS"}["chbcfu"]}[0];}}function CardAmt($id){$tfqwszsdt="que";${"GLOBALS"}["jlagwppvw"]="que";global$con;${${"GLOBALS"}["jlagwppvw"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select card from payment where saleid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$tfqwszsdt})){return${${"GLOBALS"}["smeujppn"]}[0];}}function getovat($id){global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select ovat from item where itemid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}[0];}}function Vouchamt($id){${"GLOBALS"}["ougwuo"]="que";${"GLOBALS"}["qyoucrjip"]="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select voucheramt from sale where saleid='$id'");if(${${"GLOBALS"}["qyoucrjip"]}=mysqli_fetch_array(${${"GLOBALS"}["ougwuo"]})){return${${"GLOBALS"}["smeujppn"]}[0];}else{return"0";}}function getGEmpName($username){global$con;${"GLOBALS"}["vkwgjpqyd"]="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select name from empcommision where comid ='$username'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["vkwgjpqyd"]})){return${${"GLOBALS"}["smeujppn"]}["name"];}}function getEmpAdd($username){$ashbjttqgp="que";${"GLOBALS"}["drrjugzih"]="row";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select cadd from empcommision where comid ='$username'");if(${${"GLOBALS"}["drrjugzih"]}=mysqli_fetch_array(${$ashbjttqgp})){return${${"GLOBALS"}["smeujppn"]}["cadd"];}}function getMobno($username){${"GLOBALS"}["bydjhilcmomv"]="row";${"GLOBALS"}["crkvgwjjvnh"]="con";${"GLOBALS"}["djojbsy"]="que";global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["crkvgwjjvnh"]},"select mob from empcommision where comid ='$username'");if(${${"GLOBALS"}["bydjhilcmomv"]}=mysqli_fetch_array(${${"GLOBALS"}["djojbsy"]})){return${${"GLOBALS"}["smeujppn"]}["mob"];}}function getnetpamt($id){$xsdgzhhzte="que";global$con;${$xsdgzhhzte}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sum(pamt) from payment where saleid ='$id'");$ujuwdpvvicwo="que";if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$ujuwdpvvicwo})){${"GLOBALS"}["jtktebgox"]="row";return${${"GLOBALS"}["jtktebgox"]}[0];}}function getTax($id){${"GLOBALS"}["jburbbthqu"]="que";global$con;${${"GLOBALS"}["jburbbthqu"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"selec\x 74 * from t_parent where id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["t_type"];}else{return"No";}}function getstorestate($id){global$con;${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select state from master_store where storeid='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${${"GLOBALS"}["fynbxoqyvqk"]})){return${${"GLOBALS"}["smeujppn"]}["state"];}else{return"0";}}function getstateName($id){global$con;if(is_numeric(${${"GLOBALS"}["jpkkgupj"]})){${"GLOBALS"}["ugtpbgn"]="con";${"GLOBALS"}["epuphqrly"]="row";${"GLOBALS"}["vwdnifcweam"]="que";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["ugtpbgn"]},"select name from state where id='$id'");if(${${"GLOBALS"}["epuphqrly"]}=mysqli_fetch_array(${${"GLOBALS"}["vwdnifcweam"]})){${"GLOBALS"}["rvgyhobpckm"]="row";return${${"GLOBALS"}["rvgyhobpckm"]}["name"];}else{return"0";}}else{${"GLOBALS"}["besmrprwm"]="id";return${${"GLOBALS"}["besmrprwm"]};}}function getTaxName($id){${"GLOBALS"}["tprrswpm"]="que";${"GLOBALS"}["cmfdibcryjg"]="con";global$con;$lzvbxbkfnl="que";${${"GLOBALS"}["tprrswpm"]}=mysqli_query(${${"GLOBALS"}["cmfdibcryjg"]},"select * from t_tax where tax_id='$id'");if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$lzvbxbkfnl})){return${${"GLOBALS"}["smeujppn"]}["tax_name"];}else{return"No";}}function igstcount($sid){$ioxpleof="tamt";$kacnfkd="con";$mrbtxhrcbv="tamt";global$con;${"GLOBALS"}["gkiempuejcu"]="max_query2";$unqgsjeikp="con";${${"GLOBALS"}["gkiempuejcu"]}=mysqli_query(${$unqgsjeikp},"select sum(tax_amt) as tamt from sale_tax where salid='$sid' and tax_id='1'")or die("Error in insert query : ".mysqli_error(${$kacnfkd}));${${"GLOBALS"}["ehrmrye"]}=mysqli_fetch_array(${${"GLOBALS"}["exemowfiqmn"]});${$mrbtxhrcbv}=(${${"GLOBALS"}["ehrmrye"]}["tamt"]=="")?0:${${"GLOBALS"}["ehrmrye"]}["tamt"];if(${$ioxpleof}){return 1;}else{return 0;}}function cgstcount($sid){${"GLOBALS"}["sqvxxkffwifr"]="row2";${"GLOBALS"}["dxpcombpwfa"]="tamt";${"GLOBALS"}["wzowvxdcsicw"]="max_query2";$xxrddzbmc="row2";global$con;${${"GLOBALS"}["wzowvxdcsicw"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sum(tax_amt) as tamt from sale_tax where salid='$sid' and tax_id='2'")or die("Error in insert query : ".mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["sqvxxkffwifr"]}=mysqli_fetch_array(${${"GLOBALS"}["exemowfiqmn"]});${${"GLOBALS"}["dxpcombpwfa"]}=(${$xxrddzbmc}["tamt"]=="")?0:${${"GLOBALS"}["ehrmrye"]}["tamt"];if(${${"GLOBALS"}["abyxezeb"]}){return 1;}else{return 0;}}function dcolumn($sid){${"GLOBALS"}["dhlgbblmrsoe"]="con";${"GLOBALS"}["biugiyt"]="max_query2";global$con;${"GLOBALS"}["bnqeiyzaalm"]="t";${${"GLOBALS"}["wecwhrnziow"]}=0;${${"GLOBALS"}["biugiyt"]}=mysqli_query(${${"GLOBALS"}["dhlgbblmrsoe"]},"select sitemid, barid from saleitem where salid='$sid' ")or die("Error in insert query : ".mysqli_error(${${"GLOBALS"}["hospfs"]}));while(${${"GLOBALS"}["ehrmrye"]}=mysqli_fetch_array(${${"GLOBALS"}["exemowfiqmn"]})){${"GLOBALS"}["nvdsieuyu"]="row3";${"GLOBALS"}["yofogfw"]="row2";${${"GLOBALS"}["bgkqgvqtkgx"]}=${${"GLOBALS"}["yofogfw"]}["barid"];${${"GLOBALS"}["jhvbmnvier"]}="SELECT * FROM master_txtconfig ";$idjufmbys="result3";${${"GLOBALS"}["czxzubiwl"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["jhvbmnvier"]});while(${${"GLOBALS"}["nvdsieuyu"]}=mysqli_fetch_array(${$idjufmbys})){$mwjdnevwkf="conf_id";${"GLOBALS"}["spbptxgww"]="result4";$vbuckpbvwkwf="result4";${$mwjdnevwkf}=${${"GLOBALS"}["knnumohrxzxl"]}["conf_id"];${"GLOBALS"}["acpqoaqdv"]="dcolumn2";$wwmhxvnn="result4";$ebacfzuqo="sql4";${$ebacfzuqo}="SELECT * FROM barcode_txt where wbarid in ($barid) and txt_id='$conf_id'";${${"GLOBALS"}["spbptxgww"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["lrpoqwb"]});${${"GLOBALS"}["acpqoaqdv"]}=mysqli_num_rows(${$wwmhxvnn});if(${${"GLOBALS"}["gxghjm"]}=mysqli_fetch_array(${$vbuckpbvwkwf})){${"GLOBALS"}["sevwdc"]="row4";echo "";if(${${"GLOBALS"}["sevwdc"]}["txt_value"]!=""){${${"GLOBALS"}["wecwhrnziow"]}=1;}echo "\n\t\t\t ";}else{${"GLOBALS"}["gfbqenxc"]="k";${"GLOBALS"}["lpdrfb"]="k";for(${${"GLOBALS"}["lpdrfb"]}=1;${${"GLOBALS"}["bhdobyeeuoxk"]}<=${${"GLOBALS"}["ucsfjdrps"]};${${"GLOBALS"}["gfbqenxc"]}++){echo" ";}}}}return${${"GLOBALS"}["bnqeiyzaalm"]};}function sms_username($val){global$con;$maftkxvinms="data";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select username from master_sms_id where loc_id='$val'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${$maftkxvinms}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["username"];}function sms_username_old(){${"GLOBALS"}["vsuiinujpvrl"]="sql";${"GLOBALS"}["egbwvtodnul"]="con";global$con;${"GLOBALS"}["dwpqvmp"]="con";$ctmqvsshw="sql";${${"GLOBALS"}["vsuiinujpvrl"]}=mysqli_query(${${"GLOBALS"}["dwpqvmp"]},"select nvalue from t_param where nkey='sms_username'")or die(mysqli_error(${${"GLOBALS"}["egbwvtodnul"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${$ctmqvsshw});$covlqs="data";return${$covlqs}["nvalue"];}function sms_password($val){${"GLOBALS"}["mhpcqomeimk"]="con";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["mhpcqomeimk"]},"select password from master_sms_id where loc_id='$val'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBAL S"}["xstkqcbqhlqi"]}["password"];}function sms_password_old(){$xqewkvyvrn="sql";global$con;${$xqewkvyvrn}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select nvalue from t_param where nkey='sms_password'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["nvalue"];}function sms_status($val){${"GLOBALS"}["xhnjygp"]="sql";$hzgpjlo="data";global$con;${"GLOBALS"}["gkfkrj"]="data";${${"GLOBALS"}["xhnjygp"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sms_status from master_sms_id where loc_id='$val'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${$hzgpjlo}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["gkfkrj"]}["sms_status"];}function sms_senderid($val){${"GLOBALS"}["xcmqqtbi"]="sql";${"GLOBALS"}["lihdbheoq"]="sql";${"GLOBALS"}["xnfhnuvd"]="data";global$con;$xmpiresmtpl="con";${${"GLOBALS"}["xcmqqtbi"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sender_id from master_sms_id where loc_id='$val'")or die(mysqli_error(${$xmpiresmtpl}));${${"GLOBALS"}["xnfhnuvd"]}=mysqli_fetch_assoc(${${"GLOBALS"}["lihdbheoq"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["sender_id"];}function sms_senderid_old(){$mwmktybnhm="con";$lmeynhtvp="con";${"GLOBALS"}["jbjmgak"]="data";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${$lmeynhtvp},"select nvalue from t_param where nkey='sms_senderid'")or die(mysqli_error(${$mwmktybnhm}));$dqybgyxidevr="data";${${"GLOBALS"}["jbjmgak"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${$dqybgyxidevr}["nvalue"];}function sms_url(){$skykkr="con";$jcfhqgymp="data";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select nvalue from t_param where nkey='sms_url'")or die(mysqli_error(${$skykkr}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${$jcfhqgymp}["nvalue"];}function sms_text(){${"GLOBALS"}["ckpvrlo"]="con";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["ckpvrlo"]},"select nvalue from t_param where nkey='sms_sale_text'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["nvalue"];}function sms_credit_text(){$wdnqox="con";${"GLOBALS"}["kddhmngmq"]="data";$gfnepbdemhl="sql";$jpkssnvt="sql";global$con;${$jpkssnvt}=mysqli_query(${$wdnqox},"select nvalue from t_param where nkey='sms_credit_text'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["kddhmngmq"]}=mysqli_fetch_assoc(${$gfnepbdemhl});return${${"GLOBALS"}["xstkqcbqhlqi"]}["nvalue"];}function sms_text_new($forward_type,$template_type='single',$lang='English',$locid){$ilbnibmvap="data";$jtywqpbyr="qry";$nxwoqobyb="forward_type";global$con;${"GLOBALS"}["mpjnks"]="qry";if(is_array(${$nxwoqobyb})){${"GLOBALS"}["tloicqph"]="forward_type";$cbeavhpemn="filters";$abpngjkc="key";${"GLOBALS"}["qfjmqmslr"]="filters";${"GLOBALS"}["iqrerbqfwkb"]="filters";${${"GLOBALS"}["iqrerbqfwkb"]}="";foreach(${${"GLOBALS"}["tloicqph"]} as${$abpngjkc}=>${${"GLOBALS"}["jdnsdoeclbg"]}){$hrhhisingh="filters";${$hrhhisingh}.="$key='$value' and ";}${$cbeavhpemn}=rtrim(${${"GLOBALS"}["qfjmqmslr"]},"and ");}else{$zsgjutrrujbw="filters";${$zsgjutrrujbw}="forward_type="."'$forward_type'";}${$jtywqpbyr}="select sms_content,senderid from master_sms_config where $filters and template_type='$template_type' and lang='$lang' and status='1' and locid='$locid'";$otswvceinby="msgSid";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["mpjnks"]})or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});${$otswvceinby}=array();${${"GLOBALS"}["lwttthr"]}["message"]=${$ilbnibmvap}["sms_content"];${${"GLOBALS"}["lwttthr"]}["senderid"]=${${"GLOBALS"}["xstkqcbqhlqi"]}["senderid"];return${${"GLOBALS"}["lwttthr"]};}function sms_advance_text(){global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select nvalue from t_param where nkey='sms_advance_text'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${"GLOBALS"}["jygioznbmh"]="sql";${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["jygioznbmh"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["nvalue"];}function sms_credit_sale_text(){global$con;${"GLOBALS"}["mpgpysxbv"]="sql";${${"GLOBALS"}["mpgpysxbv"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select nvalue from t_param where nkey='sms_credit_sale_text'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["nvalue"];}function t_param_key($val){$jinxrqyq="data";global$con;$xhmmwo="data";$sinlyz="con";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select nkey from t_param where nvalue='$val'")or die(mysqli_error(${$sinlyz}));${$jinxrqyq}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${$xhmmwo}["nkey"];}function t_param_key_ref($val){$rwetemqynkro="sql";$cgbwxgepuquj="sql";${"GLOBALS"}["swvtkvsicxq"]="data";global$con;${"GLOBALS"}["nyqefcgovogt"]="data";${$cgbwxgepuquj}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select v_ref from t_param where nkey='$val'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["swvtkvsicxq"]}=mysqli_fetch_assoc(${$rwetemqynkro});return${${"GLOBALS"}["nyqefcgovogt"]}["v_ref"];}function t_param($val){${"GLOBALS"}["hstvbazc"]="con";${"GLOBALS"}["ggnmfkyi"]="data";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hstvbazc"]},"select nvalue from t_param where nkey='$val'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["ggnmfkyi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["nvalue"];}function getBarcodeConfig($val){${"GLOBALS"}["junuqm"]="sql";${"GLOBALS"}["xujibg"]="con";global$con;${"GLOBALS"}["yjzwfm"]="con";${${"GLOBALS"}["junuqm"]}=mysqli_query(${${"GLOBALS"}["yjzwfm"]},"select v_value from t_barcode_config where v_name='$val'")or die(mysqli_error(${${"GLOBALS"}["xujibg"]}));${"GLOBALS"}["zwdhdqngtd"]="data";${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["zwdhdqngtd"]}["v_value"];}function getGstin($val){$ljshnl="con";$xqsinrcf="data";$xtnmqxm="sql";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select gstin_no from master_store where storeid='$val'")or die(mysqli_error(${$ljshnl}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${$xtnmqxm});return${$xqsinrcf}["gstin_no"];}function getbillno($val){global$con;${"GLOBALS"}["eaocjdnnqhmk"]="con";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["eaocjdnnqhmk"]},"select billid from sale where saleid='$val'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));if(mysqli_num_rows(${${"GLOBALS"}["trocgxpqxq"]})>0){${"GLOBALS"}["kionknfg"]="data";${"GLOBALS"}["djmxbw"]="data";${${"GLOBALS"}["kionknfg"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});return${${"GLOBALS"}["djmxbw"]}["billid"];}else{return${${"GLOBALS"}["dynfeffu"]};}}function getlocation($id){$gbuxowj="sql";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select location_name from t_location_master where id='$id'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${$gbuxowj});return${${"GLOBALS"}["xstkqcbqhlqi"]}["location_name"];}function getshortcutlocname($id){${"GLOBALS"}["ygqvhsuil"]="sql";${"GLOBALS"}["yxmqdzdidou"]="sql";${"GLOBALS"}["hlqhgvgm"]="data";global$con;${${"GLOBALS"}["ygqvhsuil"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select loc_shortcut from t_location_master where id='$id'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["hlqhgvgm"]}=mysqli_fetch_assoc(${${"GLOBALS"}["yxmqdzdidou"]});return${${"GLOBALS"}["xstkqcbqhlqi"]}["loc_shortcut"];}function barcode_history($comid,$barcode,$locqty_json,$locid,$mode,$uid,$trans_id,$trans_tbl,$prevlocqty_json=""){${"GLOBALS"}["gvtmmptzu"]="cqty_json";${"GLOBALS"}["zctckikj"]="que";${"GLOBALS"}["zmyzvjhdfpu"]="cqty_json";$ysmwexk="net_qty";${"GLOBALS"}["xunyct"]="locqty_json";${"GLOBALS"}["grugvqqo"]="que2";global$con;${"GLOBALS"}["dsifypvkgs"]="prevlocqty_json";${${"GLOBALS"}["gvtmmptzu"]}=${${"GLOBALS"}["xunyct"]};$khgkyhxvwfw="stockqty_json_cqty";${${"GLOBALS"}["usgcuhxkktx"]}=json_decode(${${"GLOBALS"}["zmyzvjhdfpu"]},true);${${"GLOBALS"}["guplakldos"]}=json_decode(${${"GLOBALS"}["dsifypvkgs"]},true);${${"GLOBALS"}["grugvqqo"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select json_cqty from bar_combination where comid= '".${${"GLOBALS"}["bhjqgfhpsrr"]}."'");if(${${"GLOBALS"}["ehrmrye"]}=mysqli_fetch_array(${${"GLOBALS"}["rsplovfqcqi"]})){$xltfpbne="row2";${"GLOBALS"}["kwgzycyqdp"]="stockqty_json_cqty";${${"GLOBALS"}["kwgzycyqdp"]}=${$xltfpbne}["json_cqty"];}${"GLOBALS"}["vikcms"]="loc_qty";${"GLOBALS"}["elwhrucd"]="que";$ghrclkjptuh="stockqty_json_array";${$ghrclkjptuh}=json_decode(${$khgkyhxvwfw},true);${"GLOBALS"}["guqwgqoohk"]="row";${$ysmwexk}=0;${${"GLOBALS"}["elwhrucd"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select * from t_location_master ORDER BY `t_location_master`.`id` ASC ");while(${${"GLOBALS"}["guqwgqoohk"]}=mysqli_fetch_array(${${"GLOBALS"}["zctckikj"]})){${"GLOBALS"}["cgmklaik"]="net_qty";$wtjxsjpmzly="cqty_json_array";${"GLOBALS"}["inhuadppxdi"]="clstock_qty";${"GLOBALS"}["gbtknnenu"]="mode";$prkntrqbjz="location_id";${"GLOBALS"}["haqwsuef"]="stockqty_json_array";$gqntxcghek="cur_boxqty";$bcwmqhkbs="mode";${"GLOBALS"}["qqejpfivnycv"]="location_id";$bkuusdxl="mode";$eqberubps="mode";$fzmhzcueqde="row";$eiemiheiqo="mode";$pwytusfcp="cur_qty";${"GLOBALS"}["mufxpwun"]="stock_qty";${"GLOBALS"}["ljotykre"]="cqty_json_array";${${"GLOBALS"}["vmrojdthjn"]}=${$fzmhzcueqde}["id"];$zgdfjts="mode";${$pwytusfcp}=${${"GLOBALS"}["ljotykre"]}[${${"GLOBALS"}["vmrojdthjn"]}]["qty"];${$gqntxcghek}=${$wtjxsjpmzly}[${${"GLOBALS"}["qqejpfivnycv"]}]["boxqty"];$upvnknn="location_id";${${"GLOBALS"}["mufxpwun"]}=${${"GLOBALS"}["vmoklmqozijl"]}[${$prkntrqbjz}]["qty"];${"GLOBALS"}["bhiudseq"]="stock_boxqty";${${"GLOBALS"}["bhiudseq"]}=${${"GLOBALS"}["haqwsuef"]}[${$upvnknn}]["boxqty"];$uwytwzzrjhvz="mode";${"GLOBALS"}["huctryymj"]="net_qty";$qyhhilv="clstock_qty";if(${${"GLOBALS"}["gbtknnenu"]}=="In"){$nqwmlko="clstock_qty";${$nqwmlko}=${${"GLOBALS"}["odkncndyzgb"]}+${${"GLOBALS"}["dlydvv"]};${${"GLOBALS"}["iyxrcx"]}=${${"GLOBALS"}["sfjclcubr"]}+${${"GLOBALS"}["uromjoroswys"]};}elseif(${$bkuusdxl}=="Sale"){${"GLOBALS"}["vycbqogmrf"]="stock_qty";${"GLOBALS"}["jzvgjsdpf"]="stock_boxqty";$onvhlht="clstock_boxqty";${${"GLOBALS"}["ltcopkaxfd"]}=${${"GLOBALS"}["vycbqogmrf"]}-${${"GLOBALS"}["dlydvv"]};${"GLOBALS"}["usdwesgrqg"]="cur_boxqty";${$onvhlht}=${${"GLOBALS"}["jzvgjsdpf"]}-${${"GLOBALS"}["usdwesgrqg"]};}elseif(${${"GLOBALS"}["a\ x64txfbe"]}=="Return"){$bmhcuzwzkni="clstock_qty";$xkiekldb="stock_qty";$aoriass="cur_qty";${"GLOBALS"}["vgbndreatwuk"]="stock_boxqty";${$bmhcuzwzkni}=${$xkiekldb}+${$aoriass};${${"GLOBALS"}["iyxrcx"]}=${${"GLOBALS"}["vgbndreatwuk"]}+${${"GLOBALS"}["uromjoroswys"]};}elseif(${$bcwmqhkbs}=="dump"){$wpuivrdzp="clstock_boxqty";$wnzgcjvntb="clstock_qty";$gcngcdbt="cur_qty";${$wnzgcjvntb}=${${"GLOBALS"}["odkncndyzgb"]}-${$gcngcdbt};${$wpuivrdzp}=${${"GLOBALS"}["sfjclcubr"]}-${${"GLOBALS"}["uromjoroswys"]};}elseif(${${"GLOBALS"}["adtxfbe"]}=="SALE-DELETE"){${"GLOBALS"}["kopiukxxc"]="stock_qty";${"GLOBALS"}["croekva"]="cur_boxqty";${${"GLOBALS"}["ltcopkaxfd"]}=${${"GLOBALS"}["kopiukxxc"]}+${${"GLOBALS"}["dlydvv"]};${${"GLOBALS"}["iyxrcx"]}=${${"GLOBALS"}["sfjclcubr"]}+${${"GLOBALS"}["croekva"]};}elseif(${${"GLOBALS"}["adtxfbe"]}=="DELETE"){${"GLOBALS"}["qphdwgekukh"]="stock_qty";$plwyblkx="clstock_boxqty";$vfnywpkxuvo="stock_boxqty";${${"GLOBALS"}["ltcopkaxfd"]}=${${"GLOBALS"}["qphdwgekukh"]}-${${"GLOBALS"}["dlydvv"]};${$plwyblkx}=${$vfnywpkxuvo}-${${"GLOBALS"}["uromjoroswys"]};}elseif(${$zgdfjts}=="PUR-EDIT"){$inrwaek="cur_qty";$eftenylb="location_id";${"GLOBALS"}["kgnlthhydtd"]="prev_qty";$yberklhnj="prev_boxqty";${${"GLOBALS"}["kgnlthhydtd"]}=${${"GLOBALS"}["guplakldos"]}[${$eftenylb}]["qty"];${"GLOBALS"}["apjzomjvf"]="prev_boxqty";$gisycvdn="clstock_qty";${$yberklhnj}=${${"GLOBALS"}["guplakldos"]}[${${"GLOBALS"}["vmrojdthjn"]}]["boxqty"];${"GLOBALS"}["lbcjwvleekc"]="cur_boxqty";${$gisycvdn}=${${"GLOBALS"}["odkncndyzgb"]}-${${"GLOBALS"}["gpcpqkygrok"]}+${$inrwaek};${${"GLOBALS"}["iyxrcx"]}=${${"GLOBALS"}["sfjclcubr"]}-${${"GLOBALS"}["apjzomjvf"]}-${${"GLOBALS"}["lbcjwvleekc"]};}elseif(${$eiemiheiqo}=="SALE_EDIT"){$dkscvje="cur_boxqty";${"GLOBALS"}["wneegbn"]="location_id";${${"GLOBALS"}["gpcpqkygrok"]}=${${"GLOBALS"}["guplakldos"]}[${${"GLOBALS"}["vmrojdthjn"]}]["qty"];${${"GLOBALS"}["irgnrmhkxl"]}=${${"GLOBALS"}["guplakldos"]}[${${"GLOBALS"}["wneegbn"]}]["boxqty"];${${"GLOBALS"}["ltcopkaxfd"]}=${${"GLOBALS"}["odkncndyzgb"]}+${${"GLOBALS"}["gpcpqkygrok"]}-${${"GLOBALS"}["dlydvv"]};${${"GLOBALS"}["iyxrcx"]}=${${"GLOBALS"}["sfjclcubr"]}+${${"GLOBALS"}["irgnrmhkxl"]}-${$dkscvje};}if(${${"GLOBALS"}["adtxfbe"]}=="TRANS-IN"){${"GLOBALS"}["cgtgst"]="clstock_qty";$ldkjgelvvb="stock_boxqty";$ovuekjyyshb="stock_qty";${${"GLOBALS"}["cgtgst"]}=${$ovuekjyyshb}+${${"GLOBALS"}["dlydvv"]};${${"GLOBALS"}["iyxrcx"]}=${$ldkjgelvvb}+${${"GLOBALS"}["uromjoroswys"]};}if(${${"GLOBALS"}["adtxfbe"]}=="TRANS-OUT"){$lvcmpshksk="clstock_boxqty";${"GLOBALS"}["tgctszifhl"]="clstock_qty";${"GLOBALS"}["vgyahuu"]="cur_qty";$tiqswqf="stock_boxqty";${${"GLOBALS"}["tgctszifhl"]}=${${"GLOBALS"}["odkncndyzgb"]}-${${"GLOBALS"}["vgyahuu"]};${$lvcmpshksk}=${$tiqswqf}-${${"GLOBALS"}["uromjoroswys"]};}if(${$uwytwzzrjhvz}=="CONV-IN"){$gihhygcbskx="cur_qty";$qsbjpvrp="clstock_boxqty";${"GLOBALS"}["dhwtfxttqbq"]="cur_boxqty";${${"GLOBALS"}["ltcopkaxfd"]}=${${"GLOBALS"}["odkncndyzgb"]}+${$gihhygcbskx};${$qsbjpvrp}=${${"GLOBALS"}["sfjclcubr"]}+${${"GLOBALS"}["dhwtfxttqbq"]};}if(${$eqberubps}=="CONV-OUT"){${"GLOBALS"}["oscjwukznz"]="clstock_boxqty";${"GLOBALS"}["frfuyizpamys"]="cur_boxqty";${${"GLOBALS"}["ltcopkaxfd"]}=${${"GLOBALS"}["odkncndyzgb"]}-${${"GLOBALS"}["dlydvv"]};${${"GLOBALS"}["oscjwukznz"]}=${${"GLOBALS"}["sfjclcubr"]}-${${"GLOBALS"}["frfuyizpamys"]};}${${"GLOBALS"}["huctryymj"]}=${${"GLOBALS"}["cgmklaik"]}+${${"GLOBALS"}["inhuadppxdi"]};${${"GLOBALS"}["tvptaflnt"]}[${${"GLOBALS"}["vmrojdthjn"]}]=array("qty"=>${$qyhhilv},"boxqty"=>${${"GLOBALS"}["iyxrcx"]});}${${"GLOBALS"}["tvptaflnt"]}=json_encode(${${"GLOBALS"}["tvptaflnt"]});${${"GLOBALS"}["wqosavk"]}=date("Y/m/d h:i A");mysqli_query(${${"GLOBALS"}["hospfs"]},"update bar_combination set json_cqty ='$clos_locqty_json',cur_stock='$net_qty',lastupdate_datetime='$cdatetime' where comid ='".${${"GLOBALS"}["bhjqgfhpsrr"]}."'");mysqli_query(${${"GLOBALS"}["hospfs"]},"insert into barcode_history(barcode,locid,qty,loc_balance,balance,mode,dates,times,uid,trans_id,trans_tbl,comid,prevqty_json,cqty_json,closstock_json) values('".${${"GLOBALS"}["emxoouub"]}."','".${${"GLOBALS"}["spdaln"]}."','".${${"GLOBALS"}["tsjvnis"]}."','".${${"GLOBALS"}["vikcms"]}."','".${${"GLOBALS"}["yrrydjbr"]}."','".${${"GLOBALS"}["adtxfbe"]}."','".date("Y/m/d")."','".date("h:i A")."','".${${"GLOBALS"}["sjiqbb"]}."','$trans_id','$trans_tbl','$comid','$stockqty_json_cqty','$cqty_json','$clos_locqty_json')");}function getlocationName($locid){global$con;$wstfxppi="que";$zsyjvlmvz="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select location_name from t_location_master where id='$locid'");if(${$zsyjvlmvz}=mysqli_fetch_array(${$wstfxppi})){$tnletpm="row";return${$tnletpm}["location_name"];}}function getPurShow($uid){${"GLOBALS"}["pljcvwury"]="con";global$con;${"GLOBALS"}["qrftmdrpjr"]="row";${${"GLOBALS"}["fynbxoqyvqk"]}=mysqli_query(${${"GLOBALS"}["pljcvwury"]},"select show_purchase_search from user_reg where id='$uid'");$fripmj="que";if(${${"GLOBALS"}["qrftmdrpjr"]}=mysqli_fetch_array(${$fripmj})){$rgrugqjcqbd="row";return${$rgrugqjcqbd}["show_purchase_search"];}}function po_history($poid,$poitemid,$barcode,$suppid,$qty,$status,$cdate,$ctime,$uid){global$con;$yrnqspmdic="status";${"GLOBALS"}["\x6 dlixjkrbbf"]="status";if(${$yrnqspmdic}=="O"){$icoeci="con";${"GLOBALS"}["tuivefil"]="sql";${"GLOBALS"}["ccmllxdjrxcp"]="con";${"GLOBALS"}["ngbyesot"]="qty";${"GLOBALS"}["ngqvkxc"]="con";${${"GLOBALS"}["tviwemtu"]}=${${"GLOBALS"}["ngbyesot"]};$iffvwjgo="con";${${"GLOBALS"}["tuivefil"]}=mysqli_query(${${"GLOBALS"}["ccmllxdjrxcp"]},"select pqty from po_receive_history where poid='$poid' and barcode='$barcode'")or die(mysqli_error(${$icoeci}));if(mysqli_num_rows(${${"GLOBALS"}["trocgxpqxq"]})>0){${"GLOBALS"}["wvwtsmbprx"]="sql";${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["wvwtsmbprx"]});${${"GLOBALS"}["tviwemtu"]}=${${"GLOBALS"}["tsjvnis"]}+${${"GLOBALS"}["xstkqcbqhlqi"]}["pqty"];}mysqli_query(${${"GLOBALS"}["ngqvkxc"]},"insert into po_receive_history(poid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$poid' ,'$poitemid', '$barcode', '$suppid', '$qty', '$pqty', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${$iffvwjgo}));}elseif(${${"GLOBALS"}["pvcvdqpr"]}=="U"){$ikjjnuchbg="data";$fnovwxbvch="sql";${"GLOBALS"}["psebbwdcdp"]="con";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["psebbwdcdp"]},"select sum(pqty) as pqty from purchase_order_det where pqty<>0 and barcode='$barcode' and poid='$poid'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${"GLOBALS"}["imochmtrx"]="pqty";${"GLOBALS"}["fplmmnpotdc"]="con";$gucstxrclh="con";${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${$fnovwxbvch});${${"GLOBALS"}["imochmtrx"]}=${$ikjjnuchbg}["pqty"];mysqli_query(${$gucstxrclh},"insert into po_receive_history(poid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$poid' ,'$poitemid', '$barcode', '$suppid', '$qty', '$pqty', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${${"GLOBALS"}["fplmmnpotdc"]}));}elseif(${${"GLOBALS"}["mlixjkrbbf"]}=="T"){${"GLOBALS"}["dgnosh"]="con";$mpabiurw="con";mysqli_query(${$mpabiurw},"insert into po_receive_history(poid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$poid' ,'$poitemid', '$barcode', '$suppid', '$qty', '0', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${${"GLOBALS"}["dgnosh"]}));}elseif(${${"GLOBALS"}["pvcvdqpr"]}=="R"){$tgodljjhg="con";$hnlkpdbom="qty";$zphamyvp="data";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select pqty from po_receive_history where poid='$poid' and barcode='$barcode' order by hid desc limit 1")or die(mysqli_error(${$tgodljjhg}));${"GLOBALS"}["jrkrmdvciy"]="data";$ydzvxcn="sql";${${"GLOBALS"}["jrkrmdvciy"]}=mysqli_fetch_assoc(${$ydzvxcn});${"GLOBALS"}["umomqjvdmjlr"]="con";$ylssexfw="con";${${"GLOBALS"}["tviwemtu"]}=${$zphamyvp}["pqty"]-${$hnlkpdbom};mysqli_query(${${"GLOBALS"}["umomqjvdmjlr"]},"insert into po_receive_history(poid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$poid' ,'$poitemid', '$barcode', '$suppid', '$qty', '$pqty', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${$ylssexfw}));}}function check_master_status($tblname,$column,$val,$colid){${"GLOBALS"}["dqjfdfd"]="qry";$rcupwlxumgf="val";global$con;${${"GLOBALS"}["dynfeffu"]}=trim(${${"GLOBALS"}["dynfeffu"]});${"GLOBALS"}["ryqccvun"]="num";${${"GLOBALS"}["dqjfdfd"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select $colid from $tblname where $column='".trim(${$rcupwlxumgf})."'");${${"GLOBALS"}["ryqccvun"]}=mysqli_num_rows(${${"GLOBALS"}["ezbcwdygue"]});if(${${"GLOBALS"}["qhsumqfroh"]}==0){return 0;}else{$rgvsworkr="qry";${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_array(${$rgvsworkr});return${${"GLOBALS"}["smeujppn"]}[${${"GLOBALS"}["xvtckyc"]}];}}function master_create($tblname,$column,$val,$subcat=1,$hsn=''){$pmunifnfx="val";global$con;${${"GLOBALS"}["dynfeffu"]}=trim(${$pmunifnfx});if(${${"GLOBALS"}["dynfeffu"]}!="0"&&${${"GLOBALS"}["dynfeffu"]}!=""){${"GLOBALS"}["yshkemftel"]="subcat";if(${${"GLOBALS"}["yshkemftel"]}==1){${"GLOBALS"}["kxqzieimkkg"]="con";${"GLOBALS"}["rrqlgxxnbrp"]="con";${"GLOBALS"}["ocxnyqfu"]="con";${${"GLOBALS"}["scbverhmq"]}=mysqli_query(${${"GLOBALS"}["ocxnyqfu"]},"insert into $tblname (catid, $column, storeid, hsncode) values ('1','$val','".$_SESSION["storeid"]."','$hsn')")or die(mysqli_error(${${"GLOBALS"}["rrqlgxxnbrp"]}));return mysqli_insert_id(${${"GLOBALS"}["kxqzieimkkg"]});}else{${"GLOBALS"}["prflgza"]="con";$jbjufbm="con";${${"GLOBALS"}["scbverhmq"]}=mysqli_query(${${"GLOBALS"}["prflgza"]},"insert into $tblname ($column, storeid) values ('$val','".$_SESSION["storeid"]."')")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));return mysqli_insert_id(${$jbjufbm});}}else{return 0;}}function check_combination_barcode($rate_ary,$wp_ary,$swp_ary,$scatid,$cstyle,$colr,$csize,$cbrand,$saleprice,$wp,$swp,$nmrp,$purprice,$barcode,$bstatus,$pur_item_txt_val1,$pur_item_txt_val2,$pur_item_txt_val3,$pur_item_txt_val4,$pur_item_txt_val5,$pur_item_txt_val6,$ptype,$qty,$expiry,$minstock='0',$maxstock='0',$suppid,$pur_unique_barcode="Yes"){${"GLOBALS"}["orgbkjwclrt"]="combination_locwp";$vshrdhzogqg="dp";global$con;${"GLOBALS"}["rswemd"]="swp";@${${"GLOBALS"}["nvmctbquurw"]}=$_SESSION["locid"];${"GLOBALS"}["toxvxsdzfn"]="saleprice";$dvnfjgfw="purprice";${"GLOBALS"}["sxusuqdqtw"]="scatid";$xvfdmjgpf="point_f";${"GLOBALS"}["ynbnqfug"]="dp";$kndthfqkry="dp";${${"GLOBALS"}["ynbnqfug"]}=t_param("DecimalPlace");${"GLOBALS"}["lskqyt"]="dp";$ltkdodmrk="combination_locswp";${$vshrdhzogqg}=(${${"GLOBALS"}["bxbqvxvb"]}!="")?${$kndthfqkry}:2;${"GLOBALS"}["stktucrgmqh"]="purprice";${"GLOBALS"}["swrjnelwcwh"]="point_f";${${"GLOBALS"}["vromhryessd"]}="%.".${${"GLOBALS"}["lskqyt"]}."f";$glcstfre="saleprice";${$dvnfjgfw}=sprintf(${$xvfdmjgpf},${${"GLOBALS"}["stktucrgmqh"]});${${"GLOBALS"}["c\ x77firi"]}=sprintf(${${"GLOBALS"}["swrjnelwcwh"]},${${"GLOBALS"}["toxvxsdzfn"]});${${"GLOBALS"}["iadffoqq"]}=sprintf(${${"GLOBALS"}["vromhryessd"]},${${"GLOBALS"}["iadffoqq"]});${${"GLOBALS"}["rswemd"]}=sprintf(${${"GLOBALS"}["vromhryessd"]},${${"GLOBALS"}["mjibxskgm"]});${${"GLOBALS"}["ojqiefmp"]}=sprintf(${${"GLOBALS"}["vromhryessd"]},${${"GLOBALS"}["ojqiefmp"]});${"GLOBALS"}["bhlzyxxxqu"]="con";if(${${"GLOBALS"}["sxusuqdqtw"]}==""){${"GLOBALS"}["mbxzrrao"]="scatid";${${"GLOBALS"}["mbxzrrao"]}=0;}$bhhlwgp="qry";if(${${"GLOBALS"}["krnmunohrs"]}==""){$emscyxbol="cstyle";${$emscyxbol}=0;}if(${${"GLOBALS"}["pgcfjjvco"]}==""){${${"GLOBALS"}["pgcfjjvco"]}=0;}${"GLOBALS"}["kygxargee"]="purprice";if(${${"GLOBALS"}["rtkglstcg"]}==""){${${"GLOBALS"}["rtkglstcg"]}=0;}$fpsrrdo="barcode_ret";if(${${"GLOBALS"}["prepwlhamfx"]}==""){$qfnjphomlu="expiry";${$qfnjphomlu}=0;}if(${${"GLOBALS"}["jliwgd"]}==""){${${"GLOBALS"}["jliwgd"]}=0;}if(${$glcstfre}==""){${${"GLOBALS"}["cwfiri"]}=0;}if(${${"GLOBALS"}["ojqiefmp"]}==""){$phtbts="nmrp";${$phtbts}=0;}${"GLOBALS"}["gcdshfrtg"]="combination_wpprice";if(${${"GLOBALS"}["kygxargee"]}==""){$bwdhcup="purprice";${$bwdhcup}=0;}if(${${"GLOBALS"}["yhjnkkdo"]}==""){${${"GLOBALS"}["yhjnkkdo"]}="Other";}${${"GLOBALS"}["cjiuepkx"]}=t_param("combination_saleprice");$hymlhlzhjv="combination_locwp";${${"GLOBALS"}["oaexertoar"]}=t_param("combination_locrate");${${"GLOBALS"}["orgbkjwclrt"]}=t_param("combination_locwp");${"GLOBALS"}["mkokypm"]="combination_swpprice";${${"GLOBALS"}["gcdshfrtg"]}=t_param("combination_wpprice");${$ltkdodmrk}=t_param("combination_locswp");${${"GLOBALS"}["mkokypm"]}=t_param("combination_swpprice");${${"GLOBALS"}["ezbcwdygue"]}="select comid, barcode from bar_combination where 1=1 and delstatus=0 and bstatus ='$bstatus'";if(t_param("combination_supplier")=="Y"){${"GLOBALS"}["ihelbyvoxxs"]="suppid";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and suppid='".${${"GLOBALS"}["ihelbyvoxxs"]}."'";}if(t_param("combination_scat")=="Y"){$wjlhuks="scatid";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and scatid='".${$wjlhuks}."'";}if(t_param("combination_brand")=="Y"){${"GLOBALS"}["mpbsvbuf"]="qry";$ybdfbzybwfg="cbrand";$wnxnhgqnjofv="qry";${${"GLOBALS"}["mpbsvbuf"]}=${$wnxnhgqnjofv}." and cbrand='".${$ybdfbzybwfg}."'";}${"GLOBALS"}["syuhsrcir"]="barcode";if(t_param("combination_color")=="Y"){$efxjrpnq="colr";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and colr='".${$efxjrpnq}."'";}${"GLOBALS"}["cvnuqxcsa"]="ptype";if(t_param("combination_size")=="Y"){${"GLOBALS"}["pxplwcv"]="qry";${${"GLOBALS"}["pxplwcv"]}=${${"GLOBALS"}["ezbcwdygue"]}." and csize='".${${"GLOBALS"}["rtkglstcg"]}."'";}$kuwgzyt="j";if(t_param("combination_cstyle")=="Y"){${"GLOBALS"}["vyengl"]="qry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["vyengl"]}." and cstyle='".${${"GLOBALS"}["krnmunohrs"]}."'";}if(t_param("combination_expiry")=="Y"){${"GLOBALS"}["tbublbz"]="expiry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and expiry='".${${"GLOBALS"}["tbublbz"]}."'";}if(t_param("combination_purprice")=="Y"){${"GLOBALS"}["iygnke"]="qry";${${"GLOBALS"}["iygnke"]}=${${"GLOBALS"}["ezbcwdygue"]}." and purprice='".${${"GLOBALS"}["xqrwncty"]}."'";}$gifnhrj="combination_locrate";$ticmnds="lq";if(t_param("combination_minstock")=="Y"){$bcrwervyllt="qry";$gdbsxzp="minstock";${${"GLOBALS"}["ezbcwdygue"]}=${$bcrwervyllt}." and minstocks='".${$gdbsxzp}."'";}if(t_param("combination_maxstock")=="Y"){$rhsuratowb="qry";${${"GLOBALS"}["ezbcwdygue"]}=${$rhsuratowb}." and maxstocks='".${${"GLOBALS"}["ousurfp"]}."'";}if(t_param("pur_item_txt1")=="Y"){$feikewn="qry";${"GLOBALS"}["jcslhyuu"]="qry";${${"GLOBALS"}["jcslhyuu"]}=${$feikewn}." and pur_item_txt1='".${${"GLOBALS"}["ixmiqvvpeme"]}."'";}$jsintyxg="rq";if(t_param("pur_item_txt2")=="Y"){$jxnnsoz="qry";${"GLOBALS"}["uevhdzg"]="qry";${$jxnnsoz}=${${"GLOBALS"}["uevhdzg"]}." and pur_item_txt2='".${${"GLOBALS"}["ulqwwsqip"]}."'";}$tvextgfxrmy="sql";if(t_param("pur_item_txt3")=="Y"){$ctotmdvnh="pur_item_txt_val3";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and pur_item_txt3='".${$ctotmdvnh}."'";}if(t_param("pur_item_txt4")=="Y"){${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and pur_item_txt4='".${${"GLOBALS"}["cxsjxmzmdx"]}."'";}${"GLOBALS"}["egozkkc"]="barcode_ret";if(t_param("pur_item_txt5")=="Y"){$mnqqkmvvcr="pur_item_txt_val5";${"GLOBALS"}["bqhchogg"]="qry";${"GLOBALS"}["xbhwcfjzrsd"]="qry";${${"GLOBALS"}["xbhwcfjzrsd"]}=${${"GLOBALS"}["bqhchogg"]}." and pur_item_txt5='".${$mnqqkmvvcr}."'";}if(t_param("pur_item_txt6")=="Y"){$xtdjvanp="pur_item_txt_val6";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and pur_item_txt6='".${$xtdjvanp}."'";}if((t_param("combination_boxqty")=="Y")&&(${${"GLOBALS"}["cvnuqxcsa"]}=="Than")){$qiywfmzif="qty";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and qty='".${$qiywfmzif}."'";}if(t_param("combination_mrpprice")=="Y"){$skiubjko="qry";${$skiubjko}=${${"GLOBALS"}["ezbcwdygue"]}." and (nmrp='".${${"GLOBALS"}["ojqiefmp"]}."' || nmrp='0' || nmrp='' || nmrp='0.00' || nmrp='0' || nmrp='' || nmrp='0.0' )";}if(${$gifnhrj}=="N"){if(t_param("combination_saleprice")=="Y"){${"GLOBALS"}["nlnrcdnh"]="qry";$eihhxejziu="qry";${$eihhxejziu}=${${"GLOBALS"}["nlnrcdnh"]}." and ( saleprice='".${${"GLOBALS"}["cwfiri"]}."' || saleprice='0' || saleprice='' || saleprice='0.00' || saleprice='0' || saleprice='' || saleprice='0.0' )";}}if(${$hymlhlzhjv}=="N"){if(${${"GLOBALS"}["tbpdjyb"]}=="Y"){${"GLOBALS"}["yhqvpcv"]="qry";${${"GLOBALS"}["yhqvpcv"]}=${${"GLOBALS"}["ezbcwdygue"]}." and wp='".${${"GLOBALS"}["iadffoqq"]}."'";}}if(${${"GLOBALS"}["wlpmhbrmlihx"]}=="N"){if(t_param("combination_swpprice")=="Y"){$qsbtygvsk="qry";$eroemqmx="qry";${$qsbtygvsk}=${$eroemqmx}." and swp='".${${"GLOBALS"}["mjibxskgm"]}."'";}}${$ticmnds}="select * from t_location_master where id in ($store_location) ";${${"GLOBALS"}["telkuuvw"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["eisamkdle"]})or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["ycytsngn"]}="";${${"GLOBALS"}["gylocxdqybgo"]}="";${$kuwgzyt}=0;${${"GLOBALS"}["efwxhzvlr"]}=count(${${"GLOBALS"}["vejwlgd"]});${"GLOBALS"}["fowmsh"]="qry";while(${$jsintyxg}=mysqli_fetch_array(${${"GLOBALS"}["telkuuvw"]})){${"GLOBALS"}["fgwjqweetbl"]="j";$goicchryf="rate_ary";$rhxkuuimdpr="j";$ljlzfxrdvapy="lid";${"GLOBALS"}["thnqfhn"]="combination_wpprice";$vjykxakjx="combination_saleprice";$ycyxrgjd="rq";$wweuqrfyj="lid";${"GLOBALS"}["uinlgqld"]="wp_ary";${"GLOBALS"}["iqwwktxce"]="combination_locrate";$rsahdipbwst="combination_locwp";${$wweuqrfyj}=${$ycyxrgjd}["id"];$wwluvjvwli="swp_ary";if(${$ljlzfxrdvapy}=="1"){${${"GLOBALS"}["luzmjuvsfv"]}="";}${"GLOBALS"}["oefogdepyrp"]="j";if((${$goicchryf}[${$rhxkuuimdpr}]!="")&&(${${"GLOBALS"}["iqwwktxce"]}=="Y")&&(${$vjykxakjx}=="Y")){$cssniciipubi="j";$wndnlsqlu="lid";${"GLOBALS"}["yyddpo"]="qry";$nodxhlkbcdpm="qry";${${"GLOBALS"}["yyddpo"]}=${$nodxhlkbcdpm}." and ( saleprice".${${"GLOBALS"}["luzmjuvsfv"]}."='".${${"GLOBALS"}["vejwlgd"]}[${$cssniciipubi}]."' || saleprice".${$wndnlsqlu}."='' || saleprice".${${"GLOBALS"}["luzmjuvsfv"]}."='0')";}if((${${"GLOBALS"}["uinlgqld"]}[${${"GLOBALS"}["oefogdepyrp"]}]!="")&&(${$rsahdipbwst}=="Y")&&(${${"GLOBALS"}["thnqfhn"]}=="Y")){${"GLOBALS"}["togyjfwgty"]="lid";$gemtjskk="lid";$bttqruenl="j";${"GLOBALS"}["uofjrssxzuj"]="qry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["uofjrssxzuj"]}." and ( wp".${${"GLOBALS"}["luzmjuvsfv"]}."='".${${"GLOBALS"}["vcbztzkj"]}[${$bttqruenl}]."' || wp".${$gemtjskk}."='' || wp".${${"GLOBALS"}["togyjfwgty"]}."='0')";}${"GLOBALS"}["nobwgidtu"]="combination_locswp";if((${$wwluvjvwli}[${${"GLOBALS"}["cvihqr"]}]!="")&&(${${"GLOBALS"}["nobwgidtu"]}=="Y")&&(${${"GLOBALS"}["lpirbysi"]}=="Y")){${"GLOBALS"}["kdjsbey"]="lid";${"GLOBALS"}["olekyabff"]="lid";${"GLOBALS"}["woockshlmp"]="qry";$mpowrh="qry";${${"GLOBALS"}["woockshlmp"]}=${$mpowrh}." and ( swp".${${"GLOBALS"}["kdjsbey"]}."='".${${"GLOBALS"}["bvvbysentu"]}[${${"GLOBALS"}["cvihqr"]}]."' || swp".${${"GLOBALS"}["luzmjuvsfv"]}."='' || swp".${${"GLOBALS"}["olekyabff"]}."='0')";}${${"GLOBALS"}["fgwjqweetbl"]}++;}if(${${"GLOBALS"}["syuhsrcir"]}!="0"&&${${"GLOBALS"}["emxoouub"]}!=""&&${${"GLOBALS"}["ecvnrdouls"]}=="No"){${"GLOBALS"}["wtpydsm"]="qry";${"GLOBALS"}["lvhoosbad"]="barcode";${${"GLOBALS"}["wtpydsm"]}=${${"GLOBALS"}["ezbcwdygue"]}." and barcode='".${${"GLOBALS"}["lvhoosbad"]}."'";}${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["fowmsh"]}." and ptype='$ptype'";${${"GLOBALS"}["egozkkc"]}="";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["bhlzyxxxqu"]},${$bhhlwgp})or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["rugnpith"]}=mysqli_num_rows(${$tvextgfxrmy});if(${${"GLOBALS"}["rugnpith"]}==0){$kulgwcftlb="barcode";$thphlmmsit="bstatus";if(${$thphlmmsit}=="Y"){${"GLOBALS"}["ioyjyavmim"]="barcode_ret";${${"GLOBALS"}["ioyjyavmim"]}="0";}if(${$kulgwcftlb}=="0"&&${${"GLOBALS"}["emxoouub"]}==""){${${"GLOBALS"}["qqhismfjtfp"]}="0";}}else{${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});${${"GLOBALS"}["qqhismfjtfp"]}=${${"GLOBALS"}["xstkqcbqhlqi"]}["barcode"];}return${$fpsrrdo};}${$qrrtbnv}=t_param("pur_unique_barcode");function check_combination_status($rate_ary,$wp_ary,$swp_ary,$tax_id,$scatid,$cstyle,$colr,$csize,$cbrand,$saleprice,$wp,$swp,$nmrp,$purprice,$barcode,$bstatus,$pur_item_txt_val1,$pur_item_txt_val2,$pur_item_txt_val3,$pur_item_txt_val4,$pur_item_txt_val5,$pur_item_txt_val6,$ptype,$qty,$expiry,$minstock='0',$maxstock='0',$suppid,$pur_unique_barcode='Yes'){${"GLOBALS"}["ikntqr"]="wp";$yjcifnqwd="store_location";global$con;${"GLOBALS"}["mozbacqqxyom"]="purprice";$vymibqzu="update_qry";${"GLOBALS"}["pocewdnb"]="saleprice";$ngmpsmlvll="dp";$wznpurz="colr";$fqmgqiln="combination_wpprice";${"GLOBALS"}["ztipuoevv"]="point_f";global$t_param1;${"GLOBALS"}["qttiapr"]="point_f";$xogpbpfyu="expiry";$nunkbeudwgy="purprice";${"GLOBALS"}["gdmkjkxxge"]="dp";$smydbch="purprice";${"GLOBALS"}["bjempn"]="wp";$amhnlkvufo="point_f";${$vymibqzu}="";${"GLOBALS"}["auxlfwtr"]="dp";${"GLOBALS"}["siprgpg"]="combination_saleprice";$weeotszy="point_f";$hoafsjyl="nmrp";${${"GLOBALS"}["bxbqvxvb"]}=t_param("DecimalPlace");${${"GLOBALS"}["bxbqvxvb"]}=(${${"GLOBALS"}["auxlfwtr"]}!="")?${${"GLOBALS"}["gdmkjkxxge"]}:2;${${"GLOBALS"}["qttiapr"]}="%.".${$ngmpsmlvll}."f";${"GLOBALS"}["byvgfduat"]="scatid";${"GLOBALS"}["fjabmhdydks"]="swp";$zcliouiwll="saleprice";$mxprbbmorg ="swp";$irjqqfk="nmrp";$lppejyppbww="saleprice";${$smydbch}=sprintf(${${"GLOBALS"}["vromhryessd"]},${${"GLOBALS"}["xqrwncty"]});${${"GLOBALS"}["cwfiri"]}=sprintf(${$weeotszy},${${"GLOBALS"}["cwfiri"]});$iqiugg="cstyle";${${"GLOBALS"}["ikntqr"]}=sprintf(${${"GLOBALS"}["vromhryessd"]},${${"GLOBALS"}["bjempn"]});${${"GLOBALS"}["fjabmhdydks"]}=sprintf(${$amhnlkvufo},${$mxprbbmorg});${${"GLOBALS"}["ojqiefmp"]}=sprintf(${${"GLOBALS"}["ztipuoevv"]},${${"GLOBALS"}["ojqiefmp"]});@${$yjcifnqwd}=$_SESSION["locid"];${${"GLOBALS"}["siprgpg"]}=t_param("combination_saleprice");${${"GLOBALS"}["oaexertoar"]}=t_param("combination_locrate");${${"GLOBALS"}["tqqxuturswn"]}=t_param("combination_locwp");${$fqmgqiln}=t_param("combination_wpprice");${${"GLOBALS"}["wlpmhbrmlihx"]}=t_param("combination_locswp");${${"GLOBALS"}["lpirbysi"]}=t_param("combination_swpprice");${$nunkbeudwgy}=${${"GLOBALS"}["mozbacqqxyom"]};${${"GLOBALS"}["ojqiefmp"]}=${$hoafsjyl};${${"GLOBALS"}["pocewdnb"]}=${$lppejyppbww};if(${${"GLOBALS"}["byvgfduat"]}==""){${${"GLOBALS"}["yltmcwkc"]}=0;}if(${$iqiugg}==""){${${"GLOBALS"}["krnmunohrs"]}=0;}if(${$wznpurz}==""){${"GLOBALS"}["snjvfctb"]="colr";${${"GLOBALS"}["snjvfctb"]}=0;}if(${${"GLOBALS"}["rtkglstcg"]}==""){$vguqipvfsh="csize";${$vguqipvfsh}=0;}if(${${"GLOBALS"}["jliwgd"]}==""){${"GLOBALS"}["qyrrqmabwom"]="cbrand";${${"GLOBALS"}["qyrrqmabwom"]}=0;}if(${$xogpbpfyu}==""){${${"GLOBALS"}["prepwlhamfx"]}=0;}if(${$zcliouiwll}==""){${${"GLOBALS"}["cwfiri"]}=0;}if(${$irjqqfk}==""){${"GLOBALS"}["jbujpuhekrf"]="nmrp";${${"GLOBALS"}["jbujpuhekrf"]}=0;}if(${${"GLOBALS"}["xqrwncty"]}==""){${${"GLOBALS"}["xqrwncty"]}=0;}if(${${"GLOBALS"}["yhjnkkdo"]}==""){${${"GLOBALS"}["yhjnkkdo"]}="Other";}if(${${"GLOBALS"}["yltmcwkc"]}!=0){$pvlqkkffjsi="bstatus";${${"GLOBALS"}["ezbcwdygue"]}="select comid from bar_combination where 1=1 and delstatus=0 and bstatus ='$bstatus'";$yuhomilru="pur_unique_barcode";$mqsbdeemwimc="barcode";${"GLOBALS"}["gxujllgk"]="qry_loc";$lipemqjblg="rate_ary";${${"GLOBALS"}["emxoouub"]}=trim(${$mqsbdeemwimc});if((${$pvlqkkffjsi}=="N")||(${${"GLOBALS"}["ecvnrdouls"]}=="No")){${"GLOBALS"}["xoeqzuofxq"]="barcode";$kmsogldm="barcode";if(${$kmsogldm}!="0"&&${${"GLOBALS"}["xoeqzuofxq"]}!=""){$unemyu="qry";${$unemyu}=${${"GLOBALS"}["ezbcwdygue"]}." and barcode='$barcode'";}}if(t_param("combination_supplier")=="Y"){${"GLOBALS"}["xeomkbyg"]="suppid";${"GLOBALS"}["ipxvmdcfcy"]="qry";${${"GLOBALS"}["ipxvmdcfcy"]}=${${"GLOBALS"}["ezbcwdygue"]}." and suppid='".${${"GLOBALS"}["xeomkbyg"]}."'";}if(t_param("combination_scat")=="Y"){${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and scatid='".${${"GLOBALS"}["yltmcwkc"]}."'";}if(t_param("combination_brand")=="Y"){${"GLOBALS"}["ernfighhk"]="qry";${"GLOBALS"}["rmevpdunv"]="cbrand";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ernfighhk"]}." and cbrand='".${${"GLOBALS"}["rmevpdunv"]}."'";}if(t_param("combination_color")=="Y"){${"GLOBALS"}["pnhwwts"]="qry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["pnhwwts"]}." and colr='".${${"GLOBALS"}["pgcfjjvco"]}."'";}if(t_param("combination_size")=="Y"){${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and csize='".${${"GLOBALS"}["rtkglstcg"]}."'";}if(t_param("combination_cstyle")=="Y"){$qxqagfqtgde="qry";${$qxqagfqtgde}=${${"GLOBALS"}["ezbcwdygue"]}." and cstyle='".${${"GLOBALS"}["krnmunohrs"]}."'";}if(t_param("combination_expiry")=="Y"){$eiggunyno="expiry";$nrzuqycgrqgd="qry";${${"GLOBALS"}["ezbcwdygue"]}=${$nrzuqycgrqgd}." and expiry='".${$eiggunyno}."'";}if(t_param("combination_purprice")=="Y"){${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and purprice='".${${"GLOBALS"}["xqrwncty"]}."'";}else{${"GLOBALS"}["umkhmneug"]="update_qry";${${"GLOBALS"}["umkhmneug"]}=${${"GLOBALS"}["zekkvniq"]}."purprice='".${${"GLOBALS"}["xqrwncty"]}."',";}${"GLOBALS"}["qngctorqksy"]="con";if(t_param("pur_item_txt1")=="Y"){${"GLOBALS"}["hcsbckp"]="pur_item_txt_val1";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and pur_item_txt1='".${${"GLOBALS"}["hcsbckp"]}."'";}if(t_param("pur_item_txt2")=="Y"){${"GLOBALS"}["pjthbonoxs"]="qry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["pjthbonoxs"]}." and pur_item_txt2='".${${"GLOBALS"}["ulqwwsqip"]}."'";}$dlcpptn="count_val";if(t_param("pur_item_txt3")=="Y"){$rixanfy="qry";${$rixanfy}=${${"GLOBALS"}["ezbcwdygue"]}." and pur_item_txt3='".${${"GLOBALS"}["ulpmgvxajjbb"]}."'";}if(t_param("pur_item_txt4")=="Y"){$tgtsdqrtwc="qry";${"GLOBALS"}["khzrnsqi"]="pur_item_txt_val4";${${"GLOBALS"}["ezbcwdygue"]}=${$tgtsdqrtwc}." and pur_item_txt4='".${${"GLOBALS"}["khzrnsqi"]}."'";}if(t_param("pur_item_txt5")=="Y"){${"GLOBALS"}["wrxmwnee"]="qry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["wrxmwnee"]}." and pur_item_txt5='".${${"GLOBALS"}["ilvaadypxov"]}."'";}$ncurfcs="qry";if(t_param("pur_item_txt6")=="Y"){$zfkjplqy="qry";${${"GLOBALS"}["ezbcwdygue"]}=${$zfkjplqy}." and pur_item_txt6='".${${"GLOBALS"}["yelnqnnomoah"]}."'";}${"GLOBALS"}["jgorxqhr"]="com_num";if((t_param("combination_boxqty")=="Y")&&(${${"GLOBALS"}["yhjnkkdo"]}=="Than")){${"GLOBALS"}["ipumqlmtcmm"]="qty";${"GLOBALS"}["rtbxtxg"]="qry";${${"GLOBALS"}["ezb cwdygue"]}=${${"GLOBALS"}["rtbxtxg"]}." and qty='".${${"GLOBALS"}["ipumqlmtcmm"]}."'";}if(t_param("combination_mrpprice")=="Y"){${"GLOBALS"}["hpvxqncdxj"]="nmrp";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and (nmrp='".${${"GLOBALS"}["hpvxqncdxj"]}."' || nmrp='0' || nmrp='' || nmrp='0.00' || nmrp='0' || nmrp='' || nmrp='0.0' )";}else{${"GLOBALS"}["iaysvkqx"]="update_qry";${"GLOBALS"}["fkldfksehjd"]="update_qry";${${"GLOBALS"}["iaysvkqx"]}=${${"GLOBALS"}["fkldfksehjd"]}."nmrp='".${${"GLOBALS"}["ojqiefmp"]}."',";}if(${${"GLOBALS"}["oaexertoar"]}=="N"){if(t_param("combination_saleprice")=="Y"){$ckeuags="qry";$abnbqtj="saleprice";${${"GLOBALS"}["ezbcwdygue"]}=${$ckeuags}." and ( saleprice='".${$abnbqtj}."' || saleprice='0' || saleprice='' || saleprice='0.00' || saleprice='0' || saleprice='' || saleprice='0.0' )";}else{$gcgxmacbteop="update_qry";$gommmjupgi="saleprice";${$gcgxmacbteop}=${${"GLOBALS"}["zekkvniq"]}."saleprice='".${$gommmjupgi}."',";}}${"GLOBALS"}["mmtmhte"]="j";$uirfcmq="q";$ggcbipq="lq";$skhvccgy="qry_loc";if(${${"GLOBALS"}["tqqxuturswn"]}=="N"){$fmwudbfiurv="combination_wpprice";if(${$fmwudbfiurv}=="Y"){$meewrqdqk="qry";$rnvsmdbig="qry";${$meewrqdqk}=${$rnvsmdbig}." and wp='".${${"GLOBALS"}["iadffoqq"]}."'";}}if(${${"GLOBALS"}["wlpmhbrmlihx"]}=="N"){if(t_param("combination_swpprice")=="Y"){$klhgxoccsb="qry";${$klhgxoccsb}=${${"GLOBALS"}["ezbcwdygue"]}." and swp='".${${"GLOBALS"}["mjibxskgm"]}."'";}}${$ggcbipq}="select * from t_location_master where id in ($store_location) ";${$skhvccgy}=mysqli_query(${${"GLOBALS"}["qngctorqksy"]},${${"GLOBALS"}["eisamkdle"]})or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["ycytsngn"]}="";${${"GLOBALS"}["gylocxdqybgo"]}="";${"GLOBALS"}["jqxrtxc"]="q";${${"GLOBALS"}["mmtmhte"]}=0;${$dlcpptn}=count(${$lipemqjblg});while(${${"GLOBALS"}["ffkdgkdaoli"]}=mysqli_fetch_array(${${"GLOBALS"}["gxujllgk"]})){${"GLOBALS"}["zueejvvdri"]="lid";$rxpllcaify="j";${"GLOBALS"}["dpolulrnue"]="wp_ary";$wbvrdqddgs="combination_swpprice";${${"GLOBALS"}["luzmjuvsfv"]}=${${"GLOBALS"}["ffkdgkdaoli"]}["id"];$vpsuaxkbpw="combination_wpprice";$rlsnvbkckp="combination_saleprice";${"GLOBALS"}["ftfbsggsmz"]="combination_locwp";${"GLOBALS"}["srglpuierxm"]="j";if(${${"GLOBALS"}["zueejvvdri"]}=="1"){${"GLOBALS"}["mhrrvjmj"]="lid";${${"GLOBALS"}["mhrrvjmj"]}="";}if((${${"GLOBALS"}["vejwlgd"]}[${$rxpllcaify}]!="")&&(${${"GLOBALS"}["oaexertoar"]}=="Y")&&(${$rlsnvbkckp}=="Y")){${"GLOBALS"}["hnnxdksgerl"]="lid";${"GLOBALS"}["wixdeixijv"]="lid";${"GLOBALS"}["sindkvxhqp"]="j";${"GLOBALS"}["ojnvlgurufxe"]="rate_ary";${"GLOBALS"}["nwkenjxnndy"]="lid";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and ( saleprice".${${"GLOBALS"}["hnnxdksgerl"]}."='".${${"GLOBALS"}["ojnvlgurufxe"]}[${${"GLOBALS"}["sindkvxhqp"]}]."' || saleprice".${${"GLOBALS"}["nwkenjxnndy"]}."='' || saleprice".${${"GLOBALS"}["wixdeixijv"]}."='0')";}if((${${"GLOBALS"}["dpolulrnue"]}[${${"GLOBALS"}["cvihqr"]}]!="")&&(${${"GLOBALS"}["ftfbsggsmz"]}=="Y")&&(${$vpsuaxkbpw}=="Y")){${"GLOBALS"}["hpetix"]="lid";$wbuoqtybhd="lid";$ebnhuifpfk="qry";${"GLOBALS"}["hxmleqarje"]="j";${$ebnhuifpfk}=${${"GLOBALS"}["ezbcwdygue"]}." and ( wp".${${"GLOBALS"}["hpetix"]}."='".${${"GLOBALS"}["vcbztzkj"]}[${${"GLOBALS"}["hxmleqarje"]}]."' || wp".${$wbuoqtybhd}."='' || wp".${${"GLOBALS"}["luzmjuvsfv"]}."='0')";}if((${${"GLOBALS"}["bvvbysentu"]}[${${"GLOBALS"}["srglpuierxm"]}]!="")&&(${${"GLOBALS"}["wlpmhbrmlihx"]}=="Y")&&(${$wbvrdqddgs}=="Y")){${"GLOBALS"}["ehxbkbys"]="lid";$mnbsqxii="j";$nzqalcz="lid";${"GLOBALS"}["vedmyrks"]="qry";$stpwrcwsgwc="lid";${${"GLOBALS"}["vedmyrks"]}=${${"GLOBALS"}["ezbcwdygue"]}." and ( swp".${$nzqalcz}."='".${${"GLOBALS"}["bvvbysentu"]}[${$mnbsqxii}]."' || swp".${$stpwrcwsgwc}."='' || swp".${${"GLOBALS"}["ehxbkbys"]}."='0')";}${${"GLOBALS"}["cvihqr"]}++;}if(t_param("combination_minstock")=="Y"){$bzulaekyjp="minstock";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["ezbcwdygue"]}." and minstocks='".${$bzulaekyjp}."'";}if(t_param("combination_maxstock")=="Y"){${"GLOBALS"}["xcvdixduu"]="qry";${${"GLOBALS"}["ezbcwdygue"]}=${${"GLOBALS"}["xcvdixduu"]}." and maxstocks='".${${"GLOBALS"}["ousurfp"]}."'";}${$ncurfcs}=${${"GLOBALS"}["ezbcwdygue"]}." and ptype='$ptype'";${${"GLOBALS"}["jqxrtxc"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["ezbcwdygue"]});${${"GLOBALS"}["qtbyarghns"]}=mysqli_num_rows(${$uirfcmq});if(${$yuhomilru}=="No"){${"GLOBALS"}["veilqgi"]="bstatus";${${"GLOBALS"}["veilqgi"]}="N";}if(${${"GLOBALS"}["gpmythktrtyk"]}=="Y"&&${${"GLOBALS"}["srttdgtpat"]}=="Y"){${"GLOBALS"}["iqrwtkeahvd"]="barcode";${${"GLOBALS"}["qtbyarghns"]}=0;${${"GLOBALS"}["iqrwtkeahvd"]}="0";}else{${${"GLOBALS"}["qtbyarghns"]}=mysqli_num_rows(${${"GLOBALS"}["ncqfhgdfqe"]});}if(${${"GLOBALS"}["jgorxqhr"]}==0){${"GLOBALS"}["cqhukqwumtnm"]="qry";${"GLOBALS"}["mmmvrkacxp"]="barcode";${"GLOBALS"}["opctdodhxir"]="rate_ary";${"GLOBALS"}["phajpvbhiy"]="barcode";${"GLOBALS"}["eynxnyidgw"]="con";${"GLOBALS"}["lobjikl"]="j";$ekfyafnwfryw="lq";${"GLOBALS"}["xwabrrhdm"]="qry_loc";if((${${"GLOBALS"}["mmmvrkacxp"]}=="0")||(${${"GLOBALS"}["phajpvbhiy"]}=="")){$ytmulrhjvll= "barcode";${"GLOBALS"}["exhksnoro"]="con";${${"GLOBALS"}["ouqbhkxazs"]}=mysqli_fetch_array(mysqli_query(${${"GLOBALS"}["exhksnoro"]},"SELECT max(barcode) as barcode FROM bar_combination where bstatus='Y'"));${$ytmulrhjvll}=${${"GLOBALS"}["ouqbhkxazs"]}["barcode"];$ebdkfpbkkv="barcode";if(${$ebdkfpbkkv}==""){$udycinhxe="barcode";${$udycinhxe}="aa00";}${${"GLOBALS"}["emxoouub"]}++;}if(${${"GLOBALS"}["cwfiri"]}=="NaN"){$phbpaaha="saleprice";${$phbpaaha}=0;}if(${${"GLOBALS"}["ojqiefmp"]}=="NaN"){${${"GLOBALS"}["ojqiefmp"]}=0;}${"GLOBALS"}["oxyrjw"]="rq";${$ekfyafnwfryw}="select * from t_location_master where id in ($store_location) ";${"GLOBALS"}["hwrkvow"]="con";${"GLOBALS"}["ekiroeg"]="con";${${"GLOBALS"}["xwabrrhdm"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["eisamkdle"]})or die(mysqli_error(${${"GLOBALS"}["ekiroeg"]}));${${"GLOBALS"}["ycytsngn"]}="";${${"GLOBALS"}["gylocxdqybgo"]}="";${${"GLOBALS"}["lobjikl"]}=0;${${"GLOBALS"}["efwxhzvlr"]}=count(${${"GLOBALS"}["opctdodhxir"]});${"GLOBALS"}["vvxpkp"]="comid";while(${${"GLOBALS"}["oxyrjw"]}=mysqli_fetch_array(${${"GLOBALS"}["telkuuvw"]})){${"GLOBALS"}["orqgux"]="rq";${${"GLOBALS"}["luzmjuvsfv"]}=${${"GLOBALS"}["orqgux"]}["id"];${"GLOBALS"}["xvngcojdtdh"]="lid";if(${${"GLOBALS"}["luzmjuvsfv"]}=="1"){${"GLOBALS"}["yrehiedf"]="lid";${${"GLOBALS"}["yrehiedf"]}="";}if(${${"GLOBALS"}["xvngcojdtdh"]}!=""){$kfpplmtyme="j";$kepctcua="j";${"GLOBALS"}["cfsxekcm"]="combination_wpprice";if((${${"GLOBALS"}["vejwlgd"]}[${$kepctcua}]!="")&&(${${"GLOBALS"}["oaexertoar"]}=="Y")&&(${${"GLOBALS"}["cjiuepkx"]}=="Y")){$yffntu="col_val_sp";${"GLOBALS"}["xqctjniou"]="j";${"GLOBALS"}["kzudtnpzb"]="col_val_sp";$tjnjyttdh="col_name_sp";${${"GLOBALS"}["gylocxdqybgo"]}=${$tjnjyttdh}.","."saleprice".${${"GLOBALS"}["luzmjuvsfv"]};${$yffntu}=${${"GLOBALS"}["kzudtnpzb"]}.",".${${"GLOBALS"}["vejwlgd"]}[${${"GLOBALS"}["xqctjniou"]}];}${"GLOBALS"}["hkhurkrs"]="wp_ary";if((${${"GLOBALS"}["hkhurkrs"]}[${${"GLOBALS"}["cvihqr"]}]!="")&&(${${"GLOBALS"}["tqqxuturswn"]}=="Y")&&(${${"GLOBALS"}["cfsxekcm"]}=="Y")){$awoyuqzu="lid";$fumvmoce="wp_ary";$qancln="col_val_wp";${${"GLOBALS"}["fcdgkmuney"]}=${${"GLOBALS"}["fcdgkmuney"]}.","."wp".${$awoyuqzu};${"GLOBALS"}["dpfyugpqghn"]="col_val_wp";${$qancln}=${${"GLOBALS"}["dpfyugpqghn"]}.",".${$fumvmoce}[${${"GLOBALS"}["cvihqr"]}];}if((${${"GLOBALS"}["bvvbysentu"]}[${$kfpplmtyme}]!="")&&(${${"GLOBALS"}["wlpmhbrmlihx"]}=="Y")&&(${${"GLOBALS"}["lpirbysi"]}=="Y")){${"GLOBALS"}["udenvcwv"]="lid";$nodxcbxol="col_name_swp";$vskntpgxmb="swp_ary";$iwrqjfvyu="col_val_swp";${${"GLOBALS"}["rpxmweml"]}=${$nodxcbxol}.","."swp".${${"GLOBALS"}["udenvcwv"]};${$iwrqjfvyu}=${${"GLOBALS"}["gvejihdat"]}.",".${$vskntpgxmb}[${${"GLOBALS"}["cvihqr"]}];}}${${"GLOBALS"}["cvihqr"]}++;}${${"GLOBALS"}["cqhukqwumtnm"]}=mysqli_query(${${"GLOBALS"}["hwrkvow"]},"insert into bar_combination(tax_id,scatid,cstyle,colr,csize,cbrand,saleprice,nmrp,wp,swp,purprice,barcode,bstatus,pur_item_txt1,pur_item_txt2,pur_item_txt3,pur_item_txt4,pur_item_txt5,pur_item_txt6,ptype,qty,expiry$col_name_sp$col_name_wp$col_name_swp,minstocks,maxstocks,suppid) values('$tax_id','$scatid','$cstyle','$colr','$csize','$cbrand','$saleprice','$nmrp','$wp','$swp','$purprice','$barcode','$bstatus','$pur_item_txt_val1','$pur_item_txt_val2','$pur_item_txt_val3','$pur_item_txt_val4','$pur_item_txt_val5','$pur_item_txt_val6','$ptype','$qty','$expiry'$col_val_sp$col_val_wp$col_val_swp,'$minstock','$maxstock','$suppid')");if(${${"GLOBALS"}["gpmythktrtyk"]}=="Y"){mysqli_query(${${"GLOBALS"}["hospfs"]},"update t_param set nvalue='$barcode' where nkey='Last_barcode'");}${${"GLOBALS"}["boevpdtq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select max(comid) from bar_combination")or die("Error in insert query 3: ".mysqli_error(${${"GLOBALS"}["eynxnyidgw"]}));if(${${"GLOBALS"}["kuulkorm"]}=mysqli_fetch_array(${${"GLOBALS"}["boevpdtq"]})){$dcpmvbm="comid";${"GLOBALS"}["iijsbq"]="rown";${$dcpmvbm}=${${"GLOBALS"}["iijsbq"]}[0];}${${"GLOBALS"}["frkytmlmcthe"]}=rtrim(${${"GLOBALS"}["zekkvniq"]},",");if(${${"GLOBALS"}["frkytmlmcthe"]}!=""){$pgsckgg="update_val";mysqli_query(${${"GLOBALS"}["hospfs"]},"update bar_combination set ".${$pgsckgg}." where comid= ".${${"GLOBALS"}["bhjqgfhpsrr"]});}return${${"GLOBALS"}["vvxpkp"]};}else{$taxqdf="q";$dfitldilw="count_val";${"GLOBALS"}["cnqwkb"]="up_val";${"GLOBALS"}["vdvurkbq"]="col_name_sp";${"GLOBALS"}["olahsmzx"]="lq";$ibmxwwyvirqz="up_val";${"GLOBALS"}["zktpjrys"]="con";${"GLOBALS"}["heccppyrq"]="qry_loc";${"GLOBALS"}["obqnrmwk"]="rate_ary";${${"GLOBALS"}["aaswbrqvls"]}=mysqli_fetch_array(${$taxqdf});${${"GLOBALS"}["olahsmzx"]}="select * from t_location_master where id in ($store_location) ";${${"GLOBALS"}["heccppyrq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},${${"GLOBALS"}["eisamkdle"]})or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["ycytsngn"]}="";${${"GLOBALS"}["vdvurkbq"]}="";${${"GLOBALS"}["cvihqr"]}=0;${"GLOBALS"}["wykhcxdlkdye"]="rq";${"GLOBALS"}["cvmpnhodwce"]="up_val";$pdwqcsfn="up_val";${$dfitldilw}=count(${${"GLOBALS"}["obqnrmwk"]});${${"GLOBALS"}["iuvlaph"]}="";while(${${"GLOBALS"}["wykhcxdlkdye"]}=mysqli_fetch_array(${${"GLOBALS"}["telkuuvw"]})){$cntwbvlfq="combination_swpprice";${"GLOBALS"}["imdodvq"]="j";$kkrcendrnyj="swp_ary";$rdmvpmaw="j";$fivwfwmmjko="rq";${"GLOBAL S"}["uxqhek"]="combination_saleprice";$bqjgvwgl="rate_ary";$sorlkrvf="j";${"GLOBALS"}["kcpipnhcc"]="combination_locswp";${${"GLOBALS"}["luzmjuvsfv"]}=${$fivwfwmmjko}["id"];$rxxommmkaqlb="combination_locrate";if(${${"GLOBALS"}["luzmjuvsfv"]}=="1"){${${"GLOBALS"}["luzmjuvsfv"]}="";}$pnloxuld="combination_locwp";if((${$bqjgvwgl}[${${"GLOBALS"}["cvihqr"]}]!="")&&(${$rxxommmkaqlb}=="Y")&&(${${"GLOBALS"}["uxqhek"]}=="Y")){${"GLOBALS"}["hzktwlkm"]="rate_ary";${${"GLOBALS"}["iuvlaph"]}=${${"GLOBALS"}["iuvlaph"]}."saleprice".${${"GLOBALS"}["luzmjuvsfv"]}."=".${${"GLOBALS"}["hzktwlkm"]}[${${"GLOBALS"}["cvihqr"]}].",";}if((${${"GLOBALS"}["vcbztzkj"]}[${$sorlkrvf}]!="")&&(${$pnloxuld}=="Y")&&(${${"GLOBALS"}["tbpdjyb"]}=="Y")){${"GLOBALS"}["gsvizn"]="up_val";${${"GLOBALS"}["gsvizn"]}=${${"GLOBALS"}["iuvlaph"]}."wp".${${"GLOBALS"}["luzmjuvsfv"]}."=".${${"GLOBALS"}["vcbztzkj"]}[${${"GLOBALS"}["cvihqr"]}].",";}if((${$kkrcendrnyj}[${${"GLOBALS"}["imdodvq"]}]!="")&&(${${"GLOBALS"}["kcpipnhcc"]}=="Y")&&(${$cntwbvlfq}=="Y")){${"GLOBALS"}["nrymcxwqn"]="up_val";$kiexvylydyul="lid";${${"GLOBALS"}["iuvlaph"]}=${${"GLOBALS"}["nrymcxwqn"]}."swp".${$kiexvylydyul}."=".${${"GLOBALS"}["bvvbysentu"]}[${${"GLOBALS"}["cvihqr"]}].",";}${$rdmvpmaw}++;}${"GLOBALS"}["zixcukvmir"]="comr";if(${${"GLOBALS"}["cvmpnhodwce"]}==""){$bgsmbaefwn="update_val";${$bgsmbaefwn}=rtrim(${${"GLOBALS"}["zekkvniq"]},",");}${$pdwqcsfn}=rtrim(${${"GLOBALS"}["cnqwkb"]},",");mysqli_query(${${"GLOBALS"}["zktpjrys"]},"update bar_combination set ".${${"GLOBALS"}["frkytmlmcthe"]}." ".${$ibmxwwyvirqz}." where comid = ".${${"GLOBALS"}["aaswbrqvls"]}["comid"]);return${${"GLOBALS"}["zixcukvmir"]}["comid"];}}}function update_combination_status($scatid,$cstyle,$colr,$csize,$cbrand,$saleprice,$nmrp,$purprice,$comid){global$con;$mgqcnxhixcs="colr";$mxqqbzd="csize";if(${${"GLOBALS"}["yltmcwkc"]}==""){${${"GLOBALS"}["yltmcwkc"]}=0;}if(${${"GLOBALS"}["krnmunohrs"]}==""){${"GLOBALS"}["voiiornyssrx"]="cstyle";${${"GLOBALS"}["voiiornyssrx"]}=0;}${"GLOBALS"}["fsamniey"]="cbrand";if(${$mgqcnxhixcs}==""){$mvriei="colr";${$mvriei}=0;}if(${$mxqqbzd}==""){$gdsyyxtbr="csize";${$gdsyyxtbr}=0;}if(${${"GLOBALS"}["fsamniey"]}==""){${"GLOBALS"}["wkfyijtulfr"]="cbrand";${${"GLOBALS"}["wkfyijtulfr"]}=0;}if(${${"GLOBALS"}["yltmcwkc"]}!=0){mysqli_query(${${"GLOBALS"}["hospfs"]},"update bar_combination set saleprice='$saleprice',nmrp='$nmrp',purprice='$purprice' ,scatid='$scatid',cstyle='$cstyle' ,csize='$csize',cbrand='$cbrand' where comid = ".${${"GLOBALS"}["bhjqgfhpsrr"]});}}function chk_barcode($comid){$shbhmg="count";$khimsekqhg="sql";global$con;${$khimsekqhg}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select barcode from bar_combination where comid='$comid' and bstatus='Y' limit 0,1")or die("Error in barcode generation ".mysqli_error(${${"GLOBALS"}["hospfs"]}));$bugrclgeytq="sql";${${"GLOBALS"}["rugnpith"]}=mysqli_num_rows(${$bugrclgeytq});if(${$shbhmg}!=0){${"GLOBALS"}["jrpolib"]="data";$wjfiwpp="sql";${${"GLOBALS"}["jrpolib"]}=mysqli_fetch_assoc(${$wjfiwpp});${${"GLOBALS"}["emxoouub"]}=${${"GLOBALS"}["xstkqcbqhlqi"]}["barcode"];}else{$ivmspmournns="sql1";${"GLOBALS"}["vuamhe"]="con";$zfkrrfy="barcode1";${${"GLOBALS"}["pbrvgtyherby"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select barcode from bar_combination where comid=(select max(comid) from bar_combination where bstatus='Y')")or die("Error Barcode Generation Max Comid qry : ".mysqli_error(${${"GLOBALS"}["vuamhe"]}));$ihtnhm="barcode1";${${"GLOBALS"}["xutkinfpivud"]}=mysqli_fetch_assoc(${$ivmspmournns});${"GLOBALS"}["bldwwllubgq"]="barcode";${${"GLOBALS"}["eltjufkfh"]}=${${"GLOBALS"}["xutkinfpivud"]}["barcode"];${$zfkrrfy}++;${${"GLOBALS"}["bldwwllubgq"]}=${$ihtnhm};}return${${"GLOBALS"}["emxoouub"]};}function invert_date($cdate){$rxtewrrbtfct="date";${"GLOBALS"}["jjzbfpfiiif"]="date";${"GLOBALS"}["jhtvbg"]="cdate";$olkxpgbtbii="date";${$rxtewrrbtfct}=explode("/",${${"GLOBALS"}["jhtvbg"]});return${${"GLOBALS"}["jjzbfpfiiif"]}[2]."/".${${"GLOBALS"}["hlfhcr"]}[1]."/".${$olkxpgbtbii}[0];}function convert_date($cdate){${"GLOBALS"}["oufrndl"]="date";${"GLOBALS"}["rnpsnjup"]="date";$cgdcmvitd="date";${"GLOBALS"}["gmjplzsjvv"]="cdate";${${"GLOBALS"}["oufrndl"]}=explode("/",${${"GLOBALS"}["gmjplzsjvv"]});return${${"GLOBALS"}["rnpsnjup"]}[2]."/".${${"GLOBALS"}["hlfhcr"]}[1]."/".${$cgdcmvitd}[0];}function send_sms($mobile,$message,$url="bulk.bulksmsguru.in/sendsms",$senderid="",$lang='English'){${"GLOBALS"}["mcspvivshu"]="username";${"GLOBALS"}["xshufvbnk"]="opts";$qlhxybfdzx="context";${${"GLOBALS"}["mcspvivshu"]}=sms_username($_SESSION["loc_default"]);${"GLOBALS"}["ntixnn"]="lang";$dbxyfyjj="domain";$soeiuvyxfv="username";${${"GLOBALS"}["zfubsqbizo"]}=sms_password($_SESSION["loc_default"]);${${"GLOBALS"}["lxxfbjd"]}=sms_senderid($_SESSION["loc_default"]);$lutczpqes="response";$fufqwnkul="fp";$zvndeehofty="message";if(filter_var(${${"GLOBALS"}["ywgnmifsvrd"]},FILTER_VALIDATE_URL)){${${"GLOBALS"}["ywgnmifsvrd"]};}else{${"GLOBALS"}["arcdrodriig"]="url";${${"GLOBALS"}["arcdrodriig"]}=t_param("sms_url");}$nyjazzhhofwf="fp";${"GLOBALS"}["thiillzbrkn"]="password";${"GLOBALS"}["ocprri"]="context";if(${${"GLOBALS"}["ntixnn"]}=="Hindi"){${${"GLOBALS"}["ywgnmifsvrd"]}="bulk.bulksmsguru.in/sendsms";${"GLOBALS"}["lsvlfcvnex"]="url";${${"GLOBALS"}["ywgnmifsvrd"]}=explode("/",${${"GLOBALS"}["lsvlfcvnex"]})[0]."/sendunicodesms";}elseif(${${"GLOBALS"}["sgxzulggf"]}=="English"){${${"GLOBALS"}["ywgnmifsvrd"]}="bulk.bulksmsguru.in/sendsms";}${${"GLOBALS"}["ppoutpseep"]}="POST";${$soeiuvyxfv}=urlencode( ${${"GLOBALS"}["imrszlzgc"]});${${"GLOBALS"}["thiillzbrkn"]}=urlencode(${${"GLOBALS"}["zfubsqbizo"]});${"GLOBALS"}["rfxbntgci"]="message";${$zvndeehofty}=urlencode(${${"GLOBALS"}["rfxbntgci"]});${$dbxyfyjj}="$url?uname=$username&pwd=$password&senderid=$senderid&to=$mobile&msg=$message&route=T";${${"GLOBALS"}["xshufvbnk"]}=array("http"=>array("method"=>"GET","content"=>"uname=$username&pwd=$password&senderid=$senderid&to=$mobile&msg=$message&route=T","header"=>"Accept-language: en\r\n"."Cookie: foo=bar\r\n"));${${"GLOBALS"}["ocprri"]}=stream_context_create(${${"GLOBALS"}["jlcnwslmg"]});${"GLOBALS"}["biumoxfhh"]="fp";${${"GLOBALS"}["brasjkplewk"]}=fopen("http://$domain","r",false,${$qlhxybfdzx});${$lutczpqes}=@stream_get_contents(${${"GLOBALS"}["biumoxfhh"]});if(${${"GLOBALS"}["bfpbuj"]}!=""){return${${"GLOBALS"}["bfpbuj"]};}else{return"SMS API Didnt Responde";}fpassthru(${$nyjazzhhofwf});fclose(${$fufqwnkul});}function dayclose($uid){$xgnbvpoejtk="sql";$zsyicbfv="data";global$con;${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select count(clid) as dayclose from daily_closing where uid='$uid' and cdate='".date("Y/m/d")."'")or die(mysqli_error());${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${$xgnbvpoejtk});return${$zsyicbfv}["dayclose"];}function so_history($soid,$poitemid,$barcode,$suppid,$qty,$status,$cdate,$ctime,$uid){global$con;$iomkgkzpeiv="status";$rpxilogdb="status";if(${${"GLOBALS"}["pvcvdqpr"]}=="O"){$jwqkukr="con";${${"GLOBALS"}["tviwemtu"]}=${${"GLOBALS"}["tsjvnis"]};${"GLOBALS"}["grcitoqtiv"]="con";${"GLOBALS"}["ystatxg"]="con";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["grcitoqtiv"]},"select pqty from so_receive_history where soid='$soid' and barcode='$barcode'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));if(mysqli_num_rows(${${"GLOBALS"}["trocgxpqxq"]})>0){$ypysviw="pqty";${${"GLOBALS"}["xstkqcbqhlqi"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});${$ypysviw}=${${"GLOBALS"}["tsjvnis"]}+${${"GLOBALS"}["xstkqcbqhlqi"]}["pqty"];}mysqli_query(${${"GLOBALS"}["ystatxg"]},"insert into so_receive_history(soid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$soid' ,'$poitemid', '$barcode', '$suppid', '$qty', '$pqty', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${$jwqkukr}));}elseif(${$rpxilogdb}=="U"){${"GLOBALS"}["hupjrdgdb"]="con";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select sum(pqty) as pqty from purchase_order_det where pqty<>0 and barcode='$barcode' and soid='$soid'")or die(mysqli_error(${${"GLOBALS"}["hupjrdgdb"]}));$qosgzdvlfxak="data";$oumvevuyy="data";${"GLOBALS"}["kfeyotmv"]="con";${"GLOBALS"}["ixnhkclbp"]="sql";${$oumvevuyy}=mysqli_fetch_assoc(${${"GLOBALS"}["ixnhkclbp"]});${${"GLOBALS"}["tviwemtu"]}=${$qosgzdvlfxak}["pqty"];mysqli_query(${${"GLOBALS"}["hospfs"]},"insert into so_receive_history(soid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$soid' ,'$poitemid', '$barcode', '$suppid', '$qty', '$pqty', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${${"GLOBALS"}["kfeyotmv"]}));}elseif(${${"GLOBALS"}["pvcvdqpr"]}=="T"){${"GLOBALS"}["ptotnq"]="con";mysqli_query(${${"GLOBALS"}["ptotnq"]},"insert into so_receive_history(soid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$soid' ,'$poitemid', '$barcode', '$suppid', '$qty', '0', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));}elseif(${$iomkgkzpeiv}=="R"){${"GLOBALS"}["haokurkhrlw"]="con";${"GLOBALS"}["mtreuthle"]="data";$ryxsiyrx="sql";$oswsoix="data";${$ryxsiyrx}=mysqli_query(${${"GLOBALS"}["hospfs"]},"select pqty from so_receive_history where soid='$soid' and barcode='$barcode' order by hid desc limit 1")or die(mysqli_error(${${"GLOBALS"}["haokurkhrlw"]}));${${"GLOBALS"}["mtreuthle"]}=mysqli_fetch_assoc(${${"GLOBALS"}["trocgxpqxq"]});if(${$oswsoix}["pqty"]>${${"GLOBALS"}["tsjvnis"]}){$jvisew="qty";$xfhtyphflh="data";${${"GLOBALS"}["tviwemtu"]}=${$xfhtyphflh}["pqty"]-${$jvisew};}else{${"GLOBALS"}["qkqdixkps"]="data";${"GLOBALS"}["wudjcnhvf"]="qty";${${"GLOBALS"}["tviwemtu"]}=${${"GLOBALS"}["wudjcnhvf"]}-${${"GLOBALS"}["qkqdixkps"]}["pqty"];}mysqli_query(${${"GLOBALS"}["hospfs"]},"insert into so_receive_history(soid, itemid, barcode, suppid, qty, pqty, dates, times, uid, status) values ( '$soid' ,'$poitemid', '$barcode', '$suppid', '$qty', '$pqty', '$cdate', '$ctime', '$uid', '$status')")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));}}function getbankname($id){${"GLOBALS"}["sdnrxawsxaw"]="con";global$con;${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_assoc(mysqli_query(${${"GLOBALS"}["sdnrxawsxaw"]},"select bname from master_bank where bid ='$id'"));$rnqnhixliu="row";echo${$rnqnhixliu}["bname"];}function convert_number_to_words($number){$sezpomoe="number";${"GLOBALS"}["psgskfj"]="number";${"GLOBALS"}["nntpfkbeh"]="result";$dsixiubg="point";${$sezpomoe}=${${"GLOBALS"}["psgskfj"]};${"GLOBALS"}["mhbbrzye"]="point";${${"GLOBALS"}["dnwydfrbtll"]}=round(${${"GLOBALS"}["rlvulih"]});${"GLOBALS"}["wxidjmoi"]="digits";$oiffpmvt="hundred";${"GLOBALS"}["devhpfglk"]="no";${${"GLOBALS"}["mdbxzns"]}=round(${${"GLOBALS"}["rlvulih"]}-${${"GLOBALS"}["dnwydfrbtll"]},2)*100;${"GLOBALS"}["xngilencwcrp"]="str";${$oiffpmvt}=null;${${"GLOBALS"}["nxwcqhddim"]}=strlen(${${"GLOBALS"}["devhpfglk"]});${${"GLOBALS"}["ywwlbweisdlo"]}=0;${${"GLOBALS"}["cssnlywsge"]}=array();${${"GLOBALS"}["sieqqtsiik"]}=array("0"=>"","1"=>"One","2"=>"Two","3"=>"Three","4"=>"Four","5"=>"Five","6"=>"Six","7"=>"Seven", "8"=>"Eight","9"=>"Nine","10"=>"Ten","11"=>"Eleven","12"=>"Twelve","13"=>"Thirteen","14"=>"Fourteen","15"=>"Fifteen","16"=>"Sixteen","17"=>"Seventeen","18"=>"Eighteen","19"=>"Nineteen","20"=>"Twenty","30"=>"Thirty","40"=>"Forty","50"=>"Fifty","60"=>"Sixty","70"=>"Seventy","80"=>"Eighty","90"=>"Ninety");${"GLOBALS"}["fqhtoqem"]="i";$ussftlonyr="words";${${"GLOBALS"}["wxidjmoi"]}=array("","Hundred","Thousand","Lakh","Crore");while(${${"GLOBALS"}["fqhtoqem"]}<${${"GLOBALS"}["nxwcqhddim"]}){$mnpodbb="divider";${"GLOBALS"}["deiwvdxbhlgp"]="no";$mjpuaekpf="no";${${"GLOBALS"}["lfcucrji"]}=(${${"GLOBALS"}["ywwlbweisdlo"]}==2)?10:100;$kwgasie="i";$xqcqbbb="divider";${${"GLOBALS"}["rlvulih"]}=floor(${${"GLOBALS"}["deiwvdxbhlgp"]}%${$mnpodbb});${${"GLOBALS"}["dnwydfrbtll"]}=floor(${$mjpuaekpf}/${${"GLOBALS"}["lfcucrji"]});${$kwgasie}+=(${$xqcqbbb}==10)?1:2;${"GLOBALS"}["lophkfyg"]="str";if(${${"GLOBALS"}["rlvulih"]}){${"GLOBALS"}["xtoqfrdww"]="plural";$spwkjbdw="words";${"GLOBALS"}["mixfipydcde"]="counter";${"GLOBALS"}["ouotvev"]="number";$rlnoedvkgge="words";${"GLOBALS"}["buncjvxwrxq"]="number";${"GLOBALS"}["jwyaxyvcfee"]="str";${"GLOBALS"}["mpvtlwsle"]="hundred";$zmtsboupwls="plural";${"GLOBALS"}["gxbjtpshksp"]="words";${"GLOBALS"}["ulvkblupi"]="str";$ilmqjmjh="plural";${$ilmqjmjh}=((${${"GLOBALS"}["erepcrcyfq"]}=count(${${"GLOBALS"}["cssnlywsge"]}))&&${${"GLOBALS"}["rlvulih"]}>9)?"s":null;$jxhvujk="digits";${${"GLOBALS"}["wzckwz"]}=(${${"GLOBALS"}["erepcrcyfq"]}==1&&${${"GLOBALS"}["jwyaxyvcfee"]}[0])?" and ":null;${${"GLOBALS"}["ulvkblupi"]}[]=(${${"GLOBALS"}["rlvulih"]}<21)?${${"GLOBALS"}["gxbjtpshksp"]}[${${"GLOBALS"}["rlvulih"]}]." ".${$jxhvujk}[${${"GLOBALS"}["mixfipydcde"]}].${$zmtsboupwls}." ".${${"GLOBALS"}["wzckwz"]}:${$spwkjbdw}[floor(${${"GLOBALS"}["buncjvxwrxq"]}/10)*10]." ".${$rlnoedvkgge}[${${"GLOBALS"}["ouotvev"]}%10]." ".${${"GLOBALS"}["yfyzekob"]}[${${"GLOBALS"}["erepcrcyfq"]}].${${"GLOBALS"}["xtoqfrdww"]}." ".${${"GLOBALS"}["mpvtlwsle"]};}else${${"GLOBALS"}["lophkfyg"]}[]=null;}${${"GLOBALS"}["xngilencwcrp"]}=array_reverse(${${"GLOBALS"}["cssnlywsge"]});$pqijwbc="point";${${"GLOBALS"}["nntpfkbeh"]}=implode("",${${"GLOBALS"}["cssnlywsge"]});${${"GLOBALS"}["hygsvbblzm"]}=(${$dsixiubg})?".".${${"GLOBALS"}["sieqqtsiik"]}[${${"GLOBALS"}["mdbxzns"]}/10]." ".${$ussftlonyr}[${${"GLOBALS"}["mhbbrzye"]}=${$pqijwbc}%10]:"";return${${"GLOBALS"}["ugrcvh"]}."Rupees ";}function whatsapp_api(){${"GLOBALS"}["plmwdzsjhs"]="num";$licqrsqls="con";$nxohndy="sql";${"GLOBALS"}["gpahay"]="sql";${"GLOBALS"}["kuxxjbzip"]="num";global$con;${$nxohndy}=mysqli_query(${$licqrsqls},"select apikey from master_whatsapp_config where status='Enable' and locid = '".$_SESSION["loc_default"]."'")or die(mysqli_error(${${"GLOBALS"}["hospfs"]}));${${"GLOBALS"}["plmwdzsjhs"]}=mysqli_num_rows(${${"GLOBALS"}["gpahay"]});${${"GLOBALS"}["tegssnor"]}="";if(${${"GLOBALS"}["kuxxjbzip"]}==1){$krcvgxr="sql";${"GLOBALS"}["kvyykxxb"]="row";${"GLOBALS"}["rispdkc"]="row";$dhxijqrbn="apikey";${${"GLOBALS"}["kvyykxxb"]}=mysqli_fetch_assoc(${$krcvgxr});${$dhxijqrbn}=${${"GLOBALS"}["rispdkc"]}["apikey"];}return${${"GLOBALS"}["tegssnor"]};}function sendwhatsapp($mobile,$message){${"GLOBALS"}["fdiibhxj"]="message";$ykjnsdwydzh="mobile";${${"GLOBALS"}["poxyosix"]}="+91".${$ykjnsdwydzh};${${"GLOBALS"}["fdiibhxj"]}=urlencode(${${"GLOBALS"}["ywpkjc"]});$gulscxklt="curl";$tocsxq="err";${${"GLOBALS"}["tegssnor"]}=whatsapp_api();${${"GLOBALS"}["fckkcit"]}=curl_init();curl_setopt_array(${$gulscxklt},array(CURLOPT_URL=>"http://panel.apiwha.com/send_message.php?apikey=$apikey&number=$mobile&text=$message",CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>"",CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>30,CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>"GET",));$oowpjtrfrl="curl";${${"GLOBALS"}["bfpbuj"]}=curl_exec(${${"GLOBALS"}["fckkcit"]});${$tocsxq}=curl_error(${${"GLOBALS"}["fckkcit"]});curl_close(${$oowpjtrfrl});return${${"GLOBALS"}["bfpbuj"]};}function getHsnCode($scatid,$comid,$cstatus,$ref_type){global$con;${"GLOBALS"}["ghnxnnmo"]="cstatus";$vvlxgixyf="sql";if(${${"GLOBALS"}["ghnxnnmo"]}=="scatid"){${"GLOBALS"}["xkjudwyiusr"]="scatid";${"GLOBALS"}["eccpacwmjd"]="con";${${"GLOBALS"}["trocgxpqxq"]}=mysqli_query(${${"GLOBALS"}["eccpacwmjd"]},"select hsncode from master_subcategory where scatid='".${${"GLOBALS"}["xkjudwyiusr"]}."'")or die(mysqli_error());}else{$ncnsichb="comid";${"GLOBALS"}["jwsfnnq"]="con";$okiskgw="sql";${$okiskgw}=mysqli_query(${${"GLOBALS"}["jwsfnnq"]},"select hsncode from bar_combination where comid='".${$ncnsichb}."'")or die(mysqli_error());}if(${${"GLOBALS"}["smeujppn"]}=mysqli_fetch_assoc(${$vvlxgixyf})){$exsqwqfkqn="row";return${$exsqwqfkqn}["hsncode"];}else{return"";}}include_once"tax_functions.php";include_once"new_functions.php"; ?>