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="doc" class="yui-t7">
90 <form name="Aform" action="[% script_name %]" method="post">
91 <input type="hidden" name="op" value="add_validate" />
92 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
93 <input type="hidden" name="checked" value="0" />
94 [% IF ( contractnumber ) %]
95 <h1>Modify contract [% contractname %] for [% booksellername %]</h1>
97 <h1>New contract for [% booksellername %]</h1>
99 <fieldset class="rows">
101 [% IF ( contractnumber ) %]
102 <li><span class="label">Contract id </span>[% contractnumber %]
103 <input type="hidden" name="contractnumber" value="[% contractnumber %]" />
104 <input type="hidden" name="is_a_modif" value="1" />
107 <li><label for="contractname" class="required">Name *</label>
108 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname %]" />
110 <li><label for="contractdescription">Description</label>
111 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
113 <li><label for="from" class="required">Start date *</label>
114 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate %]" maxlength="10" size="10" class="datepickerfrom" />
115 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
117 <li><label for="to" class="required">End date *</label>
118 <input type="text" name="contractenddate" id="to" value="[% contractenddate %]" maxlength="10" size="10" class="datepickerto" />
119 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
123 <fieldset class="action">
124 <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>
128 [% IF ( add_validate ) %]
129 <h3>Data recorded</h3>
130 <form action="[% script_name %]" method="post">
131 <input type="submit" value="OK" />
134 [% IF ( delete_confirm ) %]
135 <form action="[% script_name %]" method="post">
137 <legend>Confirm deletion of contract [% contractnumber %]</legend>
139 <tr><th scope="row">Contract number:</th><td>[% contractnumber %]</td></tr>
140 <tr><th scope="row">Contract name:</th><td>[% contractname %]</td></tr>
141 <tr><th scope="row">Contract description:</th><td>[% contractdescription %]</td></tr>
142 <tr><th scope="row">Contract start date:</th><td>[% contractstartdate %]</td></tr>
143 <tr><th scope="row">Contract end date:</th><td>[% contractenddate %]</td></tr>
144 <tr><th scope="row">Vendor:</th><td>[% booksellername %]</td></tr>
146 <fieldset class="action">
147 <input type="hidden" name="op" value="delete_confirmed" />
148 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
149 <input type="hidden" name="contractnumber" value="[% contractnumber %]" />
150 <input type="submit" value="Delete this Contract" />
151 <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]&contractnumber=[% contractnumber %]">Cancel</a>
156 [% IF ( delete_confirmed ) %]
157 <h3>Contract deleted</h3>
158 <form action="[% script_name %]" method="post">
159 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
160 <input type="submit" value="OK" />
165 <script type="text/javascript">
167 // prepare DOM for YUI Toolbar
168 $(document).ready(function() {
171 // YUI Toolbar Functions
172 function yuiToolbar() {
173 new YAHOO.widget.Button("newcontract");
178 <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid %]">New contract</a></li>
181 <h2>Contract(s) of [% booksellername %]</h2>
185 <th scope="col">Name</th>
186 <th scope="col">Description</th>
187 <th scope="col">Start date</th>
188 <th scope="col">End date</th>
189 <th scope="col" colspan="2"> </th>
191 [% FOREACH loo IN loop %]
192 [% IF ( loop.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
194 <a href="[% loo.script_name %]?op=add_form&booksellerid=[% loo.booksellerid %]&contractnumber=[% loo.contractnumber %]">[% loo.contractname %]</a>
196 <td>[% loo.contractdescription %]</td>
197 <td>[% loo.contractstartdate %]</td>
198 <td>[% loo.contractenddate %]</td>
199 <td><a href="[% loo.script_name %]?op=add_form&contractnumber=[% loo.contractnumber %]&booksellerid=[% loo.booksellerid %]">Edit</a></td>
200 <td><a href="[% loo.script_name %]?op=delete_confirm&contractnumber=[% loo.contractnumber %]&booksellerid=[% loo.booksellerid %]">Delete</a></td>
205 <div class="dialog message">There are no contracts with this vendor.</div>
210 [% INCLUDE 'intranet-bottom.inc' %]