Don't continue production with missing items

Hi All,

I don't want to continue with missing items. If any item of production is missing, should be give error, should't to transfer missing items to a new journal. I tried paremeters which redlined at below, still generates new journal for missing items:

...

boolean ret = true;
prodJournalProd prodJournalProd;
ProdJournalCheckPostProd ProdJournalCheckPostProd;
ProdJournalTableData JournalTableData;
ProdJournalTable journalTable;


journalTable.clear();
journalTable.initValue();
journalTable.ProdId = _prodtable.ProdId;

JournalTableData = JournalTableData::newTable(journalTable);
journalTable.JournalId = JournalTableData.nextJournalId();
journalTable.JournalType = ProdJournalType::ReportFinished;
journalTable.JournalNameId = JournalTableData.journalStatic().standardJournalNameId(journalTable.JournalType);
JournalTableData.initFromJournalName(ProdJournalName::find(journalTable.JournalNameId));

journalTable.DetailSummary = DetailSummary::Summary;
journalTable.VoucherDraw = JournalVoucherDraw::Post;
journalTable.VoucherSeqRecId = NumbersequenceTable::find(ProdParameters::numRefProdCalcVoucherId().NumberSequenceId).RecId;
journalTable.DrawNegative = false;
//memre 16.8.18 #448
journalTable.AcceptError = NoYes::No;
//memre
journalTable.insert();

prodJournalProd.clear();

prodJournalProd.JournalId = journalTable.JournalId;
prodJournalProd.initFromProdTable(prodTable::find(journalTable.ProdId));

// prodJournalProd.TransDate = _transDate;
prodJournalProd.TransDate = this.checkTransDate(_prodtable.ProdId,_transDate);

prodJournalProd.ProdId = journalTable.prodID;
prodJournalProd.ItemId = _prodtable.ItemId;
prodJournalProd.QtyGood = _qty;

prodJournalProd.InventDimId = _prodtable.InventDimId;
prodJournalProd.ProdPickList = true;
prodJournalProd.PmfAcceptError = NoYes::No;
prodJournalProd.insert();

ProdJournalCheckPostProd = ProdJournalCheckPostProd::newPostJournal(journalTable.JournalId,true);
//memre 16.8.18 #448
ProdJournalCheckPostProd.parmTransferErrors(true);

ProdJournalCheckPostProd.parmThrowCheckFailed(true);

//memre
ProdJournalCheckPostProd.run();

...

Related
Recommended