Commit 9decdf22 by 陶然

调整核算日期赋值算法

parent 680e0dbf
...@@ -101,19 +101,23 @@ namespace Kivii.Finances ...@@ -101,19 +101,23 @@ namespace Kivii.Finances
} }
if (payment.InvoiceTime != null) if (payment.InvoiceTime != null)
{ {
if (payment.AuditTime == null) if (payment.InvoiceTime.Value > payment.OperateTime) payment.AuditTime = payment.InvoiceTime;
{ else payment.AuditTime = payment.OperateTime;
payment.AuditTime = payment.InvoiceTime; payment.AddOnlyProperties(o => o.AuditTime);
payment.AddOnlyProperties(o => o.AuditTime);
} //if (payment.AuditTime == null)
else //{
{ // payment.AuditTime = payment.InvoiceTime;
if (payment.AuditTime.Value < payment.InvoiceTime.Value) // payment.AddOnlyProperties(o => o.AuditTime);
{ //}
payment.AuditTime = payment.InvoiceTime; //else
payment.AddOnlyProperties(o => o.AuditTime); //{
} // if (payment.AuditTime.Value < payment.InvoiceTime.Value)
} // {
// payment.AuditTime = payment.InvoiceTime;
// payment.AddOnlyProperties(o => o.AuditTime);
// }
//}
} }
payment.AddOnlyProperties(o => o.AmountInvoice); payment.AddOnlyProperties(o => o.AmountInvoice);
} }
......
...@@ -339,19 +339,26 @@ namespace Kivii.Finances ...@@ -339,19 +339,26 @@ namespace Kivii.Finances
{ {
payment.InvoiceTime = invoiceTime; payment.InvoiceTime = invoiceTime;
payment.AddOnlyProperties(o => o.InvoiceTime); payment.AddOnlyProperties(o => o.InvoiceTime);
if (payment.AuditTime == null) if (payment.InvoiceTime != null)
{ {
payment.AuditTime = invoiceTime; if (payment.InvoiceTime.Value > payment.OperateTime) payment.AuditTime = payment.InvoiceTime;
else payment.AuditTime = payment.OperateTime;
payment.AddOnlyProperties(o => o.AuditTime); payment.AddOnlyProperties(o => o.AuditTime);
} }
else //if (payment.AuditTime == null)
{ //{
if (payment.AuditTime.Value < invoiceTime.Value) // payment.AuditTime = invoiceTime;
{ // payment.AddOnlyProperties(o => o.AuditTime);
payment.AuditTime = invoiceTime; //}
payment.AddOnlyProperties(o => o.AuditTime); //else
} //{
}
// if (payment.AuditTime.Value < invoiceTime.Value)
// {
// payment.AuditTime = invoiceTime;
// payment.AddOnlyProperties(o => o.AuditTime);
// }
//}
} }
conn.UpdateOnly(payment); conn.UpdateOnly(payment);
if (parentPayment != null) parentPayment.RecalculateAmountInvoice(conn); if (parentPayment != null) parentPayment.RecalculateAmountInvoice(conn);
...@@ -716,7 +723,7 @@ namespace Kivii.Finances ...@@ -716,7 +723,7 @@ namespace Kivii.Finances
splitPayment.Category = category; splitPayment.Category = category;
//金额设置 //金额设置
splitPayment.AuditorName = splitPayment.OperateTime.Year.ToString(); splitPayment.AuditorName = splitPayment.OperateTime.Year.ToString();
splitPayment.AuditTime = payment.OperateTime;
splitPayment.Amount = amountSplit; splitPayment.Amount = amountSplit;
splitPayment.AmountSplited = 0; splitPayment.AmountSplited = 0;
splitPayment.AmountUsed = 0; splitPayment.AmountUsed = 0;
...@@ -728,6 +735,12 @@ namespace Kivii.Finances ...@@ -728,6 +735,12 @@ namespace Kivii.Finances
//splitPayment.Summary = string.Empty; //splitPayment.Summary = string.Empty;
if (!remark.IsNullOrEmpty()) splitPayment.Remark += $"[认领备注: {remark}]"; if (!remark.IsNullOrEmpty()) splitPayment.Remark += $"[认领备注: {remark}]";
splitPayment.OperateTime = payment.OperateTime; splitPayment.OperateTime = payment.OperateTime;
if (splitPayment.InvoiceTime != null)
{
if (splitPayment.InvoiceTime.Value > splitPayment.OperateTime) splitPayment.AuditTime = payment.InvoiceTime;
else splitPayment.AuditTime = payment.OperateTime;
}
if (operatorKvid != null && operatorKvid.Value != Guid.Empty) if (operatorKvid != null && operatorKvid.Value != Guid.Empty)
{ {
splitPayment.OperatorName = operatorName; splitPayment.OperatorName = operatorName;
......
...@@ -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.2024.1150")] [assembly: AssemblyVersion("5.4.2024.1250")]
[assembly: AssemblyFileVersion("5.4.2024.1150")] [assembly: AssemblyFileVersion("5.4.2024.1250")]
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