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
b4af6c5d
Commit
b4af6c5d
authored
Jun 29, 2022
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化插入发票验证重复发票的问题
parent
eb33f05b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
Kivii.Biz.Finances.V2.0.csproj
Src/Kivii.Biz.Finances.V2.0.csproj
+4
-4
RestfulInvoice.cs
Src/Transforms/RestfulInvoice.cs
+6
-2
packages.config
Src/packages.config
+3
-2
No files found.
Src/Kivii.Biz.Finances.V2.0.csproj
View file @
b4af6c5d
...
...
@@ -31,11 +31,11 @@
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"Kivii.Common.V4.5, Version=5.6.2022.
500
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
packages\Kivii.Common.5.6.2022.5001
\lib\net45\Kivii.Common.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Common.V4.5, Version=5.6.2022.
622
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
..\packages\Kivii.Common.5.6.2022.6220
\lib\net45\Kivii.Common.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Core.V4.5, Version=5.6.2022.
500
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
packages\Kivii.Core.5.6.2022.500
0\lib\net45\Kivii.Core.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Core.V4.5, Version=5.6.2022.
622
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
..\packages\Kivii.Core.5.6.2022.622
0\lib\net45\Kivii.Core.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Linq.V4.5, Version=5.6.2022.5020, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Linq.5.6.2022.5020\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
...
...
Src/Transforms/RestfulInvoice.cs
View file @
b4af6c5d
...
...
@@ -246,8 +246,12 @@ namespace Kivii.Finances.Transforms
var
category
=
preCorrelatingPayments
.
IsNullOrEmpty
()
?
InvoiceApplyType
.
Debit
:
InvoiceApplyType
.
Payment
;
foreach
(
var
info
in
Items
)
{
//重复的发票
(!
exists
.
IsNullOrEmpty
()
&&
exists
.
Exists
(
o
=>
o
.
SerialNumber
==
info
.
SerialNumber
)).
ThrowIfTrue
(
$"存在重复录入的发票信息:
{
info
.
SerialNumber
}
"
);
//重复的发票,如果传了对应到账,那重复的发票就要抛异常,否则跳过
if
(!
exists
.
IsNullOrEmpty
()
&&
exists
.
Exists
(
o
=>
o
.
SerialNumber
==
info
.
SerialNumber
))
{
if
(!
Payments
.
IsNullOrEmpty
())
throw
new
Exception
(
$"存在重复录入的发票信息:
{
info
.
SerialNumber
}
"
);
else
continue
;
}
#
region
开票成功的情况处理
var
invoiceKvid
=
Guid
.
NewGuid
();
var
invoice
=
new
Invoice
();
...
...
Src/packages.config
View file @
b4af6c5d
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2022.
5001
"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.2022.
500
0"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2022.
6220
"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.2022.
622
0"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.2022.5020"
targetFramework
=
"net45"
/>
</
packages
>
\ No newline at end of file
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