select firstonly salesLine where salesLine.SalesId == salesTableLocal.SalesId
&& (salesLine.SalesStatus != SalesStatus::Delivered || salesLine.SalesStatus == SalesStatus::Invoiced)
&& ((salesLine.InventRefType == InventRefType::Production && salesLine.InventRefId != "" && prodTable.ProdStatus != ProdStatus::Completed)
|| (salesLine.TrackingType == TrackingType::Production && !salesLine.Number() && prodTable.ProdStatus != ProdStatus::Completed));
No comments:
Post a Comment