/// <summary>
        ///
        /// </summary>
        /// <param name="shoppeeFee"></param>
        /// <param name="receiptnumber"></param>
        /// <param name="saleWay"></param>
        /// <returns></returns>
        public PhuraseDetailModel CreateSale(int shoppeeFee, string receiptnumber, PlatEnum saleWay)
        {
            var model = new PhuraseDetailModel();
            var a     = new List <PhuraseProductModel>();

            a = _phurases;
            model.Products      = a;
            model.TotalMoney    = _phurases.Sum(x => x.ProductMoney * x.Count) + shoppeeFee;
            model.TransferMoney = shoppeeFee;
            model.TotalTax      = Convert.ToInt32((_phurases.Sum(x => x.ProductMoneyWithoutTax * x.Count) + shoppeeFee) * 0.05);
            model.ReceiptNumber = receiptnumber;
            model.Plat          = saleWay;
            _phurases.Clear();
            return(model);
        }
Beispiel #2
0
 public PhuraseDetailModel CreateSale(int shopeeFee, string receiptnumber, PlatEnum plat)
 {
     return(_createSaleService.CreateSale(shopeeFee, receiptnumber, plat));
 }