updating 0 items 2
This commit is contained in:
parent
950b2036b3
commit
ebba7a0a2a
@ -333,7 +333,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
foreach ($settings_res as $s) $app_settings[$s['key']] = $s['value'];
|
||||
$loyalty_enabled = ($app_settings['loyalty_enabled'] ?? '0') === '1';
|
||||
$points_per_unit = (float)($app_settings['loyalty_points_per_unit'] ?? 1);
|
||||
$allow_zero_stock = ($app_settings['allow_zero_stock_sell'] ?? '0') === '1';
|
||||
$allow_zero_stock = ($app_settings['allow_zero_stock_sell'] ?? '1') === '1';
|
||||
|
||||
if (empty($items)) {
|
||||
throw new Exception("Cart is empty");
|
||||
@ -3446,7 +3446,7 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System';
|
||||
<?php elseif ($page === 'pos'): ?>
|
||||
<?php
|
||||
$allow_zero_stock_sell = ($data['settings']['allow_zero_stock_sell'] ?? '1') === '1';
|
||||
$sql = "SELECT * FROM stock_items " . ($allow_zero_stock_sell ? "" : "WHERE stock_quantity > 0 ") . "ORDER BY name_en ASC";
|
||||
$sql = "SELECT * FROM stock_items ORDER BY name_en ASC";
|
||||
$products_raw = db()->query($sql)->fetchAll(PDO::FETCH_ASSOC);
|
||||
$products = [];
|
||||
foreach ($products_raw as $p) {
|
||||
@ -6190,7 +6190,7 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System';
|
||||
<div class="col-md-4 mt-3">
|
||||
<label class="form-label" data-en="Allow Selling Out of Stock" data-ar="السماح بالبيع عند نفاذ المخزون">Allow Selling Out of Stock</label>
|
||||
<select name="settings[allow_zero_stock_sell]" class="form-select">
|
||||
<option value="0" <?= ($data['settings']['allow_zero_stock_sell'] ?? '0') === '0' ? 'selected' : '' ?> data-en="Disabled" data-ar="معطل">Disabled</option>
|
||||
<option value="0" <?= ($data['settings']['allow_zero_stock_sell'] ?? '1') === '0' ? 'selected' : '' ?> data-en="Disabled" data-ar="معطل">Disabled</option>
|
||||
<option value="1" <?= ($data['settings']['allow_zero_stock_sell'] ?? '1') === '1' ? 'selected' : '' ?> data-en="Enabled" data-ar="مفعل">Enabled</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user