소스 검색

fix: restore missing base_fee and initializers in pricing service

unknown 2 달 전
부모
커밋
d61451bb47
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      backend/services/pricing.py

+ 4 - 0
backend/services/pricing.py

@@ -33,6 +33,10 @@ def calculate_estimated_price(material_id: int, file_sizes: List[int], file_quan
         discount_percent = min((total_qty - 1) * 0.05, 0.20)
         discount_multiplier = 1.0 - discount_percent
 
+    estimated_total = 0.0
+    file_costs = []
+    base_fee = 5.0 # Minimum setup fee per file
+
     for size, qty in zip(file_sizes, file_quantities):
         total_size_mb = size / (1024 * 1024)
         # Empirical conversion: ~8cm3 per 1MB of STL (binary)