Error while posting sales order packing slip

While doing sales order packing slip, getting error as record already exists.

Cannot create a record in Inventory journal lines tax extension (InventJournalTransTaxExtensionIN). Reference: 5639636940, 0.
The record already exists.

please suggest solution to resolve it .

Thanks .

Why would posting a packing slip create an inventory journal (that in-turn triggers the insert into InventJournalTransTaxExtensionIN)?

Any changes to the code?

Hi, Kranthi

Sorry for late reply. yes some changes were done in insert method of InventJournalTransTaxExtensionIN(to get customer location and tax information).

Cannot create a record in Inventory journal lines tax extension (InventJournalTransTaxExtensionIN). Reference: 5639636940, 0.
The record already exists. here the reference number changes frequently , now it is showing as 5639640108.

Its inventJournalTrans.RecId that is being saved in InventJournalTransTaxExtensionIN.InventJournalTrans field.

You need to be investigating why the code creates a journal line and why does it creating a record in InventJournalTransTaxExtensionIN that already exists.

Try debugging, add break point to inventJournalTrans.insert() and InventJournalTransTaxExtensionIN.insert();

debugger is not hitting inventJournalTrans.insert() and InventJournalTransTaxExtensionIN.insert();

The code will be running on IL. Have you tried by disabling the “Execute business operations in CIL” option?

after disabling “Execute business operations in CIL” option, able to debug insert methods.

public void insert()
{
InventJournalTrans inventJournalTrans;
DirPartyLocation dirPartyLocation;
CustTable custTable;

if (this.InventJournalTrans)
{

select firstOnly ProjId from inventJournalTrans
where inventJournalTrans.RecId == this.InventJournalTrans;

custTable = CustTable::find(ProjTable::find(inventJournalTrans.ProjId).CustAccount);
dirPartyLocation = DirPartyLocation::findPrimaryPartyLocation(custTable.Party);
this.CustomerLocation = LogisticsLocation::find(dirPartyLocation.Location).RecId;
this.CustomerTaxInformation = TaxInformation_IN::findDefaultbyLocation(this.CustomerLocation).RecId;

super();
}
}

this is the code where the error is generated.

You need to look at why the insert() is called, even if there is a record with same this.InventJournalTrans

insert() is called from SysExtensionSerializationMap/PostInsert()

The this.InventJournalTrans value should be unique.
Look at the whole call stack and find out the reason why an already existing this.InventJournalTrans is inserted.

public void postInsert()
{
SysExtensionSerializerExtensionMap currentExtensionTable;
SysExtensionSerializerExtensionMap extensionTableInUse;
int i;
boolean checkForLinkedExtensionTables;
container newPackedExtensions;
Array extensionTableArray = new Array(Types::Record);
container extensionTableTableIdList;
TableId currentExtensionTableTableId;
container hasLinkedExtensionTableCon;
boolean hasLinkedExtensionTable;

boolean checkForLinkedExtensionTables(SysExtensionSerializerExtensionMap _currentExtensionTable)
{
// Check the BaseRecId to allow this method to be able to call multi-time with same base record.
return (_currentExtensionTable.BaseRecId != this.RecId
//handle the case where currentExtensionTable.BaseRecId is assigned before calling this method to insert,
//one of the cases could be that parent recid is not allocated by super() of parentTable.insert()
//but allocated using SystemSequence.reserveValues() instead
|| (_currentExtensionTable.BaseRecId && ! _currentExtensionTable.RecId));
}

if (this.RecId && this.PackedExtensions != conNull())
{
for (i = 1; i <= conLen(this.PackedExtensions); i++)
{
currentExtensionTable = con2Buf(conPeek(this.PackedExtensions, i));
extensionTableArray.value(i, currentExtensionTable);

if (checkForLinkedExtensionTables(currentExtensionTable))
{
currentExtensionTableTableId = currentExtensionTable.TableId;

// if buffer is not form DS there is no need to check for extension table on client
checkForLinkedExtensionTables = this.isFormDataSource();
}
else
{
currentExtensionTableTableId = 0;
}

extensionTableTableIdList += [currentExtensionTableTableId];
}

if (checkForLinkedExtensionTables)
{
hasLinkedExtensionTableCon = SysExtensionSerializerFormRunHelper::hasExtensionTable(this, extensionTableTableIdList);
}

ttsbegin;
for (i = 1; i <= extensionTableArray.lastIndex(); i++)
{
currentExtensionTable = extensionTableArray.value(i);

if (conPeek(extensionTableTableIdList, i) != 0)
{
if (checkForLinkedExtensionTables)
{
hasLinkedExtensionTable = conPeek(hasLinkedExtensionTableCon, i);

if (hasLinkedExtensionTable)
{
// Current extension table record is going to be dropped from the packed container,
// also try to remove it from the prioritized list in case it is in the list
this.SysExtensionSerializerMap::removeFromPrioritizedIdList(currentExtensionTable.TableId);

// ignore the pack when the extension buffer is found because
// otherwise the record will be inserted twice

// this assumes the pack was done for an edge case such as a transition
// to IL and was manually copied back to the extension buffer afterwards
continue;
}
}

extensionTableInUse = this.SysExtensionSerializerMap::getJoinedExtensionTable(currentExtensionTable.TableId);
if (extensionTableInUse.TableId == currentExtensionTable.TableId)
{
// Current extension table record is going to be dropped from the packed container,
// also try to remove it from the prioritized list in case it is in the list
this.SysExtensionSerializerMap::removeFromPrioritizedIdList(currentExtensionTable.TableId);

// ignore the packed buffer when the joined extension buffer is found
// because otherwise the record will be inserted twice

// this assumes the pack was done for an edge case such as a transition
// to IL and was manually copied back to the extension buffer afterwards
continue;
}

currentExtensionTable.BaseRecId = this.RecId;
currentExtensionTable.insert();
}

newPackedExtensions += [buf2Con(currentExtensionTable, true)];
}
ttscommit;

this.PackedExtensions = newPackedExtensions;
}
}

Can you show the call stack?

[s] \Data Dictionary\Tables\InventJournalTransTaxExtensionIN\Methods\insert 20
[s] \Classes\SalesPackingSlipJournalPost\endPost 129
[s] \Classes\FormletterJournalPost\post 294
[s] \Classes\FormletterJournalPost\run 11
[s] \Classes\FormletterService\postJournal 42
[s] \Classes\FormletterService\run 80
[s] \Classes\FormletterService\postSalesOrderPackingSlip 14
[s] \Classes\DictClass\callObject
[s] \Classes\SysOperationServiceController\runOperation 93
[s] \Classes\SysOperationServiceController\runServiceOperation 22
[s] \Classes\DictClass\callStatic
[s] \Classes\SysDictClass\invokeStaticMethod 26
[s] \Classes\SysDictClass\invokeStaticMethodIL 39
[s] \Classes\SysOperationRPCFrameworkService\runServiceOperation 5
[c] \Classes\SysOperationServiceController\runOperationWithRunAs 7
[c] \Classes\SysOperationServiceController\run 22
[c] \Classes\FormLetterServiceController\run 3
[c] \Classes\SalesFormLetter\run 77
[c] \Classes\SalesFormLetter\main 130
[c] \Classes\FormFunctionButtonControl\Clicked

You need to be looking from here. Can you show the code in this method?

// Code was merged automatically.
///


/// Ends the posting.
///

protected void endPost()
{
// The following was merged successfully, but should be reviewed.
// Original (SYS) ++++++++++++++++++++++++++++++++++++++++++++++++
// Yours (VAR) ++++++++++++++++++++++++++++++++++++++++++++++++
//PwCHH, Increase movement undelivery items throught movement journal, starts, 08022014
InventJournalTable inventJournalTable;
InventJournalTrans inventJournalTrans;
InventJournalNameId inventJournalName;
InventDim inventDim;
JournalCheckPost journalCheckPost;
PwC_TeaSalesSetupParameters TeaSalesSetupParameters;
SalesParmLine _SalesParmLine;
SalesLine sl;
InventTable item;
int LineNo = 0;
boolean _throwserror = true;
boolean _showinforesult = false;
PwC_SaleNoteUploadLines SaleNoteUploadLines;
InventJournalTransTaxExtensionIN inventJournalTransTaxExtensionIN;
inventDim UndeliveredInventDim;
//PwCHH, Increase movement undelivery items throught movement journal, ends, 08022014

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
SalesTable salesTableLocal;
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

// AX Update (SYP) ++++++++++++++++++++++++++++++++++++++++++++++++
// End
this.updateWMSShipment();
this.updateWHSLoadTable();
this.shipCarrierSendShippingInfo();
this.updateSalesShippingStat();
this.updateBankLC();
this.createBackorderLinesHistory();

//
if (isCountryRegion_BR)
{
this.postEndPost_BR();
}
//
// The following was merged successfully, but should be reviewed.
// Original (SYS) ++++++++++++++++++++++++++++++++++++++++++++++++
// Yours (VAR) ++++++++++++++++++++++++++++++++++++++++++++++++

//PwCHH, Increase movement undelivery items throught movement journal, starts, 08022014
//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.Begin
//if(salesTable.PwC_AuctionSaleNumber != ‘’)
//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.End

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(salesTable.SalesType == SalesType::Sales)
{
if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales ||
salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaBulkSales )
{
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End
ttsBegin;
select * from TeaSalesSetupParameters;

inventJournalTable.clear();
inventJournalName = TeaSalesSetupParameters.MovementJournalForIncreaseUndeliver;
inventJournalTable.initFromInventJournalName(InventJournalName::find(inventJournalName));
inventJournalTable.Description = ‘Increase Undeliver Journal’;
inventJournalTable.insert();
inventJournalTable.reread();

while select * from _SalesParmLine
where _SalesParmLine.ParmId == salesParmTable.ParmId
&& _SalesParmLine.TableRefId == salesParmTable.TableRefId
{
sl = _SalesParmLine.salesLine();

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
select forupdate salesTableLocal where salesTableLocal.SalesId == sl.SalesId;
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

LineNo++;

//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.Begin
//if(sl.PwC_SaleNoteUploadLines != 0)
//{
//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.End

UndeliveredInventDim = sl.inventDim();
UndeliveredInventDim.InventStyleId = TeaSalesSetupParameters.UndeliveredStyleDimensionName;
UndeliveredInventDim = InventDim::findOrCreate(UndeliveredInventDim);

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales)
{
select forUpdate SaleNoteUploadLines
where SaleNoteUploadLines.RecId == sl.PwC_SaleNoteUploadLines;
}
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

inventJournalTrans.clear();
inventJournalTrans.initFromInventJournalTable(inventJournalTable);
inventJournalTrans.TransDate = salesParmTable.Transdate; //systemDateGet(); //CR_PwCSP, 230315
inventJournalTrans.ItemId = _SalesParmLine.ItemId;
inventJournalTrans.Qty = _SalesParmLine.DeliverNow;
inventJournalTrans.CostPrice = sl.SalesPrice;
inventJournalTrans.CostAmount = _SalesParmLine.LineAmount;

item = InventTable::find(_SalesParmLine.ItemId);
inventJournalTrans.InventDimId = UndeliveredInventDim.inventDimId;
inventJournalTrans.LedgerDimension = TeaSalesSetupParameters.MovementJournalLedgerDimension;

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales)
{
inventJournalTrans.PwC_SaleNoteUploadLines = SaleNoteUploadLines.RecId;
}
inventJournalTrans.PwC_SalesLineRefRecId = sl.RecId; //Sales line reference
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

inventJournalTrans.PwC_IsIncreaseUndelivered = NoYes::Yes;
inventJournalTrans.insert();

InventJournalTransTaxExtensionIN.clear();
InventJournalTransTaxExtensionIN.InventJournalTrans = inventJournalTrans.RecId;
InventJournalTransTaxExtensionIN.TaxInformation_IN = TeaSalesSetupParameters.MovementJournalIncreaseTaxInformation_IN;
InventJournalTransTaxExtensionIN.insert();

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(SaleNoteUploadLines.RecId &&
salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales)
{
SaleNoteUploadLines.MovementJournalIdForIncreaseUndeliver = inventJournalTable.JournalId;
SaleNoteUploadLines.IsChangedToUndeliverd = NoYes::Yes;
SaleNoteUploadLines.update();
SaleNoteUploadLines.reread();
}
salesTableLocal.PwC_MovementJournalIdForIncUndeliver = inventJournalTable.JournalId;
sl.PwC_MovementJournalIdForIncUndeliver = inventJournalTable.JournalId;
sl.PwC_IsChangedToUndeliverd = NoYes::Yes;

if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaBulkSales)
{
sl.PwC_PromptDate = custPackingSlipJour.DeliveryDate+14;

// sl.PwC_PromptDate = custPackingSlipJour.DeliveryDate;

sl.PwC_TotalQty = sl.PwC_NoOfBags * sl.PwC_QtyPerBag;
sl.PwC_NetSaleAmount = sl.PwC_TotalQty * sl.SalesPrice;
sl.PwC_SaleAmount = sl.PwC_TotalQty * sl.SalesPrice;
}
salesTableLocal.update();
sl.update();
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End
}

inventJournalTable.NumOfLines = LineNo;
inventJournalTable.update();
inventJournalTable.reread();

journalCheckPost = InventJournalCheckPost::newPostJournal(inventJournalTable);
if(journalCheckPost.validate())
{
journalCheckPost.parmThrowCheckFailed(_throwserror);
journalCheckPost.parmShowInfoResult(_showinforesult);
journalCheckPost.run();
}
ttsCommit;

info(‘Stock has been changed to Undelivered.’);
}
//PwCHH, Increase movement undelivery items throught movement journal, ends, 08022014
}
// AX Update (SYP) ++++++++++++++++++++++++++++++++++++++++++++++++
//
//
if (salesParmTable.CFDIEnabled_MX)
// {
this.postEndPost_MX();
// }
//
// End
}

inventJournalTrans.insert();

InventJournalTransTaxExtensionIN.clear();
InventJournalTransTaxExtensionIN.InventJournalTrans = inventJournalTrans.RecId;
InventJournalTransTaxExtensionIN.TaxInformation_IN = TeaSalesSetupParameters.MovementJournalIncreaseTaxInformation_IN;
InventJournalTransTaxExtensionIN.insert();

Change the above code to,

InventJournalTransTaxExtensionIN = inventJournalTrans.inventJournalTransTaxExtensionIN();
InventJournalTransTaxExtensionIN.TaxInformation_IN = TeaSalesSetupParameters.MovementJournalIncreaseTaxInformation_IN;
inventJournalTrans.packInventJournalTrans_IN(InventJournalTransTaxExtensionIN);

inventJournalTrans.insert();

Cannot create a record in Inventory journal lines (InventJournalTrans). Journal: I_52843_18, 1,0000000000.
The record already exists.

after changing the code

Can you show your final code?

// Code was merged automatically.
///


/// Ends the posting.
///

protected void endPost()
{
// The following was merged successfully, but should be reviewed.
// Original (SYS) ++++++++++++++++++++++++++++++++++++++++++++++++
// Yours (VAR) ++++++++++++++++++++++++++++++++++++++++++++++++
//PwCHH, Increase movement undelivery items throught movement journal, starts, 08022014
InventJournalTable inventJournalTable;
InventJournalTrans inventJournalTrans;
InventJournalNameId inventJournalName;
InventDim inventDim;
JournalCheckPost journalCheckPost;
PwC_TeaSalesSetupParameters TeaSalesSetupParameters;
SalesParmLine _SalesParmLine;
SalesLine sl;
InventTable item;
int LineNo = 0;
boolean _throwserror = true;
boolean _showinforesult = false;
PwC_SaleNoteUploadLines SaleNoteUploadLines;
InventJournalTransTaxExtensionIN inventJournalTransTaxExtensionIN;
inventDim UndeliveredInventDim;
//PwCHH, Increase movement undelivery items throught movement journal, ends, 08022014

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
SalesTable salesTableLocal;
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

// AX Update (SYP) ++++++++++++++++++++++++++++++++++++++++++++++++
// End
this.updateWMSShipment();
this.updateWHSLoadTable();
this.shipCarrierSendShippingInfo();
this.updateSalesShippingStat();
this.updateBankLC();
this.createBackorderLinesHistory();

//
if (isCountryRegion_BR)
{
this.postEndPost_BR();
}
//
// The following was merged successfully, but should be reviewed.
// Original (SYS) ++++++++++++++++++++++++++++++++++++++++++++++++
// Yours (VAR) ++++++++++++++++++++++++++++++++++++++++++++++++

//PwCHH, Increase movement undelivery items throught movement journal, starts, 08022014
//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.Begin
//if(salesTable.PwC_AuctionSaleNumber != ‘’)
//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.End

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(salesTable.SalesType == SalesType::Sales)
{
if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales ||
salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaBulkSales )
{
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End
ttsBegin;
select * from TeaSalesSetupParameters;

inventJournalTable.clear();
inventJournalName = TeaSalesSetupParameters.MovementJournalForIncreaseUndeliver;
inventJournalTable.initFromInventJournalName(InventJournalName::find(inventJournalName));
inventJournalTable.Description = ‘Increase Undeliver Journal’;
inventJournalTable.insert();
inventJournalTable.reread();

while select * from _SalesParmLine
where _SalesParmLine.ParmId == salesParmTable.ParmId
&& _SalesParmLine.TableRefId == salesParmTable.TableRefId
{
sl = _SalesParmLine.salesLine();

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
select forupdate salesTableLocal where salesTableLocal.SalesId == sl.SalesId;
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

LineNo++;

//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.Begin
//if(sl.PwC_SaleNoteUploadLines != 0)
//{
//Changed on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : Old.End

UndeliveredInventDim = sl.inventDim();
UndeliveredInventDim.InventStyleId = TeaSalesSetupParameters.UndeliveredStyleDimensionName;
UndeliveredInventDim = InventDim::findOrCreate(UndeliveredInventDim);

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales)
{
select forUpdate SaleNoteUploadLines
where SaleNoteUploadLines.RecId == sl.PwC_SaleNoteUploadLines;
}
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

inventJournalTrans.clear();
inventJournalTrans.initFromInventJournalTable(inventJournalTable);
inventJournalTrans.TransDate = salesParmTable.Transdate; //systemDateGet(); //CR_PwCSP, 230315
inventJournalTrans.ItemId = _SalesParmLine.ItemId;
inventJournalTrans.Qty = _SalesParmLine.DeliverNow;
inventJournalTrans.CostPrice = sl.SalesPrice;
inventJournalTrans.CostAmount = _SalesParmLine.LineAmount;

item = InventTable::find(_SalesParmLine.ItemId);
inventJournalTrans.InventDimId = UndeliveredInventDim.inventDimId;
inventJournalTrans.LedgerDimension = TeaSalesSetupParameters.MovementJournalLedgerDimension;

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales)
{
inventJournalTrans.PwC_SaleNoteUploadLines = SaleNoteUploadLines.RecId;
}
inventJournalTrans.PwC_SalesLineRefRecId = sl.RecId; //Sales line reference
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End

inventJournalTrans.PwC_IsIncreaseUndelivered = NoYes::Yes;
inventJournalTrans.insert();

/* InventJournalTransTaxExtensionIN.clear();
InventJournalTransTaxExtensionIN.InventJournalTrans = inventJournalTrans.RecId;
InventJournalTransTaxExtensionIN.TaxInformation_IN = TeaSalesSetupParameters.MovementJournalIncreaseTaxInformation_IN;
InventJournalTransTaxExtensionIN.insert();*/ // Commented by J9074 on 05-11-2018

InventJournalTransTaxExtensionIN = inventJournalTrans.inventJournalTransTaxExtensionIN();
InventJournalTransTaxExtensionIN.TaxInformation_IN = TeaSalesSetupParameters.MovementJournalIncreaseTaxInformation_IN;
inventJournalTrans.packInventJournalTrans_IN(InventJournalTransTaxExtensionIN);

inventJournalTrans.insert();

//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.Begin
if(SaleNoteUploadLines.RecId &&
salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaAuctionSales)
{
SaleNoteUploadLines.MovementJournalIdForIncreaseUndeliver = inventJournalTable.JournalId;
SaleNoteUploadLines.IsChangedToUndeliverd = NoYes::Yes;
SaleNoteUploadLines.update();
SaleNoteUploadLines.reread();
}
salesTableLocal.PwC_MovementJournalIdForIncUndeliver = inventJournalTable.JournalId;
sl.PwC_MovementJournalIdForIncUndeliver = inventJournalTable.JournalId;
sl.PwC_IsChangedToUndeliverd = NoYes::Yes;

if(salesTable.PwC_AuctionInvoiceType == PwC_AuctionInvoiceType::TeaBulkSales)
{
sl.PwC_PromptDate = custPackingSlipJour.DeliveryDate+14;

// sl.PwC_PromptDate = custPackingSlipJour.DeliveryDate;

sl.PwC_TotalQty = sl.PwC_NoOfBags * sl.PwC_QtyPerBag;
sl.PwC_NetSaleAmount = sl.PwC_TotalQty * sl.SalesPrice;
sl.PwC_SaleAmount = sl.PwC_TotalQty * sl.SalesPrice;
}
salesTableLocal.update();
sl.update();
//Added on 2015-04-22 by pwcuser1 for Bulk sales customer delivery form : New.End
}

inventJournalTable.NumOfLines = LineNo;
inventJournalTable.update();
inventJournalTable.reread();

journalCheckPost = InventJournalCheckPost::newPostJournal(inventJournalTable);
if(journalCheckPost.validate())
{
journalCheckPost.parmThrowCheckFailed(_throwserror);
journalCheckPost.parmShowInfoResult(_showinforesult);
journalCheckPost.run();
}
ttsCommit;

info(‘Stock has been changed to Undelivered.’);
}
//PwCHH, Increase movement undelivery items throught movement journal, ends, 08022014
}
// AX Update (SYP) ++++++++++++++++++++++++++++++++++++++++++++++++
//
//
if (salesParmTable.CFDIEnabled_MX)
// {
this.postEndPost_MX();
// }
//
// End
}