Bugzilla – Attachment 11577 Details for
Bug 7583
undo receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7583 follow-up: Prevent users to cancel receipt if they can't
0002-Bug-7583-follow-up-Prevent-users-to-cancel-receipt-i.patch (text/plain), 4.46 KB, created by
Julian Maurice
on 2012-08-13 14:41:48 UTC
(
hide
)
Description:
Bug 7583 follow-up: Prevent users to cancel receipt if they can't
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-08-13 14:41:48 UTC
Size:
4.46 KB
patch
obsolete
>From e92602b3c4b7f038d66ae9043609eba7d1771f63 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 13 Aug 2012 16:34:35 +0200 >Subject: [PATCH 2/2] Bug 7583 follow-up: Prevent users to cancel receipt if > they can't > >Disable the link for cancelling instead of displaying an error message >after the click. This is only valid if parent order line is received, >not if it's deleted. >When the user gets his mouse over the disabled link, he gets a message >telling him which order (ordernumber) blocks him so he knows immediately >which receipt to cancel. >Also improve error messages for non technical people >--- > acqui/parcel.pl | 10 ++++++- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 29 ++++++++++++++++---- > 2 files changed, 33 insertions(+), 6 deletions(-) > >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index 548e9c4..3734198 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -186,7 +186,6 @@ for (my $i = 0 ; $i < $countlines ; $i++) { > $line{gst} = $gst; > $line{total} = sprintf($cfstr, $total); > $line{booksellerid} = $booksellerid; >- push @loop_received, \%line; > $totalprice += $parcelitems[$i]->{'unitprice'}; > $line{unitprice} = sprintf($cfstr, $parcelitems[$i]->{'unitprice'}); > >@@ -195,6 +194,15 @@ for (my $i = 0 ; $i < $countlines ; $i++) { > $line{surnamesuggestedby} = $suggestion->{surnamesuggestedby}; > $line{firstnamesuggestedby} = $suggestion->{firstnamesuggestedby}; > >+ if ( $line{parent_ordernumber} != $line{ordernumber} ) { >+ if ( grep { $_->{ordernumber} == $line{parent_ordernumber} } >+ @parcelitems ) >+ { >+ $line{cannot_cancel} = 1; >+ } >+ } >+ >+ push @loop_received, \%line; > #double FIXME - totalfreight is redefined later. > > # FIXME - each order in a parcel holds the freight for the whole parcel. This means if you receive a parcel with items from multiple budgets, you'll see the freight charge in each budget.. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index 70fd74a..7abc106 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -229,11 +229,15 @@ > Cannot cancel receipt. Possible reasons : > <ul> > <li> >- You are trying to cancel the receipt of an order line whose parent >- order line is already received. Cancel this parent order line and >- retry. >+ The order line you trying to cancel was created from a partial receipt >+ of another order line which is already received. Try to cancel this >+ one first and retry. >+ </li> >+ <li> >+ The order line you trying to cancel was created from a partial receipt >+ of another order line which has been deleted. Cancellation is not >+ possible. > </li> >- <li>Parent order line has been deleted.</li> > </ul> > </div> > [% END %] >@@ -420,7 +424,22 @@ > <td>[% loop_receive.ecost %]</td> > <td>[% loop_receive.unitprice %]</td> > <td>[% loop_receive.total %]</td> >- <td><a href="/cgi-bin/koha/acqui/parcel.pl?invoice=[% loop_receive.invoice %]&booksellerid=[% booksellerid %]&datereceived=[% datereceived %]&op=cancelreceipt&ordernumber=[% loop_receive.ordernumber %]">Cancel receipt</a></td> >+ <td> >+ [% IF (loop_receive.cannot_cancel) %] >+ [% span_title = BLOCK %] >+ Cannot cancel receipt of this order line because it >+ was created from a partial receipt of order line no. >+ [% loop_receive.parent_ordernumber %], which is >+ already received. Try cancelling this one first and >+ retry. >+ [% END %] >+ <span title="[% span_title | collapse %]"> >+ Can't cancel receipt >+ </span> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/acqui/parcel.pl?invoice=[% loop_receive.invoice %]&booksellerid=[% booksellerid %]&datereceived=[% datereceived %]&op=cancelreceipt&ordernumber=[% loop_receive.ordernumber %]">Cancel receipt</a> >+ [% END %] >+ </td> > </tr> > [% END %] > </tbody> >-- >1.7.10.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 7583
:
11439
|
11547
|
11577
|
11590
|
12037
|
12038
|
12169
|
12170