fix - agency pos sharing bugs
This commit is contained in:
@@ -23,7 +23,7 @@ def pos_organizations_sharing_information(
|
||||
|
||||
sharing_information_list = []
|
||||
for item in stake_holders:
|
||||
if item.broker: # if stakeholder is not an agency, it is a broker
|
||||
if item.broker and not owner_org.type.key == 'AGC': # if stakeholder is not an agency, it is a broker
|
||||
sharing_information_list.append({
|
||||
"organization_name": item.organization.name,
|
||||
"bank_account": {
|
||||
@@ -50,6 +50,7 @@ def pos_organizations_sharing_information(
|
||||
agc_stake_holder = owner_org.pos_stake_holders.filter(
|
||||
holders_share_amount__org_quota_stat=quota_stat,
|
||||
).first()
|
||||
print(quota_stat.id)
|
||||
stake_holders = agc_stake_holder.device.stake_holders.select_related(
|
||||
'broker', 'organization'
|
||||
).filter()
|
||||
@@ -87,6 +88,7 @@ def pos_organizations_sharing_information(
|
||||
distribution=distribution,
|
||||
quota_stat=quota_stat
|
||||
)
|
||||
|
||||
if sharing_information_list_agency:
|
||||
return sharing_information_list_agency
|
||||
|
||||
|
||||
Reference in New Issue
Block a user