public void StopProductTimer() { if (ProductTimerValue != null) { ProductTimerValue.Stop(); } }
//Görünen fiyat public decimal GetVisiblePrice() { var result = Price + OrderTagValues.Where(x => x.AddTagPriceToOrderPrice).Sum(x => x.Price * x.Quantity); if (ProductTimerValue != null) { result = ProductTimerValue.GetPrice(result + GetOrderTagPrice()); } return(result); }
//Vergi etkilememiş vergilendirilebilir fiyat public decimal GetTaxablePrice() { var result = Price + OrderTagValues.Where(x => !x.TaxFree).Sum(x => x.Price * x.Quantity); if (ProductTimerValue != null) { result = ProductTimerValue.GetPrice(result); } return(result); }
public void UpdateProductTimer(ProductTimer timer) { if (timer != null) { ProductTimerValue = new ProductTimerValue { ProductTimerId = timer.Id, MinTime = timer.MinTime, PriceType = timer.PriceType, PriceDuration = timer.PriceDuration, TimeRounding = timer.TimeRounding, }; if (timer.StartTime > 0) { var now = DateTime.Today; ProductTimerValue.Start = new DateTime(now.Year, now.Month, now.Day, timer.StartTime, 0, 0); ProductTimerValue.End = ProductTimerValue.Start; } } else { ProductTimerValue = null; } }