feat: sell_from_stock for marketplaces

This commit is contained in:
2025-12-15 15:26:04 +04:00
parent d0698aeb97
commit 86a376ceb2
2 changed files with 5 additions and 2 deletions

View File

@@ -357,7 +357,9 @@ async def get_stocks_data(
full_stock = warehouse_stock
if (not sell_mixes) and is_mix:
full_stock = warehouse_stock
full_stock = max([0, full_stock])
full_stock = max(0, full_stock)
if full_stock < marketplace.sell_from_stock:
full_stock = 0
base_dict['full_stock'] = full_stock
response.append(base_dict)
return response