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