Lines 56-61
Link Here
|
56 |
[% ELSE %] |
56 |
[% ELSE %] |
57 |
<th></th> |
57 |
<th></th> |
58 |
[% END %] |
58 |
[% END %] |
|
|
59 |
<th>Order line</th> |
59 |
<th class="title-string">Order date</th> |
60 |
<th class="title-string">Order date</th> |
60 |
<th class="title-string">Estimated delivery date</th> |
61 |
<th class="title-string">Estimated delivery date</th> |
61 |
<th>Vendor</th> |
62 |
<th>Vendor</th> |
Lines 67-72
Link Here
|
67 |
<th>Fund</th> |
68 |
<th>Fund</th> |
68 |
<th>Claims count</th> |
69 |
<th>Claims count</th> |
69 |
<th class="title-string">Claimed date</th> |
70 |
<th class="title-string">Claimed date</th> |
|
|
71 |
<th>Internal note</th> |
72 |
<th>Vendor note</th> |
73 |
<th>ISBN</th> |
70 |
</tr> |
74 |
</tr> |
71 |
</thead> |
75 |
</thead> |
72 |
<tbody> |
76 |
<tbody> |
Lines 76-81
Link Here
|
76 |
<input type="checkbox" value="[% lateorder.ordernumber | html %]" data-booksellerid="[% lateorder.supplierid | html %]" name="ordernumber"> |
80 |
<input type="checkbox" value="[% lateorder.ordernumber | html %]" data-booksellerid="[% lateorder.supplierid | html %]" name="ordernumber"> |
77 |
</td> |
81 |
</td> |
78 |
<td> |
82 |
<td> |
|
|
83 |
[% lateorder.ordernumber | $raw %] |
84 |
</td> |
85 |
<td> |
79 |
<span title="[% lateorder.orderdate | html %]">[% lateorder.orderdate | $KohaDates %] ([% lateorder.latesince | html %] days)</span> |
86 |
<span title="[% lateorder.orderdate | html %]">[% lateorder.orderdate | $KohaDates %] ([% lateorder.latesince | html %] days)</span> |
80 |
</td> |
87 |
</td> |
81 |
<td> |
88 |
<td> |
Lines 131-144
Link Here
|
131 |
<span title="0000-00-00"></span> |
138 |
<span title="0000-00-00"></span> |
132 |
[% END %] |
139 |
[% END %] |
133 |
</td> |
140 |
</td> |
|
|
141 |
<td><input name="internalnote" id="internalnote" type="text" value="[% lateorder.internalnote | html %]"></td> |
142 |
<td><input name="vendornote" id="vendornote" type="text" value="[% lateorder.vendornote | html %]"></td> |
143 |
<td>[% lateorder.isbn | $raw %]</td> |
134 |
</tr> |
144 |
</tr> |
135 |
[% END %] |
145 |
[% END %] |
136 |
</tbody> |
146 |
</tbody> |
137 |
<tfoot> |
147 |
<tfoot> |
138 |
<tr> |
148 |
<tr> |
139 |
<th colspan="5">Total</th> |
149 |
<th colspan="6">Total</th> |
140 |
<th>[% total | html %]</th> |
150 |
<th>[% total | html %]</th> |
141 |
<th colspan="6"> </th> |
151 |
<th colspan="9"> </th> |
142 |
</tr> |
152 |
</tr> |
143 |
</tfoot> |
153 |
</tfoot> |
144 |
</table> |
154 |
</table> |
Lines 149-154
Link Here
|
149 |
[% UNLESS lateorder.budget_lock %] |
159 |
[% UNLESS lateorder.budget_lock %] |
150 |
<input type="submit" value="Claim order" /> |
160 |
<input type="submit" value="Claim order" /> |
151 |
[% END %] |
161 |
[% END %] |
|
|
162 |
<input type="button" value="Save notes" id="savenotes"/> |
152 |
</p> |
163 |
</p> |
153 |
</form> |
164 |
</form> |
154 |
[% ELSE %]<p>There are no late orders.</p> |
165 |
[% ELSE %]<p>There are no late orders.</p> |
Lines 252-257
Link Here
|
252 |
location.href = url; |
263 |
location.href = url; |
253 |
return false; |
264 |
return false; |
254 |
}); |
265 |
}); |
|
|
266 |
// Update all notes |
267 |
$("#savenotes").click(function(){ |
268 |
$("#savenotes").after("<span id=\"loading\" style=\"margin:4px;\"><img src=\"[% interface | html %]/[% theme | html %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</span>"); |
269 |
var all_nodes = $(late_orderst.fnGetNodes()); |
270 |
var req = new XMLHttpRequest(); |
271 |
var url = '/cgi-bin/koha/acqui/lateorders.pl'; |
272 |
var data = new FormData(); |
273 |
data.append("op","save"); |
274 |
for (var i = 0; i < all_nodes.length; i++) { |
275 |
var order = $(all_nodes[i]).find("input[name='ordernumber']"); |
276 |
var internalnote = $(all_nodes[i]).find("input[name='internalnote']")[0].value; |
277 |
var vendornote = $(all_nodes[i]).find("input[name='vendornote']")[0].value; |
278 |
var internalnote_key = order[0].value + "_i"; |
279 |
var vendornote_key = order[0].value + "_v"; |
280 |
data.append(internalnote_key, internalnote); |
281 |
data.append(vendornote_key, vendornote); |
282 |
} |
283 |
|
284 |
req.open("POST",url); |
285 |
req.send(data); |
286 |
req.onreadystatechange = function () { |
287 |
$("#loading").remove(); |
288 |
if (req.readyState == '4' ){ |
289 |
if ( req.status == 200 ){ |
290 |
alert(_("Notes successfully saved")); |
291 |
} |
292 |
else { |
293 |
alert(_("Error while saving the notes. Please try again")); |
294 |
} |
295 |
} |
296 |
} |
297 |
}); |
255 |
}); |
298 |
}); |
256 |
</script> |
299 |
</script> |
257 |
[% END %] |
300 |
[% END %] |
258 |
- |
|
|