static void inventTransWMSRegister(Args _args) { ProdJournalBOM prodJournalBOM; InventTransWMS_Register inventTransWMS_Register; TmpInventTransWMS tmpInventTransWMS; InventTransOrigin inventTransOrigin; InventTrans inventTransLocal; InventDim inventDimLocal; prodJournalBOM = ProdJournalBOM::findRecId(35637161907); //inventTransWMS_Pick = InventTransWMS_Pick::newStandard(tmpInventTransWMS, baseQueryInventTrans); inventTransOrigin = InventTransOrigin::findByInventTransId(prodJournalBOM.InventTransId); while select inventTransLocal where inventTransLocal.InventTransOrigin == inventTransOrigin.RecId { inventTransWMS_Register = InventTransWMS_Register::newStandard(tmpInventTransWMS); inventTransWMS_Register.initFromInventTransInventTransOrigin(tmpInventTransWMS, inventTransLocal, inventTransOrigin); inventDimLocal = InventDim::findOrCreate(prodJournalBOM.inventDim()); tmpInventTransWMS.InventDimId = inventDimLocal.InventDimId; if(inventTransWMS_Register.writeTmpInventTransWMS(tmpInventTransWMS,inventTransLocal,inventDimLocal)) { inventTransWMS_Register.updateInvent(prodJournalBOM); } //movement = InventTransWMS_Register::inventMovement(prodJournalBOM); info('Done'); } }