瀏覽代碼

bug修复

eganwu 1 年之前
父節點
當前提交
aa1c7b48eb
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/custom/restcontroller/webmanage/sale/order/OrderItems.java

+ 3 - 0
src/custom/restcontroller/webmanage/sale/order/OrderItems.java

@@ -90,6 +90,9 @@ public class OrderItems extends Controller {
             //商品信息
             Row itemRow = getItemRow(itemid);
 
+            if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  itemid=" + itemid + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
+                return getErrReturnObject().setErrMsg("商品【" + itemRow.getString("itemno") + "】已售罄,不能添加。").toString();
+            }
 
             BigDecimal price1 = new BigDecimal(0);
 //            SQLFactory sqlFactory = new SQLFactory(this, "订单商品明细_新增");