Commit c16efab4 authored by 李宗熹's avatar 李宗熹

修改对账单空数据格式

parent f702cdd6
...@@ -103,6 +103,10 @@ def num2chinese(number): ...@@ -103,6 +103,10 @@ def num2chinese(number):
return num2chinese_dict.get(number) return num2chinese_dict.get(number)
# def get_ifa_name(user):
class Statement(object): class Statement(object):
def __init__(self, user_id, year, month): def __init__(self, user_id, year, month):
self.user_id = user_id self.user_id = user_id
...@@ -165,16 +169,16 @@ class Statement(object): ...@@ -165,16 +169,16 @@ class Statement(object):
'total_amount': Decimal(round(float(total_amount) / 10000.0, 2)), 'total_amount': Decimal(round(float(total_amount) / 10000.0, 2)),
'detail': detail}) 'detail': detail})
if len(ifa_cus_order_info) == 0: # if len(ifa_cus_order_info) == 0:
trade_record_data = [{'customer': '', # trade_record_data = [{'customer': '',
'total_amount': '', # 'total_amount': '',
'detail': [{'fund': '', # 'detail': [{'fund': '',
'pay_date': '', # 'pay_date': '',
'confirm_share_date': '', # 'confirm_share_date': '',
'confirm_amount': '', # 'confirm_amount': '',
'nav': '', # 'nav': '',
'confirm_share': '', # 'confirm_share': '',
'note': ''}]}] # 'note': ''}]}]
return trade_record_data return trade_record_data
def month_remain(self): def month_remain(self):
...@@ -257,15 +261,15 @@ class Statement(object): ...@@ -257,15 +261,15 @@ class Statement(object):
subscription_data['total_after_tax'] = total_after_tax subscription_data['total_after_tax'] = total_after_tax
subscription_data['customer_detail'] = customer_detail subscription_data['customer_detail'] = customer_detail
if len(ifa_cus_order_monthly) == 0: # if len(ifa_cus_order_monthly) == 0:
subscription_data['customer_detail'] = [{'customer': '', # subscription_data['customer_detail'] = [{'customer': '',
'before_tax': '', # 'before_tax': '',
'after_tax': '', # 'after_tax': '',
'detail': [{'fund': '', # 'detail': [{'fund': '',
'confirm_amount': '', # 'confirm_amount': '',
'pay_date': '', # 'pay_date': '',
'subscription_fee': '', # 'subscription_fee': '',
'tax': ''}]}] # 'tax': ''}]}]
return subscription_data return subscription_data
def manage_fee(self): def manage_fee(self):
...@@ -289,8 +293,8 @@ class Statement(object): ...@@ -289,8 +293,8 @@ class Statement(object):
detail.append({ detail.append({
'hold_share': customer_fund_df['retention_shares'].values[i], 'hold_share': customer_fund_df['retention_shares'].values[i],
'date': customer_fund_df['predict_date'].values[i].strftime('%Y-%m-%d'), 'date': customer_fund_df['predict_date'].values[i].strftime('%Y-%m-%d'),
'manage_fee': customer_fund_df['manage_fee'].values[i], 'manage_fee': customer_fund_df['manage_predict_fee'].values[i],
'tax': customer_fund_df['manage_fee'].values[i] * tax_rate 'tax': customer_fund_df['manage_predict_fee'].values[i] * tax_rate
}) })
before_tax += customer_fund_df['manage_fee'].values[i] before_tax += customer_fund_df['manage_fee'].values[i]
...@@ -309,21 +313,23 @@ class Statement(object): ...@@ -309,21 +313,23 @@ class Statement(object):
manage_data['total_after_tax'] = total_after_tax manage_data['total_after_tax'] = total_after_tax
manage_data['customer_detail'] = customer_detail manage_data['customer_detail'] = customer_detail
if len(processed_provision) == 0: # if len(processed_provision) == 0:
manage_data['customer_detail'] = [{'customer': '', # manage_data['customer_detail'] = [{'customer': '',
'before_tax': '', # 'before_tax': '',
'after_tax': '', # 'after_tax': '',
'detail': [{'fund': '', # 'detail': [{'fund': '',
'confirm_amount': '', # 'confirm_amount': '',
'pay_date': '', # 'pay_date': '',
'manage_fee': '', # 'manage_fee': '',
'tax': ''}]}] # 'tax': ''}]}]
return manage_data return manage_data
def bill_month(self): def bill_month(self):
return str(self.year) + '年' + str(self.month) + '月' return str(self.year) + '年' + str(self.month) + '月'
def user_name(self): def user_name(self):
# user_name = get_ifa_name(user)
return "王菲女士" return "王菲女士"
def summary(self): def summary(self):
......
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