| | |
| | | |
| | | // 如果已经有过开票或回款操作,则不允许编辑 |
| | | boolean hasReceiptOperation = receiptPaymentAmountTotal.compareTo(BigDecimal.ZERO) > 0; |
| | | salesLedgerVo.setIsEdit(hasReceiptOperation); |
| | | salesLedgerVo.setIsEdit(!hasReceiptOperation); |
| | | |
| | | salesLedgerVo.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.FILE, RecordTypeEnum.SALES_LEDGER, ledgerId)); |
| | | } |
| | | |
| | | if (ObjectUtils.isNotEmpty(salesLedgerDto.getStatus())) { |
| | | if (salesLedgerDto.getStatus()) { |
| | | // 清除所有“未开票金额”为 0 的记录 |
| | | iPage.getRecords().removeIf(salesLedger -> |
| | | Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00"))); |
| | | iPage.setTotal(iPage.getRecords().size()); |
| | | } |
| | | } |