public bool IsServiceActive(PXGraph aGraph) { if (PXAccess.FeatureInstalled <FeaturesSet.avalaraTax>() == false || PXAccess.FeatureInstalled <FeaturesSet.addressValidation>() == false) { return(false); } TX.TXAvalaraSetup avalaraSetup = PXSelect <TX.TXAvalaraSetup> .Select(aGraph); return(avalaraSetup != null && (avalaraSetup.IsActive ?? false)); }
public static bool IsActive(PXGraph graph) { if (!PXAccess.FeatureInstalled <FeaturesSet.avalaraTax>()) { return(false); } TX.TXAvalaraSetup avalaraSetup = PXSelect <TX.TXAvalaraSetup> .Select(graph); if (avalaraSetup != null && avalaraSetup.IsActive == true) { return(true); } return(false); }
protected virtual void TaxZone_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { TaxZone row = e.Row as TaxZone; if (row == null) { return; } TX.TXAvalaraSetup avalaraSetup = PXSelect <TX.TXAvalaraSetup> .Select(this); PXUIFieldAttribute.SetVisible <TaxZone.isExternal>(cache, null, avalaraSetup != null && avalaraSetup.IsActive == true); PXUIFieldAttribute.SetVisible <TaxZone.taxVendorID>(cache, e.Row, row.IsExternal == true); Details.Cache.AllowInsert = row.IsExternal != true; Details.Cache.AllowUpdate = row.IsExternal != true; Details.Cache.AllowDelete = row.IsExternal != true; Zip.Cache.AllowInsert = row.IsExternal != true; Zip.Cache.AllowUpdate = row.IsExternal != true; Zip.Cache.AllowDelete = row.IsExternal != true; }
protected virtual void TaxZone_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { TaxZone row = e.Row as TaxZone; if (row == null) { return; } TX.TXAvalaraSetup avalaraSetup = PXSelect <TX.TXAvalaraSetup> .Select(this); PXUIFieldAttribute.SetVisible <TaxZone.isExternal>(cache, null, avalaraSetup != null && avalaraSetup.IsActive == true); PXUIFieldAttribute.SetVisible <TaxZone.taxVendorID>(cache, e.Row, row.IsExternal == true); PXUIFieldAttribute.SetVisible <TaxZone.taxID>(cache, e.Row, row.IsManualVATZone == true); PXDefaultAttribute.SetPersistingCheck <TaxZone.taxID>(cache, e.Row, PXAccess.FeatureInstalled <FeaturesSet.manualVATEntryMode>() && row.IsManualVATZone == true ? PXPersistingCheck.Null : PXPersistingCheck.Nothing); Details.Cache.AllowInsert = row.IsExternal != true; Details.Cache.AllowUpdate = row.IsExternal != true; Details.Cache.AllowDelete = row.IsExternal != true; Zip.Cache.AllowInsert = row.IsExternal != true; Zip.Cache.AllowUpdate = row.IsExternal != true; Zip.Cache.AllowDelete = row.IsExternal != true; }