feat: add empty_weigh and full_weight fields for auto and mechanic rvalution models
This commit is contained in:
@@ -12,7 +12,7 @@ from weasyprint import HTML
|
||||
from core.apps.evaluation.models import AutoEvaluationModel
|
||||
from core.apps.evaluation.choices.auto import ObjectOwnerType
|
||||
from core.apps.documents.serializers.contract import ContractPDFRequestSerializer
|
||||
from core.apps.documents.services.cbu_rates import fetch_rates
|
||||
from core.services import CurrencyService
|
||||
|
||||
|
||||
UZ_MONTHS = {
|
||||
@@ -301,8 +301,8 @@ class ValuationReportPDFView(APIView):
|
||||
"tech_passport": tech_passport_value,
|
||||
"fuel_type": fuel_type_value,
|
||||
"engine_power": "",
|
||||
"full_weight": "",
|
||||
"empty_weight": "",
|
||||
"full_weight": auto.full_weight if auto.full_weight is not None else "",
|
||||
"empty_weight": auto.empty_weight if auto.empty_weight is not None else "",
|
||||
}
|
||||
|
||||
def _customer_context(self, user):
|
||||
@@ -365,7 +365,7 @@ class ValuationReportPDFView(APIView):
|
||||
}
|
||||
|
||||
def _rates_context(self, target_date):
|
||||
rates = fetch_rates(target_date)
|
||||
rates = CurrencyService.get_rates(target_date)
|
||||
return {
|
||||
"rur": rates.get("RUB", ""),
|
||||
"usd": rates.get("USD", ""),
|
||||
|
||||
Reference in New Issue
Block a user