Ejemplo n.º 1
0
        protected virtual IEnumerable createComision(PXAdapter adapter)
        {
            this.Base.Save.Press();
            FLXCommissionEntry instance      = PXGraph.CreateInstance <FLXCommissionEntry>();
            FLXCommissionTable comisionTable = this.CreateComisionTable(this.Base.Products.Current);

            instance.Document.Insert(comisionTable);
            throw new PXPopupRedirectException((PXGraph)instance, this.CreateComision.GetCaption(), true);
        }
Ejemplo n.º 2
0
        public virtual FLXCommissionTable CreateComisionTable(
            CROpportunityProducts opporProd)
        {
            FLXCommissionTable flxCommissionTable = new FLXCommissionTable();
            CROpportunity      current            = this.Base.Opportunity.Current;
            PXFieldState       valueExt           = this.Base.Opportunity.Cache.GetValueExt((object)current, "AttributeENDCUSTOME") as PXFieldState;

            flxCommissionTable.EndCustomerID = new int?((int)PXSelectorAttribute.GetField(this.Base.bAccountBasic.Cache, (object)this.Base.BAccounts, "acctCD", valueExt.Value, "bAccountID"));
            flxCommissionTable.CustomerID    = current.BAccountID;
            flxCommissionTable.OpportunityID = current.OpportunityID;
            flxCommissionTable.OpporLineNbr  = opporProd.LineNbr;
            flxCommissionTable.NonStock      = opporProd.InventoryID;
            return(flxCommissionTable);
        }