Question

Labor Item Selection Based on Earning Type

  • 24 November 2023
  • 0 replies
  • 27 views

Userlevel 5
Badge +1

Hi Team,

 

I want to display only values in the labor item field selector where the earning type is selected as 'BILLABLE' on the summary tab of the 'Employee Time Card' screen. I have written the code for this, but it's not working. Kindly provide me with a solution so that I can achieve this.


 

 #region LabourItemID  
public new abstract class labourItemID : PX.Data.BQL.BqlInt.Field<labourItemID> { }
[PMLaborItem(typeof(projectID), typeof(earningType), typeof(Select<EPEmployee, Where<EPEmployee.bAccountID,
Equal<Null>>>))]
[PXSelector(typeof(Search<InventoryItem.inventoryID, Where<InventoryItem.itemClassID,
In2<Search<INItemClass.itemClassID, Where
<INItemClass.itemClassCD, Equal<Current<EPTimeCardSummaryWithInfo.earningType>>>>>,
And<CustomerClassAttr.EarningType, Equal<Current<EPTimeCardSummaryWithInfo.earningType>>>>>),
SubstituteKey = typeof(InventoryItem.inventoryCD),
DescriptionField = typeof(InventoryItem.descr)
)]
[PXCustomizeSelectorColumns(
typeof(PX.Objects.IN.InventoryItem.inventoryCD),
typeof(PX.Objects.IN.InventoryItem.descr),
typeof(PX.Objects.IN.InventoryItem.itemClassID),
typeof(PX.Objects.IN.InventoryItem.itemStatus),
typeof(PX.Objects.IN.InventoryItem.itemType),
typeof(PX.Objects.IN.InventoryItem.baseUnit),
typeof(PX.Objects.IN.InventoryItem.salesUnit),
typeof(PX.Objects.IN.InventoryItem.purchaseUnit),
typeof(PX.Objects.IN.InventoryItem.basePrice))]
public int? LabourItemID { get; set; }

public class CustomerClassAttr
{
public class EarningType : BqlType<IBqlString, string>.Constant<EarningType>
{
public EarningType() : base("BILLABLE") { }
}
}
#endregion
}
}

 

Regards,

Sagar


0 replies

Be the first to reply!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved