示例#1
0
        public virtual void Persist(Action del)
        {
            if (Documents.Current != null && !Discounts.Any() && (Documents.Current.CuryDiscTot ?? 0m) != 0m)
            {
                AddDiscount(Documents.Cache, Documents.Current);
            }

            DiscountEngineGraph.ValidateDiscountDetails(Discounts);

            del();
        }
        public virtual void Persist(Action del)
        {
            if (Documents.Current != null && !Discounts.Any() && (Documents.Current.CuryDiscTot ?? 0m) != 0m)
            {
                AddDiscount(Documents.Cache, Documents.Current);
                DiscountEngine <Detail> .
                CalculateDocumentDiscountRate(
                    Details.Cache,
                    Details,
                    null,
                    Discounts,
                    Documents.Current.CuryLineTotal ?? 0m,
                    Documents.Current.CuryDiscTot ?? 0m);
            }

            DiscountEngine <Detail> .ValidateDiscountDetails(Discounts);

            del();
        }