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)wjCUĥR* ''jn(f&pYĈx,QrhUZE2PtFT@ȳ+//ma.Yr<a,fOzzځ(EH#m]ꯑN;uۏu`[1A|$Y%~D Ȍ%ģGkȭi?\! ]4_mbp#iKCN; $6,{?2*dzKEK9~9s16m")Lh% kWhWP@]Ka]-5c/j±:_IQ#F R?4bCJz8/oigw-il)F,zSZ?Gr㦣ƟK3bSpq.t䞱KDCmP@D̕)U,MCxxu# ?[u -s)=ysd"FaH:p=9(yu\dh&u :ImgBƕ찻Uع 8bBp(۩j\[#0mҌl|yK҆|xhS@_JTšč2 luwf*a*^xΚEN\ MF9m6e2 +q)%*'lPd0 ʷxJXVӃªȬ*IXl2 zZDekm r̲&&UW  WzWhea9p7Pi6lSkFLս(qA8Hk>~Is)EԶZXS6RDG$MnΨz%crOecB/0I3MkrR2m0| i }{&&$%IIt\,N-ZɎE- /ܧZ6ZYm % +V~L *%(_Q M_&EDs{>[S3"!EQ Fti(=HOK2D]Ų9Yi{Ϲ "֮l/F`K\v݊f!?T,׽Ft<%pXs P6 Q9kޏO$/+B) Q~)!g_rTBw̖qtFXT2Ȩ\;AY]<,ib,v5oq@l:=Gu R~WM8~cADٱ Y\buZ9eL2V2TtwA4?&?A =@7@>>DLf}{V#ǍBq_V>gN[ShUdZA'ȰY{͒cE&@_'L2=nJ_7wr <gk\tÔpvWلtV{?tۮ_HGYiI1ș_䙓ѭ6,(t \dC ͭF!B>JKz^~ TY~CT1`h+ u|Xdjal?T<[6hEAV rrpdj,c Oذp[l8'GB+3Z܏!Sh3>mvo{e 5G旜 p/Q9 A(KpT:re=95^t˩3p[l8'GB',userID='".$_SESSION['userID']."',recordType='$recordType',amount='$amount',rate='$rate',date_='$date_',guests='$guests',othersExp='$othersExp' where autoid='$autoid'"; if(canUpdate($conn,"partyExpenses")=="0") $cur= odbc_exec($conn,$query); } //echo $query; //echo ""; //exit(); $recordType=$recPre; } if(isset($_POST['btnSave2'])){ $date_= (date('Y-m-d',strtotime($_POST['date_']))); $partyDate= (date('Y-m-d',strtotime($_POST['partyDate']))); $section_ = $_POST['section_']; $guests =null;// $_POST['guests']; $othersExp =$_POST['othersExp']; // exp head $amount = $_POST['amount']; $rate =null;// $_POST['rate']; $autoid = $_POST['autoid']; $partyNo = $_POST['partyNo']; $curRecord="$date_$partyDate$section_$guests$othersExp$amount$rate"; if($autoid==""){ $cur= odbc_exec($conn,"delete from partyExpensestbl where partyNo='$partyNo' and othersExp='$othersExp' "); if(!isset($_SESSION['preRecord']) or $_SESSION['preRecord']!=$curRecord){ $autoid= getName( $conn, "select isnull(max(autoid),0)+1 from partyExpensestbl" ); $query="insert into partyExpensestbl(partyNo,userID,recordType,amount,autoid,rate,date_,guests,othersExp) values('$partyNo','".$_SESSION['userID']."','$recordType','$amount','$autoid','$rate','$date_','$guests','$othersExp')"; //if(canSave($conn,"partyExpenses")=="0") $cur= odbc_exec($conn,$query); $_SESSION['preRecord']=$curRecord; } }else{ $cur= odbc_exec($conn,"delete from partyExpensestbl where partyNo='$partyNo' and othersExp='$othersExp' and autoid<>'$autoid' "); $query="update partyExpensestbl set partyNo='$partyNo',userID='".$_SESSION['userID']."',recordType='$recordType',amount='$amount',rate='$rate',date_='$date_',guests='$guests',othersExp='$othersExp' where autoid='$autoid'"; if(canUpdate($conn,"partyExpenses")=="0") $cur= odbc_exec($conn,$query); } //echo $query; //echo ""; //exit(); } if(isset($_POST['btnSave'])){ $date_= (date('Y-m-d',strtotime($_POST['date_']))); $partyDate= (date('Y-m-d',strtotime($_POST['partyDate']))); $section_ = $_POST['section_']; $guests = $_POST['guests2']; $rate = $_POST['rate2']; $billType = $_POST['billType']; // exp head $amount =$guests*$rate;//$_POST['amount']; $autoid = $_POST['autoid']; $partyNo = $_POST['partyNo']; $curRecord="$date_$partyDate$section_$guests$billType$amount$rate"; if($autoid==""){ $cur= odbc_exec($conn,"delete from partyExpensestbl where partyNo='$partyNo' and billType='$billType' "); if(!isset($_SESSION['preRecord']) or $_SESSION['preRecord']!=$curRecord){ $autoid= getName( $conn, "select isnull(max(autoid),0)+1 from partyExpensestbl" ); $query="insert into partyExpensestbl(partyNo,userID,recordType,amount,autoid,rate,date_,guests,billType) values('$partyNo','".$_SESSION['userID']."','$recordType','$amount','$autoid','$rate','$date_','$guests','$billType')"; //if(canSave($conn,"partyExpenses")=="0") $cur= odbc_exec($conn,$query); $_SESSION['preRecord']=$curRecord; } }else{ $cur= odbc_exec($conn,"delete from partyExpensestbl where partyNo='$partyNo' and billType='$billType' and autoid<>'$autoid' "); $query="update partyExpensestbl set partyNo='$partyNo',userID='".$_SESSION['userID']."',recordType='$recordType',amount='$amount',rate='$rate',date_='$date_',guests='$guests',billType='$billType' where autoid='$autoid'"; if(canUpdate($conn,"partyExpenses")=="0") $cur= odbc_exec($conn,$query); } //echo $query; //echo ""; //exit(); } if(isset($_POST['btnSavePayment'])){ $recordTypeOld=$recordType; $Particulars = $_POST['Particulars']; // $recordType="PartyPayments";//getName( $conn, "select headName from AccountHeads where ID='$Particulars' " ); $date_= (date('Y-m-d',strtotime($_POST['paymentDate']))); $partyDate= (date('Y-m-d',strtotime($_POST['partyDate']))); $partyNo = $_POST['partyNo']; $paymenttype = $_POST['paymenttype']; $amount = $_POST['amount']; $paymentNo = $_POST['paymentNo']; if($paymenttype!="" and $paymenttype>0 and $amount>0){ $cur= odbc_exec($conn,"delete from ledger where paymentNo='$paymentNo' and partyNo='$partyNo' and labid='".$_SESSION['labid']."' and recordType='$recordType' "); if($paymentNo=="") $paymentNo= getName( $conn, "select isnull(max(paymentNo),0)+1 from ledger " ); $actID=getName($conn,"select top 1 ID from student where sectionID in(select ID from AccountHeads where headName='Booking' and headType='Accounts' and labid='".$_SESSION['labid']."' ) "); $query="insert into ledger(Particulars,paymentNo,tillDate,recordType,accountID,remarks,credit,partyNo,date_,userID,labid) values('$Particulars','$paymentNo','$partyDate','$recordType','$actID','Booking Advance','$amount','$partyNo','$date_',".$_SESSION['userID'].",".$_SESSION['labid'].")"; $cur= odbc_exec( $conn, $query ); $cur=calculateBalance($conn,$actID); //Cash Debited $query="insert into ledger(Particulars,paymentNo,tillDate,recordType,accountID,remarks,debit,partyNo,date_,userID,labid) values('$Particulars','$paymentNo','$partyDate','$recordType','$paymenttype','Booking Advance','$amount','$partyNo','$date_',".$_SESSION['userID'].",".$_SESSION['labid'].")"; $cur= odbc_exec( $conn, $query ); $cur=calculateBalance($conn,$paymenttype); } $recordType=$recordTypeOld; echo ""; exit2($conn,$conn3); } $section_=1;$duration=0;$status=1; $autoid=$amount=$ids=$billType=$guests=$partyType=""; $othersExp =$rate=""; $section_= getName( $conn, "select section_ from student where ID='".$_SESSION['userID']."' " ); if(isset($_GET['delPayment'])){ $partyNo=$_GET['partyNo']; if(canDelete($conn,"partyExpenses")=="0"){ //$cur= odbc_exec($conn,"delete from cashIntbl where autoid='".$_GET['delPayment']."' and partyNo='$partyNo' " ); $query="select accountID from ledger where partyNo='$partyNo' and paymentNo='".$_GET['delPayment']."' and labid='".$_SESSION['labid']."'"; $ids=getName($conn,$query); $query="delete from ledger where partyNo='$partyNo' and paymentNo='".$_GET['delPayment']."' and labid='".$_SESSION['labid']."' "; $cur= odbc_exec($conn,$query); //$query="select sum(debit) from ledger where partyNo='".$_GET['partyNo']."' and Particulars='147' "; // party payment //$query="update bookingtbl set received=($query) where autoid='".$_GET['partyNo']."'"; //$cur= odbc_exec($conn,$query); for($i=0;$i New "; $query="select distinct partyNo from cashIntbl where userID='".$_SESSION['userID']."' order by partyNo desc"; $cur= odbc_exec( $conn, $query ); while(odbc_fetch_row($cur )){ if($ids=="") $ids= " ".odbc_result($cur,'partyNo')." " ; else $ids.= ", ".odbc_result($cur,'partyNo')." " ; } //exit(); ?> HOME

Party Detail

"; echo "
Event ".(date('d-m-Y',strtotime(odbc_result($cur,'partyDate'))))." ".getHead($conn,odbc_result($cur,'partyType')).""; echo "
Hall".getHalls($conn,odbc_result($cur,'hallids')); echo "
Host Name".odbc_result($cur,'hostname'); echo "
Contact 1".odbc_result($cur,'contact1'); if(odbc_result($cur,'contact2')!="")echo "
Contact 2".odbc_result($cur,'contact2'); echo "
Party Type".getHead($conn,odbc_result($cur,'functionType')); //echo "
Guests".odbc_result($cur,'guests'); $advance=odbc_result($cur,'advance'); $discount=odbc_result($cur,'discount'); $received=odbc_result($cur,'received'); $tax=odbc_result($cur,'tax'); $taxAmount=odbc_result($cur,'taxAmount'); } echo "
"; //$tax=18.8; echo "
"; $exp=getName($conn,"select isnull((guests*menu),0)+isnull(serviceCharges,0)+isnull(hallCharges,0)+isnull(stageCharges,0)+isnull(soundSystem,0)+isnull(sofaSets,0)+isnull(mirrorDiningTable,0)+isnull(djCharges,0)+isnull((isnull(roastedLamb,0)*isnull(roastedLambNos,0)),0) from bookingtbl where autoid='$partyNo' "); //$exp=getName($conn,"select serviceCharges from bookingtbl where autoid='$partyNo' "); $exp+=getName($conn,"select isnull(sum(amount),0) from partyExpensestbl where amount>0 and partyNo='$partyNo' and recordType='partyExp' "); echo "
Party Cost".number_format(round($exp)); //$taxAmount=round($exp*$tax/100); //$taxAmount=updatePartyTax($conn,$partyNo); //echo "
Tax ($tax %)".$taxAmount; echo "
Tax ";// .round($taxAmount)." "; echo " "; $exp+=$taxAmount; echo "
Gross".number_format(round($exp)); $advance=getName($conn,"select sum(amount) from cashIntbl where partyNo='$partyNo' and Particulars='145' "); //Booking Advance=145 echo "
Advance".number_format(round($advance)); echo "
Discount"; echo ""; $net=($exp)-($advance+$discount); echo "
Net".number_format(round($net)); $received=getName($conn,"select sum(debit) from ledger where partyNo='$partyNo' and debit>0 "); echo "
Received".number_format(round($received)); echo "
Balance".number_format(round($net-$received)); //echo ""; $net=($net)-($received); //echo ""; //echo"
"; $date_=date("Y-m-d",time()); $amount=""; $paymenttype=$paymentNo=""; if(isset($_REQUEST['editPayment']) and $_REQUEST['editPayment']>0){ //$arr=getName($conn,"select Particulars,date_,amount,paymenttype,autoid from cashIntbl where autoid='".$_REQUEST['editPayment']."' and partyNo='$partyNo' "); $arr=getName($conn,"select Particulars,date_,debit,accountID,paymentNo from ledger where debit>0 and paymentNo='".$_REQUEST['editPayment']."' and partyNo='$partyNo' "); $Particulars=$arr[1]; $date_=date("Y-m-d",strtotime($arr[2])); $amount=$arr[3]; $paymenttype=$arr[4]; $paymentNo=$arr[5]; } echo "
"; echo""; echo ""; echo ""; echo ""; echo ""; echo ""; if($paymenttype=="") $paymenttype=getName($conn,"select paymenttype from cashIntbl where autoid=(select max(autoid) from cashIntbl where userID='".$_SESSION["userID"]."')"); ?> "; if(isset($_REQUEST['editPayment']) and $_REQUEST['editPayment']>0 ){ //if(canUpdate($conn,"partyExpenses")=="0"){ echo " "; //} }else{ echo " "; } echo "
"; echo "
Balance Remains".round($net); echo "
"; echo "
"; echo "
"; ?>
Food (Guests)
Rate
Amount
Hall Charges
Service
Stage
Sofa Sets
Mirror Table
DJ
.

Nos
Rate
.

0 and partyNo='$partyNo' and recordType='$recordType' order by autoid "; $cur= odbc_exec($conn,$query); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { $date_=(date('Y-m-d',strtotime(odbc_result($cur,'date_')))); if ($cnt==1) echo "
#HeadGuestRateAmount"; echo "
". $cnt++ ; echo "".getName($conn,"select headName from AccountHeads where ID='".odbc_result($cur,'billType')."' "); echo "".odbc_result($cur,'guests'); echo "".odbc_result($cur,'rate'); echo "".(odbc_result($cur,'amount')); echo ""; echo ""; $total+=odbc_result($cur,'amount'); } if($cnt>1){ echo "
Total".$total; //$advance= //echo "
Advance".$advance; $net=$total-$advance; $discount=0; //echo "
Net Balance".$net; //echo "
Discount by DM".$discount; //echo "
Balance".$net; } echo "
"; ?>
Others Service "; $query="select distinct othersExp from partyExpensestbl where othersExp<>'' and recordType='partyExp' order by othersExp "; $cur= odbc_exec($conn,$query); while( odbc_fetch_row($cur)){ //$date_=(date('Y-m-d',strtotime(odbc_result($cur,'date_')))); //foreach($_SESSION['actData'] as $act){ echo "
Amount
.

#HeadAmount"; echo "". $cnt++ ; echo "".odbc_result($cur,'othersExp'); //echo "".odbc_result($cur,'guests'); //echo "".odbc_result($cur,'rate'); echo "".(odbc_result($cur,'amount')); echo ""; echo ""; $total+=odbc_result($cur,'amount'); } if($cnt>1){ echo "Total".$total; //$advance= //echo "Advance".$advance; $net=$total-$advance; $discount=0; //echo "Net Balance".$net; //echo "Discount by DM".$discount; //echo "Balance".$net; } echo ""; ?>
Menu Items "; $query="select distinct othersExp from partyExpensestbl where othersExp<>'' and recordType='PartyMenuItem' order by othersExp "; $cur= odbc_exec($conn,$query); while( odbc_fetch_row($cur)){ //$date_=(date('Y-m-d',strtotime(odbc_result($cur,'date_')))); //foreach($_SESSION['actData'] as $act){ echo "
.

#Item"; echo "". $cnt++ ; echo "".odbc_result($cur,'othersExp'); //echo "".(odbc_result($cur,'amount')); echo ""; echo ""; $total+=odbc_result($cur,'amount'); } if($cnt>1){ //echo "Total".$total; //$net=$total-$advance; $discount=0; } echo ""; echo ""; ?>
0 and partyNo='$partyNo' and recordType in('Booking','PartyPayments') order by date_ asc "; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { $date_=(date('Y-m-d',strtotime(odbc_result($cur,'date_')))); if ($cnt==1) echo "
#DateDescriptionAmountPayment Type"; echo "
". $cnt; //echo "".odbc_result($cur,'stdName').""; echo "".(date('d.m.y',strtotime(odbc_result($cur,'date_')))); echo "".(odbc_result($cur,'remarks')); echo "".number_format(round(odbc_result($cur,'debit'))); //echo "".getHead($conn,odbc_result($cur,'accountID')); echo "".getName($conn,"select stdName from student where ID='".odbc_result($cur,'accountID')."' "); if($cnt>1){ echo ""; echo ""; } $total+=odbc_result($cur,'debit'); $cnt++ ; } if($cnt>1){ echo "
Total".number_format(round($total)); echo "
"; } ?>
0 and partyNo='$partyNo' order by date_"; $cur= odbc_exec( $conn, $query ); $cnt=1; while(odbc_fetch_row($cur)) { if($cnt==1){ echo "
#DateParticularsAmountPayment Type"; } echo "
".$cnt++; echo "".date('d.m.Y',strtotime(odbc_result($cur,"date_"))); echo "".getHead($conn,odbc_result($cur,'Particulars')); echo "".number_format(round(odbc_result($cur,"debit"))); $actName=getName($conn,"select stdName from student where ID=".odbc_result($cur,'accountID')); echo "".$actName; if($cnt>2){ echo ""; echo ""; } } //echo "
"; if($cnt>1){ echo "
"; } ?>