Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Biz.Finances.V2.0
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.Biz.Finances.V2.0
Commits
772eb7bc
Commit
772eb7bc
authored
Jun 07, 2022
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
be611350
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
Kivii.Biz.Finances.V2.0.csproj
Src/Kivii.Biz.Finances.V2.0.csproj
+0
-0
RestfulInvoice.cs
Src/Transforms/RestfulInvoice.cs
+1
-0
RestfulInvoiceApply.Apply.cs
Src/Transforms/RestfulInvoiceApply.Apply.cs
+3
-1
No files found.
Src/Kivii.Biz.Finances.V2.0.csproj
View file @
772eb7bc
This diff is collapsed.
Click to expand it.
Src/Transforms/RestfulInvoice.cs
View file @
772eb7bc
...
...
@@ -288,6 +288,7 @@ namespace Kivii.Finances.Transforms
invoice
.
PayerBankAccount
=
info
.
PayerBankAccount
;
invoice
.
OperatorName
=
info
.
OperatorName
;
invoice
.
Remark
=
info
.
Remark
;
invoice
.
Summary
=
"手动录入发票!"
;
invoice
.
Metadata
=
new
Dictionary
<
string
,
string
>();
if
(!
info
.
Metadata
.
IsNullOrEmpty
())
...
...
Src/Transforms/RestfulInvoiceApply.Apply.cs
View file @
772eb7bc
...
...
@@ -299,7 +299,7 @@ namespace Kivii.Finances.Transforms
if
(
applys
.
Sum
(
o
=>
o
.
Amount
)
!=
existDetails
.
Sum
(
p
=>
p
.
Amount
))
throw
new
Exception
(
"总金额和明细总额不一致!"
);
var
applyRelations
=
conn
.
Select
<
InvoiceApply
>(
o
=>
Sql
.
In
(
o
.
ParentKvid
,
applys
.
ConvertAll
(
p
=>
p
.
Kvid
))
&&
o
.
OperateType
==
InvoiceApplyType
.
Related
&&
o
.
OffsetKvid
==
Guid
.
Empty
);
var
payments
=
conn
.
Select
<
Payment
>(
o
=>
Sql
.
In
(
o
.
Kvid
,
applyRelations
.
ConvertAll
(
p
=>
p
.
BizKvid
)));
//Type:Split,Pos,Cash,WeChat...
(
conn
.
Exists
<
Invoice
>(
o
=>
o
.
OffsetKvid
!
=
Guid
.
Empty
&&
Sql
.
In
(
o
.
BizKvid
,
payments
.
ConvertAll
(
p
=>
p
.
RootKvid
)))).
ThrowIfTrue
(
"已有开票的到账,无法重复开票,请驳回!"
);
(
conn
.
Exists
<
Invoice
>(
o
=>
o
.
OffsetKvid
=
=
Guid
.
Empty
&&
Sql
.
In
(
o
.
BizKvid
,
payments
.
ConvertAll
(
p
=>
p
.
RootKvid
)))).
ThrowIfTrue
(
"已有开票的到账,无法重复开票,请驳回!"
);
var
rtns
=
new
RestfulExecutionResponse
<
InvoiceApply
>();
rtns
.
Results
=
new
List
<
InvoiceApply
>();
...
...
@@ -636,6 +636,7 @@ namespace Kivii.Finances.Transforms
invoice
.
PayerBankAccount
=
apply
.
PayerBankAccount
;
invoice
.
OperatorName
=
apply
.
OperatorName
;
invoice
.
Remark
=
apply
.
Remark
;
invoice
.
Summary
=
"系统中开具发票!"
;
invoice
.
Metadata
=
new
Dictionary
<
string
,
string
>();
invoice
.
Metadata
[
"PayeeOperatorName"
]
=
apply
.
Metadata
.
ContainsKey
(
"PayeeOperatorName"
)
?
apply
.
Metadata
[
"PayeeOperatorName"
]
:
""
;
...
...
@@ -879,6 +880,7 @@ namespace Kivii.Finances.Transforms
invoice
.
PayerBankAccount
=
apply
.
PayerBankAccount
;
invoice
.
OperatorName
=
apply
.
OperatorName
;
invoice
.
Remark
=
apply
.
Remark
;
invoice
.
Summary
=
"系统中开具发票!"
;
invoice
.
Metadata
=
new
Dictionary
<
string
,
string
>();
invoice
.
Metadata
[
"PayeeOperatorName"
]
=
apply
.
Metadata
.
ContainsKey
(
"PayeeOperatorName"
)
?
apply
.
Metadata
[
"PayeeOperatorName"
]
:
""
;
...
...
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