Reprint and Printed bill editing logged.

Printed bill can no longer be changed, any changes voids the bill and prints a new one.
Added option to Split Bill.
Kot printed with right time.
Numerous bug fixes.
This commit is contained in:
unknown
2011-08-23 12:40:05 +05:30
parent 226cc30057
commit 831ec37cda
28 changed files with 625 additions and 286 deletions

View File

@ -77,8 +77,9 @@ namespace Tanshu.Accounts.Contracts
var output = string.Format("{0} @ Rs. {1:#.##}", Name, Price);
if (_discount != 0)
output += string.Format(" - {0:#.##%}", _discount);
foreach (var item in Modifiers)
output += string.Format("\n\r -- {0}", item.Name);
if (Modifiers != null)
foreach (var item in Modifiers)
output += string.Format("\n\r -- {0}", item.Name);
return output;
//if (Price == 0)
@ -96,10 +97,45 @@ namespace Tanshu.Accounts.Contracts
public IList<Modifier> Modifiers { get; set; }
public BillItemValue(Product product)
{
Quantity = 1;
Printed = false;
Modifiers = new List<Modifier>();
Product = product;
if (product != null)
{
Product = product;
ProductID = product.ProductID;
Name = product.Units == string.Empty ? product.Name : product.Name + " (" + product.Units + ")";
Quantity = 1;
Price = product.SalePrice;
Tax = product.Tax.Rate;
ServiceCharge = product.ServiceCharge;
Discount = 0;
Printed = false;
}
}
public BillItemValue()
{
Product = null;
ProductID = 0;
Discount = 0;
Name = "== New Kot ==";
Price = 0;
Printed = true;
Quantity = 0;
Tax = -1;
ServiceCharge = 0;
}
public BillItemValue(Kot kot)
{
Product = null;
ProductID = kot.KotID;
Discount = 0;
Name = string.Format("Kot: {0} / {1:dd-MMM HH:mm} ({2})", kot.Code, kot.Date, kot.User.Name);
Price = 0;
Printed = true;
Quantity = 0;
Tax = -1;
ServiceCharge = 0;
}
}
}
}