Added Basecode to Product
Added Voucher Type During Printing Added Discount Report Fixed Void bill table not getting cleared error Added PAX to table Removed Itital Setup button in MainForm as it was not doing anything
This commit is contained in:
@ -15,6 +15,7 @@ namespace Tanshu.Accounts.Contracts
|
||||
public virtual string Product { get; set; }
|
||||
public virtual decimal Sale { get; set; }
|
||||
public virtual decimal NC { get; set; }
|
||||
public virtual decimal Staff { get; set; }
|
||||
}
|
||||
public class BillDetail
|
||||
{
|
||||
|
||||
@ -18,5 +18,9 @@ namespace Tanshu.Accounts.Entities
|
||||
public virtual decimal FullPrice { get; set; }
|
||||
public virtual bool Discontinued { get; set; }
|
||||
public virtual int SortOrder { get; set; }
|
||||
[NotNull]
|
||||
public virtual int BaseCode { get; set; }
|
||||
[NotNull]
|
||||
public virtual decimal Quantity { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,13 +12,17 @@ namespace Tanshu.Accounts.Entities
|
||||
CreditCard = 3,
|
||||
[Display("No Charge", true, 3)]
|
||||
NoCharge = 4,
|
||||
[Display("Bill To Company", true, 4)]
|
||||
[Display("Bill To Company", true, 2)]
|
||||
BillToCompany = 5,
|
||||
[Display("Tip", true, 2)]
|
||||
Tip = 6,
|
||||
[Display("Round Off", false, 1)]
|
||||
RoundOff = 7,
|
||||
[Display("Amount", false, 1)]
|
||||
Amount = 8
|
||||
Amount = 8,
|
||||
[Display("Settled", false, 1)]
|
||||
Settled = 9,
|
||||
[Display("Staff",true,4)]
|
||||
Staff = 10
|
||||
}
|
||||
}
|
||||
@ -19,6 +19,19 @@ namespace Tanshu.Accounts.Entities
|
||||
{
|
||||
this._date = null;
|
||||
this.User = user;
|
||||
VoucherType = VoucherType.Regular;
|
||||
}
|
||||
|
||||
public Voucher(User user, Customer customer, string table, Waiter waiter ,bool printed, bool isVoid, string narration )
|
||||
: this(user)
|
||||
{
|
||||
Customer = customer;
|
||||
TableID = table;
|
||||
Waiter = waiter;
|
||||
_printed = printed;
|
||||
Void = isVoid;
|
||||
Narration = narration;
|
||||
VoucherType = VoucherType.Regular;
|
||||
}
|
||||
|
||||
protected int _voucherID;
|
||||
@ -33,7 +46,7 @@ namespace Tanshu.Accounts.Entities
|
||||
get { return _date; }
|
||||
}
|
||||
|
||||
public virtual string Narration { get; set; }
|
||||
public virtual int Pax { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public virtual User User { get; set; }
|
||||
@ -71,6 +84,8 @@ namespace Tanshu.Accounts.Entities
|
||||
[Cascade]
|
||||
public virtual IList<VoucherSettlement> Settlements { get; set; }
|
||||
|
||||
public virtual string Narration { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public virtual bool Void { get; set; }
|
||||
|
||||
@ -95,9 +110,9 @@ namespace Tanshu.Accounts.Entities
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable 649
|
||||
public virtual VoucherType VoucherType { get; set; }
|
||||
|
||||
private string _kotID;
|
||||
#pragma warning restore 649
|
||||
|
||||
[NotNull]
|
||||
public virtual string KotID
|
||||
|
||||
16
Tanshu.Accounts.Contracts/Data Contracts/VoucherType.cs
Normal file
16
Tanshu.Accounts.Contracts/Data Contracts/VoucherType.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using Tanshu.Accounts.Contracts;
|
||||
|
||||
namespace Tanshu.Accounts.Entities
|
||||
{
|
||||
public enum VoucherType
|
||||
{
|
||||
[Display("Regular Bill", true, 2)]
|
||||
Regular = 1,
|
||||
[Display("No Charge", true, 3)]
|
||||
NoCharge = 2,
|
||||
[Display("Take Away", true, 2)]
|
||||
TakeAway = 3,
|
||||
[Display("Staff Bill", true, 4)]
|
||||
Staff = 4,
|
||||
}
|
||||
}
|
||||
@ -20,5 +20,10 @@ namespace Tanshu.Common.Helpers
|
||||
var attribute = (DisplayAttribute)settleOption.GetType().GetField(settleOption.ToString()).GetCustomAttributes(typeof(DisplayAttribute), false)[0];
|
||||
return attribute;
|
||||
}
|
||||
public static DisplayAttribute Attribute(this VoucherType settleOption)
|
||||
{
|
||||
var attribute = (DisplayAttribute)settleOption.GetType().GetField(settleOption.ToString()).GetCustomAttributes(typeof(DisplayAttribute), false)[0];
|
||||
return attribute;
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Tanshu.Accounts.Contracts/Helper Functions/StringHelper.cs
Normal file
26
Tanshu.Accounts.Contracts/Helper Functions/StringHelper.cs
Normal file
@ -0,0 +1,26 @@
|
||||
namespace Tanshu.Common.Helpers
|
||||
{
|
||||
public enum Align
|
||||
{
|
||||
Left = 1,
|
||||
Centre = 2,
|
||||
Right = 4
|
||||
}
|
||||
|
||||
public static class StringHelper
|
||||
{
|
||||
public static string Center(this string input, int width)
|
||||
{
|
||||
if (input.Length > width)
|
||||
return input;
|
||||
var left = ((width - input.Length) / 2) + input.Length;
|
||||
input = string.Format("{0,-" + left + "}", input);
|
||||
return string.Format("{0," + width + "}", input);
|
||||
}
|
||||
|
||||
public static string Center42(this string input)
|
||||
{
|
||||
return Center(input, 42);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -37,10 +37,12 @@ namespace Tanshu.Accounts.Contracts
|
||||
public static RoleConstants PRINT_KOT = new RoleConstants("Sales/PrintKOT");
|
||||
public static RoleConstants SALES = new RoleConstants("Sales/SalesBill");
|
||||
|
||||
public static RoleConstants DISCOUNT_REPORT = new RoleConstants("Discount Report");
|
||||
public static RoleConstants VOID_OR_REPRINTED_BILL_REPORT = new RoleConstants("Void or Reprinted Bill Report");
|
||||
public static RoleConstants BILL_DETAILS = new RoleConstants("Sales/BillDetails");
|
||||
public static RoleConstants SALE_ANALYSIS = new RoleConstants("Sales/SaleAnalysis");
|
||||
public static RoleConstants SALE_DETAIL = new RoleConstants("Sales/SaleDetail");
|
||||
public static RoleConstants ACCOUNTS_AUDIT = new RoleConstants("Accounts Audit");
|
||||
|
||||
public static RoleConstants SPLIT_BILL = new RoleConstants("Split Bill");
|
||||
public static RoleConstants VOID_BILL = new RoleConstants("Sales/VoidPrintedBill");
|
||||
|
||||
@ -100,6 +100,7 @@
|
||||
<Compile Include="Data Contracts\Auth\RoleGroup.cs" />
|
||||
<Compile Include="Data Contracts\Auth\Group.cs" />
|
||||
<Compile Include="Data Contracts\Auth\Role.cs" />
|
||||
<Compile Include="Data Contracts\VoucherType.cs" />
|
||||
<Compile Include="Data Contracts\ReprintBO.cs" />
|
||||
<Compile Include="Data Contracts\VoucherSettlementBO.cs" />
|
||||
<Compile Include="Data Contracts\KotBO.cs" />
|
||||
@ -120,6 +121,7 @@
|
||||
<Compile Include="Data Contracts Display\PendingBillsBO.cs" />
|
||||
<Compile Include="Data Contracts\ProductBO.cs" />
|
||||
<Compile Include="Data Contracts\ProductGroupBO.cs" />
|
||||
<Compile Include="Helper Functions\StringHelper.cs" />
|
||||
<Compile Include="Helper Functions\ReflectionHelper.cs" />
|
||||
<Compile Include="Helper Functions\EnumHelper.cs" />
|
||||
<Compile Include="nHibernate\IAuditable.cs" />
|
||||
|
||||
Reference in New Issue
Block a user