| @ -0,0 +1,51 @@ | |||||
| using BWP.B3Frameworks.Utils; | |||||
| using BWP.B3Sale.BO; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| using Forks.EnterpriseServices.SqlDoms; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| using TSingSoft.WebPluginFramework.BIPlugins.BLEvents; | |||||
| using BWP.B3Sale.Utils; | |||||
| using Forks.Utils; | |||||
| using BWP.B3Frameworks.BO.MoneyTemplate; | |||||
| namespace BWP.B3_YunKen.BLActions | |||||
| { | |||||
| public class SaleOutStoreFreightData : IBLMethodAction | |||||
| { | |||||
| public string Description | |||||
| { | |||||
| get { return "若{计价方式}为计重,则运费金额=【销售出库】明细中{报价数量}合计*{运费单价};若{计价方式}为包车,则运费单价=【销售出库】的{运费金额}/【销售出库】明细中{报价数量}合计"; } | |||||
| } | |||||
| public void Execute(IDmoContext context, object dmo, object parameter) | |||||
| { | |||||
| var bill = dmo as SaleOutStore; | |||||
| if (bill == null) | |||||
| return; | |||||
| if (bill.FreightPayment == 运费支付方式.计重) { | |||||
| bill.FreightPrice = (Money<金额>?)(bill.AllUnitNum * (bill.FreightUnitPrice??0).Value); | |||||
| } else if (bill.FreightPayment == 运费支付方式.包车 && bill.AllUnitNum!=0) { | |||||
| bill.FreightUnitPrice = bill.FreightPrice / bill.AllUnitNum.Value.Value; | |||||
| } | |||||
| } | |||||
| public IList<string> Features | |||||
| { | |||||
| get { return new List<string>(); } | |||||
| } | |||||
| public string Name | |||||
| { | |||||
| get { return "B3_YunKen.根据计价方式算运费相关"; } | |||||
| } | |||||
| } | |||||
| } | |||||