Tighten Recent Orders table layout and labels UI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -55,6 +55,10 @@ class Order(models.Model):
|
||||
def custom_count(self):
|
||||
return sum(int(line['count']) for line in (self.custom_labels or []))
|
||||
|
||||
@property
|
||||
def box_weight(self):
|
||||
return self.canister_weight * self.canisters_per_box
|
||||
|
||||
def apply_weight(self):
|
||||
"""Derive canister/box counts from total_weight (create path)."""
|
||||
self.canister_count = math.ceil(self.total_weight / self.canister_weight)
|
||||
|
||||
Reference in New Issue
Block a user