Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void updateTaxZone(){
- var address = (LocationExtAddress)Base.DefLocation.Select();
- if (!string.IsNullOrEmpty(address.PostalCode))
- {
- var taxZoneZip = PXSelect<TaxZoneZip,
- Where<TaxZoneZip.zipCode, Equal<Required<TaxZoneZip.zipCode>>>>
- .Select(Base, address.PostalCode)
- .RowCast<TaxZoneZip>().OrderBy(z => z.TaxZoneID).FirstOrDefault();
- if (taxZoneZip != null && taxZoneZip.TaxZoneID != "EXEMPT")
- {
- DefLocation.CTaxZoneID = taxZoneZip.TaxZoneID; ;
- }
- }
- return;
- }
Add Comment
Please, Sign In to add comment