public async Task <Report> CompleteCashDraw(CompleteCashDraw completeCashDraw) { var response = await _seralizeManager.CompleteCashDraw(completeCashDraw); await _reportsBusinessLogic.SaveReport(response); return(response); }
public async Task <FuelPrices> LoadPrices(bool grouped) { var result = await _fuelPumpSerializeManager.LoadPrices(grouped); if (result?.Report != null) { await _reportsBussinessLogic.SaveReport(result.Report); } return(result); }
public async Task <SetPriceDecrement> SetPriceDecrement(PriceDecrement price, bool taxExempt) { var result = await _fuelPriceSerializeManager.SetPriceDecrement(price, taxExempt); if (result?.Report != null) { await _reportsBussinessLogic.SaveReport(result.Report); } return(result); }
/// <summary> /// Voids the ongoing sale /// </summary> /// <param name="reason">Reason for voiding sale</param> /// <returns>Updated sale model</returns> public async Task <VoidSale> VoidSale(Reasons reason) { var response = await _serializeManager.VoidSale(reason); if (response.Receipt != null) { await _reportsBusinessLogic.SaveReport(response.Receipt); } return(response); }
//TODO: Move this to Sale business logic /// <summary> /// Completes a Bottle Return Sale /// </summary> /// <param name="sale">Bottle Return Sale</param> /// <returns>True when sale is completed and False if not</returns> public async Task <BottleReturn> CompleteBottleReturnSale(BottleReturnSale sale) { var response = await _serializeManager.AddBottleReturnSale(sale); await _reportBussinessLogic.SaveReport(response.Receipt); return(response); }
/// <summary> /// Closes the batch /// </summary> /// <returns>Success model</returns> public async Task <Report> CloseBatch() { var report = await _serializeManager.CloseBatch(); await _reportsBusinessLogic.SaveReport(report); return(report); }
public async Task <Report> GetDipInputReport() { var report = await _serializeManager.GetDipInputReport(); await _reportsBusinessLogic.SaveReport(report); return(report); }
public async Task <ExactChange> PayByExactChange() { var response = await _seralizemanager.PayByExactCash(); await _reportBusinessLogic.SaveReport(response.Report); return(response); }
/// <summary> /// Updates the tenders used in the Sale /// </summary> /// <param name="code">Code of the Tender</param> /// <param name="amount">Amount to be updated</param> /// <returns></returns> public async Task <TenderSummary> UpdateTender(string code, decimal?amount, string transactionType, bool isAmountEnteredManually = false) { // null is to be send if amount value if 0 //if (amount.HasValue) //{ // amount = null; //} var response = await _serializeManager.UpdateTender(code, amount, transactionType, isAmountEnteredManually); foreach (var report in response.Report) { await _reportsBusinessLogic.SaveReport(report); } return(response); }
private async Task GetReportSales() { var timer = new Stopwatch(); timer.Restart(); try { var response = await _reprintBusinessLogic.GetReprintReportSale(_selectedReportType, SelectedDate.Date.ToString(CultureInfo.InvariantCulture)); if (response.IsCloseBatchSale) { IsSearchBoxVisible = false; MapCloseBatchSale(response.CloseBatchSales); ShowCloseBacthSale(); var report = new Report { ReportContent = ReportContent, ReportName = "CloseBatch.txt", Copies = 0 }; await _reportsBussinessLogic.SaveReport(report); } else if (response.IsPayAtPumpSale) { IsSearchBoxVisible = true; MapPayAtPumpSales(response.PayAtPumpSales); ShowPayAtPumpSale(); } else if (response.IsPayInsideSale) { IsSearchBoxVisible = true; MapPayInsideSales(response.PayInsideSales); ShowPayInsideSale(); } else if (response.IsPaymentSale) { IsSearchBoxVisible = true; MapPaymentSale(response.PaymentSales); ShowPaymentSale(); } } catch (Exception) { IsCloseBatchSaleVisible = false; IsPaymentSaleVisible = false; IsPayAtPumpSaleVisible = false; IsPayInsideSaleVisible = false; throw; } finally { timer.Stop(); Log.Info(string.Format("Time taken in getting report sales is {0}ms ", timer.ElapsedMilliseconds)); } }
public async Task <FinishTillClose> FinishTillClose(bool?readTankDip, bool?readTotalizer) { var response = await _serializeManager.FinishTillClose(readTankDip, readTotalizer); foreach (var report in response.Reports) { if (report.ReportName.Contains(ReportType.EodDetailsFile)) { await _reportsBusinessLogic.SaveReport(report); } else if (report.ReportName.Contains(ReportType.TillCloseFile)) { await _reportsBusinessLogic.SaveReport(report); } } return(response); }
public async Task<List<Report>> GetReprintReport(string saleNumber, string saleDate, string reportType) { var response = await _reprintSerializeManager.GetReprintReport(saleNumber, saleDate, reportType); foreach(var report in response) { await _reportsBusinessLogic.SaveReport(report); } return response; }
public async Task <CommonPaymentComplete> CompletePayout(List <Tax> taxes, string vendorCode, string amount, string reasonCode) { var response = await _seralizemanager.CompletePayout(taxes, string.IsNullOrEmpty(vendorCode)?string.Empty : vendorCode, string.IsNullOrEmpty(amount)?string.Empty : amount, string.IsNullOrEmpty(reasonCode)?string.Empty : reasonCode); await _reportBussinessLogic.SaveReport(response.Receipt); return(response); }
public async Task <List <Report> > CloseBatch() { var reports = await _seralizeManager.CloseBatch(); foreach (var report in reports) { if (report.ReportName.Contains(ReportType.EodDetailsFile)) { await _reportsBusinessLogic.SaveReport(report); } } return(reports); }