Question

Get Vendor registered or configured Tax Id's

  • 28 March 2024
  • 1 reply
  • 28 views

Userlevel 3
Badge

Hi Team,

I need to get the Vendor registered or configured Tax Id's (Tax class) to a foreach loop for a particular vendor record (BAccountID  = X). Can someone please help me out to give me the BQL query for this?

Thanks

Bhagya  


1 reply

Userlevel 6
Badge +4

Hi @bhagyat25 

If you are asking about this:

Vendor Purchase Settings

 

The query is based on the Location class

Inspecting TaxRegistrationID

as follow:

...
using PX.Object.AP;
...

var q = new SelectFrom<VendorAttribute.Location>
.Where<Use<VendorAttribute.Location.bAccountID>.AsInt.IsEqual<@P.AsInt>>
.View(graph);

foreach(Vendor v in VendorList)
{
...
if(v.BAccountID == targetBAccountID)
{
...

VendorAttribute.Location loc = q.Select(targetBAccountID).FirstOrDefault();

string taxRegID = loc.TaxRegistrationID;
...
}
...
}
...

 

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