<?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>";
			
			
			
			              
					     $customer_debit_sql="SELECT * FROM transaction WHERE  treatment='1' and date='$date' and remove='0'  ";
		                 $customer_debit_query= $db ->query($customer_debit_sql);
				        while($customer_debit_row=$customer_debit_query ->fetch_array()){
		         
						          $counterCurrency=$customer_debit_row['counterCurrency'];
						          $counterAmount    =$customer_debit_row['counterAmount'];
						          $transactCurrency    =$customer_debit_row['transactCurrency'];
						    //=========================================
							    $currencyName_sql="select name from currencies where id='$counterCurrency'  ";
								$currencyName_query= $db ->query($currencyName_sql);
								$currencyName_row=$currencyName_query ->fetch_array();
								$currencyName=$currencyName_row['name'];
													  
						    //=========================================
 
						  echo "
						  
						    <tr>
								<td style='width: 200px'><li> $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($counterAmount,2)." </td>
							</tr>";
						  
						  
						   
						  
						  
						  
						  
						  
						  }

                          
						  


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