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Nҥ۾$Ǜ{å>Rr[3!3 ,7G]zLux#r@iX)`W4v:A~i$dUU0ARch&=|ؕN1H;TO/(MpAYϤȼ݂o) xr(4*J_[X \%K ü'#GH(®?i(kRqZjt!zXUT7Г߈߱H8b8S~Nq{<4}:S?>݉6@$4;rmBa(lP5>G3wh?ɫǟ۠" f&P_4hVGwy3r1 s 4R)Hz~T4cLuoPkZ@Ub< g+@\y &n0 gz'\ym=o;,i'i.F*9y$r o2aޑ|- {y 9[g4#XF=tu#Eɓ'Nx bF #诖+& 9=b@3t?6Ds MU偭4 r6=MR Q|7~N?6 $8MT}cZm%nX5o*Yw D7,q{D׉`"#.+FX8XwܩO 9py$?G,K v[\35V|C݉[{(#%.+a Y-=~tTOXF*W%aE"Y%L`&pAX f*=;?kIiUtبGd+94"BmާI *FS Gį%˹a”8' \,r3FhO_5iTmdJ-(ٝ!Q]y@{<1ԟƨd4s %%b {+eL=@(MԪe}~̮.d#~ۖ"_eשAD '(SkrF_TYNPXvt`uuπ(&nGnsr\gΝH؎r,Zn(i|@64-<J #W#فw|)h5\p$.\ļ8gTSg1dD ]xsdVՏ_]~`'&#ykI FczuaCtn*Y"MӏDK#xph ?ӕ\yH6TS.ing protect($con,$_POST['contacts']); $actype = protect($con,$_POST['actype']); $openingBalance = protect($con,$_POST['openingBalance']); //$OpeningType = protect($con,$_POST['OpeningType']); $date_ = date('Y-m-d',strtotime($_POST['date_'])); $curRecord=$name."".$address."".$contacts."".$openingBalance."".$actype."".$actcode."".$date_; if ($id =="") { if(!isset($_SESSION['preRecord']) or $_SESSION['preRecord']!=$curRecord){ $id = getName($con,"select max(id)+1 from accounts"); $query = "insert into accounts (actcode,actype,status,openingBalance,date_,id,name,address,contacts,LabID) values ('$actcode','$actype',0,'$openingBalance','$date_',$id,'$name','$address','$contacts','$LabID')"; mysqli_query($con,$query); $_SESSION['preRecord']=$curRecord; } } else { $query = "update accounts set actcode='$actcode',actype='$actype',openingBalance='$openingBalance',date_='$date_',name='$name',address='$address',contacts='$contacts' where id='$id' and LabID='$LabID'"; mysqli_query($con,$query); } //echo "
".$query; $query = "select id,name,address,contacts,balance,date_,actype from accounts where LabID='$LabID' and status=0 order by actype desc,date_ desc, id asc"; $run = mysqli_query($con,$query); $array1 = array(); while ($row=mysqli_fetch_array($run)){ $array1[] = $row; } $_SESSION['actData'] = $array1; mysqli_query($con,"CALL updateBalance('$LabID','$id')"); $actype=$id=$openingBalance=$name=$address =$contacts=$Percentage=""; } ?>
ADD/UPDATE ACCOUNT
Date Type
Name Address
Contact No. Opening
Code
"; //echo fillList($con,"select distinct name from accounts where LabID='$LabID' order by name"); foreach($_SESSION['actData'] as $act){ echo "
Cell(100,8,'Print by Anwar Khan' ,0,0); //$query=getName($con,"select name from accounts where id=109"); // Cash Account of Mehran Autos //echo "$query"; } //include("dbi.php"); if (isset ($_GET['del'])) { //include("dbi.php"); $id = $_GET['del']; $query = "delete from accounts where id='$id'"; $run = mysqli_query($con,$query); if(mysqli_query($con,$query)){ //echo ""; } } //echo "

Admin Panel

"; //echo "
SerialNameaddresscontactsBalanceEditPurchaseSaleReceiptLedger"; echo "
"; echo "
#NameAddressContactBalanceEditPurchaseSalesReturnPay/RecLedgerpReturnDel"; $query = "select id,name,address,contacts,balance,date_,actcode from accounts where LabID='$LabID' and status=0 "; $cnt=1; if(isset($_POST['btnShowAll'])){ //$query = "select id,name,address,contacts,balance,date_,actcode from accounts where LabID='$LabID' and status=0 order by actcode,name "; $cnt++; }else{ if($anyAccount!=""){ $query.=" and (name like '%$anyAccount%' or address like '%$anyAccount%' or contacts like '%$anyAccount%') "; $cnt++; } if(isset($_POST['actype2']) and $_POST['actype2']>=0){ $query.=" and actype='".$_POST['actype2']."' "; $cnt++; } } if($cnt>1){ $query.=" order by actcode,name "; }else{ $query.=" order by actcode,name limit 20"; } $cnt=1; $debAmt=0; $crdAmt=0; $run = mysqli_query($con,$query); while ($row=mysqli_fetch_array($run)){ $id = $row['id']; $name = $row['name']; $address = $row['address']; //$contacts = $row['contacts']; $balance = $row['balance']; if ($balance>0) $debAmt+=$balance; else $crdAmt+=$balance; //$date_ = date('Y-m-d',strtotime($row['date_'])); //echo "
$cnt"; echo "
".$cnt; // echo "".$row['actcode']; echo "$name$address".$row['contacts']."$balance"; echo ""; echo ""; if($_SESSION['LabID']==30){ //Mahmood Steel echo ""; }else{ echo ""; } echo ""; echo ""; echo ""; //echo " 2"; echo ""; echo ""; $cnt+=1; } echo "
SummaryDebit
Credit
$debAmt
$crdAmt
"; echo ""; mysqli_close($con); ?>