/// <summary> /// 获取发票的等额人民币价值,汇率按照开票时间计算 /// </summary> /// <param name="reportID"></param> /// <returns></returns> public string GetRMBAmout(string reportID) { if (string.IsNullOrEmpty(reportID)) { throw new ArgumentNullException("reportID不能为空。"); } RentContainerReportInfo vInfo = GetByID(reportID); // 运费、滞期、速遣合计 string total = GetAmout(reportID); decimal dTotal = decimal.Parse(total); if (vInfo.CurrencyID != "1" && vInfo.InputDate == null) { return "--"; } decimal amount = new ExchangeRate().GetRMB(total, vInfo.CurrencyID, vInfo.CreateTime); return amount.ToString(); }
/// <summary> /// 获取发票的等额人民币价值,汇率按照开票时间计算 /// </summary> /// <param name="ID"></param> /// <returns></returns> public string GetRMBAmout(string ID) { if (string.IsNullOrEmpty(ID)) { throw new ArgumentNullException("发票主键不能为空。"); } VoyageOtherInfo vInfo = GetByID(ID); // 运费、滞期、速遣合计 string total = vInfo.Amount; decimal dTotal = decimal.Parse(total); if (vInfo.CurrencyID != "1" && vInfo.InputDate == null) { return "--"; } decimal amount = new ExchangeRate().GetRMB(total, vInfo.CurrencyID, vInfo.CreateTime); return amount.ToString(); }
public string GetRMBAmout(VoyageLCLInfo vInfo) { // 运费、滞期、速遣合计 string total = GetAmout(vInfo); decimal dTotal = decimal.Parse(total); if (vInfo.CurrencyID != "1" && vInfo.InputDate == null) { return "--"; } decimal amount = new ExchangeRate().GetRMB(total, vInfo.CurrencyID, vInfo.CreateTime); return amount.ToString(); }