Skip to content
Permalink
Browse files
Remove dot from version to be consistent
Flush payroll allocations to prevent saving of duplicate allocations
Set createdBy from entity in mapper
  • Loading branch information
crain committed Sep 19, 2017
1 parent 118dd1d commit 4cd0af44bb8cca897f4a74ee28976a7ee80d654b
Showing 3 changed files with 4 additions and 2 deletions.
@@ -73,6 +73,8 @@ public String process(final PutPayrollConfigurationCommand putPayrollConfigurati
payrollConfigurationEntity = optionalPayrollConfiguration.get();
this.payrollAllocationRepository.deleteByPayrollConfiguration(payrollConfigurationEntity);

this.payrollAllocationRepository.flush();

payrollConfigurationEntity.setLastModifiedBy(UserContextHolder.checkedGetUser());
payrollConfigurationEntity.setLastModifiedOn(LocalDateTime.now(Clock.systemUTC()));
} else {
@@ -28,7 +28,7 @@ private PayrollConfigurationMapper() {
public static PayrollConfiguration map(final PayrollConfigurationEntity payrollConfigurationEntity) {
final PayrollConfiguration payrollConfiguration = new PayrollConfiguration();
payrollConfiguration.setMainAccountNumber(payrollConfigurationEntity.getMainAccountNumber());
payrollConfiguration.setCreatedBy(payrollConfiguration.getCreatedOn());
payrollConfiguration.setCreatedBy(payrollConfigurationEntity.getCreatedBy());
payrollConfiguration.setCreatedOn(DateConverter.toIsoString(payrollConfigurationEntity.getCreatedOn()));
if (payrollConfigurationEntity.getLastModifiedBy() != null) {
payrollConfiguration.setLastModifiedBy(payrollConfigurationEntity.getLastModifiedBy());
@@ -1,5 +1,5 @@
group 'io.mifos.payroll'
version '0.1.0.BUILD-SNAPSHOT'
version '0.1.0-BUILD-SNAPSHOT'

ext.versions = [
frameworkapi : '0.1.0-BUILD-SNAPSHOT',

0 comments on commit 4cd0af4

Please sign in to comment.