1
This commit is contained in:
@@ -91,28 +91,40 @@ namespace Gatedge.NewOrientLandMark.BOS.PlugIn.PUR_PurchaseOrder.ConvertPlugIn
|
|||||||
var unitId = Convert.ToInt64(item["UnitId_Id"]); // 主单位
|
var unitId = Convert.ToInt64(item["UnitId_Id"]); // 主单位
|
||||||
var priceUnitId = Convert.ToInt64(item["PriceUnitID_Id"]); // 计价单位
|
var priceUnitId = Convert.ToInt64(item["PriceUnitID_Id"]); // 计价单位
|
||||||
var remainInStockUnitId = Convert.ToInt64(item["RemainInStockUnitId_Id"]); // 采购单位
|
var remainInStockUnitId = Convert.ToInt64(item["RemainInStockUnitId_Id"]); // 采购单位
|
||||||
|
var baseUnitId = Convert.ToInt64(material["BaseUnitID_Id"]); // 基础单位
|
||||||
//var snUnitId = Convert.ToInt64(item["SNUnitID_Id"]); // 序列号单位
|
//var snUnitId = Convert.ToInt64(item["SNUnitID_Id"]); // 序列号单位
|
||||||
var qty = Convert.ToDecimal(CustomParams["InStockQty"]);
|
var qty = Convert.ToDecimal(CustomParams["InStockQty"]);
|
||||||
item["RealQty"] = qty; // 填写实收数
|
item["RealQty"] = qty; // 填写实收数
|
||||||
if (priceUnitId != 0) // 计价数量
|
// 计价数量
|
||||||
|
if (priceUnitId != 0)
|
||||||
{
|
{
|
||||||
var BaseRealQty = unitService.GetQtyByUtilConverRate(materialId, unitId, priceUnitId, qty);
|
var BaseRealQty = unitService.GetQtyByUtilConverRate(materialId, unitId, priceUnitId, qty);
|
||||||
item["PriceUnitQty"] = BaseRealQty;
|
item["PriceUnitQty"] = BaseRealQty;
|
||||||
item["PriceUnitQty"] = BaseRealQty;
|
|
||||||
}
|
}
|
||||||
if (remainInStockUnitId != 0) // 采购数量
|
// 采购数量
|
||||||
|
if (remainInStockUnitId != 0)
|
||||||
{
|
{
|
||||||
var SecRealQty = unitService.GetQtyByUtilConverRate(materialId, unitId, remainInStockUnitId, qty);
|
var SecRealQty = unitService.GetQtyByUtilConverRate(materialId, unitId, remainInStockUnitId, qty);
|
||||||
item["RemainInStockQty"] = SecRealQty;
|
item["RemainInStockQty"] = SecRealQty;
|
||||||
}
|
}
|
||||||
|
// 采购基本数量
|
||||||
|
if (baseUnitId != 0)
|
||||||
|
{
|
||||||
|
var BaseRealQty = unitService.GetQtyByUtilConverRate(materialId, unitId, baseUnitId, qty);
|
||||||
|
item["RemainInStockBaseQty"] = BaseRealQty;
|
||||||
|
}
|
||||||
|
|
||||||
var lotId = CustomParams["FLot_Id"].ToString();
|
var lotId = CustomParams["FLot_Id"].ToString();
|
||||||
var lotText = CustomParams["FLot_Text"].ToString();
|
var lotText = CustomParams["FLot_Text"].ToString();
|
||||||
// 如果批号不为空,则赋值
|
// 如果批号不为空,则赋值
|
||||||
if (!lotText.IsNullOrEmpty())
|
if (!lotText.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
if (!lotId.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
throw new Exception("1111");
|
||||||
//if (snUnitId != 0)
|
//if (snUnitId != 0)
|
||||||
//{
|
//{
|
||||||
// var snQty = unitService.GetQtyByUtilConverRate(materialId, unitId, snUnitId, qty);
|
// var snQty = unitService.GetQtyByUtilConverRate(materialId, unitId, snUnitId, qty);
|
||||||
|
|||||||
Reference in New Issue
Block a user