Scripts to transition database to new version.

Changed inventory and product entities to split Vat and Service Tax and IsScTaxable.
Added MessageBox on startup to inform about Debug Mode.
Updated ProductForm for the change.
Work still needs to be done on Thermal Printing where the hack for VAT on Food and VAT on Liqour is still there.
Now No Service Tax on Delivery Works as promised.
This commit is contained in:
unknown
2012-04-08 17:58:15 +05:30
parent 964d0a78bf
commit 2d1030abf6
20 changed files with 519 additions and 145 deletions

View File

@ -27,12 +27,27 @@ namespace Tanshu.Accounts.Contracts
}
}
public decimal Tax { get; set; }
public decimal TaxAmount
public bool IsScTaxable { get; set; }
public decimal ServiceTax { get; set; }
public decimal ServiceTaxAmount
{
get
{
return Quantity * Price * (1 - _discount) * (1 + ServiceCharge) * Tax;
if (IsScTaxable)
return Quantity * Price * (1 - Discount) * (1 + ServiceCharge) * ServiceTax;
return Quantity * Price * (1 - Discount) * ServiceTax;
}
}
public decimal Vat { get; set; }
public decimal VatAmount
{
get
{
if (IsScTaxable)
return Quantity * Price * (1 - Discount) * (1 + ServiceCharge) * Vat;
return Quantity * Price * (1 - Discount) * Vat;
}
}
@ -41,7 +56,7 @@ namespace Tanshu.Accounts.Contracts
{
get
{
return Quantity * Price * (1 - _discount) * ServiceCharge;
return Quantity * Price * (1 - Discount) * ServiceCharge;
}
}
@ -49,7 +64,7 @@ namespace Tanshu.Accounts.Contracts
{
get
{
return Quantity * Price * _discount;
return Quantity * Price * Discount;
}
}
@ -57,7 +72,7 @@ namespace Tanshu.Accounts.Contracts
{
get
{
return Quantity * Price * (1 - _discount);
return Quantity * Price * (1 - Discount);
}
}
@ -67,7 +82,9 @@ namespace Tanshu.Accounts.Contracts
{
get
{
return Price * Quantity * (1 - _discount) * (1 + ServiceCharge) * (1 + Tax);
if (IsScTaxable)
return Quantity * Price * (1 - Discount) * (1 + ServiceCharge) * (1 + ServiceTax + Vat);
return Quantity * Price * (1 - Discount) * (1 + ServiceCharge + ServiceTax + Vat);
}
}
@ -107,7 +124,9 @@ namespace Tanshu.Accounts.Contracts
Quantity = 1;
Price = product.Price;
FullPrice = product.FullPrice;
Tax = product.Tax.Rate;
IsScTaxable = product.IsScTaxable;
ServiceTax = product.ServiceTax.Rate;
Vat = product.Vat.Rate;
ServiceCharge = product.ServiceCharge;
Discount = 0;
Printed = false;
@ -123,7 +142,7 @@ namespace Tanshu.Accounts.Contracts
FullPrice = 0;
Printed = true;
Quantity = 0;
Tax = -1;
Vat = -1;
ServiceCharge = 0;
}
@ -137,7 +156,7 @@ namespace Tanshu.Accounts.Contracts
FullPrice = 0;
Printed = true;
Quantity = 0;
Tax = -1;
Vat = -1;
ServiceCharge = 0;
}