cf_line_item(line_item, code)

Function name Description
cf_line_item(line_item, code) Returns the value of custom fields stored against a line_item (Invoice item in the configuration of Smile) in the line_item view.
Parameter name Description
line_item The line_item for which you wish to retrieve the custom fields.
code The code of the custom field you wish to retrieve.

The cf_line_item(line_item, code) function returns a specific custom field for a given line_item.

For example, to list the value of a specific invoice line item, you could use:

SELECT smile02.cf_line_item(line_item, 'serialNumber');
        code        |      value
 -------------------+-------------------
 serialNumber       | PH0901-123456