Created
October 4, 2016 04:13
-
-
Save smarenich/132a180a5e8dbd763c049de9504cb42f 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
namespace PX.Objects.IN | |
{ | |
public class INReleaseProcess_Extension : PXGraphExtension<INReleaseProcess> | |
{ | |
public delegate void ReleaseDocProcDelegate(JournalEntry je, INRegister doc); | |
[PXOverride] | |
public void ReleaseDocProc(JournalEntry je, INRegister doc, ReleaseDocProcDelegate baseMethod) | |
{ | |
if (doc.DocType == INDocType.Receipt) | |
{ | |
je.RowInserting.AddHandler<GLTran>(GLTranRowInserting); | |
} | |
baseMethod(je, doc); | |
} | |
public void GLTranRowInserting(PXCache sender, PXRowInsertingEventArgs e) | |
{ | |
GLTran row = e.Row as GLTran; | |
row.SubID = ((Sub)PXSelect<Sub, Where<Sub.subCD, Equal<Required<Sub.subCD>>>>.Select(Base, "000000")).SubID; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment