refactor(forcast): changes to consider a plants different addresses

This commit is contained in:
2025-06-11 20:51:43 -05:00
parent ed777437eb
commit 92c8fc2554

View File

@@ -117,7 +117,9 @@ export const pNgForecast = async (data: any, user: any) => {
const activeAV = article.filter(
(c: any) =>
c?.CustomerArticleNumber ===
nForecast[i]?.customerArticleNo.toString()
nForecast[i]?.customerArticleNo.toString() &&
// validate it works via the default address
c?.IdAdresse === parseInt(pNg[0].value)
);
if (activeAV.length > 0) {