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:
tanshu
2016-05-12 14:41:02 +05:30
parent 5124347d1b
commit 5f0f80ed1e
4 changed files with 54 additions and 49 deletions

View File

@ -142,21 +142,18 @@ inner join v.Kots k
inner join k.Inventories i
inner join i.Vat va
where v.Date >= :startDate and v.Date <= :finishDate and v.Void = false
and exists (select Voucher from VoucherSettlement vs where vs.Voucher = v
and vs.Settled != :noCharge and vs.Settled != :unsettled and vs.Settled != :amount and vs.Settled != :roundoff and vs.Settled != :staff and vs.Settled != :void and vs.Settled != :tip)
and exists (
select Voucher from VoucherSettlement vs where vs.Voucher = v and vs.Settled in (:cash, :creditCard, :billToCompany)
)
group by i.VatRate, va.Name
";
var list = _session
.CreateQuery(query)
.SetParameter("startDate", startDate)
.SetParameter("finishDate", finishDate)
.SetParameter("noCharge", SettleOption.NoCharge)
.SetParameter("unsettled", SettleOption.Unsettled)
.SetParameter("amount", SettleOption.Amount)
.SetParameter("roundoff", SettleOption.RoundOff)
.SetParameter("staff", SettleOption.Staff)
.SetParameter("void", SettleOption.Void)
.SetParameter("tip", SettleOption.Tip)
.SetParameter("cash", SettleOption.Cash)
.SetParameter("creditCard", SettleOption.CreditCard)
.SetParameter("billToCompany", SettleOption.BillToCompany)
.List<object[]>();
foreach (var item in list)
outList.Add(new TaxAnalysis() { Name = string.Format("{0} - {1:#.##%;(#.##%);0%}", (string)item[0], (decimal)item[1]), TaxRate = (decimal)item[1], TaxAmount = (decimal)item[2], NetSale = (decimal)item[3] });