eganwu 1 yıl önce
ebeveyn
işleme
aa1c7b48eb

+ 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, "订单商品明细_新增");