Update SettlementCarryServiceImpl.java
This commit is contained in:
@ -223,8 +223,8 @@ public class SettlementCarryServiceImpl extends ServiceImpl<SettlementMapper, Se
|
|||||||
private boolean addVoucherItems(String bookId,String subjectCode,List<VoucherItemChangeDto> items,VoucherTemplateItem templateItem) {
|
private boolean addVoucherItems(String bookId,String subjectCode,List<VoucherItemChangeDto> items,VoucherTemplateItem templateItem) {
|
||||||
List<BookSubject> subjectList = bookSubjectService.selectSubjectAndChild(bookId, subjectCode);
|
List<BookSubject> subjectList = bookSubjectService.selectSubjectAndChild(bookId, subjectCode);
|
||||||
for(BookSubject s : subjectList ) {
|
for(BookSubject s : subjectList ) {
|
||||||
if(isLeafSubject(s,subjectList) && s.getBalance().compareTo(BigDecimal.ZERO) > 0) {
|
if(isLeafSubject(s,subjectList) && s.getBalance().compareTo(BigDecimal.ZERO) != 0) {
|
||||||
items.add(createVoucherItemDtoBySubject(bookId,s,templateItem,s.getBalance()));
|
items.add(createVoucherItemDtoBySubject(bookId,s,templateItem,s.getBalance().abs()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user