change sharing to main company sheba in pos free products
This commit is contained in:
@@ -31,11 +31,9 @@ class RegionFilterMixin:
|
|||||||
# filter by organization type region
|
# filter by organization type region
|
||||||
if org:
|
if org:
|
||||||
scope = organization.field_of_activity
|
scope = organization.field_of_activity
|
||||||
print(scope)
|
|
||||||
if scope == 'CI':
|
if scope == 'CI':
|
||||||
if hasattr(queryset.model, 'city'):
|
if hasattr(queryset.model, 'city'):
|
||||||
queryset = queryset.filter(city=organization.city)
|
queryset = queryset.filter(city=organization.city)
|
||||||
print(queryset)
|
|
||||||
elif hasattr(queryset.model, 'user'):
|
elif hasattr(queryset.model, 'user'):
|
||||||
queryset = queryset.filter(user__city=organization.city)
|
queryset = queryset.filter(user__city=organization.city)
|
||||||
|
|
||||||
|
|||||||
@@ -46,15 +46,7 @@ class POSFreeProductSerializer(serializers.ModelSerializer):
|
|||||||
national_unique_id='1111111111'
|
national_unique_id='1111111111'
|
||||||
)
|
)
|
||||||
main_company_bank_account = main_company.bank_information.first()
|
main_company_bank_account = main_company.bank_information.first()
|
||||||
representation['sharing'] = {
|
representation['company_sheba'] = main_company_bank_account.sheba
|
||||||
"organization_name": main_company.name,
|
|
||||||
"bank_account": {
|
|
||||||
"credit_card": main_company_bank_account.card,
|
|
||||||
"sheba": main_company_bank_account.sheba,
|
|
||||||
"account": main_company_bank_account.account
|
|
||||||
},
|
|
||||||
"amount": instance.company_fee
|
|
||||||
}
|
|
||||||
|
|
||||||
return representation
|
return representation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user