58c652a0fc
This patch make inactive vendors really inactive. That means an inactive vendor would not be able to add a basket / add an order. Revised test plan ================= 1/ In the acquisition module create 2 vendors: 1 active and 1 inactive. 2/ On the acqui/booksellers.pl, acqui/uncertainprice.pl, admin/aqcontract.pl and acqui/supplier.pl (pages which include the acq toolbar), you should be able to, for both the 'active' as well as the inactive vendor : (a) add new basket (b) add order items to the basket Remark: This is *wrong*. You should be able to do so only for active vendor. 3/ Apply the patch 4/ Go to the links in step #2 above and select the inactive vendor you should no longer be able to: (a) add new basket (b) add order items to the basket Remark: This is the *correct* behaviour 5/ No change should be noted for vendor marked "active", and should be able to undertake operations 4 (a), 4 (b) and 4 (c). Remark: This is the *correct* behaviour. 6/ run koha qa tests tool Bug 12054: (follow-up) Inactive vendors should be inactive Don't display "add order""block and buttons if the vendor is inactive. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
40 lines
2.2 KiB
HTML
40 lines
2.2 KiB
HTML
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function confirm_deletion() {
|
|
if (confirm(_("Are you sure you want to delete this vendor?"))) {
|
|
window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
<div id="toolbar" class="btn-toolbar">
|
|
[% IF ( booksellerid ) %]
|
|
<div class="btn-group">
|
|
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-plus"></i> New
|
|
<span class="caret"></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
[% IF CAN_user_acquisition_order_manage && active %]
|
|
<li><a href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&op=add_form">Basket</a></li>
|
|
[% END %]
|
|
[% IF CAN_user_acquisition_contracts_manage && active %]
|
|
<li><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid %]">Contract</a></li>
|
|
[% END %]
|
|
[% IF ( CAN_user_acquisition_vendors_manage ) %]
|
|
<li><a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">Vendor</a></li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% IF ( CAN_user_acquisition_vendors_manage ) %]
|
|
<div class="btn-group"><a class="btn btn-small" id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=enter"><i class="icon-pencil"></i> Edit vendor</a></div>
|
|
[% UNLESS ( basketcount OR subscriptioncount ) %]
|
|
<div class="btn-group"><a class="btn btn-small" id="deletesupplier" href="javascript:confirm_deletion()"><i class="icon-remove"></i> Delete vendor</a></div>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF CAN_user_acquisition_order_receive && basketcount %]
|
|
<div class="btn-group"><a class="btn btn-small" id="receive" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]"><i class="icon-inbox"></i> Receive shipments</a></div>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<div class="btn-group"><a class="btn btn-small" href="/cgi-bin/koha/acqui/supplier.pl?op=enter"><i class="icon-plus"></i> New vendor</a></div>
|
|
[% END %]
|
|
</div>
|