Commit 2a7b2168 by 陶然

优化

parent c2938d31
...@@ -33,5 +33,5 @@ using System.Runtime.InteropServices; ...@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2023.9060")] [assembly: AssemblyVersion("5.4.2023.9150")]
[assembly: AssemblyFileVersion("5.4.2023.9060")] [assembly: AssemblyFileVersion("5.4.2023.9150")]
...@@ -302,13 +302,13 @@ namespace Kivii.Finances.Transforms ...@@ -302,13 +302,13 @@ namespace Kivii.Finances.Transforms
if (item.Amount - item.AmountInvoice < payment.Amount) throw new Exception($"所选到账{item.SerialNumber},不足以继续开票指定金额{payment.Amount}元,当前到账剩余开票金额为:{item.Amount - item.AmountInvoice}元"); if (item.Amount - item.AmountInvoice < payment.Amount) throw new Exception($"所选到账{item.SerialNumber},不足以继续开票指定金额{payment.Amount}元,当前到账剩余开票金额为:{item.Amount - item.AmountInvoice}元");
if (item.Amount - item.AmountInvoice >= payment.Amount)//说明选中的到账足以开票指定的金额 if (item.Amount - item.AmountInvoice >= payment.Amount)//说明选中的到账足以开票指定的金额
{ {
item.Amount = payment.Amount; //item.Amount = payment.Amount;
item.AmountInvoice = 0; //item.AmountInvoice = 0;
item.RemoveAllOnlyProperties(); item.RemoveAllOnlyProperties();
preCorrelatingPayments.Add(item); preCorrelatingPayments.Add(item);
} }
} }
(preCorrelatingPayments.Sum(o => o.Amount) != Items.Sum(o => o.Amount)).ThrowIfTrue("指定的到账开票金额和发票金额不一致!"); (preCorrelatingPayments.Sum(o => o.Amount - o.AmountInvoice) != Items.Sum(o => o.Amount)).ThrowIfTrue("指定的到账开票金额和发票金额不一致!");
} }
var category = preCorrelatingPayments.IsNullOrEmpty() ? InvoiceApplyType.Debit : InvoiceApplyType.Payment; var category = preCorrelatingPayments.IsNullOrEmpty() ? InvoiceApplyType.Debit : InvoiceApplyType.Payment;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment