on 08-05-2014 1:49 PM
Bom dia Companheiros
Estou tentando fazer uma autorização para que a QUANTIDADE dos itens da nota de entrada não possa ser diferente do pedido de compra conforme a consulta abaixo mais ta dando erro alguem poderia me ajudar.
Select distinct 'TRUE'
from OPCH a
inner join PCH1 b on a.DocEntry = $[pch1.DocEntry]
inner join POR1 c on b.BaseEntry = $[POR1.DocEntry]
where b.ItemCode = c.ItemCode and b.BaseLine = c.LineNum
and b.Quantity <> c.Quantity
and a.DocEntry = b.DocEntry
Leila, bom dia.
Peguei sua Query e dei uma mexida nela. Testei aqui e funcionou, veja abaixo:
SELECT
DISTINCT
'TRUE'
FROM
POR1 T0
WHERE
T0.DocEntry = $[$38.45.number] AND
T0.ItemCode = $[$38.1.text] AND
T0.Quantity <> $[$38.11.number]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Augustus Pinto wrote:
Leila, bom dia.
Peguei sua Query e dei uma mexida nela. Testei aqui e funcionou, veja abaixo:
SELECT
DISTINCT
'TRUE'
FROM
POR1 T0
WHERE
T0.DocEntry = $[$38.45.number] AND
T0.ItemCode = $[$38.1.text] AND
T0.Quantity <> $[$38.11.number]
Bom dia Augustus
Ficou perfeito muito obrigada.
Augustus Bom dia
Isso eu já sabia o que eu não conseguir foi achar o campo T0.DocEntry = $[$38.45.number]
Aonde você conseguiu ver o (45)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Augustus
poderia me explicar como você achou ( $[$38.45.number] ) que estava na posição 45?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oi Leila, claro.
Voce abre a tela Compras - C/P=>Nota Fiscal de Entrada e habilita "Informação do Sistema" no menu superior em Visão.
Depois vai passando o ponteiro do mouse sobre a Grid dos Itens da NF e na barra abaixo vai exibir as coordenadas. Veja a figura abaixo onde posicionei o mouse sobre a coluna "Desconto".
Então neste caso seria $[$38.14.number]. "number" porque se trata de um campo numérico, se fosse texto sería "text". Espero que tenha te ajudado e qualquer dúvida e se eu puder ajudar, fique a vontade.
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.