|
|
|
@ -514,6 +514,14 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override Task PreSaveAsync(InvoiceApplication application)
|
|
|
|
|
{
|
|
|
|
|
application.ApplyAmount = application.Details.Sum(x => x.ApplyAmount);
|
|
|
|
|
application.AmountUppercase = new Money(application.ApplyAmount).ToString();
|
|
|
|
|
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override async Task OnSaveAsync(InvoiceApplication application, List<FeeRecord>? fees)
|
|
|
|
|
{
|
|
|
|
|
//先清空发票明细
|
|
|
|
@ -543,9 +551,6 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
|
{
|
|
|
|
|
foreach (var application in applications)
|
|
|
|
|
{
|
|
|
|
|
application.ApplyAmount = application.Details.Sum(x => x.ApplyAmount);
|
|
|
|
|
application.AmountUppercase = new Money(application.ApplyAmount).ToString();
|
|
|
|
|
|
|
|
|
|
if (application.Details.Count > 0 && (application.InvoiceDetails == null || application.InvoiceDetails.Count == 0))
|
|
|
|
|
{
|
|
|
|
|
var ids = application.Details.Select(x => x.RecordId).ToList();
|
|
|
|
|