CHANGE_SALES_ORDER_PRODUCT_REPEAT_LOW_STOCK_ITEM_LIST_PRODUCT : AADHAVAN

This commit is contained in:
unknown 2024-06-15 09:44:43 +05:30
parent 34754b55b0
commit f0fd9335f7
5 changed files with 40 additions and 28 deletions

View File

@ -194,7 +194,7 @@ class Users extends BaseController
$BranchModel=new BranchModel();
$business=$BusinessModel->findAll();
$business_select = $BusinessModel->where('business_id',session()->get('logged_user_business_id'))->findAll();
$branch_list = $BranchModel->where('branch_id',session()->get('logged_user_branch_id'))->findAll();
// $branch_list = $BranchModel->where('branch_id',session()->get('logged_user_branch_id'))->findAll();
$rolemodel = new RoleModel();
$roles =$rolemodel->getRoles();
@ -202,7 +202,7 @@ class Users extends BaseController
$data['page_name'] = "Add User";
$data['users'] = [];
$data['business'] = $business_select;
$data['branch'] = $branch_list;
// $data['branch'] = $branch_list;
$data['roles'] = $roles;
} else if ($user_id !== '0') {

View File

@ -39,7 +39,7 @@
<div class="dropdown-menu dropdown-menu-right">
<a data-toggle="modal" data-target="#manufacturer_login-modal" data-value="<?php echo $item['manufacturer_id']; ?>" class="dropdown-item edit-button" onclick="editManufacturer(this)"><i class="ri-pencil-line mr-2 text-muted font-18 vertical-middle" ></i>Edit</a>
<a href="<?= "product_index/" . $item['manufacturer_id']; ?>" class="dropdown-item view-list-button" title="Model List">
<i class="ri-list-check-2 mr-2 text-muted font-18 vertical-middle" ></i>Model List
<i class="ri-list-check-2 mr-2 text-muted font-18 vertical-middle" ></i>Product List
</a>
</div>
</div>

View File

@ -38,25 +38,28 @@
<tbody>
<?php foreach ($reorder as $value) : ?>
<tr id="<?php echo $value['prefered_vendor']; ?>">
<div></div>
<td><?= $value['prefered_vendor_name']; ?></td>
<td><?= $value['product_count']; ?></td>
<!-- <td><?= $value['prefered_vendor_name']; ?></td>
<td><?= number_format($value['unit_price']); ?></td>
<td><?= $value['qty_stock']; ?></td>
<td><?= $value['purchase_order_level']; ?></td> -->
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<!-- <a href="<?= "rise_order/" . $value['product_id']; ?>" class="edit-button"><i class="ri-arrow-up-circle-fill"></i>Rise</a> -->
<a href="<?= "rise_order/" . $value['prefered_vendor']; ?>" class="dropdown-item edit-button" title="Raise PO"><i class="fas fa-file-invoice mr-2 text-muted font-18 vertical-middle"></i>Raise</a>
<tr >
<div></div>
<td><?= $value['prefered_vendor_name']; ?></td>
<td><?= $value['product_count']; ?></td>
<!-- <td><?= $value['prefered_vendor_name']; ?></td>
<td><?= number_format($value['unit_price']); ?></td>
<td><?= $value['qty_stock']; ?></td>
<td><?= $value['purchase_order_level']; ?></td> -->
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<!-- <a href="<?= "rise_order/" . $value['product_id']; ?>" class="edit-button"><i class="ri-arrow-up-circle-fill"></i>Rise</a> -->
<a class="dropdown-item product_list_view" id="<?php echo $value['prefered_vendor']; ?>">
<i class="fas fa-shopping-cart mr-2 text-muted font-18 vertical-middle"></i>Product List
</a>
<a href="<?= "rise_order/" . $value['prefered_vendor']; ?>" class="dropdown-item edit-button" title="Raise PO"><i class="fas fa-file-invoice mr-2 text-muted font-18 vertical-middle"></i>Raise</a>
</div>
</div>
</div>
</td>
<td>
</td>
</td>
<td>
</td>
<?php endforeach; ?>
</tr>
@ -139,7 +142,7 @@ $(document).ready(function() {
});
$('tr').click(function () {
$('.product_list_view').click(function () {
var vendor_id = $(this).attr('id');
$.ajax({

View File

@ -693,7 +693,13 @@ $(document).ready(function() {
// Event listener for "Add More Item" button
$('#addItem').click(function() {
console.log(productarray);
selected_pr = [];
$('tr .form-control.book-select.SelExample.select2-hidden-accessible').each(function() {
var rowProductid = $(this).val();
selected_pr.push(rowProductid);
});
if(productarray == 'No Product'){
toastr.warning("First Add the Product!");
}else if (productarray.length > 0) {
@ -707,10 +713,13 @@ $(document).ready(function() {
if (product.per == 'ml') {
value_ml = " ("+product.ml+product.per+")";
}
newRow += '<option value="' + product.product_id + '" >' + product.product_name + value_ml + " - " + product.manufacturer_name+
'</option>';
var product = productarray[i];
if(!selected_pr.includes(product.product_id))
{
newRow += '<option value="' + product.product_id + '" >' + product.product_name + value_ml + " - " + product.manufacturer_name+
'</option>';
}
}
newRow += '</select></td>' +
'<td style="width:12%;"><input type="text" class="form-control item-rate" name="unit-price[]" readonly /></td>' +
'<td style="width:10%;"><input type="number" class="form-control item-quantity" min="0" max="" name="quantity[]" onchange="updateThirdColumnValue(this); updateTaxAmount(this)" /></td>' +

View File

@ -24,7 +24,7 @@
<div class="form-group col-md-4">
<label for="inputState" class="col-form-label">Business</label>
<select id="business" class="form-control" name="business" required>
<!-- <option value="">Select Business</option> -->
<option value="">Select Business</option>
<?php foreach ($business as $busin): ?>
<option value="<?= $busin['business_id'] ?>" <?= isset($users['business_id']) && $users['business_id'] == $busin['business_id'] ? 'selected' : '' ?>><?= $busin['business_name'] ?></option>
<?php endforeach; ?>
@ -33,7 +33,7 @@
<div class="form-group col-md-4">
<label for="inputState" class="col-form-label">Branch</label>
<select id="branch" class="form-control" name="branch" required>
<!-- <option value="">Select Branch</option> -->
<option value="">Select Branch</option>
<?php if (isset($branch) && (is_array($branch) || is_object($branch))) {
foreach ($branch as $branch): ?>
<option value="<?= $branch['branch_id'] ?>" <?= isset($users['branch_id']) && $users['branch_id'] == $branch['branch_id'] ? 'selected' : '' ?> ><?= $branch['branch_name'] ?></option>