mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Added Tax ID to each line item, also if tax % changes the new recurring will automatically get updated and sent with the right tax rate DB Structure updated
This commit is contained in:
@@ -181,6 +181,9 @@ if(isset($_GET['recurring_id'])){
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
$total_tax = 0;
|
||||
$sub_total = 0;
|
||||
|
||||
while($row = mysqli_fetch_array($sql_items)){
|
||||
$item_id = $row['item_id'];
|
||||
@@ -191,9 +194,8 @@ if(isset($_GET['recurring_id'])){
|
||||
$item_subtotal = $row['item_price'];
|
||||
$item_tax = $row['item_tax'];
|
||||
$item_total = $row['item_total'];
|
||||
$total_tax = 0;
|
||||
$tax_id = $row['tax_id'];
|
||||
$total_tax = $item_tax + $total_tax;
|
||||
$sub_total = 0;
|
||||
$sub_total = $item_price * $item_quantity + $sub_total;
|
||||
|
||||
?>
|
||||
@@ -228,8 +230,8 @@ if(isset($_GET['recurring_id'])){
|
||||
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: center;" name="qty" placeholder="QTY"></td>
|
||||
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: right;" name="price" placeholder="Price"></td>
|
||||
<td>
|
||||
<select class="form-control select2" name="tax" required>
|
||||
<option value="0.00">None</option>
|
||||
<select class="form-control select2" name="tax_id" required>
|
||||
<option value="0">None</option>
|
||||
<?php
|
||||
|
||||
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session_company_id ORDER BY tax_name ASC");
|
||||
@@ -238,7 +240,7 @@ if(isset($_GET['recurring_id'])){
|
||||
$tax_name = $row['tax_name'];
|
||||
$tax_percent = $row['tax_percent'];
|
||||
?>
|
||||
<option value="<?php echo "$tax_percent"; ?>"><?php echo "$tax_name $tax_percent%"; ?></option>
|
||||
<option value="<?php echo $tax_id; ?>"><?php echo "$tax_name $tax_percent%"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user