Added ST Number to bill.

Fixed error were unprinted bill was not removed from table when voided.
This commit is contained in:
Tanshu
2012-12-01 15:19:33 +05:30
parent 2d1030abf6
commit 843d644154
8 changed files with 68 additions and 43 deletions

View File

@ -49,9 +49,9 @@ namespace Tanshu.Accounts.Repository
public void UpdateStatus(Voucher voucher)
{
string status;
if (!voucher.Printed)
if (!voucher.Printed && !voucher.Void)
status = "running";
else if (voucher.Settlements.Count(x => x.Settled == SettleOption.Unsettled) != 0 && voucher.Void == false)
else if (voucher.Settlements.Count(x => x.Settled == SettleOption.Unsettled) != 0 && !voucher.Void)
status = "printed";
else
status = null;