Contacts and Commodities
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user