Bugzilla – Attachment 13764 Details for
Bug 9126
Receiving orders create too much items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9126: Do not return from Check too early.
Bug-9126-Do-not-return-from-Check-too-early.patch (text/plain), 2.57 KB, created by
Jonathan Druart
on 2012-11-29 13:38:19 UTC
(
hide
)
Description:
Bug 9126: Do not return from Check too early.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-11-29 13:38:19 UTC
Size:
2.57 KB
patch
obsolete
>From 8654b7ebed76aaf731adbc757b465aa0244ec1f3 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 21 Nov 2012 17:38:28 +0100 >Subject: [PATCH] Bug 9126: Do not return from Check too early. > >If there is no errors, it should continue instead of returning true. > >+ move a block of code at the end of Check function. This avoid >detaching and re-attaching a HTML block if there are errors. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >The following queries show us the issues: >select count(*) from items; >select * from aqorders_items where ordernumber=XX; >--- > .../prog/en/modules/acqui/orderreceive.tt | 20 +++++++------------- > 1 file changed, 7 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 79811bd..73dad75 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -18,17 +18,19 @@ > } > }); > >- var alertString; >- if (total_errors==0) { >- return true; >- } else { >- alertString = _("Form not submitted because of the following problem(s)"); >+ if (total_errors != 0) { >+ var alertString = _("Form not submitted because of the following problem(s)"); > alertString += "\n------------------------------------------------------------------------------------\n"; > alertString += "\n- "+ total_errors+_(" mandatory fields empty (highlighted)"); > alert(alertString); > return false; > } > >+ if(check_additem('[% UniqueItemFields %]') == false){ >+ alert(_('Duplicate values detected. Please correct the errors and resubmit.') ); >+ return false; >+ }; >+ > // Remove last itemblock if it is not in items_list > var lastitemblock = $("#outeritemblock > div:last"); > var tobedeleted = true; >@@ -41,14 +43,6 @@ > if(tobedeleted){ > $(lastitemblock).remove(); > } >- >- if(check_additem('[% UniqueItemFields %]') == false){ >- alert(_('Duplicate values detected. Please correct the errors and resubmit.') ); >- if(tobedeleted) { >- $(lastitemblock).appendTo("#outeritemblock"); >- } >- return false; >- }; > [% END %] > > return true; >-- >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 9126
:
13601
|
13764
|
14290
|
14574