예제 #1
0
        public SalesTaxMaint()
        {
            APSetup setup = APSetup.Current;

            PXUIFieldAttribute.SetVisible <TaxCategoryDet.taxID>(Categories.Cache, null, false);
            PXUIFieldAttribute.SetEnabled <TaxCategoryDet.taxID>(Categories.Cache, null, false);
            PXUIFieldAttribute.SetVisible <TaxCategoryDet.taxCategoryID>(Categories.Cache, null, true);
            PXUIFieldAttribute.SetEnabled <TaxCategoryDet.taxCategoryID>(Categories.Cache, null, true);
            //SWUIFieldAttribute.SetVisible<TaxCategory.taxCategoryID>(Category.Cache, null, false);

            PXUIFieldAttribute.SetVisible <TaxZoneDet.taxID>(Zones.Cache, null, false);
            PXUIFieldAttribute.SetEnabled <TaxZoneDet.taxID>(Zones.Cache, null, false);
            PXUIFieldAttribute.SetVisible <TaxZoneDet.taxZoneID>(Zones.Cache, null, true);
            PXUIFieldAttribute.SetEnabled <TaxZoneDet.taxZoneID>(Zones.Cache, null, true);
            //SWUIFieldAttribute.SetVisible<TaxZone.taxZoneID>(Zone.Cache, null, false);
            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = BAccountType.VendorType;
                                                                         }
                                                        });
            if (!PXAccess.FeatureInstalled <CS.FeaturesSet.vATReporting>())
            {
                PXStringListAttribute.SetList <TX.Tax.taxType>(Tax.Cache, null, new CSTaxType.ListSimpleAttribute());
            }
        }
예제 #2
0
 public CRCaseClassMaint()
 {
     FieldDefaulting.AddHandler <IN.InventoryItem.stkItem>((sender, e) => { if (e.Row != null)
                                                                            {
                                                                                e.NewValue = false;
                                                                            }
                                                           });
 }
예제 #3
0
 public TaxBucketMaint()
 {
     FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                  {
                                                                      e.NewValue = BAccountType.VendorType;
                                                                  }
                                                 });
 }
예제 #4
0
 public SvrOrdTypeMaint()
 {
     FieldDefaulting.AddHandler <InventoryItem.stkItem>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = false;
                                                                         }
                                                        });
 }
예제 #5
0
 public ExpenseClaimDetailEntry()
 {
     FieldDefaulting.AddHandler <InventoryItem.stkItem>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = false;
                                                                         }
                                                        });
     PXUIFieldAttribute.SetVisible <EPExpenseClaimDetails.contractID>(ClaimDetails.Cache, null, PXAccess.FeatureInstalled <CS.FeaturesSet.contractManagement>() || PXAccess.FeatureInstalled <CS.FeaturesSet.projectModule>());
 }
예제 #6
0
        public ARCreateWriteOff()
        {
            ARSetup setup = ARSetup.Current;

            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = BAccountType.CustomerType;
                                                                         }
                                                        });
        }
예제 #7
0
        public TaxReportMaint()
        {
            APSetup setup = APSetup.Current;

            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = BAccountType.VendorType;
                                                                         }
                                                        });
        }
예제 #8
0
        public APVendorPriceMaint()
        {
            FieldDefaulting.AddHandler <CR.BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                            {
                                                                                e.NewValue = CR.BAccountType.VendorType;
                                                                            }
                                                           });
            bool loadVendorsPriceByAlternateID = PXAccess.FeatureInstalled <FeaturesSet.distributionModule>() && APSetup.Current.LoadVendorsPricesUsingAlternateID == true;

            CrossItemAttribute.SetEnableAlternateSubstitution <APVendorPrice.inventoryID>(Records.Cache, null, loadVendorsPriceByAlternateID);
        }
        public TaxAdjustmentEntry()
        {
            APSetup setup = APSetup.Current;

            PXUIFieldAttribute.SetEnabled <TaxAdjustment.curyID>(Document.Cache, null, false);
            PXUIFieldAttribute.SetVisible <TaxAdjustment.vendorLocationID>(Document.Cache, null, false);
            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = BAccountType.VendorType;
                                                                         }
                                                        });
        }
        public EPSetupMaint()
        {
            if (APSetup.Current == null)
            {
                throw new PXArgumentException("APSetup");
            }

            FieldDefaulting.AddHandler <IN.InventoryItem.stkItem>((sender, e) => { if (e.Row != null)
                                                                                   {
                                                                                       e.NewValue = false;
                                                                                   }
                                                                  });
        }
        public VendorLocationMaint()
        {
            Views.Caches.Remove(typeof(LocationAPAccountSub));
            Views.Caches.Remove(typeof(LocationAPPaymentInfo));

            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) =>
            {
                if (e.Row != null)
                {
                    e.NewValue = BAccountType.VendorType;
                }
            });
        }
        public TemplateMaint()
        {
            bool crmInstalled = PXAccess.FeatureInstalled <CS.FeaturesSet.customerModule>();

            if (!crmInstalled)
            {
                PXUIFieldAttribute.SetVisible <ContractTemplate.caseItemID>(Templates.Cache, null, false);
                PXUIFieldAttribute.SetVisible <ContractTemplate.min>(Templates.Cache, null, false);
            }
            FieldDefaulting.AddHandler <InventoryItem.stkItem>((sender, e) => { if (e.Row != null)
                                                                                {
                                                                                    e.NewValue = false;
                                                                                }
                                                               });
        }
예제 #13
0
        public TaxReportMaint()
        {
            APSetup setup = APSetup.Current;

            PXUIFieldAttribute.SetVisible <TaxReportLine.lineNbr>(ReportLine.Cache, null, false);
            taxDetailsReloader = new TaxReportLinesByTaxZonesReloader(this);

            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) =>
            {
                if (e.Row != null)
                {
                    e.NewValue = BAccountType.VendorType;
                }
            });
        }
예제 #14
0
        public NonStockItemMaint()
        {
            Item.View = new PXView(this, false, new Select <InventoryItem,
                                                            Where <InventoryItem.stkItem, Equal <False>,
                                                                   And <InventoryItem.itemStatus, NotEqual <InventoryItemStatus.unknown>,
                                                                        And <InventoryItem.isTemplate, Equal <False>,
                                                                             And <Match <Current <AccessInfo.userName> > > > > > >());

            this.Views[nameof(Item)] = Item.View;

            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = BAccountType.VendorType;
                                                                         }
                                                        });

            action.AddMenuAction(ChangeID);
        }
예제 #15
0
        public APVendorSalesPriceMaint()
        {
            _curyIDFieldName  = Records.Cache.GetField(typeof(APSalesPrice.curyID));
            _vendorID         = Records.Cache.GetField(typeof(APSalesPrice.vendorID));
            _vendorLocationID = Records.Cache.GetField(typeof(APSalesPrice.vendorLocationID));
            _inventoryID      = Records.Cache.GetField(typeof(APSalesPrice.inventoryID));;
            _uOM             = Records.Cache.GetField(typeof(APSalesPrice.uOM));
            _recordID        = Records.Cache.GetField(typeof(APSalesPrice.recordID));
            _breakQty        = Records.Cache.GetField(typeof(APSalesPrice.breakQty));
            _lastDate        = Records.Cache.GetField(typeof(APSalesPrice.lastDate));
            _expirationDate  = Records.Cache.GetField(typeof(APSalesPrice.expirationDate));
            _pendingBreakQty = Records.Cache.GetField(typeof(APSalesPrice.pendingBreakQty));

            FieldDefaulting.AddHandler <CR.BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                            {
                                                                                e.NewValue = CR.BAccountType.VendorType;
                                                                            }
                                                           });
        }
예제 #16
0
        public POVendorCatalogueMaint()
        {
            APSetupNoMigrationMode.EnsureMigrationModeDisabled(this);

            this.BAccount.Cache.AllowDelete = false;
            PXUIFieldAttribute.SetVisible <VendorLocation.curyID>(BAccount.Cache, null,
                                                                  PXAccess.FeatureInstalled <FeaturesSet.multicurrency>());

            _inventoryID = VendorCatalogue.Cache.GetField(typeof(POVendorInventory.inventoryID));
            _subItemID   = VendorCatalogue.Cache.GetField(typeof(POVendorInventory.subItemID));
            _uOM         = VendorCatalogue.Cache.GetField(typeof(POVendorInventory.purchaseUnit));
            _recordID    = VendorCatalogue.Cache.GetField(typeof(POVendorInventory.recordID));

            // right baccount type for redirect from empty Vendor field
            FieldDefaulting.AddHandler <BAccountR.type>((sender, e) => { if (e.Row != null)
                                                                         {
                                                                             e.NewValue = BAccountType.VendorType;
                                                                         }
                                                        });
        }
예제 #17
0
        public ContractItemMaint()
        {
            CurrentTemplates.Cache.AllowInsert         =
                CurrentTemplates.Cache.AllowUpdate     =
                    CurrentTemplates.Cache.AllowDelete = false;
            CurrentContracts.Cache.AllowInsert         =
                CurrentContracts.Cache.AllowUpdate     =
                    CurrentContracts.Cache.AllowDelete = false;
            FieldDefaulting.AddHandler <InventoryItem.stkItem>((sender, e) => { if (e.Row != null)
                                                                                {
                                                                                    e.NewValue = false;
                                                                                }
                                                               });

            if (!PXAccess.FeatureInstalled <FeaturesSet.multicurrency>())
            {
                PXUIFieldAttribute.SetVisible <ContractItem.curyID>(ContractItems.Cache, null, false);
                FieldDefaulting.AddHandler <ContractItem.curyID>((sender, e) =>
                {
                    e.NewValue = Company.Current.BaseCuryID;
                    e.Cancel   = true;
                });
            }
        }
 public APVendorPriceMaint()
 {
     FieldDefaulting.AddHandler<CR.BAccountR.type>((sender, e) => { if (e.Row != null) e.NewValue = CR.BAccountType.VendorType; });
 }
예제 #19
0
        public virtual void GeneratePeriodsProc(BoundaryYears filter, List <FABook> books)
        {
            for (int i = 0; i < books.Count; ++i)
            {
                FABook book = books[i];

                FieldDefaulting.AddHandler <FABookYear.bookID>(delegate(PXCache sender, PXFieldDefaultingEventArgs e)
                {
                    if (!e.Cancel)
                    {
                        e.NewValue = book.BookID;
                    }
                    e.Cancel = true;
                });

                FieldDefaulting.AddHandler <FABookPeriod.bookID>(delegate(PXCache sender, PXFieldDefaultingEventArgs e)
                {
                    if (!e.Cancel)
                    {
                        e.NewValue = book.BookID;
                    }
                    e.Cancel = true;
                });

                bool yearcreated = false;

                FABookYear bookyear = PXSelect <FABookYear, Where <FABookYear.bookID, Equal <Current <FABook.bookID> > >, OrderBy <Desc <FABookYear.year> > > .SelectSingleBound(this, new object[] { book });

                FABookYear newYear = new FABookYear {
                    Year = bookyear != null ? bookyear.Year : null
                };

                if (book.UpdateGL == false)
                {
                    FABookYearSetup calendar = PXSelect <FABookYearSetup, Where <FABookYearSetup.bookID, Equal <Current <FABook.bookID> > > > .SelectSingleBound(this, new object[] { book });

                    IEnumerable periods = PXSelect <FABookPeriodSetup, Where <FABookPeriodSetup.bookID, Equal <Current <FABook.bookID> > > > .SelectMultiBound(this, new object[] { book });

                    while (newYear != null && string.Compare(newYear.Year, filter.YearTo) < 0)
                    {
                        newYear = FiscalYearCreator <FABookYear, FABookPeriod, FABookPeriodSetup> .CreateNextYear(this, calendar, periods.RowCast <FABookPeriodSetup>(), bookyear);

                        bookyear = newYear;

                        yearcreated |= newYear != null;
                    }

                    bookyear = PXSelect <FABookYear, Where <FABookYear.bookID, Equal <Current <FABook.bookID> > >, OrderBy <Asc <FABookYear.year> > > .SelectSingleBound(this, new object[] { book });

                    newYear = new FABookYear {
                        Year = bookyear != null ? bookyear.Year : null
                    };
                    while (newYear != null && string.Compare(newYear.Year, calendar.FirstFinYear) > 0)
                    {
                        newYear = FiscalYearCreator <FABookYear, FABookPeriod, FABookPeriodSetup> .CreatePrevYear(this, calendar, periods.RowCast <FABookPeriodSetup>(), bookyear);

                        bookyear = newYear;

                        yearcreated |= newYear != null;
                    }
                }
                else
                {
                    FinYearSetup calendar = PXSelect <FinYearSetup> .Select(this);

                    IEnumerable periods = PXSelect <FinPeriodSetup> .Select(this);

                    while (newYear != null && string.Compare(newYear.Year, filter.YearTo) < 0)
                    {
                        newYear = FiscalYearCreator <FABookYear, FABookPeriod, FinPeriodSetup> .CreateNextYear(this, calendar, periods.RowCast <FinPeriodSetup>(), bookyear);

                        bookyear = newYear;

                        yearcreated |= newYear != null;
                    }

                    bookyear = PXSelect <FABookYear, Where <FABookYear.bookID, Equal <Current <FABook.bookID> > >, OrderBy <Asc <FABookYear.year> > > .SelectSingleBound(this, new object[] { book });

                    newYear = new FABookYear {
                        Year = bookyear != null ? bookyear.Year : null
                    };
                    while (newYear != null && string.Compare(newYear.Year, calendar.FirstFinYear) > 0)
                    {
                        newYear = FiscalYearCreator <FABookYear, FABookPeriod, FinPeriodSetup> .CreatePrevYear(this, calendar, periods.RowCast <FinPeriodSetup>(), bookyear);

                        bookyear = newYear;

                        yearcreated |= newYear != null;
                    }
                }

                if (!IsImport)
                {
                    if (yearcreated)
                    {
                        PXProcessing <FABook> .SetInfo(i, ActionsMessages.RecordProcessed);
                    }
                    else
                    {
                        PXProcessing <FABook> .SetWarning(i, Messages.CalendarAlreadyExists);
                    }
                }
            }

            Actions.PressSave();
        }