修复售后单

This commit is contained in:
huadengwu 2024-07-13 13:50:30 +08:00
parent 97c8db8adb
commit 6b4854d1f5

View File

@ -1275,8 +1275,13 @@ public class BillHeadServiceImpl extends BaseServiceImpl<BillHeadMapper, BillHea
//检查单据属性
private void checkHead(BillHead head) {
//售后类型(0无售后 10退货退款 20换货 30仅退款 40补发 50 维修 60 其他)
if(BillTypeEnum.SHSQD.getValue().equals(head.getBillType()) && head.getRefundType() == 30){
head.setDepotId(0L);
if(BillTypeEnum.SHSQD.getValue().equals(head.getBillType())){
if(head.getRefundType() == null){
throw new RuntimeException("售后类型不能为空");
}
if(head.getRefundType() == 30){
head.setDepotId(0L);
}
}
if(head.getDepotId() == null){
throw new BusinessException("仓库不能为空");