PriceID."'"; $query .= ", Comment="; $query .= "'".$_POST['comment']."'"; $query .= ", DateExpiry="; $query .= "'".$_POST['dateexpiry']."'"; //$query .= ", DatePosted="; //$query .= "'".$today."'"; //$query .= ", Grouping="; //$query .= "'".$_POST['group']."' "; $query .= " where "; if($superadmn!=9 && $superadmn!=1){ $query .= " ID="; $query .= "'".$ID."' and "; } $query .= " PtyID="; $query .= "'".$_POST['oldid']."'"; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); if(!$result){ $msg= "Error - ".$_POST['oldid']." not updated. Settlements and Adminstrator Rights only."; $msgtype= "error"; }else{ //update table UnitNo $query = "update UnitNo set"; $query .= " UnitFloor="; $query .= "'".$_POST['unitfloor']."'"; $query .= ", UnitNo="; $query .= "'".$_POST['unitno']."'"; $query .= ", UnitCode="; $query .= "'".$_POST['unitcode']."'"; $query .= ", UnitPrice="; $query .= "'".$_POST['pricefull']."'"; $query .= ", UnitBuiltup="; $query .= "'".$_POST['areafull']."'"; $query .= ", UnitLand="; $query .= "'".$_POST['unitland']."'"; $query .= ", UnitSeller="; $query .= "'".$_POST['unitseller']."'"; $query .= ", UnitContact="; $query .= "'".$_POST['unitcontact']."'"; $query .= ", UnitNotes="; $query .= "'".$_POST['unitnotes']."'"; $query .= " where PtyID="; $query .= "'".$_POST['oldid']."'"; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); $msg= "Success - Trade ".$_POST['oldid']." updated."; $msgtype= "ok"; } }else{ //--- Add New Record --- $count=0; if($_POST['development']!=NULL && $_POST['comment']!=NULL && $_POST['floor']!=NULL ){ $query13="Select PriceID, Denom from ListSeller where "; $query13.=" SellerID='".$_POST['comment']."'"; $result13 = mysql_query($query13) or die (mysql_error(). " : ".mysql_errno()); $row13=mysql_fetch_object($result13); $tradetime=$todaytime; $query = "insert into UnitAddr"; $query .= "(PtyID, Address, Postal, Development, Tenor, Top, Type, Area, NoOfRoom, Floor, Price, Comment, DatePosted, DateExpiry, ID) "; $query .= "values (NULL, "; $query .= "'".$_POST['address']."'"; $query .= ", "."'".$_POST['postal']."'"; $query .= ", "."'".$_POST['development']."'"; $query .= ", "."'".$_POST['tenor']."'"; $query .= ", "."'".$_POST['top']."'"; $query .= ", "."'".$_POST['type']."'"; $query .= ", "."'".$_POST['area']."'"; $query .= ", "."'".$_POST['noofroom']."'"; $query .= ", "."'".$_POST['floor']."'"; $query .= ", "."'".$row13->PriceID."'"; $query .= ", "."'".$_POST['comment']."'"; $query .= ", "."'".$tradetime."'"; $query .= ", "."'".$_POST['dateexpiry']."'"; $query .= ", "."'".$ID."'"; //-- Grouping field removed //$query .= ", "."'".$_POST['group']."'"; $query .= " )"; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); if(!$result){ $msg= "Error - ".$_POST['address']." trade booked but details not saved. Contact Settlements immediately."; $msgtype= "error"; }else{ $tempid=mysql_insert_id(); //-- calculating EAM spread if($_POST['unitland']!=NULL)$spdamount=$_POST['unitland']; else $spdamount=$_POST['unitno']; $query = "insert into UnitNo"; $query .= "(PtyID, UnitFloor, UnitNo, UnitCode, UnitPrice, UnitBuiltup, UnitLand, UnitSeller, UnitContact, UnitNotes)"; $query .= "values ('".$tempid."'"; $query .= ", "."'".$_POST['unitfloor']."'"; $query .= ", "."'".$_POST['unitno']."'"; $query .= ", "."'".$_POST['unitcode']."'"; $query .= ", "."'".$_POST['pricefull']."'"; $query .= ", "."'".$_POST['areafull']."'"; $query .= ", "."'".$spdamount."'"; $query .= ", "."'".$_POST['unitseller']."'"; $query .= ", "."'".$_POST['unitcontact']."'"; $query .= ", "."'".$_POST['unitnotes']."'"; $query .= " )"; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); $msg= "Success - Trade Booked"; $msgtype= "ok"; //--- CREATE CORRESPONDING CASH LINE --- $notifybookcash=0; if($_POST['area']=='1' || $_POST['area']=='2'){ //-- Bonds=1 EQUITY=2 //-- select CASH type if($row13->Denom == 'USD'){ if($row13->PriceID=='3')$actype=3; //FUND elseif($row13->PriceID=='2' || $row13->PriceID=='7')$actype=1; //EAM elseif($row13->PriceID=='4'|| $row13->PriceID=='6')$actype=2; //AMC elseif($row13->PriceID=='5')$actype=4; //BANK else $actype=3; $query66="Select * from Development where "; $query66.=" DvID='".$actype."'"; $result66=mysql_query($query66) or die (mysql_error(). " : ".mysql_errno()); $row66=mysql_fetch_object($result66); }else{ $query66="Select * from Development where "; $query66.=" Address Like'%CASH%' and Address Like '%".$row13->Denom."%'"; $result66=mysql_query($query66) or die (mysql_error(). " : ".mysql_errno()); $row66=mysql_fetch_object($result66); } $query = "insert into UnitAddr"; $query .= "(PtyID, Address, Postal, Development, Tenor, Top, Type, Area, NoOfRoom, Floor, Price, Comment, DatePosted, DateExpiry, ID) "; $query .= "values (NULL, "; $query .= "'".$row66->Address."'"; $query .= ", "."'".$row66->Postal."'"; $query .= ", "."'".$row66->Development."'"; $query .= ", "."'".$row66->Tenor."'"; $query .= ", "."'".$row66->Top."'"; $query .= ", "."'".$row66->Type."'"; $query .= ", "."'".$row66->Area."'"; $query .= ", "."'".$row66->Room."'"; $query .= ", "."'".$_POST['floor']."'"; $query .= ", "."'".$row13->PriceID."'"; $query .= ", "."'".$_POST['comment']."'"; $query .= ", "."'".$tradetime."'"; $query .= ", "."'".$_POST['dateexpiry']."'"; $query .= ", "."'5'"; //settlements officer ID $query .= " )"; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); $tempid1=mysql_insert_id(); $query77="Select * from ListPostal where "; $query77.=" PosID='".$_POST['postal']."'"; $result77=mysql_query($query77) or die (mysql_error(). " : ".mysql_errno()); $row77=mysql_fetch_object($result77); if($row77->Name != $row13->Denom){ //-- to calculate bond cost if($_POST['area']=='1')$pamt= changeBaseFX($_POST['unitcode'] * $_POST['unitno'] / 100, $row77->Name ,$row13->Denom); //-- calculate equity costing elseif($_POST['area']=='2') $pamt= changeBaseFX($_POST['unitcode'] * $_POST['unitno'], $row77->Name , $row13->Denom); else $pamt=999.99; $oriamt=$_POST['unitcode'] * $_POST['unitno']; //print "INSIDE FX CON - pamt=".$pamt." - orignal=".$oriamt." basefx=".$row13->Denom." oldfx=".$row77->Name." "; }else{ //-- to calculate bond cost if($_POST['area']=='1')$pamt= $_POST['unitcode'] * $_POST['unitno'] / 100; //-- calculate equity costing elseif($_POST['area']=='2') $pamt= $_POST['unitcode'] * $_POST['unitno']; else $pamt=999.99; } $query = "insert into UnitNo"; $query .= "(PtyID, UnitFloor, UnitNo, UnitCode, UnitPrice, UnitLand, UnitNotes)"; $query .= "values ('".$tempid1."'"; if($_POST['unitfloor']=='Long') $query .= ", "."'Short'"; else $query .= ", "."'Long'"; $query .= ", "."'100'"; $query .= ", "."'".$pamt."'"; $query .= ", "."'Open'"; $query .= ", "."'100'"; $query .= ", "."'AA Settle ID ".$tempid."'"; $query .= " )"; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); }else{ $msg= "Error - Cash Adjustment not made. Contact Settlements."; $msgtype= "error"; $notifybookcash=1; } //-- email on trade booked $query=" Select distinct ListDevelopment.Name as Name, Development.Address as Address, ListArea.Name as Class from ListDevelopment, Development, ListArea where Development.Area=ListArea.AreaID and Development.DvID=ListDevelopment.DevID and ListDevelopment.DevID='".$_POST['development']."' "; $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); $row=mysql_fetch_object($result); $queryc=" Select distinct Name from ListFloor where FlrID='".$_POST['floor']."' "; $resultc = mysql_query($queryc) or die (mysql_error(). " : ".mysql_errno()); $rowc=mysql_fetch_object($resultc); $query3=" Select ListSeller.Name as Account, ListPrice.Name as FType from ListSeller, ListPrice where ListSeller.PriceID=ListPrice.PriceID and SellerID='".$_POST['comment']."' "; $result3 = mysql_query($query3) or die (mysql_error(). " : ".mysql_errno()); $row3=mysql_fetch_object($result3); $message="Trader : ".$superadmnname."\n\n"; $message.="Portfolio : ".$row3->Account." (".$row3->FType.")\n\n"; $message.="Instrument : ".$row->Address."\n\n"; $message.="Identifier : ".$row->Name."\n\n"; $message.="Asset Class : ".$row->Class."\n\n"; $message.="Trade Price : ".$_POST['unitno']."\n\n"; $message.="Trade Size : ".$_POST['unitfloor']." ".$_POST['unitcode']."\n\n"; $message.="Settlement Date : ".$_POST['dateexpiry']."\n\n"; $message.="Counter-Party : ".$rowc->Name."\n\n"; if($_POST['areafull']!=NULL)$message.=">> NOTE : ".$_POST['areafull']." << \n\n"; if($notifybookcash!=0)$message.=">> CASH ADJUSTMENT REQUIRED <<\n\n"; if($notifybookcash!=0) $subject="GXP Booked (FYA) : ".$row3->Account." - $tradetime"; else $subject="GXP Booked : ".$row3->Account." - $tradetime "; mail("wei@kredenscapital.com", $subject, $message, "From: GXP ".$superadmnname." <".$superadmnemail.">"); mail("settlements@kredenscapital.com", $subject, $message, "From: GXP ".$superadmnname." <".$superadmnemail.">"); } }else{ $msg= "Error - Trade booking failed. Contact Settlements Officer"; $msgtype= "error"; } } } //******** end of insert data ******************** //******** end of insert data ******************** print""; print""; //----- show existing details ----------- //----- show existing details ----------- $count=0; if($unitid !=NULL){ $query = "SELECT * FROM UnitAddr where "; if($superadmn==9 || $superadmn==2)$query.=" PtyID='$unitid' "; else{ $query .= " ID='".$ID."' and "; $query.=" PtyID='$unitid' "; } $result = mysql_query($query) or die (mysql_error(). " : ".mysql_errno()); $row=mysql_fetch_object($result); $count=mysql_num_rows($result); $query_no = "SELECT * FROM UnitNo where PtyID='$unitid' "; $result_no = mysql_query($query_no) or die (mysql_error(). " : ".mysql_errno()); $row_no=mysql_fetch_object($result_no); $count_no=mysql_num_rows($result_no); } //** to autofill on selection of ISIN (javafunctions.js) $cat=$_GET['development']; //This line is added to take care if your global variable is o //-- Trade Panel Variables if($_GET['size']!=NULL && $_GET['port']!=NULL){ $panelsize=$_GET['size'] / 1000; $panelport= $_GET['port']; if($_GET['size']<0){ $paneldirection="Long"; $panelsize=$panelsize * -1; }else $paneldirection="Short"; $queryz = "SELECT distinct Floor FROM UnitAddr, ListFloor where UnitAddr.Comment='$panelport' and UnitAddr.Development='$cat' Limit 1"; $resultz = mysql_query($queryz) or die (mysql_error(). " : ".mysql_errno()); $rowz=mysql_fetch_object($resultz); $countz=mysql_num_rows($resultz); $panelparty=$rowz->Floor; }else{ $panelsize=NULL; $panelport=NULL; } ?> > "; }else{ if(isset($cat) and strlen($cat) > 0){ print""; } } //--FIELD COUNTRY OF RISK if($count !=0){ print""; }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT ListType.TypID as Type, ListType.Name as Name FROM ListDevelopment, Development, ListType where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.Development and Development.Type=ListType.TypID "; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0 && $row9->Name!="---"){ print""; } print ""; } } //--FIELD DENOMINATION if($count !=0){ print""; }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT ListPostal.PosID as Postal, ListPostal.Name as Name FROM ListDevelopment, Development, ListPostal where ListDevelopment.DevID='$cat' and Development.Development=ListDevelopment.DevID and Development.Postal=ListPostal.PosID "; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0){ print""; } } } //--FIELD SOV/QUASI/CORPORATE if($count !=0){ print""; }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT ListTop.TopID as Top, ListTop.Name as Name FROM ListDevelopment, Development, ListTop where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.Development and Development.Top=ListTop.TopID "; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0 && $row9->Name!="---"){ print""; } print ""; } } //--FIELD SECTOR RISK if($count !=0){ print""; }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT ListTenor.TenorID as Tenor, ListTenor.Name as Name FROM ListDevelopment, Development, ListTenor where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.Development and Development.Tenor=ListTenor.TenorID "; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0 && $row9->Name!="---"){ print""; } print ""; } } //--FIELD ASSET CLASS if($count !=0){ print""; }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT ListArea.AreaID as Area, ListArea.Name as Name FROM ListDevelopment, Development, ListArea where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.Development and Development.Area=ListArea.AreaID "; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0 && $row9->Name!="---"){ print""; } print ""; } } //--FIELD ISSUE RATING if($count !=0){ $query1 = "SELECT Name FROM ListRoom where RoomID='$row->NoOfRoom' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); if($row1->Name!="---"){ print""; }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT ListRoom.RoomID as Room, ListRoom.Name as Name FROM ListDevelopment, Development, ListRoom where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.Development and Development.Room=ListRoom.RoomID "; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0 && $row9->Name!="---"){ print""; } print ""; } } //--FIELD LAST PRICE if($count !=0){ $query88="SELECT DISTINCT Development.Ticker as Ticker, Development.Exchange as Exchange "; $query88.=" FROM Development WHERE "; $query88.=" Development.DvID='".$row->Development."' "; $result88 = mysql_query($query88) or die (mysql_error(). " : ".mysql_errno()); $row88=mysql_fetch_object($result88); $stkPriceArray = getLiveStockPrice($row88->Ticker.".".$row88->Exchange); if($stkPriceArray!=NULL){ $liveprice=$stkPriceArray["close"]; $livepricedate=$todaytime; } else{ $query1 = "SELECT Date, Price FROM ListDevelopment, History where DevID='$row->Development' and ListDevelopment.Name=History.Isin ORDER BY Date DESC Limit 1 "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); $count1=mysql_num_rows($result1); if($count1!=0) { $liveprice=$row1->Price; $livepricedate=$row1->Date; } } print""; }else{ if(isset($cat) and strlen($cat) > 0){ $query88="SELECT DISTINCT Development.Ticker as Ticker, Development.Exchange as Exchange "; $query88.=" FROM Development WHERE "; $query88.=" Development.DvID='".$cat."' "; $result88 = mysql_query($query88) or die (mysql_error(). " : ".mysql_errno()); $row88=mysql_fetch_object($result88); $stkPriceArray = getLiveStockPrice($row88->Ticker.".".$row88->Exchange); if($stkPriceArray!=NULL){ $liveprice=$stkPriceArray["close"]; $livepricedate=$todaytime; }else{ $quer = "SELECT Date, Price FROM ListDevelopment, History where ListDevelopment.DevID='$cat' and ListDevelopment.Name=History.Isin ORDER BY Date DESC Limit 1"; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); if($count9!=0){ $liveprice=$row9->Price; $livepricedate=$row9->Date; } } print""; } } if((isset($cat) and strlen($cat) > 0) || $count !=0){ //---- CLIENT DETAILS ------ //---- CLIENT DETAILS ------ print""; print""; print""; print""; } print"
"; if($msgtype=='main') print "

$msg

"; elseif($msgtype=='error') print "

$msg

"; else print "

$msg

"; print "
"; if($unitid !=NULL)print""; while($row1=mysql_fetch_object($result1)){ print""; } print ""; print "  "; print "

"; } } ?>

Identifier

Development' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); //print ""; print "$row1->Name"; print ""; }else{ print ""; } ?>
Instrument"; print "$row->Address"; print ""; print"
Instrument"; $quer = "SELECT Address FROM ListDevelopment, Development where ListDevelopment.DevID=Development.Development and ListDevelopment.DevID='$cat'"; $resu = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row9 = mysql_fetch_object($resu); $count9=mysql_num_rows($resu); print "$row9->Address"; print ""; print"
Country of Risk"; $query1 = "SELECT Name FROM ListType where TypID='$row->Type' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); print "$row1->Name"; print ""; print"
Country of Risk"; print "$row9->Name"; print"
Denomination"; $query1 = "SELECT Name FROM ListPostal where PosID='$row->Postal' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); //print ""; print "$row1->Name"; print ""; print"
Denomination"; print "$row9->Name"; print ""; print"
Grouping"; $query1 = "SELECT Name FROM ListTop where TopID='$row->Top' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); //print ""; print "$row1->Name"; print ""; print"
Grouping"; print "$row9->Name"; print"
Sector Risk"; $query1 = "SELECT Name FROM ListTenor where TenorID='$row->Tenor' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); print "$row1->Name"; print ""; print"
Sector Risk"; print "$row9->Name"; print"
Asset Class"; $query1 = "SELECT Name FROM ListArea where AreaID='$row->Area' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); print "$row1->Name"; print ""; print"
Asset Class"; print "$row9->Name"; print"
Issuer Rating"; print "$row1->Name"; } print ""; print"
Issuer Rating"; print "$row9->Name"; print"
Last Price"; print $liveprice." (".$livepricedate.")"; print"
Last Price"; print $liveprice." (".$livepricedate.")"; print"
"; print"
"; print"

PORTFOLIO DETAILS

"; print""; print""; print""; print"
For Portfolio"; if($count !=0) print ""; $query23 = "SELECT * FROM ListSeller where "; if($panelport!=NULL)$query23.=" SellerID='$panelport' "; else $query23.=" SellerID='$row->Comment' "; $result23 = mysql_query($query23) or die (mysql_error(). " : ".mysql_errno()); $row23=mysql_fetch_object($result23); if($count !=0)print ""; if($panelport!=NULL)print ""; //--- Access rights to Client Accounts //-- L9 (Access to all accounts) //-- L3 to L8 (only access to GroupUser) if($superadmn==9){ $query1 = "SELECT Distinct SellerID, Name FROM ListSeller Order By Name Asc"; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); }else{ $query1 =" SELECT Distinct SellerID, Name FROM ListSeller, GroupUser "; $query1.=" where ListSeller.SellerID=GroupUser.GrpID and GroupUser.ManageID='$ID' "; $query1.=" Order By Name Asc"; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); } print""; while($row1=mysql_fetch_object($result1))print""; print""; print"
Notify Settlements"; if($count_no !=0)print""; else print" (if any)"; print"
"; print"
"; print"
"; print"
"; print"

TRADE DETAILS

"; print""; print""; print""; print""; print""; print""; print""; if($superadmn==9 || $superadmn==2){ print ""; }else print ""; print""; print""; print""; if($superadmn==9 || $superadmn==2 || $superadmn==1){ print""; if($count_no !=0) print""; } print"
Long / Short"; print"
"; if($count !=0){ $query1 = "SELECT Area FROM ListDevelopment, Development where DevID='$row->Development' and ListDevelopment.DevID=Development.DvID "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); if($row1->Area ==1 || $row1->Area==5){ print "Bond Price (Dirty)"; }elseif($row1->Area==6){ print "Loan Price (Dirty)"; }elseif($row1->Area==2){ print "Stock Price "; }elseif($row1->Area==3){ print "Market Spot"; }elseif($row1->Area==4){ print "Index Level"; }else{ print "Cash"; } }else{ if(isset($cat) and strlen($cat) > 0){ $setpar=0; $quer = "SELECT Area FROM ListDevelopment, Development where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.DvID "; $result1 = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); if($row1->Area==1 || $row1->Area==5){ print "Bond Price (Dirty)"; }elseif($row1->Area==6){ print "Loan Price (Dirty)"; }elseif($row1->Area==2){ print "Stock Price "; }elseif($row1->Area==3){ print "Market Spot"; }elseif($row1->Area==4){ print "Index Level"; }else{ print "Par"; $setpar=1; } } } print""; print""; if($superadmn==9 || strpos($superadmnname, 'Advisor')!== FALSE){ //-- Bank Spread Price print"  Dealer Price "; } print"
"; if($count !=0){ $query1 = "SELECT Area FROM ListDevelopment, Development where DevID='$row->Development' and ListDevelopment.DevID=Development.DvID "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); if($row1->Area ==1 || $row1->Area==5){ print "Notional ('000)"; }elseif($row1->Area==6){ print "Notional ('000)"; }elseif($row1->Area==2){ print "No of Shares ('000)"; }elseif($row1->Area==3){ print "FX Amount ('000)"; }elseif($row1->Area==4){ print "Units ('000)"; }else{ print "Cash ('000)"; } }else{ if(isset($cat) and strlen($cat) > 0){ $quer = "SELECT Area FROM ListDevelopment, Development where ListDevelopment.DevID='$cat' and ListDevelopment.DevID=Development.DvID "; $result1 = mysql_query($quer) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); if($row1->Area ==1 || $row1->Area==5){ print "Notional ('000)"; }elseif($row1->Area==6){ print "Notional ('000)"; }elseif($row1->Area==2){ print "No of Shares ('000)"; }elseif($row1->Area==3){ print "FX Amount ('000)"; }elseif($row1->Area==4){ print "Units ('000)"; }else{ print "Cash ('000)"; } } } print""; if($count_no !=0)print""; elseif($panelsize!=NULL)print""; else print""; print"
Position Netting"; print ""; print " (to close every month-end)
Settlement Date"; if($count !=0) print" "; elseif($row1->Area==2) print" T+3"; elseif($row1->Area==3) print" T+0"; else print" T+2 "; if($count !=0) print"    Trade Date ".$row->DatePosted.""; print"
Counterparty"; if($count !=0)print ""; if($count !=0){ $query1 = "SELECT Name FROM ListFloor where FlrID='$row->Floor' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); print ""; } if($panelparty!=NULL){ $query1 = "SELECT Name FROM ListFloor where FlrID='$panelparty' "; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); $row1=mysql_fetch_object($result1); print ""; } $query1 = "SELECT * FROM ListFloor Order By Name Asc"; $result1 = mysql_query($query1) or die (mysql_error(). " : ".mysql_errno()); print""; while($row1=mysql_fetch_object($result1)){ print""; } print""; print"
Settlement Details"; else print""; print"
"; print"
 "; if($superadmn==1)print ""; if($count !=0)print ""; print"
"; ?>