Merge branch 'bug_8557' into 3.12-master
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / orderreceive.tt
index f805e16..e88f9ce 100644 (file)
@@ -37,17 +37,19 @@ function IEEventHandler_KeyDown() {
                 }
             });
 
-            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;
@@ -60,14 +62,6 @@ function IEEventHandler_KeyDown() {
             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;
@@ -196,8 +190,8 @@ function IEEventHandler_KeyDown() {
                             <th>&nbsp;</th>
                             <th>&nbsp;</th>
                             <th>Barcode</th>
-                            <th>Home branch</th>
-                            <th>Holding branch</th>
+                            <th>Home library</th>
+                            <th>Holding library</th>
                             <th>Not for loan</th>
                             <th>Restricted</th>
                             <th>Location</th>
@@ -345,28 +339,7 @@ function IEEventHandler_KeyDown() {
         <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Cancel</a>
 </fieldset></div>    </form>
 [% ELSE %]
-<div id="acqui_acquire_orderlist">
-    <table>
-    <tr>
-        <th>Basket</th>
-        <th>ISBN</th>
-        <th>Title</th>
-        <th>Author</th>
-        <th>Qty</th>
-        <th>Received</th>
-    </tr>
-    [% FOREACH loo IN loop %]
-        <tr>
-            <td>[% loo.basketno %]</td>
-            <td>[% loo.isbn %]</td>
-         <td><a href="orderreceive.pl?ordernumber=[% loo.ordernumber %]&amp;invoiceid=[% invoiceid %]">[% loo.title |html %]</a></td>
-            <td>[% loo.author %]</td>
-            <td>[% loo.quantity %]</td>
-            <td>[% loo.quantityreceived %]</td>
-        </tr>
-    [% END %]
-    </table>
-</div>
+    This ordernumber does not exist.
 [% END %]
 
 </div>