{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>
<form method="POST" action="?m=taxrateadd" name="taxrateadd">
<input type="submit" class="hiddenbtn">
<table class="lmsbox">
	<colgroup>
		<col style="width: 1%;">
		<col style="width: 1%;">
		<col style="width: 98%;">
	</colgroup>
	<thead>
		<tr>
			<td>
				{icon name="tax"}
			</td>
			<td>
				<strong>{trans("Label:")}</strong>
			</td>
			<td>
				<input type="text" name="taxrateadd[label]" value="{$taxrateadd.label}" size="16"
					{tip text="Enter tax rate label" trigger="label"}>
			</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				{icon name="cash"}
			</td>
			<td class="nobr">
				<strong>{trans("Value:")}</strong>
			</td>
			<td>
				<input type="text" name="taxrateadd[value]" value="{$taxrateadd.value|string_format:"%.2f"}" size="10"
					{tip text="Enter percentage value of tax rate" trigger="value"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="tax"}
			</td>
			<td>
				<label for="taxing">
					<strong>{trans("Taxing:")}</strong>
				</label>
			</td>
			<td>
				<input type="checkbox" id="taxing" name="taxrateadd[taxed]" value="1"
					{tip text="Select taxing status"}
					{if $taxrateadd.taxed != "0"} checked{/if}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="tax"}
			</td>
			<td class="nobr">
				<label for="reversecharge">
					<strong>{trans("Reverse charge:")}</strong>
				</label>
			</td>
			<td>
				<input type="checkbox" id="reversecharge" name="taxrateadd[reversecharge]" value="1"
					{tip text="Check if reverse charge should be applied"}{if $taxrateadd.reversecharge} checked{/if}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="calendar"}
			</td>
			<td class="nobr">
				<strong>{trans("Binds from date:")}</strong>
			</td>
			<td>
				<input type="text" name="taxrateadd[validfrom]" value="{$taxrateadd.validfrom}" size="10"
					placeholder="{trans("yyyy/mm/dd")}"
					{tip class="lms-ui-date" text="Enter date in YYYY/MM/DD format (empty field means no limit) or click to choose it from calendar" trigger="validfrom"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="calendar"}
			</td>
			<td class="nobr">
				<strong>{trans("Binds to date:")}</strong>
			</td>
			<td>
				<input type="text" name="taxrateadd[validto]" value="{$taxrateadd.validto}" size="10"
					placeholder="{trans("yyyy/mm/dd")}"
					{tip class="lms-ui-date" text="Enter date in YYYY/MM/DD format (empty field means no limit) or click to choose it from calendar" trigger="validto"}>
			</td>
		</tr>
		<tr>
			<td class="lms-ui-box-buttons" colspan="3">
				{button icon="save" label="Submit" onclick="document.taxrateadd.submit()"}
				{button icon="cancel" label="Cancel" href="?m=taxratelist"}
				<br>
				<label>
					<input type="checkbox" name="taxrateadd[reuse]" value="ON"
						{if $taxrateadd.reuse} checked{/if}>
					{trans("Display this form again, when this tax rate is saved")}
				</label>
			</td>
		</tr>
	</tbody>
</table>

<script>

	$(function() {
		$('[name="taxrateadd[label]"]').focus();
	});

</script>
{/block}
