Commit 4081df0d by 陶然

优化账单申请OA,新增发票回写接口

parent d2c15100
...@@ -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.10180")] [assembly: AssemblyVersion("5.4.2023.11230")]
[assembly: AssemblyFileVersion("5.4.2023.10180")] [assembly: AssemblyFileVersion("5.4.2023.11230")]
...@@ -17,6 +17,8 @@ namespace Kivii.Finances.Transforms ...@@ -17,6 +17,8 @@ namespace Kivii.Finances.Transforms
public List<Bill> Items { get; set; } public List<Bill> Items { get; set; }
public InvoiceApplyType ApplyType { get; set; }
/// <summary> /// <summary>
/// 账单合并申请 /// 账单合并申请
/// </summary> /// </summary>
...@@ -27,7 +29,8 @@ namespace Kivii.Finances.Transforms ...@@ -27,7 +29,8 @@ namespace Kivii.Finances.Transforms
(Item == null && Items.IsNullOrEmpty()).ThrowIfTrue("请传入要申请的账单信息!"); (Item == null && Items.IsNullOrEmpty()).ThrowIfTrue("请传入要申请的账单信息!");
if (Items.IsNullOrEmpty()) Items = new List<Bill>(); if (Items.IsNullOrEmpty()) Items = new List<Bill>();
if (Item != null) Items.Add(Item); if (Item != null) Items.Add(Item);
var applyType = InvoiceApplyType.Debit;
if (ApplyType == InvoiceApplyType.Payment) applyType = ApplyType;
var rtns = new RestfulCreateResponse<InvoiceApply>(); var rtns = new RestfulCreateResponse<InvoiceApply>();
rtns.Results = new List<InvoiceApply>(); rtns.Results = new List<InvoiceApply>();
if (Merge) if (Merge)
...@@ -43,7 +46,7 @@ namespace Kivii.Finances.Transforms ...@@ -43,7 +46,7 @@ namespace Kivii.Finances.Transforms
apply.Amount = Items.Sum(o => o.Amount); apply.Amount = Items.Sum(o => o.Amount);
apply.PayerName = Items[0].PayerName; apply.PayerName = Items[0].PayerName;
apply.PayeeName = Items[0].PayeeName; apply.PayeeName = Items[0].PayeeName;
apply.OperateType = InvoiceApplyType.Debit; apply.OperateType = applyType;
apply.Details = new List<InvoiceApplyDetail>(); apply.Details = new List<InvoiceApplyDetail>();
var detail = new InvoiceApplyDetail(); var detail = new InvoiceApplyDetail();
...@@ -75,7 +78,7 @@ namespace Kivii.Finances.Transforms ...@@ -75,7 +78,7 @@ namespace Kivii.Finances.Transforms
apply.Amount = item.Amount; apply.Amount = item.Amount;
apply.PayerName = item.PayerName; apply.PayerName = item.PayerName;
apply.PayeeName = item.PayeeName; apply.PayeeName = item.PayeeName;
apply.OperateType = InvoiceApplyType.Debit; apply.OperateType = applyType;
apply.Details = new List<InvoiceApplyDetail>(); apply.Details = new List<InvoiceApplyDetail>();
var detail = new InvoiceApplyDetail(); var detail = new InvoiceApplyDetail();
......
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