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
|
||||
if org:
|
||||
scope = organization.field_of_activity
|
||||
print(scope)
|
||||
if scope == 'CI':
|
||||
if hasattr(queryset.model, 'city'):
|
||||
queryset = queryset.filter(city=organization.city)
|
||||
print(queryset)
|
||||
elif hasattr(queryset.model, 'user'):
|
||||
queryset = queryset.filter(user__city=organization.city)
|
||||
|
||||
|
||||
@@ -46,15 +46,7 @@ class POSFreeProductSerializer(serializers.ModelSerializer):
|
||||
national_unique_id='1111111111'
|
||||
)
|
||||
main_company_bank_account = main_company.bank_information.first()
|
||||
representation['sharing'] = {
|
||||
"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
|
||||
}
|
||||
representation['company_sheba'] = main_company_bank_account.sheba
|
||||
|
||||
return representation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user