Refactor: Instead of a concept of Price/FullPrice, happy hour is now a checkbox in the product.
This needed major refactor in all parts dealing with product or inventory.
This commit is contained in:
@ -15,7 +15,7 @@ namespace Tanshu.Accounts.Contracts
|
||||
{
|
||||
if (inventory != null)
|
||||
{
|
||||
var output = string.Format("{0} @ Rs. {1:#.##}", inventory.Product.FullName, inventory.Price);
|
||||
var output = string.Format("{0} @ Rs. {1:#.##}", inventory.EffectiveName, inventory.Price);
|
||||
if (inventory.Discount != 0)
|
||||
output += string.Format(" - {0:#.##%}", inventory.Discount);
|
||||
foreach (var item in inventory.InventoryModifier)
|
||||
@ -36,12 +36,12 @@ namespace Tanshu.Accounts.Contracts
|
||||
{
|
||||
inventory = inv;
|
||||
}
|
||||
public BillItemValue(Product product)
|
||||
public BillItemValue(Product product, bool isHappyHour)
|
||||
{
|
||||
inventory = new Inventory()
|
||||
{
|
||||
Product = product,
|
||||
FullPrice = product.FullPrice,
|
||||
IsHappyHour = isHappyHour,
|
||||
Price = product.Price,
|
||||
IsScTaxable = product.IsScTaxable,
|
||||
Quantity = 1,
|
||||
|
||||
Reference in New Issue
Block a user