Skip to content

Commit

Permalink
Add centimetres as a default dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykPorabik committed Feb 12, 2021
1 parent 51f3fde commit c2e35fc
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions Grand.Services/Installation/CodeFirstInstallationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,31 +286,24 @@ protected virtual async Task InstallMeasures()
{
new MeasureDimension
{
Name = "inch(es)",
SystemKeyword = "inches",
Name = "centimetre(s)",
SystemKeyword = "centimetres",
Ratio = 1M,
DisplayOrder = 1,
},
new MeasureDimension
{
Name = "feet",
SystemKeyword = "feet",
Ratio = 0.08333333M,
Name = "inch(es)",
SystemKeyword = "inches",
Ratio = 0.393701M,
DisplayOrder = 2,
},
new MeasureDimension
{
Name = "meter(s)",
SystemKeyword = "meters",
Ratio = 0.0254M,
Name = "feet",
SystemKeyword = "feet",
Ratio = 0.0328084M,
DisplayOrder = 3,
},
new MeasureDimension
{
Name = "millimetre(s)",
SystemKeyword = "millimetres",
Ratio = 25.4M,
DisplayOrder = 4,
}
};

Expand Down Expand Up @@ -5122,7 +5115,7 @@ await _settingService.SaveSetting(new CurrencySettings {
});

await _settingService.SaveSetting(new MeasureSettings {
BaseDimensionId = _measureDimensionRepository.Table.Single(m => m.SystemKeyword == "inches").Id,
BaseDimensionId = _measureDimensionRepository.Table.Single(m => m.SystemKeyword == "centimetres").Id,
BaseWeightId = _measureWeightRepository.Table.Single(m => m.SystemKeyword == "lb").Id,
});

Expand Down

0 comments on commit c2e35fc

Please sign in to comment.