/// <summary> /// Update Open Balance of BP's /// </summary> /// <param name="bps">list of business partners</param> private void UpdateBP(HashSet <int> bps) { log.Info("#" + bps.Count); IEnumerator <int> it = bps.GetEnumerator(); it.Reset(); while (it.MoveNext()) { int C_BPartner_ID = it.Current; MBPartner bp = new MBPartner(GetCtx(), C_BPartner_ID, Get_TrxName()); bp.SetTotalOpenBalance(); // recalculates from scratch // bp.setSOCreditStatus(); // called automatically if (bp.Save()) { log.Fine(bp.ToString()); } else { log.Log(Level.SEVERE, "BP not updated - " + bp); } } }