fix: oleg fix
This commit is contained in:
@@ -93,32 +93,31 @@ class BillingService(BaseService):
|
||||
service: DealProductService
|
||||
psq[product.product_id][service.service_id] += product.quantity
|
||||
products_dict[product.product_id] = product.product
|
||||
services_dict[service.service_id] = service.service
|
||||
services_dict[service.service_id] = service
|
||||
|
||||
for deal in deals:
|
||||
for service in deal.services:
|
||||
service: models.DealService
|
||||
services_dict[service.service_id] = service.service
|
||||
services_dict[service.service_id] = service
|
||||
sq[service.service_id] += service.quantity
|
||||
|
||||
for product_id, services_ids in psq.items():
|
||||
product: models.Product = products_dict[product_id]
|
||||
for service_id in services_ids:
|
||||
service = services_dict[service_id]
|
||||
service: models.Service
|
||||
quantity = psq[product_id][service_id]
|
||||
billing_request_values.append(
|
||||
CreateBillingRequestValue(
|
||||
name=f'[{product.name}] - {service.name}',
|
||||
name=f'[{product.name}] - {service.service.name}',
|
||||
price=service.price,
|
||||
amount=quantity
|
||||
)
|
||||
)
|
||||
for service_id, quantity in sq.items():
|
||||
service: models.Service = services_dict[service_id]
|
||||
service = services_dict[service_id]
|
||||
billing_request_values.append(
|
||||
CreateBillingRequestValue(
|
||||
name=f'{service.name}',
|
||||
name=f'{service.service.name}',
|
||||
price=service.price,
|
||||
amount=quantity
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user