InovacaoMediaBrasil/ProcessWorkflowsAndDatabaseScripts

View on GitHub
Src/Sankhya/Construtores de Componentes de BI/129.COMERCIAL_CANCELADOS_VALORTOTAL.xml

Summary

Maintainability
Test Coverage
<gadget>
    <prompt-parameters>
        <parameter id="DTINI" description="1. Data Inicial" metadata="date" required="true" keep-last="true"/>
        <parameter id="DTFIM" description="2. Data Final" metadata="date" required="true" keep-last="true"/>
        <parameter id="OPERACAO" description="3. Código da Operação" metadata="integer" required="true" keep-last="true"/>
    </prompt-parameters>
    <level id="lvl_mm724z" description="Principal">
        <container orientacao="V" tamanhoRelativo="100">
            <chart id="cht_mm725f" type="gauge">
                <title>
                    <![CDATA[VALOR TOTAL CANCELADO]]>
                </title>
                <expression type="sql" data-source="MGEDS">
                    <![CDATA[SELECT SUM(CAB.VLRNOTA) AS VALORTOTAL FROM  sankhya.TGFCAN CAN WITH (NOLOCK)   INNER JOIN sankhya.TGFCAB_EXC CAB WITH (NOLOCK) ON CAB.NUNOTA = CAN.NUNOTA WHERE CAB.CODTIPOPER = :OPERACAO   AND CAN.MOTCANCEL LIKE '%Pedido%sem%pagamento%'   AND CAB.DTNEG >= :DTINI   AND CAB.DTNEG <= :DTFIM]]>
                </expression>
                <metadata>
                    <field name="VALORTOTAL" label="VALORTOTAL" type="F" visible="true" useFooter="false" mask="R$ #.##0,00"/>
                </metadata>
                <show-ticks>true</show-ticks>
                <min-value>0</min-value>
                <max-value>80000</max-value>
                <value-field>$VALORTOTAL</value-field>
                <alert-colors values="0,15000,30000,50000,80000" colors="0xcc66,0xff9900,0xff3300,0xff0000"/>
            </chart>
        </container>
    </level>
</gadget>