import changes in notification

This commit is contained in:
2025-10-08 11:13:01 +03:30
parent cad4ccbe4b
commit f1a209a166
9 changed files with 104 additions and 25 deletions

View File

@@ -47,20 +47,26 @@ def pos_organizations_sharing_information(
})
# if device owner is an agency organization
if owner_org.type.name == 'AGC':
sharing_information_list.append({
"organization_name": owner_org.parent_organization.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'
) if quota.pricing_items.filter(
name='base_price'
) else None,
"default_account": True
})
# if owner_org.type.name == 'AGC':
agc_share_amount = owner_org.pos_stake_holders.filter(
device=device,
).first().holders_share_amount.filter(
quota_distribution=distribution
)
sharing_information_list.append({
"organization_name": owner_org.parent_organization.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,
"default_account": True
})
return sharing_information_list