fix(purchase): 修正采购台账合同金额更新逻辑
| | |
| | | purchaseLedger.setRecorderId(purchaseLedgerDto.getRecorderId()); |
| | | |
| | | purchaseLedger.setApprovalStatus(1); |
| | | // 新增时初始化实际合同金额 |
| | | if (purchaseLedger.getId() == null) { |
| | | // 实际合同金额始终等于合同金额 |
| | | purchaseLedger.setNetContractAmount(purchaseLedger.getContractAmount()); |
| | | } |
| | | // 3. 新增或更新主表 |
| | | if (purchaseLedger.getId() == null) { |
| | | if (!StringUtils.hasText(purchaseLedger.getPurchaseContractNumber())) { |
| | |
| | | |
| | | <update id="updateContractAmountById"> |
| | | UPDATE purchase_ledger |
| | | SET contract_amount = #{totalTaxInclusiveAmount} |
| | | SET contract_amount = #{totalTaxInclusiveAmount}, |
| | | net_contract_amount = #{totalTaxInclusiveAmount} |
| | | WHERE id = #{id} |
| | | </update> |
| | | <select id="selectPurchaseStats" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |