Yaluwane mekai wenna one
row wise ena data column wise pennan one
........
$sqlstate="SELECT branch,sum(depriciation_amount),catogary,sum(tcost) FROM depriciation
inner join newassest on depriciation.Current_code = newassest.current_code
WHERE depriciation_year_month between '$date' and '$date2'
group by catogary,branch;";
} //identyfy from the button click
else {
$sqlstate="SELECT * FROM depriciation limit 1 "; //
}
$result=mysql_query($sqlstate,$con) or die ("SQL Error".mysql_error());
$rownumber=mysql_num_rows($result);
if($rownumber>0){
.......
......
.......
<div id="table">
<table class="table table-hover table-bordered" width=90%/>
<th>Catogary</th>
<th>Branch</th>
<th>Total Cost</th>
<th>Depricition Amount</th>
<th>Book Vaule</th>
</tr>
<?php
while ($record=mysql_fetch_assoc($result)){
echo ("<tr>");
$cat=$record["catogary"];
$bat=$record["branch"];
echo ('<td >'.$cat.'</td>');---- table row date
echo ('<td>'.$bat.'</td>'); --- table row date
$tc= $record["sum(tcost)"];
$tccost = $tc ;
echo ('<td align="right">'.$tc.'</td>'); - table row date
echo ('<td align="right">'.$record["sum(depriciation_amount)"].'</td>'); -- table row date
$de =$record["sum(depriciation_amount)"];
$bv =$tccost - $de;
$bv=number_format($bv, 2);
echo ('<td align="right">'.$bv.'</td>'); -- table row date
Dana display wena widiya
mata mekai wenna one -- forget the total cost and deprecation
row wise ena data column wise pennan one
........
$sqlstate="SELECT branch,sum(depriciation_amount),catogary,sum(tcost) FROM depriciation
inner join newassest on depriciation.Current_code = newassest.current_code
WHERE depriciation_year_month between '$date' and '$date2'
group by catogary,branch;";
} //identyfy from the button click
else {
$sqlstate="SELECT * FROM depriciation limit 1 "; //
}
$result=mysql_query($sqlstate,$con) or die ("SQL Error".mysql_error());
$rownumber=mysql_num_rows($result);
if($rownumber>0){
.......
......
.......
<div id="table">
<table class="table table-hover table-bordered" width=90%/>
<th>Catogary</th>
<th>Branch</th>
<th>Total Cost</th>
<th>Depricition Amount</th>
<th>Book Vaule</th>
</tr>
<?php
while ($record=mysql_fetch_assoc($result)){
echo ("<tr>");
$cat=$record["catogary"];
$bat=$record["branch"];
echo ('<td >'.$cat.'</td>');---- table row date
echo ('<td>'.$bat.'</td>'); --- table row date
$tc= $record["sum(tcost)"];
$tccost = $tc ;
echo ('<td align="right">'.$tc.'</td>'); - table row date
echo ('<td align="right">'.$record["sum(depriciation_amount)"].'</td>'); -- table row date
$de =$record["sum(depriciation_amount)"];
$bv =$tccost - $de;
$bv=number_format($bv, 2);
echo ('<td align="right">'.$bv.'</td>'); -- table row date
Dana display wena widiya
mata mekai wenna one -- forget the total cost and deprecation
Last edited: