Пример #1
0
        public override void UpdateTotals()
        {
            //return null;
            if (PosContext.Instance.Training)
            {
                return;
            }

            EclipsePos.Data.Total total = new EclipsePos.Data.Total();
            total.AddToTotal(
                PosSettings.Default.Organization,
                PosContext.Instance.RetailStore.Retail_store_no,
                PosSettings.Default.Station,
                EclipsePos.Data.TotalName.DAILY_BASE,
                TotalType.DEBIT,
                this.Amount);

            if (transTender.Change_amount > 0)
            {
                // subtract cash back from drawer
                EclipsePos.Data.Total total2 = new EclipsePos.Data.Total();
                total2.AddToTotal(
                    PosSettings.Default.Organization,
                    PosContext.Instance.RetailStore.Retail_store_no,
                    PosSettings.Default.Station,
                    EclipsePos.Data.TotalName.DAILY_BASE,
                    TotalType.CASH_IN_DRAWER,
                    PosContext.Instance.PosMath.Mult(transTender.Change_amount, -1.0)
                    );
            }


            int count = PosContext.Instance.CurrentEj.SalesPerson.Count;

            PosContext.Instance.CurrentEj.SalesPerson.ForEach(delegate(EjSalesPerson ejSalesPerson) {
                TransSalesPerson transSalesPerson = (TransSalesPerson)ejSalesPerson.DataRecord();
                string employee_id = transSalesPerson.Employee_no;

                EclipsePos.Data.PosEmployeeTotal empTotal = new EclipsePos.Data.PosEmployeeTotal();
                empTotal.AddToEmployeeTotalAndCount(
                    PosSettings.Default.Organization,
                    PosContext.Instance.RetailStore.Retail_store_no,
                    PosSettings.Default.Station,
                    employee_id,
                    0,
                    EclipsePos.Data.TotalName.DAILY_BASE,
                    TotalType.DEBIT,
                    1,
                    Amount / count
                    );
            });



            transTender.State = (int)EjLineStates.PAID;
            transTender.UpdateState();
        }
Пример #2
0
        public override void UpdateTotals()
        {
            //return null;
            if (PosContext.Instance.Training)
            {
                return;
            }

            EclipsePos.Data.Total total1 = new EclipsePos.Data.Total();
            total1.AddToTotal(
                PosSettings.Default.Organization,
                PosContext.Instance.RetailStore.Retail_store_no,
                PosSettings.Default.Station,
                EclipsePos.Data.TotalName.DAILY_BASE,
                TotalType.CASH_SALES,
                Amount - Change);


            EclipsePos.Data.Total total2 = new EclipsePos.Data.Total();
            total2.AddToTotal(
                PosSettings.Default.Organization,
                PosContext.Instance.RetailStore.Retail_store_no,
                PosSettings.Default.Station,
                EclipsePos.Data.TotalName.DAILY_BASE,
                TotalType.CASH_IN_DRAWER,
                Amount - Change);


            int count = PosContext.Instance.CurrentEj.SalesPerson.Count;

            PosContext.Instance.CurrentEj.SalesPerson.ForEach(delegate(EjSalesPerson ejSalesPerson) {
                TransSalesPerson transSalesPerson = (TransSalesPerson)ejSalesPerson.DataRecord();
                string employee_id = transSalesPerson.Employee_no;

                EclipsePos.Data.PosEmployeeTotal empTotal = new EclipsePos.Data.PosEmployeeTotal();
                empTotal.AddToEmployeeTotalAndCount(
                    PosSettings.Default.Organization,
                    PosContext.Instance.RetailStore.Retail_store_no,
                    PosSettings.Default.Station,
                    employee_id,
                    0,
                    EclipsePos.Data.TotalName.DAILY_BASE,
                    TotalType.CASH_IN_DRAWER,
                    1,
                    (Amount - Change) / count
                    );
            });



            this.transTender.State = (int)EjLineStates.PAID;
            this.transTender.UpdateState();
        }
Пример #3
0
        public override void UpdateTotals()
        {
            if (PosContext.Instance.Training)
            {
                return;
            }

            if (this.Amount != 0.0)
            {
                /*
                 * EclipsePos.Data.Total total = new EclipsePos.Data.Total();
                 * total.AddToTotal(
                 * PosContext.Instance.RetailStore.Retail_store_no,
                 *      PosSettings.Default.Station,
                 *      TotalType.CASH,
                 *       transBank.Amount);
                 *
                 *
                 *
                 * switch ((TotalType)transBank.Pay_type)
                 * {
                 *
                 *      case TotalType.PAID_IN:
                 *      case TotalType.PAID_OUT:
                 *      case TotalType.PICK_UP:
                 *      case TotalType.LOAN:
                 *
                 *              EclipsePos.Data.Total total2 = new EclipsePos.Data.Total();
                 * total2.Total_id = PosContext.Instance.RetailStore.Retail_store_no;
                 *              total2.Pos_total_id = PosSettings.Default.Station;
                 *              total2.Total_type = (int)TotalType.CASH_IN_DRAWER;
                 *              total2.Total_count = 0;
                 *              total2.Total_amount = transBank.Amount;
                 *              total2.Add();
                 *
                 *              break;
                 *      default:
                 *              break;
                 * }
                 */

                //return null;


                EclipsePos.Data.Total total1 = new EclipsePos.Data.Total();
                total1.AddToTotal(
                    PosSettings.Default.Organization,
                    PosSettings.Default.Store,
                    PosSettings.Default.Station,
                    EclipsePos.Data.TotalName.DAILY_BASE,
                    (TotalType)transBank.Pay_type,
                    transBank.Amount);


                EclipsePos.Data.Total total2 = new EclipsePos.Data.Total();
                total2.AddToTotal(
                    PosSettings.Default.Organization,
                    PosSettings.Default.Store,
                    PosSettings.Default.Station,
                    EclipsePos.Data.TotalName.DAILY_BASE,
                    TotalType.CASH_IN_DRAWER,
                    transBank.Amount);

                int count = PosContext.Instance.CurrentEj.SalesPerson.Count;
                PosContext.Instance.CurrentEj.SalesPerson.ForEach(delegate(EjSalesPerson ejSalesPerson) {
                    TransSalesPerson transSalesPerson = (TransSalesPerson)ejSalesPerson.DataRecord(); //PosContext.Instance.CurrentEj.SalesPerson.DataRecord();
                    string employee_id = transSalesPerson.Employee_no;

                    EclipsePos.Data.PosEmployeeTotal empTotal = new EclipsePos.Data.PosEmployeeTotal();
                    empTotal.AddToEmployeeTotalAndCount(
                        PosSettings.Default.Organization,
                        PosContext.Instance.RetailStore.Retail_store_no,
                        PosSettings.Default.Station,
                        employee_id,
                        0,
                        EclipsePos.Data.TotalName.DAILY_BASE,
                        (TotalType)transBank.Pay_type,
                        1,
                        (Amount - Change) / count
                        );
                });
            }
        }