From 11c8e65a5d62ef0de0fa8b6f152fbba8655eab84 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@biblibre.com>
Date: Mon, 19 Jan 2015 16:46:56 +0100
Subject: [PATCH] Bug 12993: (qa-follow-up) Display the column only when it is
useful
As mention by comment 19, the default tax rate defined for item types is
only useful when the items are created on ordering and the item type is
defined at the biblio level.
---
.../intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
index d76736f..e9ab7fa 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
@@ -176,10 +176,13 @@ Item types administration
<label for="rentalcharge">Rental charge: </label>
<input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" />
</li>
+
+ [%# The tax rate is only useful if the item are created on ordering and if the item type is defined at the biblio level %]
+ [% IF Koha.Preference('AcqCreateItem') eq 'ordering' and Koha.Preference('item-level_itypes') eq '0' %]
<li>
<label for="gstrate">Tax rate: </label>
<select name="gstrate" id="gstrate">
- <option value="">No default</option>
+ <option value="">Manual</option>
[% FOREACH gst IN gst_values %]
[% IF gst.option == gstrate %]
<option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
@@ -189,6 +192,7 @@ Item types administration
[% END %]
</select>
</li>
+ [% END %]
<li>
<label for="checkinmsg">Checkin message: </label>
<textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% checkinmsg %]</textarea>
@@ -275,7 +279,10 @@ Item types administration
<th>Description</th>
<th>Not for loan</th>
<th>Charge</th>
- <th>Tax rate</th>
+ [%# The tax rate is only useful if the item are created on ordering and if the item type is defined at the biblio level %]
+ [% IF Koha.Preference('AcqCreateItem') eq 'ordering' and Koha.Preference('item-level_itypes') eq '0' %]
+ <th>Tax rate</th>
+ [% END %]
<th>Checkin message</th>
<th>Actions</th>
</thead>
@@ -294,10 +301,16 @@ Item types administration
[% loo.rentalcharge %]
[% END %]
</td>
+ [%# The tax rate is only useful if the item are created on ordering and if the item type is defined at the biblio level %]
+ [% IF Koha.Preference('AcqCreateItem') eq 'ordering' and Koha.Preference('item-level_itypes') eq '0' %]
<td>
[% IF loo.gstrate.length > 0 %]
[% loo.gstrate * 100 | format("%.1f") %]%
+ [% ELSE %]
+ Manual
[% END %]
+ </td>
+ [% END %]
<td>[% loo.checkinmsg | html_line_break %]</td>
<td>
<a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a>
--
2.1.0