change inventory entries pos list pricing base price
This commit is contained in:
@@ -11,9 +11,9 @@ def pos_organizations_sharing_information(device: Device) -> typing.Any:
|
||||
|
||||
sharing_information_list = [{
|
||||
"organization_name": item.organization.name,
|
||||
"credit_card": item.organization.bank_information.first().card if item.organization.bank_information.exists() else "",
|
||||
"sheba": item.organization.bank_information.first().sheba,
|
||||
"account": item.organization.bank_information.first().account,
|
||||
# "credit_card": item.organization.bank_information.first().card if item.organization.bank_information.exists() else "",
|
||||
# "sheba": item.organization.bank_information.first().sheba,
|
||||
# "account": item.organization.bank_information.first().account,
|
||||
"broker": item.broker.name if item.broker else None,
|
||||
"amount": item.broker_amount.value if item.broker else None
|
||||
} for item in stake_holders]
|
||||
|
||||
@@ -63,8 +63,18 @@ class InventoryEntrySerializer(serializers.ModelSerializer):
|
||||
representation['pricing'] = {
|
||||
'pricing_attributes': quota_attribute_value(instance.distribution.quota),
|
||||
'sharing': pos_organizations_sharing_information(self.context['device']),
|
||||
'base_price_factory': instance.distribution.quota.base_price_factory,
|
||||
'base_price_cooperative': instance.distribution.quota.base_price_cooperative,
|
||||
'base_prices': [
|
||||
{
|
||||
"text": "قیمت درب کارخانه", # noqa
|
||||
"name": "base_price_factory",
|
||||
"value": instance.distribution.quota.base_price_factory
|
||||
},
|
||||
{
|
||||
"text": "قیمت درب اتحادیه", # noqa
|
||||
"name": "base_price_cooperative",
|
||||
"value": instance.distribution.quota.base_price_cooperative
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
if 'rancher' in self.context.keys():
|
||||
|
||||
Reference in New Issue
Block a user