Thanks.
Regards,
Teh
//Custom Code added 09/07/2024
myCustomTable=MyCustomTable::findPurchLine(purchLine.RecId);
this.myCustomField=myCustomTable.myCustomFld;
//Custom Code
/// <summary>
/// Optionally sets the status of the corresponding <c>PurchLine</c> to be set to Open order as there
/// is a saved pending invoice against the <c>PurchLine</c>.Optionally activates the Purchase Request
/// workflow.Create a <c>SourceDocumentLine</c>.
/// </summary>
/// <param name="_defaultRelatedTables">
/// True if related tables should be defaulted on insert; otherwise false. This parameter would
/// typically be false when <c>VendInvoiceInfoLine</c>records are copied between the saved and active
/// images of this document.
/// </param>
/// <remarks>
/// Inserting will cause the status of the corresponding <c>PurchLine</c> table to be set to open order
/// as there is a saved pending invoice against the <c>PurchLine</c> table.
/// </remarks>
public void insert(boolean _defaultRelatedTables = true)
{
PurchLine purchLine;
VendInvoiceInfoTable vendInvoiceInfoTable = this.vendInvoiceInfoTable();
//Custom Code added 09/07/2024
MyCustomTable myCustomTable;
//Custom Code
ttsbegin;
// Insert and reference a source document line
SourceDocumentProcessorFacade::submitSourceDocumentLineImplementation(this);
super();
this.SysExtensionSerializerMap::postInsert();
if (this.DocumentOrigin != DocumentOrigin::Service)
{
// Only delete tax information if the invoice line is not being inserted via AIF.
TaxUncommitted::deleteForDocumentHeader(vendInvoiceInfoTable.TableId, vendInvoiceInfoTable.RecId);
// Delete tax Withhold information.
if (TaxWithholdParameters_IN::checkTaxParameters())
{
TaxWithholdUncommitted_IN::deleteForDocumentHeader(vendInvoiceInfoTable.TableId, vendInvoiceInfoTable.RecId);
}
}
// Update header round-off amounts.
vendInvoiceInfoTable.updateFromVendLines();
if (_defaultRelatedTables)
{
if (this.isNonPO())
{
this.createMarkupTrans(this.vendInvoiceInfoTable());
VendInvoiceInfoLine_Asset::createVendInvoiceInfoLine_Asset(this).insert();
}
else
{
purchLine = PurchLine::findInventTransId(this.InventTransId, true);
if (purchLine.RecId !=0)
{
purchLine.setPurchStatus(true);
//COR submit to workflow
if(purchLine.PurchaseType == PurchaseType::Purch)
{
if(purchLine.calcPendingMatchedQtyPurch() < purchLine.calcPendingQtyPurch())
{
PurchCORInvReceivedWorkflow::submit(purchLine);
}
}
//Custom Code added 09/07/2024
myCustomTable=MyCustomTable::findPurchLine(this.PurchLineRecId);
this.myCustomField=myCustomTable.myCustomFld;
//Custom Code
}
}
}
// <PubSect>
if (this.isActive())
{
this.updateVendInvoiceProjectFromBudgetRes(true, false);
}
// </PubSect>
// <GTE>
if (TaxSolutionScopeIntegrationUtil::isCompanyEnabled())
{
this.markCurrentTaxDocumentTaxStatusDirty();
}
// </GTE>
ttscommit;
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156