public override void _(Events.RowPersisting <EntityWithTaxCalcMode> e) { if (SkipValidation || Taxes.Count() == 0) { return; } PXSetPropertyException pex = null; foreach (EPExpenseClaimDetails row in Base.ExpenseClaimDetails.Select()) { try { VerifyTransactions(row.TaxCalcMode, Base.Tax_Rows.Select(row.ClaimDetailID).RowCast <Tax>()); } catch (PXException ex) { pex = new PXSetPropertyException(ex.Message); Base.ExpenseClaimDetails.Cache.RaiseExceptionHandling <EPExpenseClaimDetails.curyTaxTotal>(row, row.CuryTaxTotal, pex); } } if (pex != null) { throw pex; } }
public virtual void _(Events.RowPersisting <EntityWithTaxCalcMode> e) { if (SkipValidation || string.IsNullOrEmpty(e.Row?.TaxCalcMode) || Taxes.Count() == 0) { return; } try { VerifyTransactions(e.Row.TaxCalcMode, Taxes); } catch (PXException ex) { e.Cache.RaiseExceptionHandling <EntityWithTaxCalcMode.taxCalcMode>(e.Row, e.Row.TaxCalcMode, new PXSetPropertyException(ex.Message)); throw ex; } }