Hi guys, total newbie here, here's my question:
How can I multiply the total of the purchase order to 0.15 (15%) in order to include a tax. So far I understand I have to declare a variable, but as a total newbie am struggling to multiply the total by 15% so I can get a new total.
This is part of my code from a purchase order system am building thanks for looking at it.
<?php
$i = 1;
$po_total = 0;
while (!$line_items->EOF) {
echo "<tr>";
echo "<td align=\"center\">$i</td>";
echo "<td align=\"center\">" . $line_items->fields["qty"] . "</td>";
echo "<td align=\"center\">" . $line_items->fields["unit"] . "</td>";
echo "<td>" . $line_items->fields["descrip"] . "</td>";
if ($line_items->fields["unit_price"] != 0) {
echo "<td align=\"right\">" . $line_items->fields["unit_price"] . "</td>";
echo "<td align=\"right\">" . $line_items->fields["amount"] . "</td>";
} else {
echo "<td> </td>";
echo "<td> </td>";
}
echo "</tr>";
$po_total += $line_items->fields["amount"];
$i++;
$line_items->MoveNext();
} ?>