hxh 12 годин тому
батько
коміт
e90fd57253
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      src/custom/restcontroller/webmanage/sale/u8/u8.java

+ 4 - 4
src/custom/restcontroller/webmanage/sale/u8/u8.java

@@ -743,11 +743,11 @@ public class u8 extends Controller {
         JSONArray detail = new JSONArray();
 
         Rows rows = dbConnect.runSqlQuery("select t3.itemno,t1.itemid,t1.stockno,ifnull(t1.qty,0) qty,ifnull(t2.price,0) price,ifnull(t2.taxprice,0) taxprice,ifnull(t2.taxrate,0) taxrate,t2.stockid  from (\n" +
-                "select distinct t1.itemid,t1.u8id,t1.stockid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end as stockno,sum(t1.qty)qty from u8billcodes t1\n" +
+                "select distinct t1.itemid,t1.u8id,case when t2.outplace='谈桥' then 1605 when t2.outplace='马桥' then 2320 else t1.stockid end stockid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end as stockno,sum(t1.qty)qty from u8billcodes t1\n" +
                 "inner join u8bills t2 on t1.billno=t2.billno and t1.u8id=t2.u8id \n" +
                 "left join st_stock t3 on t1.stockid=t3.stockid\n" +
                 "where t1.rb='1' and t1.u8id=" + u8id +
-                " group by t1.itemid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end,t1.u8id,t1.stockid )t1 left join u8itemprice t2 on t1.u8id=t2.u8id and t1.itemid=t2.itemid and t1.stockid=t2.stockid left join plm_item t3 on t1.itemid=t3.itemid");
+                " group by t1.itemid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end,t1.u8id,case when t2.outplace='谈桥' then 1605 when t2.outplace='马桥' then 2320 else t1.stockid end )t1 left join u8itemprice t2 on t1.u8id=t2.u8id and t1.itemid=t2.itemid and t1.stockid=t2.stockid left join plm_item t3 on t1.itemid=t3.itemid");
         int rowno = 1;
         for (Row row : rows) {
             BigDecimal qty = row.getBigDecimal("qty");
@@ -816,11 +816,11 @@ public class u8 extends Controller {
         JSONArray detail = new JSONArray();
 
         Rows rows = dbConnect.runSqlQuery("select t1.itemid,t1.stockno,ifnull(-t1.qty,0) qty,ifnull(t2.price,0) price,ifnull(t2.taxprice,0) taxprice,ifnull(t2.taxrate,0) taxrate,t3.itemno,t2.stockid from (\n" +
-                "select distinct t1.itemid,t1.u8id,t1.stockid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end as stockno,sum(t1.qty)qty from u8billcodes t1\n" +
+                "select distinct t1.itemid,t1.u8id,case when t2.outplace='谈桥' then 1605 when t2.outplace='马桥' then 2320 else t1.stockid end stockid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end as stockno,sum(t1.qty)qty from u8billcodes t1\n" +
                 "inner join u8bills t2 on t1.billno=t2.billno and t1.u8id=t2.u8id \n" +
                 "left join st_stock t3 on t1.stockid=t3.stockid\n" +
                 "where t1.rb='0' and t1.u8id=" + u8id +
-                " group by t1.itemid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end,t1.u8id,t1.stockid )t1 left join u8itemprice t2 on t1.u8id=t2.u8id and t1.itemid=t2.itemid and t1.stockid=t2.stockid left join plm_item t3 on t1.itemid=t3.itemid");
+                " group by t1.itemid,case when t2.outplace='谈桥' then '103' when t2.outplace='马桥' then '109' else t3.stockno end,t1.u8id,case when t2.outplace='谈桥' then 1605 when t2.outplace='马桥' then 2320 else t1.stockid end )t1 left join u8itemprice t2 on t1.u8id=t2.u8id and t1.itemid=t2.itemid and t1.stockid=t2.stockid left join plm_item t3 on t1.itemid=t3.itemid");
         int rowno = 1;
         for (Row row : rows) {
             BigDecimal qty = row.getBigDecimal("qty");