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

View File

@ -39,7 +39,7 @@
<div class="dropdown-menu dropdown-menu-right"> <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 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"> <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> </a>
</div> </div>
</div> </div>

View File

@ -38,25 +38,28 @@
<tbody> <tbody>
<?php foreach ($reorder as $value) : ?> <?php foreach ($reorder as $value) : ?>
<tr id="<?php echo $value['prefered_vendor']; ?>"> <tr >
<div></div> <div></div>
<td><?= $value['prefered_vendor_name']; ?></td> <td><?= $value['prefered_vendor_name']; ?></td>
<td><?= $value['product_count']; ?></td> <td><?= $value['product_count']; ?></td>
<!-- <td><?= $value['prefered_vendor_name']; ?></td> <!-- <td><?= $value['prefered_vendor_name']; ?></td>
<td><?= number_format($value['unit_price']); ?></td> <td><?= number_format($value['unit_price']); ?></td>
<td><?= $value['qty_stock']; ?></td> <td><?= $value['qty_stock']; ?></td>
<td><?= $value['purchase_order_level']; ?></td> --> <td><?= $value['purchase_order_level']; ?></td> -->
<td> <td>
<div class="btn-group dropdown"> <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> <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"> <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['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> <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>
</div> </td>
</td> <td>
<td> </td>
</td>
<?php endforeach; ?> <?php endforeach; ?>
</tr> </tr>
@ -139,7 +142,7 @@ $(document).ready(function() {
}); });
$('tr').click(function () { $('.product_list_view').click(function () {
var vendor_id = $(this).attr('id'); var vendor_id = $(this).attr('id');
$.ajax({ $.ajax({

View File

@ -693,7 +693,13 @@ $(document).ready(function() {
// Event listener for "Add More Item" button // Event listener for "Add More Item" button
$('#addItem').click(function() { $('#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'){ if(productarray == 'No Product'){
toastr.warning("First Add the Product!"); toastr.warning("First Add the Product!");
}else if (productarray.length > 0) { }else if (productarray.length > 0) {
@ -707,10 +713,13 @@ $(document).ready(function() {
if (product.per == 'ml') { if (product.per == 'ml') {
value_ml = " ("+product.ml+product.per+")"; value_ml = " ("+product.ml+product.per+")";
} }
newRow += '<option value="' + product.product_id + '" >' + product.product_name + value_ml + " - " + product.manufacturer_name+ var product = productarray[i];
'</option>'; 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>' + newRow += '</select></td>' +
'<td style="width:12%;"><input type="text" class="form-control item-rate" name="unit-price[]" readonly /></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>' + '<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"> <div class="form-group col-md-4">
<label for="inputState" class="col-form-label">Business</label> <label for="inputState" class="col-form-label">Business</label>
<select id="business" class="form-control" name="business" required> <select id="business" class="form-control" name="business" required>
<!-- <option value="">Select Business</option> --> <option value="">Select Business</option>
<?php foreach ($business as $busin): ?> <?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> <option value="<?= $busin['business_id'] ?>" <?= isset($users['business_id']) && $users['business_id'] == $busin['business_id'] ? 'selected' : '' ?>><?= $busin['business_name'] ?></option>
<?php endforeach; ?> <?php endforeach; ?>
@ -33,7 +33,7 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputState" class="col-form-label">Branch</label> <label for="inputState" class="col-form-label">Branch</label>
<select id="branch" class="form-control" name="branch" required> <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))) { <?php if (isset($branch) && (is_array($branch) || is_object($branch))) {
foreach ($branch as $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> <option value="<?= $branch['branch_id'] ?>" <?= isset($users['branch_id']) && $users['branch_id'] == $branch['branch_id'] ? 'selected' : '' ?> ><?= $branch['branch_name'] ?></option>