Bugzilla – Attachment 125825 Details for
Bug 20119
Ability to print claims for late orders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20119: Add option to update claims count and claim date
Bug-20119-Add-option-to-update-claims-count-and-cl.patch (text/plain), 3.52 KB, created by
Alex Arnaud
on 2021-10-06 14:48:24 UTC
(
hide
)
Description:
Bug 20119: Add option to update claims count and claim date
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2021-10-06 14:48:24 UTC
Size:
3.52 KB
patch
obsolete
>From 934074eef66defde5354ab6621142f1b71b28ac4 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 6 Oct 2021 16:46:42 +0200 >Subject: [PATCH] Bug 20119: Add option to update claims count and claim date > >--- > acqui/lateorders.pl | 4 +++ > .../prog/en/modules/acqui/lateorders.tt | 30 +++++++++++++++++++--- > 2 files changed, 31 insertions(+), 3 deletions(-) > >diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl >index a5d0db1..1d6f8fc 100755 >--- a/acqui/lateorders.pl >+++ b/acqui/lateorders.pl >@@ -121,7 +121,11 @@ if ($op and $op eq "send_alert"){ > > if ($op and $op eq "print_alert") { > my @orderids = $input->multi_param('ordernumber'); >+ my $increment_claims = $input->param('claim-increment'); > >+ if ( $increment_claims ) { >+ Koha::Acquisition::Orders->find($_)->claim() for @orderids; >+ } > my $pdf = C4::Letters::PrintClaimOrderNotice(\@orderids, 'ACQCLAIM'); > print $input->header( > -type => 'application/pdf', >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index 186fd34..163286d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -213,7 +213,7 @@ > </div> > > <input type="submit" class="btn btn-default" value="Claim order" /> >- <input type="button" value="Print claim" id="print-claim" /> >+ <input type="button" value="Print claim" id="print-claim" data-toggle="modal" data-target="#print-claim-confirm"/> > </fieldset> > </form> > [% ELSE %]<p>There are no late orders.</p> >@@ -285,6 +285,26 @@ > </div> > </div> > >+<!-- Modal for to confirm claims printing. --> >+<div class="modal" tabindex="-1" role="dialog" id="print-claim-confirm"> >+ <div class="modal-dialog" role="document"> >+ <div class="modal-content"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h4 class="modal-title">Print claim</h4> >+ </div> >+ <div class="modal-body"> >+ <input type="checkbox" id="claim-increment" name="claim-increment"> >+ <label for="claim-increment">Update claims count and claimed date ?</label> >+ </div> >+ <div class="modal-footer"> >+ <button type="button" id="print-claim-confirmed" class="btn btn-default approve">Print</button> >+ <button type="button" class="btn btn-default deny" data-dismiss="modal">Cancel</button> >+ </div> >+ </div><!-- /.modal-content --> >+ </div><!-- /.modal-dialog --> >+</div><!-- /.modal --> >+ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >@@ -371,13 +391,17 @@ > $("#type").val(""); > }); > >- $('#print-claim').on('click', function(e) { >+ $('#print-claim-confirmed').on('click', function(e) { > e.preventDefault(); >- var form = $(this).parents('form') >+ var form = $('form[name="claim"]'); > var op = form.find('input[name="op"]'); >+ if( $('#claim-increment').is(':checked') ){ >+ form.append('<input type="hidden" name="claim-increment" value="1"/>'); >+ } > > op.val('print_alert'); > form.submit(); >+ $('#print-claim-confirm').modal('hide'); > op.val('send_alert'); > }); > }); >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20119
:
71106
|
71107
|
71150
|
71151
|
72928
|
72929
|
72944
|
72945
|
125823
|
125824
| 125825