i have problem table print out asset accumulated depreciation on php, stright line method. $query = mysqli_query($connect, "select current_value, salvage_value, useful_life, placed_service assets"); if(!$query){ echo 'could not run query b: ' . mysqli_error($connect); exit; } while($asset = mysqli_fetch_row($query)){ echo "assets :"; print_r($asset); $month = 12; $year = date('y',strtotime($asset[3])); $first_year = $month - ((int)date('m',strtotime($asset[3]))-1); $last_year = $month - $first_year; $first = round((($asset[0] - $asset[1])/$asset[2])*(($first_year)/12),0); $last = round((($asset[0] - $asset[1])/$asset[2])*(($last_year)/12),0); $others = ($asset[0] - $asset[1])/$asset[2]; echo "<table border=1>"; echo "<tr><th>year</th><th>book value year start</th><th>depreciation expense</th><th...
Comments
Post a Comment