| | |
| | | if (salesLedger.getId().intValue() == invoiceLedgerDto.getSalesLedgerId()) { |
| | | BigDecimal noInvoiceAmountTotal = salesLedger.getContractAmount().subtract(invoiceLedgerDto.getInvoiceTotal()); |
| | | salesLedger.setNoInvoiceAmountTotal(noInvoiceAmountTotal); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | List<Long> salesLedgerIds = iPage.getRecords().stream().map(SalesLedger::getId).collect(Collectors.toList()); |
| | | List<InvoiceLedgerDto> invoiceLedgerDtoList = invoiceLedgerMapper.invoicedTotal(salesLedgerIds); |
| | | if(CollectionUtils.isEmpty(invoiceLedgerDtoList)){ |
| | | iPage.setTotal(iPage.getRecords().size()); |
| | | return iPage; |
| | | } |
| | | for (SalesLedger salesLedger : iPage.getRecords()) { |
| | |
| | | iPage.getRecords().removeIf(salesLedger -> Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00"))); |
| | | } |
| | | } |
| | | iPage.setTotal(iPage.getRecords().size()); |
| | | return iPage; |
| | | } |
| | | } |