Contacts and Commodities

This commit is contained in:
2021-08-05 20:36:06 +01:00
parent afd38cea03
commit f5e0b925fb
33 changed files with 694 additions and 505 deletions
@@ -65,6 +65,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
return new List<StringPair>()
{
new StringPair("Id",SysId.ToString(commodity.Id)),
new StringPair("Code",commodity.Code),
new StringPair("DescBrief",commodity.DescBrief),
new StringPair("Status",commodity.StatusCode)
};
@@ -2295,16 +2296,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
//---------------------------------------------------------------
// Organisation.
if (SysId.IsValid(prm.AffiliateIdOrganisation))
filter.Add(colCommodity_AffIdOwner + "=" + SysId.ToString(prm.AffiliateIdOrganisation));
else
// Must filter by organisation if insufficient alternative filetrs.
if (!prm.IncludedIds.HasValidIds() && !prm.PriceSetIdsIncluded.HasValidIds() && !SysId.IsValid(prm.AssociationIdCustomer) && !SysId.IsValid(prm.AssociationIdCommodityCustomer))
{
// Must filter by organisation if insufficient alternative filetrs.
if (!prm.IncludedIds.HasValidIds() && !prm.PriceSetIdsIncluded.HasValidIds() && !SysId.IsValid(prm.AssociationIdCustomer) && !SysId.IsValid(prm.AssociationIdCommodityCustomer))
{
if (!SysId.IsValid(AffiliateId_Owner)) throw new NotSupportedException("Commodity query filter - Organisation Id must be specified");
filter.Add(colCommodity_AffIdOwner + "=" + SysId.ToString(AffiliateId_Owner));
}
if (!SysId.IsValid(AffiliateId_Owner)) throw new NotSupportedException("Commodity query filter - Organisation Id must be specified");
filter.Add(colCommodity_AffIdOwner + "=" + SysId.ToLong(AffiliateId_Owner));
}
//---------------------------------------------------------------