<reponame>jehboyes/planning_system<filename>planning_system/db/schema/views/finance/v_input_inc_other.py

from planning_system.db.schema.views import ACCOUNT_DESCRIPTION, p_list_string, p_sum_string


def definition():
    """Other income view"""
    view = f"""
    SELECT i.inc_id, i.account, a.description as account_name, {ACCOUNT_DESCRIPTION}, i.description, i.set_id,
    {p_list_string}, {p_sum_string} as amount
    FROM input_inc_other i
    LEFT OUTER JOIN fs_account a ON i.account = a.account"""
    return view

from planning_system.db.schema.views import ACCOUNT_DESCRIPTION, p_list_string, p_sum_string


def definition():
    """Other income view"""
    view = f"""
    SELECT i.inc_id, i.account, a.description as account_name, {ACCOUNT_DESCRIPTION}, i.description, i.set_id,
    {p_list_string}, {p_sum_string} as amount
    FROM input_inc_other i
    LEFT OUTER JOIN fs_account a ON i.account = a.account"""
    return view
Other income view SELECT i.inc_id, i.account, a.description as account_name, {ACCOUNT_DESCRIPTION}, i.description, i.set_id,     {p_list_string}, {p_sum_string} as amount     FROM input_inc_other i     LEFT OUTER JOIN fs_account a ON i.account = a.account