SF
Asked
Hi,
I believe can find the Rack quantity in DB under sma_warehouses_products table
but what about the quantity number that shows on list products on dashboard ? which DB table is taking care of that.
There is a big problem in the Quantity and Rack quantity which causing a lot of trouble, i think it is related to the Shop orders but i need to investigate more.
Please guide me,
Thanks
I believe can find the Rack quantity in DB under sma_warehouses_products table
but what about the quantity number that shows on list products on dashboard ? which DB table is taking care of that.
There is a big problem in the Quantity and Rack quantity which causing a lot of trouble, i think it is related to the Shop orders but i need to investigate more.
Please guide me,
Thanks
- MSAnsweredHello,
I am sorry as I didn't understand. There is no rack quantity as I know. Can you please take screenshot for me.
Thank you - YYAnsweredC:\wamp64\www\qms\themes\default\admin\views\products
add.php
<!--warehouse_quantity -->
<div class="<?= $product ? 'text-warning' : '' ?>">
<strong><?= lang('warehouse_quantity') ?></strong><br>
<?php
if (!empty($warehouses)) {
if ($product) {
echo '<div class="row"><div class="col-md-12"><div class="well"><div id="show_wh_edit">';
if (!empty($warehouses_products)) {
echo '<div style="display:none;">';
foreach ($warehouses_products as $wh_pr) {
echo '<span class="bold text-info">' . $wh_pr->name . ': <span class="padding05" id="rwh_qty_' . $wh_pr->id . '">' . $this->sma->formatQuantity($wh_pr->quantity) . '</span>' . ($wh_pr->rack ? ' (<span class="padding05" id="rrack_' . $wh_pr->id . '">' . $wh_pr->rack . '</span>)' : '') . '</span><br>';
}
echo '</div>';
}
foreach ($warehouses as $warehouse) {
//$whs[$warehouse->id] = $warehouse->name;
echo '<div class="col-md-6 col-sm-6 col-xs-6" style="padding-bottom:15px;">' . $warehouse->name . '<br><div class="form-group">' . form_hidden('wh_' . $warehouse->id, $warehouse->id) . form_input('wh_qty_' . $warehouse->id, (isset($_POST['wh_qty_' . $warehouse->id]) ? $_POST['wh_qty_' . $warehouse->id] : (isset($warehouse->quantity) ? $warehouse->quantity : '')), 'class="form-control wh" id="wh_qty_' . $warehouse->id . '" placeholder="' . lang('quantity') . '"') . '</div>';
if ($Settings->racks) {
echo '<div class="form-group">' . form_input('rack_' . $warehouse->id, (isset($_POST['rack_' . $warehouse->id]) ? $_POST['rack_' . $warehouse->id] : (isset($warehouse->rack) ? $warehouse->rack : '')), 'class="form-control wh" id="rack_' . $warehouse->id . '" placeholder="' . lang('rack') . '"') . '</div>';
}
echo '</div>';
}
echo '</div><div class="clearfix"></div></div></div></div>';
} else {
echo '<div class="row"><div class="col-md-12"><div class="well">';
foreach ($warehouses as $warehouse) {
//$whs[$warehouse->id] = $warehouse->name;
echo '<div class="col-md-6 col-sm-6 col-xs-6" style="padding-bottom:15px;">' . $warehouse->name . '<br><div class="form-group">' . form_hidden('wh_' . $warehouse->id, $warehouse->id) . form_input('wh_qty_' . $warehouse->id, (isset($_POST['wh_qty_' . $warehouse->id]) ? $_POST['wh_qty_' . $warehouse->id] : ''), 'class="form-control" id="wh_qty_' . $warehouse->id . '" placeholder="' . lang('quantity') . '"') . '</div>';
if ($Settings->racks) {
echo '<div class="form-group">' . form_input('rack_' . $warehouse->id, (isset($_POST['rack_' . $warehouse->id]) ? $_POST['rack_' . $warehouse->id] : ''), 'class="form-control" id="rack_' . $warehouse->id . '" placeholder="' . lang('rack') . '"') . '</div>';
}
echo '</div>';
}
echo '<div class="clearfix"></div></div></div></div>';
}
}
?>
</div>
<div class="clearfix"></div>
<!--fin warehouse_quantity --> - MSAnsweredHello,
If you choose the warehouse on list products then it show correct quantity. I suspect that database has entry for other warehouse with some stock and that warehouse is deleted, causing the different number on all warehouse while correct if you select the warehouse.
Thank you - Login to Reply