change incentive plans total weight quota with rancher incentive plan - change id to rancher plan and add incentive plan id
This commit is contained in:
@@ -143,12 +143,12 @@ class InventoryQuotaSaleTransactionSerializer(serializers.ModelSerializer):
|
||||
# get product by type
|
||||
gov_product = item_data.pop('gov_product') if 'gov_product' in item_data.keys() else None
|
||||
free_product = item_data.pop('free_product') if 'free_product' in item_data.keys() else None
|
||||
distribution = QuotaDistribution.objects.get(id=item_data.pop('quota_distribution'))
|
||||
|
||||
# create item for transaction
|
||||
item = warehouse_models.InventoryQuotaSaleItem.objects.create(
|
||||
transaction=transaction,
|
||||
quota_distribution=QuotaDistribution.objects.get(
|
||||
id=item_data.pop('quota_distribution')
|
||||
),
|
||||
quota_distribution=distribution,
|
||||
gov_product=Product.objects.get(
|
||||
id=gov_product
|
||||
) if Product.objects.filter(id=gov_product).exists() else None,
|
||||
|
||||
Reference in New Issue
Block a user