Carlos André de Souza Viana
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # CONSULTAS PARA O SONAR Documentacao sobre o repositório de gráficos que podem ser utilizados nos clientes do **Tetra Sonar**. O item **Gráfico** sugerido é uma sugestao, pode ser escolhido qualquer outro de acordo com o padrao dos dados. Por exemplo. O padrao ROSCA pode ser substituído pelo de PIZZA por termos mesmo padrao de dados, no caso 2 níveis. Caso for alterar para um gráfico de dados de 3 níveis como o de BARRAS a consulta SQL que gera os dados deve sofrer uma alteracao para tornar compatível com o gráfico. ## COMPRAS ### TOTAL COMPRADO ##### Objetivo Mostrar o valor total comprado no período selecionado. **Variacoes da visao:** * mes retrasado * mes anterior * mes atual **Gráfico:** BARRA VERTICAL **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Resultado ```SQL declare @primeiroDiaMesAtual as DATETIME declare @primeiroDiaMesAnterior as DATETIME declare @primeiroDiaMesRetrazado as DATETIME declare @UltimoDiaMesAtual as DATETIME declare @UltimoDiaMesAnterior as DATETIME declare @UltimoDiaMesRetrasado as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @primeiroDiaMesRetrasado = DateAdd(mm, DateDiff(mm,0,GetDate()) - 2, 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) set @UltimoDiaMesRetrasado = DATEADD(s,-2,DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0)) select 'Mes retrasado' as bar, 'Compra' as label, SUM(VALORTOT) as value from compra where DTENTRADA between @primeiroDiaMesRetrasado and @UltimoDiaMesRetrasado and CODFIL in ($codfil) and POSICAO = 'F' UNION all select 'Mes anterior' as bar, 'Compra' as label, SUM(VALORTOT) as value from compra where DTENTRADA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and CODFIL in ($codfil) and posicao = 'F' UNION all select 'Mes atual' as bar, 'Compra' as label, SUM(VALORTOT) as value from compra where DTENTRADA between @primeiroDiaMesAtual and @UltimoDiaMesAtual and CODFIL in ($codfil) and POSICAO = 'F' ``` ### TOP 10 FORNECEDORES ##### Objetivo Mostrar os 10 maiores fornecedores por valor de compra. **Variacoes da visao:** * mes anterior * mes atual **Gráfico:** RADAR **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mes atual ```SQL declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select TOP 10 MAX(f.NOME) as label, SUM(c.VALORTOT) as value from compra c left join cliente f on f.codigo = c.FORNEC where DTENTRADA between @primeiroDiaMesAtual and @UltimoDiaMesAtual and c.CODFIL in ($codfil) and c.posicao = 'F' group by f.codigo order by sum(c.VALORTOT) desc ``` ###### Mes anterior ```SQL declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select TOP 10 MAX(f.NOME) as label, SUM(c.VALORTOT) as value from compra c left join cliente f on f.codigo = c.FORNEC where DTENTRADA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and c.CODFIL in ($codfil) and c.posicao = 'F' group by f.codigo order by sum(c.VALORTOT) desc ``` ### TOP 10 PRODUTOS (por quantidade) ##### Objetivo Mostrar os 10 produtos mais comprados por quantidade. **Variacoes da visao:** * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** Un ##### Abas ###### Mes atual ```SQL declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select top 10 max(e.nome) as label, sum(ic.quant) as value from icompra ic inner join ESTOQUE e on e.codigo = ic.CODPROD inner join COMPRA c on c.CODIGO = ic.CODIGO where c.DTENTRADA between @primeiroDiaMesAtual and @ultimoDiaMesAtual and c.posicao = 'F' and c.CODFIL in ($codfil) group by ic.CODPROD order by sum(ic.quant) desc ``` ###### Mes anterior ```SQL declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select top 10 max(e.nome) as label, sum(ic.quant) as value from icompra ic inner join ESTOQUE e on e.codigo = ic.CODPROD inner join COMPRA c on c.CODIGO = ic.CODIGO where c.DTENTRADA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and c.posicao = 'F' and c.CODFIL in ($codfil) group by ic.CODPROD order by sum(ic.quant) desc ``` ### TOP 10 PRODUTOS (por valor) ##### Objetivo Mostrar os 10 produtos mais comprados por valor. **Variacoes da visao:** * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mes Anterior ```SQL declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select TOP 10 max(e.NOME) as label, sum(i.QUANT) as value from ICOMPRA i inner join compra c on c.CODIGO = i.CODIGO inner JOIN estoque e on e.CODIGO = i.CODPROD where c.DTENTRADA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and c.CODFIL in ($codfil) and c.POSICAO = 'F' group by e.codigo order by sum(i.quant) desc ``` ###### Mes atual ```SQL declare @PrimeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select TOP 10 max(e.NOME) as label, sum(i.QUANT) as value from ICOMPRA i inner join compra c on c.CODIGO = i.CODIGO inner JOIN estoque e on e.CODIGO = i.CODPROD where c.DTENTRADA between @primeiroDiaMesAtual and @UltimoDiaMesAtual and c.CODFIL in ($codfil) and c.POSICAO = 'F' group by e.codigo order by sum(i.quant) desc ``` ## VENDAS ### TOTAL VENDIDO ##### Objetivo Mostrar o valor total vendido no período selecionado. **Variacoes da visao:** * essa semana * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Essa semana ```SQL declare @InicioSemana as DATETIME declare @FinalSemana as DATETIME set @InicioSemana = CONVERT(DATETIME,CONVERT(VARCHAR,DateAdd(day, 1 - DatePart(weekday, getDate()), getdate()), 101) + ' 00:00:00') set @FinalSemana= CONVERT(DATETIME,CONVERT(VARCHAR,DateAdd(day, +6, @InicioSemana), 101) + ' 23:59:59') select 'Comfirmadas' as label, sum(v.VALOR + v.DESCACRES) as value from VENDA v where data between @InicioSemana and @FinalSemana and codfil in ($codfil) and v.CANCELADO is null UNION ALL select 'Canceladas' as bar, sum(v.VALOR + v.DESCACRES) as value from VENDA v where data between @InicioSemana and @FinalSemana and codfil in ($codfil) and v.CANCELADO is not null ``` ###### Mes Atual ```SQL declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select 'Comfirmadas' as label, sum(v.VALOR + v.DESCACRES) as value from VENDA v where data between @primeiroDiaMesAtual and @UltimoDiaMesAtual and codfil in ($codfil) and v.CANCELADO is null UNION ALL select 'Canceladas' as bar, sum(v.VALOR + v.DESCACRES) as value from VENDA v where data between @primeiroDiaMesAtual and @UltimoDiaMesAtual and codfil in ($codfil) and v.CANCELADO is not null ``` ###### Mes Anterior ```SQL declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select 'Comfirmadas' as label, sum(v.VALOR + v.DESCACRES) as value from VENDA v where data between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and codfil in ($codfil) and v.CANCELADO is null UNION ALL select 'Canceladas' as bar, sum(v.VALOR + v.DESCACRES) as value from VENDA v where data between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and codfil in ($codfil) and v.CANCELADO is not null ``` ### MARGEM TOTAL PRATICADA ##### Objetivo Mostrar a margem (total) praticada no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** LISTA **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** % ##### Abas ###### Resultado ```SQL declare @primeiroDiaMesAtual as DATETIME declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAtual as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) SELECT 'Margem mes anterior' AS label, CAST(CAST(ROUND((SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) - SUM(rz.QUANT * - (1 * rz.CUSTO))) / SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) * 100, 2) AS DECIMAL(6, 2)) AS varchar) AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.ESTOQUE AS e ON rz.CODIGO = e.CODIGO INNER JOIN dbo.SUBGRUPO AS sub ON sub.CODIGO = e.SUBGRUPO INNER JOIN dbo.GRUPO AS GR ON sub.GRUPO = GR.CODIGO INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAnterior AND @UltimoDiaMesAnterior WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') GROUP BY GR.NOME UNION ALL SELECT 'Margem mes atual' AS label, CAST(CAST(ROUND((SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) - SUM(rz.QUANT * - (1 * rz.CUSTO))) / SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) * 100, 2) AS DECIMAL(6, 2)) AS varchar) AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.ESTOQUE AS e ON rz.CODIGO = e.CODIGO INNER JOIN dbo.SUBGRUPO AS sub ON sub.CODIGO = e.SUBGRUPO INNER JOIN dbo.GRUPO AS GR ON sub.GRUPO = GR.CODIGO INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAtual AND @UltimoDiaMesAtual WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') GROUP BY GR.NOME ``` ### ANÁLISE DE DESEMPENHO ##### Objetivo Apresentar uma tabela contendo os principais indicadores do varejo. - Número de Vendas - Itens Vendidos - Ticket Médio - Itens / Vendas - Valor médio do item - Markup(%) **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** LISTA **Totalizador:** SIM **Tempo de atualizacao:** 5 min ### CONTRIBUIÇÃO POR GRUPO DE PRODUTOS ##### Objetivo Mostrar o percentual de contribuição no faturamento dos grupos de produtos vendidos no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS VERTICAIS **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** % ##### Abas ###### Mês Anterior ```SQL declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) SELECT top 10 MAX(GR.NOME) AS nome, CAST(CAST(ROUND((SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) - SUM(rz.QUANT * - (1 * rz.CUSTO))) / SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) * 100, 2) AS DECIMAL(6, 2)) AS varchar) + '%' AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.ESTOQUE AS e ON rz.CODIGO = e.CODIGO INNER JOIN dbo.SUBGRUPO AS sub ON sub.CODIGO = e.SUBGRUPO INNER JOIN dbo.GRUPO AS GR ON sub.GRUPO = GR.CODIGO INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAnterior AND @UltimoDiaMesAnterior WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') and rz.codfil in ($codfil) GROUP BY GR.NOME order by value desc ``` ###### Mês Atual **(new)** ``` declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) SELECT top 10 MAX(GR.NOME) AS nome, CAST(CAST(ROUND((SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) - SUM(rz.QUANT * - (1 * rz.CUSTO))) / SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) * 100, 2) AS DECIMAL(6, 2)) AS varchar) + '%' AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.ESTOQUE AS e ON rz.CODIGO = e.CODIGO INNER JOIN dbo.SUBGRUPO AS sub ON sub.CODIGO = e.SUBGRUPO INNER JOIN dbo.GRUPO AS GR ON sub.GRUPO = GR.CODIGO INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAtual AND @UltimoDiaMesAtual WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') and rz.codfil in ($codfil) GROUP BY GR.NOME order by value desc ``` ### CONTRIBUIÇÃO POR SUBGRUPO DE PRODUTOS ##### Objetivo Mostrar o percentual de contribuição no faturamento dos subgrupos de produtos vendidos no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS VERTICAIS **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** % ##### Abas ###### Mês Anterior ```SQL declare @primeiroDiaMesAnterior as DATETIME declare @UltimoDiaMesAnterior as DATETIME set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) SELECT top 10 MAX(sub.NOME) AS nome, CAST(CAST(ROUND((SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) - SUM(rz.QUANT * - (1 * rz.CUSTO))) / SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) * 100, 2) AS DECIMAL(6, 2)) AS varchar) + '%' AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.ESTOQUE AS e ON rz.CODIGO = e.CODIGO INNER JOIN dbo.SUBGRUPO AS sub ON sub.CODIGO = e.SUBGRUPO INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAnterior AND @UltimoDiaMesAnterior WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') and rz.codfil in ($codfil) GROUP BY sub.NOME order by value desc ``` ###### Mês Atual **(new)** ``` declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) SELECT top 10 MAX(sub.NOME) AS nome, CAST(CAST(ROUND((SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) - SUM(rz.QUANT * - (1 * rz.CUSTO))) / SUM((rz.QUANT * rz.UNITARIO + rz.DESCACRES) * (v.VALOR / (v.VALOR - v.DESCACRES)) * - 1) * 100, 2) AS DECIMAL(6, 2)) AS varchar) + '%' AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.ESTOQUE AS e ON rz.CODIGO = e.CODIGO INNER JOIN dbo.SUBGRUPO AS sub ON sub.CODIGO = e.SUBGRUPO INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAtual AND @UltimoDiaMesAtual WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') GROUP BY sub.NOME order by value desc ``` ### VENDA POR ESPÉCIE POR FATURAMENTO(R$) ##### Objetivo Mostrar o valor total vendido por espécie (dinheiro, ticket, cartão, cheque, carteira) no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** PIZZA **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select case when especie='CT' then 'Cartão' else case when especie='CC' then 'Carteira' else case when especie='CR' then 'Crédito' else case when especie='DN' then 'Dinheiro' else case when especie='TK' then 'Ticket' else case when especie='CH' then 'Cheque' end end end end end end as label, abs(sum(valor)) as value from movpdv where especie not in ('NN', 'FE', 'AB', 'TR', 'TC', 'CS') and data between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and CODFIL in ($codfil) group by especie ``` ###### Mês Atual **(new)** ``` declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select case when especie='CT' then 'Cartão' else case when especie='CC' then 'Carteira' else case when especie='CR' then 'Crédito' else case when especie='DN' then 'Dinheiro' else case when especie='TK' then 'Ticket' else case when especie='CH' then 'Cheque' end end end end end end as label, abs(sum(valor)) as valor from movpdv where especie not in ('NN', 'FE', 'AB', 'TR', 'TC', 'CS') and data between @primeiroDiaMesAtual and @UltimoDiaMesAtual and CODFIL in ($codfil) group by especie order by valor desc ``` ### VENDA POR CAIXA Mostrar o valor total vendido por cada caixa no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS HORIZONTAIS **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select max(ncaixa) as label, SUM(valor) as value from movpdv where especie <> 'NN' and DATA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and codfil in ($codfil) group by NCAIXA order by label ``` ###### Mês Atual **(new)** ``` declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select max(ncaixa) as label, SUM(valor) as value from movpdv where especie <> 'NN' and DATA between @primeiroDiaMesAtual and @UltimoDiaMesAtual and codfil in ($codfil) group by NCAIXA order by label ``` ##### Objetivo ### TOTAL DE VENDAS (COM NFCE) X TOTAL DE VENDA COM CARTÃO ##### Objetivo Mostrar um comparativo de quanto foi vendido com NFCe emitida e quando foi vendido com cartão. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS VERTICAIS **Totalizador:** NAO **Tempo de atualizacao:** **Formato do dado:** R$ ### VENDA POR VENDEDORES ##### Objetivo Mostrar o valor total vendido por vendedor no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** RADAR **Totalizador:** NAO **Tempo de atualizacao:** **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select max(atf.nome)as label, SUM(v.valor) as value from at_pedido at inner join VENDA v on v.CODIGO = at.CODIGO inner join at_funario atf on atf.CODIGO = at.FUNARIO where at.POSICAO <> 'C' and at.DTSTATUS between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and v.codfil in ($codfil) group by atf.CODIGO order by value desc ```` ###### Mês Atual **(new)** ``` declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) select max(atf.nome)as label, SUM(v.valor) as value from at_pedido at inner join VENDA v on v.CODIGO = at.CODIGO inner join at_funario atf on atf.CODIGO = at.FUNARIO where at.POSICAO <> 'C' and at.DTSTATUS between @primeiroDiaMesAtual and @UltimoDiaMesAtual and v.codfil in ($codfil) group by atf.CODIGO order by value desc ``` ### TOP 10 CLIENTES ##### Objetivo Mostrar os 10 clientes que mais compraram (em R$) no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** RADAR **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select top 10 max(c.nome)as label, SUM(v.valor) as value from venda v left join at_pedido at on at.CODIGO = v.CODIGO inner join cliente c on c.CODIGO = v.RESP where v.CANCELADO is not null and v.[DATA] between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior and v.codfil in (1) group by c.CODIGO order by value desc ``` ### TOP 10 PRODUTOS MAIS VENDIDOS (em valor) ##### Objetivo Mostrar os 10 produtos mais vendidos (em valor) **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** RADAR **Totalizador:** NAO **Tempo de atualizacao:** 5min **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select top 10 max(e.nome) as label,sum((rz.QUANT * rz.UNITARIO)* -1) as value from razaloja rz inner join venda v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL inner join estoque e on e.codigo = rz.CODIGO where rz.movto like 'VE%' AND rz.INFO <> 'RET' and rz.CODFIL in ($codfil) and v.DATA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior group by e.CODIGO order by value desc ``` ### TOP 10 PRODUTOS MAIS VENDIDOS (em quantidade) ##### Objetivo Mostrar os 10 produtos mais vendidos (em quantidade) **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** RADAR **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** Un ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select max(e.nome) as label,sum(rz.QUANT) * -1 as value from razaloja rz inner join venda v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL inner join estoque e on e.codigo = rz.CODIGO where rz.movto like 'VE%' AND rz.INFO <> 'RET' and rz.CODFIL in ($codfil) and v.DATA between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior group by e.CODIGO order by value desc ``` ### VENDA ANUAL POR MES ##### Objetivo Mostrar o valor total vendido por mês. **Variacoes da visao:** * ano anterior * ano atual **Gráfico:** PIZZA **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Ano Anterior ```SQL declare @primeiroDiaanopassado as datetime declare @ultimoDiaanopassado as datetime set @primeiroDiaanopassado = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()) - 1, 0) set @ultimoDiaanopassado = DATEADD(dd, -1, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), '23:59:59')) SELECT CONVERT(varchar(7), v.DATA, 126) AS label, SUM(v.VALOR) AS value FROM dbo.VENDA AS v LEFT JOIN dbo.AT_PEDIDO AS ped ON v.CODOFF = ped.CODIGO and v.cancelado is not null WHERE (v.DATA BETWEEN @primeiroDiaanopassado and @ultimoDiaanopassado) and v.CODFIL in ($codfil) GROUP BY CONVERT(varchar(7), v.DATA, 126) order by label ``` ### COMPARATIVO ANUAL COM PERCENTUAL DE DIFERENÇA ##### Objetivo Mostrar um comparativo do valor total vendido nos últimos 3 anos. **Variacoes da visao:** * últimos 3 anos **Gráfico:** BARRAS VERTICAIS **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Últimos 3 anos ```SQL declare @primeiroDiaanopassado as datetime declare @ultimosTresAnos as datetime set @ultimosTresAnos = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()) - 2, 0) SELECT CONVERT(varchar(7), YEAR(v.DATA), 126) AS label, SUM(v.VALOR) as value FROM dbo.VENDA AS v WHERE (v.DATA BETWEEN @ultimosTresAnos and getdate()) and v.CODFIL in ($codfil) GROUP BY CONVERT(varchar(7), YEAR(v.DATA), 126) order by label ``` ### COMPRAS X VENDAS ##### Objetivo Mostrar um comparativo do valor total comprado e do valor total vendido no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS VERTICAIS **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês passado ```SQL terior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) SELECT label, value FROM (SELECT 'Compra' AS label, CAST(CAST(SUM(VALORTOT) AS numeric(11, 2)) AS varchar) AS value FROM dbo.COMPRA WHERE (DTENTRADA BETWEEN @primeiroDiaMesAnterior AND @UltimoDiaMesAnterior) AND (POSICAO = 'F') and CODFIL in($codfil) UNION ALL SELECT 'Venda' AS label, CASE WHEN SUM(rz.quant) IS NULL THEN 0 ELSE SUM((((rz.quant * - 1) * rz.unitario) + rz.descAcres) * (v.valor / (v.valor - v.descAcres))) END - (SELECT ISNULL(sum(VALOR), 0) AS valor FROM DEVOLUC WHERE (DTSTATUS BETWEEN @primeiroDiaMesAnterior AND @UltimoDiaMesAnterior) AND (POSICAO <> 'C') and CODFIL in ($codfil)) AS value FROM dbo.RAZALOJA AS rz INNER JOIN dbo.VENDA AS v ON v.CODIGO = CAST(rz.PROCESSO AS INT) AND v.CANCELADO IS NULL AND v.DATA BETWEEN @primeiroDiaMesAnterior AND @UltimoDiaMesAnterior WHERE (rz.MOVTO LIKE 'VE%') AND (rz.INFO <> 'RET') and rz.CODFIL in ($codfil) ) AS dum ``` ## ESTOQUE ### TOP 10 PRODUTOS COM MAIS ESTOQUE ##### Objetivo Mostrar o 10 produtos com mais unidades no estoque. **Variacoes da visao:** * dia atual **Gráfico:** RADAR **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** Un ##### Abas ###### Diário ```SQL declare @hojecedo as DATETIME set @hojecedo = CONVERT(DATETIME,CONVERT(VARCHAR,GETDATE(), 101) + ' 00:00:00') select top 10 MAX(e.codigo) as label, sum(qt.QTL + qt.QTD) as value from estqt qt inner join ESTOQUE e on e.CODIGO = qt.CODPROD where codfil in($codfil) group by e.CODIGO order by value desc ``` ### PRODUTOS QUE ATINGIRAM ESTOQUE MÍNIMO ##### Objetivo Mostrar os produtos que atingiram a quantidade mínima em estoque. **Variacoes da visao:** * momento da consulta **Gráfico:** Lista **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** Un ##### Abas ###### Diário ```SQL select e.nome as label, e.quantm as value from ESTOQUE e inner join ESTQT qt on qt.CODPROD = e.CODIGO where (qt.QTL + qt.QTD <= e.QUANTM) and codfil in($codfil) order by value desc ``` ### TOTAL EM ESTOQUE (CUSTO / VENDA E NUMERO TOTAL DE ITENS) ##### Objetivo Mostrar os valores de Custo, Venda e Número total de itens do produtos em estoque. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** NAO **Tempo de atualizacao:** 5 min ##### Abas ###### Diário ```SQL select e.nome as label, e.quantm as value from ESTOQUE e inner join ESTQT qt on qt.CODPROD = e.CODIGO where (qt.QTL + qt.QTD <= e.QUANTM) and codfil in($codfil) order by value desc ``` ## FINANCEIRO ### CONTAS A PAGAR X CONTAS A RECEBER ##### Objetivo Mostrar um comparativo do valor total a pagar e do valor total a receber no período selcionado. **Variacoes da visao:** * mes atual, * próximo mes, * próximos 6 meses **Gráfico:** BARRAS VERTICAIS **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês Atual ```SQL declare @primeiroDiaMesAtual as DATETIME declare @UltimoDiaMesAtual as DATETIME set @primeiroDiaMesAtual = DateAdd(mm, DateDiff(mm,0,GetDate()), 0) set @ultimoDiaMesAtual = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) SELECT label, value FROM (SELECT 'Pagar' AS label, SUM(VALOR) AS value FROM dbo.PAGAR WHERE (POSICAO = 'AB') AND (VENCTO between @primeiroDiaMesAtual AND @ultimoDiaMesAtual) and CODFIL in ($codfil) GROUP BY POSICAO UNION ALL SELECT 'Receber' AS label, SUM(VALORAB) AS value FROM dbo.RECEBER WHERE (POSICAO = 'AB') AND (VENCTO between @primeiroDiaMesAtual AND @ultimoDiaMesAtual) and CODFIL in ($codfil) GROUP BY POSICAO) AS dum ``` ### PERCENTUAL DE INADIMPLENCIA ##### Objetivo Mostrar o percentual de inadimplência no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** NAO **Tempo de atualizacao:** 1 dia **Formato do dado:** % ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select top 10 'Mês passado' as label , sum (valorab ) AS value from RECEBER R INNER JOIN CLIENTE C ON C.CODIGO = R.RESP WHERE r.POSICAO = 'AB' and r.vencto < @UltimoDiaMesAnterior AND R.CODFIL in($codfil) union select top 10 'Mês atual' as label , sum (valorab ) AS value from RECEBER R INNER JOIN CLIENTE C ON C.CODIGO = R.RESP WHERE r.POSICAO = 'AB' and r.vencto < GETDATE() AND R.CODFIL in($codfil) ``` ### TOP 10 CLIENTES INADIMPLENTES ##### Objetivo Mostrar o valor devido e o nome dos 10 clientes mais inadimplentes no período selecionado. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS VERTICAIS **Totalizador:** NAO **Tempo de atualizacao:** 1 dia **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select top 10 MAX(C.NOME) label , cast(sum (valorab * 100)/ (select sum(valorab) AS value from RECEBER R INNER JOIN CLIENTE C ON C.CODIGO = R.RESP WHERE r.POSICAO = 'AB' and r.vencto < @UltimoDiaMesAnterior and R.CODFIL in($codfil))as decimal(4,2)) AS value from RECEBER R INNER JOIN CLIENTE C ON C.CODIGO = R.RESP WHERE r.POSICAO = 'AB' and r.vencto < @UltimoDiaMesAnterior AND R.CODFIL in($codfil) GROUP BY C.CODIGO ORDER BY VALUE DESC ``` ## FISCAL ### TOTAL DE NOTAS EMITIDAS ##### Objetivo Mostrar o valor total das notas emitidas (por modelo). **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select max(modelo) as label,SUM(totnf) as value from fc_nf where CODFIL in ($codfil) and posicao = 'E' and emissao between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior group by modelo ``` ### TOTAL DE NOTAS CANCELADAS ##### Objetivo Mostrar o valor total das notas canceladas (por modelo). **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** SIM **Tempo de atualizacao:** 5 min **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select max(modelo) as label,SUM(totnf) as value from fc_nf where CODFIL in ($codfil) and nfe_sit = 'C' and emissao between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior group by modelo ``` ### TOTAL DE NOTAS INUTILIZADAS ##### Objetivo Mostrar o valor total das notas inutilizadas (por modelo). **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** ROSCA **Totalizador:** SIM **Tempo de atualizacao:** 5 MIN **Formato do dado:** R$ ##### Abas ###### Mês Anterior ```SQL declare @UltimoDiaMesAnterior as DATETIME declare @primeiroDiaMesAnterior as DATETIME set @primeiroDiaMesAnterior = DateAdd(mm, DateDiff(mm,0,GetDate()) - 1, 0) set @UltimoDiaMesAnterior = DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) select max(modelo) as label,SUM(totnf) as value from fc_nf where CODFIL in ($codfil) and nfe_sit = 'I' and emissao between @primeiroDiaMesAnterior and @UltimoDiaMesAnterior group by modelo ``` ### TOTAL DE VENDAS POR TIPO DE TRIBUTAÇÃO (TRIBUTADO, ISENTO, NÃO TRIBUTADO, SUBSTITUIÇÃO) ##### Objetivo Mostrar o valor total vendido por tipo de tributação. **Variacoes da visao:** * dia anterior, * dia atual, * mes anterior * mes atual **Gráfico:** BARRAS HORIZONTAIS **Totalizador:** NAO **Tempo de atualizacao:** **Formato do dado:** R$ ### ANÁLISE DE DESEMPENHO POR FILIAL ##### Objetivo Apresentar uma tabela contendo os principais indicadores do varejo por filial. **Variacoes da visao:** * TOTAL DE VENDAS, * VALOR TOTAL VENDIDO, * ITENS VENDIDOS, * CLIENTES, * MIX, * LUCRO, * MKP VENDA, * MKP CUSTO, * MEDIA DE ITENS, * VALOR MEDIO, * CONTRIBUIÇÃO. **Gráfico:** LISTA **Totalizador:** NAO **Tempo de atualizacao:** 5 min **Formato do dado:** R$ # ALERTAS PARA O SONAR ### Alerta de Venda Cancelada ou Abandonada ??? #### Periodicidade: * Deveria ser sempre mas vai lotar as notifiacoes do celular ### Alerta de Contas a Pagar x Contas a Receber #### Periodicidade: * Ao iniciar o app. (1º acesso do dia); ??? deve ter um evento para o alerta ??? ### Alerta de Valor Máximo Atingido em espécie Dinheiro em algum dos caixas #### Periodicidade: * A cada 15 min.? ### Alertar quando a meta da loja for atingida (diária e mensal) ### Alerta para produtos com preço de Custo maior que Venda #### Periodicidade: * A cada 7 dias ### Alerta para produtos com custo zerado #### Periodicidade: * A cada 7 dias ### Alerta para produtos que atingiram o estoque mínimo #### Periodicidade: * A cada 7 dias

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully