Change up the tax calculation formula to get amount using percent

This commit is contained in:
johnny@pittpc.com
2021-01-15 15:28:21 -05:00
parent a2848fad09
commit c58925f4ff
2 changed files with 2 additions and 2 deletions

View File

@@ -2340,7 +2340,7 @@ if(isset($_POST['add_invoice_item'])){
$tax = floatval($_POST['tax']);
$subtotal = $price * $qty;
$tax = $subtotal * $tax;
$tax = $subtotal * $tax / 100;
$total = $subtotal + $tax;
mysqli_query($mysqli,"INSERT INTO invoice_items SET item_name = '$name', item_description = '$description', item_quantity = $qty, item_price = '$price', item_subtotal = '$subtotal', item_tax = '$tax', item_total = '$total', item_created_at = NOW(), invoice_id = $invoice_id, company_id = $session_company_id");