change livestock quota allocations quantity to int - change rancher statistics from decimal to int
This commit is contained in:
@@ -55,15 +55,15 @@ def rancher_quota_weight(rancher, inventory_entry: InventoryEntry):
|
||||
|
||||
livestock_counts = get_rancher_statistics(rancher)
|
||||
|
||||
total_weight = Decimal(0)
|
||||
total_weight = 0
|
||||
details = {}
|
||||
|
||||
for alloc in allocations:
|
||||
animal_type = alloc.livestock_type.name
|
||||
per_head = Decimal(alloc.quantity_kg)
|
||||
per_head = alloc.quantity_kg
|
||||
count = livestock_counts.get(live_stock_meta.get(animal_type), 0)
|
||||
|
||||
weight = per_head * Decimal(count)
|
||||
weight = per_head * count
|
||||
details[animal_type] = weight
|
||||
total_weight += weight
|
||||
|
||||
|
||||
Reference in New Issue
Block a user