Material master date : ps
This commit is contained in:
parent
01f982f093
commit
9fe727a880
@ -331,7 +331,7 @@ class Rawmaterialdetails extends BaseController
|
||||
$stock = $this->request->getPost('openstock');
|
||||
$reorder = $this->request->getPost('reorder');
|
||||
$stockdate = $this->request->getPost('Date');
|
||||
$stockdate = (empty($stockdate)) ? NULL : format_date($stockdate,0,"Y-m-d");
|
||||
$stockdate = (empty($stockdate)) ? NULL : get_date_time_dynamical_format('d-m-Y','Y-m-d',"$stockdate");
|
||||
|
||||
$chked = $this->request->getPost('isactive');
|
||||
$IsActive = ($chked != '') ? '1' : '0';
|
||||
@ -339,6 +339,7 @@ class Rawmaterialdetails extends BaseController
|
||||
|
||||
$RawMaterial = array();
|
||||
$RawMaterial = array('MaterialName' => $MaterialName, 'MaterialType' => $MaterialType, 'UpdatedBy' => $UpdatedBy, 'UOM' => $UOM, 'IsActive' => $IsActive, 'Category' => $MaterialCategory, 'Remarks' => $Remarks, 'HSNCODE' => $HSNcode, 'stock' => $stock, 'stockdate' => $stockdate, 'reorder' => $reorder,'material_rate'=>$material_rate); //,'RMCode'=>$rmcode);
|
||||
// print_r($RawMaterial);die;
|
||||
|
||||
$result = $this->rawmaterialdetails_model->editRawmaterial($RawMaterial, $MaterialCode);
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
$("#Date").datepicker({
|
||||
//minDate :'now',
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
format: 'dd-mm-yyyy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+1',
|
||||
@ -124,8 +124,9 @@
|
||||
<div class="col-md-3">
|
||||
<label for="OpenStockDate">Open Stock Date</label>
|
||||
<?php
|
||||
$data = array('name' => 'Date', 'value' => set_value('Date'), 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;', 'autocomplete'=>'"off"');
|
||||
echo form_input($data);
|
||||
$formattedDate = $dt->format('d-m-Y');
|
||||
$data = array('name' => 'Date', 'value' => set_value('Date', $formattedDate), 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;', 'autocomplete'=>'"off"');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -85,10 +85,11 @@ if ($total <= $reorder) {
|
||||
$("#Date").datepicker({
|
||||
//minDate :'now',
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
format: 'dd-mm-yyyy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+1'
|
||||
yearRange: '-100:+1',
|
||||
orientation: 'bottom',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -239,14 +240,23 @@ if ($total <= $reorder) {
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>Open Stock Date</label>
|
||||
<input type="text" name="Date" id="Date" class="form-control" value="<?php echo $date; ?>" readonly>
|
||||
<?php
|
||||
$formattedDate = get_date_time_dynamical_format('Y-m-d','d-m-Y',"$date");
|
||||
$data = array('name' => 'Date', 'value' => set_value('Date',$formattedDate), 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;','readonly'=>true, 'autocomplete'=>'"off"');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<!-- <input type="text" name="Date" id="Date" class="form-control" value="<?php echo $date; ?>" readonly> -->
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>Open Stock Date</label>
|
||||
<input type="text" name="Date" id="Date" class="form-control" readonly>
|
||||
<?php
|
||||
$data = array('name' => 'Date', 'value' => set_value('Date'), 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;', 'autocomplete'=>'"off"');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<!-- <input type="text" name="Date" id="Date" class="form-control" readonly> -->
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user