Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If the Stock of Branch 1 is 0 or <0. Bring the Stock Balance of Branch 3 (Column 2) and Branch 5 (Column 3)
LOAD
Qtde_Estoque_Atual,
if(num([Qtde_Estoque_Atual]) <=0,0,1) as Estoque_Sim1,
if(num([Qtde_Estoque_Atual]) =0,0,1) as Estoque_Sim2,
NomeProdutoE,
CodigoProduto,
Data_Alteracao,
CodigoFilialE,
DiaE,
TrimestreE,
AnoE,
MesE
FROM
[C:\manaus\Estoque.qvd]
(qvd);
Est:1
Sum({$<AnoE ={$(=Year(today()))},MesE={$(=Month(today()))},DiaE={$(=Day(today()))},[CodigoFilialE]={'1'},[Estoque_Sim1]={'0'} >}Qtde_Estoque_Atual)
Est:2
if(Sum({$<AnoE ={$(=Year(today()))},MesE={$(=Month(today()))},DiaE={$(=Day(today()))},[CodigoFilialE]={'1'},[Estoque_Sim1]={'0'} >}Qtde_Estoque_Atual),
Sum({$<[CodigoFilialE]={'3'} ,[Estoque_Sim1]-={'0'} >}Qtde_Estoque_Atual))