| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | using System;using System.Linq.Expressions;using InABox.Core;namespace Comal.Classes{    public class QuoteProposalCostSheetExTax : IFormula<QuoteProposalCostSheet, double>    {        public Expression<Func<QuoteProposalCostSheet, double>> Value => x => x.CostSheet.ExTax;        public Expression<Func<QuoteProposalCostSheet, double>>[] Modifiers => new Expression<Func<QuoteProposalCostSheet, double>>[] { x => x.Qty };        public FormulaOperator Operator => FormulaOperator.Multiply;        public FormulaType Type => FormulaType.Virtual;    }    public class QuoteProposalCostSheetTax : IFormula<QuoteProposalCostSheet, double>    {        public Expression<Func<QuoteProposalCostSheet, double>> Value => x => x.CostSheet.Tax;        public Expression<Func<QuoteProposalCostSheet, double>>[] Modifiers => new Expression<Func<QuoteProposalCostSheet, double>>[] { x => x.Qty };        public FormulaOperator Operator => FormulaOperator.Multiply;        public FormulaType Type => FormulaType.Virtual;    }    public class QuoteProposalCostSheetIncTax : IFormula<QuoteProposalCostSheet, double>    {        public Expression<Func<QuoteProposalCostSheet, double>> Value => x => x.CostSheet.IncTax;        public Expression<Func<QuoteProposalCostSheet, double>>[] Modifiers => new Expression<Func<QuoteProposalCostSheet, double>>[] { x => x.Qty };        public FormulaOperator Operator => FormulaOperator.Multiply;        public FormulaType Type => FormulaType.Virtual;    }    [UserTracking(typeof(Quote))]    public class QuoteProposalCostSheet : Entity, IRemotable, IPersistent, IQuoteProposalCostSheet, ILicense<QuotesManagementLicense>    {        [NullEditor]        [EntityRelationship(DeleteAction.Cascade)]        public QuoteProposalLink Proposal { get; set; }        [EntityRelationship(DeleteAction.Cascade)]        public QuoteCostSheetLink CostSheet { get; set; }        [IntegerEditor]        public int Qty { get; set; }        [CurrencyEditor(Editable = Editable.Hidden, Summary = Summary.Sum)]        [Formula(typeof(QuoteProposalCostSheetExTax))]        public double ExTax { get; set; }        [CurrencyEditor(Editable = Editable.Hidden, Summary = Summary.Sum)]        [Formula(typeof(QuoteProposalCostSheetTax))]        public double Tax { get; set; }        [CurrencyEditor(Visible = Visible.Default, Editable = Editable.Hidden, Summary = Summary.Sum)]        [Formula(typeof(QuoteProposalCostSheetIncTax))]        public double IncTax { get; set; }        [NullEditor]        public long Sequence { get; set; }    }}
 |