Fix: Updated PrintBill where discount is showed on screen before printing bill.
Fix: Updated Product Page so that HappyHour is updated properly
This commit is contained in:
@ -381,19 +381,10 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
ClearBill();
|
||||
return true;
|
||||
}
|
||||
public bool SaveAndPrintBill()
|
||||
public bool CanSaveBill(bool isPrinted, bool isVoid)
|
||||
{
|
||||
#region Check if Allowed
|
||||
if (!Session.IsAllowed("Print Bill") || _bill.Count(x => x.Key.BillItemType != BillItemType.Kot) == 0)
|
||||
return false;
|
||||
bool isPrinted = false, isVoid = false;
|
||||
if (_voucher.VoucherID != Guid.Empty)
|
||||
using (var bi = new VoucherBI())
|
||||
{
|
||||
var dbVoucher = bi.Get(x => x.VoucherID == _voucher.VoucherID);
|
||||
isPrinted = dbVoucher.Printed;
|
||||
isVoid = dbVoucher.Void;
|
||||
}
|
||||
if (isVoid)
|
||||
{
|
||||
MessageBox.Show(string.Format("This Bill is already void.\nReason: {0}", _voucher.VoidReason), "Bill already Voided", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
@ -401,11 +392,10 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
}
|
||||
if (isPrinted && !Session.IsAllowed("Edit Printed Bill"))
|
||||
return false;
|
||||
#endregion
|
||||
|
||||
var amount = _bill.NetAmount;
|
||||
|
||||
SetDiscount();
|
||||
return true;
|
||||
}
|
||||
public bool SaveAndPrintBill(bool isPrinted, decimal amount)
|
||||
{
|
||||
if (isPrinted)
|
||||
{
|
||||
SaveReprintOrDiscountBill(amount);
|
||||
|
||||
Reference in New Issue
Block a user