MaterialCode; $MaterialName = $MD->MaterialName; $MaterialType = $MD->MaterialType; $MaterialCategory = $MD->Category; $UOM = $MD->UOM; $Assetcode = $MD->assetcode; $costcenter = $MD->CostCenterCode; $remarks = $MD->Remarks; $conversionfactor = $MD->ConversionFactorUnit; $conversionfactorUOM = $MD->ConversionFactorUOM; $RMCode = $MD->RMCode; $HSNcode = $MD->HSNCODE; $openstock=$MD->stock; $date=$MD->stockdate; $reorder=$MD->reorder; $chk = $MD->IsActive; if($chk == 1) { $IsActive = 'checked'; } else { $IsActive = ''; } } } if(!empty($currentstock)) { $currentstock =$currentstock[0]['remainingqty']; $x = $openstock; $y = $currentstock; // $total= $x + $y; $todaydateyear = date('Y', strtotime($date_today)); $todaydatemonth = date('m', strtotime($date_today)); $todaydatedate = date('d', strtotime($date_today)); $openstockdateyear = date('Y', strtotime($date)); $parts = explode('-',$date); $openstockdatemonth = $parts[1]; $openstockdatedate = $parts[2]; if($openstockdateyear==$todaydateyear) { if($openstockdatemonth<=03) { $total= $y==''?'0':$y; } else { $total= $x + $y; } } else if($openstockdateyear<$todaydateyear) { //$total= $y; $total= $y==''?'0':$y; } else if($openstockdateyear>$todaydateyear) { $total= $x + $y; } } ?> alert("Current Stock Low ");'; } ?>

Siddharth Industries - Edit Material -

Back

*
*
*
'Date','value' => set_value('Date',$date), 'class' => 'form-control','readonly'=>'true', 'onkeypress'=>'return false;'); echo form_input($data); ?>
'Date','id'=>'Date', 'class' => 'form-control' , 'onkeypress'=>'return false;'); echo form_input($data); ?>

>