| | |
| | | |
| | | // 如果已经有过开票或回款操作,则不允许编辑 |
| | | boolean hasReceiptOperation = receiptPaymentAmountTotal.compareTo(BigDecimal.ZERO) > 0; |
| | | salesLedgerVo.setIsEdit(!hasReceiptOperation); |
| | | salesLedgerVo.setIsEdit(hasReceiptOperation); |
| | | |
| | | salesLedgerVo.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.FILE, RecordTypeEnum.SALES_LEDGER, ledgerId)); |
| | | } |
| | |
| | | public R getSalesLedgerWithProductsLoss(Long salesLedgerId) { |
| | | return R.ok(salesLedgerService.getSalesLedgerWithProductsLoss(salesLedgerId)); |
| | | } |
| | | |
| | | @Operation(summary = "获取销售单打印数据") |
| | | @GetMapping("/printData/{id}") |
| | | public AjaxResult printData(@PathVariable Long id) { |
| | | Map<String, Object> data = salesLedgerService.getPrintData(id); |
| | | if (data == null) { |
| | | return AjaxResult.error("销售单不存在"); |
| | | } |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |