Lines 46-52
$(document).ready(function() {
Link Here
|
46 |
'invoicenumber': $(row).find('td:nth-child(2) a').text(), |
46 |
'invoicenumber': $(row).find('td:nth-child(2) a').text(), |
47 |
'shipmentdate': $(row).attr('data-shipmentdate'), |
47 |
'shipmentdate': $(row).attr('data-shipmentdate'), |
48 |
'billingdate': $(row).attr('data-billingdate'), |
48 |
'billingdate': $(row).attr('data-billingdate'), |
49 |
'shipmentcost': $(row).attr('data-shipmentcost'), |
49 |
'shipping': $(row).attr('data-shipping'), |
50 |
'shipment_budgetid': $(row).attr('data-shipment_budgetid'), |
50 |
'shipment_budgetid': $(row).attr('data-shipment_budgetid'), |
51 |
'closedate': $(row).attr('data-closedate'), }); |
51 |
'closedate': $(row).attr('data-closedate'), }); |
52 |
$('#merge_invoice_form').append('<input type="hidden" name="merge" value="' + $(row).attr('data-invoiceid') + '" />'); |
52 |
$('#merge_invoice_form').append('<input type="hidden" name="merge" value="' + $(row).attr('data-invoiceid') + '" />'); |
Lines 56-68
$(document).ready(function() {
Link Here
|
56 |
} else { |
56 |
} else { |
57 |
$('#merge_table tbody').empty(); |
57 |
$('#merge_table tbody').empty(); |
58 |
$.each(invoices, function (idx, invoice) { |
58 |
$.each(invoices, function (idx, invoice) { |
59 |
var row = $('<tr data-invoiceid="' + invoice.invoiceid + '"><td>' + invoice.invoicenumber + '</td><td>' + invoice.shipmentdate + '</td><td>' + invoice.billingdate + '</td><td>' + invoice.shipmentcost + '</td></tr>'); |
59 |
var row = $('<tr data-invoiceid="' + invoice.invoiceid + '"><td>' + invoice.invoicenumber + '</td><td>' + invoice.shipmentdate + '</td><td>' + invoice.billingdate + '</td><td>' + invoice.shipping + '</td></tr>'); |
60 |
$(row).appendTo('#merge_table tbody'); |
60 |
$(row).appendTo('#merge_table tbody'); |
61 |
$(row).click(function () { |
61 |
$(row).click(function () { |
62 |
$('#merge_table tbody tr').removeClass('active'); |
62 |
$('#merge_table tbody tr').removeClass('active'); |
63 |
$(this).addClass('active'); |
63 |
$(this).addClass('active'); |
64 |
$('#merge_invoicenumber').text(invoice.invoicenumber); |
64 |
$('#merge_invoicenumber').text(invoice.invoicenumber); |
65 |
$.each(['invoiceid', 'shipmentdate', 'billingdate', 'shipmentcost', 'shipment_budgetid'], function (idx, prop) { |
65 |
$.each(['invoiceid', 'shipmentdate', 'billingdate', 'shipping', 'shipment_budgetid'], function (idx, prop) { |
66 |
$('#merge_' + prop).val(invoice[prop]); |
66 |
$('#merge_' + prop).val(invoice[prop]); |
67 |
}); |
67 |
}); |
68 |
if (invoice.closedate) { |
68 |
if (invoice.closedate) { |
Lines 115-121
$(document).ready(function() {
Link Here
|
115 |
</thead> |
115 |
</thead> |
116 |
<tbody> |
116 |
<tbody> |
117 |
[% FOREACH invoice IN invoices %] |
117 |
[% FOREACH invoice IN invoices %] |
118 |
<tr data-invoiceid="[% invoice.invoiceid %]" data-booksellerid="[% invoice.booksellerid %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipmentcost="[% invoice.shipmentcost %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid %]" data-closedate="[% invoice.closedate | $KohaDates %]"> |
118 |
<tr data-invoiceid="[% invoice.invoiceid %]" data-booksellerid="[% invoice.booksellerid %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipping="[% invoice.shipping %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid %]" data-closedate="[% invoice.closedate | $KohaDates %]"> |
119 |
<td>[% invoice.is_linked_to_subscriptions %]</td> |
119 |
<td>[% invoice.is_linked_to_subscriptions %]</td> |
120 |
<td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]" /></td> |
120 |
<td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]" /></td> |
121 |
<td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td> |
121 |
<td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td> |
Lines 177-184
$(document).ready(function() {
Link Here
|
177 |
<li><label for="merge_billingdate">Billing date:</label> |
177 |
<li><label for="merge_billingdate">Billing date:</label> |
178 |
<input type="text" size="10" id="merge_billingdate" name="billingdate" value="" readonly="readonly" class="datepicker" /></li> |
178 |
<input type="text" size="10" id="merge_billingdate" name="billingdate" value="" readonly="readonly" class="datepicker" /></li> |
179 |
|
179 |
|
180 |
<li><label for="merge_shipmentcost">Shipment cost:</label> |
180 |
<li><label for="merge_shipping">Shipping:</label> |
181 |
<input type="text" size="10" id="merge_shipmentcost" name="shipmentcost" value="" /></li> |
181 |
<input type="text" size="10" id="merge_shipping" name="shipping" value="" /></li> |
182 |
<li><label for="merge_shipment_budgetid">Fund:</label> |
182 |
<li><label for="merge_shipment_budgetid">Fund:</label> |
183 |
<select id="merge_shipment_budgetid" name="shipment_budget_id"> |
183 |
<select id="merge_shipment_budgetid" name="shipment_budget_id"> |
184 |
<option value="">No fund</option> |
184 |
<option value="">No fund</option> |