add import Po
This commit is contained in:
parent
9d9ba8ff43
commit
848dca647c
@ -65,7 +65,6 @@ define('REQITEM_DELIVERED', 'ST011');
|
||||
define('REQ_DELETED', 'ST013');
|
||||
define('REQITEM_POCREATED', 'ST022');
|
||||
define('REQITEM_PARTIALLY_PO_CREATED', 'ST023');
|
||||
define('REQITEM_Emergency_PO_CREATED', 'ST024');
|
||||
|
||||
|
||||
define('REQUISTSTATUS', '0');
|
||||
@ -94,8 +93,6 @@ define('TRP', 'DEP07');
|
||||
define('COATING', 'DEP08');
|
||||
define('MAINTENANANCE', 'DEP09');
|
||||
define('FINANCE', 'DEP10');
|
||||
define('PURCHASE', 'DEP11');
|
||||
define('MANAGEMENT', 'DEP12');
|
||||
|
||||
/* PO Type */
|
||||
define('REVENUE', 'REVENUE');
|
||||
@ -153,6 +150,8 @@ define('SERVICETAX_KRISHIKALYAN', '(((.5)/100) * b
|
||||
define('SERVICETAX_SWACHHBHARAT', '(((.5)/100) * basicValue)');
|
||||
|
||||
/*IMPORT PO CALCULATIONS*/
|
||||
|
||||
|
||||
define('LOADING_CHARGE', '(txtlanding*txtbasicprice/100)');
|
||||
define('HIGHSEAS_SALES', '(totalhighsess*highsesspercentage/100)');
|
||||
define('CUSTOM_DUTY', '(sumcustom*txtcustompercentage)/100');
|
||||
@ -168,8 +167,9 @@ define('GROSS_DUTY', 'landingcha+highsesssalless+customcha+excisecha+exciseedc
|
||||
define('PURCHASE_RATE', 'txtbasicinrprice/txtCtablequantity');
|
||||
define('CUSTOMDUTY_EXP', 'txtgrossexp/txtCtablequantity');
|
||||
define('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp');
|
||||
define('CALCULATE_TOTAL', 'txtrmc+basicamt');
|
||||
|
||||
|
||||
|
||||
/* End of file constants.php */
|
||||
/* Location: ./application/config/constants.php */
|
||||
/* Location: ./application/config/constants.php */
|
||||
File diff suppressed because it is too large
Load Diff
@ -78,8 +78,7 @@ class Login extends CI_Controller
|
||||
'DEPCode'=>$res->DEPCode,
|
||||
'HeadDept'=>$res->HeadDept,
|
||||
'DepartmentName'=>$res->DepartmentName,
|
||||
'isLoggedIn' => TRUE,
|
||||
'EmpID' => $res->EmpID
|
||||
'isLoggedIn' => TRUE
|
||||
);
|
||||
|
||||
$this->session->set_userdata($sessionArray);
|
||||
@ -254,4 +253,3 @@ class Login extends CI_Controller
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ class purchaseorder extends BaseController
|
||||
$ViewName = '';
|
||||
if($ReqType == REVENUE)
|
||||
{
|
||||
$ViewName = 'Purchaseorder';
|
||||
$ViewName = 'purchaseorder';
|
||||
}
|
||||
else if($ReqType == SERVICE)
|
||||
{
|
||||
@ -806,6 +806,243 @@ class purchaseorder extends BaseController
|
||||
echo "Successfully Deleted the Line item".$LineItemNo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function addNewImportPurchaseOrder()
|
||||
{//echo ("ggh");
|
||||
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
|
||||
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$TotalOrder = $this->input->post('txtToatlOrder');
|
||||
$POStatus = $this->input->post('textStatus');
|
||||
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
//echo($SupplierID);
|
||||
|
||||
//echo($dt);
|
||||
//echo($Deliverydt);
|
||||
//echo($POType);
|
||||
//echo($PoRange);
|
||||
//echo($TotalOrder);
|
||||
//echo($POStatus);
|
||||
//echo($SupplierID);
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
|
||||
|
||||
$PONO = '';
|
||||
if(count($POMaster)>0)
|
||||
{
|
||||
$PONO = $POMaster[0]['PONO'];
|
||||
}
|
||||
//echo $PONO;
|
||||
//echo $POType;
|
||||
// PO Line Items
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
//echo ' test:'.REVENUE;
|
||||
//echo $RowCount;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
//echo "AS";
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
|
||||
$Exchangerate = $this->input->post('Exchangerate'.$i);
|
||||
$BasicPriceinmton = $this->input->post('BasicPriceinUS'.$i);
|
||||
$Productprice = $this->input->post('BasicAmt'.$i);
|
||||
$LandingCharge = $this->input->post('AfterLandingChargee'.$i);
|
||||
$HighSeas = $this->input->post('AfterHighseass'.$i);
|
||||
$CustomDuty = $this->input->post('AfterCustomduty'.$i);
|
||||
$ExciseDuty = $this->input->post('AfterExcisedutyTax'.$i);
|
||||
$ExciseDutyEd = $this->input->post('AfterExcisedutyED'.$i);
|
||||
$ExciseDutySH = $this->input->post('AfterExcisedutySH'.$i);
|
||||
$CustomEd= $this->input->post('AfterCustomEDcess'.$i);
|
||||
$CustomSH = $this->input->post('AfterCustomSHcess'.$i);
|
||||
$AddAdtional = $this->input->post('AfterAdditionalExciseduty'.$i);
|
||||
|
||||
|
||||
echo $BasicPriceinmton;
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
for($j = 1; $j < count($comma_separated); $j++)
|
||||
{
|
||||
$deletedRow = $comma_separated[$j] ;
|
||||
|
||||
if($deletedRow == $i )
|
||||
{
|
||||
$SkipInsert = "True";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
$LineItemNo = '';
|
||||
if(count($POLineItem)>0)
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
|
||||
if(trim($POType) == IMPORT )
|
||||
{
|
||||
// echo 'Success';
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'ExciseDuty'=>$ExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd, 'ExciseDutyS&HCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomS&HCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
|
||||
|
||||
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
|
||||
//echo 'Revenue tax Success';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
|
||||
function EditImportPurchaseOrder()
|
||||
{
|
||||
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
|
||||
//$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$TotalOrder = $this->input->post('txtTotalOrder');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
// PO Master
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
|
||||
|
||||
//echo $RowCount;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
|
||||
$Exchangerate = $this->input->post('ExchangeRate'.$i);
|
||||
$BasicPriceinmton = $this->input->post('imBasicPrice'.$i);
|
||||
$Productprice = $this->input->post('BasicValue'.$i);
|
||||
$LandingCharge = $this->input->post('txttotallanding'.$i);
|
||||
$HighSeas = $this->input->post('txttotalhighseas'.$i);
|
||||
$CustomDuty = $this->input->post('txttotalcustom'.$i);
|
||||
$ExciseDuty = $this->input->post('txttotalexcise'.$i);
|
||||
$ExciseDutyEd = $this->input->post('txttotalexciseED'.$i);
|
||||
$ExciseDutySH = $this->input->post('txttotalexciseSH'.$i);
|
||||
$CustomEd= $this->input->post('txttotalcustomED'.$i);
|
||||
$CustomSH = $this->input->post('txttotalcustomSH'.$i);
|
||||
$AddAdtional = $this->input->post('txttotalAdditionalExciseduty'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$LineItemNo = '';
|
||||
|
||||
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
for($j = 1; $j < count($comma_separated); $j++)
|
||||
{
|
||||
$deletedRow = $comma_separated[$j] ;
|
||||
|
||||
if($deletedRow == $i )
|
||||
{
|
||||
$SkipInsert = "True";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
if(strlen($POLineItemNo) == 0)
|
||||
{
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter);
|
||||
if(count($POLineItem)>0)
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$LineItemNo = $POLineItemNo;
|
||||
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
||||
|
||||
}
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
|
||||
if(count($isExists) == 0)
|
||||
{
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'ExciseDuty'=>$ExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd, 'ExciseDutyS&HCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomS&HCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
|
||||
|
||||
$ImportList = $this->purchaseorder_model->addImportTax($RevenueTaxList);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'ExciseDuty'=>$ExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd, 'ExciseDutyS&HCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomS&HCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
|
||||
|
||||
$this->purchaseorder_model->updateImportTax($LineItemNo,$RevenueTaxList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -16,7 +16,6 @@ class BaseController extends CI_Controller {
|
||||
protected $HeadDept = '';
|
||||
protected $DepartmentName = '';
|
||||
protected $roleText = '';
|
||||
protected $EmpID = '';
|
||||
protected $global = array ();
|
||||
|
||||
/**
|
||||
@ -49,13 +48,10 @@ class BaseController extends CI_Controller {
|
||||
$this->DEPCode = $this->session->userdata ( 'DEPCode' );
|
||||
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
||||
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
||||
$this->EmpID = $this->session->userdata ( 'EmpID' );
|
||||
|
||||
$this->global ['name'] = $this->name;
|
||||
$this->global ['role'] = $this->role;
|
||||
$this->global ['role_text'] = $this->roleText;
|
||||
$this->global ['DEPCode'] = $this->DEPCode;
|
||||
$this->global ['EmpID'] = $this->EmpID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,4 +155,4 @@ class BaseController extends CI_Controller {
|
||||
"segment" => $segment
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ class Login_model extends CI_Model
|
||||
*/
|
||||
function loginMe($email, $password)
|
||||
{
|
||||
$this->db->select('BaseTbl.userId, BaseTbl.password, Emp.EmpID,Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept');
|
||||
$this->db->select('BaseTbl.userId, BaseTbl.password, Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept');
|
||||
$this->db->from('tbl_users as BaseTbl');
|
||||
$this->db->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');
|
||||
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
|
||||
@ -34,4 +34,4 @@ class Login_model extends CI_Model
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,14 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('table').tableSort( {
|
||||
animation :'slide',
|
||||
speed:500
|
||||
} );
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-8'i><'col-sm-4'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
||||
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
||||
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
||||
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>COST LIST</center>
|
||||
<center>Siddharth Industries - Cost Details</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
@ -20,35 +16,23 @@ speed:500
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>CostCenter/addCostCenter">Add New Cost List</a>
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>CostCenter/export_cost">Export Cost Details <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>costcenter/export_cost">Export Cost Details <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
|
||||
<div class="box-tools">
|
||||
<form action="<?php echo base_url() ?>CostCenter/costListing" method="POST" id="searchList">
|
||||
<div class="input-group">
|
||||
<input type="text" name="searchText" value="<?php echo $searchText; ?>" class="form-control input-sm pull-right" style="width: 150px;" placeholder="Search"/>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-sm btn-default searchList"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body table-responsive no-padding" >
|
||||
<table id="datatable" class="table table-hover tableSorter" >
|
||||
<tr bgcolor="steelblue">
|
||||
<th>Cost Center ID</th>
|
||||
<th>Cost Name</th>
|
||||
<th>Description</th>
|
||||
<th>Create Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<div class="col-xs-12">
|
||||
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cost Center ID</th>
|
||||
<th>Cost Name</th>
|
||||
<th>Description</th>
|
||||
<th>Create Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
@ -73,26 +57,28 @@ speed:500
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer clearfix">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
jQuery('ul.pagination li a').click(function (e) {
|
||||
e.preventDefault();
|
||||
var link = jQuery(this).get(0).href;
|
||||
var value = link.substring(link.lastIndexOf('/') + 1);
|
||||
jQuery("#searchList").attr("action", baseURL + "costListing/" + value);
|
||||
jQuery("#searchList").submit();
|
||||
});
|
||||
});
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -79,8 +79,6 @@
|
||||
<!-- fullCalendar 2.2.5-->
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/fullcalendar/fullcalendar.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/fullcalendar/fullcalendar.print.css" media="print">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.error{
|
||||
@ -151,7 +149,7 @@
|
||||
<i class="fa fa-dashboard"></i> <span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
<?php
|
||||
if($role == ROLE_ADMIN || $DEPCode == SALES || $DEPCode == FINANCE )
|
||||
{
|
||||
?>
|
||||
@ -252,7 +250,7 @@
|
||||
<li class="treeview">
|
||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> Requisition<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||
<?php if($role == ROLE_MANAGER || $role == ROLE_EMPLOYEE || $role == ROLE_ADMIN )
|
||||
<?php if($role == ROLE_MANAGER || $role == ROLE_EMPLOYEE || $role == ROLE_ADMIN )
|
||||
{
|
||||
?>
|
||||
<li class="treeview">
|
||||
@ -277,7 +275,7 @@
|
||||
<?Php
|
||||
} ?>
|
||||
<?Php
|
||||
if($DEPCode != FINANCE || $DEPCode == PURCHASE)
|
||||
if($DEPCode == FINANCE)
|
||||
{
|
||||
?>
|
||||
|
||||
@ -296,8 +294,7 @@
|
||||
?>
|
||||
|
||||
<?php
|
||||
//if(($DEPCode == FINANCE && $role == ROLE_MANAGER)|| ($(DEPCode == PURCHASE && $role == ROLE_EMPLOYEE)))
|
||||
if($DEPCode == FINANCE || $DEPCode == PURCHASE )
|
||||
if($DEPCode == FINANCE && $role == ROLE_MANAGER)
|
||||
{
|
||||
?>
|
||||
|
||||
@ -305,8 +302,7 @@
|
||||
<span id="menu" data-toggle="dropdown"><i class="fa fa-first-order"></i> Purchase order<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||
<?php
|
||||
//if($DEPCode != FINANCE || $DEPCode == PURCHASE)
|
||||
if( $DEPCode == PURCHASE)
|
||||
if($DEPCode == FINANCE)
|
||||
{
|
||||
?>
|
||||
<li class="treeview">
|
||||
@ -320,8 +316,7 @@
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
//if($DEPCode == PURCHASE && $role == ROLE_EMPLOYEE)
|
||||
if($DEPCode == PURCHASE )
|
||||
if($DEPCode == FINANCE && $role == ROLE_MANAGER)
|
||||
{
|
||||
?>
|
||||
<li class="treeview">
|
||||
@ -333,36 +328,14 @@
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- For Finance Team for PO approval list-->
|
||||
<?php
|
||||
//if($DEPCode == FINANCE && $role == ROLE_MANAGER)
|
||||
if($DEPCode == FINANCE && $role == ROLE_MANAGER)
|
||||
{
|
||||
?>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>purchaseorder/poapproval">
|
||||
<i class="fa fa-users"></i>
|
||||
<span>Approve Purchase Order</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- this page is for gate keeper for view the full po list-->
|
||||
<?php
|
||||
//if($DEPCode != FINANCE && $DEPCode == PURCHASE)
|
||||
if( $DEPCode == PURCHASE)
|
||||
{
|
||||
?>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>purchaseorder/viewfullpurchaseorder">
|
||||
<i class="fa fa-history"></i>
|
||||
<span>View Purchase Order</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
|
||||
Loading…
Reference in New Issue
Block a user