Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.