| | |
| | | return iPage; |
| | | } |
| | | for (SalesLedger salesLedger : iPage.getRecords()) { |
| | | boolean existFlag = false; |
| | | BigDecimal noInvoiceAmountTotal = BigDecimal.ZERO; |
| | | BigDecimal invoiceTotal = BigDecimal.ZERO; |
| | | for (InvoiceLedgerDto invoiceLedgerDto : invoiceLedgerDtoList) { |
| | | if (salesLedger.getId().intValue() == invoiceLedgerDto.getSalesLedgerId()) { |
| | | BigDecimal noInvoiceAmountTotal = salesLedger.getContractAmount().subtract(invoiceLedgerDto.getInvoiceTotal()); |
| | | salesLedger.setNoInvoiceAmountTotal(noInvoiceAmountTotal); |
| | | noInvoiceAmountTotal = salesLedger.getContractAmount().subtract(invoiceLedgerDto.getInvoiceTotal()); |
| | | invoiceTotal = invoiceLedgerDto.getInvoiceTotal(); |
| | | existFlag = true; |
| | | break; |
| | | } |
| | | } |
| | | if(existFlag){ |
| | | salesLedger.setNoInvoiceAmountTotal(noInvoiceAmountTotal); |
| | | }else { |
| | | salesLedger.setNoInvoiceAmountTotal(salesLedger.getContractAmount()); |
| | | } |
| | | salesLedger.setInvoiceTotal(invoiceTotal); |
| | | } |
| | | return iPage; |
| | | } |