public virtual void SetPersistingChecks(PXCache cache, CROpportunity crOpportunityRow, FSxCROpportunity fsxCROpportunityRow, FSSrvOrdType fsSrvOrdTypeRow) { if (fsxCROpportunityRow.SDEnabled == true) { PXDefaultAttribute.SetPersistingCheck <FSxCROpportunity.srvOrdType>(cache, crOpportunityRow, PXPersistingCheck.NullOrBlank); PXDefaultAttribute.SetPersistingCheck <FSxCROpportunity.branchLocationID>(cache, crOpportunityRow, PXPersistingCheck.NullOrBlank); if (fsSrvOrdTypeRow == null) { fsSrvOrdTypeRow = CRExtensionHelper.GetServiceOrderType(Base, fsxCROpportunityRow.SrvOrdType); } if (fsSrvOrdTypeRow != null && fsSrvOrdTypeRow.Behavior != ID.Behavior_SrvOrderType.INTERNAL_APPOINTMENT) { PXDefaultAttribute.SetPersistingCheck <CROpportunity.bAccountID>(cache, crOpportunityRow, PXPersistingCheck.NullOrBlank); PXDefaultAttribute.SetPersistingCheck <CROpportunity.locationID>(cache, crOpportunityRow, PXPersistingCheck.NullOrBlank); } } else { PXDefaultAttribute.SetPersistingCheck <FSxCROpportunity.srvOrdType>(cache, crOpportunityRow, PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck <FSxCROpportunity.branchLocationID>(cache, crOpportunityRow, PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck <CROpportunity.bAccountID>(cache, crOpportunityRow, PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck <CROpportunity.locationID>(cache, crOpportunityRow, PXPersistingCheck.Nothing); } }
private void SetPersistingChecks( PXCache cache, CRCase crCaseRow, FSxCRCase fsxCRCaseRow, FSSrvOrdType fsSrvOrdTypeRow) { if (fsxCRCaseRow.SDEnabled == true) { PXDefaultAttribute.SetPersistingCheck <FSxCRCase.srvOrdType>(cache, crCaseRow, PXPersistingCheck.NullOrBlank); PXDefaultAttribute.SetPersistingCheck <FSxCRCase.branchLocationID>(cache, crCaseRow, PXPersistingCheck.NullOrBlank); if (fsSrvOrdTypeRow == null) { fsSrvOrdTypeRow = CRExtensionHelper.GetServiceOrderType(Base, fsxCRCaseRow.SrvOrdType); } if (fsSrvOrdTypeRow != null && fsSrvOrdTypeRow.Behavior != ID.Behavior_SrvOrderType.INTERNAL_APPOINTMENT) { PXDefaultAttribute.SetPersistingCheck <CROpportunity.bAccountID>(cache, crCaseRow, PXPersistingCheck.NullOrBlank); if (PXAccess.FeatureInstalled <FeaturesSet.accountLocations>() == true) { PXDefaultAttribute.SetPersistingCheck <CROpportunity.locationID>(cache, crCaseRow, PXPersistingCheck.NullOrBlank); } } } else { PXDefaultAttribute.SetPersistingCheck <FSxCROpportunity.srvOrdType>(cache, crCaseRow, PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck <FSxCROpportunity.branchLocationID>(cache, crCaseRow, PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck <CROpportunity.bAccountID>(cache, crCaseRow, PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck <CROpportunity.locationID>(cache, crCaseRow, PXPersistingCheck.Nothing); } }
protected virtual void _(Events.RowSelected <CROpportunity> e) { if (e.Row == null) { return; } CROpportunity crOpportunityRow = (CROpportunity)e.Row; PXCache cache = e.Cache; FSxCROpportunity fsxCROpportunityRow = cache.GetExtension <FSxCROpportunity>(crOpportunityRow); FSServiceOrder fsServiceOrderRow = CRExtensionHelper.GetRelatedServiceOrder(Base, cache, crOpportunityRow, fsxCROpportunityRow.SOID); FSSrvOrdType fsSrvOrdTypeRow = null; if (fsServiceOrderRow != null) { fsSrvOrdTypeRow = CRExtensionHelper.GetServiceOrderType(Base, fsServiceOrderRow.SrvOrdType); } EnableDisableExtensionFields(cache, fsxCROpportunityRow, fsServiceOrderRow); EnableDisableActions(cache, crOpportunityRow, fsxCROpportunityRow, fsServiceOrderRow, fsSrvOrdTypeRow); SetPersistingChecks(cache, crOpportunityRow, fsxCROpportunityRow, fsSrvOrdTypeRow); HideOrShowFieldsActionsByInventoryFeature(); }
public InvoiceItem(PXGraph graph, ServiceOrderInfo serviceOrderInfo, int index) { this.FSServiceOrderRow = serviceOrderInfo.FSServiceOrderRow; this.FSSrvOrdTypeRow = serviceOrderInfo.FSSrvOrdTypeRow; this.Index = index; this.CustomerID = serviceOrderInfo.FSServiceOrderRow.BillCustomerID; this.SOID = serviceOrderInfo.FSServiceOrderRow.SOID; this.CustomerLocationID = serviceOrderInfo.FSServiceOrderRow.BillLocationID; this.CustPORefNbr = serviceOrderInfo.FSServiceOrderRow.CustPORefNbr; this.CustWorkOrderRefNbr = serviceOrderInfo.FSServiceOrderRow.CustWorkOrderRefNbr; this.PostToAPNegBalances = serviceOrderInfo.FSSrvOrdTypeRow.PostNegBalanceToAP; this.FSPostingLineDetailsToPostInAR_AP = new List <PostingLine>(); this.FSPostingLineDetailsToPostInSO = new List <PostingLine>(); foreach (FSSODet fsSODetRow in serviceOrderInfo.FSSODetToPostInAR_AP) { this.AddSOLineToList(graph, fsSODetRow, serviceOrderInfo, true, false); } foreach (FSSODet fsSODetRow in serviceOrderInfo.FSSODetToPostInSO) { this.AddSOLineToList(graph, fsSODetRow, serviceOrderInfo, false, true); } }
private int?GetAcct(PXGraph graph, IFSSODetBase fsSODetBase, FSAppointmentDet fsAppointmentInventoryItem, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) { int?acctID = null; if (fsSODetBase != null) { if (fsSODetBase.AcctID != null) { acctID = fsSODetBase.AcctID; } else { acctID = ServiceOrderCore.Get_TranAcctID_DefaultValue(graph, fsSrvOrdTypeRow.SalesAcctSource, fsSODetBase.InventoryID, fsSODetBase.SiteID, fsServiceOrderRow); } } else if (fsAppointmentInventoryItem != null) { acctID = ServiceOrderCore.Get_TranAcctID_DefaultValue(graph, fsSrvOrdTypeRow.SalesAcctSource, fsAppointmentInventoryItem.InventoryID, fsAppointmentInventoryItem.SiteID, fsServiceOrderRow); } return(acctID); }
/// <summary> /// Gets the information of the Appointment and AppointmentInventoryItem using as reference the [appointmentID] and [appointmentInventoryItemID]. /// </summary> private SharedClasses.AppointmentInventoryItemInfo GetAppointmentInventoryItemInfo(int?appointmentID, int?appDetID, int index) { PXResult <FSAppointment, FSServiceOrder, FSSrvOrdType, FSAppointmentInventoryItem, FSAppointmentDet> bqlResult = (PXResult <FSAppointment, FSServiceOrder, FSSrvOrdType, FSAppointmentInventoryItem, FSAppointmentDet>) PXSelectReadonly2 <FSAppointment, InnerJoin <FSServiceOrder, On <FSServiceOrder.sOID, Equal <FSAppointment.sOID>, And <FSAppointment.appointmentID, Equal <Required <FSAppointment.appointmentID> > > >, InnerJoin <FSSrvOrdType, On <FSSrvOrdType.srvOrdType, Equal <FSAppointment.srvOrdType> >, InnerJoin <FSAppointmentInventoryItem, On <FSAppointmentInventoryItem.appointmentID, Equal <FSAppointment.appointmentID>, And <FSAppointmentInventoryItem.appDetID, Equal <Required <FSAppointmentInventoryItem.appDetID> > > >, InnerJoin <FSAppointmentDet, On <FSAppointmentDet.sODetID, Equal <FSAppointmentInventoryItem.sODetID> > > > > > > .Select(this, appointmentID, appDetID); SharedClasses.AppointmentInventoryItemInfo appointmentInfoToReturn = new SharedClasses.AppointmentInventoryItemInfo(); if (bqlResult != null) { FSAppointment fsAppointmentRow = (FSAppointment)bqlResult; FSServiceOrder fsServiceOrderRow = (FSServiceOrder)bqlResult; FSSrvOrdType fsSrvOrdTypeRow = (FSSrvOrdType)bqlResult; FSAppointmentInventoryItem fsAppointmentInventoryItemRow = (FSAppointmentInventoryItem)bqlResult; FSAppointmentDet fsAppointmentDetRow = (FSAppointmentDet)bqlResult; appointmentInfoToReturn = new SharedClasses.AppointmentInventoryItemInfo(fsAppointmentRow, fsServiceOrderRow, fsSrvOrdTypeRow, fsAppointmentDetRow, fsAppointmentInventoryItemRow, index); } return(appointmentInfoToReturn); }
private static bool IsTheRequiredFieldsPresent(PXGraph graph, CROpportunity crOpportunityRow, FSxCROpportunity fsxCROpportunityRow) { if (crOpportunityRow == null || fsxCROpportunityRow == null || crOpportunityRow.ClassID == null || crOpportunityRow.BranchID == null || crOpportunityRow.Subject == null || crOpportunityRow.ProjectID == null || crOpportunityRow.CloseDate == null || fsxCROpportunityRow.SrvOrdType == null || fsxCROpportunityRow.BranchLocationID == null) { return(false); } if (fsxCROpportunityRow.SrvOrdType != null) { FSSrvOrdType fsSrvOrdTypeRow = GetServiceOrderType(graph, fsxCROpportunityRow.SrvOrdType); if (fsSrvOrdTypeRow != null && fsSrvOrdTypeRow.Behavior != ID.Behavior_SrvOrderType.INTERNAL_APPOINTMENT && (crOpportunityRow.BAccountID == null || crOpportunityRow.LocationID == null)) { return(false); } } return(true); }
public virtual FSCreatedDoc PressSave(int batchID, List <DocLineExt> docLines, BeforeSaveDelegate beforeSave) { if (Base.Document.Current == null) { throw new SharedClasses.TransactionScopeException(); } if (beforeSave != null) { beforeSave(Base); } Base.Save.Press(); if (docLines != null && docLines.Count > 0) { FSSrvOrdType fsSrvOrdTypeRow = docLines[0].fsSrvOrdType; if (fsSrvOrdTypeRow != null && fsSrvOrdTypeRow.ReleaseProjectTransactionOnInvoice == true) { Base.ReleaseDocument(Base.Document.Current); } } var fsCreatedDocRow = new FSCreatedDoc() { BatchID = batchID, PostTo = ID.Batch_PostTo.PM, CreatedDocType = Base.Document.Current.Module, CreatedRefNbr = Base.Document.Current.RefNbr }; return(fsCreatedDocRow); }
private void EnableDisableCustomFields( PXCache cache, CRCase crCaseRow, FSxCRCase fsxCRCaseRow, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) { bool isSMSetup = GetFSSetup() != null; if (fsSrvOrdTypeRow != null) { bool isAnInternalSrvOrdType = fsSrvOrdTypeRow.Behavior == ID.Behavior_SrvOrderType.INTERNAL_APPOINTMENT; PXUIFieldAttribute.SetEnabled <CRCase.customerID>( cache, null, isAnInternalSrvOrdType || (!isAnInternalSrvOrdType && fsServiceOrderRow == null)); } else { PXUIFieldAttribute.SetEnabled <CRCase.customerID>( cache, null, true); } }
protected override void _(Events.FieldSelecting <Extensions.ContactAddress.Document, Extensions.ContactAddress.Document.allowOverrideContactAddress> e) { var row = e.Row as Extensions.ContactAddress.Document; if (row == null) { return; } FSSrvOrdType fSSrvOrdTypeRow = (FSSrvOrdType)GetSrvOrdTypeView().Current; FSServiceOrder fsServiceOrderRow = (FSServiceOrder)e.Cache.GetMain <Extensions.ContactAddress.Document>(row); if (fSSrvOrdTypeRow == null || fsServiceOrderRow == null) { return; } if ( (fSSrvOrdTypeRow.AppAddressSource == ID.SrvOrdType_AppAddressSource.BUSINESS_ACCOUNT && (row.LocationID == null) ) || (fSSrvOrdTypeRow.AppAddressSource == ID.SrvOrdType_AppAddressSource.CUSTOMER_CONTACT && (row.ContactID == null) ) || (fSSrvOrdTypeRow.AppAddressSource == ID.SrvOrdType_AppAddressSource.BRANCH_LOCATION && fsServiceOrderRow.BranchLocationID == null ) ) { e.ReturnValue = false; } }
public ServiceOrderInfo(ServiceOrderToPost fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow, PXResultset <FSSODet> bqlResultSet_FSSODet_PostAR_AP, PXResultset <FSSODet> bqlResultSet_FSSODet_PostSO) { this.FSServiceOrderRow = fsServiceOrderRow; this.FSSrvOrdTypeRow = fsSrvOrdTypeRow; this.FSSODetToPostInAR_AP = bqlResultSet_FSSODet_PostAR_AP; this.FSSODetToPostInSO = bqlResultSet_FSSODet_PostSO; }
public virtual void EnableDisableCustomFields(PXCache cache, CROpportunity crOpportunityRow, FSxCROpportunity fsxCROpportunityRow, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) { bool isSMSetup = GetFSSetup() != null; PXUIFieldAttribute.SetEnabled <FSxCROpportunity.sDEnabled>(cache, null, isSMSetup && fsServiceOrderRow == null); PXUIFieldAttribute.SetEnabled <FSxCROpportunity.srvOrdType>(cache, null, isSMSetup && fsxCROpportunityRow.SDEnabled == true && fsServiceOrderRow == null); PXUIFieldAttribute.SetEnabled <FSxCROpportunity.branchLocationID>(cache, null, isSMSetup && fsxCROpportunityRow.SDEnabled == true); }
public DocLineExt(PXResult <FSAppointmentInventoryItem, FSAppointment, FSServiceOrder, FSSrvOrdType, FSPostDoc, FSPostInfo, INItemPlan> appointmentDetLine) { this.docLine = (IDocLine)(FSAppointmentInventoryItem)appointmentDetLine; this.fsPostDoc = (FSPostDoc)appointmentDetLine; this.fsServiceOrder = (FSServiceOrder)appointmentDetLine; this.fsSrvOrdType = (FSSrvOrdType)appointmentDetLine; this.fsAppointment = (FSAppointment)appointmentDetLine; this.fsPostInfo = (FSPostInfo)appointmentDetLine; this.fsSODet = null; this.fsSODetSplit = null; this.inItemPlan = (INItemPlan)appointmentDetLine; }
public virtual void EnableDisableActions(PXCache cache, CRCase crCaseRow, FSxCRCase fsxCRCaseRow, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) { bool isSMSetup = GetFSSetup() != null; CreateServiceOrder.SetEnabled(isSMSetup && crCaseRow != null && !string.IsNullOrWhiteSpace(crCaseRow.CaseCD) && fsServiceOrderRow == null); ViewServiceOrder.SetEnabled(isSMSetup && crCaseRow != null && !string.IsNullOrWhiteSpace(crCaseRow.CaseCD) && fsServiceOrderRow != null); OpenAppointmentBoard.SetEnabled(fsServiceOrderRow != null); }
public DocLineExt(PXResult <FSSODet, FSServiceOrder, FSSrvOrdType, FSSODetSplit, INItemPlan> soDetLine) { this.docLine = (IDocLine)(FSSODet)soDetLine; this.fsPostDoc = null; this.fsServiceOrder = (FSServiceOrder)soDetLine; this.fsSrvOrdType = (FSSrvOrdType)soDetLine; this.fsAppointment = null; this.fsPostInfo = null; this.fsSODet = (FSSODet)soDetLine; this.fsSODetSplit = (FSSODetSplit)soDetLine; this.inItemPlan = (INItemPlan)soDetLine; }
private void EnableDisableActions( PXCache cache, CRCase crCaseRow, FSxCRCase fsxCRCaseRow, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) { bool isSMSetup = GetFSSetup() != null; CreateServiceOrder.SetEnabled(isSMSetup && crCaseRow != null && crCaseRow.CaseID > 0 && fsServiceOrderRow == null); ViewServiceOrder.SetEnabled(isSMSetup && crCaseRow != null && crCaseRow.CaseID > 0 && fsServiceOrderRow != null); OpenAppointmentBoard.SetEnabled(fsServiceOrderRow != null); }
public DocLineExt(PXResult <FSAppointmentDet, FSAppointment, FSServiceOrder, FSSrvOrdType, FSPostDoc, FSPostInfo, PMTask> appointmentDetLine) { this.docLine = (IDocLine)(FSAppointmentDet)appointmentDetLine; this.fsPostDoc = (FSPostDoc)appointmentDetLine; this.fsServiceOrder = (FSServiceOrder)appointmentDetLine; this.fsSrvOrdType = (FSSrvOrdType)appointmentDetLine; this.fsAppointment = (FSAppointment)appointmentDetLine; this.fsPostInfo = (FSPostInfo)appointmentDetLine; this.fsSODet = null; this.fsSODetSplit = null; this.inItemPlan = null; this.pmTask = (PMTask)appointmentDetLine; }
protected virtual void WFStageFilter_WFID_FieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e) { if (e.NewValue != null) { FSSrvOrdType fsSrvOrdTypeRow = PXSelect <FSSrvOrdType, Where < FSSrvOrdType.srvOrdType, Equal <Required <FSSrvOrdType.srvOrdType> > > > .Select(this, e.NewValue); if (fsSrvOrdTypeRow != null) { Filter.Current.Descr = fsSrvOrdTypeRow.Descr; } } }
protected virtual void _(Events.FieldUpdating <WFStageFilter, WFStageFilter.wFID> e) { if (e.NewValue != null) { FSSrvOrdType fsSrvOrdTypeRow = PXSelect <FSSrvOrdType, Where < FSSrvOrdType.srvOrdType, Equal <Required <FSSrvOrdType.srvOrdType> > > > .Select(this, e.NewValue); if (fsSrvOrdTypeRow != null) { Filter.Current.Descr = fsSrvOrdTypeRow.Descr; } } }
public AppointmentInventoryItemInfo(FSAppointment fsAppointmentRow, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow, FSAppointmentDet fsAppointmentDet, FSAppointmentDet fsAppointmentInventoryItemRow, int index) { this.FSAppointmentRow = fsAppointmentRow; this.FSServiceOrderRow = fsServiceOrderRow; this.FSSrvOrdTypeRow = fsSrvOrdTypeRow; this.FSAppointmentDet = fsAppointmentDet; this.FSAppointmentInventoryItem = fsAppointmentInventoryItemRow; this.AppointmentID = fsAppointmentRow.AppointmentID; this.ServiceType = fsAppointmentDet.ServiceType; this.Index = index; }
public static void X_SetPersistingCheck <DAC>( PXCache cache, PXRowPersistingEventArgs e, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) where DAC : class, IBqlTable, IFSSODetBase, new() { X_RowSelected <DAC>( cache, e.Row, EventType.RowPersistingEvent, fsServiceOrderRow, fsSrvOrdTypeRow, disableSODetReferenceFields: true, docAllowsActualFieldEdition: false); }
public AppointmentInfo(AppointmentToPost fsAppointmentRow, ServiceOrderToPost fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow, PXResultset <FSAppointmentDet> bqlResultSet_FSAppointmentDet_PostAR_AP, PXResultset <FSAppointmentDet> bqlResultSet_FSAppointmentDet_PostSO, PXResultset <FSAppointmentDet> bqlResultSet_FSAppointmentInventoryItem_PostAR_AP, PXResultset <FSAppointmentDet> bqlResultSet_FSAppointmentInventoryItem_PostSO) { this.FSAppointmentRow = fsAppointmentRow; this.FSServiceOrderRow = fsServiceOrderRow; this.FSSrvOrdTypeRow = fsSrvOrdTypeRow; this.FSAppointmentDetToPostInAR_AP = bqlResultSet_FSAppointmentDet_PostAR_AP; this.FSAppointmentDetToPostInSO = bqlResultSet_FSAppointmentDet_PostSO; this.FSAppointmentInventoryItemToPostIn_AR_AP = bqlResultSet_FSAppointmentInventoryItem_PostAR_AP; this.FSAppointmentInventoryItemToPostInSO = bqlResultSet_FSAppointmentInventoryItem_PostSO; }
public virtual FSCreatedDoc PressSave(int batchID, List <DocLineExt> docLines, BeforeSaveDelegate beforeSave) { if (Base.issue.Current == null) { throw new SharedClasses.TransactionScopeException(); } if (beforeSave != null) { beforeSave(Base); } Base.Save.Press(); INRegister inRegisterRow = Base.issue.Current != null ? Base.issue.Current : Base.issue.Select(); if (docLines != null && docLines.Count > 0) { FSSrvOrdType fsSrvOrdTypeRow = docLines[0].fsSrvOrdType; if (fsSrvOrdTypeRow != null && fsSrvOrdTypeRow.ReleaseIssueOnInvoice == true) { if (inRegisterRow.Hold == true) { Base.issue.Cache.SetValueExtIfDifferent <INRegister.hold>(inRegisterRow, false); inRegisterRow = Base.issue.Update(inRegisterRow); } Base.release.Press(); } } string docType = Base.issue.Current.DocType; string refNbr = Base.issue.Current.RefNbr; var fsCreatedDocRow = new FSCreatedDoc() { BatchID = batchID, PostTo = ID.Batch_PostTo.IN, CreatedDocType = inRegisterRow.DocType, CreatedRefNbr = inRegisterRow.RefNbr }; return(fsCreatedDocRow); }
private void EnableDisableActions( PXCache cache, CROpportunity crOpportunityRow, FSxCROpportunity fsxCROpportunityRow, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow) { bool isSMSetup = GetFSSetup() != null; bool insertedStatus = Base.Opportunity.Cache.GetStatus(Base.Opportunity.Current) == PXEntryStatus.Inserted; CreateServiceOrder.SetEnabled(isSMSetup && crOpportunityRow != null && insertedStatus == false && fsServiceOrderRow == null); ViewServiceOrder.SetEnabled(isSMSetup && crOpportunityRow != null && crOpportunityRow.OpportunityID != null && fsServiceOrderRow != null); OpenAppointmentBoard.SetEnabled(fsServiceOrderRow != null); Base.createSalesOrder.SetEnabled(fsServiceOrderRow == null); Base.createInvoice.SetEnabled(fsServiceOrderRow == null); }
public static void X_RowSelected <DAC>( PXCache cache, PXRowSelectedEventArgs e, FSServiceOrder fsServiceOrderRow, FSSrvOrdType fsSrvOrdTypeRow, bool disableSODetReferenceFields, bool docAllowsActualFieldEdition) where DAC : class, IBqlTable, IFSSODetBase, new() { X_RowSelected <DAC>( cache, e.Row, EventType.RowSelectedEvent, fsServiceOrderRow, fsSrvOrdTypeRow, disableSODetReferenceFields, docAllowsActualFieldEdition); }
public static void X_SubID_FieldDefaulting <DAC>(PXCache cache, PXFieldDefaultingEventArgs e, FSSrvOrdType fsSrvOrdTypeRow, FSServiceOrder fsServiceOrderRow) where DAC : class, IBqlTable, IFSSODetBase, new() { if (e.Row == null || fsSrvOrdTypeRow == null || fsServiceOrderRow == null) { return; } var row = (DAC)e.Row; if (row.AcctID == null) { return; } e.NewValue = ServiceOrderCore.Get_IFSSODetBase_SubID_DefaultValue(cache, row, fsServiceOrderRow, fsSrvOrdTypeRow); }
public static void X_AcctID_FieldDefaulting <DAC>(PXCache cache, PXFieldDefaultingEventArgs e, FSSrvOrdType fsSrvOrdTypeRow, FSServiceOrder fsServiceOrderRow) where DAC : class, IBqlTable, IFSSODetBase, new() { if (e.Row == null || fsSrvOrdTypeRow == null || fsServiceOrderRow == null) { return; } var row = (DAC)e.Row; if (IsInventoryLine(row.LineType) == false) { e.NewValue = null; } else { e.NewValue = ServiceOrderCore.Get_TranAcctID_DefaultValue(cache.Graph, fsSrvOrdTypeRow.SalesAcctSource, row.InventoryID, fsServiceOrderRow); } }
protected virtual IEnumerable nodes([PXInt] int?parent) { List <FSWFStage> list = new List <FSWFStage>(); if (!parent.HasValue) { FSWFStage fsWFStageRow = new FSWFStage(); fsWFStageRow.WFStageID = RootNodeID; fsWFStageRow.WFID = NodeFilter.Current.WFID; FSSrvOrdType fsSrvOrdTypeRow = PXSelect <FSSrvOrdType, Where < FSSrvOrdType.srvOrdTypeID, Equal <Required <FSSrvOrdType.srvOrdTypeID> > > > .Select(this, fsWFStageRow.WFID); if (fsSrvOrdTypeRow != null) { fsWFStageRow.WFStageCD = fsSrvOrdTypeRow.SrvOrdType; list.Add(fsWFStageRow); } } else { PXResultset <FSWFStage> bqlResultSet; bqlResultSet = PXSelect <FSWFStage, Where < FSWFStage.wFID, Equal <Current <SelectedNode.wFID> >, And <FSWFStage.parentWFStageID, Equal <Required <FSWFStage.parentWFStageID> > > > > .Select(this, parent); foreach (FSWFStage fsWFStageRow in bqlResultSet) { list.Add(fsWFStageRow); } } return(list); }
protected void CRCase_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } CRCase crCaseRow = (CRCase)e.Row; FSxCRCase fsxCRCaseRow = cache.GetExtension <FSxCRCase>(crCaseRow); FSServiceOrder fsServiceOrderRow = CRExtensionHelper.GetRelatedServiceOrder(Base, cache, crCaseRow, fsxCRCaseRow.SOID); FSSrvOrdType fsSrvOrdTypeRow = null; if (fsServiceOrderRow != null) { fsSrvOrdTypeRow = CRExtensionHelper.GetServiceOrderType(Base, fsServiceOrderRow.SrvOrdType); } EnableDisableCustomFields(cache, crCaseRow, fsxCRCaseRow, fsServiceOrderRow, fsSrvOrdTypeRow); EnableDisableActions(cache, crCaseRow, fsxCRCaseRow, fsServiceOrderRow, fsSrvOrdTypeRow); SetPersistingChecks(cache, crCaseRow, fsxCRCaseRow, fsSrvOrdTypeRow); }
public InvoiceItem(PXGraph graph, AppointmentInfo appointmentInfo, int index) { this.FSAppointmentRow = appointmentInfo.FSAppointmentRow; this.FSServiceOrderRow = appointmentInfo.FSServiceOrderRow; this.FSSrvOrdTypeRow = appointmentInfo.FSSrvOrdTypeRow; this.Index = index; this.CustomerID = appointmentInfo.FSServiceOrderRow.BillCustomerID; this.SOID = appointmentInfo.FSServiceOrderRow.SOID; this.AppointmentID = appointmentInfo.FSAppointmentRow.AppointmentID; this.CustomerLocationID = appointmentInfo.FSServiceOrderRow.BillLocationID; this.CustPORefNbr = appointmentInfo.FSServiceOrderRow.CustPORefNbr; this.CustWorkOrderRefNbr = appointmentInfo.FSServiceOrderRow.CustWorkOrderRefNbr; this.PostToAPNegBalances = appointmentInfo.FSSrvOrdTypeRow.PostNegBalanceToAP; this.FSPostingLineDetailsToPostInAR_AP = new List <PostingLine>(); this.FSPostingLineDetailsToPostInSO = new List <PostingLine>(); foreach (FSAppointmentDet fsAppointmentDetRow in appointmentInfo.FSAppointmentDetToPostInAR_AP) { this.AddAppointmentLineToList(graph, fsAppointmentDetRow, null, appointmentInfo, true, false); } foreach (FSAppointmentDet fsAppointmentDetRow in appointmentInfo.FSAppointmentDetToPostInSO) { this.AddAppointmentLineToList(graph, fsAppointmentDetRow, null, appointmentInfo, false, true); } foreach (FSAppointmentDet fsAppointmentInventoryItemRow in appointmentInfo.FSAppointmentInventoryItemToPostIn_AR_AP) { this.AddAppointmentLineToList(graph, null, fsAppointmentInventoryItemRow, appointmentInfo, true, false); } foreach (FSAppointmentDet fsAppointmentInventoryItemRow in appointmentInfo.FSAppointmentInventoryItemToPostInSO) { this.AddAppointmentLineToList(graph, null, fsAppointmentInventoryItemRow, appointmentInfo, false, true); } }