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; }
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 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; }
/// <summary> /// Update the references in <c>FSPostInfo</c> and <c>FSPostDet</c> when the posting process of every AppointmentInventoryItem is complete in IN. /// </summary> public virtual void UpdateIssuePostInfo(INIssueEntry graphINIssueEntry, InventoryPostBatchMaint graphInventoryPostBatchMaint, PostInfoEntry graphPostInfoEntry, FSAppointmentDet fsAppointmentInventoryItemRow, SharedClasses.AppointmentInventoryItemInfo appointmentInventoryItemInfoRow, FSPostBatch fsPostBatchRow) { //Create | Update Post info FSPostInfo fsPostInfoRow; FSPostDet fsPostDet; fsPostBatchRow = graphInventoryPostBatchMaint.BatchRecords.Current = graphInventoryPostBatchMaint.BatchRecords.Search <FSPostBatch.batchID>(fsPostBatchRow.BatchID); fsPostInfoRow = PXSelect <FSPostInfo, Where < FSPostInfo.postID, Equal <Required <FSPostInfo.postID> > > > .Select(this, appointmentInventoryItemInfoRow.FSAppointmentInventoryItem.PostID); if (fsPostInfoRow == null || fsPostInfoRow.PostID == null) { fsPostInfoRow = new FSPostInfo(); fsPostInfoRow = graphPostInfoEntry.PostInfoRecords.Current = graphPostInfoEntry.PostInfoRecords.Insert(fsPostInfoRow); } else { fsPostInfoRow = graphPostInfoEntry.PostInfoRecords.Current = graphPostInfoEntry.PostInfoRecords.Search <FSPostInfo.postID>(fsPostInfoRow.PostID); } fsPostInfoRow.INPosted = true; fsPostInfoRow.INDocType = graphINIssueEntry.issue.Current.DocType; fsPostInfoRow.INRefNbr = graphINIssueEntry.issue.Current.RefNbr; foreach (INTran inTranRowLocal in graphINIssueEntry.transactions.Select()) { FSxINTran fsxINTranRow = graphINIssueEntry.transactions.Cache.GetExtension <FSxINTran>(inTranRowLocal); if (fsxINTranRow != null && appointmentInventoryItemInfoRow.FSAppointmentInventoryItem.AppDetID == fsxINTranRow.AppDetID) { fsPostInfoRow.INLineNbr = inTranRowLocal.LineNbr; break; } } fsPostInfoRow.AppointmentID = appointmentInventoryItemInfoRow.FSAppointmentRow.AppointmentID; fsPostInfoRow.SOID = appointmentInventoryItemInfoRow.FSAppointmentRow.SOID; fsPostInfoRow = graphPostInfoEntry.PostInfoRecords.Update(fsPostInfoRow); graphPostInfoEntry.Save.Press(); fsPostInfoRow = graphPostInfoEntry.PostInfoRecords.Current; fsPostDet = new FSPostDet(); fsPostDet.PostID = fsPostInfoRow.PostID; fsPostDet.INPosted = fsPostInfoRow.INPosted; fsPostDet.INDocType = fsPostInfoRow.INDocType; fsPostDet.INRefNbr = fsPostInfoRow.INRefNbr; fsPostDet.INLineNbr = fsPostInfoRow.INLineNbr; graphInventoryPostBatchMaint.BatchDetails.Insert(fsPostDet); graphInventoryPostBatchMaint.Save.Press(); fsAppointmentInventoryItemRow.Mem_BatchNbr = fsPostBatchRow.BatchNbr; fsPostInfoRow = graphPostInfoEntry.PostInfoRecords.Current; PXUpdate < Set <FSAppointmentDet.postID, Required <FSAppointmentDet.postID> >, FSAppointmentDet, Where < FSAppointmentDet.appDetID, Equal <Required <FSAppointmentDet.appDetID> > > > .Update(this, fsPostInfoRow.PostID, appointmentInventoryItemInfoRow.FSAppointmentInventoryItem.AppDetID); }