private void TerminalReportBySalesman(TerminalReport terminalReport) { this.PrintReceipt(PosContext.Instance.Parameters.getParam("SalesBySalesman"), 0, PosContext.Instance.Training); PosEmployeeTotal employeeTotal = new PosEmployeeTotal(); employeeTotal.Organization_no = PosSettings.Default.Organization; employeeTotal.Store_no = PosSettings.Default.Store; employeeTotal.Pos_no = PosSettings.Default.Station; employeeTotal.Sequence_no = terminalReport.PosTotal.Sequence_no; double totalSales = 0; DataSet empData = employeeTotal.LoadEmployeeTotal(); int seq = 0; try { DataTable empTable = empData.Tables[0]; foreach (DataRow dr in empTable.Rows) { string employee_no = dr["employee_no"].ToString(); Employee emp = new Employee(); emp.Organization_no = PosSettings.Default.Organization; emp.Employee_no = employee_no; emp.LoadByEmployeeNo(); seq++; string strEmp = string.Format("{0:##\\.}", seq) + emp.FName; double salesAmt = double.Parse(dr["total_amount"].ToString()); this.PrintReceipt(strEmp, salesAmt, PosContext.Instance.Training); totalSales += salesAmt; } string strSalesTotal = PosContext.Instance.Parameters.getParam("SalesTotal"); this.PrintReceipt(strSalesTotal, totalSales, PosContext.Instance.Training); } catch (Exception e) { Logger.Error(this.GetType().FullName, e.StackTrace, e); } }
public static TerminalReport FromLine(string line) { TerminalReport report = new TerminalReport(); report.Word = line.Substring(0, 11); line = line.Replace(report.Word, string.Empty).Trim(); string[] split = line.Split(' '); int i = 0; // transaction summary report.Denials = int.Parse(split[i++]); report.Approvals = int.Parse(split[i++]); report.Reversals = int.Parse(split[i++]); report.Amount = double.Parse(split[i++]); // billing counts report.ON_US = int.Parse(split[i++]); report.Alphalink = int.Parse(split[i++]); report.Interchange = int.Parse(split[i++]); report.Surcharged = int.Parse(split[i++]); return report; }
public Int64 Insert(DepositDetails Details) { try { Save(Details); Int64 iID = Int64.Parse(base.getLAST_INSERT_ID(this)); TerminalReport clsTerminalReport = new TerminalReport(base.Connection, base.Transaction); clsTerminalReport.UpdateDeposit(Details); CashierReports clsCashierReport = new CashierReports(base.Connection, base.Transaction); clsCashierReport.UpdateDeposit(Details); return(iID); } catch (Exception ex) { throw base.ThrowException(ex); } }
private void TerminalReportForCashInDrawer(TerminalReport report, int start, int end) { this.PrintReceipt(PosContext.Instance.Parameters.getParam("CashInDrawer"), 0, PosContext.Instance.Training); double cashInDrawer = 0; foreach (object obj in report.PosTotal.Totals) { EclipsePos.Data.Total total = obj as EclipsePos.Data.Total; String countLit = null; String amountLit = null; if ((total.Total_type > start) && (total.Total_type < end)) { int type = total.Total_type - start; switch (type) { case (int)TotalType.CASH_SALES: countLit = PosContext.Instance.Parameters.getParam("CashSalesCount"); amountLit = PosContext.Instance.Parameters.getParam("CashSalesAmount"); break; // case (int) TotalType.CASH_IN_DRAWER: // countLit = PosContext.Instance.Parameters.getParam("CashInDrCount"); // amountLit = PosContext.Instance.Parameters.getParam("CashInDrAmount"); // break; case (int)TotalType.CASH_BACK: countLit = PosContext.Instance.Parameters.getParam("CashBackCount"); amountLit = PosContext.Instance.Parameters.getParam("CashBackAmount"); break; case (int)TotalType.PAID_IN: countLit = PosContext.Instance.Parameters.getParam("PaidInCount"); amountLit = PosContext.Instance.Parameters.getParam("PaidInAmount"); break; case (int)TotalType.PAID_OUT: countLit = PosContext.Instance.Parameters.getParam("PaidOutCount"); amountLit = PosContext.Instance.Parameters.getParam("PaidOutAmount"); break; case (int)TotalType.LOAN: countLit = PosContext.Instance.Parameters.getParam("LoanCount"); amountLit = PosContext.Instance.Parameters.getParam("LoanAmount"); break; case (int)TotalType.PICK_UP: countLit = PosContext.Instance.Parameters.getParam("PickupCount"); amountLit = PosContext.Instance.Parameters.getParam("PickupAmount"); break; default: break; } if (countLit != null) { this.PrintReceipt(amountLit.Trim(), total.Total_amount, PosContext.Instance.Training); cashInDrawer += total.Total_amount; } } } string strCashInDrawer = PosContext.Instance.Parameters.getParam("CashInDrAmount"); this.PrintReceipt(strCashInDrawer, cashInDrawer, PosContext.Instance.Training); }
public TerminalPrintJob(TerminalReport report) { this.tReport = report; }
private void TerminalReportByCollections(TerminalReport report, int start, int end) { this.PrintReceipt(PosContext.Instance.Parameters.getParam("Collections"), 0, PosContext.Instance.Training); double totalCollection = 0; foreach (object obj in report.PosTotal.Totals) { EclipsePos.Data.Total total = obj as EclipsePos.Data.Total; String countLit = null; String amountLit = null; if ((total.Total_type > start) && (total.Total_type < end)) { int type = total.Total_type - start; switch (type) { case (int)TotalType.CASH_SALES: countLit = PosContext.Instance.Parameters.getParam("CashSalesCount"); amountLit = PosContext.Instance.Parameters.getParam("CashSalesAmount"); break; case (int)TotalType.GIFT_CERTIFICATE: countLit = PosContext.Instance.Parameters.getParam("GiftCertCount"); amountLit = PosContext.Instance.Parameters.getParam("GiftCertAmount"); break; case (int)TotalType.CHECK: case (int)TotalType.CHECK_IN_DRAWER: countLit = PosContext.Instance.Parameters.getParam("CheckCount"); amountLit = PosContext.Instance.Parameters.getParam("CheckAmount"); break; default: break; } if (type > 400 && type < 500) { object objCard = PosContext.Instance.Config.CardMediaByTotalType[type]; if (objCard is CardMedia) { CardMedia cMedia = objCard as CardMedia; countLit = cMedia.Media_name; amountLit = cMedia.Media_name; } } if (countLit != null) { this.PrintReceipt(amountLit.Trim(), total.Total_amount, PosContext.Instance.Training); totalCollection += total.Total_amount; } } } string strCollectionTotal = PosContext.Instance.Parameters.getParam("CollectionTotal"); this.PrintReceipt(strCollectionTotal, totalCollection, PosContext.Instance.Training); }