Fix item custom field values when item custom field has a value
When the custom field has a value for any item in the organization, it was no longer returned for any items that do not have a value for that custom field. This change makes it so that custom fields that apply to all categories will only be joined with the item custom field table if the current item's barcode matches. Using a second on clause in the join is a better approach than using two where clauses.
Fix item custom field values when item custom field has a value
When the custom field has a value for any item in the organization, it was no longer returned for any items that do not have a value for that custom field. This change makes it so that custom fields that apply to all categories will only be
join
ed with the item custom field table if the current item's barcode matches. Using a secondon
clause in thejoin
is a better approach than using twowhere
clauses.