Delimiter $$
/**
 * Author:  armen
 * Created: 21 juin 2018
 */
--  AccountsSummaries
Drop Procedure if Exists BUSINESS_COMPUTE_PUBLICVIEWS_ACCOUNTS_SUMMARIES $$
Create Procedure BUSINESS_COMPUTE_PUBLICVIEWS_ACCOUNTS_SUMMARIES ()
Begin
    Truncate Table TMP_V_PUBLIC_ACCOUNTS_SUMMARIES_VIEW;

    Insert Into TMP_V_PUBLIC_ACCOUNTS_SUMMARIES_VIEW (
        ID_SUMMARIES
        , ACCOUNTS_ID_ACCOUNTS
        , DF_SUMMARIES_ID_DF_SUMMR
        , DF_SUMMARIES_CODE
        , DF_SUMMARIES_DISPLAY_SEQ
        , DF_SUMMARIES_BACKGROUND_COLOR
        , DF_SUMMARIES_FONT_COLOR
        , DF_SUMMARIES_TYPE
        , DF_SUMMARIES_CATEGORY_CODE
        , DF_SUMMARIES_END_TREATMENT
        , DF_SUMMARIES_INTERNAL
        , DF_PRIORITY_ID_DF_PRIORITY
        , DF_PRIORITY_LEVEL
        , SUMMARIES_MEMBER_AUTHOR
        , CONTACTS_REF
        , SUMMARIES_DATE
        , SUMMARIES_SUBJECT
        , SUMMARIES_COMMENTS
        , SUMMARIES_OUTSTANDING
        , SUMMARIES_OVERDUE
        , SUMMARIES_LABEL
    )
    Select 
        ID_SUMMARIES
        , ACCOUNTS_ID_ACCOUNTS
        , DF_SUMMARIES_ID_DF_SUMMR
        , DF_SUMMARIES_CODE
        , DF_SUMMARIES_DISPLAY_SEQ
        , DF_SUMMARIES_BACKGROUND_COLOR
        , DF_SUMMARIES_FONT_COLOR
        , DF_SUMMARIES_TYPE
        , DF_SUMMARIES_CATEGORY_CODE
        , DF_SUMMARIES_END_TREATMENT
        , DF_SUMMARIES_INTERNAL
        , DF_PRIORITY_ID_DF_PRIORITY
        , DF_PRIORITY_LEVEL
        , SUMMARIES_MEMBER_AUTHOR
        , CONTACTS_REF
        , SUMMARIES_DATE
        , SUMMARIES_SUBJECT
        , SUMMARIES_COMMENTS
        , SUMMARIES_OUTSTANDING
        , SUMMARIES_OVERDUE
        , SUMMARIES_LABEL
    From V_PUBLIC_ACCOUNTS_SUMMARIES_VIEW ;
End $$
Delimiter ;


