<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse;">
  <tr>
    <td class="tabledata">Branch/Unit</td>
    <td class="tabledata">Total Sale</td>
    <td class="tabledata">Net Sale</td>
   <!-- <td class="tabledata">Total Excise</td>
    <td class="tabledata">Tax Value</td>-->
  </tr>
  <?php
 
  
  $invoice=DB_query("select SUM(basicAmount) AS Total from salesorder inner join salesorder_details on salesorder.id=salesorder_details.masterId where branch in('".$_SESSION['AssignedBranch']."') and ApprovalStatus='Approved' ",$db);
  $invoice_data=DB_fetch_array($invoice); 
  ?>
   <tr>
    <td class="tabledata_fist"><?php //echo $s->getField('locations','loccode',$_SESSION['AssignedBranch'],'locationname'); ?></td>
    <td class="tabledata1"><?php  $inv=DB_query("select sum(grandTotal) as grand from salesorder    inner join salesorder_details on salesorder.id=salesorder_details.masterId where branch in('".$_SESSION['AssignedBranch']."') and ApprovalStatus='Approved' ",$db);
	                       $invdata=DB_fetch_array($inv);
						   echo $invdata['grand']; ?>  	
    	</td>
    <td class="tabledata1"><?php echo $invoice_data['Total']; ?></td>
    
  </tr>
  
  

</table>