Delimiter $$
/**
 * Author:  armen
 * Created: 28 juin 2018
 */

--  ReclaimsFull
Drop Procedure if Exists BUSINESS_COMPUTE_PUBLICVIEWS_RECLAIMS_FULL $$
Create Procedure BUSINESS_COMPUTE_PUBLICVIEWS_RECLAIMS_FULL ()
Begin
    Truncate Table TMP_V_PUBLIC_RECLAIMS_FULL_VIEW;

    Insert Into TMP_V_PUBLIC_RECLAIMS_FULL_VIEW (
        ID_RECLAIMS
		, ACCOUNTS_ID_ACCOUNTS
		, MEMBERS_ID_MEMBERS
		, RECLAIMS_CREATED
		, RECLAIMS_ORIGINAL_AMOUNT
		, RECLAIMS_IS_PARTIAL
		, RECLAIMS_IS_TMP
		, ID_RECLAIMS_DETAILS
		, ENTRIES_ID_ENTRIES
		, DF_RCLM_STT_ID_DF_RCLM_STT
		, DF_RCLM_ID_DF_RCLM
		, RECLAIMS_ID_RECLAIMS
		, RECLAIMS_DETAILS_OPINION
		, CONTACTS_ID_CONTACTS
		, RECLAIMS_DETAILS_LAST_UPDATE
		, RECLAIMS_DETAILS_BLOCKED
		, RECLAIMS_DETAILS_DEAD_LINE
		, RECLAIMS_DETAILS_CLOSED
		, RECLAIMS_DETAILS_AMOUNT
		, RECLAIMS_DETAILS_PREV_RECLAIM
		, RECLAIMS_DETAILS_IS_ACTIVE
		, RECLAIMS_DETAILS_IS_TMP
		, RECLAIMS_DETAILS_NOTES
		, ENTRIES_REF
		, ENTRIES_ENT_BALANCE
		, DF_CURRENCIES_CODE
		, ENTITIES_ID_ENTITIES
		, ID_ACCOUNTS
		, LANGUAGE_ID
		, OPINION_LABEL
		, DF_RECLAIMS_OPINION_LNG_LABEL
		, DF_RECLAIMS_STATUS_LNG_LABEL
		, DF_RECLAIMS_LNG_LABEL
		, DF_RECLAIMS_CODE
		, DF_RECLAIMS_FULL_LABEL
		, MEMBERS_FULL_NAME
		, RESOL_OWNER_NAME
 
    )
    Select 
        ID_RECLAIMS
		, ACCOUNTS_ID_ACCOUNTS
		, MEMBERS_ID_MEMBERS
		, RECLAIMS_CREATED
		, RECLAIMS_ORIGINAL_AMOUNT
		, RECLAIMS_IS_PARTIAL
		, RECLAIMS_IS_TMP
		, ID_RECLAIMS_DETAILS
		, ENTRIES_ID_ENTRIES
		, DF_RCLM_STT_ID_DF_RCLM_STT
		, DF_RCLM_ID_DF_RCLM
		, RECLAIMS_ID_RECLAIMS
		, RECLAIMS_DETAILS_OPINION
		, CONTACTS_ID_CONTACTS
		, RECLAIMS_DETAILS_LAST_UPDATE
		, RECLAIMS_DETAILS_BLOCKED
		, RECLAIMS_DETAILS_DEAD_LINE
		, RECLAIMS_DETAILS_CLOSED
		, RECLAIMS_DETAILS_AMOUNT
		, RECLAIMS_DETAILS_PREV_RECLAIM
		, RECLAIMS_DETAILS_IS_ACTIVE
		, RECLAIMS_DETAILS_IS_TMP
		, RECLAIMS_DETAILS_NOTES
		, ENTRIES_REF
		, ENTRIES_ENT_BALANCE
		, DF_CURRENCIES_CODE
		, ENTITIES_ID_ENTITIES
		, ID_ACCOUNTS
		, LANGUAGE_ID
		, OPINION_LABEL
		, DF_RECLAIMS_OPINION_LNG_LABEL
		, DF_RECLAIMS_STATUS_LNG_LABEL
		, DF_RECLAIMS_LNG_LABEL
		, DF_RECLAIMS_CODE
		, DF_RECLAIMS_FULL_LABEL
		, MEMBERS_FULL_NAME
		, RESOL_OWNER_NAME
 
    From V_PUBLIC_RECLAIMS_FULL_VIEW ;
End $$
Delimiter ;


