| Line 1293... |
Line 1293... |
| 1293 |
customer.setLastName(customCustomer.getLastName());
|
1293 |
customer.setLastName(customCustomer.getLastName());
|
| 1294 |
customer.setMobileNumber(customCustomer.getMobileNumber());
|
1294 |
customer.setMobileNumber(customCustomer.getMobileNumber());
|
| 1295 |
customer.setEmailId(customCustomer.getEmailId());
|
1295 |
customer.setEmailId(customCustomer.getEmailId());
|
| 1296 |
customerRepository.persist(customer);
|
1296 |
customerRepository.persist(customer);
|
| 1297 |
CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
|
1297 |
CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
|
| 1298 |
if (!customerAddress.getState().equals(customCustomer.getAddress().getState())) {
|
1298 |
if (!customerAddress.getState().equalsIgnoreCase(customCustomer.getAddress().getState())) {
|
| 1299 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
1299 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
| 1300 |
resetTaxation(fofoOrder.getFofoId(), customerAddress, fofoOrderItems);
|
1300 |
resetTaxation(fofoOrder.getFofoId(), customerAddress, fofoOrderItems);
|
| 1301 |
}
|
1301 |
}
|
| 1302 |
this.setCustomerAddress(customerAddress, customCustomer.getAddress());
|
1302 |
this.setCustomerAddress(customerAddress, customCustomer.getAddress());
|
| 1303 |
customerAddressRepository.persist(customerAddress);
|
1303 |
customerAddressRepository.persist(customerAddress);
|
| Line 1309... |
Line 1309... |
| 1309 |
int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(fofoId);
|
1309 |
int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(fofoId);
|
| 1310 |
|
1310 |
|
| 1311 |
Address retailerAddress = addressRepository.selectById(retailerAddressId);
|
1311 |
Address retailerAddress = addressRepository.selectById(retailerAddressId);
|
| 1312 |
|
1312 |
|
| 1313 |
Integer stateId = null;
|
1313 |
Integer stateId = null;
|
| 1314 |
if (customerAddress.getState().equals(retailerAddress.getState())) {
|
1314 |
if (customerAddress.getState().equalsIgnoreCase(retailerAddress.getState())) {
|
| 1315 |
try {
|
1315 |
try {
|
| 1316 |
stateId = Long.valueOf(Utils.getStateInfo(customerAddress.getState()).getId()).intValue();
|
1316 |
stateId = Long.valueOf(Utils.getStateInfo(customerAddress.getState()).getId()).intValue();
|
| 1317 |
} catch (Exception e) {
|
1317 |
} catch (Exception e) {
|
| 1318 |
LOGGER.error("Unable to get state rates");
|
1318 |
LOGGER.error("Unable to get state rates");
|
| 1319 |
}
|
1319 |
}
|