This commit is contained in:
Shohrat 2023-12-06 12:48:06 +05:00
parent 75aa96b61d
commit e579f15ce6
2 changed files with 5 additions and 1 deletions

View File

@ -250,6 +250,7 @@ class LoadTransport extends ComponentBase
//->where("status_accountant", "accept")
//->where("status_director", "accept")
->addSelect(DB::raw("SUM(amount) as quantity"))
->having('quantity', '>', 0)
->groupBy('romanah_gokbakja_rulon_action.product_id')
->orderBy('id', 'DESC')
->get();
@ -316,6 +317,7 @@ class LoadTransport extends ComponentBase
//->where("status_accountant", "accept")
//->where("status_director", "accept")
->addSelect(DB::raw("SUM(amount) as quantity"))
->having('quantity', '>', 0)
->groupBy('romanah_gokbakja_bag_actions.product_id')
->orderBy('id', 'DESC')
->get();

View File

@ -97,6 +97,7 @@ function onStart(){
</div>
<div class="col" id="inStockProducts">
</div>
<div class="col">
@ -278,7 +279,7 @@ function onStart(){
if(data.productFromStock.inStockAmount > 0){
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>`;
if(data.productFromStock.orderItemType == "rulon"){
@ -301,6 +302,7 @@ function onStart(){
dropDownProducts += `<input type="hidden" name="product_type" value="`+data.productFromStock.orderItemType+`">`;
$('#inStockProducts').html(dropDownProducts);
$('#testq').select2();
}else{
dropDownProducts = `<label class="form-label">Sklatda Bu Haryt Ýok</label>
<select class="form-control" disabled>