X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fjs%2Fadditem.js;h=2c15b047791a274873f518de24bc474732ff9805;hb=8a53d284907bbbe9d3ee2552e964af9f5dfbd0ac;hp=859fe024fe0d30b2291033d772fbb8d288f51c4a;hpb=3de13a0f6d711eeeaad1400ea1277028ce5e1f9f;p=koha.git diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js index 859fe024fe..2c15b04779 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js @@ -13,7 +13,7 @@ function addItem( node, unique_item_fields ) { cloneItemBlock(index, unique_item_fields); addItemInList(index, unique_item_fields); $("#" + index).find("a[name='buttonPlus']").text("Update"); - $("#quantity").val(current_qty + 1); + $("#quantity").val(current_qty + 1).change(); } else if ( current_qty >= max_qty ) { alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS || "You can't receive any more items."); @@ -65,6 +65,9 @@ function constructTrNode(index, unique_item_fields) { } else { field_value = $(field_elt).val(); } + if (field_value == undefined) { + field_value = ''; + } result += "