Bug 10388: Does not display 'null' after editing an item on receiving

After editing an item on receiving, 'null' is displayed if no value is
defined for a field. It should be blank.

Test plan:
0/ Set AcqCreateItem to 'ordering'
1/ Go on the receipt page page
2/ Edit an item
3/ Does not fill all values
4/ Confirm that undefined values are replaced with an empty string

NOTE: I think you meant receive. Editing requires at least clicking
      the dropdown value, even if you don't change it before
      clicking save. null's appeared. Post patch application was
      able to get nulls to disappear. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Jonathan Druart 2015-04-07 17:03:46 +02:00 committed by Tomas Cohen Arazi
parent ca167b32b4
commit 65405c5a96

View file

@ -69,7 +69,9 @@
var tds = $("#item_"+itemnumber+" td");
for(var i=2; i<tds.length; i++) {
var column = items_columns[i];
$(tds[i]).text(item[column]);
var text = item[column];
if ( text == null ) text = '';
$(tds[i]).text(text);
}
}
);