|
@@ -457,9 +457,15 @@ WHERE Rol.LineStatus >= 60 AND Rol.LineStatus <> 90 AND ISNULL(Rol.BearPrice,0)
|
|
|
return DataTableMapper.ToObject<BusinessUnit>(db.ExecuteDataSet(command).Tables[0].Rows[0]);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 采购订单行店铺折扣更新
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="purchaseOrderPurchaseOrderId"></param>
|
|
|
+ /// <param name="priceRatio"></param>
|
|
|
+ /// <returns></returns>
|
|
|
public int UpdatePoLineSpecialFareByShopPriceRatio(int purchaseOrderPurchaseOrderId, decimal priceRatio)
|
|
|
{
|
|
|
- const string sql = @"UPDATE line SET SpecialFare = Price * ( @Ratio - 1 ) FROM shop_order.PurchaseOrderLine line INNER JOIN basedata.Inventory item ON line.InventoryId = item.InventoryId AND item.PriceType = 1 WHERE line.PurchaseOrderId = @PurchaseOrderId";
|
|
|
+ const string sql = @"UPDATE line SET SpecialFare = line.Price * ( @Ratio - 1 ) FROM shop_order.PurchaseOrderLine line INNER JOIN basedata.Inventory item ON line.InventoryId = item.InventoryId AND item.PriceType = 1 WHERE line.PurchaseOrderId = @PurchaseOrderId";
|
|
|
DatabaseProviderFactory factory = new DatabaseProviderFactory();
|
|
|
Database db = factory.CreateDefault();
|
|
|
DbCommand command = db.GetSqlStringCommand(sql);
|