fix - agency pos sharing bugs

This commit is contained in:
2025-12-20 16:53:47 +03:30
parent 7918cc04b3
commit 4096dbbd6e
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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 = [{