feat(pos): add write-off functionality for showcase kits
Add support for writing off showcase kits by creating a write-off document with components, converting reservations, and updating statuses. - Add `write_off_from_showcase` static method to ShowcaseManager - Add API endpoint `/pos/api/product-kits/<int:kit_id>/write-off/` - Add write-off button to POS terminal UI - Implement confirmation dialog with detailed information - Add redirect to write-off document detail page after success The write-off process includes: 1. Creating a write-off document in draft state 2. Converting existing reservations to write-off document items 3. Marking the showcase item as dismantled 4. Setting the product kit status to discontinued (if not already) Breaking Changes: No
This commit is contained in:
@@ -330,6 +330,11 @@
|
||||
<i class="bi bi-scissors"></i> Разобрать букет
|
||||
</button>
|
||||
|
||||
<!-- Кнопка "Списать" (отображается только в режиме редактирования) -->
|
||||
<button type="button" class="btn btn-warning me-auto" id="writeOffKitBtn" style="display: none;">
|
||||
<i class="bi bi-file-earmark-x"></i> Списать букет
|
||||
</button>
|
||||
|
||||
<!-- Правая группа кнопок -->
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="button" class="btn btn-primary" id="confirmCreateTempKit">
|
||||
|
||||
Reference in New Issue
Block a user