Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Third.Finances.Seeyon.V4.5
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Third.Finances.Seeyon.V4.5
Commits
284f70bd
Commit
284f70bd
authored
Oct 18, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
8660e762
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
8 deletions
+35
-8
ApplyExtension.cs
Src/ApplyExtension.cs
+27
-0
BillApply.cs
Src/Entities/BillApply.cs
+8
-8
No files found.
Src/ApplyExtension.cs
View file @
284f70bd
...
...
@@ -2,6 +2,7 @@
using
Kivii.Finances.Entities
;
using
Kivii.Finances.Seeyon.Entities
;
using
Kivii.Seeyon.Entities
;
using
Kivii.Text
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -32,6 +33,32 @@ namespace Kivii.Finances.Seeyon.Extensions
}
}
public
static
Form_InvoiceApply
ConvertToForm
(
this
List
<
InvoiceApply
>
applys
)
{
var
apply
=
applys
[
0
];
var
bizKvids
=
applys
.
ConvertAll
(
o
=>
o
.
Kvid
);
var
strBizKvids
=
JsonSerializer
.
SerializeToString
(
bizKvids
);
var
amount
=
applys
.
Sum
(
o
=>
o
.
Amount
);
var
rtns
=
new
Form_InvoiceApply
();
//var settlementType = "code|MonthlySettlement";//默认月结
rtns
.
业务类型
=
typeof
(
BillApply
).
FullName
;
rtns
.
业务编号
=
strBizKvids
;
rtns
.
单据编号
=
apply
.
SerialNumber
;
rtns
.
日期
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
rtns
.
所属部门
=
KiviiContext
.
CurrentMember
.
DepartmentName
;
rtns
.
经办人
=
apply
.
OperatorName
;
rtns
.
付款单位名称
=
apply
.
PayerName
;
rtns
.
纳税人识别号
=
apply
.
PayerTaxNumber
;
rtns
.
地址电话
=
$"
{
apply
.
PayerCompanyAddress
}{
apply
.
PayerPhone
}
"
;
rtns
.
开户行及账号
=
$"
{
apply
.
PayerRegisteredBank
}{
apply
.
PayerBankAccount
}
"
;
rtns
.
发票类型
=
apply
.
Type
==
"增值税专用发票"
?
"-4189929216282050282"
:
"4529935671729733794"
;
rtns
.
申请原因
=
apply
.
Remark
;
rtns
.
数量
=
"1"
;
rtns
.
金额
=
amount
.
ToString
();
return
rtns
;
}
public
static
Form_InvoiceApply
ConvertToForm
(
this
InvoiceApply
apply
)
{
var
rtns
=
new
Form_InvoiceApply
();
...
...
Src/Entities/BillApply.cs
View file @
284f70bd
...
...
@@ -181,16 +181,16 @@ namespace Kivii.Finances.Seeyon.Entities
var
groupPayer
=
applys
.
GroupBy
(
a
=>
a
.
PayerName
);
if
(
groupPayer
.
Count
()
!=
1
)
throw
new
Exception
(
"不允许多个借票抬头同时申请!"
);
var
applySum
=
new
InvoiceApply
();
applySum
.
PopulateWith
(
applys
[
0
]);
applySum
.
Amount
=
applys
.
Sum
(
a
=>
a
.
Amount
);
applySum
.
Remark
=
applys
[
0
].
Remark
;
//
var applySum = new InvoiceApply();
//
applySum.PopulateWith(applys[0]);
//
applySum.Amount = applys.Sum(a => a.Amount);
//
applySum.Remark = applys[0].Remark;
var
applyForm
=
apply
Sum
.
ConvertToForm
();
var
applyForm
=
apply
s
.
ConvertToForm
();
var
bizKvids
=
applys
.
ConvertAll
(
o
=>
o
.
Kvid
);
var
strBizKvids
=
JsonSerializer
.
SerializeToString
(
bizKvids
);
applyForm
.
业务编号
=
strBizKvids
;
//
var bizKvids = applys.ConvertAll(o => o.Kvid);
//
var strBizKvids = JsonSerializer.SerializeToString(bizKvids);
//
applyForm.业务编号 = strBizKvids;
var
session
=
KiviiContext
.
Request
.
GetSession
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment