|
@@ -1054,8 +1054,8 @@ public class OrderItems extends Controller {
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sa_salearea", "t10", "t10.sa_saleareaid = t9.sa_saleareaid and t10.siteid = t9.siteid",
|
|
|
"areaname");
|
|
|
// querySQL.addJoinTable(JOINTYPE.left, t11, "t11", "t11.sa_orderitemsid = t1.sa_orderitemsid and t11.siteid = t1.siteid");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "sa_promotion", "t13", "t13.sa_promotionid=t5.sa_promotionid and t13.siteid=t5.siteid","promnum","promname");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sa_accountclass", "t12", "t12.sa_accountclassid=t5.sa_accountclassid and t12.siteid=t5.siteid");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_promotion", "t13", "t13.sa_promotionid=t5.sa_promotionid and t13.siteid=t5.siteid","promnum","promname");
|
|
|
querySQL.addQueryFields("accountnames", "if(ifnull(replace(replace(replace(JSON_EXTRACT (t5.sa_accountclassinfos, '$**.accountname' ),'[',''),']',''),'\\\"',''),'')='',t12.accountname,replace(replace(replace(JSON_EXTRACT (t5.sa_accountclassinfos, '$**.accountname' ),'[',''),']',''),'\\\"',''))");
|
|
|
querySQL.addQueryFields("orderremarks", "t5.remarks");
|
|
|
// querySQL.addQueryFields("outwarehouseqty", "ifnull(t11.outwarehouseqty,0)");
|