<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Leaf Generator
    $Date: Wed Sep 19 16:50:08 CST 2018  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_PRICE_LIST" needAccessControl="false">
    <bm:fields>
        <bm:field name="price_list" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRICE_LIST" prompt="HLS_PRICE_LIST.PRICE_LIST" forDisplay="true" forQuery="true"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS_PRICE_LIST.DESCRIPTION" forDisplay="true" forQuery="true"/>
    </bm:fields>
    <bm:features>
        <f:standard-who xmlns:f="leaf.database.features"/>
    </bm:features>
    <bm:operations>
            <bm:operation name="update">
                <bm:update-sql><![CDATA[
                BEGIN
                UPDATE HLS_DOC_LAYOUT_CONFIG C
                SET C.CLOB_VALIDATION_SQL = 'SELECT * FROM
                                    (SELECT L.PRICE_LIST AS VALUE_CODE, L.DESCRIPTION AS VALUE_NAME
                                       FROM HLS_PRICE_LIST L
                                      WHERE l.enabled_flag='  || '''Y''' ||
                                      '  AND L.CALC_USAGE=' || '''NORMAL''' ||  '
                                      AND L.PRICE_LIST IN (''' ||'DS_PRICE_30'||''','''||'DS_PRICE_40'||''','''||'DS_PRICE_50'||''')  ) t'   WHERE C.LAYOUT_CODE = 'CONTRACT_CASE1'
                AND TAB_CODE = 'LEASE_FIN_INFO_1' and c.column_name = 'PRICE_LIST';
                END;
                ]]></bm:update-sql>
            </bm:operation>
        </bm:operations>
</bm:model>