5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions › Contracts ›
8 [% IF ( contractnumber ) %]Modify contract '[% contractname | html %]'
9 [% ELSE %]New contract[% END %]
11 [% IF ( else ) %]Contracts of [% booksellername | html %][% END %]
12 [% IF ( add_validate ) %]Data recorded[% END %]
13 [% IF ( delete_confirm ) %]Confirm deletion of contract '[% contractnumber | html %]'[% END %]
14 [% IF ( delete_confirmed ) %]Contract deleted[% END %]</title>
15 [% INCLUDE 'doc-head-close.inc' %]
18 <body id="acq_aqcontract" class="acq">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'contracts-admin-search.inc' %]
22 <div id="breadcrumbs">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
27 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
30 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
32 [% IF ( contractnumber ) %]Modify contract '[% contractname | html %]'
33 [% ELSE %]New contract
36 [% IF ( add_validate ) %]
37 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
38 › Data recorded
40 [% IF ( delete_confirm ) %]
41 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
42 › Confirm deletion of contract [% contractnumber | html %]
44 [% IF ( delete_confirmed ) %]
45 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a> › Contract deleted
47 [% IF ( else ) %]Contracts[% END %]
50 <div class="main container-fluid">
52 <div class="col-sm-10 col-sm-push-2">
55 [% INCLUDE 'acquisitions-toolbar.inc' %]
57 [% IF error == 'not_deleted' %]
58 <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
62 <form name="Aform" action="/cgi-bin/koha/admin/aqcontract.pl" id="add_modify_contract" method="post">
63 <input type="hidden" name="op" value="add_validate" />
64 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
65 <input type="hidden" name="checked" value="0" />
66 [% IF ( contractnumber ) %]
67 <h1>Modify contract [% contractname | html %] for [% booksellername | html %]</h1>
69 <h1>New contract for [% booksellername | html %]</h1>
71 <fieldset class="rows">
73 [% IF ( contractnumber ) %]
74 <li><span class="label">Contract id </span>[% contractnumber | html %]
75 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
76 <input type="hidden" name="is_a_modif" value="1" />
79 <li><label for="contractname" class="required">Name:</label>
80 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname | html %]" />
81 <span class="required">Required</span>
83 <li><label for="contractdescription">Description: </label>
84 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription | html %]" />
86 <li><label for="from" class="required">Start date:</label>
87 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="datepickerfrom" />
88 <span class="required">Required</span>
89 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
91 <li><label for="to" class="required">End date:</label>
92 <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10" size="10" class="datepickerto" />
93 <span class="required">Required</span>
94 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
98 <fieldset class="action">
99 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | html %]&contractnumber=[% contractnumber | html %]">Cancel</a>
103 [% IF ( add_validate ) %]
104 <h3>Data recorded</h3>
105 <form action="[% script_name | html %]" method="post">
106 <input type="submit" value="OK" />
109 [% IF ( delete_confirm ) %]
110 <div class="dialog alert">
111 <h3>Confirm deletion of contract <em>[% contractname | html %]</em></h3>
113 <tr><th scope="row">Contract number:</th><td>[% contractnumber | html %]</td></tr>
114 <tr><th scope="row">Contract name:</th><td>[% contractname | html %]</td></tr>
115 <tr><th scope="row">Contract description:</th><td>[% contractdescription | html %]</td></tr>
116 <tr><th scope="row">Contract start date:</th><td>[% contractstartdate | $KohaDates %]</td></tr>
117 <tr><th scope="row">Contract end date:</th><td>[% contractenddate | $KohaDates %]</td></tr>
118 <tr><th scope="row">Vendor:</th><td>[% booksellername | html %]</td></tr>
120 <form action="[% script_name | html %]" method="post">
121 <input type="hidden" name="op" value="delete_confirmed" />
122 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
123 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
124 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete contract</button>
126 <form action="/cgi-bin/koha/admin/aqcontract.pl" method="get">
127 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
128 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
129 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
133 [% IF ( delete_confirmed ) %]
134 <h3>Contract deleted</h3>
135 <form action="[% script_name | html %]" method="post">
136 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
137 <input type="submit" value="OK" />
141 <h2>Contract(s) of [% booksellername | html %]</h2>
145 <th scope="col">Name</th>
146 <th scope="col">Description</th>
147 <th scope="col">Start date</th>
148 <th scope="col">End date</th>
149 <th scope="col">Actions</th>
151 [% FOREACH loo IN loop %]
154 <a href="[% loo.script_name | url %]?op=add_form&booksellerid=[% loo.booksellerid | uri %]&contractnumber=[% loo.contractnumber | uri %]">[% loo.contractname | html %]</a>
156 <td>[% loo.contractdescription | html %]</td>
157 <td>[% loo.contractstartdate | html %]</td>
158 <td>[% loo.contractenddate | html %]</td>
160 <a href="[% loo.script_name | url %]?op=add_form&contractnumber=[% loo.contractnumber | uri %]&booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
161 <a href="[% loo.script_name | url %]?op=delete_confirm&contractnumber=[% loo.contractnumber | uri %]&booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
167 <div class="dialog message">
168 There are no contracts with this vendor.
170 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid | uri %]">Add a contract</a>.
177 </div> <!-- /.col-sm-10.col-sm-push-2 -->
179 <div class="col-sm-2 col-sm-pull-10">
181 [% INCLUDE 'acquisitions-menu.inc' %]
183 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
184 </div> <!-- /.row -->
186 [% MACRO jsinclude BLOCK %]
187 [% INCLUDE 'calendar.inc' %]
188 [% Asset.js("js/acq.js") | $raw %]
190 $(document).ready(function(){
191 $("#add_modify_contract").validate({
193 contractstartdate: "required",
194 contractname: "required",
197 date_on_or_after: "#from"
202 date_on_or_after: _("Contract end date must be on or after contract start date")
209 [% INCLUDE 'intranet-bottom.inc' %]