Here you go!:
void resetStatusToCreated(ProdTable _prodTable)
{
ProdMultiStatusDecrease prodMultiStatusDecrease;
ProdParmStatusDecrease prodParmStatusDecrease;
Args args = new Args();
;
{
ProdMultiStatusDecrease prodMultiStatusDecrease;
ProdParmStatusDecrease prodParmStatusDecrease;
Args args = new Args();
;
if(_prodTable.ProdStatus > prodStatus::Created)
{
args.record(_prodTable);
{
args.record(_prodTable);
select prodParmStatusDecrease where prodParmStatusDecrease.ProdId == _prodTable.ProdId;
if(!prodParmStatusDecrease.RecId)
{
prodParmStatusDecrease.clear();
prodParmStatusDecrease.initFromProdTable(_prodTable);
prodParmStatusDecrease.WantedStatus = ProdStatus::Created;
prodParmStatusDecrease.ParmId = NumberSeq::newGetNum(CompanyInfo::numRefParmId()).num();
prodParmStatusDecrease.insert();
}
{
prodParmStatusDecrease.clear();
prodParmStatusDecrease.initFromProdTable(_prodTable);
prodParmStatusDecrease.WantedStatus = ProdStatus::Created;
prodParmStatusDecrease.ParmId = NumberSeq::newGetNum(CompanyInfo::numRefParmId()).num();
prodParmStatusDecrease.insert();
}
prodMultiStatusDecrease = prodMultiStatusDecrease::construct(args);
prodMultiStatusDecrease.initParmBuffer(prodParmStatusDecrease);
prodMultiStatusDecrease.parmId(prodParmStatusDecrease.ParmId);
prodMultiStatusDecrease.run();
}
prodMultiStatusDecrease.initParmBuffer(prodParmStatusDecrease);
prodMultiStatusDecrease.parmId(prodParmStatusDecrease.ParmId);
prodMultiStatusDecrease.run();
}
}
No comments:
Post a Comment