Breaking Change: Changed Kot/Voucher Table Name to Guid Foreign key

Breaking Change: Renamed Discontinued to IsActive and added NA field to products.
Cleanup: Removed not used attributes
Change: RoleConstants changed to simple string
Feature: Table Create/Edit/Reorder and Modifier Create/Edit Form
Feature: Bills now show the Tax name from the database and not a hack
This commit is contained in:
tanshu
2014-10-16 16:41:55 +05:30
parent 69617949bd
commit da929ad036
76 changed files with 3472 additions and 1175 deletions

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Tanshu.Accounts.Contracts;
using Tanshu.Accounts.Contracts.Attributes;
using Tanshu.Accounts.Entities.Auth;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
@ -24,11 +23,11 @@ namespace Tanshu.Accounts.Entities
VoucherType = VoucherType.Regular;
}
public Voucher(User user, Customer customer, string table, Waiter waiter, bool printed, bool isVoid, string narration)
public Voucher(User user, Customer customer, FoodTable table, Waiter waiter, bool printed, bool isVoid, string narration)
: this(user)
{
Customer = customer;
TableID = table;
Table = table;
Waiter = waiter;
Printed = printed;
Void = isVoid;
@ -45,7 +44,7 @@ namespace Tanshu.Accounts.Entities
public virtual DateTime CreationDate { get; set; }
public virtual DateTime LastEditDate { get; set; }
public virtual string BillID { get; set; }
public virtual string TableID { get; set; }
public virtual FoodTable Table { get; set; }
public virtual Waiter Waiter { get; set; }
public virtual Customer Customer { get; set; }
public virtual IList<VoucherSettlement> Settlements { get; set; }
@ -75,7 +74,6 @@ namespace Tanshu.Accounts.Entities
Property(x => x.CreationDate, map => map.NotNullable(true));
Property(x => x.LastEditDate, map => map.NotNullable(true));
Property(x => x.BillID, map => map.NotNullable(true));
Property(x => x.TableID, map => map.NotNullable(true));
Property(x => x.Void, map => map.NotNullable(true));
Property(x => x.VoidReason);
Property(x => x.Printed, map => map.NotNullable(true));
@ -86,6 +84,12 @@ namespace Tanshu.Accounts.Entities
map.NotNullable(true);
map.Cascade(Cascade.None);
});
ManyToOne(x => x.Table, map =>
{
map.Column("TableID");
map.NotNullable(true);
map.Cascade(Cascade.None);
});
ManyToOne(x => x.Waiter, map =>
{