update test
This commit is contained in:
@@ -19,7 +19,7 @@ def pos_organizations_sharing_information(
|
||||
pos sharing organizations' information,
|
||||
device have multiple organizations (sub_accounts) for sharing money
|
||||
"""
|
||||
stake_holders = device.stake_holders.select_related('broker', 'organization').filter(default=False)
|
||||
stake_holders = device.stake_holders.select_related('broker', 'organization').filter()
|
||||
|
||||
sharing_information_list = []
|
||||
for item in stake_holders:
|
||||
@@ -42,7 +42,7 @@ def pos_organizations_sharing_information(
|
||||
# # item.holders_share_amount.filter(quota_distribution=distribution).first().share_amount
|
||||
# # if item.holders_share_amount.filter(quota_distribution=distribution).exists() else None
|
||||
# """
|
||||
|
||||
"agency": False,
|
||||
"default_account": item.default
|
||||
})
|
||||
|
||||
@@ -54,18 +54,14 @@ def pos_organizations_sharing_information(
|
||||
quota_distribution=distribution
|
||||
)
|
||||
sharing_information_list.append({
|
||||
"organization_name": owner_org.parent_organization.name,
|
||||
"organization_name": owner_org.name,
|
||||
"bank_account": {
|
||||
"credit_card": owner_org.parent_organization.bank_information.first().card,
|
||||
"sheba": owner_org.parent_organization.bank_information.first().sheba,
|
||||
"account": owner_org.parent_organization.bank_information.first().account,
|
||||
} if owner_org.parent_organization.bank_information.exists() else {},
|
||||
# "amount": quota.pricing_items.get(name='base_price').value if quota.pricing_items.filter(
|
||||
# name='base_price'
|
||||
# ) else None,
|
||||
# "agency_amount": agc_share_amount.first().share_amount if agc_share_amount else None,
|
||||
"amount": 5000,
|
||||
"agency_amount": 2000,
|
||||
"credit_card": owner_org.bank_information.first().card,
|
||||
"sheba": owner_org.bank_information.first().sheba,
|
||||
"account": owner_org.bank_information.first().account,
|
||||
} if owner_org.bank_information.exists() else {},
|
||||
"amount": agc_share_amount.first().share_amount if agc_share_amount else None,
|
||||
"agency": True,
|
||||
"default_account": True
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user