1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Acquisitions › Contracts ›
4 [% IF ( contractnumber ) %]Modify contract '[% contractname %]'
5 [% ELSE %]New contract[% END %]
7 [% IF ( else ) %]Contracts of [% booksellername %][% END %]
8 [% IF ( add_validate ) %]Data recorded[% END %]
9 [% IF ( delete_confirm ) %]Confirm deletion of contract '[% contractnumber %]'[% END %]
10 [% IF ( delete_confirmed ) %]Contract deleted[% END %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% INCLUDE 'calendar.inc' %]
13 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
14 <script type="text/javascript">
16 // to check if the data are correctly entered.
19 var _alertString=_("Form not submitted because of the following problem(s)");
20 _alertString +="\n-------------------------------------------------------------------\n\n";
21 if (!(isNotNull(ff.contractname,0))){
23 _alertString += _("- Name missing") + "\n";
25 var startDate = Date_from_syspref($("#from").val());
26 var endDate = Date_from_syspref($("#to").val());
27 if (!parseInt(startDate.getTime())) {
29 _alertString += _("- Start date missing or invalid.") + "\n";
31 if (!parseInt(endDate.getTime())) {
33 _alertString += _("- End date missing or invalid.") + "\n";
36 if (startDate > endDate) {
38 _alertString += _("Wrong date! start date cannot be after end date.") + "\n";
40 if (endDate < (new Date)) {
42 _alertString += _("End date before today, Invalid end date!") + "\n";
44 if (ok) { // if there is a problem
54 <body id="acq_aqcontract" class="acq">
55 [% INCLUDE 'header.inc' %]
56 [% INCLUDE 'contracts-admin-search.inc' %]
58 <div id="breadcrumbs">
59 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
61 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
63 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a>
66 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a>
68 [% IF ( contractnumber ) %]Modify contract '[% contractname %]'
69 [% ELSE %]New contract
72 [% IF ( add_validate ) %]
73 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a>
74 › Data recorded
76 [% IF ( delete_confirm ) %]
77 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a>
78 › Confirm deletion of contract [% contractnumber %]
80 [% IF ( delete_confirmed ) %]
81 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a> › Contract Deleted
83 [% IF ( else ) %]Contracts[% END %]
86 <div id="doc3" class="yui-t2">
92 [% INCLUDE 'acquisitions-toolbar.inc' %]
94 [% IF error == 'not_deleted' %]
95 <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
99 <form name="Aform" action="[% script_name %]" method="post">
100 <input type="hidden" name="op" value="add_validate" />
101 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
102 <input type="hidden" name="checked" value="0" />
103 [% IF ( contractnumber ) %]
104 <h1>Modify contract [% contractname %] for [% booksellername %]</h1>
106 <h1>New contract for [% booksellername %]</h1>
108 <fieldset class="rows">
110 [% IF ( contractnumber ) %]
111 <li><span class="label">Contract id </span>[% contractnumber %]
112 <input type="hidden" name="contractnumber" value="[% contractnumber %]" />
113 <input type="hidden" name="is_a_modif" value="1" />
116 <li><label for="contractname" class="required">Name: *</label>
117 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname %]" />
119 <li><label for="contractdescription">Description: </label>
120 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
122 <li><label for="from" class="required">Start date: *</label>
123 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate %]" maxlength="10" size="10" class="datepickerfrom" />
124 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
126 <li><label for="to" class="required">End date: *</label>
127 <input type="text" name="contractenddate" id="to" value="[% contractenddate %]" maxlength="10" size="10" class="datepickerto" />
128 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
132 <fieldset class="action">
133 <input type="button" value="Save" onclick="Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]&contractnumber=[% contractnumber %]">Cancel</a>
137 [% IF ( add_validate ) %]
138 <h3>Data recorded</h3>
139 <form action="[% script_name %]" method="post">
140 <input type="submit" value="OK" />
143 [% IF ( delete_confirm ) %]
144 <form action="[% script_name %]" method="post">
146 <legend>Confirm deletion of contract [% contractnumber %]</legend>
148 <tr><th scope="row">Contract number:</th><td>[% contractnumber %]</td></tr>
149 <tr><th scope="row">Contract name:</th><td>[% contractname %]</td></tr>
150 <tr><th scope="row">Contract description:</th><td>[% contractdescription %]</td></tr>
151 <tr><th scope="row">Contract start date:</th><td>[% contractstartdate %]</td></tr>
152 <tr><th scope="row">Contract end date:</th><td>[% contractenddate %]</td></tr>
153 <tr><th scope="row">Vendor:</th><td>[% booksellername %]</td></tr>
155 <fieldset class="action">
156 <input type="hidden" name="op" value="delete_confirmed" />
157 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
158 <input type="hidden" name="contractnumber" value="[% contractnumber %]" />
159 <input type="submit" value="Delete this Contract" />
160 <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]&contractnumber=[% contractnumber %]">Cancel</a>
165 [% IF ( delete_confirmed ) %]
166 <h3>Contract deleted</h3>
167 <form action="[% script_name %]" method="post">
168 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
169 <input type="submit" value="OK" />
173 <h2>Contract(s) of [% booksellername %]</h2>
177 <th scope="col">Name</th>
178 <th scope="col">Description</th>
179 <th scope="col">Start date</th>
180 <th scope="col">End date</th>
181 <th scope="col" colspan="2"> </th>
183 [% FOREACH loo IN loop %]
184 [% IF ( loop.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
186 <a href="[% loo.script_name %]?op=add_form&booksellerid=[% loo.booksellerid %]&contractnumber=[% loo.contractnumber %]">[% loo.contractname %]</a>
188 <td>[% loo.contractdescription %]</td>
189 <td>[% loo.contractstartdate %]</td>
190 <td>[% loo.contractenddate %]</td>
191 <td><a href="[% loo.script_name %]?op=add_form&contractnumber=[% loo.contractnumber %]&booksellerid=[% loo.booksellerid %]">Edit</a></td>
192 <td><a href="[% loo.script_name %]?op=delete_confirm&contractnumber=[% loo.contractnumber %]&booksellerid=[% loo.booksellerid %]">Delete</a></td>
197 <div class="dialog message">There are no contracts with this vendor. <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid %]">Add a contract</a>.</div>
203 [% INCLUDE 'vendor-menu.inc' %]
206 [% INCLUDE 'intranet-bottom.inc' %]