Files
octopus/myproject/pos/templates/pos/components/edit_cart_item_modal.html
Andrey Smakotin 2bc70968c3 fix(pos): restrict quantity editing for showcase kits in cart edit modal
For showcase kits (showcase_kit type), the quantity field is now disabled
in the cart item edit modal since these are pre-assembled physical items
with reservations. Price editing remains available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 14:49:02 +03:00

67 lines
2.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% load static %}
<div class="modal fade" id="editCartItemModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
<i class="bi bi-pencil-square"></i> Редактирование товара
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<!-- Название товара -->
<div class="mb-3">
<label class="form-label text-muted small">Товар</label>
<div id="editModalProductName" class="fw-semibold"></div>
</div>
<!-- Базовая цена (оригинальная) -->
<div class="mb-3">
<label class="form-label text-muted small">Базовая цена</label>
<div class="d-flex align-items-center gap-2">
<span id="editModalBasePrice" class="text-muted">0.00 руб.</span>
<span id="editModalUnitBadge" class="badge bg-secondary" style="display: none;"></span>
</div>
</div>
<!-- Новая цена -->
<div class="mb-3">
<label for="editModalPrice" class="form-label fw-semibold">Цена за единицу</label>
<div class="input-group">
<input type="number" class="form-control" id="editModalPrice"
min="0" step="0.01" placeholder="0.00">
<span class="input-group-text">руб.</span>
</div>
<div id="editModalPriceWarning" class="text-warning small mt-1" style="display: none;">
<i class="bi bi-exclamation-triangle"></i> Цена изменена
</div>
</div>
<!-- Количество -->
<div class="mb-3">
<label for="editModalQuantity" class="form-label fw-semibold">Количество</label>
<input type="number" class="form-control" id="editModalQuantity"
min="0.001" step="0.001" value="1">
<div id="editModalQtyHint" class="text-muted small mt-1" style="display: none;">
<i class="bi bi-info-circle"></i> Количество нельзя изменить для витринного комплекта (собранный товар с резервами)
</div>
</div>
<!-- Итого -->
<div class="alert alert-info mb-0">
<div class="d-flex justify-content-between align-items-center">
<strong>Сумма:</strong>
<span class="fs-5" id="editModalTotal">0.00 руб.</span>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
<button type="button" class="btn btn-primary" id="confirmEditCartItem">
<i class="bi bi-check-lg"></i> Сохранить
</button>
</div>
</div>
</div>
</div>