IDEMPIERE-4589 BUGS on PERFORMANCE ANALYSIS -> Accounting Rules ->Accounting Setup (#457)

This commit is contained in:
Carlos Ruiz 2020-12-11 07:40:58 +01:00 committed by GitHub
parent 6abbc4c9da
commit f2c5ec429b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -56,7 +56,7 @@ public class MPeriod extends X_C_Period implements ImmutablePOSupport
/**
*
*/
private static final long serialVersionUID = -2781791828528639980L;
private static final long serialVersionUID = -4813116760490243399L;
/**
* Get Period from Cache (immutable)
@ -129,6 +129,21 @@ public class MPeriod extends X_C_Period implements ImmutablePOSupport
return get(ctx, DateAcct, AD_Org_ID, null);
}
/**
* Get updateable copy of MPeriod from cache
* @param ctx
* @param C_Period_ID
* @param trxName
* @return MPeriod
*/
public static MPeriod getCopy(Properties ctx, int C_Period_ID, String trxName)
{
MPeriod period = get(C_Period_ID);
if (period != null)
period = new MPeriod(ctx, period, trxName);
return period;
}
/**
*
* @param ctx

View File

@ -251,6 +251,7 @@ public class MYear extends X_C_Year
}
else
{
period = MPeriod.getCopy(getCtx(), period.getC_Period_ID(), get_TrxName());
period.setC_Year_ID(this.getC_Year_ID());
period.setPeriodNo(month+1);
period.setName(name);