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
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ def quota_live_stock_allocation_info(quota: Quota) -> typing.Any:
|
||||
""" information of quota live stock allocations """
|
||||
|
||||
allocations = quota.livestock_allocations.select_related('livestock_type')
|
||||
print(allocations)
|
||||
|
||||
if allocations:
|
||||
allocations_list = [{
|
||||
|
||||
Reference in New Issue
Block a user