gas stock module changes -vadivel J
This commit is contained in:
parent
2a9204f6fd
commit
96b90d6de7
@ -325,7 +325,9 @@ class StockController extends BaseController
|
|||||||
return $this->loadViews("bagStockDetails", $this->global, $data, NULL);
|
return $this->loadViews("bagStockDetails", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateBagStockDetails(){}
|
public function updateBagStockDetails(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -245,7 +245,7 @@
|
|||||||
<th class="celda_encabezado_general" style="display:none">Date</th>
|
<th class="celda_encabezado_general" style="display:none">Date</th>
|
||||||
<th class="celda_encabezado_general" style="display:none"> material</th>
|
<th class="celda_encabezado_general" style="display:none"> material</th>
|
||||||
<th class="celda_encabezado_general" style="display:none"> customer</th>
|
<th class="celda_encabezado_general" style="display:none"> customer</th>
|
||||||
<th class="celda_encabezado_general">Opening</th>
|
<th class="celda_encabezado_general">Opening Stock</th>
|
||||||
<th class="celda_encabezado_general">Receipt</th>
|
<th class="celda_encabezado_general">Receipt</th>
|
||||||
<th class="celda_encabezado_general">Used</th>
|
<th class="celda_encabezado_general">Used</th>
|
||||||
<th class="celda_encabezado_general">Balance Stock</th>
|
<th class="celda_encabezado_general">Balance Stock</th>
|
||||||
@ -260,23 +260,27 @@
|
|||||||
<?php if(!empty($groupedBagStockDetails))
|
<?php if(!empty($groupedBagStockDetails))
|
||||||
{
|
{
|
||||||
//dd($groupedBagStockDetails);
|
//dd($groupedBagStockDetails);
|
||||||
foreach($groupedBagStockDetails as $index => $bagStockDetails){
|
foreach($groupedBagStockDetails as $groupedBagStockDetailsIndex => $bagStockDetails){
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<?php foreach($bagStockDetails as $index => $bagStockDetail){ ?>
|
|
||||||
<?php if ($index === 0): ?>
|
<?php foreach($bagStockDetails as $bagStockIndex => $bagStock){ ?>
|
||||||
<td class="celda_normal"><?= $bagStockDetail['date'] ?></td>
|
<?php if ($bagStockIndex === 0): ?>
|
||||||
|
<td class="celda_normal"><?= $bagStock['date'] ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<td style="display:none"><?= $bagStockDetail['date']?></td>
|
|
||||||
<td style="display:none"><?= $bagStockDetail['materialCode']?></td>
|
<td style="display:none"><?= $bagStock['date']?></td>
|
||||||
<td style="display:none"><?= $bagStockDetail['customer']?></td>
|
<td style="display:none"><?= $bagStock['materialCode']?></td>
|
||||||
|
<td style="display:none"><?= $bagStock['customer']?></td>
|
||||||
<td class="celda_normal"
|
<td class="celda_normal"
|
||||||
contenteditable="true"><?= $bagStockDetail['opening']?></td>
|
oninput="openingStockChange(this)"
|
||||||
<td class="celda_normal"><?= $bagStockDetail['receipt']?></td>
|
contenteditable="true"><?= $bagStock['opening']?></td>
|
||||||
|
<td class="celda_normal"><?= $bagStock['receipt']?></td>
|
||||||
<td class="celda_normal"
|
<td class="celda_normal"
|
||||||
contenteditable="true"><?= $bagStockDetail['used']?></td>
|
oninput="usedStockChange(this)"
|
||||||
<td class="celda_normal"><?= $bagStockDetail['balanceStock']?></td>
|
contenteditable="true"><?= $bagStock['used']?></td>
|
||||||
|
<td class="celda_normal"><?= $bagStock['balanceStock']?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -322,7 +326,7 @@
|
|||||||
|
|
||||||
//table to json function
|
//table to json function
|
||||||
|
|
||||||
var updateBagStockDetails = tableToJSON();
|
var updateBagStockDetails = tableToJson();
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -340,6 +344,16 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
|
||||||
|
alert("An error occurred while processing the request. Please try again.");
|
||||||
|
console.error("Error Code:", xhr.status);
|
||||||
|
console.error("Error Message:", error);
|
||||||
|
console.error("Response Text:", xhr.responseText);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$('#loader').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -386,3 +400,17 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function openingStockChange(tdElement){
|
||||||
|
alert('opening stock is changed');
|
||||||
|
console.log('New value:', tdElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
function usedStockChange(tdElement) {
|
||||||
|
alert('Used Stock is changed');
|
||||||
|
console.log('New value:', tdElement);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -528,6 +528,16 @@
|
|||||||
|
|
||||||
alert(data);
|
alert(data);
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
|
||||||
|
alert("An error occurred while processing the request. Please try again.");
|
||||||
|
console.error("Error Code:", xhr.status);
|
||||||
|
console.error("Error Message:", error);
|
||||||
|
console.error("Response Text:", xhr.responseText);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$('#loader').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user