Bug 36789: Transform a booking into checkout
Directly from the bookings list, you can perform a checkout with booked item. Test plan: 1) Got an item booked :) 2) Click on transform to checkout 3) Normally you will be redirected to circulation.pl checkout view with form infos from booking. 4) If issue is confirmed, the booking will be completed. Sponsored-by: Association de Gestion des Œuvres Sociales d'Inria (AGOS) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
dd73f9b0ce
commit
8efe9aee5c
|
|
@ -401,6 +401,25 @@
|
|||
escape_str(row.booking_id),
|
||||
_("Cancel")
|
||||
);
|
||||
result += `
|
||||
<form name="checkout-transform" method="post" action="/cgi-bin/koha/circ/circulation.pl?borrowernumber=%s">
|
||||
<input type="hidden" name="op" value="cud-checkout"/>
|
||||
<input type="hidden" name="borrowernumber" value="%s"/>
|
||||
<input type="hidden" name="barcode" value="%s"/>
|
||||
<input type="hidden" name="duedatespec" value="%s"/>
|
||||
<input type="hidden" name="booking_id" value="%s"/>
|
||||
<button id="checkout_action" class="btn btn-default btn-xs" type="submit">
|
||||
%s
|
||||
</button>
|
||||
</form>
|
||||
`.format(
|
||||
escape_str(row.patron_id),
|
||||
escape_str(row.patron_id),
|
||||
escape_str(row.item.external_id),
|
||||
escape_str(row.end_date),
|
||||
escape_str(row.booking_id),
|
||||
_("Transform to checkout")
|
||||
);
|
||||
}
|
||||
[% END %]
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue