/* CR0013 (cust ref LF 82) - WIP Report */ /* row 4*/ /* owner:Data Sheet Item, BOM, PartMaterial, * attr:lifWIPFabricColorType, * name: WIP Fabric Color Type , * note: Jun2018 IC added for CR0013/LC82 * dataType:string, * option: n * restr edits: y * evalu once: n * test node_url:C621167 */ block( isFabric = (attr(Actual.ProductType, "Node Name") =="Fabric"), isNotInActive = (lifInactive == false), isNotNullSupplierNumber = (BOMLineQuote.isNull() == false), if ( isFabric && isNotInActive && isNotNullSupplierNumber, block( isNotNullArtworkPrintRef = (ifNull(lifArtworkPrintRef,"") != ""), if (isNotNullArtworkPrintRef,"STRIKE OFF", block( condition1 = (lifDevelopmentMaterialSample.SampleType == enum("MaterialSampleType:Development")), condition2 = (lifDevelopmentMaterialSample.lifMaterialSampleSubType != enum("lifMaterialSampleSubType:")), if( condition1 && condition2, "LAB DIP", "") ) ) ), "") ) /* row 5*/ /* owner:PartMaterial, * attr:lifLABDIPSTRIKEOFFPlan, * name: LABDIP/STRIKE OFF Plan, * note: Jun2018 IC added for CR0013/LC82 * dataType:date, * option: n * restr edits: y * evalu once: n * test node_url:C621167 */ block( isFabric = (attr(Actual.ProductType, "Node Name") =="Fabric"), isStrikOff = (lifWIPFabricColorType == "STRIKE OFF"), isDevelopment = (lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:DV") || lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:Development")), isNotNullStrikeOffPlanDate = (lifDevelopmentMaterialSample.lifStrikeOffPlanDate.isNull() == false && lifDevelopmentMaterialSample.lifStrikeOffPlanDate != date(0)), if (isFabric && isDevelopment, if (isStrikOff && isNotNullStrikeOffPlanDate , lifDevelopmentMaterialSample.lifStrikeOffPlanDate, ifNull(__Parent__.__Parent__.__Parent__.Attributes.lifDelivery.lifFabricOrderLabDipDueDate,date(0)) ), "") ) /* row 6 */ /* owner:PartMaterial * attr:lifLDMaterialSampleColorAprroved * name: LD Material Sample Color Approved * note: Jun2018 IC added for CR0013/LC82 * dataType:boolean * option: n * restr edits: y * evalu once: n * test node_url:C621167 */ block ( isLABDIP = (lifWIPFabricColorType=="LAB DIP"), isDevelopment = (lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:DV") || lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:Development")), isNotNullMSSubType = (lifDevelopmentMaterialSample.lifMaterialSampleSubType != enum("lifMaterialSampleSubType:")), isTrueMSApprovedColor = (lifDevelopmentMaterialSample.lifApprovedColor), res = (isLABDIP && isDevelopment && isNotNullMSSubType && isTrueMSApprovedColor) ) /* owner:PartMaterial, * attr:lifLDMaterialSampleColorApprovedDate * name:LD Material Sample Color Approved Date * note: Jun2018 IC added for CR0013/LC82 * dataType:date * option: n * restr edits: y * evalu once: n * test node_url:C621167 */ block ( isTrueLDMaterialSampleColorAprroved = (lifLDMaterialSampleColorAprroved), if (isTrueLDMaterialSampleColorAprroved,lifDevelopmentMaterialSample.lifApprovedColorDate,date(0) ) ) /* row 7 */ /* owner:PartMaterial, * attr:lifSOMaterialSampleColorAprroved, * name: SO Material Sample Color Approved , * note: Jun2018 IC added for CR0013/LC82 * dataType:boolean, * option: n * restr edits: y * evalu once: n * test node_url:C621167 */ block ( isSO = (lifWIPFabricColorType=="STRIKE OFF"), iSDevelopment = (lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:DV") || lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:Development")), isTrueMSApprovedColor = (lifDevelopmentMaterialSample.lifApprovedColor), res = (isSO && iSDevelopment && isTrueMSApprovedColor) ) /* owner:PartMaterial, * attr:lifSOMaterialSampleColorApprovedDate, * name:SO Material Sample Color Approved Date * note: 6Jun2018 IC added for CR0013/LC82 * dataType:date, * option: n * restr edits: y * evalu once: n * test node_url:C621167 */ block ( isTrueSOMaterialSampleColorAprroved = (lifSOMaterialSampleColorAprroved), if (isTrueSOMaterialSampleColorAprroved,lifDevelopmentMaterialSample.lifApprovedColorDate,date(0) ) ) /*row 11*/ /* owner: PartMaterial, * attr: lifisartwork, * name: is Artwork, * note: Jun2018 IC added for CR0013/LC82 * dataType: boolean, * option: n * restr edits: y * evalu once: n * test node_url: C621172 */ /* block( isTrue = (attr(Actual.ProductType, "Node Name") =="Artwork"). isNotInActive = (lifInactive == false), isNotNullSupplierNumber = (BOMLineQuote.isNull() == false), res = (isTrue && isNotInActive && isNotNullSupplierNumber) )*/ block( isTrue = (attr(Actual.ProductType, "Node Name") =="Artwork"), isNotInActive = (lifInactive == false), isNotNullSupplierNumber = (BOMLineQuote.isNull() == false), if (isNotNullSupplierNumber, block( Order_Supplier_ID = __Parent__.__Parent__.__Parent__.PurchasedOrderProducts.first().__Parent__.POSupplier, Supplier_Quote_ID = BOMLineQuote.__Parent__.Supplier, match_order = ( Order_Supplier_ID == Supplier_Quote_ID) ), match_order = false), res = (isTrue && isNotInActive && isNotNullSupplierNumber && match_order) ) /* owner: PartMaterial, * attr: lifAWMaterialSampleColorApproved * name: AW Material Sample Color Approved * note: Jun2018 IC added for CR0013/LC82 * dataType: boolean, * option: n * restr edits: y * evalu once: n * test node_url: C621266 */ block( isArtwork = (attr(Actual.ProductType, "Node Name") =="Artwork"), isNotInActive = (lifInactive == false), isNotNullSupplierNumber = (lifDevelopmentMaterialSample.isNull() == false), iSDevelopment = (lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:DV") || lifDevelopmentMaterialSample.SampleType==enum("MaterialSampleType:Development")), if (isArtwork && isNotInActive && isNotNullSupplierNumber && iSDevelopment,true,false) ) /* owner: PartMaterial, * attr: lifAWMaterialSampleColorApprovedDate * name: AW Material Sample Color Approved Date * note: Jun2018 IC added for CR0013/LC82 * dataType: date, * option: n * restr edits: y * evalu once: n * test node_url: C621266 */ block ( isTrue = (lifAWMaterialSampleColorApproved), if (isTrue,lifDevelopmentMaterialSample.lifApprovedColorDate,date(0) ) ) /*******************************************************************************************************/ /* owner: StyleAttributes, * attr: lifhaveALS * name: Have ALS * note: Jun2018 IC added for CR0013/LC82 * dataType: string * option: n * restr edits: y * evalu once: n *** hidden *** * test node_url: C621166 */ block( boms = __Parent__.join(DataSheets).filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), boms = boms.join(CurrentRevision).filter(Usable), pms = boms.join(Items).filter(attr("lifisartwork") && attr(lifDevelopmentMaterialSample, "SampleType") == enum("MaterialSampleType:Development") ), if (size(pms)>0, haveartwork = 1, haveartwork = 0), pms = boms.join(Items).filter(attr("lifWIPFabricColorType") == "LAB DIP" && attr(lifDevelopmentMaterialSample, "SampleType") == enum("MaterialSampleType:Development")), if (size(pms)>0, haveLABDIP = 1, haveLABDIP = 0), pms = boms.join(Items).filter(attr("lifWIPFabricColorType") == "STRIKE OFF" && attr(lifDevelopmentMaterialSample, "SampleType") == enum("MaterialSampleType:Development") ), if (size(pms)>0, haveSOFF = 1, haveSOFF = 0), res = string(haveartwork) + string(haveLABDIP) + string(haveSOFF) ) /* owner: StyleAttributes, * attr: lifhaveArtWork * name: Has ArtWork * note: Jun2018 IC added for CR0013/LC82 * dataType: boolean * option: n * restr edits: y * evalu once: n * test node_url: C621166 */ res = (substr(lifhaveALS,0,1)=="1") /* block( Order_Supplier_ID = __Parent__.PurchasedOrderProducts.first().__Parent__.POSupplier, isNotNullOrder_Supplier_ID = (Order_Supplier_ID.isNull() == false), if (isNotNullOrder_Supplier_ID , block( boms = __Parent__.join(DataSheets).filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), boms = boms.join(CurrentRevision).filter(Usable), pms = boms.join(Items).filter(attr("lifisartwork") && attr(lifDevelopmentMaterialSample, "SampleType") == enum("MaterialSampleType:Development") ), suppliers = pms.join(BOMLineQuote).join(__Parent__).join(Supplier).unique(), res_same_supplier = (indexOf(suppliers,Order_Supplier_ID)>0), if (size(pms)>0 && res_same_supplier, haveartwork = 1, haveartwork = 0) ), haveartwork=0), res = (haveartwork>0) )*/ /* owner: StyleAttributes, * attr: lifhaveLABDIP * name: Has LABDIP * note: Jun2018 IC added for CR0013/LC82 * dataType: boolean * option: n * restr edits: y * evalu once: n * test node_url: C621166 */ res = (substr(lifhaveALS,1,2)=="1") /* owner: StyleAttributes, * attr: lifhaveSTRIKEOFF * name: Has STRIKE OFF * note: Jun2018 IC added for CR0013/LC82 * dataType: boolean * option: n * restr edits: y * evalu once: n * test node_url: C621166 */ res = (substr(lifhaveALS,2,3)=="1") /* owner: StyleAttributes, * attr: lifGARMENTARTWORKStatus * name: GARMENT ARTWORK Status * note: Jun2018 IC added for CR0013/LC82 * dataType: boolean, * option: n * restr edits: y * evalu once: n * test node_url: C621166 */ block( if (true, block ( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms = pms.filter(`lifisartwork`), count_true = size(pms.filter(`lifAWMaterialSampleColorApproved`)), count_total = size(pms), res = (count_true == count_total && count_total > 0 ) ) ,false) ) /* owner:StyleAttributes, * attr:lifLABDIPStatus * name:LABDIP Status * note: Jun2018 IC added for CR0013/LC82 * dataType:boolean, * option: n * restr edits: y * evalu once: n * test node_url:C621166 */ block ( if (true, block( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms = pms.filter(`lifWIPFabricColorType` == "LAB DIP"), count_true = size(pms.filter(`lifLDMaterialSampleColorAprroved`)), count_total = size(pms), res = (count_true == count_total && count_total > 0 ) ) ,false) ) /* owner:StyleAttributes, * attr:lifSTRIKEOFFStatus * name:STRIKE OFF Status * note: Jun2018 IC added for CR0013/LC82 * dataType:boolean, * option: n * restr edits: y * evalu once: n * test node_url:C621166 */ block( if (true, block ( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms = pms.filter(`lifWIPFabricColorType` == "STRIKE OFF"), count_true = size(pms.filter(`lifSOMaterialSampleColorAprroved`)), count_total = size(pms), res = (count_true == count_total && count_total > 0 ) ) ,false) ) /* owner:StyleAttributes, * attr: lifLatestLDSOPlan * name: Latest LABDIP/STRIKE OFF Plan * note: Jun2018 IC added for CR0013/LC82 * dataType:time, * option: n * restr edits: y * evalu once: n * test node_url:C621166 */ block( if (lifhaveSTRIKEOFF || lifhaveLABDIP, block ( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms = pms.filter(`lifWIPFabricColorType` == "STRIKE OFF" || `lifWIPFabricColorType` == "LAB DIP"), last = pms.latest(`lifLABDIPSTRIKEOFFPlan`) ) , date(0) ) ) /*******************************************************************************************************/ /* owner:StyleAttributes, * attr:lifLABDIP, * name:LABDIP , * note: Jun2018 IC added for CR0013/LC82 * dataType:date, * option: n * restr edits: y * evalu once: n * test node_url:C621166 */ block ( isTrueLABDIPStatus = (lifLABDIPStatus), if (isTrueLABDIPStatus, block( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms = pms.filter(`lifWIPFabricColorType` == "LAB DIP"), res = pms.latest(`lifLDMaterialSampleColorApprovedDate`) ) , date(0) ) ) /* owner:StyleAttributes, * attr:lifSTRIKEOFF * name:STRIKE OFF * note: Jun2018 IC added for CR0013/LC82 * dataType:date, * option: n * restr edits: y * evalu once: n * test node_url:C621166 */ block ( isTrueSOStatus = (lifSTRIKEOFFStatus), if (isTrueSOStatus, block( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms_LabDip = pms.filter(`lifWIPFabricColorType` == "STRIKE OFF"), res = pms.latest(`lifSOMaterialSampleColorApprovedDate`) ) , date(0) ) ) /*row 8 */ /* owner:StyleAttributes, * attr:lifLABDIPSTRIKEOFF * name:LABDIP/STRIKE OFF * note: Jun2018 IC added for CR0013/LC82 * dataType:date, * option: n * restr edits: y * evalu once: n * test node_url:C621266 */ block ( if (lifLABDIPStatus && lifSTRIKEOFFStatus, if (lifLABDIP>lifSTRIKEOFF, lifLABDIP, lifSTRIKEOFF), date(0) ) ) /* owner: StyleAttributes, * attr: lifGARMENTARTWORK * name: GARMENT ARTWORK * note: Jun2018 IC added for CR0013/LC82 * dataType: time * option: n * restr edits: y * evalu once: n * test node_url: C621166 */ block ( if (lifGARMENTARTWORKStatus, block( boms = __Parent__.DataSheets.filter(`Node Type` == "ApparelBOM" || `Node Type` == "MaterialBOM"), revs = boms.join(CurrentRevision).filter(Usable), pms = revs.join(Items).filter(`Node Type` == "PartMaterial" && !ForStyle && isNull(Copy)), pms = pms.filter(`lifisartwork`), res = pms.latest(`lifAWMaterialSampleColorApprovedDate`) ), date(0) ) ) /*row 14-20*/ /* owner: PurchasedOrder, * attr: lif1stRemarks * name: 1st Remarks * note: Jun2018 IC added for CR0013/LC82 * dataType: string * option: n * restr edits: y * evalu once: n * test node_url: C635240 */ block ( isNulllif1stFitSentDate = (lif1stFitSentDate == date(0)), isNulllifROCOReferPO = (lifROCOReferPO == ""), if (isNulllif1stFitSentDate, if (isNulllifROCOReferPO == false, lifROCOReferPO, if (lifDirectFit,"Direct Fit", if(lifDVUpgradeTo1stFit,"DV Upgrade To 1st Fit", if(lif1stFitLFInternal,"1st Fit LF Internal","") ) ) ), "") ) /* owner: MaterialSample, * attr: lifSamplePlacementComments * name: Placement Comments * note: Jun2018 IC added for CR0013/LC82 * dataType: string / Rich Text * option: n * restr edits: y * evalu once: n * */ block ( DS1 = SampleDataSheets.filter(attr("Node Type")=="MaterialBOM"), DS2 = DS1.join(CurrentRevision).filter(`lifPlacementComments` != ""), DS3 = DS2.order(`ModifiedAt`), res = DS3.last().lifPlacementComments ) /*row 28-47*/ /* owner: site.xml * note: expose orders to purchasedorders such that Spec Item (delivery) could add to custom view. */ /**/ /* owner: Product Attributes, * attr: lifBOMFabricPlacements * name: WIP Placement * note: Jun2018 IC added for CR0013/LC82 * dataType: refset placement (partMaterial) * option: n * restr edits: y * evalu once: n * test node_url: C635240 */ block( bomType = if(__Parent__.`Node Type` == "Style", "Apparel", "Material") + "BOM", boms = __Parent__.join(DataSheets).filter(attr("Node Type") == bomType).filter(attr("IsSampleBOM")==false), boms = boms.join(CurrentRevision).filter(State!=enum("Revision.State:ABANDONED")), pms = boms.join(Items).filter(`lifWIPFabricColorType` == "LAB DIP" ||`lifWIPFabricColorType` == "STRIKE OFF" || lifisartwork), res = pms.filter( attr(lifDevelopmentMaterialSample, "SampleType") == enum("MaterialSampleType:DV") || attr(lifDevelopmentMaterialSample, "SampleType") == enum("MaterialSampleType:Development")) ) /*Order: add spec item delivery path */