change inventory entries pos list pricing base price
This commit is contained in:
@@ -96,9 +96,9 @@ INSTALLED_APPS = [
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'apps.core.middlewares.Json500Middleware',
|
||||
'corsheaders.middleware.CorsMiddleware', # noqa
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
@@ -106,7 +106,7 @@ MIDDLEWARE = [
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'apps.authentication.middlewares.BlockedTokenMiddleware',
|
||||
'crum.CurrentRequestUserMiddleware',
|
||||
'crum.CurrentRequestUserMiddleware', # noqa
|
||||
'apps.log.middlewares.SaveLog',
|
||||
'apps.pos_device.middlewares.PosDeviceValidationMiddleware'
|
||||
]
|
||||
|
||||
@@ -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