Disposal
This commit is contained in:
+96
-2
@@ -264,6 +264,95 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Dispose Inventory Modal -->
|
||||
<div id="disposeInventoryModal" class="modal">
|
||||
<div class="modal-content modal-large dispense-modal-content">
|
||||
<span class="close">×</span>
|
||||
<h2>Dispose Inventory</h2>
|
||||
<form id="disposeInventoryForm" novalidate>
|
||||
<div class="form-group">
|
||||
<label for="disposeDrugSelect">Drug Variant *</label>
|
||||
<select id="disposeDrugSelect" onchange="updateDisposeBatchInfo()">
|
||||
<option value="">-- Select a drug variant --</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Disposal Mode *</label>
|
||||
<div style="display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 6px;">
|
||||
<label style="display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500;">
|
||||
<input type="radio" name="disposeMode" id="disposeModeQuantity" value="subunit" checked>
|
||||
Quantity
|
||||
</label>
|
||||
<label style="display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500;">
|
||||
<input type="radio" name="disposeMode" id="disposeModePack" value="pack">
|
||||
Whole Pack
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="disposeQuantityGroup">
|
||||
<label for="disposeQuantity">Quantity *</label>
|
||||
<input type="number" id="disposeQuantity" step="1.0">
|
||||
</div>
|
||||
|
||||
<div class="form-row" id="disposePackRow" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label for="disposePackSelect">Pack Type *</label>
|
||||
<select id="disposePackSelect" onchange="updateDisposeQuantityFromPack()">
|
||||
<option value="">-- Select pack --</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="disposePackCount">Pack Count *</label>
|
||||
<input type="number" id="disposePackCount" min="1" step="1" onchange="updateDisposeQuantityFromPack()">
|
||||
<small id="disposePackPreview" style="display: block; margin-top: 6px; color: #666;">Select a pack and whole-number count.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="disposeSourceGroup" style="display: none;">
|
||||
<label>Stock Source *</label>
|
||||
<div style="display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 6px;">
|
||||
<label style="display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500;">
|
||||
<input type="radio" name="disposeSource" id="disposeSourceBatch" value="batch" checked>
|
||||
Batch stock
|
||||
</label>
|
||||
<label style="display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500;">
|
||||
<input type="radio" name="disposeSource" id="disposeSourceLegacy" value="legacy">
|
||||
Legacy loose stock
|
||||
</label>
|
||||
</div>
|
||||
<small id="disposeSourceHelp" style="display: block; margin-top: 6px; color: #666;"></small>
|
||||
</div>
|
||||
|
||||
<div id="disposeBatchInfoSection" style="display: none; margin: 15px 0; padding: 12px; background: #f5f5f5; border-radius: 4px;">
|
||||
<h4 style="margin-top: 0; margin-bottom: 4px;">Batch Allocation</h4>
|
||||
<p style="margin: 0 0 10px; color: #666;">Batches are shown in FEFO order. Adjust the allocation against each batch so the total matches the requested disposal amount.</p>
|
||||
<details id="disposeExpiredBatchDetails" style="display: none; margin-bottom: 10px; background: #fffaf0; border: 1px solid #f5d08a; border-radius: 4px; padding: 8px 10px;">
|
||||
<summary style="cursor: pointer; font-weight: 600; color: #7a4f01;">Show expired batches</summary>
|
||||
<div id="disposeExpiredBatchContent" style="margin-top: 10px;"></div>
|
||||
</details>
|
||||
<div id="disposeAllocationSummary" style="display: none; margin-bottom: 10px; padding: 8px 10px; background: #f0f8ff; border-left: 3px solid #2196F3; border-radius: 4px;">
|
||||
<div id="disposeAllocationSummaryContent"></div>
|
||||
</div>
|
||||
<div id="disposeBatchInfoContent">
|
||||
<p class="loading">Loading batches...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="disposeNotes">Disposal Note</label>
|
||||
<textarea id="disposeNotes" rows="4" placeholder="Optional note for the audit log"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-danger">Dispose</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancelDisposeInventoryBtn">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add Variant Modal -->
|
||||
<div id="addVariantModal" class="modal">
|
||||
<div class="modal-content">
|
||||
@@ -432,7 +521,7 @@
|
||||
<span class="close">×</span>
|
||||
<h2>User Management</h2>
|
||||
<div class="user-management-content">
|
||||
<div class="form-group">
|
||||
<section class="user-create-panel">
|
||||
<h3>Create New User</h3>
|
||||
<form id="createUserForm">
|
||||
<div class="form-row">
|
||||
@@ -447,7 +536,7 @@
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-small">Create User</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
<div id="usersList" class="users-list">
|
||||
<h3>Users</h3>
|
||||
<p class="loading">Loading users...</p>
|
||||
@@ -522,6 +611,11 @@
|
||||
<input type="text" id="disposeBatchName" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="disposeBatchStockSummary">Stock to Dispose</label>
|
||||
<input type="text" id="disposeBatchStockSummary" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<p style="margin: 0; color: #666;">This will mark the expired batch as disposed and remove its remaining stock from inventory.</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user