indent testype purchase vat
This commit is contained in:
@ -128,11 +128,11 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="mt-3">
|
||||
<!-- <div class="mt-3">
|
||||
<label for="vatToggle">VAT</label>
|
||||
<input type="checkbox" id="vatToggle" checked>
|
||||
</div>
|
||||
<input type="hidden" id="vatToggleValue" name="vatToggleValue" value="0">
|
||||
<input type="hidden" id="vatToggleValue" name="vatToggleValue" value="1"> -->
|
||||
<!-- Purchase Details Section -->
|
||||
<div class="col-12 table-responsive p-0 mt-3">
|
||||
<table class="table table-striped">
|
||||
@ -167,7 +167,17 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" rowspan="5">In words: </td>
|
||||
<td colspan="3" rowspan="5">In words: </td>
|
||||
<td class="text-right" colspan="1" rowspan="5">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<label for="vatToggle">VAT</label>
|
||||
<input type="checkbox" id="vatToggle" checked>
|
||||
<input type="hidden" id="vatToggleValue" name="vatToggleValue" value="1">
|
||||
</td>
|
||||
<td class="text-right "><b>Total Amount</b></td>
|
||||
<td class="text-right">
|
||||
<b><input type="text" class="form-control" name="subtotal" id="subtotal" /></b>
|
||||
@ -342,10 +352,14 @@
|
||||
if (this.checked) {
|
||||
$('#vatToggleValue').val('0');
|
||||
$("tfoot tr:nth-child(4)").show();
|
||||
$("tfoot tr:nth-child(3)").show();
|
||||
|
||||
} else {
|
||||
//1 because i will use this for conditions so that it does not alter previously entered vouchers
|
||||
//1 because it will be applied for conditions where past data may be altered by this
|
||||
$('#vatToggleValue').val('1');
|
||||
$("tfoot tr:nth-child(4)").hide();
|
||||
$("tfoot tr:nth-child(3)").hide();
|
||||
|
||||
}
|
||||
calculateTotals();
|
||||
});
|
||||
|
@ -37,10 +37,10 @@
|
||||
<div class="col">
|
||||
<p><strong>Quantity</strong></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col text-right">
|
||||
<p><strong>Price</strong></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col text-right">
|
||||
<p><strong>Total</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -69,12 +69,19 @@
|
||||
<div class="row bill-footer">
|
||||
<div class="col text-right">
|
||||
<p><strong>Subtotal:</strong> <?php echo myCurrency($total,true); ?></p>
|
||||
<p><strong>Discount percent:</strong> <?php echo myCurrency($discount,true); ?></p>
|
||||
<?php $discounted = ($total*$discount/100) ?>
|
||||
<p><strong>Discount amount:</strong> <?php echo myCurrency($discounted,true); ?></p>
|
||||
<?php $discounted = 0; ?>
|
||||
<?php if($discount > 0): ?>
|
||||
<p><strong>Discount percent:</strong> <?php echo myCurrency($discount,true); ?></p>
|
||||
<?php $discounted = ($total*$discount/100) ?>
|
||||
<p><strong>Discount amount:</strong> <?php echo myCurrency($discounted,true); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php $taxable = $total - $discounted ?>
|
||||
<p><strong>Taxable amount:</strong> <?php echo myCurrency($taxable,true); ?></p>
|
||||
<p><strong>Tax (13%):</strong> <?php echo myCurrency($tax=($taxable*13)/100,true); ?></p>
|
||||
<?php $tax = 0; ?>
|
||||
<?php //print_r($Purchase->vatToggle);die; ?>
|
||||
<!-- <?php //if($Sales->vatToggle != 1): ?> -->
|
||||
<p><strong>Taxable amount:</strong> <?php echo myCurrency($taxable,true); ?></p>
|
||||
<p><strong>Tax (13%):</strong> <?php echo myCurrency($tax=($taxable*13)/100,true); ?></p>
|
||||
<!-- <?php //endif; ?> -->
|
||||
<p><strong>Total:</strong> <?php echo myCurrency(($taxable+$tax),true); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user