Created
March 14, 2017 03:59
-
-
Save smarenich/5dd521a9a854ec964272debabcaf5990 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PXReportRequiredException ex = null; | |
if(row.ARRefNumber != null) | |
{ | |
Dictionary<string, string> dictionary = new Dictionary<string, string>(); | |
dictionary["DocType"] = row.ARDocType; | |
dictionary["RefNbr"] = row.ARRefNumber; | |
ex = PXReportRequiredException.CombineReport(ex, row.ARBatchNumber == null ? "AR610500" : "AR622000", dictionary, false); | |
} | |
if (row.APRefNumber != null) | |
{ | |
APInvoice inv = PXSelectorAttribute.Select<DocHeader.aPRefNumber>(Document.Cache, row) as APInvoice; | |
Dictionary<string, string> dictionary = new Dictionary<string, string>(); | |
dictionary["DocType"] = row.APDocType; | |
dictionary["RefNbr"] = row.APRefNumber; | |
dictionary["PeriodTo"] = PX.Objects.GL.OpenPeriodAttribute.FormatForDisplay(inv.FinPeriodID); | |
dictionary["PeriodFrom"] = PX.Objects.GL.OpenPeriodAttribute.FormatForDisplay(inv.FinPeriodID); | |
ex = PXReportRequiredException.CombineReport(ex, row.APBatchNumber == null ? "AP610500" : "AP622000", dictionary, false); | |
} | |
if (ex != null) | |
{ | |
ex.Mode = PXBaseRedirectException.WindowMode.New; | |
ex.SeparateWindows = true; | |
throw ex; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment