Commit 46d566c3 authored by 张永's avatar 张永

1

parent 5ee66e11
......@@ -477,7 +477,7 @@ public class GoodsServiceImpl implements GoodsService {
if(IsGoodsUnit == 1) {
//查询多单位
String GoodsUnitSql = " select sUnitTypeID = 'SaleMin', sUnitType = '销售小单位', nConvertRate = 1, " +
String GoodsUnitSql = " select t.nGoodsID, sUnitTypeID = 'SaleMin', sUnitType = '销售小单位', nConvertRate = 1, " +
" t.sUnit, t.nRealSalePrice, t.nSalePrice, "
+ " t.sSpec, t.nMinSaleQty, t.nSaleUnits, t.nStockQty, t.sStockTag, " +
" sShowUnit = convert(varchar,convert(numeric(12,2),t.nRealSalePrice)) + '元/' + t.sUnit + ' (1' + t.sUnit + ')' " +
......@@ -487,7 +487,7 @@ public class GoodsServiceImpl implements GoodsService {
" and t.nGoodsID = ?" +
" and t.nAgentID = ?" +
" union " +
" select gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, " +
" select t.nGoodsID, gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, " +
" gu.sUnit, nRealSalePrice = gu.nSalePrice, gu.nSalePrice, "
+ " t.sSpec + '*' + dbo.fn_GetConvertDec(gu.nConvertRate), nMinSaleQty = 1, nSaleUnits = 1, nStockQty = cast(t.nStockQty/gu.nConvertRate as int), t.sStockTag, " +
" sShowUnit = convert(varchar,gu.nSalePrice) + '元/' + gu.sUnit + ' (' + dbo.fn_GetConvertDec(gu.nConvertRate) + t.sUnit + ')' " +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment