[test] contact to setting modules
This commit is contained in:
@@ -39,10 +39,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="col-md-4 mb-3">
|
||||
<label for="price" class="form-label">Price</label>
|
||||
<input type="number" class="form-control" id="price" placeholder="0.00" step="0.01" required>
|
||||
</div>
|
||||
<div class="col-md-2 mb-3">
|
||||
<label for="uom" class="form-label">UOM</label>
|
||||
<input type="text" class="form-control" id="uom" placeholder="pcs"
|
||||
list="uom_suggestions" autocomplete="off" maxlength="20">
|
||||
<datalist id="uom_suggestions">
|
||||
<option value="pcs">
|
||||
<option value="box">
|
||||
<option value="kg">
|
||||
<option value="g">
|
||||
<option value="l">
|
||||
<option value="ml">
|
||||
<option value="set">
|
||||
<option value="roll">
|
||||
<option value="pair">
|
||||
<option value="sheet">
|
||||
<option value="bag">
|
||||
<option value="bottle">
|
||||
</datalist>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<label for="min_stock" class="form-label">Min Stock</label>
|
||||
<input type="number" class="form-control" id="min_stock" placeholder="0" min="0" required>
|
||||
@@ -53,7 +72,7 @@
|
||||
<label for="reorder_point" class="form-label">Reorder Point</label>
|
||||
<input type="number" class="form-control" id="reorder_point" placeholder="0" min="0" required>
|
||||
<div class="invalid-feedback" id="reorder_point_error"></div>
|
||||
<small class="text-muted" id="reorder_point_hint">Must be greater than min stock</small>
|
||||
<small class="text-muted" id="reorder_point_hint">Must be greater than or equal to min stock</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -119,6 +138,7 @@
|
||||
}
|
||||
|
||||
formData.append('keep_files', $('#current_file_label').val())
|
||||
formData.append('uom', $('#uom').val() || 'pcs')
|
||||
|
||||
return ajax_request({
|
||||
url: "<?php echo $server_url?>inventory/api/engine/manage_product.php",
|
||||
@@ -236,8 +256,8 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
if (min_stock >= reorder_point) {
|
||||
flag('reorder_point', 'Must be greater than min stock (' + min_stock + ').');
|
||||
if (min_stock > reorder_point) {
|
||||
flag('reorder_point', 'Must be greater than or equal to min stock (' + min_stock + ').');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user