コード例 #1
0
        protected virtual void CRCase_SDEnabled_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            CRCase    crCaseRow    = (CRCase)e.Row;
            FSxCRCase fsxCRCaseRow = cache.GetExtension <FSxCRCase>(crCaseRow);

            if (fsxCRCaseRow.SDEnabled == true)
            {
                FSSetup fsSetupRow = GetFSSetup();

                if (fsSetupRow != null &&
                    fsSetupRow.DfltCasesSrvOrdType != null)
                {
                    fsxCRCaseRow.SrvOrdType = fsSetupRow.DfltCasesSrvOrdType;
                }

                SetBranchLocationID(Base, fsxCRCaseRow);
            }
            else
            {
                fsxCRCaseRow.SrvOrdType       = null;
                fsxCRCaseRow.BranchLocationID = null;
            }
        }
コード例 #2
0
        /// <summary>
        /// Configures the Multiple Services Billing options for the given Customer.
        /// </summary>
        /// <param name="cache">Cache of the view.</param>
        /// <param name="customerRow">Customer row.</param>
        public virtual void DisplayCustomerBillingOptions(PXCache cache, Customer customerRow, FSxCustomer fsxCustomerRow)
        {
            FSSetup fsSetupRow = PXSelect <FSSetup> .Select(Base);

            bool enableMultipleServicesBilling = fsSetupRow != null ? fsSetupRow.CustomerMultipleBillingOptions == true : false;

            PXUIFieldAttribute.SetVisible <FSxCustomer.billingCycleID>(cache, customerRow, !enableMultipleServicesBilling);
            PXUIFieldAttribute.SetVisible <FSxCustomer.sendInvoicesTo>(cache, customerRow, !enableMultipleServicesBilling);
            PXUIFieldAttribute.SetVisible <FSxCustomer.billShipmentSource>(cache, customerRow, !enableMultipleServicesBilling);

            CustomerBillingCycles.AllowSelect = enableMultipleServicesBilling;

            if (fsxCustomerRow != null)
            {
                FSBillingCycle fsBillingCycleRow = PXSelect <FSBillingCycle,
                                                             Where <
                                                                 FSBillingCycle.billingCycleID, Equal <Required <FSBillingCycle.billingCycleID> > > >
                                                   .Select(Base, fsxCustomerRow.BillingCycleID);

                bool forbidUpdateBillingOptions = SharedFunctions.IsNotAllowedBillingOptionsModification(fsBillingCycleRow);

                PXUIFieldAttribute.SetEnabled <FSxCustomer.sendInvoicesTo>(cache,
                                                                           customerRow,
                                                                           forbidUpdateBillingOptions == false);

                PXUIFieldAttribute.SetEnabled <FSxCustomer.billShipmentSource>(cache,
                                                                               customerRow,
                                                                               forbidUpdateBillingOptions == false);

                PXUIFieldAttribute.SetEnabled <FSxCustomer.billingCycleID>(cache, customerRow);
            }
        }
コード例 #3
0
        /// <summary>
        /// Enable or Disable fields.
        /// </summary>
        public virtual void EnableDisable(PXCache cache, InventoryItem inventoryItemRow)
        {
            if (inventoryItemRow == null)
            {
                return;
            }

            FSSetup fsSetupRow = PXSelect <FSSetup> .Select(Base);

            var enabled = inventoryItemRow.ItemType == INItemTypes.ServiceItem;

            PXUIFieldAttribute.SetEnabled <FSxService.billingRule>(cache, inventoryItemRow, enabled);
            PXUIFieldAttribute.SetEnabled <FSxService.estimatedDuration>(cache, inventoryItemRow, enabled);

            ServiceSkills.Cache.AllowInsert = enabled;
            ServiceSkills.Cache.AllowDelete = enabled;
            ServiceSkills.Cache.AllowUpdate = enabled;

            ServiceLicenseTypes.Cache.AllowInsert = enabled;
            ServiceLicenseTypes.Cache.AllowDelete = enabled;
            ServiceLicenseTypes.Cache.AllowUpdate = enabled;

            ServiceEquipmentTypes.Cache.AllowInsert = enabled;
            ServiceEquipmentTypes.Cache.AllowDelete = enabled;
            ServiceEquipmentTypes.Cache.AllowUpdate = enabled;

            if (fsSetupRow != null)
            {
                bool activateEarningType = (bool)fsSetupRow.EnableEmpTimeCardIntegration;
                PXUIFieldAttribute.SetEnabled <FSxService.dfltEarningType>(cache, inventoryItemRow, activateEarningType);
            }
        }
コード例 #4
0
        /// <summary>
        /// Try to get the appropriate ServiceOrderType from this sources:
        /// a. <c>FSServiceOrder</c>
        /// b. <c>FSWrkProcessRow</c>
        /// c. <c>FSSetup</c>
        /// </summary>
        /// <param name="fsWrkProcessRow"><c>FSWrkProcess</c> row.</param>
        /// <param name="fsServiceOrderRow">FSServiceOrder row.</param>
        private string GetSrvOrdType(FSWrkProcess fsWrkProcessRow, FSServiceOrder fsServiceOrderRow)
        {
            // a) Try to retrieve the ServiceOrderType from the ServiceOrder row
            if (fsWrkProcessRow.SOID != null &&
                fsServiceOrderRow != null &&
                !string.IsNullOrEmpty(fsServiceOrderRow.SrvOrdType))
            {
                return(fsServiceOrderRow.SrvOrdType);
            }

            // b) Try to retrieve the ServiceOrderType from the WrkProcess row
            if (!string.IsNullOrEmpty(fsWrkProcessRow.SrvOrdType) &&
                !string.IsNullOrWhiteSpace(fsWrkProcessRow.SrvOrdType))
            {
                return(fsWrkProcessRow.SrvOrdType);
            }

            // c) Try to retrieve the Default ServiceOrderType from the Setup row
            FSSetup fsSetupRow = PXSetup <FSSetup> .Select(this);

            if (fsSetupRow != null &&
                !string.IsNullOrEmpty(fsSetupRow.DfltSrvOrdType))
            {
                return(fsSetupRow.DfltSrvOrdType);
            }

            return(null);
        }
        private void InsertUpdateCustomerBillingSetup(PXCache cache, Customer customerRow, FSxCustomer fsxCustomerRow)
        {
            FSSetup fsSetupRow = PXSelect <FSSetup> .Select(Base);

            if (fsSetupRow != null &&
                fsSetupRow.CustomerMultipleBillingOptions == false)
            {
                FSCustomerBillingSetup fsCustomerBillingSetupRow = CustomerBillingCycles.Select();

                if (fsxCustomerRow.BillingCycleID == null)
                {
                    CustomerBillingCycles.Delete(fsCustomerBillingSetupRow);
                    return;
                }

                if (fsCustomerBillingSetupRow == null)
                {
                    fsCustomerBillingSetupRow            = CustomerBillingCycles.Insert(new FSCustomerBillingSetup());
                    fsCustomerBillingSetupRow.SrvOrdType = null;
                }

                fsCustomerBillingSetupRow.BillingCycleID     = fsxCustomerRow.BillingCycleID;
                fsCustomerBillingSetupRow.SendInvoicesTo     = fsxCustomerRow.SendInvoicesTo;
                fsCustomerBillingSetupRow.BillShipmentSource = fsxCustomerRow.BillShipmentSource;
                fsCustomerBillingSetupRow.FrequencyType      = ID.Frequency_Type.NONE;

                CustomerBillingCycles.Update(fsCustomerBillingSetupRow);
            }
        }
コード例 #6
0
 public virtual void EnableDisable_Document(PXCache cache, FSSetup fsSetupRow)
 {
     PXDefaultAttribute.SetPersistingCheck <FSSetup.contractPostOrderType>(cache, fsSetupRow, PXPersistingCheck.Nothing);
     PXDefaultAttribute.SetPersistingCheck <FSSetup.dfltContractTermIDARSO>(cache, fsSetupRow, PXPersistingCheck.Nothing);
     PXUIFieldAttribute.SetEnabled <FSSetup.rOLunchBreakEndTimeFrame>(cache, fsSetupRow, fsSetupRow.ROLunchBreakDuration != null);
     PXUIFieldAttribute.SetEnabled <FSSetup.rOLunchBreakStartTimeFrame>(cache, fsSetupRow, fsSetupRow.ROLunchBreakDuration != null);
 }
コード例 #7
0
        public static IInvoiceContractGraph GetInvoiceGraph(FSSetup fsSetupRow)
        {
            if (fsSetupRow.ContractPostTo == ID.Batch_PostTo.SO)
            {
                if (PXAccess.FeatureInstalled <FeaturesSet.distributionModule>())
                {
                    return(PXGraph.CreateInstance <SOOrderEntry>().GetExtension <SM_SOOrderEntry>());
                }
                else
                {
                    throw new PXException(TX.Error.DISTRIBUTION_MODULE_IS_DISABLED);
                }
            }
            else if (fsSetupRow.ContractPostTo == ID.Batch_PostTo.AR)
            {
                return(PXGraph.CreateInstance <ARInvoiceEntry>().GetExtension <SM_ARInvoiceEntry>());
            }
            else if (fsSetupRow.ContractPostTo == ID.Batch_PostTo.SI)
            {
                throw new PXSetPropertyException(TX.Error.SOINVOICE_FROM_CONTRACT_NOT_IMPLEMENTED_CHANGE_IN_X_OR_Y, PXErrorLevel.Error,
                                                 DACHelper.GetDisplayName(typeof(FSEquipmentSetup)),
                                                 DACHelper.GetDisplayName(typeof(FSRouteSetup)));
            }

            return(null);
        }
コード例 #8
0
        protected virtual void _(Events.FieldUpdated <CROpportunity, FSxCROpportunity.sDEnabled> e)
        {
            if (e.Row == null)
            {
                return;
            }

            CROpportunity    crOpportunityRow    = (CROpportunity)e.Row;
            FSxCROpportunity fsxCROpportunityRow = e.Cache.GetExtension <FSxCROpportunity>(crOpportunityRow);

            if (fsxCROpportunityRow.SDEnabled == true)
            {
                FSSetup fsSetupRow = GetFSSetup();

                if (fsSetupRow != null &&
                    fsSetupRow.DfltOpportunitySrvOrdType != null)
                {
                    fsxCROpportunityRow.SrvOrdType = fsSetupRow.DfltOpportunitySrvOrdType;
                }

                SetBranchLocationID(Base, crOpportunityRow, fsxCROpportunityRow);
                Base.Opportunity.SetValueExt <CROpportunity.allowOverrideContactAddress>(crOpportunityRow, true);
            }
            else
            {
                fsxCROpportunityRow.BranchLocationID = null;
            }
        }
コード例 #9
0
        public static void EnableDisable_Document(PXCache cache, FSSetup fsSetupRow)
        {
            bool isDistributionModuleInstalled = PXAccess.FeatureInstalled <FeaturesSet.distributionModule>();


            PXDefaultAttribute.SetPersistingCheck <FSSetup.contractPostOrderType>(cache, fsSetupRow, PXPersistingCheck.Nothing);
            PXDefaultAttribute.SetPersistingCheck <FSSetup.dfltContractTermIDARSO>(cache, fsSetupRow, PXPersistingCheck.Nothing);
        }
コード例 #10
0
        public RouteSetupMaint()
            : base()
        {
            FSSetup setup = PXSelectReadonly <FSSetup> .Select(this);

            if (setup == null)
            {
                throw new PXSetupNotEnteredException(ErrorMessages.SetupNotEntered, typeof(FSSetup), DACHelper.GetDisplayName(typeof(FSSetup)));
            }
        }
コード例 #11
0
        public EquipmentSetupMaint()
            : base()
        {
            FSSetup setup = PXSelectReadonly <FSSetup> .Select(this);

            if (setup == null)
            {
                throw new PXSetupNotEnteredException(ErrorMessages.SetupNotEntered, typeof(FSSetup), PXMessages.LocalizeNoPrefix(TX.ScreenName.SERVICE_PREFERENCES));
            }
        }
コード例 #12
0
        protected virtual void FSSetup_RowPersisting(PXCache cache, PXRowPersistingEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            Update_SrvOrdType_TimeActivitiesFromAppointment(this, fsSetupRow.EnableEmpTimeCardIntegration);
        }
コード例 #13
0
        protected virtual void FSSetup_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            fsSetupRow.BillingOptionsChanged = true;
        }
コード例 #14
0
        public virtual Waypoint GetWaypointFromAppointment(FSSetup fsSetupRow, FSAppointment fsAppointmentRow, string address)
        {
            Waypoint wp = new Waypoint();

            GLocation[] results;

            if (fsAppointmentRow.MapLatitude == null || fsAppointmentRow.MapLongitude == null)
            {
                results = Geocoder.Geocode(address, fsSetupRow.MapApiKey);

                if (results.Length > 0)
                {
                    fsAppointmentRow.MapLatitude  = (decimal)results[0].LatLng.Latitude;
                    fsAppointmentRow.MapLongitude = (decimal)results[0].LatLng.Longitude;
                }
            }

            if (fsAppointmentRow.MapLatitude != null && fsAppointmentRow.MapLongitude != null)
            {
                if (fsAppointmentRow.Confirmed == true &&
                    fsAppointmentRow.ScheduledDateTimeBegin.HasValue)
                {
                    TimeWindow tm = new TimeWindow();
                    wp.timeWindows = new List <TimeWindow>();

                    tm.startTimeSec = (int)fsAppointmentRow.ScheduledDateTimeBegin.Value.TimeOfDay.TotalSeconds;
                    tm.stopTimeSec  = (int)fsAppointmentRow.ScheduledDateTimeBegin.Value.TimeOfDay.TotalSeconds;

                    wp.timeWindows.Add(tm);
                }

                wp.name           = fsAppointmentRow.AppointmentID.ToString();
                wp.serviceTimeSec = (int)((fsAppointmentRow.ScheduledDateTimeEnd - fsAppointmentRow.ScheduledDateTimeBegin).Value.TotalSeconds);
                wp.location       = new RouteLocation()
                {
                    latitude = (double)fsAppointmentRow.MapLatitude, longitude = (double)fsAppointmentRow.MapLongitude
                };

                if (fsAppointmentRow.PrimaryDriver != null)
                {
                    wp.tagsIncludeAnd = new List <string>()
                    {
                        fsAppointmentRow.PrimaryDriver.ToString()
                    };
                    wp.priority = 99;
                }
            }
            else
            {
                return(null);
            }

            return(wp);
        }
コード例 #15
0
        /// <summary>
        /// Return if ManageAttendees is active or inactive on the Service Management.
        /// </summary>
        public static bool IsAttendeesManagementActive(PXGraph graph, FSSetup fsSetup = null)
        {
            FSSetup fsSetupRow = fsSetup == null?GetServiceManagementSetup(graph) : fsSetup;

            if (fsSetupRow != null && IsRoomManagementActive(graph, fsSetupRow))
            {
                return((bool)fsSetupRow.ManageAttendees);
            }

            return(false);
        }
コード例 #16
0
        protected virtual void _(Events.RowInserted <FSSetup> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            fsSetupRow.BillingOptionsChanged = true;
        }
コード例 #17
0
        protected virtual void _(Events.RowPersisting <FSSetup> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            Update_SrvOrdType_TimeActivitiesFromAppointment(this, fsSetupRow.EnableEmpTimeCardIntegration);
        }
コード例 #18
0
        public virtual void FSSetup_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            EnableDisable_Document(cache, fsSetupRow);
        }
コード例 #19
0
        protected virtual void _(Events.RowSelected <FSSetup> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            EnableDisable_Document(e.Cache, fsSetupRow);
        }
コード例 #20
0
        protected virtual void _(Events.FieldDefaulting <FSSrvOrdType, FSSrvOrdType.appAddressSource> e)
        {
            //The default value for this field cannot be handled in the DAC with the PXDefault attribute
            //because the information is retrieved from FSSetup and it fails when the setup hasn't been configured
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = SetupRecord.Select();

            e.NewValue = ID.Source_Info.BUSINESS_ACCOUNT;
        }
コード例 #21
0
        protected virtual void _(Events.RowSelected <FSSetup> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;
            PXCache cache      = e.Cache;

            EquipmentSetupMaint.EnableDisable_Document(cache, fsSetupRow);
            SharedFunctions.ValidatePostToByFeatures <FSSetup.contractPostTo>(cache, fsSetupRow, fsSetupRow.ContractPostTo);
            FSPostTo.SetLineTypeList <FSSetup.contractPostTo>(e.Cache, e.Row);
        }
コード例 #22
0
        protected virtual void _(Events.FieldUpdated <FSSetup, FSSetup.contractPostTo> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            if (fsSetupRow.ContractPostTo != (string)e.OldValue)
            {
                SharedFunctions.ValidatePostToByFeatures <FSSetup.contractPostTo>(e.Cache, fsSetupRow, fsSetupRow.ContractPostTo);
            }
        }
コード例 #23
0
        public override void Initialize()
        {
            FSSetup fsSetupRow = this.SetupRecord.Select();

            if (fsSetupRow != null)
            {
                bool enableEmpTimeCardIntegration = (bool)fsSetupRow.EnableEmpTimeCardIntegration;
                PXUIFieldAttribute.SetVisible <FSxPMTimeActivity.appointmentID>(Base.Activity.Cache, Base.Activity.Current, enableEmpTimeCardIntegration);
                PXUIFieldAttribute.SetVisible <FSxPMTimeActivity.appointmentCustomerID>(Base.Activity.Cache, Base.Activity.Current, enableEmpTimeCardIntegration);
                PXUIFieldAttribute.SetVisible <FSxPMTimeActivity.sOID>(Base.Activity.Cache, Base.Activity.Current, enableEmpTimeCardIntegration);
                PXUIFieldAttribute.SetVisible <FSxPMTimeActivity.appEmpID>(Base.Activity.Cache, Base.Activity.Current, enableEmpTimeCardIntegration);
                PXUIFieldAttribute.SetVisible <FSxPMTimeActivity.serviceID>(Base.Activity.Cache, Base.Activity.Current, enableEmpTimeCardIntegration);
            }
        }
コード例 #24
0
        /// <summary>
        /// Return if ManageRooms is active or inactive on the Service Management.
        /// </summary>
        public static bool IsRoomManagementActive(PXGraph graph, FSSetup fsSetupRow = null)
        {
            if (fsSetupRow == null)
            {
                fsSetupRow = GetServiceManagementSetup(graph);
            }

            if (fsSetupRow != null)
            {
                return((bool)fsSetupRow.ManageRooms);
            }

            return(false);
        }
コード例 #25
0
        public static void EnableDisable_Document(PXCache cache, FSSetup fsSetupRow)
        {
            bool isDistributionModuleInstalled = PXAccess.FeatureInstalled <FeaturesSet.distributionModule>();

            PXUIFieldAttribute.SetVisible <FSSetup.contractPostOrderType>(cache, fsSetupRow, isDistributionModuleInstalled && fsSetupRow.ContractPostTo == ID.SrvOrdType_PostTo.SALES_ORDER_MODULE);

            if (fsSetupRow.ContractPostTo == ID.SrvOrdType_PostTo.SALES_ORDER_MODULE)
            {
                PXDefaultAttribute.SetPersistingCheck <FSSetup.contractPostOrderType>(cache, fsSetupRow, PXPersistingCheck.NullOrBlank);
            }
            else
            {
                PXDefaultAttribute.SetPersistingCheck <FSSetup.contractPostOrderType>(cache, fsSetupRow, PXPersistingCheck.Nothing);
            }
        }
コード例 #26
0
        public virtual Break GetBreakWindow(FSSetup fsSetupRow)
        {
            Break lunchBreak = null;

            if (fsSetupRow.ROLunchBreakDuration > 0)
            {
                lunchBreak = new Break();

                lunchBreak.durationSec  = fsSetupRow.ROLunchBreakDuration.Value * 60;
                lunchBreak.startTimeSec = (int)fsSetupRow.ROLunchBreakStartTimeFrame.Value.TimeOfDay.TotalSeconds;
                lunchBreak.stopTimeSec  = (int)fsSetupRow.ROLunchBreakEndTimeFrame.Value.TimeOfDay.TotalSeconds - lunchBreak.durationSec;
            }

            return(lunchBreak);
        }
コード例 #27
0
        protected virtual void _(Events.FieldUpdated <FSSetup, FSSetup.customerMultipleBillingOptions> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            fsSetupRow.BillingOptionsChanged = true;

            e.Cache.RaiseExceptionHandling <FSSetup.customerMultipleBillingOptions>(fsSetupRow,
                                                                                    fsSetupRow.CustomerMultipleBillingOptions,
                                                                                    new PXSetPropertyException(TX.Warning.CUSTOMER_MULTIPLE_BILLING_OPTIONS_CHANGING, PXErrorLevel.Warning));
        }
コード例 #28
0
 public virtual void UpdateSourcePostDoc(FSSetup fsSetupRow, FSContractPostDoc fsContractPostDocRow, FSServiceContract fsServiceContractRow)
 {
     if (fsServiceContractRow.RecordType == ID.RecordType_ServiceContract.SERVICE_CONTRACT)
     {
         ServiceContractEntry ServiceContractGraph = PXGraph.CreateInstance <ServiceContractEntry>();
         ServiceContractGraph.ServiceContractRecords.Current = ServiceContractGraph.ServiceContractRecords.Search <FSServiceContract.serviceContractID>(fsContractPostDocRow.ServiceContractID, fsServiceContractRow.CustomerID);
         ServiceContractGraph.InvoiceBillingPeriod(fsSetupRow, fsContractPostDocRow);
     }
     else
     {
         RouteServiceContractEntry RouteServiceContractGraph = PXGraph.CreateInstance <RouteServiceContractEntry>();
         RouteServiceContractGraph.ServiceContractRecords.Current = RouteServiceContractGraph.ServiceContractRecords.Search <FSServiceContract.serviceContractID>(fsContractPostDocRow.ServiceContractID, fsServiceContractRow.CustomerID);
         RouteServiceContractGraph.InvoiceBillingPeriod(fsSetupRow, fsContractPostDocRow);
     }
 }
コード例 #29
0
        private void DisplayBillingOptions(PXCache cache, CustomerClass customerClassRow, FSxCustomerClass fsxCustomerClassRow)
        {
            FSSetup fsSetupRow = PXSelect <FSSetup> .Select(Base);

            bool enableMultipleServicesBilling = fsSetupRow != null ? fsSetupRow.CustomerMultipleBillingOptions == true : false;

            PXUIFieldAttribute.SetVisible <FSxCustomerClass.dfltBillingCycleID>(cache, customerClassRow, !enableMultipleServicesBilling);
            PXUIFieldAttribute.SetVisible <FSxCustomerClass.sendInvoicesTo>(cache, customerClassRow, !enableMultipleServicesBilling);
            PXUIFieldAttribute.SetVisible <FSxCustomerClass.billShipmentSource>(cache, customerClassRow, !enableMultipleServicesBilling);

            BillingCycles.AllowSelect = enableMultipleServicesBilling;

            if (fsxCustomerClassRow != null)
            {
                FSBillingCycle fsBillingCycleRow = PXSelect <FSBillingCycle,
                                                             Where <
                                                                 FSBillingCycle.billingCycleID, Equal <Required <FSBillingCycle.billingCycleID> > > >
                                                   .Select(Base, fsxCustomerClassRow.DfltBillingCycleID);

                bool forbidUpdateBillingOptions = SharedFunctions.IsNotAllowedBillingOptionsModification(fsBillingCycleRow);

                PXUIFieldAttribute.SetEnabled <FSxCustomerClass.sendInvoicesTo>(
                    cache,
                    customerClassRow,
                    forbidUpdateBillingOptions == false);

                PXUIFieldAttribute.SetEnabled <FSxCustomerClass.billShipmentSource>(
                    cache,
                    customerClassRow,
                    forbidUpdateBillingOptions == false);

                PXUIFieldAttribute.SetEnabled <FSxCustomerClass.dfltBillingCycleID>(
                    cache,
                    customerClassRow);

                if (fsxCustomerClassRow.DfltBillingCycleID != null &&
                    forbidUpdateBillingOptions == false)
                {
                    PXDefaultAttribute.SetPersistingCheck <FSxCustomerClass.sendInvoicesTo>(cache, customerClassRow, PXPersistingCheck.NullOrBlank);
                    PXDefaultAttribute.SetPersistingCheck <FSxCustomerClass.billShipmentSource>(cache, customerClassRow, PXPersistingCheck.NullOrBlank);
                }
                else
                {
                    PXDefaultAttribute.SetPersistingCheck <FSxCustomerClass.sendInvoicesTo>(cache, customerClassRow, PXPersistingCheck.Nothing);
                    PXDefaultAttribute.SetPersistingCheck <FSxCustomerClass.billShipmentSource>(cache, customerClassRow, PXPersistingCheck.Nothing);
                }
            }
        }
コード例 #30
0
        protected virtual void _(Events.FieldUpdated <FSSetup, FSSetup.appAutoConfirmGap> e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSSetup fsSetupRow = (FSSetup)e.Row;

            if (fsSetupRow.AppAutoConfirmGap < 0)
            {
                e.Cache.RaiseExceptionHandling <FSSetup.appAutoConfirmGap>(fsSetupRow,
                                                                           fsSetupRow.AppAutoConfirmGap,
                                                                           new PXSetPropertyException(PXMessages.LocalizeFormatNoPrefix(TX.Error.MINIMUN_VALUE, " 00 h 00 m"), PXErrorLevel.Error));
            }
        }