This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new d0c8c6a  FINERACT-538 populated updated and created address
d0c8c6a is described below

commit d0c8c6a01221f2c0fed5f2d9cdee4dcae779d57e
Author: Natasha <[email protected]>
AuthorDate: Sun Apr 5 19:31:53 2020 -0600

    FINERACT-538 populated updated and created address
---
 .../portfolio/address/service/AddressWritePlatformServiceImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java
index 8e8d066..1b98089 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java
@@ -35,6 +35,7 @@ import 
org.apache.fineract.portfolio.client.domain.ClientAddress;
 import org.apache.fineract.portfolio.client.domain.ClientAddressRepository;
 import 
org.apache.fineract.portfolio.client.domain.ClientAddressRepositoryWrapper;
 import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
+import org.joda.time.LocalDate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -88,6 +89,8 @@ public class AddressWritePlatformServiceImpl implements 
AddressWritePlatformServ
         final CodeValue addressTypeIdObj = 
this.codeValueRepository.getOne(addressTypeId);
 
         final Address add = Address.fromJson(command, stateIdobj, 
countryIdObj);
+        add.setCreatedOn(LocalDate.now());
+        add.setUpdatedOn(LocalDate.now());
         this.addressRepository.save(add);
         final Long addressid = add.getId();
         final Address addobj = this.addressRepository.getOne(addressid);
@@ -135,6 +138,8 @@ public class AddressWritePlatformServiceImpl implements 
AddressWritePlatformServ
                 final CodeValue addressTypeIdObj = 
this.codeValueRepository.getOne(addressTypeId);
 
                 final Address add = Address.fromJsonObject(jsonObject, 
stateIdobj, countryIdObj);
+                add.setCreatedOn(LocalDate.now());
+                add.setUpdatedOn(LocalDate.now());
                 this.addressRepository.save(add);
                 final Long addressid = add.getId();
                 final Address addobj = 
this.addressRepository.getOne(addressid);
@@ -269,7 +274,7 @@ public class AddressWritePlatformServiceImpl implements 
AddressWritePlatformServ
         }
 
         if (is_address_update) {
-
+            addobj.setUpdatedOn(LocalDate.now());
             this.addressRepository.save(addobj);
 
         }

Reply via email to