发票明细总金额计算

usertest
嵇文龙 4 months ago
parent 50c0b2fc2f
commit 9a6773f49a

@ -555,12 +555,13 @@ namespace DS.WMS.Core.Application.Method
ApplicationId = application.Id,
Name = item.Name,
TaxRate = application.TaxRate,
Quantity = 1,
TaxUnitPrice = application.Details.FindAll(x => item.FeeIds.Contains(x.FeeId)).Sum(x => x.ApplyAmount),
Category = DetailCategory.InvoiceApplication
};
invDetail.TaxAmount = invDetail.TaxUnitPrice * application.TaxRate;
invDetail.UnitPrice = invDetail.TaxUnitPrice - invDetail.TaxAmount;
invDetail.Amount = invDetail.TaxUnitPrice * invDetail.Quantity;
application.InvoiceDetails.Add(invDetail);
}
}

@ -8,6 +8,9 @@ using Newtonsoft.Json;
namespace DS.WMS.Core.Invoice.Method
{
/// <summary>
/// 提供对HTTP请求的低级别访问
/// </summary>
internal class ApiFox
{
/// <summary>
@ -93,7 +96,7 @@ namespace DS.WMS.Core.Invoice.Method
/// </summary>
/// <typeparam name="T">请求结果的类型</typeparam>
/// <param name="url">请求Url</param>
/// <param name="requestParams">查询字符串的键值对</param>
/// <param name="requestParams">请求参数对象</param>
/// <returns></returns>
/// <exception cref="ArgumentException"><paramref name="url"/>为null或空字符串</exception>
public async Task<DataResult<T>> PostAsync<T>(string url, object? requestParams = null)

@ -70,6 +70,7 @@ namespace DS.WMS.Core.Invoice.Method
goodsCode = "", //商品和服务税收分类合并编码
invoiceLineProperty = "00"
}).ToList()
}).ToList();
var result = await api.PostAsync<InvoiceIssuanceResult<string>>("/api/Invoice/services", request);

Loading…
Cancel
Save