select2
This commit is contained in:
parent
75aa96b61d
commit
e579f15ce6
|
|
@ -250,6 +250,7 @@ class LoadTransport extends ComponentBase
|
||||||
//->where("status_accountant", "accept")
|
//->where("status_accountant", "accept")
|
||||||
//->where("status_director", "accept")
|
//->where("status_director", "accept")
|
||||||
->addSelect(DB::raw("SUM(amount) as quantity"))
|
->addSelect(DB::raw("SUM(amount) as quantity"))
|
||||||
|
->having('quantity', '>', 0)
|
||||||
->groupBy('romanah_gokbakja_rulon_action.product_id')
|
->groupBy('romanah_gokbakja_rulon_action.product_id')
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
->get();
|
->get();
|
||||||
|
|
@ -316,6 +317,7 @@ class LoadTransport extends ComponentBase
|
||||||
//->where("status_accountant", "accept")
|
//->where("status_accountant", "accept")
|
||||||
//->where("status_director", "accept")
|
//->where("status_director", "accept")
|
||||||
->addSelect(DB::raw("SUM(amount) as quantity"))
|
->addSelect(DB::raw("SUM(amount) as quantity"))
|
||||||
|
->having('quantity', '>', 0)
|
||||||
->groupBy('romanah_gokbakja_bag_actions.product_id')
|
->groupBy('romanah_gokbakja_bag_actions.product_id')
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
->get();
|
->get();
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ function onStart(){
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col" id="inStockProducts">
|
<div class="col" id="inStockProducts">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
@ -278,7 +279,7 @@ function onStart(){
|
||||||
|
|
||||||
if(data.productFromStock.inStockAmount > 0){
|
if(data.productFromStock.inStockAmount > 0){
|
||||||
dropDownProducts = `<label class="form-label">Sklatdan Haryt Saýlaň</label>
|
dropDownProducts = `<label class="form-label">Sklatdan Haryt Saýlaň</label>
|
||||||
<select class="form-control select2" name="product_id">
|
<select class="form-control select2" name="product_id" id="testq">
|
||||||
<option value="0">Saýla</option>`;
|
<option value="0">Saýla</option>`;
|
||||||
|
|
||||||
if(data.productFromStock.orderItemType == "rulon"){
|
if(data.productFromStock.orderItemType == "rulon"){
|
||||||
|
|
@ -301,6 +302,7 @@ function onStart(){
|
||||||
dropDownProducts += `<input type="hidden" name="product_type" value="`+data.productFromStock.orderItemType+`">`;
|
dropDownProducts += `<input type="hidden" name="product_type" value="`+data.productFromStock.orderItemType+`">`;
|
||||||
|
|
||||||
$('#inStockProducts').html(dropDownProducts);
|
$('#inStockProducts').html(dropDownProducts);
|
||||||
|
$('#testq').select2();
|
||||||
}else{
|
}else{
|
||||||
dropDownProducts = `<label class="form-label">Sklatda Bu Haryt Ýok</label>
|
dropDownProducts = `<label class="form-label">Sklatda Bu Haryt Ýok</label>
|
||||||
<select class="form-control" disabled>
|
<select class="form-control" disabled>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue