|
@@ -2390,6 +2390,10 @@ public class Order extends Controller {
|
|
|
if (orderRow.isEmpty()) {
|
|
if (orderRow.isEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("订单不存在").toString();
|
|
return getErrReturnObject().setErrMsg("订单不存在").toString();
|
|
|
}
|
|
}
|
|
|
|
|
+ if (orderRow.get(0).getString("status").equals("关闭")) {
|
|
|
|
|
+ return getErrReturnObject().setErrMsg("订单已关闭,无法再次手工关闭").toString();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
Long sys_enterpriseid = orderRow.get(0).getLong("sys_enterpriseid");
|
|
Long sys_enterpriseid = orderRow.get(0).getLong("sys_enterpriseid");
|
|
|
Long sa_accountclassid = orderRow.get(0).getLong("sa_accountclassid");
|
|
Long sa_accountclassid = orderRow.get(0).getLong("sa_accountclassid");
|
|
@@ -2406,10 +2410,10 @@ public class Order extends Controller {
|
|
|
BigDecimal totalprice = rows.get(0).getBigDecimal("totalprice");
|
|
BigDecimal totalprice = rows.get(0).getBigDecimal("totalprice");
|
|
|
if (totalprice.compareTo(BigDecimal.ZERO) > 0) {
|
|
if (totalprice.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
CashbillEntity entity = new CashbillEntity();
|
|
CashbillEntity entity = new CashbillEntity();
|
|
|
- entity.setAmount(totalprice);
|
|
|
|
|
|
|
+ entity.setAmount(totalprice.negate());
|
|
|
entity.setOwnerid(sa_orderid);
|
|
entity.setOwnerid(sa_orderid);
|
|
|
entity.setOwnertable("sa_order");
|
|
entity.setOwnertable("sa_order");
|
|
|
- Accountbalance.createCashbillIncome(this, sys_enterpriseid, sa_accountclassid, entity, true);
|
|
|
|
|
|
|
+ sqlList.addAll(Accountbalance.createCashbillPay(this, sys_enterpriseid, sa_accountclassid, entity, true)) ;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|