1 2 3 4 5
| SELECT Sortie.Numero, Sortie.DateBS AS DateBon, Sortie.Dest, Sortie.Montant,Sortie.Validier, LigneSortie.Designation, LigneSortie.RefArt, LigneSortie.Qte AS Qant,LigneSortie.Pu,(LigneSortie.QteMax*LigneSortie.Pu) AS Mont, LigneSortie.Article, Articles.Famille
FROM Sortie INNER JOIN (Articles INNER JOIN LigneSortie ON Articles.Num = LigneSortie.Article) ON Sortie.Num = LigneSortie.NumBon WHERE (Sortie.Validier = :PValide) AND (LigneSortie.Retourner = :PRetoure)
UNION
SELECT Transfert.Numero, Transfert.DateBR AS DateBon, Transfert.Dest, Transfert.Montant,Transfert.Valider, LigneTransfert.Designation, LigneTransfert.RefArt, LigneTransfert.Qte AS Qant,LigneTransfert.Pu,(LigneTransfert.Qte*LigneTransfert.Pu) AS Mont,
LigneTransfert.Article, Articles.Famille FROM Transfert INNER JOIN (Articles INNER JOIN LigneTransfert ON Articles.Num = LigneTransfert.Article) ON Transfert.Num = LigneTransfert.NumBon WHERE (Transfert.Valider = :PValide1) |
Partager