예제 #1
0
        private void DiscountAmountForCashbox(decimal saleAmount)
        {
            var cashBoxService  = new CashBoxService(uow);
            var defatultCashbox = cashBoxService.GetDefatultCashbox();

            defatultCashbox.CurrentAmount = defatultCashbox.CurrentAmount - saleAmount;
            uow.CashBoxRepository.Update(defatultCashbox);
        }
예제 #2
0
        private CashMovement CreateCashMovement(int sessionId, decimal saleAmount, string movementCategory,
                                                string movementType)
        {
            var cashBoxService = new CashBoxService(uow);

            var cashMovement = new CashMovement
            {
                MovementCategory = movementCategory,
                MovementType     = movementType,
                MovementDate     = DateTime.Now,
                Amount           = saleAmount,
                MovementStatus   = Constants.CashMovementStatus.Ok,
                CashboxId        = cashBoxService.GetDefatultCashbox().CashboxId,
                SessionId        = sessionId
            };

            uow.CashMovementRepository.Insert(cashMovement);
            return(cashMovement);
        }