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:
13
Tanshu.Accounts.Contracts/Data Contracts/ReprintBO.cs
Normal file
13
Tanshu.Accounts.Contracts/Data Contracts/ReprintBO.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using Tanshu.Accounts.Entities.Auth;
|
||||
|
||||
namespace Tanshu.Accounts.Entities
|
||||
{
|
||||
public class Reprint
|
||||
{
|
||||
public virtual int ReprintID { get; set; }
|
||||
public virtual User User { get; set; }
|
||||
public virtual DateTime Date { get; set; }
|
||||
public virtual Voucher Voucher { get; set; }
|
||||
}
|
||||
}
|
||||
@ -8,27 +8,56 @@ namespace Tanshu.Accounts.Entities
|
||||
{
|
||||
public class Voucher
|
||||
{
|
||||
public Voucher()
|
||||
protected Voucher()
|
||||
{
|
||||
Kots = new List<Kot>();
|
||||
Settlements = new List<VoucherSettlement>();
|
||||
}
|
||||
|
||||
public virtual int VoucherID { get; set; }
|
||||
public virtual DateTime? Date { get; set; }
|
||||
public Voucher(User user)
|
||||
: this()
|
||||
{
|
||||
this._date = null;
|
||||
this.User = user;
|
||||
}
|
||||
|
||||
protected int _voucherID;
|
||||
public virtual int VoucherID
|
||||
{
|
||||
get { return _voucherID; }
|
||||
}
|
||||
|
||||
protected DateTime? _date;
|
||||
public virtual DateTime? Date
|
||||
{
|
||||
get { return _date; }
|
||||
}
|
||||
|
||||
public virtual string Narration { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public virtual User User { get; set; }
|
||||
|
||||
protected DateTime _creationDate;
|
||||
[NotNull]
|
||||
public virtual DateTime CreationDate { get; set; }
|
||||
public virtual DateTime CreationDate
|
||||
{
|
||||
get { return _creationDate; }
|
||||
}
|
||||
|
||||
protected DateTime _lastEditDate;
|
||||
[NotNull]
|
||||
public virtual DateTime LastEditDate { get; set; }
|
||||
public virtual DateTime LastEditDate
|
||||
{
|
||||
get { return _lastEditDate; }
|
||||
}
|
||||
|
||||
protected string _billID;
|
||||
[NotNull]
|
||||
public virtual string BillID { get; set; }
|
||||
public virtual string BillID
|
||||
{
|
||||
get { return _billID; }
|
||||
}
|
||||
|
||||
[NotNull]
|
||||
public virtual string TableID { get; set; }
|
||||
@ -48,11 +77,33 @@ namespace Tanshu.Accounts.Entities
|
||||
[AllowNull]
|
||||
public virtual string VoidReason { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public virtual bool Printed { get; set; }
|
||||
protected bool _printed;
|
||||
|
||||
[NotNull]
|
||||
public virtual string KotID { get; set; }
|
||||
public virtual bool Printed
|
||||
{
|
||||
get
|
||||
{ return _printed; }
|
||||
set
|
||||
{
|
||||
if (_printed)
|
||||
return;
|
||||
if (value == false)
|
||||
return;
|
||||
_date = null;
|
||||
_printed = value;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable 649
|
||||
private string _kotID;
|
||||
#pragma warning restore 649
|
||||
|
||||
[NotNull]
|
||||
public virtual string KotID
|
||||
{
|
||||
get { return _kotID; }
|
||||
}
|
||||
|
||||
[Cascade]
|
||||
public virtual IList<Kot> Kots { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user