Skip to main content

Database raw purchasing

APPRO POUR PILOTAGE ACHATS : 

SELECT ESLOTS1.DateEntree, STOCK.Libelle, ESLOTS1.QuantiteFacture, CBool([Transfert]) AS Expr2
FROM ESLOTS1 LEFT JOIN STOCK ON ESLOTS1.IDstock = STOCK.IDstock
WHERE (((STOCK.iDGamme)=1) AND ((IIf((DatePart("ww",[DateEntree])=DatePart("ww",Date())+1 Or DatePart("ww",[DateEntree])=DatePart("ww",Date())) And Year([DateEntree])=Year(Date()),"oui","non"))="oui") AND ((CBool([Transfert]))=0));

compteurs prev achat semaine : 

SELECT COMPTEUR.LaDate, COMPTEUR.Poids, STOCK.Libelle, FormatNumber([COMPTEUR]![CodeFamilleArticle]) AS [FAM Article]
FROM STOCK RIGHT JOIN COMPTEUR ON STOCK.IDstock = COMPTEUR.IDstock
WHERE (((COMPTEUR.LaDate) Between Date() And Date()+10) AND ((COMPTEUR.PRODaproduire)>0) AND ((COMPTEUR.IDgamme)=1) AND ((COMPTEUR.LeType)="T"));

Ind achat ventes huitres : 

SELECT LignesCommandes.DateExpedition, LignesCommandes.PoidsLigne, STOCK.Libelle, LignesCommandes.HTligne, LignesCommandes.CodeFamille, ArticleFamille.NomFamille
FROM (LignesCommandes LEFT JOIN STOCK ON LignesCommandes.idStock = STOCK.IDstock) LEFT JOIN ArticleFamille ON LignesCommandes.CodeFamille = ArticleFamille.NumAuto
WHERE (((LignesCommandes.DateExpedition) Between #1/1/2024# And Date()) AND ((LignesCommandes.IDgamme)=2) AND ((CBool([PrevisionInterne]))=0));

Ind achat ventes moules quotidiennes : 

SELECT LignesCommandes.DateExpedition, LignesCommandes.PoidsLigne, STOCK.Libelle, LignesCommandes.HTligne
FROM LignesCommandes LEFT JOIN STOCK ON LignesCommandes.idStock = STOCK.IDstock
WHERE (((LignesCommandes.DateExpedition) Between #1/1/2024# And Date()) AND ((LignesCommandes.CodeFamille)<>102) AND ((LignesCommandes.IDgamme)=1) AND ((CBool([PrevisionInterne]))=0));

Indicateurs prix d'achats Sylvain : 

SELECT ESLOTS1.DateEntree, STOCK.Libelle, FOURNISSEUR.RaisonSociale, ESLOTS1.PUAchat, ESLOTS1.PUTransportAchat, ESLOTS1.QuantiteFacture, ESLOTS1.TotalAchat, ESLOTS1.QuantitePesee, STOCK.Pays
FROM (ESLOTS1 LEFT JOIN STOCK ON ESLOTS1.IDstock = STOCK.IDstock) LEFT JOIN FOURNISSEUR ON ESLOTS1.IDfournisseur = FOURNISSEUR.IDfournisseur
WHERE (((ESLOTS1.DateEntree) Between #12/1/2023# And Date()) AND ((STOCK.iDGamme)=1) AND ((CBool([Transfert]))=0));

Indicateurs prix d'achats Sylvain huitres : 

SELECT ESLOTS1.DateEntree, STOCK.Libelle, FOURNISSEUR.RaisonSociale, ESLOTS1.PUAchat, ESLOTS1.PUTransportAchat, ESLOTS1.QuantiteFacture, ESLOTS1.TotalAchat, ESLOTS1.QuantitePesee, STOCK.Pays
FROM (ESLOTS1 LEFT JOIN STOCK ON ESLOTS1.IDstock = STOCK.IDstock) LEFT JOIN FOURNISSEUR ON ESLOTS1.IDfournisseur = FOURNISSEUR.IDfournisseur
WHERE (((ESLOTS1.DateEntree) Between #12/1/2023# And Date()) AND ((STOCK.iDGamme)=2) AND ((CBool([Transfert]))=0));

Req achat mat premier huitre : 

SELECT ESLOTS1.DateEntree, ESLOTS1.NumLotOrigine, STOCK.Libelle, ArticleGamme.NomGamme, FOURNISSEUR.RaisonSociale, ESLOTS1.QuantitePesee, ESLOTS1.TotalAchat, ESLOTS1.QuantiteRestant, ESLOTS1.PrixRevientTemporaire, ESLOTS1.Ajuste, ESLOTS1.LotBloque, ESLOTS1.Lot_Termine, ESLOTS1.PUAchat
FROM FOURNISSEUR RIGHT JOIN ((STOCK LEFT JOIN ArticleGamme ON STOCK.iDGamme = ArticleGamme.NumAuto) RIGHT JOIN ESLOTS1 ON STOCK.IDstock = ESLOTS1.IDstock) ON FOURNISSEUR.IDfournisseur = ESLOTS1.IDfournisseur
WHERE (((ESLOTS1.DateEntree) Between #1/1/2016# And Date()-15) AND ((CBool([Transfert]))=0) AND ((STOCK.iDGamme)<>1));

REQ ACHATS : 

SELECT ESLOTS1.DateEntree, STOCK.Libelle, ArticleGamme.NomGamme, FOURNISSEUR.RaisonSociale, ESLOTS1.QuantiteFacture, ESLOTS1.TotalAchat, ESLOTS1.PrixRevientTemporaire, ESLOTS1.Ajuste, ESLOTS1.LotBloque, ESLOTS1.Lot_Termine, ESLOTS1.Pays, ESLOTS1.TotalDemAvoir, ESLOTS1.TotalAvoir, ESLOTS1.PUAchat
FROM FOURNISSEUR RIGHT JOIN ((STOCK LEFT JOIN ArticleGamme ON STOCK.iDGamme = ArticleGamme.NumAuto) RIGHT JOIN ESLOTS1 ON STOCK.IDstock = ESLOTS1.IDstock) ON FOURNISSEUR.IDfournisseur = ESLOTS1.IDfournisseur
WHERE (((ESLOTS1.DateEntree) Between #1/1/2016# And Date()-15) AND ((CBool([Transfert]))=0) AND ((STOCK.iDGamme) Between 1 And 2));

requete achats mat premiere : 

SELECT ESLOTS1.DateEntree, STOCK.Libelle, ArticleGamme.NomGamme, FOURNISSEUR.RaisonSociale, ESLOTS1.QuantitePesee, ESLOTS1.TotalAchat, ESLOTS1.QuantiteRestant, ESLOTS1.PrixRevientTemporaire, ESLOTS1.Ajuste, ESLOTS1.LotBloque, ESLOTS1.Lot_Termine, ESLOTS1.PUAchat, ESLOTS1.PrixRevient
FROM FOURNISSEUR RIGHT JOIN ((STOCK LEFT JOIN ArticleGamme ON STOCK.iDGamme = ArticleGamme.NumAuto) RIGHT JOIN ESLOTS1 ON STOCK.IDstock = ESLOTS1.IDstock) ON FOURNISSEUR.IDfournisseur = ESLOTS1.IDfournisseur
WHERE (((ESLOTS1.DateEntree) Between #1/1/2016# And Date()-15) AND ((CBool([Transfert]))=0));

STOCKS JOURNALIER BASSINS : 

SELECT ESLOTS1.DateEntree, STOCK.Libelle, FOURNISSEUR.RaisonSociale, ESLOTS1.NumLotOrigine, ESLOTS1.ZoneSanitaire, ESLOTS1.SurTable, ESLOTS1.QuantitePesee, ESLOTS1.PUAchat, ESLOTS1.QuantiteRestant, ESLOTS1.Commentaires
FROM (STOCK RIGHT JOIN ESLOTS1 ON STOCK.IDstock = ESLOTS1.IDstock) LEFT JOIN FOURNISSEUR ON ESLOTS1.IDfournisseur = FOURNISSEUR.IDfournisseur
WHERE (((ESLOTS1.DateEntree) Between Date()-18 And Date()) AND ((ESLOTS1.QuantiteRestant)>0) AND ((CBool([Lot_Termine]))=0) AND ((STOCK.iDGamme)=1)) OR (((ESLOTS1.DateEntree) Between Date()-2 And Date()) AND ((STOCK.iDGamme)=1));