fix(报销/拨款): 行项目金额改为价税合计,移除总金额手动输入框

- OCR解析:行项目金额改为 amount + tax_amount(价税合计)
- 总金额改为只读展示,由明细汇总自动计算,不再支持手动输入
- 去掉总金额字段的表单必填校验

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 18:22:04 +08:00
parent 1e128cecfe
commit 7f9ae18022
3 changed files with 43 additions and 7 deletions

View File

@@ -153,7 +153,15 @@ public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
HrmInvoiceOcrResultVo.Item item = new HrmInvoiceOcrResultVo.Item();
item.setItemName(name);
item.setAmount(parseBigDecimal(getStringOrFieldValue(li, "amount")));
// 行项目金额取价税合计:税前金额 + 税额
BigDecimal preAmt = parseBigDecimal(getStringOrFieldValue(li, "amount"));
BigDecimal taxAmt = parseBigDecimal(getStringOrFieldValue(li, "tax_amount"));
BigDecimal withTax = null;
if (preAmt != null || taxAmt != null) {
withTax = (preAmt != null ? preAmt : BigDecimal.ZERO)
.add(taxAmt != null ? taxAmt : BigDecimal.ZERO);
}
item.setAmount(withTax != null ? withTax : preAmt);
item.setTaxRate(getStringOrFieldValue(li, "tax_rate"));
items.add(item);
}