fix base prices in rancher distribution - product.services
This commit is contained in:
@@ -75,7 +75,6 @@ def pos_organizations_sharing_information(
|
|||||||
"default_account": item.default
|
"default_account": item.default
|
||||||
})
|
})
|
||||||
|
|
||||||
print(sharing_information_list)
|
|
||||||
# if device owner is an agency organization
|
# if device owner is an agency organization
|
||||||
if owner_org.type.key == 'AGC':
|
if owner_org.type.key == 'AGC':
|
||||||
sharing_information_list = agency_organization_pos_info(
|
sharing_information_list = agency_organization_pos_info(
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
|
import typing
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
|
from apps.herd.models import Rancher
|
||||||
from apps.product.models import (
|
from apps.product.models import (
|
||||||
Quota,
|
Quota,
|
||||||
QuotaLivestockAllocation,
|
QuotaPriceCalculationItems
|
||||||
QuotaPriceCalculationItems,
|
|
||||||
QuotaFinalPriceTypes
|
|
||||||
)
|
)
|
||||||
from apps.warehouse.models import InventoryEntry
|
from apps.warehouse.models import InventoryEntry
|
||||||
from apps.herd.models import Rancher
|
|
||||||
from django.db.models import Sum
|
|
||||||
import typing
|
|
||||||
|
|
||||||
|
|
||||||
def get_products_in_warehouse(organization_id):
|
def get_products_in_warehouse(organization_id):
|
||||||
@@ -139,8 +136,8 @@ def quota_pricing_items_by_type(quota: Quota, sharing: list) -> typing.Any:
|
|||||||
'id': en_name,
|
'id': en_name,
|
||||||
'items': group_items,
|
'items': group_items,
|
||||||
"name": fa_name,
|
"name": fa_name,
|
||||||
"price": total_price,
|
"price": total_price - calculate_sharing_total_price,
|
||||||
"total_price": total_price + calculate_sharing_total_price
|
"total_price": total_price
|
||||||
})
|
})
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user