3.0.0.4 Portal Commodity Sales properties. Control Index population.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "3.0.0.3";
|
||||
private static String version { get; } = "3.0.0.4";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion() { return version; }
|
||||
public static String GetAppVersion()
|
||||
@@ -42,6 +42,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
// 3.0.0.1 08-Feb-25 Demo repository registration.
|
||||
// 3.0.0.2 08-Feb-25 Production SMTP config.
|
||||
// 3.0.0.3 10-Feb-25 Osie feedback #1. Control Repository Schema, Logs.
|
||||
// 3.0.0.4 11-Feb-25 Portal Commodity Sales properties. Control Index population.
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -61,6 +61,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
public static int MaxLength { get; } = 16;
|
||||
}
|
||||
}
|
||||
public class Logging
|
||||
{
|
||||
public class Folder
|
||||
{
|
||||
public static String WebControl { get; } = "WebControl";
|
||||
public static String WebPortal { get; } = "WebPortal";
|
||||
public static String WebApi { get; } = "Api";
|
||||
}
|
||||
}
|
||||
public class Portal
|
||||
{
|
||||
public static class Session
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 6-Feb-2025 13:02:20
|
||||
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
{
|
||||
|
||||
@@ -551,6 +551,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// T a x C o d e s
|
||||
//-------------------------------------------------------------------
|
||||
public String GetDefaultTaxCode()
|
||||
{
|
||||
return StringUtil.OnBlank(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.TaxCodeType).GetCodeForType(SaTaxCodeType.Std), $"{SaTaxCodeType.Std}");
|
||||
}
|
||||
private void populateTaxCodes()
|
||||
{
|
||||
if (taxCodes != null) return;
|
||||
@@ -563,6 +567,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
populateTaxCodes();
|
||||
return new List<SaTaxCode>(taxCodes.Values);
|
||||
}
|
||||
public List<SaTaxCode> GetTaxCodesEffectiveOn(DateTime effectiveOn)
|
||||
{
|
||||
populateTaxCodes();
|
||||
return new List<SaTaxCode>(taxCodes.Values.Where(tax => tax.IsEffectiveOn(effectiveOn)));
|
||||
}
|
||||
public SaTaxCode GetTaxCodeById(SysId taxCodeId)
|
||||
{
|
||||
if (!SysId.IsValid(taxCodeId)) return null;
|
||||
@@ -573,6 +582,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// U n i t s O f M e a s u r e
|
||||
//-------------------------------------------------------------------
|
||||
public SaUomType GetDefaultUomType()
|
||||
{
|
||||
return SaUomType.Pack_Each;
|
||||
}
|
||||
private void populateUnitsOfMeasure()
|
||||
{
|
||||
if (unitsOfMeasure != null) return;
|
||||
@@ -591,9 +604,17 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
populateUnitsOfMeasure();
|
||||
return unitsOfMeasure.GetValueOrDefault(unitMeasureId);
|
||||
}
|
||||
public SaUomType GetUnitOfMeasureType(SysId unitMeasureId)
|
||||
{
|
||||
return GetUnitOfMeasureById(unitMeasureId)?.UnitType ?? SaUomType.Unknown;
|
||||
}
|
||||
public String GetUnitOfMeasureCode(SysId unitMeasureId)
|
||||
{
|
||||
return GetUnitOfMeasureById(unitMeasureId)?.Code ?? "";
|
||||
}
|
||||
public String GetUnitOfMeasureCaption(SysId unitMeasureId)
|
||||
{
|
||||
return GetUnitOfMeasureById(unitMeasureId)?.Single ?? "";
|
||||
return GetUnitOfMeasureById(unitMeasureId)?.GetCaption() ?? "";
|
||||
}
|
||||
public List<SaUnitMeasure> GetUnitsOfMeasureByCategory(SaUomCategory uomCategory)
|
||||
{
|
||||
|
||||
@@ -514,59 +514,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
// Reference.
|
||||
|
||||
// Region Type.
|
||||
systemCodes[Sbm.SystemCode.RegionType] = new List<TypeCodeDesc>()
|
||||
{
|
||||
new TypeCodeDesc((int)SaRegionType.Continent, "CON", "Continent"),
|
||||
new TypeCodeDesc((int)SaRegionType.Country, "COU", "Country"),
|
||||
new TypeCodeDesc((int)SaRegionType.Province, "PRO", "Province"),
|
||||
new TypeCodeDesc((int)SaRegionType.Town, "TWN", "Town")
|
||||
};
|
||||
systemCodes[Sbm.SystemCode.RegionType] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.RegionType));
|
||||
|
||||
// Unit Measure Category.
|
||||
systemCodes[Sbm.SystemCode.UnitMeasureCategory] = new List<TypeCodeDesc>()
|
||||
{
|
||||
new TypeCodeDesc((int)SaUomCategory.Time, "TIM", "Time"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Pack, "PCK", "Pack"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Weight, "WEI", "Weight"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Length, "LEN", "Length"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Area, "ARE", "Area"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Volume, "VOL", "Volume"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Density, "DEN", "Density"),
|
||||
new TypeCodeDesc((int)SaUomCategory.Box, "BOX", "Box (container)")
|
||||
};
|
||||
systemCodes[Sbm.SystemCode.UnitMeasureCategory] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.UnitMeasureCategory));
|
||||
|
||||
// Unit Measure Type.
|
||||
systemCodes[Sbm.SystemCode.UnitMeasureType] = new List<TypeCodeDesc>()
|
||||
{
|
||||
new TypeCodeDesc((int)SaUomType.Time_Second, "SEC", "Second"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Minute, "MIN", "Minute"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Hour, "HR", "Hour"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Day, "DAY", "Day"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_WorkingDay, "WDAY", "Working day"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Week, "WK", "Week"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_WorkingWeek, "WWK", "Working week"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Fortnight, "FNT", "Fortnight"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Month, "MTH", "Month"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Quarter, "QTR", "Quarter"),
|
||||
new TypeCodeDesc((int)SaUomType.Time_Year, "YR", "Year"),
|
||||
new TypeCodeDesc((int)SaUomType.Pack_Each, "EACH", "Each"),
|
||||
new TypeCodeDesc((int)SaUomType.Pack_Set, "SET", "Set"),
|
||||
new TypeCodeDesc((int)SaUomType.Weight_Gram, "GRM", "Gram"),
|
||||
new TypeCodeDesc((int)SaUomType.Weight_Kilogram, "KG", "Kilogram"),
|
||||
new TypeCodeDesc((int)SaUomType.Weight_Tonne, "TON", "Tonne"),
|
||||
new TypeCodeDesc((int)SaUomType.Length_Metre, "METRE", "Metre"),
|
||||
new TypeCodeDesc((int)SaUomType.Length_Kilometre, "KMET", "Kilometre"),
|
||||
new TypeCodeDesc((int)SaUomType.Length_SquareMetre, "SQMET", "Square metre"),
|
||||
new TypeCodeDesc((int)SaUomType.Length_Hectare, "HECT", "Hectare"),
|
||||
new TypeCodeDesc((int)SaUomType.Length_Acre, "ACRE", "Acre"),
|
||||
new TypeCodeDesc((int)SaUomType.Volume_Litre, "LITRE", "Litre"),
|
||||
new TypeCodeDesc((int)SaUomType.Volume_CubicMetre, "CUBMET", "Cubic metre"),
|
||||
new TypeCodeDesc((int)SaUomType.Density_KilogramsPerCubicMetre, "KPCMET", "Kg/m3"),
|
||||
new TypeCodeDesc((int)SaUomType.Density_GramsPerCubicCentimeter, "GPCCMET", "g/cm3"),
|
||||
new TypeCodeDesc((int)SaUomType.Box_Box, "BOX", "Box"),
|
||||
new TypeCodeDesc((int)SaUomType.Box_Carton, "CARTON", "Carton"),
|
||||
new TypeCodeDesc((int)SaUomType.Box_Pallet, "PALLET", "Pallet")
|
||||
};
|
||||
systemCodes[Sbm.SystemCode.UnitMeasureType] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.UnitMeasureType));
|
||||
|
||||
// Financial Type.
|
||||
systemCodes[Sbm.SystemCode.FinancialType] = new List<TypeCodeDesc>()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.ReferenceData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -166,6 +167,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Data
|
||||
public String Code { get; set; }
|
||||
public String Caption { get; set; }
|
||||
public decimal SalePrice { get; set; }
|
||||
public SaUomType SaleUnitType { get; set; } = SaUomType.Pack_Each;
|
||||
}
|
||||
public class StockCommodityData : CommodityData
|
||||
{
|
||||
@@ -177,7 +179,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Data
|
||||
}
|
||||
public class ServiceCommodityData : CommodityData
|
||||
{
|
||||
public ServiceCommodityData() : base(Sbm.CommodityType.Service) { }
|
||||
public ServiceCommodityData() : base(Sbm.CommodityType.Service)
|
||||
{
|
||||
SaleUnitType = SaUomType.Time_Hour;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user