IDEMPIERE-5799 - Storage Reservation Log does not set Organization Correctly (#1935)

* IDEMPIERE-5799 - Storage Reservation Los des not set Warehouse Correctly

* IDEMPIERE-5799 - requested changes by Heng Sin
This commit is contained in:
Peter Takács 2023-07-15 04:48:31 +02:00 committed by GitHub
parent 3b055d30e0
commit 750e38d3b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ package org.adempiere.util;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.compiere.model.MStorageReservationLog; import org.compiere.model.MStorageReservationLog;
import org.compiere.model.MWarehouse;
import org.compiere.util.Env; import org.compiere.util.Env;
/** /**
@ -93,6 +94,7 @@ public class ReservationLogTracer implements IReservationTracer {
log.setOldQty(originalQty); log.setOldQty(originalQty);
log.setNewQty(originalQty.add(diffQty)); log.setNewQty(originalQty.add(diffQty));
log.setRecord_ID(Record_ID); log.setRecord_ID(Record_ID);
log.setAD_Org_ID(MWarehouse.get(Env.getCtx(), M_Warehouse_ID, trxName).getAD_Org_ID());
log.saveEx(); log.saveEx();
} }