Bug 5343: Followup FIX quantity received if items are created when receiving
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 20 Mar 2013 09:55:49 +0000 (10:55 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 23 Mar 2013 03:54:46 +0000 (23:54 -0400)
For subscriptions, if items are created when receiving, the quantity
received is always 1, not 0.

+ UI: Show the subscription search form (instead of hidden)

Signed-off-by: Leila Arkab <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt

index 38dc638..4ca5e31 100644 (file)
@@ -34,6 +34,8 @@
         });
         $("#show_only_renewed").attr('checked', false);
         updateRowsVisibility(false);
+
+        $("#advsearch_form").show();
     });
  //]]>
 </script>
index 5ee0ec2..9e16755 100644 (file)
@@ -122,7 +122,7 @@ function IEEventHandler_KeyDown() {
     $(document).ready(function() {
         [% IF (AcqCreateItemReceiving) %]
             cloneItemBlock(0, '[% UniqueItemFields %]');
-        [% ELSIF (AcqCreateItem == 'ordering') %]
+        [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
             $("input[name='items_to_receive']").change(function() {
                 CalcQtyToReceive();
             });
@@ -304,7 +304,11 @@ function IEEventHandler_KeyDown() {
            </span></li>
         <li><label for="quantity">Quantity received: </label>
           [% IF (AcqCreateItemReceiving) %]
-            <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
+            [% IF ( subscriptionid ) %]
+              <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="1" />
+            [% ELSE %]
+              <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
+            [% END %]
           [% ELSE %]
             [% IF ( quantityreceived ) %]
                 [% IF ( edit ) %]