fix: include price multiplier quantity in VK description postfix
"цена за 10 г." instead of "цена за г." when multiplier is set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,7 +154,11 @@ def _sync_product(
|
||||
multiplier = float(sync_config.price_multiplier) if sync_config and sync_config.price_multiplier else 1.0
|
||||
price_rubles = _calc_price(product.price) * multiplier
|
||||
measure = (product.measure_name or "").strip()
|
||||
desc = f"{product.name} (цена за {measure}.)" if measure else product.name
|
||||
if measure:
|
||||
qty = int(multiplier) if multiplier == int(multiplier) else multiplier
|
||||
desc = f"{product.name} (цена за {qty} {measure}.)"
|
||||
else:
|
||||
desc = product.name
|
||||
stock = settings.VK_STOCK_AMOUNT if product.allow_to_sell else 0
|
||||
owner_id = f"-{vk_group_id}"
|
||||
now = _now()
|
||||
|
||||
Reference in New Issue
Block a user