<?php 
session_start();
include('db.php'); 
 
  

?>
<title>جـزئیــات در آمدهای متفـرقـه</title>
<link href="css/fontstyle.css" rel="stylesheet" type="text/css"/>	
<div align="center"  ><h1 class='fotntitle'>صـــرافی حـــاجـــی عبـــدالحکیــــــم وبـــرادران</h1></div>
<div>
   <fieldset  dir='rtl' style="border: 1px solid #000;font-size: 16px;font-weight: bold">
  <legend class='fotntitle'>جـــــزئیــات درآمـــــدهـــای متفـــرقــــه</legend>
 

  <blockquote class='fotntitle' dir='rtl' style="border: 1px solid #000;width: 700px;font-size: 14px;font-weight: bold">
			 
			 <ul>
			 <table border="0" width="600px" style="line-height: 40px">
			

			<?php
			$date=$_GET['date'];
			echo" <tr>
				<td  colspan='3' style='font-size: 25px;font-weight: bold'>جزئیات درآمدهای متفرقه به تاریخ&nbsp;$date</td>
			</tr>";
			
			
			
			              
					     $income_sql="SELECT * FROM others WHERE  typeOthers='2' and date='$date' ";
						 $income_query= $db ->query($income_sql);
						 while($income_row=$income_query ->fetch_array()){
						         $incomeId=$income_row['expensesId'];
						         $currencyId=$income_row['currencyId'];
						         $amount=$income_row['amount'];
		     
						    //=========================================
							    $currencyName_sql="select * from currencies where id='$currencyId'";
								$currencyName_query= $db ->query($currencyName_sql);
								$currencyName_row=$currencyName_query ->fetch_array();
								$currencyName=$currencyName_row['name'];
													  
						    //=========================================
							//=========================================
							    $incomeName_sql="select * from incomename where id='$incomeId'  ";
								$incomeName_query= $db ->query($incomeName_sql);
								$incomeName_row=$incomeName_query ->fetch_array();
								$incomeName=$incomeName_row['incomeName'];
													  
						    //=========================================
						          
						  echo "
						  
						    <tr>
								<td style='width: 200px'><li>$incomeName-($currencyName)</li></td>
								<td style='width: 300px'><hr style='height:1px;border:none;color:#333;background-color:#333;'></td>
								<td style='width: 100px;text-align: right'>".number_format($amount,2)." </td>
							</tr>";
						  
						  
						   
						  
						  
						  
						  
						  
						  }

                          
						  


					    
			?>
	
		
			 
			  
			 
			 
			 
							
			 
			</table>
			</ul>
			
		</blockquote>
		 
	  
	</table>
	</fieldset>
	</div>