Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
c16efab4
Commit
c16efab4
authored
Feb 03, 2021
by
李宗熹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改对账单空数据格式
parent
f702cdd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
30 deletions
+36
-30
statement_service.py
app/service/statement_service.py
+36
-30
No files found.
app/service/statement_service.py
View file @
c16efab4
...
...
@@ -103,6 +103,10 @@ def num2chinese(number):
return
num2chinese_dict
.
get
(
number
)
# def get_ifa_name(user):
class
Statement
(
object
):
def
__init__
(
self
,
user_id
,
year
,
month
):
self
.
user_id
=
user_id
...
...
@@ -165,16 +169,16 @@ class Statement(object):
'total_amount'
:
Decimal
(
round
(
float
(
total_amount
)
/
10000.0
,
2
)),
'detail'
:
detail
})
if
len
(
ifa_cus_order_info
)
==
0
:
trade_record_data
=
[{
'customer'
:
''
,
'total_amount'
:
''
,
'detail'
:
[{
'fund'
:
''
,
'pay_date'
:
''
,
'confirm_share_date'
:
''
,
'confirm_amount'
:
''
,
'nav'
:
''
,
'confirm_share'
:
''
,
'note'
:
''
}]}]
#
if len(ifa_cus_order_info) == 0:
#
trade_record_data = [{'customer': '',
#
'total_amount': '',
#
'detail': [{'fund': '',
#
'pay_date': '',
#
'confirm_share_date': '',
#
'confirm_amount': '',
#
'nav': '',
#
'confirm_share': '',
#
'note': ''}]}]
return
trade_record_data
def
month_remain
(
self
):
...
...
@@ -257,15 +261,15 @@ class Statement(object):
subscription_data
[
'total_after_tax'
]
=
total_after_tax
subscription_data
[
'customer_detail'
]
=
customer_detail
if
len
(
ifa_cus_order_monthly
)
==
0
:
subscription_data
[
'customer_detail'
]
=
[{
'customer'
:
''
,
'before_tax'
:
''
,
'after_tax'
:
''
,
'detail'
:
[{
'fund'
:
''
,
'confirm_amount'
:
''
,
'pay_date'
:
''
,
'subscription_fee'
:
''
,
'tax'
:
''
}]}]
#
if len(ifa_cus_order_monthly) == 0:
#
subscription_data['customer_detail'] = [{'customer': '',
#
'before_tax': '',
#
'after_tax': '',
#
'detail': [{'fund': '',
#
'confirm_amount': '',
#
'pay_date': '',
#
'subscription_fee': '',
#
'tax': ''}]}]
return
subscription_data
def
manage_fee
(
self
):
...
...
@@ -289,8 +293,8 @@ class Statement(object):
detail
.
append
({
'hold_share'
:
customer_fund_df
[
'retention_shares'
]
.
values
[
i
],
'date'
:
customer_fund_df
[
'predict_date'
]
.
values
[
i
]
.
strftime
(
'
%
Y-
%
m-
%
d'
),
'manage_fee'
:
customer_fund_df
[
'manage_fee'
]
.
values
[
i
],
'tax'
:
customer_fund_df
[
'manage_fee'
]
.
values
[
i
]
*
tax_rate
'manage_fee'
:
customer_fund_df
[
'manage_
predict_
fee'
]
.
values
[
i
],
'tax'
:
customer_fund_df
[
'manage_
predict_
fee'
]
.
values
[
i
]
*
tax_rate
})
before_tax
+=
customer_fund_df
[
'manage_fee'
]
.
values
[
i
]
...
...
@@ -309,21 +313,23 @@ class Statement(object):
manage_data
[
'total_after_tax'
]
=
total_after_tax
manage_data
[
'customer_detail'
]
=
customer_detail
if
len
(
processed_provision
)
==
0
:
manage_data
[
'customer_detail'
]
=
[{
'customer'
:
''
,
'before_tax'
:
''
,
'after_tax'
:
''
,
'detail'
:
[{
'fund'
:
''
,
'confirm_amount'
:
''
,
'pay_date'
:
''
,
'manage_fee'
:
''
,
'tax'
:
''
}]}]
#
if len(processed_provision) == 0:
#
manage_data['customer_detail'] = [{'customer': '',
#
'before_tax': '',
#
'after_tax': '',
#
'detail': [{'fund': '',
#
'confirm_amount': '',
#
'pay_date': '',
#
'manage_fee': '',
#
'tax': ''}]}]
return
manage_data
def
bill_month
(
self
):
return
str
(
self
.
year
)
+
'年'
+
str
(
self
.
month
)
+
'月'
def
user_name
(
self
):
# user_name = get_ifa_name(user)
return
"王菲女士"
def
summary
(
self
):
...
...
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