public Summary(TaxAmount taxAmount, DiscountAmount discountTotalAmount, ChargeAmount chargeAmount, double amountBeforeDiscount) { this.SubTotal = amountBeforeDiscount; this.DiscountTotalAmount = discountTotalAmount; this.ChargeAmount = chargeAmount; this.TaxAmount = taxAmount; this.NetAmount = SubTotal - discountTotalAmount + ChargeAmount + TaxAmount; }
internal void ChangeDiscountTotal(double subTotal, DiscountAmount discountTotal) { if (subTotal == 0d) return; this.SharedDiscountAmount = (AmountAfterDiscount / subTotal) * discountTotal; Calculate(); }