import at.clockwork.calculation.CalculationData import at.clockwork.calculation.data.* import at.clockwork.calculation.GeneralCalculationData import at.clockwork.time.service.DateTimeService import at.clockwork.calculation.RestartCalculationException class Calc99997Service { static transactional = false def run(CalculationData calculationData, GeneralCalculationData generalCalculationData, boolean saving, Map parameters) throws RestartCalculationException { // 100%Zp und 100%Zf auf 100%pfl. umbuchen, wenn am Ende des Monats genug 50%Ü zur Verfügung stehen double ms13 = _cd.getSummedValuesThisMonth( "13" ) double ms19 = _cd.getSummedValuesThisMonth( "19" ) double ms23 = _cd.getSummedValuesThisMonth( "23" ) if ( ms13 > 0 && ms19 > 0 ) { double min = _cd.min( ms13, ms19 ) _addPV( [ "17" ], [ "13", "19" ], min ) ms13 -= min } if ( ms13 > 0 && ms23 > 0 ) { double min = _cd.min( ms13, ms23 ) _addPV( [ "18" ], [ "13", "23" ], min ) ms13 -= min } return } } /* ::1:: // 100%Zp und 100%Zf auf 100%pfl. umbuchen, wenn am Ende des Monats genug 50%Ü zur Verfügung stehen IF FUNC MS_13 DO =_XVAR_13 ; ::2:: IF FUNC MS_19 DO =_XVAR_19 ; ::2:: IF FUNC MS_23 DO =_XVAR_23 ; ::3:: IF XVAR_13 > ZT_0:00 UND XVAR_19 > ZT_0:00 FUNC XVAR_13 MIN XVAR_19 DO +_PZA_17 -_XVAR_13 -_PZA_13 -_PZA_19 ; ::3:: IF XVAR_13 > ZT_0:00 UND XVAR_23 > ZT_0:00 FUNC XVAR_13 MIN XVAR_23 DO +_PZA_18 -_XVAR_13 -_PZA_13 -_PZA_23 ; ::4:: IF FUNC RETURN_ DO ; */