2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › Contracts ›
5 [% IF ( contractnumber ) %]Modify contract '[% contractname %]'
6 [% ELSE %]New contract[% END %]
8 [% IF ( else ) %]Contracts of [% booksellername %][% END %]
9 [% IF ( add_validate ) %]Data recorded[% END %]
10 [% IF ( delete_confirm ) %]Confirm deletion of contract '[% contractnumber %]'[% END %]
11 [% IF ( delete_confirmed ) %]Contract deleted[% END %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% INCLUDE 'calendar.inc' %]
14 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
15 <script type="text/javascript">
17 // to check if the data are correctly entered.
20 var _alertString=_("Form not submitted because of the following problem(s)");
21 _alertString +="\n-------------------------------------------------------------------\n\n";
22 if (!(isNotNull(ff.contractname,0))){
24 _alertString += _("- Name missing") + "\n";
26 var startDate = Date_from_syspref($("#from").val());
27 var endDate = Date_from_syspref($("#to").val());
28 if (!parseInt(startDate.getTime())) {
30 _alertString += _("- Start date missing or invalid.") + "\n";
32 if (!parseInt(endDate.getTime())) {
34 _alertString += _("- End date missing or invalid.") + "\n";
37 if (startDate > endDate) {
39 _alertString += _("Wrong date! start date cannot be after end date.") + "\n";
41 if (endDate < (new Date)) {
43 _alertString += _("End date before today, Invalid end date!") + "\n";
45 if (ok) { // if there is a problem
55 <body id="acq_aqcontract" class="acq">
56 [% INCLUDE 'header.inc' %]
57 [% INCLUDE 'contracts-admin-search.inc' %]
59 <div id="breadcrumbs">
60 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
62 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
64 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a>
67 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a>
69 [% IF ( contractnumber ) %]Modify contract '[% contractname %]'
70 [% ELSE %]New contract
73 [% IF ( add_validate ) %]
74 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a>
75 › Data recorded
77 [% IF ( delete_confirm ) %]
78 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a>
79 › Confirm deletion of contract [% contractnumber %]
81 [% IF ( delete_confirmed ) %]
82 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a> › Contract deleted
84 [% IF ( else ) %]Contracts[% END %]
87 <div id="doc3" class="yui-t2">
93 [% INCLUDE 'acquisitions-toolbar.inc' %]
95 [% IF error == 'not_deleted' %]
96 <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
100 <form name="Aform" action="[% script_name %]" method="post">
101 <input type="hidden" name="op" value="add_validate" />
102 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
103 <input type="hidden" name="checked" value="0" />
104 [% IF ( contractnumber ) %]
105 <h1>Modify contract [% contractname %] for [% booksellername %]</h1>
107 <h1>New contract for [% booksellername %]</h1>
109 <fieldset class="rows">
111 [% IF ( contractnumber ) %]
112 <li><span class="label">Contract id </span>[% contractnumber %]
113 <input type="hidden" name="contractnumber" value="[% contractnumber %]" />
114 <input type="hidden" name="is_a_modif" value="1" />
117 <li><label for="contractname" class="required">Name: *</label>
118 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname %]" />
120 <li><label for="contractdescription">Description: </label>
121 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
123 <li><label for="from" class="required">Start date: *</label>
124 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="datepickerfrom" />
125 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
127 <li><label for="to" class="required">End date: *</label>
128 <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10" size="10" class="datepickerto" />
129 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
133 <fieldset class="action">
134 <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>
138 [% IF ( add_validate ) %]
139 <h3>Data recorded</h3>
140 <form action="[% script_name %]" method="post">
141 <input type="submit" value="OK" />
144 [% IF ( delete_confirm ) %]
145 <div class="dialog alert">
146 <h3>Confirm deletion of contract <i>[% contractname %]</i></h3>
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 | $KohaDates %]</td></tr>
152 <tr><th scope="row">Contract end date:</th><td>[% contractenddate | $KohaDates %]</td></tr>
153 <tr><th scope="row">Vendor:</th><td>[% booksellername %]</td></tr>
155 <form action="[% script_name %]" method="post">
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 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete contract</button>
161 <form action="/cgi-bin/koha/admin/aqcontract.pl" method="get">
162 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
163 <input type="hidden" name="contractnumber" value="[% contractnumber %]" />
164 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
168 [% IF ( delete_confirmed ) %]
169 <h3>Contract deleted</h3>
170 <form action="[% script_name %]" method="post">
171 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
172 <input type="submit" value="OK" />
176 <h2>Contract(s) of [% booksellername %]</h2>
180 <th scope="col">Name</th>
181 <th scope="col">Description</th>
182 <th scope="col">Start date</th>
183 <th scope="col">End date</th>
184 <th scope="col">Actions</th>
186 [% FOREACH loo IN loop %]
189 <a href="[% loo.script_name %]?op=add_form&booksellerid=[% loo.booksellerid %]&contractnumber=[% loo.contractnumber %]">[% loo.contractname %]</a>
191 <td>[% loo.contractdescription %]</td>
192 <td>[% loo.contractstartdate %]</td>
193 <td>[% loo.contractenddate %]</td>
195 <a href="[% loo.script_name %]?op=add_form&contractnumber=[% loo.contractnumber %]&booksellerid=[% loo.booksellerid %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
196 <a href="[% loo.script_name %]?op=delete_confirm&contractnumber=[% loo.contractnumber %]&booksellerid=[% loo.booksellerid %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
202 <div class="dialog message">
203 There are no contracts with this vendor.
205 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid %]">Add a contract</a>.
213 [% INCLUDE 'vendor-menu.inc' %]
216 [% INCLUDE 'intranet-bottom.inc' %]