public Order AddOrder(AccountTransactionType template, Department department, string userName, MenuItem menuItem, IList <TaxTemplate> taxTemplates, MenuItemPortion portion, string priceTag, ProductTimer timer) { UnLock(); var order = new Order(); order.UpdateMenuItem(userName, menuItem, taxTemplates, portion, priceTag, 1); order.AccountTransactionTypeId = template.Id; order.WarehouseId = department.WarehouseId; order.DepartmentId = department.Id; TransactionDocument.AddSingletonTransaction(template.Id, template, GetTicketAccounts()); if (taxTemplates != null) { foreach (var taxTemplate in taxTemplates) { TransactionDocument.AddSingletonTransaction(taxTemplate.AccountTransactionType.Id, taxTemplate.AccountTransactionType, GetTicketAccounts()); } } order.UpdateProductTimer(timer); Orders.Add(order); return(order); }
public Order AddOrder(AccountTransactionType template, string userName, MenuItem menuItem, MenuItemPortion portion, string priceTag, ProductTimer timer) { Locked = false; var order = new Order(); order.UpdateMenuItem(userName, menuItem, portion, priceTag, 1); order.AccountTransactionTypeId = template.Id; TransactionDocument.AddSingletonTransaction(template.Id, template, AccountTypeId, AccountId); if (menuItem.TaxTemplate != null) { TransactionDocument.AddSingletonTransaction(order.TaxTempleteAccountTransactionTypeId, menuItem.TaxTemplate.AccountTransactionType, AccountTypeId, AccountId); } order.UpdateProductTimer(timer); Orders.Add(order); return(order); }
public Order AddOrder(AccountTransactionType template, string userName, MenuItem menuItem, MenuItemPortion portion, string priceTag, ProductTimer timer) { Locked = false; var order = new Order(); order.UpdateMenuItem(userName, menuItem, portion, priceTag, 1); order.AccountTransactionTypeId = template.Id; TransactionDocument.AddSingletonTransaction(template.Id, template, AccountTypeId, AccountId); if (menuItem.TaxTemplate != null) { TransactionDocument.AddSingletonTransaction(order.TaxTempleteAccountTransactionTypeId, menuItem.TaxTemplate.AccountTransactionType, AccountTypeId, AccountId); } order.UpdateProductTimer(timer); Orders.Add(order); return order; }
public Order AddOrder(AccountTransactionTemplate template, string userName, MenuItem menuItem, MenuItemPortion portion, string priceTag) { Locked = false; var tif = new Order(); tif.UpdateMenuItem(userName, menuItem, portion, priceTag, 1); tif.AccountTransactionTemplateId = template.Id; if (AccountTransactions.AccountTransactions.SingleOrDefault(x => x.AccountTransactionTemplateId == template.Id) == null) { var transaction = AccountTransaction.Create(template); transaction.UpdateAccounts(AccountTemplateId, AccountId); AccountTransactions.AccountTransactions.Add(transaction); } if (tif.AccountTransactionTaxTemplateId > 0 && AccountTransactions.AccountTransactions .SingleOrDefault(x => x.AccountTransactionTemplateId == tif.AccountTransactionTaxTemplateId) == null) { var transaction = AccountTransaction.Create(menuItem.TaxTemplate.AccountTransactionTemplate); transaction.UpdateAccounts(AccountTemplateId, AccountId); AccountTransactions.AccountTransactions.Add(transaction); } Orders.Add(tif); return tif; }
public Order AddOrder(AccountTransactionType template, Department department, string userName, MenuItem menuItem, IList<TaxTemplate> taxTemplates, MenuItemPortion portion, string priceTag, ProductTimer timer) { UnLock(); var order = new Order(); order.UpdateMenuItem(userName, menuItem, taxTemplates, portion, priceTag, 1); order.AccountTransactionTypeId = template.Id; order.WarehouseId = department.WarehouseId; order.DepartmentId = department.Id; TransactionDocument.AddSingletonTransaction(template.Id, template, GetTicketAccounts()); if (taxTemplates != null) { foreach (var taxTemplate in taxTemplates) { TransactionDocument.AddSingletonTransaction(taxTemplate.AccountTransactionType.Id, taxTemplate.AccountTransactionType, GetTicketAccounts()); } } order.UpdateProductTimer(timer); Orders.Add(order); return order; }