public void registerLines()
{
InventTransWMS_Register inventTransWMS_Register;
TmpInventTransWMS tmpInventTransWMS;
InventTrans inventTrans;
PurchLine purchLineLocal;
InventTransOrigin inventTransOrigin;
inventDim inventDimLocal;
SNY_HachuTable hachuTable;
PurchLine purchLine;
hachuTable = SNY_HachuTable::find(this.Z_HachuId);
select firstOnly purchLine where purchLine.PurchId == hachuTable.Z_PurchId;
purchLineLocal = purchLine;
inventTransWMS_Register = InventTransWMS_Register::newStandard(tmpInventTransWMS);
inventTransOrigin = InventTransOrigin::findByInventTransId(purchLineLocal.InventTransId);
inventTrans = inventTrans::findByInventTransOrigin(inventTransOrigin.RecId);
inventTransWMS_Register.createFromInventTrans(inventTrans, inventTrans.inventDim());
select forUpdate tmpInventTransWMS where tmpInventTransWMS.InventDimId == inventTrans.inventDimId;
if(this.Z_ReceiveQty)
{
TmpInventTransWMS.InventQty = real2int(this.Z_ReceiveQty);
inventDimLocal = InventDim::find(tmpInventTransWMS.InventDimId);
inventDimLocal.InventLocationId = this.Z_InventLocationId;
inventDimLocal.inventBatchId = this.Z_InventBatchId;
inventDimLocal = InventDim::findOrCreate(inventDimLocal);
}
tmpInventTransWMS.InventDimId = inventDimLocal.inventDimId;
tmpInventTransWMS.update();
inventTransWMS_Register.parmTmpInventTransWMS(tmpInventTransWMS);
inventTransWMS_Register.updateInvent(purchLineLocal);
}