InovacaoMediaBrasil/ProcessWorkflowsAndDatabaseScripts

View on GitHub
Src/Sankhya/Construtores de Componentes de BI/128.COMERCIAL_CANCELADOS_PORDATA.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_mm7249" type="line">
                <title>
                    <![CDATA[PEDIDOS CANCELADOS POR DATA]]>
                </title>
                <expression type="sql" data-source="MGEDS">
                    <![CDATA[SELECT CAB.DTNEG, COUNT(CAB.NUNOTA) AS QTD 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 GROUP BY CAB.DTNEG ORDER BY CAB.DTNEG]]>
                </expression>
                <metadata>
                    <field name="DTNEG" label="DATA" type="D" visible="true" useFooter="false" mask="DD/MM/YYYY"/>
                    <field name="QTD" label="QTD" type="I" visible="true" useFooter="false" mask="#.##0"/>
                </metadata>
                <horizontal-axis>
                    <category field="DTNEG" rotation="0" dropLabel="false">
                        <title>DATA</title>
                    </category>
                </horizontal-axis>
                <vertical-axis>
                    <linear>
                        <mask/>
                        <title>QUANTIDADE</title>
                    </linear>
                </vertical-axis>
                <series>
                    <serie type="line" circle-intersection="true">
                        <xField>DTNEG</xField>
                        <yField>QTD</yField>
                        <display>CANCELADOS POR DATA</display>
                        <color>0x990000</color>
                    </serie>
                </series>
            </chart>
        </container>
    </level>
</gadget>