tracker issues - 1601
This commit is contained in:
parent
7dbbf252a3
commit
21fb034c72
@ -346,7 +346,7 @@ class Employeedetails extends BaseController
|
||||
'esi_applicable' => $esi_applicable,
|
||||
'pf_applicable' => $pf_applicable,
|
||||
'work_location' => $work_location,
|
||||
'is_driver' => $is_driver,
|
||||
'is_driver' => ($is_driver === null || $is_driver === '') ? 0 : $is_driver,
|
||||
);
|
||||
|
||||
//print_r($Employee);die();
|
||||
@ -854,7 +854,7 @@ class Employeedetails extends BaseController
|
||||
'ESI' => $esino,
|
||||
'NomineeDetails' => $Nominee,
|
||||
'is_management_team' => $is_management_team,
|
||||
'is_driver' => $is_driver,
|
||||
'is_driver' => ($is_driver === null || $is_driver === '') ? 0 : $is_driver,
|
||||
'esi_applicable' => $esi_applicable,
|
||||
'pf_applicable' => $pf_applicable,
|
||||
'work_location' => $work_location,
|
||||
|
||||
@ -585,7 +585,7 @@ class Purchaseorder extends BaseController
|
||||
$ReqType = $this->request->getVar('ReqType');
|
||||
|
||||
$Req = $this->purchaseorder_model->getRequistionNoFromPO($PONO);
|
||||
|
||||
|
||||
$data['ReqList'] = $Req;
|
||||
|
||||
$result = array();
|
||||
@ -1461,13 +1461,12 @@ class Purchaseorder extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $updatedBy, 'UpdatedOn' => $updateddt);
|
||||
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
$recqty = 0;
|
||||
|
||||
if ($POStatus == SPECIAL_PO) {
|
||||
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $updatedBy, 'UpdatedOn' => $updateddt);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
|
||||
$recqty = $Quantity;
|
||||
|
||||
@ -1485,9 +1484,6 @@ class Purchaseorder extends BaseController
|
||||
$MaterialstockHistoryupdate = array('SupplierID' => $SupplierID, 'Quantity' => $Quantity, 'ItemValue' => $itemRate, 'UpdatedBY' => $updatedBy, 'UpdatedOn' => $updateddt);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->purchaseorder_model->updateMatStock(
|
||||
$itemNo,
|
||||
$MaterialstockHistoryupdate
|
||||
@ -1510,17 +1506,26 @@ class Purchaseorder extends BaseController
|
||||
$this->inwardgateregister_model->addmaterialmaster($current_qty, $MaterialCode);
|
||||
}
|
||||
|
||||
/*------------------------------*/
|
||||
$this->requistion_model = new requistion_model();
|
||||
|
||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber, $MaterialCode);
|
||||
|
||||
$ItemNo = '';
|
||||
if (count($RetItemNo) > 0) {
|
||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||
}
|
||||
$getOldReqDetailsQuantity = $this->purchaseorder_model->getOldReqDetailsQuantity($Reqnumber, $MaterialCode,$ItemNo);
|
||||
if($Quantity == $getOldReqDetailsQuantity){
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $updatedBy, 'UpdatedOn' => $updateddt);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
}
|
||||
/*------------------------------*/
|
||||
|
||||
if ($SkipInsert == "False") {
|
||||
|
||||
if (strlen((string)$POLineItemNo) == 0) {
|
||||
$this->requistion_model = new requistion_model();
|
||||
|
||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber, $MaterialCode);
|
||||
|
||||
$ItemNo = '';
|
||||
if (count($RetItemNo) > 0) {
|
||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||
}
|
||||
|
||||
$POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'ReceivedQuantity' => $recqty, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter,'LineitemAuditorNotes'=>$LineitemAuditorNotes );
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
@ -2497,12 +2502,20 @@ class Purchaseorder extends BaseController
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $CreateBy, 'UpdatedOn' => $updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
|
||||
$this->requistion_model = new requistion_model();
|
||||
|
||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber, $MaterialCode);
|
||||
|
||||
$ItemNo = '';
|
||||
if (count($RetItemNo) > 0) {
|
||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||
}
|
||||
$getOldReqDetailsQuantity = $this->purchaseorder_model->getOldReqDetailsQuantity($Reqnumber, $MaterialCode,$ItemNo);
|
||||
if($Quantity == $getOldReqDetailsQuantity){
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $CreateBy, 'UpdatedOn' => $updateddt);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
}
|
||||
/*------------------------------*/
|
||||
if ($SkipInsert == "False") {
|
||||
if (strlen((string)$POLineItemNo) == 0) {
|
||||
@ -3252,13 +3265,19 @@ class Purchaseorder extends BaseController
|
||||
}
|
||||
|
||||
/*------------------------------*/
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $CreateBy, 'UpdatedOn' => $updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
|
||||
$this->requistion_model = new requistion_model();
|
||||
|
||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber, $MaterialCode);
|
||||
|
||||
$ItemNo = '';
|
||||
if (count($RetItemNo) > 0) {
|
||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||
}
|
||||
$getOldReqDetailsQuantity = $this->purchaseorder_model->getOldReqDetailsQuantity($Reqnumber, $MaterialCode,$ItemNo);
|
||||
if($Quantity == $getOldReqDetailsQuantity){
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $CreateBy, 'UpdatedOn' => $updateddt);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
}
|
||||
/*------------------------------*/
|
||||
|
||||
|
||||
|
||||
@ -490,8 +490,18 @@ class Servicepurchaseorder extends BaseController
|
||||
|
||||
/*------------------------------ Quantity update the req details --*/
|
||||
//if($MaterialCode!= ''){
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $updatedBy, 'UpdatedOn' => $updateddt);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
$this->requistion_model = new requistion_model();
|
||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber, $MaterialCode);
|
||||
|
||||
$ItemNo = '';
|
||||
if (count($RetItemNo) > 0) {
|
||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||
}
|
||||
$getOldReqDetailsQuantity = $this->purchaseorder_model->getOldReqDetailsQuantity($Reqnumber, $MaterialCode,$ItemNo);
|
||||
if($Quantity == $getOldReqDetailsQuantity){
|
||||
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $updatedBy, 'UpdatedOn' => $updateddt);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
|
||||
}
|
||||
// }
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -1119,7 +1119,7 @@ group by month(created_date)";
|
||||
}
|
||||
function category()
|
||||
{
|
||||
$sql = "SELECT distinct Category FROM t_materialmaster;";
|
||||
$sql = "SELECT distinct Category,cd.ConfigValue as Category_name FROM t_materialmaster left join t_configdetails cd on cd.key = t_materialmaster.Category;";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->getResult();
|
||||
}
|
||||
@ -1378,11 +1378,13 @@ group by supplier_name,material_name
|
||||
function report_cum_month($sup = null, $mat = null)
|
||||
{
|
||||
|
||||
$sql = "SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal
|
||||
$sql = "SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal,
|
||||
cd.Key as category_id,cd.ConfigValue as category_name
|
||||
FROM t_purchaseorder_master pm
|
||||
left join t_purchaseorder_lineitem pl on pl.PONO = pm.PONO
|
||||
left join t_materialmaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join t_supplierdetailsn sd on sd.SupplierID = pm.SupplierID
|
||||
left join t_configdetails cd on cd.key = mm.category
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027' and sd.SupplierName is not null and month(pm.PODate) = month(current_date()) and sd.SupplierID = '" . $sup . "' and mm.MaterialCode = '" . $mat . "'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
@ -1428,7 +1430,7 @@ group by supplier_name,material_name";
|
||||
{
|
||||
|
||||
|
||||
$sql = "select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, id.QuantityAsPerInvoice as quantity,pl.Rate as rate,round(id.QuantityAsPerInvoice * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',pm.ExchangeRate,0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
$sql = "select cd.ConfigValue as category_name,im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, id.QuantityAsPerInvoice as quantity,pl.Rate as rate,round(id.QuantityAsPerInvoice * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',pm.ExchangeRate,0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
|
||||
@ -1479,6 +1481,7 @@ left join t_service_tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join t_revenue_tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join t_purchaseorder_billupload pb on pb.IGRNO=im.IGRNO
|
||||
left join t_inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO
|
||||
left join t_configdetails cd on cd.key = mm.category
|
||||
where pm.Status != 'ST030' ";
|
||||
|
||||
if ($cname != '') {
|
||||
@ -1528,7 +1531,7 @@ where pm.Status != 'ST030' ";
|
||||
{
|
||||
|
||||
|
||||
$sql = "select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, id.QuantityAsPerInvoice as quantity,pl.Rate as rate,round(id.QuantityAsPerInvoice * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',pm.ExchangeRate,0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
$sql = "select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, id.QuantityAsPerInvoice as quantity,pl.Rate as rate,round(id.QuantityAsPerInvoice * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',pm.ExchangeRate,0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,cd.ConfigValue as category_name,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
|
||||
@ -1574,6 +1577,7 @@ left join t_purchaseorder_lineitem pl on pl.PONO = im.PONO
|
||||
join t_igr_details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
join t_purchaseorder_master pm on pm.PONO = pl.PONO
|
||||
left join t_materialmaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join t_configdetails cd on cd.Key = mm.category
|
||||
left join t_supplierdetailsn sd on sd.SupplierID = pm.SupplierID
|
||||
left join t_service_tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join t_revenue_tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
@ -2001,8 +2005,9 @@ group by supplier_name,material_name";
|
||||
$ab = $yearl;
|
||||
$fa = substr($ab, 0, -5);
|
||||
$aa = substr($ab, 5, 5);
|
||||
$sql = "SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql = "SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.key = year.category
|
||||
where status != 'ST030' and
|
||||
(materialrcvddate >= '" . $fa . "-04-01' and materialrcvddate <= '" . $aa . "-03-31')
|
||||
and sid = '" . $sup . "' and mid= '" . $mat . "'
|
||||
@ -2014,8 +2019,9 @@ group by supplier_name,material_name
|
||||
function ireport_cum_day($sup = null, $mat = null)
|
||||
{
|
||||
|
||||
$sql = "SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql = "SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.key = year.category
|
||||
where status != 'ST030' and
|
||||
date(materialrcvddate) = current_date() and sid = '" . $sup . "' and mid = '" . $mat . "'
|
||||
group by supplier_name,material_name";
|
||||
@ -2032,8 +2038,8 @@ group by supplier_name,material_name";
|
||||
$ab = $yearl;
|
||||
$fa = substr($ab, 0, -5);
|
||||
$aa = substr($ab, 5, 5);
|
||||
$sql = "SELECT cd.ConfigValue as category_id,
|
||||
cd.key, year.category,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
$sql = "SELECT cd.ConfigValue as category_name,cd.key as category_id,
|
||||
year.category,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
FROM (SELECT category,sum(Quantity) as quantity,sum(value) as total
|
||||
FROM igr
|
||||
where status != 'ST030' and
|
||||
@ -2068,8 +2074,9 @@ group by category ";
|
||||
$ab = $yearl;
|
||||
$fa = substr($ab, 0, -5);
|
||||
$aa = substr($ab, 5, 5);
|
||||
$sql = "SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql = "SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.key = igr.category
|
||||
where status != 'ST030' and
|
||||
(materialrcvddate >= '" . $fa . "-04-01' and materialrcvddate <= '" . $aa . "-03-31')
|
||||
and category = '" . $cat . "'
|
||||
@ -2081,8 +2088,9 @@ group by supplier_name,material_name";
|
||||
function rawi_report_cum_month($cat = null)
|
||||
{
|
||||
|
||||
$sql = "SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql = "SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.Key = igr.category
|
||||
where status != 'ST030' and
|
||||
month(materialrcvddate) = month(current_date()) and category = '" . $cat . "'
|
||||
group by supplier_name,material_name";
|
||||
@ -2092,8 +2100,9 @@ group by supplier_name,material_name";
|
||||
function rawi_report_cum_day($cat = null)
|
||||
{
|
||||
|
||||
$sql = "SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql = "SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.Key = igr.category
|
||||
where status != 'ST030' and
|
||||
date(materialrcvddate) = current_date() and category = '" . $cat . "'
|
||||
group by supplier_name,material_name";
|
||||
@ -2131,8 +2140,9 @@ SUM(IF(month(materialrcvddate) = 12, value, 0)) AS vDecember,
|
||||
SUM(IF(month(materialrcvddate) = 1, value, 0)) AS vJanuary,
|
||||
SUM(IF(month(materialrcvddate) = 2, value, 0)) AS vFebruary,
|
||||
SUM(IF(month(materialrcvddate) = 3, value, 0)) AS vMarch,
|
||||
sum(value) as vtotal
|
||||
sum(value) as vtotal,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.Key = igr.category
|
||||
where status != 'ST030' ";
|
||||
|
||||
if ($cname != '') {
|
||||
@ -2158,8 +2168,9 @@ where status != 'ST030' ";
|
||||
|
||||
$sql = "select category,sid,supplier_name,mid,material_name,
|
||||
sum(Quantity) as quantity,
|
||||
sum(value) as total
|
||||
sum(value) as total,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.Key = igr.category
|
||||
where status != 'ST030' and
|
||||
monthname(materialrcvddate) = '" . $m . "' and category = '" . $cat . "' ";
|
||||
if ($fa and $aa != '') {
|
||||
@ -2176,8 +2187,9 @@ monthname(materialrcvddate) = '" . $m . "' and category = '" . $cat . "' ";
|
||||
|
||||
$sql = "select category,sid,supplier_name,mid,material_name,
|
||||
sum(Quantity) as quantity,
|
||||
sum(value) as total
|
||||
sum(value) as total,cd.ConfigValue as category_name
|
||||
FROM igr
|
||||
left join t_configdetails cd on cd.Key = igr.category
|
||||
where status != 'ST030' and
|
||||
category = '" . $cat . "' ";
|
||||
if ($fa and $aa != '') {
|
||||
|
||||
@ -132,6 +132,18 @@ class Purchaseorder_model extends Model
|
||||
return $r;
|
||||
}
|
||||
|
||||
function getOldReqDetailsQuantity($Reqnumber, $MaterialCode,$ItemNo){
|
||||
$builder = $this->db->table('t_requestion_details')
|
||||
->select('Quantity')
|
||||
->where('ItemNo', $ItemNo)
|
||||
->where('ReqNo', $Reqnumber)
|
||||
->where('MaterialCode', $MaterialCode);
|
||||
$query = $builder->get()->getRow();
|
||||
|
||||
$Quantity = $query ? $query->Quantity : 0;
|
||||
return $Quantity;
|
||||
}
|
||||
|
||||
|
||||
function IGRDetailsupdate($PONO)
|
||||
{
|
||||
|
||||
@ -3027,6 +3027,11 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
|
||||
SelectedMaterialCode.splice(SelectedMaterialCode.indexOf('removeItem'), 1);
|
||||
$.each(SelectedMaterialList.Mat, function (i, el) {
|
||||
if (this.materialCode == removeItem) { //Type = '';
|
||||
SelectedMaterialList.Mat.splice(i, 1);
|
||||
}
|
||||
});
|
||||
var x = <?php echo json_encode($POItem, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
var result = '0';
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<?php echo $rel->category; ?>
|
||||
<?php echo $rel->category_name; ?>
|
||||
</td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>&m=<?php echo $m; ?>"><?php echo $rel->supplier_name; ?> </a>
|
||||
@ -174,6 +174,7 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// "footerCallback": function ( row, data, start, end, display ) {
|
||||
// var api = this.api(), data;
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ $vtot = 0;
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Material Master</a></li>
|
||||
<li class="breadcrumb-item active">
|
||||
<h4 class="page-title"><b> Consolidate (Category-Wise) <?php echo isset($client_name) ? $client_name : ''; ?> <?php echo isset($financialyear) ? "(" . $financialyear . ")" : ''; ?> </b></h4>
|
||||
<h4 class="page-title"><b> Consolidate (Category-Wise) </b></h4>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -85,7 +85,8 @@ $vtot = 0;
|
||||
<?php
|
||||
foreach ($material as $item): { ?>
|
||||
|
||||
<option value="<?php echo $item->Category; ?>"><?php echo $item->Category; ?></option>
|
||||
|
||||
<option <?php if(isset($client_name) && ($client_name == $item->Category)){ echo 'selected'; } ?> value="<?php echo $item->Category; ?>"><?php echo $item->Category_name; ?></option>
|
||||
|
||||
|
||||
<?php }
|
||||
@ -185,7 +186,7 @@ $vtot = 0;
|
||||
foreach ($spurchse as $index => $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&cat=<?php echo $result->category; ?>"><?php echo $result->category; ?> </a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&cat=<?php echo $result->category; ?>"><?php echo $result->category_name; ?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><span id="april_qty<?php echo $index ?>">
|
||||
<?php
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<?php echo $rel->category; ?>
|
||||
<?php echo $rel->category_name; ?>
|
||||
</td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?> </a>
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
foreach ($cum_day as $rel) {
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category; ?></span></td>
|
||||
<td><span><?php echo $rel->category_name; ?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&d=<?php echo $d; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?></a>
|
||||
</span></td>
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
foreach ($cum_month as $rel) {
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category; ?></span></td>
|
||||
<td><span><?php echo $rel->category_name; ?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&m=<?php echo $month; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?></a>
|
||||
</span></td>
|
||||
|
||||
@ -99,7 +99,7 @@ if (date('m') >= 4) {
|
||||
?></a>
|
||||
</span></td>-->
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->category; ?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->category_name; ?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span id="d_qty<?php echo $index; ?>">
|
||||
<?php
|
||||
|
||||
@ -79,7 +79,7 @@ $yearl;
|
||||
foreach ($cum_year as $rel) {
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category; ?></span></td>
|
||||
<td><span><?php echo $rel->category_name; ?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?></a>
|
||||
</span></td>
|
||||
|
||||
@ -259,7 +259,7 @@
|
||||
<td style="text-align:right"><span><?php echo $rel->created_time; ?></span></td>
|
||||
<td style="text-align:center"><span><?php echo $rel->materialrcvddate; ?></span></td>
|
||||
<td><span><?php echo $rel->material_name; ?></span></td>
|
||||
<td><span><?php echo $rel->category; ?></span></td>
|
||||
<td><span><?php echo $rel->category_name; ?></span></td>
|
||||
<td><span><?php echo $rel->supplier_name; ?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_qty = $tot_qty + round($rel->quantity);
|
||||
|
||||
@ -1815,7 +1815,7 @@ if (!empty($EmpDetails)) {
|
||||
reasonTextarea.setAttribute("required", "true");
|
||||
reasonTextarea.focus(); // Auto-focus
|
||||
|
||||
alert("please Enter the reason!");
|
||||
alert("Please enter the Reason!");
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2516,7 +2516,7 @@ if (!empty($RequistionDetails)) {
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
} else if ($('#imBasicPrice').val() == '') {
|
||||
alert('Please Enter Basic Price In Us');
|
||||
alert('Please Enter the Basic Price');
|
||||
$('#imBasicPrice').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -570,7 +570,7 @@ if (!empty($getlogpodtl)) {
|
||||
resetTaxField();
|
||||
if (id != '0') {
|
||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
|
||||
for (i = 0; i < Material.length; i++) {
|
||||
$.each(Material[i], function (idx, obj) {
|
||||
if (obj.MaterialCode === id) {
|
||||
|
||||
@ -4637,7 +4637,7 @@ if (!empty($getlogpodtl)) {
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
} else if ($('#imBasicPrice').val() == '') {
|
||||
alert('Please Enter Basic Price In Us');
|
||||
alert('Please Enter the Basic Price');
|
||||
$('#imBasicPrice').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -105,7 +105,8 @@
|
||||
<td><?= esc($stdate) ?></td>
|
||||
<td><?= esc($eddate) ?></td>
|
||||
<td><?= esc($d['no_of_days']) ?></td>
|
||||
<td class="auditor-restricted security-restricted labstaff-restricted stock-restricted"><?php if($d['status'] !== "Approved"){ ?>
|
||||
<td class="auditor-restricted security-restricted labstaff-restricted stock-restricted">
|
||||
|
||||
<select
|
||||
class="form-control"
|
||||
name="drpStatus"
|
||||
@ -117,9 +118,7 @@
|
||||
<option value="Approved" <?php echo ($d['status'] == 'Approved') ? 'selected' : ''; ?> >Approve</option>
|
||||
<option value="Cancel" <?php echo ($d['status'] == 'Cancel') ? 'selected' : ''; ?> >Cancel</option>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo esc($d['status']);
|
||||
} ?>
|
||||
<!-- <?php if($d['status'] !== "Approved"){ }else{ echo esc($d['status']); } ?> -->
|
||||
</td>
|
||||
|
||||
|
||||
@ -267,9 +266,6 @@
|
||||
</div><!-- /.m o d a l-d i a l o g -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
||||
|
||||
@ -304,6 +300,19 @@
|
||||
validateDateRange();
|
||||
});
|
||||
|
||||
$('#status_val').change(function() {
|
||||
var status = $('#status_val').val();
|
||||
var role = "<?php echo session()->get('roleText'); ?>";
|
||||
$("#tempClick").show();
|
||||
if (role === 'System Administrator') {
|
||||
$("#tempClick").show();
|
||||
}
|
||||
var restrictedRoles = ['Auditor','Security','Stock Handler','Lab Staff'];
|
||||
if (restrictedRoles.includes(role) && status === 'Approved') {
|
||||
$("#tempClick").hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#applicationModal").on("shown.bs.modal", function (e) {
|
||||
var id = $(e.relatedTarget).data('id');
|
||||
@ -319,14 +328,24 @@
|
||||
$("#tempClick").show();
|
||||
} else {
|
||||
$('#applicationformTitle').text(arr.status === "Approved" ? "View Leave" : "Edit Leave");
|
||||
$("#tempClick").toggle(arr.status !== "Approved");
|
||||
// $("#tempClick").toggle(arr.status !== "Approved");
|
||||
var role = "<?php echo session()->get('roleText'); ?>";
|
||||
if (role === 'System Administrator') {
|
||||
$("#tempClick").show();
|
||||
}
|
||||
var restrictedRoles = ['Auditor','Security','Stock Handler','Lab Staff'];
|
||||
if (restrictedRoles.includes(role) && arr.status === "Approved") {
|
||||
$("#tempClick").hide();
|
||||
}else{
|
||||
$("#tempClick").show();
|
||||
}
|
||||
}
|
||||
|
||||
if (id == 0 || arr.status !== "Approved") {
|
||||
$("#emp_name, #start_date, #end_date, #status_val, #reason").prop({readonly: false, disabled: false});
|
||||
$("#start_date, #end_date").prop('required', true);
|
||||
} else {
|
||||
$("#emp_name, #status_val").prop('disabled', true);
|
||||
$("#emp_name").prop('disabled', true);
|
||||
}
|
||||
|
||||
if (arr.emp_id) $("#emp_name").val(arr.emp_id).select2();
|
||||
|
||||
@ -3699,7 +3699,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
} else if ($('#imBasicPrice').val() == '') {
|
||||
alert('Please Enter Basic Price In Us');
|
||||
alert('Please Enter the Basic Price');
|
||||
$('#imBasicPrice').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -565,6 +565,7 @@ if (!empty($Emp)) {
|
||||
if (document.getElementById('Items').rows.length < 0) {
|
||||
alert('Please Select Line item to Create Requisition');
|
||||
$('#Deliverydt').focus();
|
||||
$('#loader').hide();
|
||||
return false;
|
||||
} else {
|
||||
var serviceSchedule = '';
|
||||
@ -597,16 +598,18 @@ if (!empty($Emp)) {
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
|
||||
$('#loader').hide();
|
||||
window.location = "Requisition";
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
$('#loader').hide();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(error){
|
||||
console.log("error occurred..!!")
|
||||
$('#loader').hide();
|
||||
console.error(error);
|
||||
},
|
||||
complete : function (){
|
||||
@ -617,6 +620,8 @@ if (!empty($Emp)) {
|
||||
});
|
||||
}
|
||||
|
||||
}else{
|
||||
$('#loader').hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -827,10 +832,7 @@ if (!empty($Emp)) {
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(".requistion").submit(function(e) {
|
||||
|
||||
|
||||
|
||||
$(".requistion").submit(function(e) {
|
||||
// var id = '<?php //echo REQ_PENDING_APPROVAL;
|
||||
?>' // don't delete 22/04/2022
|
||||
var id = '<?php echo REQ_APPROVED; ?>'
|
||||
@ -878,15 +880,18 @@ if (!empty($Emp)) {
|
||||
$('#txtDeletedRow').val('');
|
||||
|
||||
window.location = "Requisition";
|
||||
$('#loader').hide();
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
$('#loader').hide();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(error){
|
||||
console.log("error occurred..!!");
|
||||
console.error(error);
|
||||
$('#loader').hide();
|
||||
},
|
||||
complete : function (){
|
||||
$('#loader').hide();
|
||||
@ -894,6 +899,7 @@ if (!empty($Emp)) {
|
||||
}
|
||||
|
||||
});
|
||||
$('#loader').hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user