|
|
@@ -147,7 +147,7 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
|
|
|
public ResponseResultVO<?> insert(OtherReceivableVO otherReceivableVO) {
|
|
|
// 收款金额不能大于收入金额
|
|
|
if(otherReceivableVO.getSumAmtRec().compareTo(otherReceivableVO.getSumAmtReceivable()) == 1){
|
|
|
- throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.AMT_HANDLE_NO_LESS_AMT_SHOULD.getMessage());
|
|
|
+ throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.RECEIVABLE_NO_LESS_RECEIPT.getMessage());
|
|
|
}
|
|
|
// 获取单号
|
|
|
Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.OTHERRECEIVABLE.getName(), false);
|
|
|
@@ -289,6 +289,10 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
|
|
|
rollbackFor = {Exception.class}
|
|
|
)
|
|
|
public ResponseResultVO<?> update(OtherReceivableVO otherReceivableVO) {
|
|
|
+ // 收款金额不能大于收入金额
|
|
|
+ if(otherReceivableVO.getSumAmtRec().compareTo(otherReceivableVO.getSumAmtReceivable()) == 1){
|
|
|
+ throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.RECEIVABLE_NO_LESS_RECEIPT.getMessage());
|
|
|
+ }
|
|
|
|
|
|
/*********************************** 应收收款的处理 begin ************************************/
|
|
|
// 如果收款了,先把收款作废掉
|