{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=taxrateedit&id={$taxrateedit.id}" name="taxrateedit">
<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="taxrateedit[label]" value="{$taxrateedit.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="taxrateedit[value]" value="{$taxrateedit.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="taxrateedit[taxed]" value="1"
					{tip text="Select taxing status"}{if $taxrateedit.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="taxrateedit[reversecharge]" value="1"
					{tip text="Check if reverse charge should be applied"}{if $taxrateedit.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="taxrateedit[validfrom]" value="{$taxrateedit.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="taxrateedit[validto]" value="{$taxrateedit.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.taxrateedit.submit()"}
				{button icon="cancel" label="Cancel" href="?m=taxratelist"}
			</td>
		</tr>
    </tbody>
</table>

<script>

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

</script>
{/block}
