The show_codes checkbox "name" is available in the preferences menu and gets stored in the users table.
The show_po_item_codes is present as an entry in the sys_prefs table. Under Setup => Banking and GL Setup => Show PO item codes can be checked, and we can then see the item_code printed out in the PO report (rep209.php).
In fixing this, we need to suppress the display of the Item Code heading if not chosen.
The class sys_prefs contains the method show_po_item_codes() which promptly returns the value from the sys_prefs table.
Hence, for now, change line 142 of reporting/rep209.php:
if ($SysPrefs->show_po_item_codes()) {
to be:
if ($SysPrefs->show_po_item_codes() || user_show_codes()) {
What is the logic behind this redundancy.....