|
|
@@ -32,10 +32,10 @@ namespace InABox.Core
|
|
|
|
|
|
public interface ITaxable
|
|
|
{
|
|
|
- double ExTax { get; set; }
|
|
|
- double TaxRate { get; set; }
|
|
|
- double Tax { get; set; }
|
|
|
- double IncTax { get; set; }
|
|
|
+ decimal ExTax { get; set; }
|
|
|
+ decimal TaxRate { get; set; }
|
|
|
+ decimal Tax { get; set; }
|
|
|
+ decimal IncTax { get; set; }
|
|
|
}
|
|
|
|
|
|
public interface IProblem
|
|
|
@@ -321,25 +321,25 @@ namespace InABox.Core
|
|
|
|
|
|
if (name.Equals("ExTax"))
|
|
|
{
|
|
|
- taxable.Tax = (double)after * (taxable.TaxRate / 100.0F);
|
|
|
- taxable.IncTax = (double)after + taxable.Tax;
|
|
|
+ taxable.Tax = (decimal)after * (taxable.TaxRate / 100);
|
|
|
+ taxable.IncTax = (decimal)after + taxable.Tax;
|
|
|
}
|
|
|
|
|
|
else if (name.Equals("TaxRate"))
|
|
|
{
|
|
|
- taxable.Tax = taxable.ExTax * ((double)after / 100.0F);
|
|
|
+ taxable.Tax = taxable.ExTax * ((decimal)after / 100);
|
|
|
taxable.IncTax = taxable.ExTax + taxable.Tax;
|
|
|
}
|
|
|
|
|
|
else if (name.Equals("Tax"))
|
|
|
{
|
|
|
- taxable.ExTax = taxable.IncTax - (double)after;
|
|
|
+ taxable.ExTax = taxable.IncTax - (decimal)after;
|
|
|
}
|
|
|
|
|
|
else if (name.Equals("IncTax"))
|
|
|
{
|
|
|
- taxable.ExTax = (double)after / ((100.0F + taxable.TaxRate) / 100.0F);
|
|
|
- taxable.Tax = (double)after - taxable.ExTax;
|
|
|
+ taxable.ExTax = (decimal)after / ((100 + taxable.TaxRate) / 100);
|
|
|
+ taxable.Tax = (decimal)after - taxable.ExTax;
|
|
|
}
|
|
|
|
|
|
}
|