|
|
@@ -63,7 +63,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.math.RoundingMode;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
@@ -508,19 +507,24 @@ public class FinPeriodServiceImpl extends ServiceImpl<FinPeriodMapper, FinPeriod
|
|
|
if (1 == detail.getIsClosed()) {
|
|
|
throw new RuntimeException("该期间已结转,请勿重复结转!");
|
|
|
}
|
|
|
+ PeriodVouchersTemplate period = JSONObject.parseObject(detail.getPeriod(), PeriodVouchersTemplate.class);
|
|
|
+ if (period != null) {
|
|
|
+ period.setStatus(1);
|
|
|
+ finPeriod.setPeriod(JSON.toJSONString(period));
|
|
|
+ }
|
|
|
detail.setUpdateTime(new Date());
|
|
|
detail.setUpdateUserName(AuthUtil.getUserName());
|
|
|
detail.setUpdateUser(AuthUtil.getUserId());
|
|
|
detail.setIsClosed(1);
|
|
|
detail.setCloseDate(new Date());
|
|
|
- if (ObjectUtils.isNotNull(detail.getPeriodVouchersTemplate())) {
|
|
|
+ /*if (ObjectUtils.isNotNull(detail.getPeriodVouchersTemplate())) {
|
|
|
detail.getPeriodVouchersTemplate().setStatus(detail.getIsClosed());
|
|
|
if ("FM-CURRENCY-PL-TRANSFER".equals(detail.getPeriodVouchersTemplate().getBsType())) {
|
|
|
detail.setExchange(JSON.toJSONString(detail.getPeriodVouchersTemplate()));
|
|
|
} else {
|
|
|
detail.setPeriod(JSON.toJSONString(detail.getPeriodVouchersTemplate()));
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
baseMapper.updateById(detail);
|
|
|
|
|
|
List<FinVouchers> finVouchersList = finVouchersService.list(new LambdaQueryWrapper<FinVouchers>()
|
|
|
@@ -768,7 +772,7 @@ public class FinPeriodServiceImpl extends ServiceImpl<FinPeriodMapper, FinPeriod
|
|
|
/*if ("FM-CURRENCY-PL-TRANSFER".equals(finPeriod.getPeriodVouchersTemplate().getBsType())) {
|
|
|
finPeriod.setExchange(JSON.toJSONString(finPeriod.getPeriodVouchersTemplate()));
|
|
|
} else {*/
|
|
|
- finPeriod.setPeriod(JSON.toJSONString(finPeriod.getPeriodVouchersTemplate()));
|
|
|
+ finPeriod.setPeriod(JSON.toJSONString(finPeriod.getPeriodVouchersTemplate()));
|
|
|
// }
|
|
|
}
|
|
|
/*PeriodVouchersTemplate exchange = JSONObject.parseObject(finPeriod.getExchange(), PeriodVouchersTemplate.class);
|
|
|
@@ -911,8 +915,8 @@ public class FinPeriodServiceImpl extends ServiceImpl<FinPeriodMapper, FinPeriod
|
|
|
PeriodVouchersTemplate exchange = JSONObject.parseObject(detail.getExchange(), PeriodVouchersTemplate.class);
|
|
|
detail.setPeriodVouchersTemplate(exchange);
|
|
|
} else {*/
|
|
|
- PeriodVouchersTemplate period = JSONObject.parseObject(detail.getPeriod(), PeriodVouchersTemplate.class);
|
|
|
- detail.setPeriodVouchersTemplate(period);
|
|
|
+ PeriodVouchersTemplate period = JSONObject.parseObject(detail.getPeriod(), PeriodVouchersTemplate.class);
|
|
|
+ detail.setPeriodVouchersTemplate(period);
|
|
|
// }
|
|
|
}
|
|
|
return detail;
|
|
|
@@ -1124,85 +1128,85 @@ public class FinPeriodServiceImpl extends ServiceImpl<FinPeriodMapper, FinPeriod
|
|
|
finVouchersItemsList.add(finVouchersItems);
|
|
|
}
|
|
|
} else {*/
|
|
|
- if (periodVouchersTemplate.getPlAccNo().equals(item.getCode())) {
|
|
|
- finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
- if ("C".equals(item.getDc())) {
|
|
|
- if (new BigDecimal("0.00").compareTo(calc.getAmountCr()) != 0) {
|
|
|
- finVouchersItems.setAmountCr(calc.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrLoc(calc.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ if (periodVouchersTemplate.getPlAccNo().equals(item.getCode())) {
|
|
|
+ finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
+ if ("C".equals(item.getDc())) {
|
|
|
+ if (new BigDecimal("0.00").compareTo(calc.getAmountCr()) != 0) {
|
|
|
+ finVouchersItems.setAmountCr(calc.getAmountCr());
|
|
|
+ finVouchersItems.setAmountCrLoc(calc.getAmountCr());
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (new BigDecimal("0.00").compareTo(calc.getAmountDr()) != 0) {
|
|
|
+ finVouchersItems.setAmountDr(calc.getAmountDr());
|
|
|
+ finVouchersItems.setAmountDrLoc(calc.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!"CNY".equals(item.getCurCode())) {
|
|
|
+ finVouchersItems.setExrate(periodExchangeRate.getExrate());
|
|
|
+ if ("D".equals(item.getDc())) {
|
|
|
+ if (new BigDecimal("0.00").compareTo(calc.getAmountDrUsd()) != 0) {
|
|
|
+ finVouchersItems.setAmountCrUsd(calc.getAmountDrUsd());
|
|
|
+ finVouchersItems.setAmountCr(calc.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrLoc(calc.getAmountDr());
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
continue;
|
|
|
}
|
|
|
} else {
|
|
|
- if (new BigDecimal("0.00").compareTo(calc.getAmountDr()) != 0) {
|
|
|
- finVouchersItems.setAmountDr(calc.getAmountDr());
|
|
|
- finVouchersItems.setAmountDrLoc(calc.getAmountDr());
|
|
|
+ if (new BigDecimal("0.00").compareTo(calc.getAmountCrUsd()) != 0) {
|
|
|
+ finVouchersItems.setAmountDrUsd(calc.getAmountCrUsd());
|
|
|
+ finVouchersItems.setAmountDr(calc.getAmountCr());
|
|
|
+ finVouchersItems.setAmountDrLoc(calc.getAmountCr());
|
|
|
finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- if (!"CNY".equals(item.getCurCode())) {
|
|
|
- finVouchersItems.setExrate(periodExchangeRate.getExrate());
|
|
|
- if ("D".equals(item.getDc())) {
|
|
|
- if (new BigDecimal("0.00").compareTo(calc.getAmountDrUsd()) != 0) {
|
|
|
- finVouchersItems.setAmountCrUsd(calc.getAmountDrUsd());
|
|
|
- finVouchersItems.setAmountCr(calc.getAmountDr());
|
|
|
- finVouchersItems.setAmountCrLoc(calc.getAmountDr());
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
+ if ("D".equals(item.getDc())) {
|
|
|
+ if (new BigDecimal("0.00").compareTo(calc.getAmountDr()) != 0) {
|
|
|
+ finVouchersItems.setAmountCr(calc.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrLoc(calc.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
- if (new BigDecimal("0.00").compareTo(calc.getAmountCrUsd()) != 0) {
|
|
|
- finVouchersItems.setAmountDrUsd(calc.getAmountCrUsd());
|
|
|
- finVouchersItems.setAmountDr(calc.getAmountCr());
|
|
|
- finVouchersItems.setAmountDrLoc(calc.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ continue;
|
|
|
}
|
|
|
} else {
|
|
|
- finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
- if ("D".equals(item.getDc())) {
|
|
|
- if (new BigDecimal("0.00").compareTo(calc.getAmountDr()) != 0) {
|
|
|
- finVouchersItems.setAmountCr(calc.getAmountDr());
|
|
|
- finVouchersItems.setAmountCrLoc(calc.getAmountDr());
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (new BigDecimal("0.00").compareTo(calc.getAmountCr()) != 0) {
|
|
|
+ finVouchersItems.setAmountDr(calc.getAmountCr());
|
|
|
+ finVouchersItems.setAmountDrLoc(calc.getAmountCr());
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
- if (new BigDecimal("0.00").compareTo(calc.getAmountCr()) != 0) {
|
|
|
- finVouchersItems.setAmountDr(calc.getAmountCr());
|
|
|
- finVouchersItems.setAmountDrLoc(calc.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ continue;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- finVouchersItemsList.add(finVouchersItems);
|
|
|
+ }
|
|
|
+ finVouchersItemsList.add(finVouchersItems);
|
|
|
// }
|
|
|
}
|
|
|
} else {
|
|
|
@@ -1268,89 +1272,89 @@ public class FinPeriodServiceImpl extends ServiceImpl<FinPeriodMapper, FinPeriod
|
|
|
finVouchersItemsList.add(finVouchersItems);
|
|
|
}
|
|
|
} else {*/
|
|
|
- PeriodVouchersTemplate period = JSONObject.parseObject(finPeriod.getPeriod(), PeriodVouchersTemplate.class);
|
|
|
- if (period == null) {
|
|
|
- throw new RuntimeException("未找到期间损益配置");
|
|
|
+ PeriodVouchersTemplate period = JSONObject.parseObject(finPeriod.getPeriod(), PeriodVouchersTemplate.class);
|
|
|
+ if (period == null) {
|
|
|
+ throw new RuntimeException("未找到期间损益配置");
|
|
|
+ }
|
|
|
+ if (period.getPlAccNo().equals(item.getCode())) {
|
|
|
+ finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
+ if ("C".equals(item.getDc())) {
|
|
|
+ if (new BigDecimal("0.00").compareTo(finGenleg.getAmountCr()) != 0) {
|
|
|
+ finVouchersItems.setAmountCr(finGenleg.getAmountCr());
|
|
|
+ finVouchersItems.setAmountCrLoc(finGenleg.getAmountCr());
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (new BigDecimal("0.00").compareTo(finGenleg.getAmountDr()) != 0) {
|
|
|
+ finVouchersItems.setAmountDr(finGenleg.getAmountDr());
|
|
|
+ finVouchersItems.setAmountDrLoc(finGenleg.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
- if (period.getPlAccNo().equals(item.getCode())) {
|
|
|
- finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
- if ("C".equals(item.getDc())) {
|
|
|
- if (new BigDecimal("0.00").compareTo(finGenleg.getAmountCr()) != 0) {
|
|
|
- finVouchersItems.setAmountCr(finGenleg.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrLoc(finGenleg.getAmountCr());
|
|
|
+ } else {
|
|
|
+ if (!"CNY".equals(item.getCurCode())) {
|
|
|
+ finVouchersItems.setExrate(periodExchangeRate.getExrate());
|
|
|
+ if ("D".equals(item.getDc())) {
|
|
|
+ if (new BigDecimal("0.00").compareTo(finGenleg.getAmountDrUsd()) != 0) {
|
|
|
+ finVouchersItems.setAmountCrUsd(finGenleg.getAmountDrUsd());
|
|
|
+ finVouchersItems.setAmountCr(finGenleg.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrLoc(finGenleg.getAmountDr());
|
|
|
finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
continue;
|
|
|
}
|
|
|
} else {
|
|
|
- if (new BigDecimal("0.00").compareTo(finGenleg.getAmountDr()) != 0) {
|
|
|
- finVouchersItems.setAmountDr(finGenleg.getAmountDr());
|
|
|
- finVouchersItems.setAmountDrLoc(finGenleg.getAmountDr());
|
|
|
+ if (new BigDecimal("0.00").compareTo(finGenleg.getAmountCrUsd()) != 0) {
|
|
|
+ finVouchersItems.setAmountDrUsd(finGenleg.getAmountCrUsd());
|
|
|
+ finVouchersItems.setAmountDr(finGenleg.getAmountCr());
|
|
|
+ finVouchersItems.setAmountDrLoc(finGenleg.getAmountCr());
|
|
|
finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- if (!"CNY".equals(item.getCurCode())) {
|
|
|
- finVouchersItems.setExrate(periodExchangeRate.getExrate());
|
|
|
- if ("D".equals(item.getDc())) {
|
|
|
- if (new BigDecimal("0.00").compareTo(finGenleg.getAmountDrUsd()) != 0) {
|
|
|
- finVouchersItems.setAmountCrUsd(finGenleg.getAmountDrUsd());
|
|
|
- finVouchersItems.setAmountCr(finGenleg.getAmountDr());
|
|
|
- finVouchersItems.setAmountCrLoc(finGenleg.getAmountDr());
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
+ if ("D".equals(item.getDc())) {
|
|
|
+ if (new BigDecimal("0.00").compareTo(finGenleg.getAmountDr()) != 0) {
|
|
|
+ finVouchersItems.setAmountCr(finGenleg.getAmountDr());
|
|
|
+ finVouchersItems.setAmountCrLoc(finGenleg.getAmountDr());
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
- if (new BigDecimal("0.00").compareTo(finGenleg.getAmountCrUsd()) != 0) {
|
|
|
- finVouchersItems.setAmountDrUsd(finGenleg.getAmountCrUsd());
|
|
|
- finVouchersItems.setAmountDr(finGenleg.getAmountCr());
|
|
|
- finVouchersItems.setAmountDrLoc(finGenleg.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ continue;
|
|
|
}
|
|
|
} else {
|
|
|
- finVouchersItems.setExrate(new BigDecimal("1"));
|
|
|
- if ("D".equals(item.getDc())) {
|
|
|
- if (new BigDecimal("0.00").compareTo(finGenleg.getAmountDr()) != 0) {
|
|
|
- finVouchersItems.setAmountCr(finGenleg.getAmountDr());
|
|
|
- finVouchersItems.setAmountCrLoc(finGenleg.getAmountDr());
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (new BigDecimal("0.00").compareTo(finGenleg.getAmountCr()) != 0) {
|
|
|
+ finVouchersItems.setAmountDr(finGenleg.getAmountCr());
|
|
|
+ finVouchersItems.setAmountDrLoc(finGenleg.getAmountCr());
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
- if (new BigDecimal("0.00").compareTo(finGenleg.getAmountCr()) != 0) {
|
|
|
- finVouchersItems.setAmountDr(finGenleg.getAmountCr());
|
|
|
- finVouchersItems.setAmountDrLoc(finGenleg.getAmountCr());
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ continue;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- finVouchersItemsList.add(finVouchersItems);
|
|
|
+ }
|
|
|
+ finVouchersItemsList.add(finVouchersItems);
|
|
|
// }
|
|
|
}
|
|
|
}
|
|
|
@@ -1413,22 +1417,22 @@ public class FinPeriodServiceImpl extends ServiceImpl<FinPeriodMapper, FinPeriod
|
|
|
finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
}else{*/
|
|
|
- BigDecimal subtract = amountDrLoc.subtract(amountCrLoc);
|
|
|
- if ("D".equals(accounts.getDc())){
|
|
|
- finVouchersItems.setAmountDr(subtract);
|
|
|
- finVouchersItems.setAmountDrLoc(subtract);
|
|
|
- finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
- }else{
|
|
|
- finVouchersItems.setAmountCr(subtract);
|
|
|
- finVouchersItems.setAmountCrLoc(subtract);
|
|
|
- finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
- finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
- }
|
|
|
+ BigDecimal subtract = amountDrLoc.subtract(amountCrLoc);
|
|
|
+ if ("D".equals(accounts.getDc())) {
|
|
|
+ finVouchersItems.setAmountDr(subtract);
|
|
|
+ finVouchersItems.setAmountDrLoc(subtract);
|
|
|
+ finVouchersItems.setAmountCr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountCrLoc(new BigDecimal("0.00"));
|
|
|
+ } else {
|
|
|
+ finVouchersItems.setAmountCr(subtract);
|
|
|
+ finVouchersItems.setAmountCrLoc(subtract);
|
|
|
+ finVouchersItems.setAmountCrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDr(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrUsd(new BigDecimal("0.00"));
|
|
|
+ finVouchersItems.setAmountDrLoc(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
// }
|
|
|
|
|
|
/*} else {
|