resico name changed in controller
This commit is contained in:
parent
9537c6de50
commit
a3a3df8c00
@ -1,237 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File and Directory Modes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These prefs are used when checking and setting modes when working
|
||||
| with the file system. The defaults are fine on servers with proper
|
||||
| security, but you may wish (or even need) to change the values in
|
||||
| certain environments (Apache running a separate process for each
|
||||
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
||||
| always be used to set the mode correctly.
|
||||
|
|
||||
*/
|
||||
define('FILE_READ_MODE', 0644);
|
||||
define('FILE_WRITE_MODE', 0666);
|
||||
define('DIR_READ_MODE', 0755);
|
||||
define('DIR_WRITE_MODE', 0777);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File Stream Modes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These modes are used when working with fopen()/popen()
|
||||
|
|
||||
*/
|
||||
|
||||
define('FOPEN_READ', 'rb');
|
||||
define('FOPEN_READ_WRITE', 'r+b');
|
||||
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
|
||||
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
|
||||
define('FOPEN_WRITE_CREATE', 'ab');
|
||||
define('FOPEN_READ_WRITE_CREATE', 'a+b');
|
||||
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
|
||||
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
|
||||
|
||||
/**** USER DEFINED CONSTANTS **********/
|
||||
|
||||
define('ROLE_ADMIN', '1');
|
||||
define('ROLE_MANAGER', '2');
|
||||
define('ROLE_EMPLOYEE', '3');
|
||||
/*define('ROLE_PRODUCTION', '4');
|
||||
define('ROLE_QUALITY', '5');
|
||||
define('ROLE_SECURITY', '6');
|
||||
define('ROLE_SALES', '7');
|
||||
define('ROLE_ACCOUNTS', '8');*/
|
||||
|
||||
|
||||
/***** USER DESIGNATION ******/
|
||||
define('SECURITY', 'SECURITY');
|
||||
|
||||
define('SEGMENT', 2);
|
||||
|
||||
/************** Requistion Status code */
|
||||
define('REQ_DRAFT', 'ST001');
|
||||
define('REQ_PENDING_APPROVAL', 'ST002');
|
||||
define('REQITEM_NEW', 'ST003');
|
||||
define('REQ_APPROVED', 'ST004');
|
||||
define('REQ_PO_CREATED' , 'ST005');
|
||||
define('REQ_REJECTED', 'ST006');
|
||||
define('REQ_CLOSED', 'ST007');
|
||||
define('REQ_ONHOLD', 'ST008');
|
||||
define('REQITEM_ONHOLD', 'ST009');
|
||||
define('REQITEM_PARTIALLY_DELIVERED', 'ST010');
|
||||
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('POLINEITEM_IGR_CREATED', 'ST040');
|
||||
|
||||
/*IGR Status */
|
||||
define('IGR_CREATED', 'ST027');
|
||||
define('IGR_CLOSED', 'ST028');
|
||||
define('IGR_CANCELLED', 'ST029');
|
||||
define('POLINEITEM_IGRPARTIAL_CREATED', 'ST042');
|
||||
/*IGR Status*/
|
||||
|
||||
/*MRIR Status */
|
||||
define('MRIR_CREATED', 'ST041');
|
||||
define('MRIR_APPROVED', 'ST044');
|
||||
define('MRIR_REJECTED', 'ST045');
|
||||
|
||||
define('REQUISTSTATUS', '0');
|
||||
define('REQUISTITEMSTATUS', '1');
|
||||
|
||||
/* Purchase Order Status */
|
||||
|
||||
define('PO_DRAFT', 'ST014');
|
||||
define('PO_CREATED', 'ST015');
|
||||
define('PO_INPROGRESS', 'ST016');
|
||||
define('PO_DISPATCHED', 'ST017');
|
||||
define('PO_DELIVERED', 'ST018');
|
||||
define('PO_CANCELLED', 'ST019');
|
||||
define('PO_ONHOLD', 'ST020');
|
||||
define('PO_CLOSED', 'ST021');
|
||||
define('PO_AMENDED', 'ST030');
|
||||
define('PO_RELEASED', 'ST026');
|
||||
define('PO_AWAITING_RELEASE', 'ST025');
|
||||
define('PO_APPROVED', 'ST025');
|
||||
|
||||
/*store Status*/
|
||||
|
||||
define('STORE_DRAFT', 'ST043');
|
||||
define('STORE_CREATED', 'ST015');
|
||||
|
||||
/*store requisition*/
|
||||
define('STORE REQUISTION STATUS', '6');
|
||||
define('STORE_OPEN', 'ST034');
|
||||
define('STORE_PENDINGAPPROVAL', 'ST035');
|
||||
define('STORE_APPROVAL', 'ST036');
|
||||
define('STORE_ISSUSED', 'ST037');
|
||||
define('STORE_ONHOLD', 'ST038');
|
||||
define('STORE_REJECT', 'ST039');
|
||||
|
||||
|
||||
|
||||
|
||||
/* Department Code */
|
||||
define('ADMIN', 'DEP01');
|
||||
define('QUALITY', 'DEP02');
|
||||
define('STORE', 'DEP03');
|
||||
define('SALES', 'DEP04');
|
||||
define('PRODUCTION', 'DEP05');
|
||||
define('DELIVERY', 'DEP06');
|
||||
define('TRP', 'DEP07');
|
||||
define('COATING', 'DEP08');
|
||||
define('MAINTENANANCE', 'DEP09');
|
||||
define('FINANCE', 'DEP10');
|
||||
define('PURCHASE', 'DEP11');
|
||||
define('MANAGEMENT', 'DEP12');
|
||||
/* PO Type */
|
||||
define('REVENUE', 'REVENUE');
|
||||
define('SERVICE', 'SERVICE');
|
||||
define('IMPORT', 'IMPORT');
|
||||
define('CAPITAL', 'CAPITAL');
|
||||
|
||||
// Tax Type
|
||||
define('PERCENTAGE', 'PERCENTAGE');
|
||||
define('LUMPSUM', 'LUMP SUM');
|
||||
define('NILTYPE', 'NIL');
|
||||
|
||||
// Freight Type
|
||||
define('PERUOM', 'PER UOM');
|
||||
define('PERTRIP', 'PER TRIP');
|
||||
|
||||
|
||||
/* Formula for Tax calculation */
|
||||
/* Discount*/
|
||||
define('DIS_PERCENTAGE', '((Discountval/100) * basicValue)');
|
||||
define('DIS_LUMPSUM', 'Discountval');
|
||||
// Packaging
|
||||
define('PACKAGING_PERCENTAGE_BYDISCOUNTVALUE', '((Packagingvalue/100) * (basicValue-AfterDiscount))');
|
||||
define('PACKAGING_PERCENTAGE_BYBASICVALUE', '(Packagingvalue/100) * basicValue');
|
||||
define('PACKAGING_LUMPSUM_BYDISCOUNTVALUE', 'Packagingvalue');
|
||||
define('PACKAGING_LUMPSUM_BYBASICVALUE', 'Packagingvalue');
|
||||
//Excise
|
||||
define('EXCISE_ONBASICVALUE', '((ExciseDuty/100) * basicValue)');
|
||||
define('EXCISE_ONBASIC_DISCOUNT', '((ExciseDuty/100) * (basicValue-AfterDiscount))');
|
||||
define('EXCISE_ONBASIC_DISCOUNT_PACKAGING', '((ExciseDuty/100) * ((basicValue-AfterDiscount)+ AfterPackaging))');
|
||||
define('EXCISE_ONBASIC_PACKAGING', '((ExciseDuty/100) * (basicValue + AfterPackaging))');
|
||||
|
||||
|
||||
//Vat
|
||||
define('VAT_ONBASICVALUE', '((vatValue/100) * basicValue)');
|
||||
//define('VAT_ONEXICSEVALUE', '((vatValue/100) * (basicValue+ExciseDuty))');
|
||||
define('VAT_ONEXICSEVALUE', '(((basicValue - discountValue) + (packageValue + ExciseDuty)) * (vatValue/100))');
|
||||
|
||||
//CST
|
||||
define('CST_ONBASICVALUE', '((CSTValue/100) * basicValue)');
|
||||
//define('CST_ONEXICSEVALUE', '((CSTValue/100) * (basicValue+ExciseDuty))');
|
||||
define('CST_ONEXICSEVALUE', '(((basicValue - discountValue) + (packageValue + ExciseDuty)) * (CSTValue/100))');
|
||||
//GST
|
||||
define('GSTTAX', '((GSTValue/100) * basicValue)');
|
||||
//Other Tax
|
||||
define('OTHERTAX', '((OtherTaxValue/100) * basicValue)');
|
||||
//Freight Tax
|
||||
define('FREIGHT_PERCENTAGE', '((FreightValue/100) * basicValue)');
|
||||
define('FREIGHT_LUMPSUM', 'FreightValue');
|
||||
define('FREIGHT_PERUOM', 'FreightValue * Quantity');
|
||||
define('FREIGHT_PERTRIP', 'FreightValue');
|
||||
|
||||
/* SERVICE PO VARIABLES */
|
||||
define('SERVICETAX_SERVICETAX_14PERCENT', '((14/100) * basicValue)');
|
||||
define('SERVICETAX_EDUCESS_2PERCENT', '((2/100) * ServiceTaxAmount)');
|
||||
define('SERVICETAX_HIGHEREDUCESS_1PERCENT', '((1/100) * ServiceTaxAmount)');
|
||||
define('SERVICETAX_KRISHIKALYAN', '(((.5)/100) * basicValue)');
|
||||
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');
|
||||
define('EXCISE_DUTY', '(txtexcisesum*txtpercentage)/100');
|
||||
define('EXCISE_ED', '(txtexcise*txtexcisepercentage)/100');
|
||||
define('EXCISE_SH', '(excisetxt*exciseshcess)/100');
|
||||
define('CUSTOM_ED', '(totalval*txtedcesspercentage)/100');
|
||||
define('CUSTOM_SH', '(totcustomsh*txtshpercentage)/100');
|
||||
define('ADDTNL_EXCISEDUTY', '(totaddtnlexcise*addtnpercentage)/100');
|
||||
define('GROSS_EXP', '(txtgrossdutypayable-txtmodvat)');
|
||||
define('AVL_MODVAT', 'txtexciseduty1+txtexciseedcess+txtexciseshcess+txtaddtnlexcise');
|
||||
define('GROSS_DUTY', 'landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh+txtaddtnexciseduty');
|
||||
define('PURCHASE_RATE', 'txtbasicinrprice/quantity');
|
||||
define('CUSTOMDUTY_EXP', 'txtgrossexp/quantity');
|
||||
define('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp');
|
||||
define('CALCULATE_TOTAL', '(txtrmc*quantity)+basicprice');
|
||||
/* Capital Po Calculations */
|
||||
define('Capital_Landing_Charge', 'basicPrice*(landCharge/100)');
|
||||
define('Capital_Highseas_Charge', '((highSeas/100) * (basicPrice+afterLandingCharge))');
|
||||
define('Capital_Customduty_Charge', '((Customduty/100) * (basicPrice+afterLandingCharge+afterHighseas))');
|
||||
define('Capital_Excise_Charge', '((Excise/100) * (basicPrice+afterLandingCharge+afterHighseas+afterCustomduty))');
|
||||
define('Capital_ExciseEDcess_Charge', '(ExciseEDcessCharge/100) * ExciseDuty');
|
||||
define('Capital_ExciseSHcess_Charge', '(ExciseSHcessCharge/100) * ExciseDuty');
|
||||
define('Capital_CustomEDcess_Charge', '((CustomEDcess/100) * (afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess))');
|
||||
define('Capital_CustomSHcess_Charge', '((CustomSHcess/100) * (afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess))');
|
||||
define('Capital_AdditionalExciseduty_Charge', '((AdditionalExciseduty/100) * (basicPrices+afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterCustomEDcess+AfterCustomSHcess))');
|
||||
|
||||
define('Capital_Grossdutypayable_Charge', '(AfterAdditionalExciseduty+afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterCustomEDcess+AfterCustomSHcess)');
|
||||
define('Capital_ModvatCharge_Charge', '(AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterAdditionalExciseduty)');
|
||||
|
||||
define('Capital_Grossexpenses_Charge', '(Grossdutypayable-AvailableModvat)');
|
||||
define('Capital_purchaserate_Charge', '(AfterBasicPriceTax/PurQuantity)');
|
||||
define('Capital_CustomDutyExpenses_Charge', '(Grossexpenses/PurQuantity)');
|
||||
define('Capital_RMCIncludingCustomers_Charge', '(purchaserate+CustomDutyExpenses)');
|
||||
/* calculate cgst sgst igst calculations for service tax*/
|
||||
define('SERVICETAX_CGST', '((Cgst/100) * basicValue)');
|
||||
define('SERVICETAX_SGST', '((Sgst/100) * basicValue)');
|
||||
|
||||
define('SERVICETAX_IGST', '((Igst/100) * basicValue)');
|
||||
|
||||
|
||||
/* End of file constants.php */
|
||||
/* Location: ./application/config/constants.php */
|
||||
@ -112,24 +112,24 @@ $route['editUser'] = "user/editUser";
|
||||
$route['editOldPO'] = "purchaseorder/editOldPO";
|
||||
$route['editOldPO/(:num)'] = "purchaseorder/editOldPO/$1";
|
||||
//$route['editPO'] = "purchaseorder/editPO";
|
||||
$route['editOldsupplier'] = "supplier/editOldsupplier";
|
||||
$route['editOldsupplier/(:num)'] = "supplier/editOldsupplier/$1";
|
||||
//$route['editOldsupplier'] = "supplier/editOldsupplier";
|
||||
//$route['editOldsupplier/(:num)'] = "supplier/editOldsupplier/$1";
|
||||
$route['editsupplier'] = "supplier/editsupplier";
|
||||
|
||||
$route['editOldcost'] = "CostCenter/editOldcost";
|
||||
$route['editOldcost/(:num)'] = "CostCenter/editOldcost/$1";
|
||||
$route['editcost'] = "CostCenter/editcost";
|
||||
|
||||
$route['editOldasset'] = "assetdetails/editOldasset";
|
||||
$route['editOldasset/(:num)'] = "assetdetails/editOldasset/$1";
|
||||
$route['editOldasset'] = "assetdetails/editasset";
|
||||
$route['editOldasset/(:num)'] = "assetdetails/editasset/$1";
|
||||
$route['editasset'] = "assetdetails/editasset";
|
||||
|
||||
$route['editOldemployee'] = "employeedetails/editOldemployee";
|
||||
$route['editOldemployee/(:num)'] = "employeedetails/editOldemployee/$1";
|
||||
$route['editemployee'] = "employeedetils/editemployee";
|
||||
//$route['editOldemployee'] = "employeedetails/editOldemployee";
|
||||
//$route['editOldemployee/(:num)'] = "employeedetails/editOldemployee/$1";
|
||||
$route['editemployee'] = "employeedetails/ViewEmployee";
|
||||
|
||||
$route['editOldRawmaterial/(:num)'] = "rawmaterialdetails/editOldRawmaterial/$1";
|
||||
$route['editOldRawmaterial'] = "rawmaterialdetails/editOldRawmaterial";
|
||||
$route['editRawmaterial/(:num)'] = "rawmaterialdetails/editRawmaterial/$1";
|
||||
$route['editRawmaterial'] = "rawmaterialdetails/editRawmaterial";
|
||||
$route['editrawmaterial'] = "rawmaterialdetails/editemployee";
|
||||
|
||||
//<-----------Application Delete Routes------------>
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Cost Center (Cost Center Controller)
|
||||
* Class : CostCenter (Cost Center Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class CostCenter extends BaseController
|
||||
{
|
||||
@ -29,7 +29,7 @@ class CostCenter extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Cost';
|
||||
$this->global['pageTitle'] = 'Resico : Cost Details';
|
||||
|
||||
$this->loadViews("costListing", $this->global, NULL , NULL);
|
||||
}
|
||||
@ -44,7 +44,7 @@ class CostCenter extends BaseController
|
||||
$data['userRecords'] = $this->costcenter_model->CostListing();
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Cost List';
|
||||
$this->global['pageTitle'] = 'Resico : Cost List';
|
||||
|
||||
$this->loadViews("costListing", $this->global, $data, NULL);
|
||||
|
||||
@ -63,7 +63,7 @@ class CostCenter extends BaseController
|
||||
|
||||
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
|
||||
|
||||
$this->global['pageTitle'] = 'siddharth : Add Cost Center';
|
||||
$this->global['pageTitle'] = 'Resico : Add Cost Center';
|
||||
|
||||
$this->loadViews("addCostCenter", $this->global,$data, NULL);
|
||||
|
||||
@ -175,9 +175,9 @@ class CostCenter extends BaseController
|
||||
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
|
||||
//print_r(count($data['BudType']));
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Cost';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Cost';
|
||||
|
||||
$this->loadViews("editOldcost", $this->global, $data,NULL);
|
||||
$this->loadViews("editCostCenter", $this->global, $data,NULL);
|
||||
|
||||
}
|
||||
|
||||
@ -417,7 +417,7 @@ class CostCenter extends BaseController
|
||||
$data['Cost'] = $this->costcenter_model->getuserinfo($CostCenterID);
|
||||
//$data['users'] = $this->purchaseorder_model->getusers();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : View Cost';
|
||||
$this->global['pageTitle'] = 'Resico : View Cost Details';
|
||||
|
||||
$this->loadViews("viewcost", $this->global, $data,NULL);
|
||||
|
||||
@ -457,7 +457,7 @@ class CostCenter extends BaseController
|
||||
$this->excel->getActiveSheet()->setTitle('Cost Master');
|
||||
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('G3', 'SIDDHARTH INDUSTRIES Cost Master');
|
||||
$this->excel->getActiveSheet()->setCellValue('G3', 'RESICO INDUSTRIES Cost Master');
|
||||
$this->excel->getActiveSheet()->setCellValue('B5', 'S.No');
|
||||
$this->excel->getActiveSheet()->setCellValue('C5', 'CostCenterCode');
|
||||
$this->excel->getActiveSheet()->setCellValue('D5', 'CostCenterName');
|
||||
@ -561,7 +561,7 @@ class CostCenter extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Inward Gate Register Controller (security)
|
||||
* Class : MRIRcontroller (Material Inspection Report - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Saravana kumar
|
||||
* @author : Venba Info Tech - Saravana kumar
|
||||
* @version : 1.1
|
||||
* @since : 10 Jun 2017
|
||||
* @since : 18 Novmeber 2017
|
||||
*/
|
||||
class MRIRcontroller extends BaseController
|
||||
{
|
||||
@ -29,14 +29,14 @@ class MRIRcontroller extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : View material inspection report';
|
||||
$this->global['pageTitle'] = 'Resico : View material inspection report';
|
||||
|
||||
$this->loadViews("viewmaterialinspectionreport", $this->global,NULL , NULL);
|
||||
}
|
||||
/* For Entry MRIR Screen*/
|
||||
function materialinspectionreport($mrir='',$IGRNO='')
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Material Inspection Report';
|
||||
$this->global['pageTitle'] = 'Resico : Material Inspection Report';
|
||||
|
||||
$this->load->model('mrir_model');
|
||||
|
||||
@ -50,7 +50,7 @@ class MRIRcontroller extends BaseController
|
||||
$MrirNo = $_GET['MRIRNO'];
|
||||
// echo $MrirNo;
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : MRIR Pdf ';
|
||||
$this->global['pageTitle'] = 'Resico : MRIR Pdf ';
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
|
||||
//print_r($data['CompanyDetails']);
|
||||
$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);
|
||||
@ -77,7 +77,7 @@ class MRIRcontroller extends BaseController
|
||||
|
||||
public function viewmrirforbilling()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Billing ';
|
||||
$this->global['pageTitle'] = 'Resico : Billing ';
|
||||
$data['Billing'] = $this->mrir_model->view_mrir_Billing();
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ class MRIRcontroller extends BaseController
|
||||
}
|
||||
public function viewmMaterialDistributionList()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Distribution list ';
|
||||
$this->global['pageTitle'] = 'Resico : Distribution list ';
|
||||
|
||||
$data['Distribution'] = $this->mrir_model->ViewDistributionList();
|
||||
$data['status'] = $this->mrir_model->getStatus();
|
||||
@ -102,7 +102,7 @@ public function viewmMaterialDistributionList()
|
||||
|
||||
$data['IGRDetails'] = $this->mrir_model->get_IGR($IgrNo);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : IGR Details ';
|
||||
$this->global['pageTitle'] = 'Resico: IGR Details ';
|
||||
|
||||
$this->loadViews("materialinspectionreport", $this->global, $data,NULL);
|
||||
|
||||
@ -110,7 +110,7 @@ public function viewmMaterialDistributionList()
|
||||
function viewinwardgateregister()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : View Inward Gate Register';
|
||||
$this->global['pageTitle'] = 'Resico : View Inward Gate Register';
|
||||
|
||||
$data['IGR']= $this->mrir_model->ViewigrListing();
|
||||
|
||||
@ -126,7 +126,7 @@ public function viewmMaterialDistributionList()
|
||||
|
||||
$data['viewmrirdatas'] = $this->mrir_model-> view_mrir();
|
||||
//old name:mrirdatas2
|
||||
$this->global['pageTitle'] = 'Siddharth : View Material Inspection Report';
|
||||
$this->global['pageTitle'] = 'Resico : View Material Inspection Report';
|
||||
//print_r( $data);
|
||||
$this->loadViews("viewmaterialinspectionreport", $this->global,$data,NULL);
|
||||
|
||||
@ -143,7 +143,7 @@ public function viewmMaterialDistributionList()
|
||||
$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);//get_MRIR_Values($MrirNo);
|
||||
//print_r($data['MRIRDetails']);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Material Inspection Report';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Material Inspection Report';
|
||||
|
||||
$this->loadViews("Editmaterialinspectionreport", $this->global,$data,NULL);
|
||||
|
||||
@ -375,7 +375,7 @@ public function viewmMaterialDistributionList()
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,9 +5,9 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
/**
|
||||
* Class : Amendment Purchase Order controller
|
||||
* User Class to control all user related operations.
|
||||
* @author : Velmurugan
|
||||
* @author : Venba Info Tech - Velmurugan
|
||||
* @version : 1.1
|
||||
* @since : 10 Jul 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class amendmentpurchaseorder extends BaseController
|
||||
{
|
||||
@ -36,7 +36,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
|
||||
$forwhat='amendment';
|
||||
$data['POData'] = $this->purchaseorder_model->purchaseorderListing($forwhat);
|
||||
$this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
|
||||
$this->global['pageTitle'] = 'Resico : Amendment Purchase Order';
|
||||
$this->loadviews('AmendPOlist',$this->global,$data,NULL);
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Service Purchase order form';
|
||||
$this->loadViews("editServiceAmendPO", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == REVENUE)
|
||||
@ -126,7 +126,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
//echo "FROM CON";
|
||||
//print_r($data['Payment']);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
//print_r($unicode);
|
||||
$data['unicode']=$unicode;
|
||||
$data['currencycode']=$currencycode;
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Import Purchase order form';
|
||||
$this->loadViews("editImportAmendPO", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == CAPITAL)
|
||||
@ -246,7 +246,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
}
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Capital Purchase order form';
|
||||
$this->loadViews("editCapitalAmendPO", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : purchaseorder (PurchaseorderController)
|
||||
* Class : assetdetails (Asset Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class assetdetails extends BaseController
|
||||
{
|
||||
@ -26,7 +26,7 @@ class assetdetails extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Asset Details';
|
||||
$this->global['pageTitle'] = 'Resico : Asset Details';
|
||||
|
||||
$this->loadViews("assetListing", $this->global, NULL , NULL);
|
||||
}
|
||||
@ -41,7 +41,7 @@ class assetdetails extends BaseController
|
||||
|
||||
$data['userRecords'] = $this->assetdetails_model->assetListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Asset List';
|
||||
$this->global['pageTitle'] = 'Resico : Asset List';
|
||||
//print_r($data);die();
|
||||
$this->loadViews("assetListing", $this->global, $data, NULL);
|
||||
|
||||
@ -56,7 +56,7 @@ class assetdetails extends BaseController
|
||||
$data['po'] = $this->assetdetails_model->getPO();
|
||||
|
||||
//print_r($data);die();
|
||||
$this->global['pageTitle'] = 'siddharth : Add Asset';
|
||||
$this->global['pageTitle'] = 'Resico : Add Asset';
|
||||
|
||||
$this->loadViews("addasset", $this->global, $data, NULL);
|
||||
|
||||
@ -301,9 +301,9 @@ class assetdetails extends BaseController
|
||||
$data['AssetStatusList'] = $this->assetdetails_model->getConfigValue('C015');
|
||||
$data['PO'] = $this->assetdetails_model->getPO($PO);
|
||||
//print_r($data);die();
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Asset';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Asset';
|
||||
|
||||
$this->loadViews("editOldasset", $this->global, $data,NULL);
|
||||
$this->loadViews("editasset", $this->global, $data,NULL);
|
||||
|
||||
}
|
||||
|
||||
@ -435,7 +435,7 @@ class assetdetails extends BaseController
|
||||
|
||||
$this->excel->getActiveSheet()->setTitle('Asset Details');
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('G3', 'SIDDHARTH INDUSTRIES Asset Details');
|
||||
$this->excel->getActiveSheet()->setCellValue('G3', 'RESICO INDUSTRIES Asset Details');
|
||||
$this->excel->getActiveSheet()->setCellValue('C5', 'AssetCode');
|
||||
$this->excel->getActiveSheet()->setCellValue('D5', 'AssetName');
|
||||
$this->excel->getActiveSheet()->setCellValue('E5', 'AssetDescription');
|
||||
@ -552,7 +552,7 @@ class assetdetails extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Employee (Employee Controller)
|
||||
* Class : companycontroller (Company Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @author :Venba Info Tech - Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 07 Apr 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class companycontroller extends BaseController
|
||||
{
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Supplier Controller (supplier)
|
||||
* Class : configurationctrl (Configuration Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Surendar
|
||||
* @author :Venba Info Tech - Surendar
|
||||
* @version : 1.1
|
||||
* @since : 26 July 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class configurationctrl extends BaseController
|
||||
{
|
||||
@ -27,7 +27,7 @@ class configurationctrl extends BaseController
|
||||
public function index()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Supplier';
|
||||
$this->global['pageTitle'] = 'Resico : Config Details';
|
||||
|
||||
$this->loadViews("configlisting", $this->global, NULL , NULL);
|
||||
}
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Supplier Controller (supplier)
|
||||
* Class : department (Department Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @author : Venba Info Tech - Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 12 Apr 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class department extends BaseController
|
||||
{
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : purchaseorder (PurchaseorderController)
|
||||
* Class : emergencypurchaseorder (Emergency Purchase Order - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class emergencypurchaseorder extends BaseController
|
||||
{
|
||||
@ -30,7 +30,7 @@ class emergencypurchaseorder extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : AddPO';
|
||||
$this->global['pageTitle'] = 'Resico : AddPO';
|
||||
|
||||
$this->loadViews("addPO", $this->global, NULL , NULL);
|
||||
}
|
||||
@ -42,7 +42,7 @@ class emergencypurchaseorder extends BaseController
|
||||
$data['stList'] = $this->purchaseorder_model->getStatusListforAllReq();
|
||||
|
||||
$data['ReqList'] = $this->purchaseorder_model->getRequistionListbySearch();
|
||||
$this->global['pageTitle'] = 'Siddharth : Create PO from Requisition List';
|
||||
$this->global['pageTitle'] = 'Resico : Create PO from Requisition List';
|
||||
|
||||
$this->loadViews("createPOfromRequistion", $this->global, $data,Null);
|
||||
}
|
||||
@ -50,7 +50,7 @@ class emergencypurchaseorder extends BaseController
|
||||
function CreateEmergencyPO()
|
||||
{
|
||||
$RequestedBy = $this->session->userdata ('EmpID');
|
||||
$this->global['pageTitle'] = 'Siddharth : Create Emergency Purchase Order';
|
||||
$this->global['pageTitle'] = 'Resico : Create Emergency Purchase Order';
|
||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C004');
|
||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||
$data['INRSYMBOL']=$this->purchaseorder_model->GetINRCurrencytype('INR');
|
||||
@ -447,7 +447,7 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
$this->purchaseorder_model->UpdateRequistionStatus();
|
||||
$data['POData'] = $this->purchaseorder_model->purchaseorderListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase Orders';
|
||||
$this->global['pageTitle'] = 'Resico : Purchase Orders';
|
||||
|
||||
$this->loadViews("POlist", $this->global, $data, NULL);
|
||||
|
||||
@ -487,7 +487,7 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
else
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Purchase order form';
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||
@ -571,14 +571,14 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
{
|
||||
|
||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Service Purchase order form';
|
||||
$this->loadViews("EditservicePurchaseorder", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == REVENUE)
|
||||
{
|
||||
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
@ -1036,7 +1036,7 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Employee (Employee Controller)
|
||||
* Class : employeedetails (Employee Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @author :Venba Info Tech - Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 07 Apr 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class employeedetails extends BaseController
|
||||
{
|
||||
@ -19,7 +19,7 @@ class employeedetails extends BaseController
|
||||
parent::__construct();
|
||||
$this->load->model('employeedetails_model');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the user
|
||||
*/
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Cost Center (Cost Center Controller)
|
||||
* Class : emppaydate (Employee Payment details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class emppaydate extends BaseController
|
||||
{
|
||||
@ -30,7 +30,7 @@ class emppaydate extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Employee Pay Details';
|
||||
$this->global['pageTitle'] = 'Resico : Employee Pay Details';
|
||||
|
||||
$this->loadViews("emppayListing", $this->global);
|
||||
}
|
||||
@ -46,7 +46,7 @@ class emppaydate extends BaseController
|
||||
|
||||
$data['userRecords'] = $this->emppaydate_model->emppayListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Employee Pay List';
|
||||
$this->global['pageTitle'] = 'Resico : Employee Pay List';
|
||||
|
||||
$this->loadViews("emppayListing", $this->global, $data, NULL);
|
||||
}
|
||||
@ -63,7 +63,7 @@ class emppaydate extends BaseController
|
||||
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Add Employee Pay';
|
||||
$this->global['pageTitle'] = 'Resico : Add Employee Pay';
|
||||
|
||||
$this->loadViews("addemppaydate", $this->global,$result);
|
||||
|
||||
@ -173,7 +173,7 @@ class emppaydate extends BaseController
|
||||
$data['emppay'] = $this->emppaydate_model->getUserInfo($paydataid);
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Employee Pay Monthly Details ';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Employee Pay Monthly Details ';
|
||||
|
||||
$this->loadViews("editOldemppay", $this->global, $data,NULL);
|
||||
|
||||
@ -328,7 +328,7 @@ class emppaydate extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -5,9 +5,9 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
/**
|
||||
* Class : Inward Gate Register Controller (security)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Saravana kumar
|
||||
* @author :Venba Info Tech - Saravana kumar
|
||||
* @version : 1.1
|
||||
* @since : 8 Jun 2017
|
||||
* @since :18 November 2017
|
||||
*/
|
||||
class inwardgateregister extends BaseController
|
||||
{
|
||||
@ -29,7 +29,7 @@ class inwardgateregister extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register';
|
||||
$this->global['pageTitle'] = 'Resico : Inward Gate Register';
|
||||
|
||||
$this->loadViews("viewinwardgateregister", $this->global,NULL , NULL);
|
||||
}
|
||||
@ -38,7 +38,7 @@ class inwardgateregister extends BaseController
|
||||
function viewIGRDetails()
|
||||
{
|
||||
$this->load->model('inwardgateregister_model');
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register Details';
|
||||
$this->global['pageTitle'] = 'Resico : Inward Gate Register Details';
|
||||
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
||||
|
||||
$this->loadViews("viewIGRDetails",$this->global,$data,NULL);
|
||||
@ -48,7 +48,7 @@ class inwardgateregister extends BaseController
|
||||
{
|
||||
|
||||
$this->load->model('inwardgateregister_model');
|
||||
$this->global['pageTitle'] = 'Siddharth : Add Inward Gate Register';
|
||||
$this->global['pageTitle'] = 'Resico : Add Inward Gate Register';
|
||||
|
||||
|
||||
$data['PO_NO'] = $this->inwardgateregister_model->getpurchaseorder();
|
||||
@ -202,7 +202,7 @@ class inwardgateregister extends BaseController
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class : Login (LoginController)
|
||||
* Class : Login (Login - Controller)
|
||||
* Login class to control to authenticate user credentials and starts user's session.
|
||||
* @author : Kishor Mali
|
||||
* @author : Venba Info Tech
|
||||
* @version : 1.1
|
||||
* @since : 15 November 2016
|
||||
* @since :18 November 2017
|
||||
*/
|
||||
class Login extends CI_Controller
|
||||
{
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Cost Center (Cost Center Controller)
|
||||
* Class : monthlypay (Monthly Payment Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since :18 November 2017
|
||||
*/
|
||||
class monthlypay extends BaseController
|
||||
{
|
||||
@ -29,7 +29,7 @@ class monthlypay extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Monthly Pay Details';
|
||||
$this->global['pageTitle'] = 'Resico: Monthly Pay Details';
|
||||
|
||||
$this->loadviews('monthlyListing',$this->global);
|
||||
}
|
||||
@ -39,7 +39,7 @@ class monthlypay extends BaseController
|
||||
|
||||
|
||||
$data['days'] = $this-> monthlypay_model->getPublicHoldays();
|
||||
$this->global['pageTitle'] = 'Siddharth : Public Holidays';
|
||||
$this->global['pageTitle'] = 'Resico : Public Holidays';
|
||||
|
||||
$this->loadviews('publicholidays',$this->global,$data,NULL);
|
||||
|
||||
@ -138,7 +138,7 @@ class monthlypay extends BaseController
|
||||
$data['datefordropdown'] = $current;
|
||||
$data['attendance'] = $this-> monthlypay_model->monthlyAttendance($current);
|
||||
$data['emppay'] = $this-> monthlypay_model->getEmpPayDetails($current,$string);
|
||||
$this->global['pageTitle'] = 'Siddharth : Monthly Attendance';
|
||||
$this->global['pageTitle'] = 'Resico : Monthly Attendance';
|
||||
$this->loadViews("attendance", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ class monthlypay extends BaseController
|
||||
|
||||
$data['userRecords'] = $this->monthlypay_model->monthlyListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Monthly Pay List';
|
||||
$this->global['pageTitle'] = 'Resico : Monthly Pay List';
|
||||
|
||||
$this->loadViews("monthlyListing", $this->global, $data, NULL);
|
||||
}
|
||||
@ -223,7 +223,7 @@ class monthlypay extends BaseController
|
||||
|
||||
//$data['emp_id'] = $this->monthlypay_model->getmonthlypay();
|
||||
|
||||
$this->global['pageTitle'] = 'siddharth : Add Monthly Pay';
|
||||
$this->global['pageTitle'] = 'Resico : Add Monthly Pay';
|
||||
|
||||
$this->loadviews('addMontly',$this->global, NULL);
|
||||
|
||||
@ -296,7 +296,7 @@ class monthlypay extends BaseController
|
||||
$data['monthly'] = $this->monthlypay_model->getUserInfo($EmpID,$month_year);
|
||||
//$data['monthly_pay_inputs'] = $this->monthlylisting_model->getUserInfo($employeeid);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Monthly Listing';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Monthly Listing';
|
||||
|
||||
$this->loadViews("editOldmonthly", $this->global, $data,NULL);
|
||||
|
||||
@ -379,7 +379,7 @@ class monthlypay extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Employee (Employee Controller)
|
||||
* Class : payslip (Pay Slip - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @author : Venba Info Tech - Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 07 Apr 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class payslip extends BaseController
|
||||
{
|
||||
@ -47,7 +47,7 @@ function phpAlert($msg) {
|
||||
|
||||
$Data['Payon'] = $this->payroll_model->getPayOn();
|
||||
$Data['Bank'] = $this->payroll_model->getBankInfo();
|
||||
$this->global['pageTitle'] = 'Siddharth : Bank Report Screen';
|
||||
$this->global['pageTitle'] = 'Resico : Bank Report Screen';
|
||||
$this->loadViews("bankreport", $this->global,$Data,NULL);
|
||||
|
||||
}
|
||||
@ -128,7 +128,7 @@ function phpAlert($msg) {
|
||||
else{
|
||||
|
||||
$this->load->library('excel');
|
||||
// $this->global['pageTitle'] = 'Siddharth : PF Excel Report';
|
||||
// $this->global['pageTitle'] = 'Resico : PF Excel Report';
|
||||
// $this->loadViews('pfexcel',$this->global,$data,NULL);
|
||||
$this->excel->setActiveSheetIndex(0);
|
||||
$this->excel->getActiveSheet()->setTitle('Employee PF Report ' . $data['PayMonth']);
|
||||
@ -467,7 +467,7 @@ function phpAlert($msg) {
|
||||
}
|
||||
|
||||
$data['loanemployees'] = $this->payroll_model->getEmpDetailsforLoan();
|
||||
$this->global['pageTitle'] = 'Siddharth : Loan Reports';
|
||||
$this->global['pageTitle'] = 'Resico : Loan Reports';
|
||||
$this->loadViews("loanreports", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
@ -478,7 +478,7 @@ function phpAlert($msg) {
|
||||
public function viewUpload2()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Payroll Data Upload2';
|
||||
$this->global['pageTitle'] = 'Resico : Payroll Data Upload2';
|
||||
|
||||
|
||||
$this->loadViews("payslipupload2", $this->global, NULL);
|
||||
@ -491,7 +491,7 @@ function phpAlert($msg) {
|
||||
// $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current);
|
||||
|
||||
$data['fresh'] = $this-> monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
||||
$this->global['pageTitle'] = 'Siddharth : Payroll Monthly Inputs';
|
||||
$this->global['pageTitle'] = 'Resico : Payroll Monthly Inputs';
|
||||
$this->loadViews("monthlypayinputs", $this->global,$data,NULL);
|
||||
|
||||
|
||||
@ -676,7 +676,7 @@ function phpAlert($msg) {
|
||||
|
||||
function payslipLisiting()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Payslip Listing';
|
||||
$this->global['pageTitle'] = 'Resico : Payslip Listing';
|
||||
$data['PayInfo'] = $this->payroll_model->GetPayslipdata();
|
||||
$this->loadViews("paysliplist", $this->global, $data , NULL);
|
||||
}
|
||||
@ -685,7 +685,7 @@ function phpAlert($msg) {
|
||||
{
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Employee Payslip';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Employee Payslip';
|
||||
$data['PayInfo'] = $this->payroll_model->GetPayslipdata($PayOn,$EmpID);
|
||||
$this->loadViews("editPayslip", $this->global, $data , NULL);
|
||||
}
|
||||
@ -696,7 +696,7 @@ function phpAlert($msg) {
|
||||
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Payroll Generater';
|
||||
$this->global['pageTitle'] = 'Resico : Payroll Generater';
|
||||
|
||||
$this->loadViews("payslipgenerate", $this->global, $Data , NULL);
|
||||
}
|
||||
@ -1108,7 +1108,7 @@ function getEmployee()
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -5,11 +5,11 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
require APPPATH . '/third_party/mpdf/mpdf.php';
|
||||
|
||||
/**
|
||||
* Class : purchaseorder (PurchaseorderController)
|
||||
* Class : purchaseorder (Purchase order - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Venba InfoTech
|
||||
* @version : 1.1
|
||||
* @since : 09/06 Feb 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class purchaseorder extends BaseController
|
||||
{
|
||||
@ -32,20 +32,20 @@ class purchaseorder extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : AddPO';
|
||||
$this->global['pageTitle'] = 'Resico : AddPO';
|
||||
|
||||
$this->loadViews("addPO", $this->global, NULL , NULL);
|
||||
}
|
||||
function viewfullpurchaseorder()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : View Purchase Order';
|
||||
$this->global['pageTitle'] = 'Resico : View Purchase Order';
|
||||
|
||||
$this->loadViews("viewfullpurchaseorder", $this->global,Null);
|
||||
|
||||
}
|
||||
function advancerequest()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Advance Request';
|
||||
$this->global['pageTitle'] = 'Resico : Advance Request';
|
||||
|
||||
$data['PONO']=$this->purchaseorder_model->getadvancePONO('ST026');
|
||||
//print_r($data['PONO']);
|
||||
@ -63,7 +63,7 @@ class purchaseorder extends BaseController
|
||||
|
||||
$data['ReqList'] = $this->purchaseorder_model->getAllRequistionListToCreatePO();
|
||||
/* End Here */
|
||||
$this->global['pageTitle'] = 'Siddharth : Create PO from Requisition List';
|
||||
$this->global['pageTitle'] = 'Resico : Create PO from Requisition List';
|
||||
|
||||
$this->loadViews("createPOfromRequistion", $this->global, $data,Null);
|
||||
}
|
||||
@ -85,7 +85,7 @@ class purchaseorder extends BaseController
|
||||
|
||||
$data['POData'] = $this->purchaseorder_model->purchaseorderListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase Orders';
|
||||
$this->global['pageTitle'] = 'Resico : Purchase Orders';
|
||||
|
||||
$this->loadViews("POlist", $this->global, $data, NULL);
|
||||
|
||||
@ -121,7 +121,7 @@ class purchaseorder extends BaseController
|
||||
else
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase order' ;
|
||||
$this->global['pageTitle'] = 'Resico : Purchase order' ;
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||
@ -407,7 +407,7 @@ class purchaseorder extends BaseController
|
||||
//$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Service Purchase order form';
|
||||
$this->loadViews("EditservicePurchaseorder", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == REVENUE)
|
||||
@ -416,7 +416,7 @@ class purchaseorder extends BaseController
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == IMPORT)
|
||||
@ -454,7 +454,7 @@ class purchaseorder extends BaseController
|
||||
//print_r($unicode);
|
||||
$data['unicode']=$unicode;
|
||||
$data['currencycode']=$currencycode;
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Import Purchase order form';
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == CAPITAL)
|
||||
@ -504,7 +504,7 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Capital Purchase order form';
|
||||
$this->loadViews("editCapitalPo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
@ -636,7 +636,7 @@ class purchaseorder extends BaseController
|
||||
//print_r($unicode);
|
||||
$data['unicode']=$unicode;
|
||||
$data['currencycode']=$currencycode;
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Import Purchase order form';
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
@ -691,7 +691,7 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Capital Purchase order form';
|
||||
$this->loadViews("editCapitalPo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
@ -1203,7 +1203,7 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
@ -2141,7 +2141,7 @@ function addNewImportPurchaseOrder()
|
||||
/* All Function following This command for FINANCE TEAM PO APPROVAL SCREEN*/
|
||||
function poapproval(){
|
||||
$q="APPROVAL";
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase Order Approval';
|
||||
$this->global['pageTitle'] = 'Resico : Purchase Order Approval';
|
||||
// $data['Status']= $this->purchaseorder_model->getStatus();
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
//print_r($data['Status']);echo "CON";
|
||||
@ -2197,7 +2197,7 @@ function addNewImportPurchaseOrder()
|
||||
function porelease(){
|
||||
|
||||
$q="RELEASE";
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase Order Release';
|
||||
$this->global['pageTitle'] = 'Resico: Purchase Order Release';
|
||||
// $data['Status']= $this->purchaseorder_model->getStatus();
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
//print_r($data['Status']);echo "CON";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : RawMaterial (PurchaseorderController)
|
||||
* Class : rawmaterialdetails (Raw Material Detail - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @author : Venba Info Tech - Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 12 Apr 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class rawmaterialdetails extends BaseController
|
||||
{
|
||||
@ -232,7 +232,7 @@ class rawmaterialdetails extends BaseController
|
||||
$data['cfUOM'] = $this->rawmaterialdetails_model->getConversionfactorUOM();
|
||||
$data['assetcode'] = $this->rawmaterialdetails_model->getAssetcode();
|
||||
$this->global['pageTitle'] = 'Resico : Edit Material Master';
|
||||
$this->loadViews("editOldRawmaterial", $this->global,$data, NULL);
|
||||
$this->loadViews("editRawmaterial", $this->global,$data, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Inward Gate Register Controller (security)
|
||||
* Class :report (Report Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Saravana kumar
|
||||
* @author : Venba Info Tech - Saravana kumar
|
||||
* @version : 1.1
|
||||
* @since : 10 Jun 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class report extends BaseController
|
||||
{
|
||||
|
||||
@ -5,9 +5,9 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
/**
|
||||
* Class : requisitionform (requisitionformController)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class requisitionform extends BaseController
|
||||
{
|
||||
@ -29,7 +29,7 @@ class requisitionform extends BaseController
|
||||
*/
|
||||
function requisitionlisting()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : Requisition Listing';
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
@ -47,7 +47,7 @@ class requisitionform extends BaseController
|
||||
|
||||
function requisition()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Raise Requisition';
|
||||
$this->global['pageTitle'] = 'Resico : Raise Requisition';
|
||||
|
||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C020');
|
||||
|
||||
@ -67,7 +67,7 @@ class requisitionform extends BaseController
|
||||
*/
|
||||
function requisitionlistApproval()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Approval';
|
||||
$this->global['pageTitle'] = 'Resico : Requisition Approval';
|
||||
|
||||
$data['Status']= $this->requistion_model->getStatus();
|
||||
|
||||
@ -86,7 +86,7 @@ class requisitionform extends BaseController
|
||||
*/
|
||||
function EditRequistionForm()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Requisition';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Requisition';
|
||||
|
||||
$ReqNo= $_GET['ReqNo'];
|
||||
$ReqType= $_GET['ReqType'];
|
||||
@ -190,7 +190,7 @@ class requisitionform extends BaseController
|
||||
|
||||
$data['AppList'] = $this->requistion_model->getApproverRequistList($userID,$Status,$FromDate, $ToDate);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Approval';
|
||||
$this->global['pageTitle'] = 'Resico : Requisition Approval';
|
||||
|
||||
$data['Status']= $this->requistion_model->getStatus();
|
||||
|
||||
@ -661,7 +661,7 @@ class requisitionform extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -1,542 +0,0 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : requisitionform (requisitionformController)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
*/
|
||||
class requisitionform extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('requistion_model');
|
||||
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the Requistion
|
||||
*/
|
||||
function requisitionlisting()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
// $data['ReqList'] = $this->requistion_model->getRequistListUserID($userID);
|
||||
$data['Status'] = $this->requistion_model->CheckDraftStatus($userID);
|
||||
|
||||
$data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID);
|
||||
|
||||
|
||||
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the requisition Form
|
||||
*/
|
||||
|
||||
function requisition()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Raise Requisition';
|
||||
|
||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C020');
|
||||
|
||||
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
||||
|
||||
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
|
||||
|
||||
$this->loadViews("requisitionform", $this->global, $data,null);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the first screen of the Requistion List Approval Screen
|
||||
*/
|
||||
function requisitionlistApproval()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Approval';
|
||||
|
||||
$data['Status']= $this->requistion_model->getStatus();
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['AppList'] = $this->requistion_model->getApproverRequistList($userID);
|
||||
|
||||
|
||||
|
||||
$this->loadViews("requisitionlistapproval", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function used to load the Edit Requistion Form
|
||||
*/
|
||||
function EditRequistionForm()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Requisition';
|
||||
|
||||
$ReqNo= $_GET['ReqNo'];
|
||||
$ReqType= $_GET['ReqType'];
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['ReqDetails'] = $this->requistion_model->getRequistDetails($ReqNo,'Yes');
|
||||
|
||||
|
||||
$data['LineItem'] = $this->requistion_model->getEditRequistItemList($ReqNo);
|
||||
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
|
||||
$data['MaterialCode'] = $this->requistion_model->EditMaterialCode($ReqNo, $ReqType);
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$this->loadViews("editrequisitionform", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the Delete the Requistion Items
|
||||
*/
|
||||
function DeleteRequistionForm()
|
||||
{
|
||||
|
||||
$ReqList= $this->input->post('id');
|
||||
$ReqNo ='';
|
||||
$MaterialCode = '';
|
||||
if(count($ReqList) > 0)
|
||||
{
|
||||
$ReqNo = $ReqList[0];
|
||||
$MaterialCode = $ReqList[1];
|
||||
}
|
||||
|
||||
$this->requistion_model->DeleteRequistionLineItem( $ReqNo,$MaterialCode);
|
||||
|
||||
echo "Successfully Deleted the Line item".$ReqNo;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the Delete the Requistion Items
|
||||
*/
|
||||
function DeleteReqNo()
|
||||
{
|
||||
|
||||
$ReqNo= $this->input->post('id');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$Request = array('Status'=>REQ_DELETED,'updatedOn'=>$updateddt);
|
||||
|
||||
$this->requistion_model->UpdateRequistion( $Request,$ReqNo);
|
||||
|
||||
echo "Successfully Deleted the ".$ReqNo;
|
||||
|
||||
}
|
||||
|
||||
function SearchRequistList()
|
||||
{
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
$ReqValue = $this->input->post('SearchDate');
|
||||
|
||||
$Dt = explode("-",$ReqValue);
|
||||
|
||||
$FromDate ='';
|
||||
$ToDate = '';
|
||||
$Status= '';
|
||||
if(count( $Dt)>1)
|
||||
{
|
||||
$FDate = $Dt[0]."-".$Dt[1]."-".$Dt[2];
|
||||
$TDate = $Dt[3]."-".$Dt[4]."-".$Dt[5];
|
||||
$FromDate = $this->getDateformat($FDate);
|
||||
$ToDate = $this->getDateformat($TDate);
|
||||
}
|
||||
|
||||
$St = $this->input->post('RequisitionStatus');
|
||||
|
||||
if($St == "-1")
|
||||
{
|
||||
$Status = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$Status = $St;
|
||||
}
|
||||
|
||||
$data['AppList'] = $this->requistion_model->getApproverRequistList($userID,$Status,$FromDate, $ToDate);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Approval';
|
||||
|
||||
$data['Status']= $this->requistion_model->getStatus();
|
||||
|
||||
$this->loadViews("requisitionlistapproval", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getDateformat($Val)
|
||||
{
|
||||
$date = new DateTime($Val);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
return $retDate;
|
||||
}
|
||||
/**
|
||||
* This function used to load the Employee details based on the EmpID selection
|
||||
*/
|
||||
function GetSelectedEmpDetails()
|
||||
{
|
||||
$ReqType = $_GET['ReqType'];
|
||||
$EmpID = $this->input->post('id');
|
||||
$empDetails = $this->requistion_model->GetEmployeeDetails( $EmpID );
|
||||
$DeptCode = $empDetails[0]['DEPCode'];
|
||||
$CostList = $this->requistion_model->GetCostCenterByDept( $DeptCode);
|
||||
$HTML = "<option value='-1'>Select Cost center</option>";
|
||||
$BudAmount = "";
|
||||
if(count($CostList) > 0)
|
||||
{
|
||||
for ($j = 0; $j < count($CostList); $j++)
|
||||
{
|
||||
$Code = $CostList[$j]['CostCenterCode'];
|
||||
$Name = $CostList[$j]['CostCenterName'];
|
||||
$HTML .="<option value='".$Code."'>".$Code."-".$Name."</option>";
|
||||
}
|
||||
}
|
||||
if(count($CostList) == 1)
|
||||
{
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
$CostCode = $CostList[0]['CostCenterCode'];
|
||||
|
||||
$Cost = $this->requistion_model->GetAvailableBudgetAmount( $CostCode,$Year,$ReqType);
|
||||
if(count($Cost) >0)
|
||||
{
|
||||
$BudAmount = $Cost[0]['BudgetAmount'];
|
||||
}
|
||||
}
|
||||
die(json_encode(array('emp' => $empDetails,'Cost' => $HTML,'AvlAmount' => $BudAmount)));
|
||||
}
|
||||
|
||||
function getAvailableBudAmount()
|
||||
{
|
||||
$ReqType = $_GET['ReqType'];
|
||||
$CostCode= $this->input->post('id');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
|
||||
$Cost = $this->requistion_model->GetAvailableBudgetAmount( $CostCode,$Year,$ReqType);
|
||||
|
||||
die(json_encode(array('Cost' =>$Cost)));
|
||||
}
|
||||
// To get the Material code based on the Request type
|
||||
function getMaterialCode()
|
||||
{
|
||||
|
||||
$ReqType= $this->input->post('id');
|
||||
|
||||
$MaterialCode = $this->requistion_model->GetMaterialCode( $ReqType);
|
||||
$MaterialName = "";
|
||||
$UOM = "";
|
||||
$HTML = "<option value='-1'>Select Material Type</option>";
|
||||
|
||||
if(count($MaterialCode) > 0)
|
||||
{
|
||||
for ($j = 0; $j < count($MaterialCode); $j++)
|
||||
{
|
||||
$Code = $MaterialCode[$j]['MaterialCode'];
|
||||
$Name = $MaterialCode[$j]['MaterialName'];
|
||||
$HTML .="<option value='".$Code."'>".$Code."-".$Name."</option>";
|
||||
|
||||
}
|
||||
$MaterialName = $MaterialCode[0]['MaterialName'];
|
||||
$UOM = $MaterialCode[0]['UOM'];
|
||||
}
|
||||
|
||||
die(json_encode(array('Material' =>$HTML,'MaterialName'=>$MaterialName,'UOM'=>$UOM)));
|
||||
}
|
||||
|
||||
// To get the Material value based on the MaterialCode
|
||||
function getMaterialDetails()
|
||||
{
|
||||
|
||||
$Material= $this->input->post('id');
|
||||
|
||||
$MaterialDetails = $this->requistion_model->getRawMaterialList($Material);
|
||||
|
||||
|
||||
die(json_encode(array('MatDetail' =>$MaterialDetails)));
|
||||
}
|
||||
|
||||
/*
|
||||
To Insert the Requistion Details to Database
|
||||
*/
|
||||
/**
|
||||
* This function is used to add new Cost to the system
|
||||
*/
|
||||
function addNewRequistion()
|
||||
{
|
||||
|
||||
$this->form_validation->set_rules('RequestType','RequestType','trim|required');
|
||||
$this->form_validation->set_rules('EmpID','EmpID','trim|required');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->requisition();
|
||||
}
|
||||
else
|
||||
{
|
||||
$Status= $_GET['ID'];
|
||||
$RequestType = strtoupper(trim($this->input->post('RequestType')));
|
||||
$Requestedby = strtoupper(trim($this->input->post('EmpID')));
|
||||
$CostCenter = $this->input->post('CostCenter');
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
$serviceSchedule = $this->input->post('serviceSchedule');
|
||||
$servicePeriod = $this->input->post('servicePeriod');
|
||||
$noOfService = $this->input->post('noOfService');
|
||||
|
||||
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
|
||||
// print_r($IsExists);
|
||||
|
||||
if(count( $IsExists) == 0)
|
||||
{
|
||||
//echo 'Not Exists';
|
||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod);
|
||||
|
||||
//print_r($Request);
|
||||
|
||||
$Req = $this->requistion_model->addRequistion($Request);
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo 'Exists';
|
||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request,$IsExists[0]['ReqNo']);
|
||||
}
|
||||
$ReqNumber = '';
|
||||
if(count($Req)>0)
|
||||
{
|
||||
$ReqNumber = $Req[0]['ReqNo'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$ReqNumber = $IsExists[0]['ReqNo'];
|
||||
}
|
||||
|
||||
$SkipInsert = False;
|
||||
for ($i = 1; $i <= $RowCount; $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")
|
||||
{
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
$Quantity = $this->input->post('Quantity'.$i);
|
||||
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
|
||||
$this->requistion_model->addRequistionDetails($ReqDetails);
|
||||
}
|
||||
|
||||
}
|
||||
if($Status == REQ_DRAFT)
|
||||
{
|
||||
echo 'Successfully Saved the Requistion details';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Successfully Created the Requistion details';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
function EditRequistion()
|
||||
{
|
||||
$Status = $this->input->post('txtStatus');
|
||||
$ReqNumber = $this->input->post('txtReqNo');
|
||||
$CostCenter = $this->input->post('CostCenter');
|
||||
$UpdatedBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updatedDate = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
$serviceSchedule = $this->input->post('serviceSchedule');
|
||||
$servicePeriod = $this->input->post('servicePeriod');
|
||||
$noOfService = $this->input->post('noOfService');
|
||||
if(strlen($Status) > 1)
|
||||
{
|
||||
$Request = array( 'Status'=>$Status,'CreatedDate'=>$updatedDate,'CreatedBy'=>$UpdatedBy,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber);
|
||||
}
|
||||
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
|
||||
/* Table value update and Insert in the table */
|
||||
//echo "RowCOunt:" .$RowCount;
|
||||
$SkipInsert = False;
|
||||
for ($i = 1; $i <= $RowCount; $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")
|
||||
{
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
$Quantity = $this->input->post('Quantity'.$i);
|
||||
$IsExists = $this->requistion_model->LineItemIsExists($ReqNumber,$MaterialCode);
|
||||
if(count( $IsExists) == 0)
|
||||
{
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate);
|
||||
|
||||
$this->requistion_model->addRequistionDetails($ReqDetails);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate);
|
||||
|
||||
$this->requistion_model->UpdateRequistionLineItem($ReqDetails,$ReqNumber,$MaterialCode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
echo 'Successfully updated the Requistion details';
|
||||
// $this->requisitionlisting();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/* To Edit the request*/
|
||||
function ViewRequest()
|
||||
{
|
||||
|
||||
$ReqNo= $this->input->post('id');
|
||||
$result = $this->requistion_model->getRequistItemList($ReqNo);
|
||||
$ReqList = $this->requistion_model->getRequistDetails($ReqNo);
|
||||
$DepNo = $ReqList[0]['DEPCode'];
|
||||
//$CostList = $this->requistion_model->GetCostCenterByDept($DepNo);
|
||||
$HTML="";
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
$SNo = $i + 1;
|
||||
$MaterialCode = $result[$i]['MaterialCode'];
|
||||
$MaterialName = $result[$i]['MaterialName'];
|
||||
$UOM = $result[$i]['UOM'];
|
||||
$Quantity = $result[$i]['Quantity'];
|
||||
$Quantity = $result[$i]['Quantity'];
|
||||
$POQTY = $result[$i]['POQTY'];
|
||||
$StatusName= $result[$i]['StatusName'];
|
||||
$HTML.="<tr id='".$i."'>
|
||||
<td align='left'>".$SNo."</td>
|
||||
<td align='left'>". $MaterialCode."</td>
|
||||
|
||||
<td align='left'>".$MaterialName."</td>
|
||||
|
||||
<td align='left'>".$UOM."</td>
|
||||
<td align='left'>".$Quantity."</td>
|
||||
<td align='left'>".$POQTY."</td>
|
||||
<td align='left'>".$StatusName."</td>
|
||||
</tr>";
|
||||
|
||||
//$index = $index + 1;
|
||||
|
||||
}
|
||||
$CostCode = '';
|
||||
$ReqType = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
if(count($ReqList)>0)
|
||||
{
|
||||
|
||||
$ReqType = $ReqList[0]['ReqType'];
|
||||
|
||||
$CostCode = $ReqList[0]['CostCenterCode'];
|
||||
}
|
||||
$this->load->model('purchaseorder_model');
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
//print_r($result);
|
||||
$AvilBudAmt = '0';
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$AvilBudAmt = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
//echo $AvilBudAmt;
|
||||
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'AvilBudAmount'=>number_format($AvilBudAmt,2))));
|
||||
}
|
||||
|
||||
function ApproveRequest()
|
||||
{
|
||||
$Status= Trim($_GET['Status']);
|
||||
|
||||
$ReqNo= $_GET['ReqNo'];
|
||||
$Remarks = trim($this->input->post('id'));
|
||||
$ApprovedBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$ApprovedDate = $dt->format('Y-m-d H:i:s');
|
||||
$Request = array('Status'=>$Status,'Comments'=>$Remarks,'ApprovedOn'=>$ApprovedDate,'Approvedby'=>$ApprovedBy);
|
||||
$this->requistion_model->UpdateRequistion($Request,$ReqNo);
|
||||
echo "Successfully Updated the Requistion No: ".$ReqNo;
|
||||
|
||||
}
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -5,11 +5,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : purchaseorder (PurchaseorderController)
|
||||
* Class : servicepurchaseorder (Service Purchase Order Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 15 November 2017
|
||||
*/
|
||||
class servicepurchaseorder extends BaseController
|
||||
{
|
||||
@ -30,7 +30,7 @@ class servicepurchaseorder extends BaseController
|
||||
function viewServicePOReportForBilling()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Service Purchase Order for Billing';
|
||||
$this->global['pageTitle'] = 'Resico : Service Purchase Order for Billing';
|
||||
|
||||
$data["Billing"] = $this->purchaseorder_model->GetServicePOListforBilling();
|
||||
|
||||
@ -42,7 +42,7 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
function UpdateServicePOStatus()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Update Service PO Status';
|
||||
$this->global['pageTitle'] = 'Resico : Update Service PO Status';
|
||||
$data['PO'] = $this->purchaseorder_model->GetServicePOListforStatusUpdate();
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
|
||||
@ -487,7 +487,7 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -1,325 +0,0 @@
|
||||
|
||||
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : purchaseorder (PurchaseorderController)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
*/
|
||||
class servicepurchaseorder extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('purchaseorder_model');
|
||||
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
$this->load->model('requistion_model');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
|
||||
|
||||
// To get the available Budget Amount
|
||||
function AvilBudgetAmount()
|
||||
{
|
||||
// echo 'Controller called';
|
||||
$CostCode = $this->input->post('id');
|
||||
$ReqType = $_GET['ReqType'];
|
||||
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
$this->load->model('purchaseorder_model');
|
||||
$result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
//print_r($result);
|
||||
$AvilBudAmt = '0';
|
||||
if(count($result)>0)
|
||||
{
|
||||
$AvilBudAmt = $result[0]['BudgetAmount'] - $result[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
// echo 'Test';
|
||||
print_r($AvilBudAmt);
|
||||
//die(json_encode(array('Cost' => $AvilBudAmt)));
|
||||
}
|
||||
|
||||
|
||||
function getDateformat($Val)
|
||||
{
|
||||
$date = new DateTime($Val,new DateTimeZone('Asia/Kolkata'));
|
||||
// print_r($date);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
return $retDate;
|
||||
}
|
||||
|
||||
//This used to Create Service Purchase Order
|
||||
function addNewServicePurchaseOrder()
|
||||
{
|
||||
|
||||
$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);
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1)
|
||||
{
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
|
||||
$SpcialInstruction = $this->input->post('ScopeOfWork');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$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'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$WorkStatus=$this->input->post('workstatus');
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus, 'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption, 'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'POType'=>$POType );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
|
||||
|
||||
$PONO = '';
|
||||
if(count($POMaster)>0)
|
||||
{
|
||||
$PONO = $POMaster[0]['PONO'];
|
||||
}
|
||||
|
||||
// PO Line Items
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
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);
|
||||
$Cgst = $this->input->post('Cgst'.$i);
|
||||
$Sgst = $this->input->post('Sgst'.$i);
|
||||
$Igst = $this->input->post('Igst'.$i);
|
||||
$AfterCgst = $this->input->post('AfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('AfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('AfterIgst'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$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,'ServiceFrequency'=>$ServiceFrequency,'ServiceMaterialDescription'=>$ItemDescription);
|
||||
//print_r($POLineItemList);
|
||||
//die();
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
$LineItemNo = '';
|
||||
|
||||
if(count($POLineItem)>0)
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
|
||||
if(trim($POType) == SERVICE )
|
||||
{
|
||||
// echo 'Success';
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'otherallowance'=>$OtherAmt);
|
||||
|
||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo 'Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
|
||||
|
||||
}
|
||||
function UpdateServicePurchaseOrder()
|
||||
{
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
//echo $PONO;
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$Payableat=$this->input->post('PayableAT');
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
|
||||
$SpcialInstruction = $this->input->post('ScopeofWork');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
$updatedBy = $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');
|
||||
$WorkStatus=$this->input->post('workstatus');
|
||||
|
||||
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
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);
|
||||
$Cgst = $this->input->post('Cgst'.$i);
|
||||
$Sgst = $this->input->post('Sgst'.$i);
|
||||
$Igst = $this->input->post('Igst'.$i);
|
||||
$AfterCgst = $this->input->post('AfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('AfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('AfterIgst'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||
|
||||
$POLineItem = array();
|
||||
$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'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ServiceMaterialDescription'=>$ItemDescription);
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
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,'ServiceMaterialDescription'=>$ItemDescription);
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(trim($POType) == SERVICE )
|
||||
{
|
||||
$isExists = $this->purchaseorder_model->LineItemExists($LineItemNo);
|
||||
|
||||
if(count($isExists) == 0)
|
||||
{
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'otherallowance'=>$OtherAmt);
|
||||
|
||||
$this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$ServiceTaxList1 = array('CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'TotalValue'=>$TotalOrderValue, 'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'otherallowance'=>$OtherAmt);
|
||||
|
||||
$this->purchaseorder_model->updateServiceTax($LineItemNo,$ServiceTaxList1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
echo 'Successfully updated the Service Purchase Order';
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Cost Center (Cost Center Controller)
|
||||
* Class :storerequisition (Store Requisition Detail - Controller )
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class storerequisition extends BaseController
|
||||
{
|
||||
@ -29,38 +29,38 @@ class storerequisition extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//$this->global['pageTitle'] = 'Siddharth : storesrequisitionslip';
|
||||
//$this->global['pageTitle'] = 'Resico : storesrequisitionslip';
|
||||
|
||||
//$this->loadviews('storesrequisitionslip',$this->global);
|
||||
}
|
||||
|
||||
function addstorerequisitionslip()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Add Store Requisition';
|
||||
$this->global['pageTitle'] = 'Resico : Add Store Requisition';
|
||||
|
||||
$this->loadviews('addstorerequisitionslip',$this->global);
|
||||
}
|
||||
function storerequisitionlist()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Store Requisition List';
|
||||
$this->global['pageTitle'] = 'Resico : Store Requisition List';
|
||||
|
||||
$this->loadviews('storerequisitionlist',$this->global);
|
||||
}
|
||||
function storerequisitionlisting()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Store Requisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : Store Requisition Listing';
|
||||
|
||||
$this->loadviews('storerequisitionlisting',$this->global);
|
||||
}
|
||||
function approvalstorerequisition()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Approval Store Requisition';
|
||||
$this->global['pageTitle'] = 'Resico : Approval Store Requisition';
|
||||
|
||||
$this->loadviews('approvalstorerequisitionslip',$this->global);
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Cost Center (Cost Center Controller)
|
||||
* Class :storerequisitionlist (Store Stock list details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 Feb 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class storerequisitionlist extends BaseController
|
||||
{
|
||||
@ -32,7 +32,7 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$userId= $this->session->userdata ('userId');
|
||||
$data['DEPCode'] = $this->session->userdata('DEPCode');
|
||||
$data['DepName'] = $this->session->userdata('DepartmentName');
|
||||
@ -48,7 +48,7 @@ class storerequisitionlist extends BaseController
|
||||
function addstore()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$userId= $this->session->userdata ('userId');
|
||||
$data['Store'] = $this->storerequistion_model->Storeall($userId);
|
||||
|
||||
@ -78,7 +78,7 @@ class storerequisitionlist extends BaseController
|
||||
$StoreReqNo = $_GET['StoreReqNo'];
|
||||
|
||||
//$StoreReqNo= $this->input->post('id');
|
||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$this->load->model('storerequistion_model');
|
||||
$data['cost'] = $this->storerequistion_model->editRequistDetails($StoreReqNo);
|
||||
|
||||
@ -191,7 +191,7 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
function addstorerequisitionlist()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$this->load->model('storerequistion_model');
|
||||
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
@ -206,7 +206,7 @@ class storerequisitionlist extends BaseController
|
||||
function issuestorerequisition()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Issue StoreRequisition';
|
||||
$this->global['pageTitle'] = 'Resico : Issue StoreRequisition';
|
||||
$this->load->model('storerequistion_model');
|
||||
|
||||
$StoreReqNo= $_GET['ReqNo'];
|
||||
@ -359,7 +359,7 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
$data['AppList'] = $this->storerequistion_model->getApproverRequistList($userID);
|
||||
//print_r($data['AppList']);
|
||||
$this->global['pageTitle'] = 'Siddharth : ApprovalStoreRequisitionSlip';
|
||||
$this->global['pageTitle'] = 'Resico : ApprovalStoreRequisitionSlip';
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
|
||||
$this->loadViews("approvalstorerequisitionslip", $this->global, $data, NULL);
|
||||
@ -390,7 +390,7 @@ class storerequisitionlist extends BaseController
|
||||
*/
|
||||
function requisitionlistApproval()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth :Approvalstorerequisitionlist';
|
||||
$this->global['pageTitle'] = 'Resico :Approvalstorerequisitionlist';
|
||||
|
||||
//$data['Status']= $this->storerequistion_model->getStatus();
|
||||
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Supplier Controller (supplier)
|
||||
* Class : storestatus (Store Stock Status -Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Saravana kumar
|
||||
* @author : Venba Info Tech - Saravana kumar
|
||||
* @version : 1.1
|
||||
* @since : 4 July 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class storestatus extends BaseController
|
||||
{
|
||||
@ -28,7 +28,7 @@ class storestatus extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
||||
$this->global['pageTitle'] = 'Resico Industries : Store Status';
|
||||
|
||||
$this->loadViews("storestatus", $this->global, NULL , NULL);
|
||||
}
|
||||
@ -44,7 +44,7 @@ class storestatus extends BaseController
|
||||
|
||||
//$data['userRecords'] = $this->supplier_model->supplierListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
||||
$this->global['pageTitle'] = 'Resico Industries : Store Status';
|
||||
//viewStock
|
||||
$data['Stock'] = $this->store_model->viewStock();
|
||||
|
||||
@ -150,7 +150,7 @@ class storestatus extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Supplier Controller (supplier)
|
||||
* Class : supplier (Supplier Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @author :Venba Info Tech - Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 12 Apr 2017
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class supplier extends BaseController
|
||||
{
|
||||
@ -415,7 +415,7 @@ class supplier extends BaseController
|
||||
$data['supplier'] = $this->supplier_model->getSupplierInfo($supplierID);
|
||||
//$data['payment'] = $this->supplier_model->getpayment($Payment );
|
||||
$data['payment'] = $this->supplier_model->getPaymentTerms($Payment);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Supplier';
|
||||
$this->global['pageTitle'] = 'Resico : Edit Supplier';
|
||||
|
||||
$this->loadViews("editSupplier", $this->global,$data, NULL);
|
||||
}
|
||||
|
||||
@ -1,513 +0,0 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Supplier Controller (supplier)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 12 Apr 2017
|
||||
*/
|
||||
class supplier extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('supplier_model');
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('pagination');
|
||||
$this->load->library('Excel');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the user
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Supplier';
|
||||
|
||||
$this->loadViews("supplierListing", $this->global, NULL , NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to load the Supplier list
|
||||
*/
|
||||
function supplierListing()
|
||||
{
|
||||
|
||||
$this->load->model('supplier_model');
|
||||
|
||||
$data['userRecords'] = $this->supplier_model->supplierListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Supplier Listing';
|
||||
|
||||
$this->loadViews("supplierListing", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
/**
|
||||
* This function is used to load the add new supplier */
|
||||
function addsupplier()
|
||||
{
|
||||
|
||||
//$data['payment'] = $this->supplier_model->getpayment();
|
||||
$data['payment'] = $this->supplier_model->getPaymentTerms();
|
||||
//$data['users'] = $this->purchaseorder_model->getusers();
|
||||
|
||||
$this->global['pageTitle'] = 'siddharth : Add New Supplier';
|
||||
|
||||
$this->loadViews("addsupplier", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
/**
|
||||
* This function is used to check whether PAN already exist or not
|
||||
*/
|
||||
|
||||
function CheckPAN()
|
||||
{
|
||||
|
||||
$id = $this->input->post('id');
|
||||
|
||||
$query = $this->supplier_model->checkPAN($id );
|
||||
|
||||
$query = $query[0]['PAN'];
|
||||
|
||||
print_r($query);
|
||||
|
||||
}
|
||||
|
||||
/* To Check the Pan Number is exists in the database or not for the selected Supplier */
|
||||
function checkPanValidateSupplier() {
|
||||
|
||||
$SupplierID = $this->input->post('SupplierID');
|
||||
$PanNo = $this->input->post('panno');
|
||||
// echo 'Sup'. $SupplierID ;
|
||||
$query = $this->supplier_model->checkPAN($PanNo,$SupplierID);
|
||||
if (count($query)> 0)
|
||||
{
|
||||
$this->form_validation->set_message('checkPanValidateSupplier', 'The Entered PAN Number is already exists in the Database.');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* To Check the Pan Number is exists in the database or not */
|
||||
function checkPanValidate()
|
||||
{
|
||||
// alert('validation pan');
|
||||
|
||||
$PanNo = $this->input->post('panno');
|
||||
|
||||
$query = $this->supplier_model->checkPAN($PanNo);
|
||||
if (count($query)> 0)
|
||||
{
|
||||
$this->form_validation->set_message('checkPanValidate', 'The Entered PAN Number is already exists in the Database.');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function CheckGST()
|
||||
{
|
||||
//alert('check validation GST');
|
||||
$id = $this->input->post('id');
|
||||
$query = $this->supplier_model->checkGST($id);
|
||||
$query = $query[0]['GSTNO'];
|
||||
print_r($query);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* To Check the GST Number is exists in the database or not for the selected Supplier */
|
||||
function checkGstValidateSupplier() {
|
||||
//alert(' gst validation GST');
|
||||
$SupplierID = $this->input->post('SupplierID');
|
||||
$GstNo = $this->input->post('GSTNo');
|
||||
//echo 'Sup'. $SupplierID ;
|
||||
$query = $this->supplier_model->checkGST($GstNo,$SupplierID);
|
||||
if (count($query)> 0)
|
||||
{
|
||||
$this->form_validation->set_message('checkGstValidateSupplier', 'The Entered GST Number is already exists in the Database.');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* To Check the GST Number is exists in the database or not */
|
||||
function checkGstValidate()
|
||||
{
|
||||
|
||||
$GstNo = $this->input->post('GSTNo');
|
||||
$query = $this->supplier_model->checkGST($GstNo);
|
||||
if (count($query)> 0)
|
||||
{
|
||||
$this->form_validation->set_message('checkGstValidate', 'The Entered GST Number is already exists in the Database.');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function is used to add new Supplier to the system
|
||||
*/
|
||||
function addNewsupplier()
|
||||
{
|
||||
|
||||
|
||||
$this->form_validation->set_rules('SupplierName','Supplier Name','trim|required');
|
||||
$this->form_validation->set_rules('Address','Address','trim|required|');
|
||||
$this->form_validation->set_rules('ContactNumber','Contact Number','trim|required|max_length[13]');
|
||||
$this->form_validation->set_rules('AlternateContactNumber','Alternate Contact Number','trim|max_length[13]');
|
||||
$this->form_validation->set_rules('emailid','emailid', 'valid_email|max_length[128]|required');
|
||||
$this->form_validation->set_rules('TIN','TIN','trim|required|max_length[11]');
|
||||
$this->form_validation->set_rules('panno', 'panno', 'trim|required|max_length[10]');//|callback_checkPanValidate');
|
||||
$this->form_validation->set_rules('GSTNo','GSTNo','trim|requried|max_length[15]|callback_checkGstValidate');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->addsupplier();
|
||||
}
|
||||
else
|
||||
{
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$Address = $this->input->post('Address');
|
||||
$ContactNumber = $this->input->post('ContactNumber');
|
||||
$AlternateContactNumber = $this->input->post('AlternateContactNumber');
|
||||
$EmailAddress = $this->input->post('emailid');
|
||||
$Exiseregistration = $this->input->post('Exciseregistration');
|
||||
$TIN = $this->input->post('TIN');
|
||||
$PAN = strtoupper($this->input->post('panno'));
|
||||
$GSTNo = strtoupper($this->input->post('GSTNo'));
|
||||
$GSTRange = $this->input->post('GSTRange');
|
||||
$CollectrateAddress = $this->input->post('CollectrateAddress');
|
||||
$UANumber = $this->input->post('UANumber');
|
||||
//$PaymentTerms = $this->input->post('paymentname');
|
||||
//$Payment = $this->input->post('Payment');
|
||||
//$PayableAT = $this->input->post('PayableAT');
|
||||
$CSTNo = $this->input->post('CSTNo');
|
||||
|
||||
$CSTDt = $this->input->post('dateofCST');
|
||||
|
||||
if($CSTDt != '')
|
||||
{
|
||||
$CSTDate = $this->getDateformat($CSTDt);
|
||||
}
|
||||
else
|
||||
{
|
||||
$CSTDate = null;
|
||||
}
|
||||
|
||||
$EMSNo = $this->input->post('EMSNo');
|
||||
$TSNo = $this->input->post('TSNo');
|
||||
$IMSNo = $this->input->post('IMSNo');
|
||||
$ISONo = $this->input->post('ISONo');
|
||||
$OSHASNo = $this->input->post('OSHASNo');
|
||||
$accno = $this->input->post('accno');
|
||||
$ifsc = $this->input->post('ifsc');
|
||||
$branchname = $this->input->post('branchname');
|
||||
$bankaddress = $this->input->post('bankaddress');
|
||||
$Createdby = $this->session->userdata ( 'userId' );
|
||||
$date = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddate = $date->format('Y-m-d H:i:s');
|
||||
$service = $this->input->post('service');
|
||||
$rawmaterial =$this->input->post('rawmaterial');
|
||||
$maintenance = $this->input->post('maintanance');
|
||||
$PaymentId = $this->input->post('paymentid');
|
||||
|
||||
|
||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentID'=>$PaymentId,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'Cert_EMS'=>$EMSNo, 'Cert_TS'=>$TSNo, 'Cert_IMS'=>$IMSNo, 'Cert_ISO'=>$ISONo, 'Cert_OSHAS'=>$OSHASNo, 'BankAcNumber'=>$accno, 'IFSCCode'=>$ifsc, 'BranchName'=>$branchname, 'BankAddress'=>$bankaddress,'Createdby'=>$Createdby,'IsService'=>$service,'IsMaintanance'=>$maintenance,'IsRawMaterial'=>$rawmaterial); //,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT);
|
||||
//print_r($supplier);die();
|
||||
$result = $this->supplier_model->addNewsupplier($supplier);
|
||||
|
||||
|
||||
if($result > 0)
|
||||
{
|
||||
redirect('supplierListing','refresh');
|
||||
echo "<script>alert('New Supplier Created successfully!');</script>";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
redirect('supplierListing','refresh');
|
||||
echo "<script>alert('Supplier Record Not Created!');</script>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getDateformat($Val)
|
||||
{
|
||||
$date = new DateTime($Val);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
return $retDate;
|
||||
}
|
||||
/**
|
||||
* This function is used to edit the Supplier information
|
||||
*/
|
||||
function editsupplier()
|
||||
{
|
||||
$this->form_validation->set_rules('SupplierName','Supplier Name','trim|required');
|
||||
$this->form_validation->set_rules('Address','Address','trim|required|');
|
||||
$supplierID = $this->input->post('SupplierID');
|
||||
//echo 'supID' . $supplierID ;
|
||||
$this->form_validation->set_rules('ContactNumber','Contact Number','trim|required|max_length[13]');
|
||||
$this->form_validation->set_rules('AlternateContactNumber','Alternate Contact Number','trim|max_length[13]');
|
||||
$this->form_validation->set_rules('emailid','emailid','valid_email|max_length[128]|required');
|
||||
$this->form_validation->set_rules('TIN','TIN','trim|required|max_length[11]');
|
||||
$this->form_validation->set_rules('panno', 'panno', 'trim|required|max_length[10]|callback_checkPanValidateSupplier');
|
||||
$this->form_validation->set_rules('GSTNo','GSTNo','trim|requried|max_length[15]|callback_checkGstValidateSupplier');
|
||||
|
||||
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->viewsupplier($supplierID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$Address = $this->input->post('Address');
|
||||
$ContactNumber = $this->input->post('ContactNumber');
|
||||
$AlternateContactNumber = $this->input->post('AlternateContactNumber');
|
||||
$EmailAddress = $this->input->post('emailid');
|
||||
$Exiseregistration = $this->input->post('Exciseregistration');
|
||||
$TIN = $this->input->post('TIN');
|
||||
$PAN = strtoupper($this->input->post('panno'));
|
||||
$GSTNo = strtoupper($this->input->post('GSTNo'));
|
||||
$GSTRange = $this->input->post('GSTRange');
|
||||
$CollectrateAddress = $this->input->post('CollectrateAddress');
|
||||
$UANumber = $this->input->post('UANumber');
|
||||
$PaymentTerms = $this->input->post('paymentname');
|
||||
//print_r($PaymentTerms);
|
||||
$UpdatedBy = $this->session->userdata ( 'userId' );
|
||||
$chked = $this->input->post('isactive');
|
||||
|
||||
if( $chked != '')
|
||||
{
|
||||
$IsActive = '1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$IsActive = '0';
|
||||
}
|
||||
|
||||
$CSTNo = $this->input->post('CSTNo');
|
||||
$CSTDt = $this->input->post('dateofCST');
|
||||
|
||||
if($CSTDt != '')
|
||||
{
|
||||
$CSTDate = $this->getDateformat($CSTDt);
|
||||
}
|
||||
else
|
||||
{
|
||||
$CSTDate = null;
|
||||
}
|
||||
|
||||
$EMSNo = $this->input->post('EMSNo');
|
||||
$TSNo = $this->input->post('TSNo');
|
||||
$IMSNo = $this->input->post('IMSNo');
|
||||
$ISONo = $this->input->post('ISONo');
|
||||
$OSHASNo = $this->input->post('OSHASNo');
|
||||
$accno = $this->input->post('accno');
|
||||
$ifsc = $this->input->post('ifsc');
|
||||
$branchname = $this->input->post('branchname');
|
||||
$bankaddress = $this->input->post('bankaddress');
|
||||
$service = $this->input->post('service');
|
||||
$rawmaterial =$this->input->post('rawmaterial');
|
||||
$maintanance = $this->input->post('maintanance');
|
||||
$PaymentId = $this->input->post('paymentid');
|
||||
|
||||
$supplier = array();
|
||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentID'=>$PaymentId,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'Cert_EMS'=>$EMSNo, 'Cert_TS'=>$TSNo, 'Cert_IMS'=>$IMSNo, 'Cert_ISO'=>$ISONo, 'Cert_OSHAS'=>$OSHASNo, 'BankAcNumber'=>$accno, 'IFSCCode'=>$ifsc, 'BranchName'=>$branchname, 'BankAddress'=>$bankaddress,'UpdatedBy'=>$UpdatedBy,'IsActive'=>$IsActive,'IsService'=>$service,'IsMaintanance'=>$maintanance,'IsRawMaterial'=>$rawmaterial); //'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment);
|
||||
//SupplierID, SupplierName, Address, ContactNumber, AlternateContactNumber, EmailAddress, Exiseregistration, TIN, PAN, CSTNO, CSTDate, GSTNO, GSTRange, CollectrateAddress, UANumber, PaymentTerms, PaymentDays, PayableAT, Cert_EMS, Cert_TS, Cert_IMS, Cert_ISO, Cert_OSHAS, BankAcNumber, IFSCCode, BranchName, BankAddress, Createdby, UpdatedBy, Updatedon, CreatedOn, IsActive);
|
||||
// print_r($supplier);die();
|
||||
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);
|
||||
|
||||
|
||||
if($result == True)
|
||||
{
|
||||
redirect('supplierListing','refresh');
|
||||
echo "<script>alert('Supplier updated successfully!');</script>";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
redirect('supplierListing','refresh');
|
||||
echo "<script>alert('Supplier Record Not updated!');</script>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function viewsupplier($SID = '')
|
||||
{
|
||||
$Payment = '';
|
||||
if($SID == '')
|
||||
{
|
||||
$supplierID = $_GET['SID'];
|
||||
$Payment = $_GET['Payment'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$supplierID = $SID;
|
||||
}
|
||||
|
||||
|
||||
$data['supplier'] = $this->supplier_model->getSupplierInfo($supplierID);
|
||||
//$data['payment'] = $this->supplier_model->getpayment($Payment );
|
||||
$data['payment'] = $this->supplier_model->getPaymentTerms($Payment);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Supplier';
|
||||
|
||||
$this->loadViews("editSupplier", $this->global,$data, NULL);
|
||||
}
|
||||
|
||||
/** this function can be use for excel report **/
|
||||
|
||||
function export_supplierdetails(){
|
||||
|
||||
|
||||
$this->load->library('excel');
|
||||
$this->excel->setActiveSheetIndex(0);
|
||||
|
||||
$this->excel->getActiveSheet()->setTitle('supplier details');
|
||||
$this->excel->getActiveSheet()->setCellValue('A1', 'SupplierID');
|
||||
$this->excel->getActiveSheet()->setCellValue('B1', 'SupplierName');
|
||||
$this->excel->getActiveSheet()->setCellValue('C1', 'Address');
|
||||
$this->excel->getActiveSheet()->setCellValue('D1', 'ContactNumber');
|
||||
$this->excel->getActiveSheet()->setCellValue('E1', 'AlternateContactNumber');
|
||||
$this->excel->getActiveSheet()->setCellValue('F1', 'EmailAddress');
|
||||
$this->excel->getActiveSheet()->setCellValue('G1', 'Exiseregistration');
|
||||
$this->excel->getActiveSheet()->setCellValue('H1', 'TIN');
|
||||
$this->excel->getActiveSheet()->setCellValue('I1', 'PAN');
|
||||
$this->excel->getActiveSheet()->setCellValue('J1', 'CSTNO');
|
||||
$this->excel->getActiveSheet()->setCellValue('K1', 'CST Date');
|
||||
$this->excel->getActiveSheet()->setCellValue('L1', 'GST NO');
|
||||
$this->excel->getActiveSheet()->setCellValue('M1', 'GST Range');
|
||||
$this->excel->getActiveSheet()->setCellValue('N1', 'Collectrate Address');
|
||||
$this->excel->getActiveSheet()->setCellValue('O1', 'UANumber');
|
||||
$this->excel->getActiveSheet()->setCellValue('P1', 'PaymentTerms');
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('Q1', 'Createdby');
|
||||
$this->excel->getActiveSheet()->setCellValue('R1', 'UpdatedBy');
|
||||
$this->excel->getActiveSheet()->setCellValue('S1', 'IsActive');
|
||||
|
||||
|
||||
|
||||
|
||||
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('B1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('B1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('C1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('C1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('D1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('D1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('E1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('E1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('F1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('F1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('G1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('G1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('H1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('H1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('I1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('I1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('J1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('J1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('K1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('K1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('L1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('L1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('M1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('M1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('N1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('N1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('O1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('O1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('P1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('P1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('Q1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('Q1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('R1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('R1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('S1')->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle('S1')->getFont()->setBold(true);
|
||||
|
||||
|
||||
|
||||
$exportData = $this->supplier_model->export_excel();
|
||||
|
||||
if ($exportData) {
|
||||
$i = 2;
|
||||
$s = 1;
|
||||
foreach ($exportData as $data) {
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('A' . $i,$data['SupplierID']);
|
||||
$this->excel->getActiveSheet()->setCellValue('B' . $i,$data['SupplierName']);
|
||||
$this->excel->getActiveSheet()->setCellValue('C' . $i,$data['Address']);
|
||||
$this->excel->getActiveSheet()->setCellValue('D' . $i,$data['ContactNumber']);
|
||||
$this->excel->getActiveSheet()->setCellValue('E' . $i,$data['AlternateContactNumber']);
|
||||
$this->excel->getActiveSheet()->setCellValue('F' . $i,$data['EmailAddress']);
|
||||
$this->excel->getActiveSheet()->setCellValue('G' . $i,$data['Exiseregistration']);
|
||||
$this->excel->getActiveSheet()->setCellValue('H' . $i,$data['TIN']);
|
||||
$this->excel->getActiveSheet()->setCellValue('I' . $i,$data['PAN']);
|
||||
$this->excel->getActiveSheet()->setCellValue('J' . $i,$data['CSTNO']);
|
||||
$this->excel->getActiveSheet()->setCellValue('K' . $i,$data['CSTDate']);
|
||||
$this->excel->getActiveSheet()->setCellValue('L' . $i,$data['GSTNO']);
|
||||
$this->excel->getActiveSheet()->setCellValue('M' . $i,$data['GSTRange']);
|
||||
$this->excel->getActiveSheet()->setCellValue('N' . $i,$data['CollectrateAddress']);
|
||||
$this->excel->getActiveSheet()->setCellValue('O' . $i,$data['UANumber']);
|
||||
$this->excel->getActiveSheet()->setCellValue('P' . $i,$data['PaymentTerms']);
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('Q' . $i,$data['firstname']);
|
||||
$this->excel->getActiveSheet()->setCellValue('R' . $i,$data['Update_by']);
|
||||
$this->excel->getActiveSheet()->setCellValue('S' . $i,$data['IsActive']);
|
||||
|
||||
$i++;
|
||||
$s++;
|
||||
}
|
||||
}
|
||||
|
||||
$filename = 'supplierdetails' .' '. '.xls'; //save our workbook as this file name
|
||||
header('Content-Type: application/vnd.ms-excel'); //mime type
|
||||
header('Content-Disposition: attachment;filename="' . $filename . '"'); //tell browser what's the file name
|
||||
header('Cache-Control: max-age=0'); //no cache
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
|
||||
if (ob_get_contents()) ob_end_clean();
|
||||
ob_start();
|
||||
$objWriter->save('php://output');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -3,11 +3,11 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : User (UserController)
|
||||
* Class : user (User Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Kishor Mali
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 November 2016
|
||||
* @since : 18 November 2017
|
||||
*/
|
||||
class user extends BaseController
|
||||
{
|
||||
@ -388,7 +388,7 @@ class user extends BaseController
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico Industries : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,500 +0,0 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class requistion_model extends CI_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* This function is used to get the SupplierID and SupplierName information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getSupplierName()
|
||||
{
|
||||
$this->db->select('SupplierID, SupplierName,ADeleteRequistionLineItemddress');
|
||||
$this->db->from('T_SupplierDetailsN');
|
||||
//$this->db->where('roleId !=', 1);
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
/**
|
||||
* This function is used to get the userId information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getusers()
|
||||
{
|
||||
$this->db->select('userId, name');
|
||||
$this->db->from('tbl_users');
|
||||
//$this->db->where('roleId !=', 1);
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
/* This function is used to getEditRequistItemList view the information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getEditRequistItemList($ReqNo)
|
||||
{
|
||||
|
||||
/* $result = $this->db-> query("CALL P_GET_REQUISTITEMLIST('".$ReqNo."')") or die(mysql_error());
|
||||
|
||||
|
||||
//echo 'REQUISTITEMLIST Line item view successfully';
|
||||
|
||||
|
||||
|
||||
$result ->next_result();
|
||||
|
||||
if($result->num_rows > 0)
|
||||
{
|
||||
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
*/
|
||||
$subQuery ='select distinct Req.ReqNo, Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Req.Quantity,if (Po.Quantity is null,0,Po.Quantity) as POQTY,sta.StatusName from T_MaterialMaster Mat join T_Requestion_Details Req on Req.MaterialCode = Mat.MaterialCode
|
||||
left join T_PurchaseOrder_LineItem Po on Po.ReqNo = Req.ReqNo and Po.MaterialCode = Req.MaterialCode
|
||||
left join T_Status sta on sta.StatusCode = Req.Status
|
||||
where Req.ReqNo = ?';
|
||||
|
||||
$query = $this->db->query($subQuery, array($ReqNo));
|
||||
|
||||
// print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the userId information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getStatus()
|
||||
{
|
||||
$this->db->select('StatusCode,StatusName ');
|
||||
$this->db->from('T_Status');
|
||||
$this->db->where('StatusType', REQUISTSTATUS);
|
||||
$this->db->where('StatusCode !=', REQ_DRAFT);
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
/* This function is used to get the Raw Material information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRequistionList($ReqNo,$IsArray='')
|
||||
{
|
||||
|
||||
$result = $this->db-> query("CALL P_GET_AllREQUISTION('".$ReqNo."')") or die(mysql_error());
|
||||
|
||||
{
|
||||
//echo 'PO Line item Inserted successfully';
|
||||
if($IsArray != '')
|
||||
{
|
||||
|
||||
return $result->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $result->result();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get Employee details based on Employee ID Selection
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function GetEmployeeDetails($EmpID)
|
||||
{
|
||||
|
||||
$this->db->select(' EMP.EmpID,EMP.Designation,DEPT.DEPCode,DEPT.DepartmentName');
|
||||
$this->db->from('T_Employee_Details EMP');
|
||||
$this->db->join('T_DepartmentDetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode');
|
||||
$this->db->where('EMP.EmpID ',$EmpID );
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the Cost Center details for the Login user department
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function GetCostCenterByDept($DeptId)
|
||||
{
|
||||
|
||||
$this->db->select('Mast.CostCenterCode,Mast.CostCenterName');
|
||||
$this->db->from('T_CostCenter_Master Mast ');
|
||||
$this->db->join('T_CostCenter_Departments COST', 'COST.CostCenterCode = Mast.CostCenterCode');
|
||||
$this->db->where('COST.DEPCode ',$DeptId );
|
||||
$query = $this->db->get();
|
||||
// print_r( $this->db->last_query());
|
||||
return $query->result_array();
|
||||
}
|
||||
/**
|
||||
* This function is used to get the Available BudgetAmount for the Cost center
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function GetAvailableBudgetAmount($CostCode,$Year,$BudgetType)
|
||||
{
|
||||
$this->db->select('BudgetAmount');
|
||||
$this->db->from('T_CostCenter_Budget');
|
||||
$this->db->where('CostCenterCode',$CostCode );
|
||||
$this->db->where('BudgetYear',$Year );
|
||||
$this->db->where('BudgetType',$BudgetType );
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
function EditMaterialCode($ReqNo,$ReqType)
|
||||
{
|
||||
$subQuery ='SELECT Mat.MaterialCode,Mat.MaterialName,Mat.UOM
|
||||
from T_MaterialMaster Mat where Mat.MaterialCode not in (select Req.MaterialCode from T_Requestion_Details Req
|
||||
join T_Requestion_Master mast on Req.ReqNo = mast.ReqNo where mast.ReqNo=? and mast.ReqType=?
|
||||
) and Mat.MaterialType=?';
|
||||
|
||||
$query = $this->db->query($subQuery, array($ReqNo,$ReqType,$ReqType));
|
||||
|
||||
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function is used to get the Material details for the Request type
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function GetMaterialCode($ReqType,$NotArray='')
|
||||
{
|
||||
$this->db->select('MaterialCode, MaterialName,UOM');
|
||||
$this->db->from('T_MaterialMaster');
|
||||
$this->db->where('MaterialType',$ReqType );
|
||||
|
||||
$query = $this->db->get();
|
||||
if($NotArray == '')
|
||||
{
|
||||
return $query->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to get the Raw Material information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRawMaterialList($MaterialCode)
|
||||
{
|
||||
$this->db->select('MaterialName,UOM');
|
||||
$this->db->from('T_MaterialMaster');
|
||||
$this->db->where('MaterialCode',$MaterialCode );
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the Config value from configuration table
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getConfigValue($ConfigID ,$ConfigValue = '')
|
||||
{
|
||||
|
||||
$this->db->select('ConfigValue');
|
||||
$this->db->from('T_ConfigDetails');
|
||||
$this->db->where('Config_id ',$ConfigID );
|
||||
if($ConfigValue != '')
|
||||
{
|
||||
$this->db->where('ConfigValue != ',$ConfigValue );
|
||||
}
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function is used to get the All employees
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getAllEmployees()
|
||||
{
|
||||
$this->db->select('EmpID,FirstName,LastName');
|
||||
$this->db->from('T_Employee_Details');
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the Employee Details
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getEmpIdByUserID($UserID)
|
||||
{
|
||||
$subQuery ='SELECT EMP.EmpID,EMP.FirstName,EMP.Designation,DEPT.DEPCode,DEPT.DepartmentName
|
||||
FROM T_Employee_Details EMP JOIN T_DepartmentDetails DEPT ON
|
||||
EMP.Departmentcode = DEPT.DEPCode
|
||||
WHERE EMP.EmpID=(select EmpID from tbl_users where userId=?)';
|
||||
|
||||
$query = $this->db->query($subQuery, array($UserID));
|
||||
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the CostCenter for the Selected Employee
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getCostCenterUserID($UserID)
|
||||
{
|
||||
$subQuery ='SELECT Mast.CostCenterCode,Mast.CostCenterName from T_CostCenter_Master Mast
|
||||
LEFT JOIN T_CostCenter_Departments COST ON COST.CostCenterCode = Mast.CostCenterCode
|
||||
WHERE COST.DEPCode=(select Departmentcode from T_Employee_Details where EmpID = (select EmpID from tbl_users where userId=?))';
|
||||
|
||||
$query = $this->db->query($subQuery, array($UserID));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the Purchase order Type
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function CheckDraftStatus($UserID)
|
||||
{
|
||||
|
||||
$subQuery = 'select count(ReqNo) as cnt,ReqNo from T_Requestion_Master where
|
||||
Requestedby= ( select EmpID from tbl_users where userId=?) and status=?';
|
||||
|
||||
$query = $this->db->query($subQuery, array($UserID,REQ_DRAFT));
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
/**
|
||||
* This function is used to get the Requsition List for the login user
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRequistDetails($ReqID,$NoArray='')
|
||||
{
|
||||
|
||||
$subQuery = 'select distinct ReqNo,ReqType,Status,Requestedby,DATE_FORMAT(mast.CreatedDate, "%d-%m-%Y") as CreatedDate,Schedule_Type,NumberOfService,Service_Period ,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,DATE_FORMAT(mast.ReqDate, "%d-%m-%Y") as ReqDate,CostCenterCode
|
||||
from T_Requestion_Master mast
|
||||
join T_Employee_Details emp on mast.Requestedby = emp.EmpID
|
||||
join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode
|
||||
where ReqNo=?';
|
||||
|
||||
$query = $this->db->query($subQuery, array($ReqID));
|
||||
if($NoArray == '')
|
||||
{
|
||||
return $query->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to get the Requsition List for the login user
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRequistListUserID($UserID)
|
||||
{
|
||||
|
||||
$subQuery = 'select ReqNo, ReqType ,Status,CreatedDate ,StatusName from T_Requestion_Master mast
|
||||
join T_Status st on st.StatusCode= mast.Status where
|
||||
Requestedby = ( select EmpID from tbl_users where userId=?) and Status != ? ';
|
||||
|
||||
$query = $this->db->query($subQuery, array($UserID,REQ_DELETED));
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
/**
|
||||
* This function is used to get the Requsition List for the login user
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRequistItemList($ReqID,$NoArray='')
|
||||
{
|
||||
|
||||
$subQuery = 'select distinct Req.ReqNo, Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Req.Quantity,sum(Po.Quantity) as POQTY,sta.StatusName from T_MaterialMaster Mat
|
||||
left join T_Requestion_Details Req on Req.MaterialCode = Mat.MaterialCode
|
||||
left join T_PurchaseOrder_LineItem Po on Po.ReqNo = Req.ReqNo and Po.MaterialCode = Req.MaterialCode
|
||||
left join T_Status sta on sta.StatusCode = Req.Status where Req.ReqNo=? group by Po.ReqNo,Req.MaterialCode';
|
||||
|
||||
|
||||
$query = $this->db->query($subQuery, array($ReqID));
|
||||
if($NoArray == '')
|
||||
{
|
||||
return $query->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to add the Requistion into the Database
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function addRequistion($Requistion)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_Requestion_Master', $Requistion);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
$this->db->trans_complete();
|
||||
if($insert_id>0)
|
||||
{
|
||||
$subQuery = 'select max(ReqNo) as ReqNo from T_Requestion_Master';
|
||||
|
||||
$query = $this->db->query($subQuery);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* This function is used to check the Request is in Draft status
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function RequistionIsExists($ReqBy)
|
||||
{
|
||||
$this->db->select('ReqNo');
|
||||
$this->db->from('T_Requestion_Master');
|
||||
$this->db->where('Status ',REQ_DRAFT );
|
||||
$this->db->where('Requestedby ',$ReqBy );
|
||||
$query = $this->db->get();
|
||||
|
||||
if ($query->num_rows > 0) {
|
||||
//echo $result->num_rows;
|
||||
return $query->result_array();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to check the Request Line Item is in Draft status
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function LineItemIsExists($ReqNo,$MaterialCode)
|
||||
{
|
||||
$this->db->select('ReqNo');
|
||||
$this->db->from('T_Requestion_Details');
|
||||
$this->db->where('ReqNo ',$ReqNo );
|
||||
$this->db->where('MaterialCode ',$MaterialCode );
|
||||
$query = $this->db->get();
|
||||
|
||||
if ($query->num_rows > 0) {
|
||||
//echo $result->num_rows;
|
||||
return $query->result_array();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to add the Line item details to the Database
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function addRequistionDetails($Requistion)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_Requestion_Details', $Requistion);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
$this->db->trans_complete();
|
||||
// print_r($this->db->last_query());
|
||||
return $insert_id;
|
||||
|
||||
}
|
||||
/**
|
||||
* This function is used to delete the Line item from details into Database
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function DeleteRequistionLineItem( $ReqNo,$MaterialCode)
|
||||
{
|
||||
$this->db->where('ReqNo', $ReqNo);
|
||||
$this->db->where('MaterialCode', $MaterialCode);
|
||||
$this->db->delete('T_Requestion_Details');
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to update the details into Database
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function UpdateRequistionLineItem($Requist, $ReqNo,$MaterialCode)
|
||||
{
|
||||
$this->db->where('ReqNo', $ReqNo);
|
||||
$this->db->where('MaterialCode', $MaterialCode);
|
||||
$this->db->update('T_Requestion_Details',$Requist);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to update the details into Database
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function UpdateRequistion($Requistion, $ReqNo)
|
||||
{
|
||||
$this->db->where('ReqNo', $ReqNo);
|
||||
$this->db->update('T_Requestion_Master', $Requistion);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function is used to get the List of Requist details to the approver
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getApproverRequistList($UserID,$Status = '',$FromDate='' ,$ToDate='')
|
||||
{
|
||||
// echo 'UserId: '.$UserID . 'From: '.$FromDate .'TO: '. $ToDate. 'Status: '. $Status;
|
||||
|
||||
$subQuery = 'select distinct ReqNo,Status,mast.CreatedDate,Requestedby,emp.FirstName,mast.Comments,st.StatusName
|
||||
from T_Requestion_Master mast join T_Employee_Details emp on mast.Requestedby = emp.EmpID
|
||||
join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode
|
||||
join T_Status st on st.StatusCode = mast.Status
|
||||
where status not in(?,?,?) and emp.Departmentcode in (select DEPCode from T_DepartmentDetails where HeadDept=
|
||||
(select HeadDept from T_DepartmentDetails where DEPCode = (select Departmentcode from T_Employee_Details where
|
||||
EmpID=(select EmpID from tbl_users where userId=?))))';
|
||||
$subQuery1 = $subQuery;
|
||||
$query ='';
|
||||
|
||||
if($FromDate != '' && $ToDate != '' && $Status !='' )
|
||||
{
|
||||
|
||||
$Where = 'and mast.CreatedDate >= ? and mast.CreatedDate <= ? and Status=?';
|
||||
$subQuery1 .= $Where;
|
||||
$query = $this->db->query($subQuery1, array(REQ_DRAFT,REQ_DELETED,REQ_REJECTED,$UserID,$FromDate,$ToDate,$Status));
|
||||
}
|
||||
else if($FromDate != '' && $ToDate != '' && $Status =='')
|
||||
{
|
||||
$Where = 'and mast.CreatedDate >= ? and mast.CreatedDate <= ? ';
|
||||
$subQuery1 .= $Where;
|
||||
$query = $this->db->query($subQuery1, array(REQ_DRAFT,REQ_DELETED,REQ_REJECTED,$UserID,$FromDate,$ToDate));
|
||||
}
|
||||
else if($Status != '' && $FromDate == '' && $ToDate == '')
|
||||
{
|
||||
$Where = 'and Status = ?';
|
||||
$subQuery1 .= $Where;
|
||||
$query = $this->db->query($subQuery1, array(REQ_DRAFT,REQ_DELETED,REQ_REJECTED,$UserID,$Status));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$query = $this->db->query($subQuery, array(REQ_DRAFT,REQ_DELETED,REQ_REJECTED,$UserID));
|
||||
}
|
||||
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,507 +0,0 @@
|
||||
<?php
|
||||
$MRIRNO="";
|
||||
$mrirdate="";
|
||||
$MRIRRasiedbyName="";
|
||||
$IGRNO="";
|
||||
$igrdate="";
|
||||
$IGRRasiedbyName="";
|
||||
$PONO="";
|
||||
$podate="";
|
||||
$PORasiedbyName="";
|
||||
$VehicleNo="";
|
||||
$CourierNo="";
|
||||
$DeliveryChellanOrInvoiceNo="";
|
||||
$SupplierName="";
|
||||
$dcdate="";
|
||||
$Address="";
|
||||
$CreatedBy="";
|
||||
$ServiceDescription="";
|
||||
$RowCount = 0;
|
||||
$MRIRStatus = '';
|
||||
if(!empty($MRIRDetails))
|
||||
{
|
||||
|
||||
foreach ($MRIRDetails as $MRIR)
|
||||
{
|
||||
$MRIRNO = $MRIR->MRIRNO;
|
||||
$MRIRDate=$MRIR->MRIRCreatedon;
|
||||
$mrir_date = strtotime( $MRIRDate );
|
||||
$mrirdate = date( 'd/m/Y', $mrir_date );
|
||||
$MRIRRasiedbyName=$MRIR->MRIRRasiedbyName;
|
||||
$IGRNO = $MRIR->IGRNO;
|
||||
$IGRDate = $MRIR->IGRCreated;
|
||||
$igr_date = strtotime( $IGRDate );
|
||||
$igrdate = date( 'd/m/Y', $igr_date );
|
||||
$IGRRasiedbyName=$MRIR->IGRRasiedbyName;
|
||||
$PONO = $MRIR->PONO;
|
||||
$PODate=$MRIR->PODate;
|
||||
$PORasiedbyName=$MRIR->PORasiedbyName;
|
||||
$po_date = strtotime( $PODate );
|
||||
$podate = date( 'd/m/Y', $po_date );
|
||||
$VehicleNo = $MRIR->VehicleNo;
|
||||
$CourierNo= $MRIR->CourierNo;
|
||||
$DeliveryChellanOrInvoiceNo=$MRIR->DeliveryChellanOrInvoiceNo;
|
||||
$SupplierName=$MRIR->SupplierName;
|
||||
$DeliveryChellanDate=$MRIR->DeliveryChellanDate;
|
||||
$dc_date = strtotime( $DeliveryChellanDate );
|
||||
$dcdate = date( 'd/m/Y', $dc_date );
|
||||
$Address=$MRIR->Address;
|
||||
//$CreatedBy=$MRIR->CreatedBy;
|
||||
$ServiceDescription=$MRIR->ServiceDescription;
|
||||
$MRIRStatus = $MRIR->MRIRStatus;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
//$("#IGRNO").select2();
|
||||
$("#QualityIncharge").select2();
|
||||
$("#plantIncharge").select2();
|
||||
|
||||
});//ready closed.
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.modal
|
||||
{
|
||||
padding-right:25% ! important;
|
||||
}
|
||||
.select2
|
||||
{
|
||||
width: 100% ! important;
|
||||
}
|
||||
.num{
|
||||
text-align:right;
|
||||
}
|
||||
.dataTables_wrapper {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height:537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Edit Material Receipt And Inspection Report (MRIR) -<?php echo $MRIRNO ;?></center>
|
||||
</h1>
|
||||
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left MRIR ','name' => 'MRIR','id' => 'MRIR');
|
||||
echo form_open($this->config->base_url().'/MRIRcontroller/generateMRIR/',$attributes); ?>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<div id ="content"></div>
|
||||
<div class="row" style="font-size:12px;">
|
||||
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
|
||||
<!--<div class="col-md-2">
|
||||
<label for="MRIRNO">MRIR Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'MRIRNO','value' => set_value('MRIRNO',$MRIRNO),'id'=>'MRIRNO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="col-md-2">
|
||||
<label for="SupplierName">Supplier Name </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName',$SupplierName),'id'=>'SupplierName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="MRIRDate">MRIR Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'MRIRDate','value' => set_value('MRIRDate',$mrirdate),'id'=>'MRIRDate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="MRIRRasiedbyName">MRIR Created By</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'MRIRRaisedby','value' => set_value('MRIRRaisedby',$MRIRRasiedbyName),'id'=>'MRIRDate', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding:0px;">
|
||||
<label for="IGRNO">IGR Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRNO','value' => set_value('IGRNO',$IGRNO),'id'=>'IGRNO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="IGRDate">IGR Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRDate','value' => set_value('IGRDate',$igrdate),'id'=>'IGRDate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label for="IGRRasiedbyName">IGR Created By</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRRaisedBy','value' => set_value('IGRRaisedBy',$IGRRasiedbyName),'id'=>'IGRRaisedBy', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<div class="col-md-2">
|
||||
<label for="PONO">PO Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'PONO','value' => set_value('PONO',$PONO),'id'=>'PONO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="PODate">PO Date</label>
|
||||
<div class="from-group">
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$podate),'id'=>'PODate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="PORasiedbyName">PO Created By</label>
|
||||
<div class="from-group">
|
||||
<?php
|
||||
$data = array('name' => 'PORasiedbyName','value' => set_value('PORasiedbyName',$PORasiedbyName),'id'=>'PORasiedbyName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="padding:0.9px;">
|
||||
<label for="DeliveryChellanOrInvoiceNo">DC / IN NO</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="padding:0.9px;">
|
||||
<label for="DeliveryChellanDate">DC / IN Date </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="VehicleNo">Vehicle Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control', 'readonly' => 'true','align' => 'left');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="CourierNo">Courier Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="padding:1%;">
|
||||
<div class="col-md-12">
|
||||
<table id="mytable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>Item Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Adviced Quantity</th>
|
||||
<th>Actual Quantity Received</th>
|
||||
<th>Accepted Quantity</th>
|
||||
<th>Rejected Quantity</th >
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
<?php $SNo = 0;
|
||||
|
||||
if(!empty($MRIRDetails))
|
||||
|
||||
{
|
||||
|
||||
foreach($MRIRDetails as $record)
|
||||
{
|
||||
$SNo =$SNo + 1;
|
||||
//print_r($MRIRDetails);
|
||||
|
||||
|
||||
?>
|
||||
<tr id="<?php echo $SNo?>">
|
||||
<td><?php echo $SNo?></td>
|
||||
<td><?php echo $record->MaterialCode?></td>
|
||||
<input type="hidden" name="<?php echo 'MaterialCode'.$SNo ?>" id="<?php echo 'MaterialCode'.$SNo ?>" value=" <?php echo $record->MaterialCode ?> "/>
|
||||
<input type="hidden" name="<?php echo 'Lineitm'.$SNo ?>" id="<?php echo 'Lineitm'.$SNo ?>" value=" <?php echo $record->MRIRItemNo ?> "/>
|
||||
<td><?php echo $record->MaterialName?></td>
|
||||
<td><?php echo $record->UOM?></td>
|
||||
<td class="num"><?php echo $record->Quantity?></td>
|
||||
<td class="num"><?php echo $record->QuantityAsPerInvoice?></td>
|
||||
<input type="hidden" name="<?php echo 'QuantityAsPerInvoice'.$SNo ?>" id="<?php echo 'QuantityAsPerInvoice'.$SNo ?>" />
|
||||
<td class="num" id="<?php echo 'ActualQuantityReced'.$SNo ?>"><?php echo $record->ActualQuantityReceived ?></td>
|
||||
<input type="hidden" name="<?php echo 'ActualQuantityReceived'.$SNo ?>" id="<?php echo 'ActualQuantityReceived'.$SNo ?>" value="<?php echo $record->ActualQuantityReceived ?>"/>
|
||||
<td><input type="text" id="<?php echo 'AcceptQuantity'.$SNo;?>" name="<?php echo 'AcceptQuantity'.$SNo;?>" onchange="setaccept('<?php echo $SNo;?>');" value="<?php echo $record->QuantityAccepted?>"></td>
|
||||
<input type="hidden" name="<?php echo 'QuantityAccepted'.$SNo ?>" id="<?php echo 'QuantityAccepted'.$SNo ?>" />
|
||||
<td><input type="text" id="<?php echo 'RejectQuantity'.$SNo;?>" name="<?php echo 'RejectQuantity'.$SNo;?>" onchange="setreject('<?php echo $SNo;?>');" value="<?php echo $record->QuantityRejected?>"></td>
|
||||
<input type="hidden" name="<?php echo 'QuantityRejected'.$SNo ?>" id="<?php echo 'QuantityRejected'.$SNo ?>" />
|
||||
<td><input type="text" id="<?php echo 'Remark'.$SNo ?>" name="<?php echo 'Remark'.$SNo ?>" onchange="setremark('<?php echo $SNo;?>');"></td>
|
||||
<input type="hidden" name="<?php echo 'Remarks1'.$SNo ?>" id="<?php echo 'Remarks1'.$SNo ?>" />
|
||||
</tr>
|
||||
<?php
|
||||
// $SNo++;
|
||||
|
||||
}
|
||||
}
|
||||
$RowCount = $SNo;
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-1 col-md-offset-10">
|
||||
<?php if($MRIRStatus == MRIR_CREATED)
|
||||
{ ?>
|
||||
<a class="btn btn-primary" type="submit" onclick="updatemrir()">Update MRIR</a>
|
||||
<?php } else {?>
|
||||
<a class="btn btn-primary" onclick="Redirect()">OK</a>
|
||||
<?php } ?>
|
||||
<input type="hidden" name="RowCount" id="RowCount" value="<?php echo $RowCount ?>" />
|
||||
<input type="hidden" name="MRIRNO" id="MRIRNO " value="<?php echo $MRIRNO ?>" />
|
||||
<input type="hidden" name="status" id="status" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
function Redirect()
|
||||
{
|
||||
window.location ="ViewMRIR";
|
||||
}
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
"ordering": false,
|
||||
"info": false,
|
||||
"autoWidth": false
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function validate()
|
||||
{
|
||||
var rowcount = $("#RowCount").val();
|
||||
|
||||
var Noval = 0;
|
||||
var isExceed = 0;
|
||||
for(k=1;k<=rowcount ; k++)
|
||||
{
|
||||
|
||||
var tr= document.getElementById(k);
|
||||
var ActualQty = 0.0;
|
||||
|
||||
|
||||
var cellval = tr.cells;
|
||||
|
||||
ActualQty = parseFloat(cellval[6].innerHTML);
|
||||
|
||||
var AcceptQuantity = parseFloat( $('#AcceptQuantity'+k).val() == '' ? '0.00' : $('#AcceptQuantity'+k).val());
|
||||
|
||||
var RejectedQuantity = parseFloat( $('#RejectQuantity'+k).val() == '' ? '0.00' : $('#RejectQuantity'+k).val());
|
||||
|
||||
if(AcceptQuantity != '0.00')
|
||||
{
|
||||
|
||||
if(ActualQty < (AcceptQuantity+RejectedQuantity))
|
||||
{
|
||||
isExceed = 1;
|
||||
return false;
|
||||
}
|
||||
Noval = 1;
|
||||
}
|
||||
else if(RejectedQuantity != 0)
|
||||
{
|
||||
if(ActualQty < (AcceptQuantity+RejectedQuantity))
|
||||
{
|
||||
isExceed = 1;
|
||||
return false;
|
||||
}
|
||||
// Noval = 1;
|
||||
}
|
||||
}
|
||||
//alert(Noval);
|
||||
if (Noval == 0 )
|
||||
{
|
||||
|
||||
alert('Accepted Quantity/ Rejected Quantity is Empty.Please Enter the value');
|
||||
return false;
|
||||
|
||||
}
|
||||
else if(isExceed == 1 ){
|
||||
|
||||
alert("Accept/Reject Quantity is exceeding the Actual Quantity.Please correct the value to procced further ")
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function setaccept(rowId)
|
||||
{
|
||||
|
||||
var accept = parseFloat($('#AcceptQuantity'+rowId).val());
|
||||
var tr= document.getElementById(rowId);
|
||||
var Actulqty = 0.0;
|
||||
|
||||
|
||||
var cellval = tr.cells;
|
||||
|
||||
Actulqty = parseFloat(cellval[6].innerHTML);
|
||||
|
||||
|
||||
var qtyAsperchellan = parseFloat($('#QuantityAsPerInvoice'+rowId).val());
|
||||
var rejected = (Actulqty - accept);
|
||||
|
||||
$('#RejectQuantity'+rowId).val(rejected) ;
|
||||
$('#QuantityRejected'+rowId).val(rejected) ;
|
||||
$('#QuantityAccepted'+rowId).val(accept) ;
|
||||
|
||||
if(accept > Actulqty)
|
||||
{
|
||||
alert("Accept Quantity is exceeding the Actual Quantity.Please change the AcceptQuantity ")
|
||||
$("#AcceptQuantity"+rowId).focus();
|
||||
$("#AcceptQuantity"+rowId).val('');
|
||||
$("#RejectQuantity"+rowId).val('');
|
||||
$("#QuantityRejected"+rowId).val('');
|
||||
return false;
|
||||
}
|
||||
else if(rejected > Actulqty )
|
||||
{
|
||||
alert("Reject Quantity is exceeding the Actual Quantity.Please change the AcceptQuantity ")
|
||||
$("#RejectQuantity"+rowId).focus();
|
||||
$("#RejectQuantity"+rowId).val('');
|
||||
$("#QuantityRejected"+rowId).val('');
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(accept !='')
|
||||
{
|
||||
$('#status').val('<?php echo MRIR_APPROVED?>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#status').val('<?php echo MRIR_REJECTED?>');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setreject(rowId)
|
||||
{
|
||||
var tr= document.getElementById(rowId);
|
||||
var Actulqty = 0.0;
|
||||
|
||||
|
||||
var cellval = tr.cells;
|
||||
|
||||
Actulqty = parseFloat(cellval[6].innerHTML);
|
||||
var reject = parseFloat($('#RejectQuantity'+rowId).val());
|
||||
if(reject > Actulqty )
|
||||
{
|
||||
alert("Reject Quantity is exceeding the Actual Quantity.Please change the AcceptQuantity ")
|
||||
$("#RejectQuantity"+rowId).focus();
|
||||
$("#RejectQuantity"+rowId).val('');
|
||||
$("#QuantityRejected"+rowId).val('');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setremark(rowId)
|
||||
{
|
||||
var remark = ($('#Remark'+rowId).val());
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function updatemrir()
|
||||
{
|
||||
if(validate())
|
||||
{
|
||||
$('#content').loader('show');
|
||||
//alert("update function worked ");
|
||||
$.ajax({
|
||||
data:$('.MRIR').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>MRIRcontroller/updated_db",
|
||||
|
||||
|
||||
success:function(data){
|
||||
//alert("success function worked ");
|
||||
if(data){
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
window.location ="ViewMRIR";
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("value not updated");
|
||||
}
|
||||
|
||||
}//success function closed
|
||||
|
||||
});//ajax function closed
|
||||
}
|
||||
}//update function closed
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,7 @@ $(function() {
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Add Cost List</center>
|
||||
<center>Resico Industries - Add Cost List</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
@ -51,7 +51,7 @@ $(function() {
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Add Asset Details</center>
|
||||
<center>Resico Industries - Add Asset Details</center>
|
||||
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
@ -1,99 +0,0 @@
|
||||
<div class="content-wrapper" style="min-height: 537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Cost List</center>
|
||||
|
||||
</h1>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>costListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<center><h3 class="box-title">Add Cost Details</h3></center>
|
||||
</div><!-- /.box-header -->
|
||||
<!-- form start -->
|
||||
|
||||
<form role="form" id="addUser" action="<?php echo base_url() ?>addNewcost" method="post" role="form">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<!--<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="CostCentreID">Cost Center ID</label>
|
||||
<input type="text" class="form-control required" id="CostCentreID" name="CostCentreID" maxlength="128">
|
||||
</div>
|
||||
|
||||
</div>-->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="CostName">Cost Name</label>
|
||||
<input type="text" class="form-control required" id="CostName" name="CostName" maxlength="128">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="Description">Description</label>
|
||||
<input type="text" class="form-control required " id="Description" name="Description" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="submit" class="btn btn-primary" value="Submit" />
|
||||
<input type="reset" class="btn btn-primary" value="Cancel" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script src="<?php echo base_url(); ?>assets/js/addUser.js" type="text/javascript"></script>
|
||||
@ -4,7 +4,7 @@
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<CENTER><h3 class="box-title">Siddharth Industries - Asset Details</h3></CENTER>
|
||||
<CENTER><h3 class="box-title">Resicos Industries - Asset Details</h3></CENTER>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<CENTER><h3 class="box-title">Siddharth Industries - Cost Details</h3></CENTER>
|
||||
<CENTER><h3 class="box-title">Resico Industries - Cost Details</h3></CENTER>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
@ -172,7 +172,7 @@ $( document ).ready(function() {
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Edit Cost Center</center>
|
||||
<center>Resico Industries - Edit Cost Center</center>
|
||||
|
||||
</h1>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -153,7 +153,7 @@ $(function() {
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Edit Asset Details-<?php echo $AssetCode ; ?></center>
|
||||
<center>Resico Industries - Edit Asset Details-<?php echo $AssetCode ; ?></center>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,576 +0,0 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.3.4/jquery.inputmask.bundle.min.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#PONO").select2();
|
||||
|
||||
|
||||
$("#InvoiceDate").datepicker({
|
||||
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
|
||||
});
|
||||
//jquery for vechicle masking
|
||||
$(document).ready(function(){
|
||||
Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal {
|
||||
text-align: center;
|
||||
padding: 0!important;
|
||||
}
|
||||
|
||||
.modal:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.select2 {
|
||||
width: 100% ! important;
|
||||
}
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
.dataTables_wrapper {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper" style="min-height:537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Inward Gate Register (IGR) Entry</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<div class="row" >
|
||||
<div id="content" > </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-2">
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left IGR ','name' => 'IGR','id' => 'IGR');
|
||||
|
||||
echo form_open($this->config->base_url().'/inwardgateregister/addNewigr/',$attributes); ?>
|
||||
<label>Select Purchase Order NO </label>
|
||||
|
||||
<?php
|
||||
$options = array("-1"=>'Purchase Order No');
|
||||
|
||||
if(!empty($PO_NO))
|
||||
{
|
||||
//print_r($PO_NO);
|
||||
foreach ($PO_NO as $SI):
|
||||
|
||||
$options[$SI->PONO] = $SI->PONO .'-'. $SI->SupplierName ;
|
||||
$PONO = $SI->PONO;
|
||||
|
||||
|
||||
endforeach;
|
||||
|
||||
}
|
||||
|
||||
echo form_dropdown('PONO', $options,set_value('PONO'),'id="PONO"' ,'class="form-control select2"' , 'required="true"');
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Supplier Name </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'Sup', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Delivery Challan/Invoice NO</label>
|
||||
<?php
|
||||
$data = array('name' => 'InvoiceNo','value' => set_value('InvoiceNo'),'id'=>'InvoiceNo', 'class' => 'form-control', 'required=>"true"' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Delivery Challan/Invoice Date</label>
|
||||
<?php
|
||||
$data = array('name' => 'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'InvoiceDate', 'class' => 'form-control num', 'required'=>'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Vechicle NO</label>
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'), 'id'=>'VehicleNo', 'class' => 'form-control', );
|
||||
echo form_input($data);
|
||||
?>
|
||||
<span pattern="" required="true"></span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Courier NO</label>
|
||||
<?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo'),'id'=>'CourierNo', 'class' => 'form-control' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table id="Inwardgateregistertable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>Item Code</th>
|
||||
<th>Material</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Pending Quantity</th>
|
||||
<th>Advised Quantity</th>
|
||||
|
||||
<th>Remarks</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id ="IGRappend">
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-1 col-md-offset-10">
|
||||
|
||||
<!--<a class="btn btn-primary" type="submit" id="Save" onclick="Save(0);">Generate IGR</a>-->
|
||||
<a class="btn btn-primary" id='IGRLink' name='IGRLink' onclick="Save();">Generate IGR</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="generateIGR" role="dialog">
|
||||
<div class="modal-dialog modal_style">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Inward Gate Register Number</h4></center>
|
||||
</div>
|
||||
<div class="col-md-12"> <br/>
|
||||
<center></center>
|
||||
<center><label style="font-size:40px;" id="finaligr" >Default</label> <center>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<center>
|
||||
<button type="reset" value="Reset" onClick="window.location.reload()"> OK</button>
|
||||
</center>
|
||||
</div><!-- footer div closed -->
|
||||
</div><!-- modal content div closed-->
|
||||
</form><!-- form closed-->
|
||||
</div><!-- modal content closed-->
|
||||
</div><!-- modal fade closed-->
|
||||
<!-- new modal ended-->
|
||||
|
||||
|
||||
|
||||
<!-- new modal ended-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
function validate_Vechicle(){
|
||||
|
||||
var reg = /^^[A-Z]{2}\s[0-9]{2}\s[A-Z]{2}\s[0-9]{4}$/;
|
||||
// alert();
|
||||
var VehicleNo = $('#VehicleNo').val();
|
||||
if(VehicleNo != "")
|
||||
{
|
||||
if (reg.test(VehicleNo) == false)
|
||||
{
|
||||
alert('Please Enter Valid Vehicle Number');
|
||||
return (false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
var rowcount = $("#txtRowCount").val();
|
||||
|
||||
var Noval = 0;
|
||||
var isExceed = 0;
|
||||
for(k=1;k<=rowcount ; k++)
|
||||
{
|
||||
var AdvisedQty = parseFloat( $('#QuantityAsPerInvoice'+k).val() == '' ? '0.00' : $('#QuantityAsPerInvoice'+k).val());
|
||||
var RecQty = parseFloat( $('#txtReceivedQuantity'+k).val() == '' ? '0.00' : $('#txtReceivedQuantity'+k).val());
|
||||
var OrderedQty =parseFloat($('#Quantity_1'+k).text());
|
||||
if(AdvisedQty != '0.00')
|
||||
{
|
||||
|
||||
if(OrderedQty < (AdvisedQty+RecQty))
|
||||
{
|
||||
isExceed = 1;
|
||||
return false;
|
||||
}
|
||||
Noval = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($('#PONO').val()=='-1')
|
||||
{
|
||||
|
||||
alert("Please select PurchaseOrder");
|
||||
$('#PONO').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#InvoiceNo').val() == '' )
|
||||
{
|
||||
alert('Please Enter Invoice Number' );
|
||||
$('#InvoiceNo').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#InvoiceDate').val() == '' )
|
||||
{
|
||||
alert('Please Enter Invoice Date' );
|
||||
$('#InvoiceDate').focus();
|
||||
return false;
|
||||
}
|
||||
else if (Noval == 0 )
|
||||
{
|
||||
|
||||
alert('Advised Quantity is Empty.Please Enter the value');
|
||||
return false;
|
||||
|
||||
}
|
||||
else if($('#VehicleNo').val() == '' && $('#CourierNo').val() == '')
|
||||
{
|
||||
alert('Please Enter the Vechicle / Courier Number');
|
||||
return false;
|
||||
}
|
||||
else if(isExceed == 1 ){
|
||||
|
||||
alert("Advised Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
"ordering": false,
|
||||
"info": false,
|
||||
"autoWidth": false
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// $(function() {
|
||||
function removeHidden()
|
||||
{
|
||||
var rowcount = $("#txtRowCount").val();
|
||||
for(k=1;k<=rowcount ; k++)
|
||||
{
|
||||
$("#MaterialCode"+k).remove();
|
||||
$("#txtQuantityAsPerInvoice"+k).remove();
|
||||
$("#OrderedQuantity"+k).remove();
|
||||
$("#txtReceivedQuantity"+k).remove();
|
||||
$("#txtRemarks"+k).remove();
|
||||
$("#txtPendingQty"+k).remove();
|
||||
}
|
||||
}
|
||||
|
||||
$('#PONO').change(function() {
|
||||
removeHidden();
|
||||
$("#IGRappend").empty();
|
||||
$('#txtRowCount').val('');
|
||||
|
||||
var id = $('#PONO').val();
|
||||
var status= '';
|
||||
if(id != '-1')
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
$.each(y, function(idx, obj) {
|
||||
|
||||
if(id == obj.PONO)
|
||||
{
|
||||
$("#po").val(obj.PONO);
|
||||
$("#Sup").val(obj.SupplierName);
|
||||
//$("#Add").val(obj.Address);
|
||||
$("#del").val(obj.DeliveryDate);
|
||||
//$("#ser").val(obj.ServiceDescription);
|
||||
status = obj.status;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>inwardgateregister/IGRITEM",
|
||||
|
||||
success:function(data) {
|
||||
|
||||
//alert(data);
|
||||
|
||||
$('#content').loader('hide');
|
||||
//alert(data);
|
||||
var trHTML = '';
|
||||
|
||||
$.each(JSON.parse(data), function (i, item) {
|
||||
|
||||
i=i+1;
|
||||
trHTML += '<tr>' +
|
||||
'<td align="right">' + i + '</td>' +
|
||||
'<td name="MaterialName" id="MaterialCode" >' + item.MaterialCode + '</td>' +
|
||||
'<td>' + item.MaterialName + '</td>' +
|
||||
'<td name="UOM">' + item.UOM + '</td>' +
|
||||
'<td name="Quantity1'+i+'" id="Quantity_1'+i+'">' + item.Quantity + '</td>' +
|
||||
'<td name="ReceivedQuantity'+i+'" id="ReceivedQuantity'+i+'">'+ item.ReceivedQuantity +'</td>'+
|
||||
'<td name="PendingQuantity'+i+'" id="PendingQuantity'+i+'">'+ item.PendingQty +'</td>'+
|
||||
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity('+i+')"id="QuantityAsPerInvoice'+ i +'" name="QuantityAsPerInvoice'+ i +'" value="" onkeypress="return isNumberKey(event);"></td>' +
|
||||
|
||||
'<td><input type="text" id="Remark'+ i +'" name="Remark'+ i +'" class="form" onchange="SetRemarks('+i+')"> </td>' +
|
||||
'</tr>';
|
||||
$('#txtRowCount').val(i);
|
||||
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'MaterialCode'+i,
|
||||
value:item.MaterialCode,
|
||||
name: 'MaterialCode'+i
|
||||
}).appendTo('form');
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'txtQuantityAsPerInvoice'+i,
|
||||
name: 'txtQuantityAsPerInvoice'+i
|
||||
}).appendTo('form');
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'OrderedQuantity'+i,
|
||||
|
||||
value:item.Quantity,
|
||||
name: 'OrderedQuantity'+i
|
||||
|
||||
}).appendTo('form');
|
||||
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'txtReceivedQuantity'+i,
|
||||
name: 'txtReceivedQuantity'+i,
|
||||
value:item.ReceivedQuantity
|
||||
}).appendTo('form');
|
||||
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'txtRemarks'+i,
|
||||
name: 'txtRemarks'+i
|
||||
}).appendTo('form');
|
||||
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'txtPendingQty'+i,
|
||||
name: 'txtPendingQty'+i,
|
||||
value:item.PendingQty
|
||||
}).appendTo('form');
|
||||
//alert(item.PendingQty);
|
||||
if(item.PendingQty == 0.00)
|
||||
{
|
||||
//alert('inside if');
|
||||
$('#QuantityAsPerInvoice'+i).attr('readonly', 'true');
|
||||
// $('#txtEditFreight').attr('readonly', 'true');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#IGRappend").empty();
|
||||
|
||||
|
||||
$('#IGRappend').append(trHTML);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
if(status == '<?php echo IGR_CREATED ?>' || status == '<?php echo MRIR_CREATED ?>' || status == '<?php echo MRIR_APPROVED ?>' )
|
||||
{
|
||||
alert('The Order is completed!!');
|
||||
$("#IGRLink").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#IGRLink").show();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please Select the Purchase Order Number to Create IGR');
|
||||
}
|
||||
});
|
||||
|
||||
function SetRemarks(RowId)
|
||||
{
|
||||
var remks = $("#Remark"+RowId).val();
|
||||
if( remks != '')
|
||||
{
|
||||
$("#txtRemarks"+RowId).val(remks);
|
||||
}
|
||||
}
|
||||
function validateReceivedQuantity(Rowid){
|
||||
//alert(Rowid);
|
||||
|
||||
var InvoiceQty = parseFloat( $('#QuantityAsPerInvoice'+Rowid).val() == '' ? '0.00' : $('#QuantityAsPerInvoice'+Rowid).val());
|
||||
|
||||
var PendingQty = parseFloat( $('#PendingQuantity'+Rowid).text() == '' ? '0.00' : $('#PendingQuantity'+Rowid).text());
|
||||
|
||||
var RecQty = parseFloat( $('#txtReceivedQuantity'+Rowid).val() == '' ? '0.00' : $('#txtReceivedQuantity'+Rowid).val());
|
||||
|
||||
var OrderedQty =parseFloat($("#Quantity_1"+Rowid).text());
|
||||
|
||||
var r =$("#Remark"+Rowid).val();
|
||||
// alert(RecQty);
|
||||
//alert(InvoiceQty);
|
||||
if((InvoiceQty+RecQty) > OrderedQty){
|
||||
|
||||
alert("Advised Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
|
||||
$("#QuantityAsPerInvoice"+Rowid).focus();
|
||||
$("#QuantityAsPerInvoice"+Rowid).val('');
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
else if(((InvoiceQty+RecQty) - OrderedQty) > 0.00){
|
||||
alert("Order is completed.")
|
||||
$("#QuantityAsPerInvoice"+Rowid).focus();
|
||||
$('#QuantityAsPerInvoice'+Rowid).val('');
|
||||
return false;
|
||||
}
|
||||
|
||||
else {
|
||||
// alert(RecQty);
|
||||
$('#PendingQuantity'+Rowid).text((OrderedQty - (InvoiceQty+RecQty)).toFixed(2));
|
||||
$('#txtPendingQty'+Rowid).val(OrderedQty - (InvoiceQty+RecQty));
|
||||
$("#ReceivedQuantity"+Rowid).val(InvoiceQty+RecQty);
|
||||
$("#txtQuantityAsPerInvoice"+Rowid).val(InvoiceQty);
|
||||
// InvoiceQty
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31
|
||||
&& (charCode < 48 || charCode > 57))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
function Save()
|
||||
{
|
||||
//alert("save function worked ");
|
||||
|
||||
if (validate())
|
||||
{
|
||||
// alert($('#Inwardgateregistertable').rows.count);
|
||||
//alert(" if condition validation part ");
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.IGR').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>inwardgateregister/addNewigr",
|
||||
|
||||
success:function(data) {
|
||||
|
||||
if(data){
|
||||
|
||||
$('#content').loader('hide');
|
||||
|
||||
document.getElementById('finaligr').innerHTML=data;
|
||||
$('#generateIGR').modal('show');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
|
||||
}//success function closed
|
||||
});//ajax closed
|
||||
}//validate if closed
|
||||
}//save function closed
|
||||
</script>
|
||||
@ -1,394 +0,0 @@
|
||||
<?php
|
||||
$IGRNO="";
|
||||
$PONO="";
|
||||
$VehicleNo="";
|
||||
$CourierNo="";
|
||||
$DeliveryChellanOrInvoiceNo="";
|
||||
$SupplierName="";
|
||||
$DeliveryChellanDate="";
|
||||
$dcdate="";
|
||||
$Address="";
|
||||
$PORasiedbyName="";
|
||||
$PODate="";
|
||||
$podate="";
|
||||
$IGRDate="";
|
||||
$igrdate="";
|
||||
$ServiceDescription="";
|
||||
$RowCount = 0;
|
||||
|
||||
if(!empty($IGRDetails))
|
||||
{
|
||||
|
||||
foreach ($IGRDetails as $IGR)
|
||||
{
|
||||
$IGRNO = $IGR->IGRNO;
|
||||
$PONO = $IGR->PONO;
|
||||
$VehicleNo = $IGR->VehicleNo;
|
||||
$CourierNo= $IGR->CourierNo;
|
||||
$DeliveryChellanOrInvoiceNo=$IGR->DeliveryChellanOrInvoiceNo;
|
||||
$SupplierName=$IGR->SupplierName;
|
||||
//$DeliveryChellanDate=$IGR->DeliveryChellanDate;
|
||||
|
||||
$dc_date = new DateTime( $IGR->DeliveryChellanDate );
|
||||
$dcdate = $dc_date->format('d/m/Y');;
|
||||
$Address=$IGR->Address;
|
||||
$PORasiedbyName=$IGR->FirstName;
|
||||
$PODate=$IGR->PODate;
|
||||
$po_date = strtotime( $PODate );
|
||||
$podate = date( 'd/m/Y', $po_date );
|
||||
$IGRDate=$IGR->CreatedDate;
|
||||
$igr_date = strtotime( $IGRDate );
|
||||
$igrdate = date( 'd/m/Y', $igr_date );
|
||||
$ServiceDescription=$IGR->ServiceDescription;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#QualityIncharge").select2();
|
||||
$("#plantIncharge").select2();
|
||||
|
||||
});//ready closed.
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal
|
||||
{
|
||||
padding-right:25% ! important;
|
||||
}
|
||||
.select2
|
||||
{
|
||||
width: 100% ! important;
|
||||
}
|
||||
.num{
|
||||
text-align:right;
|
||||
}
|
||||
.dataTables_wrapper {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height:537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Material Receipt And Inspection Report (MRIR)</center>
|
||||
</h1>
|
||||
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left MRIR ','name' => 'MRIR','id' => 'MRIR');
|
||||
echo form_open($this->config->base_url().'/MRIRcontroller/generateMRIR/',$attributes); ?>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<div id="content"></div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<label for="IGRNO">Inward Gate Register Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRNO','value' => set_value('IGRNO',$IGRNO),'id'=>'IGRNO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label for="IGRNO">Inward Gate Register Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRDate','value' => set_value('IGRDate',$igrdate),'id'=>'IGRDate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 col-sm-2">
|
||||
|
||||
<label for="PONO">Purchase Order Number</label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('name' => 'PONO','value' => set_value('PONO',$PONO),'id'=>'PONO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label for="PODate">Purchase Order Date</label>
|
||||
<div class="from-group">
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$podate),'id'=>'PODate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<label for="PORasiedbyName">Purchase Order Created By</label>
|
||||
<div class="from-group"><?php
|
||||
$data = array('name' => 'PORasiedbyName','value' => set_value('PORasiedbyName',$PORasiedbyName),'id'=>'PORasiedbyName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<label for="SupplierName">Supplier Name </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName',$SupplierName),'id'=>'SupplierName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label for="DeliveryChellanOrInvoiceNo">DC / Inv Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label for="DeliveryChellanDate">DC / Inv Date </label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label for="VehicleNo">Vehicle Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control' ,'readonly' => 'true','align' => 'left');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<label for="CourierNo">Courier Number</label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="padding:1%;">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<table id="mytable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>Item Code</th>
|
||||
<th>Material</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Adviced Quantity as per the Challan</th>
|
||||
<th>Actual Quantity Received</th>
|
||||
<!--<th>Accepted_Quantity</th>-->
|
||||
<!--<th>Rejected_Quantity</th>-->
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
<?php $SNo =0;
|
||||
|
||||
if(!empty($IGRDetails))
|
||||
|
||||
{
|
||||
|
||||
foreach($IGRDetails as $record)
|
||||
{
|
||||
$SNo =$SNo + 1;
|
||||
|
||||
|
||||
?>
|
||||
<tr id="<?php echo $SNo?>">
|
||||
|
||||
|
||||
<td><?php echo $SNo?></td>
|
||||
<td><?php echo $record->MaterialCode?></td>
|
||||
<input type="hidden" name="<?php echo 'MaterialCode'.$SNo ?>" id="<?php echo 'MaterialCode'.$SNo ?>" value=" <?php echo $record->MaterialCode ?> "/>
|
||||
<td><?php echo $record->MaterialName?></td>
|
||||
<td><?php echo $record->UOM?></td>
|
||||
<td class="num"><?php echo $record->Quantity?></td>
|
||||
<td class="num"><?php echo $record->QuantityAsPerInvoice?></td>
|
||||
<input type="hidden" name="<?php echo 'QuantityAsPerInvoice'.$SNo ?>" id="<?php echo 'QuantityAsPerInvoice'.$SNo ?>" />
|
||||
<td><input type="text" id="<?php echo 'ActualQuantity'.$SNo;?>" name="<?php echo 'ActualQuantity'.$SNo;?>" onchange="setactual('<?php echo $SNo;?>');"></td>
|
||||
<input type="hidden" name="<?php echo 'ActualQuantityReceived'.$SNo ?>" id="<?php echo 'ActualQuantityReceived'.$SNo ?>" value=""/>
|
||||
<td><input type="text" id="<?php echo 'Remark'.$SNo ?>" name="<?php echo 'Remark'.$SNo ?>" onchange="setremark('<?php echo $SNo;?>');"></td>
|
||||
<input type="hidden" name="<?php echo 'Remarks'.$SNo ?>" id="<?php echo 'Remarks'.$SNo ?>" />
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
} //echo $SNo;
|
||||
}
|
||||
|
||||
$RowCount = $SNo;
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="content"></div>
|
||||
<div class="col-md-1 col-md-offset-10">
|
||||
<a class="btn btn-primary" type="submit" onclick="savemrir()">Generate MRIR</a>
|
||||
<input type="hidden" name="RowCount" id="RowCount" value="<?php echo $RowCount ?>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
function validate()
|
||||
{
|
||||
var rowcount = $("#RowCount").val();
|
||||
//alert(rowcount);
|
||||
var Noval = 0;
|
||||
var isExceed = 0;
|
||||
for(k=1;k<=rowcount; k++)
|
||||
{
|
||||
var ActualQty = parseFloat( $('#ActualQuantity'+k).val() == '' ? '0.00' : $('#ActualQuantity'+k).val());
|
||||
//var RecQty = parseFloat( $('#txtReceivedQuantity'+k).val() == '' ? '0.00' : $('#txtReceivedQuantity'+k).val());
|
||||
//var OrderedQty =parseFloat($('#Quantity_1'+k).text());
|
||||
var tr= document.getElementById(k);
|
||||
var InvoiceQty = 0.0;
|
||||
|
||||
|
||||
var cellval = tr.cells;
|
||||
|
||||
InvoiceQty = parseFloat(cellval[5].innerHTML);
|
||||
|
||||
|
||||
// alert('act'+ActualQty);
|
||||
if(ActualQty != '0.00')
|
||||
{
|
||||
// alert('inside loop');
|
||||
if(ActualQty > InvoiceQty)
|
||||
{
|
||||
isExceed = 1;
|
||||
return false;
|
||||
}
|
||||
Noval = 1;
|
||||
}
|
||||
}
|
||||
//alert(Noval);
|
||||
if (Noval == 0 )
|
||||
{
|
||||
|
||||
alert('Actual Quantity is Empty.Please Enter the value');
|
||||
return false;
|
||||
|
||||
}
|
||||
else if(isExceed == 1 ){
|
||||
|
||||
alert("Actual Quantity is exceeding the Invoice Quantity.Please adjust for further Process ")
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function setactual(rowId)
|
||||
{
|
||||
var tr= document.getElementById(rowId);
|
||||
var InvoiceQty = 0.0;
|
||||
|
||||
|
||||
var cellval = tr.cells;
|
||||
|
||||
InvoiceQty = parseFloat(cellval[5].innerHTML);
|
||||
|
||||
var actual = parseFloat($('#ActualQuantity'+rowId).val());
|
||||
|
||||
|
||||
if(InvoiceQty < actual)
|
||||
{
|
||||
alert("Actual Quantity is exceeding the Invoice Quantity.Please change the Actual Quantity ")
|
||||
$("#ActualQuantity"+rowId).focus();
|
||||
$("#ActualQuantity"+rowId).val('');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function setremark(rowId)
|
||||
{
|
||||
var remark = ($('#Remark'+rowId).val());
|
||||
//alert(remark);
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function savemrir()
|
||||
{
|
||||
if(validate())
|
||||
{
|
||||
//alert("save function worked ");
|
||||
$("#content").load('show');
|
||||
|
||||
$.ajax({
|
||||
data:$('.MRIR').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>MRIRcontroller/stored_db",
|
||||
|
||||
success:function(data) {
|
||||
|
||||
|
||||
if(data){
|
||||
$("#content").load('hide');
|
||||
alert(data);
|
||||
|
||||
window.location ="viewmaterialinspectionreport";
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
|
||||
}//success function closed
|
||||
});//ajax closed
|
||||
}
|
||||
}//save function closed
|
||||
</script>
|
||||
@ -1,901 +0,0 @@
|
||||
|
||||
<?php
|
||||
$EmpID = "";
|
||||
$Designation = "";
|
||||
$DepartmentName = "";
|
||||
$FirstName = "";
|
||||
|
||||
if(!empty($Emp))
|
||||
{
|
||||
foreach ($Emp as $Emp)
|
||||
{
|
||||
$EmpID = $Emp->EmpID ;
|
||||
$FirstName = $Emp->FirstName ;
|
||||
$Designation = $Emp->Designation;
|
||||
$DepartmentName =$Emp->DepartmentName;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div>
|
||||
<center><b><h2>Siddharth Industries - Requisition Form</h2></b></center>
|
||||
<div class="container-fluid">
|
||||
<div id="content"></div>
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left requistion ','name' => 'requistion','id' => 'requistion');
|
||||
|
||||
echo form_open($this->config->base_url().'requisitionform/SearchRequistList',$attributes); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Request Type</label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1"=>'Select Request Type');
|
||||
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($RequestType))
|
||||
{
|
||||
foreach ($RequestType as $RID):
|
||||
|
||||
|
||||
$options[$RID->ConfigValue] = $RID->ConfigValue;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('RequestType', $options,set_value('ConfigValue'),'id="RequestType"' ,'class = "form-control select2"','required="true"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Requested By</label>
|
||||
<div>
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EmpID','value' => set_value('EmpID',$FirstName),'id'=>'EmpID', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="hidden" name="EmpID" id="EmpID" value=<?php echo $EmpID?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeptName','value' => set_value('DeptName',$DepartmentName),'id'=>'DeptName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Designation</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Designation','value' => set_value('Designation',$Designation),'id'=>'Designation', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Name</label>
|
||||
<div>
|
||||
<?php
|
||||
$Costs = array("-1"=>'Select Cost Center Name');
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($CostCenter))
|
||||
{
|
||||
foreach ($CostCenter as $SID):
|
||||
// echo $SID->ConfigValue;
|
||||
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode .'-'. $SID->CostCenterName ;
|
||||
|
||||
endforeach;
|
||||
|
||||
}
|
||||
echo form_dropdown('CostCenter', $Costs,set_value('CostCenter'),'id="CostCenter"' ,'class = "form-control"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Available Budget Amount</label> <img id="AlertImg" src="<?php echo base_url(); ?>assets/dist/img/red.png" alt="your image" width="25px" style="display:none"/>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'AvlBudgetAmount','value' => set_value('AvlBudgetAmount'),'id'=>'AvlBudgetAmount', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label>Select Service Schedule Type</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$Schdule =array("One Time", "Recurring");
|
||||
|
||||
|
||||
if(!empty($Schdule))
|
||||
{
|
||||
foreach ($Schdule as $Sch):
|
||||
|
||||
$SchType[$Sch] = $Sch ;
|
||||
|
||||
endforeach;
|
||||
|
||||
}
|
||||
echo form_dropdown('ScheduleType', $SchType,set_value('ScheduleType'),'id="ScheduleType"' ,'class = "form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" id="ServicePeriodOption" style="display:none;">
|
||||
<label>Select Service Period Option</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if(!empty($ServiceOption))
|
||||
{
|
||||
foreach ($ServiceOption as $SerOption):
|
||||
|
||||
|
||||
$ServiceOptions[$SerOption->ConfigValue] = $SerOption->ConfigValue;
|
||||
endforeach;
|
||||
|
||||
}
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions,set_value('ServiceOptions'),'id="ServiceOptions"' ,'class = "form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" id="NoServices" style="display:none;">
|
||||
<label>Number of Services</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ServiceNo','value' => set_value('ServiceNo'),'id'=>'ServiceNo', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right">
|
||||
<a onclick="return validateBeforeAdd();" class="btn btn-primary">Add Line Item</a>
|
||||
|
||||
<div class="modal fade" id="myModal1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Add Line Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Material Code</label>
|
||||
<div >
|
||||
<?php
|
||||
$options = array("0"=>'Material Code');
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($MaterialList))
|
||||
{
|
||||
foreach ($MaterialList as $MID):
|
||||
|
||||
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode.' '.' - '.' '.$MID->MaterialName;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Description','value' => set_value('Description'),'id'=>'Description', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'UOM','value' => set_value('UOM'),'id'=>'UOM', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info font addClick" ID="addClick" ><i class="fa fa-plus"></i> <span class="bold">Add</span></a>
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><br/> <div class="modal fade" id="EditItem" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Edit Line Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Material Code</label>
|
||||
<div >
|
||||
<?php
|
||||
$data = array('name' => 'EditMaterialCode', 'value' => set_value('EditMaterialCode'),'id'=>'EditMaterialCode', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditDescription','value' => set_value('EditDescription'),'id'=>'EditDescription', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'EditUOM','value' => set_value('EditUOM'),'id'=>'EditUOM', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity','value' => set_value('EditQuantity'),'id'=>'EditQuantity', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info font EditClick" ID="EditClick" ><i class="fa fa-plus"></i> <span class="bold">Edit</span></a>
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div></br>
|
||||
|
||||
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>Uom</th>
|
||||
<th>Quantity</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tempAppend">
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<div align="right" style="padding-right:10px">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
|
||||
<input type="submit" class="btn btn-primary" >
|
||||
<input type="reset" class="btn btn-primary">
|
||||
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var isExceed = 0;
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31
|
||||
&& (charCode < 48 || charCode > 57))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
$( ".datePicker" ).datepicker({ dateFormat: 'dd/mm/yy' });
|
||||
|
||||
//Initialize Select2 Elements
|
||||
$(".select2").select2();
|
||||
|
||||
$('#CostCenter').change(function() {
|
||||
|
||||
var id = $('#CostCenter').val();
|
||||
$("#AvlBudgetAmount").val('');
|
||||
|
||||
var ReqType = $('#RequestType').val();
|
||||
|
||||
if(id != '-1' && ReqType != '-1')
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType,
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
$("#AvlBudgetAmount").val(parseFloat(data).toFixed(2));
|
||||
if(parseFloat($("#AvlBudgetAmount").val()) <= 0)
|
||||
{
|
||||
$('#AlertImg').removeAttr("style");
|
||||
isExceed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AlertImg').attr("style","display:none;");
|
||||
isExceed =0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert("Error");
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please select the Requistion Type');
|
||||
$('#CostCenter').val("-1");
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
$('#RequestType').change(function()
|
||||
{
|
||||
$("#AvlBudgetAmount").val('');
|
||||
$('#AlertImg').attr("style","display:none;");
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
$("#Description").val('');
|
||||
$("#UOM").val('');
|
||||
$('#CostCenter').val("-1");
|
||||
|
||||
removeHiddenRows($('#Items').find('tr').length);
|
||||
$('#tempAppend').empty();
|
||||
var id = $('#RequestType').val();
|
||||
|
||||
if(id != '-1')
|
||||
{
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
dataType: 'json',
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>requisitionform/getMaterialCode",
|
||||
success:function(json) {
|
||||
$('#content').loader('hide');
|
||||
|
||||
$("#MaterialCode").empty();
|
||||
$("#MaterialCode").append(json.Material);
|
||||
// $("#Description").val(json.MaterialName);
|
||||
//$("#UOM").val(json.UOM);
|
||||
if(id!='SERVICE'){
|
||||
$('#DisplayScheduleDiv').hide();
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$('#DisplayScheduleDiv').show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
//$('#content').loader('hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please select the RequestType');
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
$('#MaterialCode').change(function() {
|
||||
|
||||
var id = $('#MaterialCode').val();
|
||||
|
||||
$("#Description").val('');
|
||||
$("#UOM").val('');
|
||||
if(id != '-1')
|
||||
{
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
dataType: 'json',
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>requisitionform/getMaterialDetails",
|
||||
success:function(json) {
|
||||
$('#content').loader('hide');
|
||||
//alert(json.MatDetail);
|
||||
$("#Description").val(json.MatDetail[0]['MaterialName']);
|
||||
$("#UOM").val(json.MatDetail[0]['UOM']);
|
||||
}
|
||||
|
||||
});
|
||||
//$('#content').loader('hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please select the RequestType');
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/html" id="tempList">
|
||||
<tr id="<%=index%>">
|
||||
<td align="left"><%=index%></td>
|
||||
<td align="left"><%=MaterialCode%></td>
|
||||
|
||||
<td align="left"><%=MaterialName%></td>
|
||||
|
||||
<td align="left"><%=UOM%></td>
|
||||
|
||||
<td align="left"><%=Quantity%></td>
|
||||
<td>
|
||||
<a data-target='#EditItem' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i> </a> <a href='#' onclick = "Deleterow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
<script>
|
||||
var index = '1';
|
||||
var userid = '';
|
||||
function removeHiddenRows(rowcount)
|
||||
{
|
||||
var step;
|
||||
|
||||
if(rowcount > 2)
|
||||
{
|
||||
for (step = 1; step < rowcount ; step++) {
|
||||
var td = document.getElementById(step);
|
||||
td.parentNode.removeChild(td);
|
||||
$("#MaterialCode"+step).remove();
|
||||
$("#Description"+step).remove();
|
||||
$("#UOM"+step).remove();
|
||||
$("#Quantity"+step).remove();
|
||||
index = '1';
|
||||
userid = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
function Save()
|
||||
{
|
||||
|
||||
var id = '<?php echo REQ_DRAFT;?>'
|
||||
if(validate())
|
||||
{
|
||||
if(document.getElementById('Items').rows.length < 0)
|
||||
{
|
||||
alert('Please Select Line item to Create Requisition');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
var serviceSchedule='';
|
||||
var servicePeriod='';
|
||||
var noOfService='';
|
||||
if($('#RequestType').val()=='SERVICE'){
|
||||
if($('#ScheduleType').val()=='Recurring'){
|
||||
serviceSchedule=$('#ScheduleType').val();
|
||||
servicePeriod=$('#ServiceOptions').val();
|
||||
noOfService=$('#ServiceNo').val();
|
||||
}
|
||||
else{
|
||||
serviceSchedule=$('#ScheduleType').val();
|
||||
servicePeriod='';
|
||||
noOfService=0;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
var serviceSchedule='';
|
||||
var servicePeriod='';
|
||||
var noOfService='';
|
||||
}
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.requistion').serialize()+"&serviceSchedule="+serviceSchedule+"&servicePeriod="+servicePeriod+"&noOfService="+noOfService,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>requisitionform/addNewRequistion?ID="+id,
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
|
||||
window.location = "Requisition";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
if($("option:selected", $("#RequestType")).val() == '-1')
|
||||
{
|
||||
alert('Please Select ReqType Names');
|
||||
return false;
|
||||
}
|
||||
else if($("option:selected", $("#EmpID")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Reqby');
|
||||
return false;
|
||||
}
|
||||
else if($("#txtRowCount").val().length < 1)
|
||||
{
|
||||
alert('Please Add Line Item');
|
||||
return false;
|
||||
}
|
||||
else if(isExceed == 1)
|
||||
{
|
||||
alert('You dont have Budget and You cant Raise New Requisition');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
function Deleterow(rowid)
|
||||
{
|
||||
var DelRows = $('#txtDeletedRow').val();
|
||||
|
||||
var answer = confirm(" Do you want to delete the Item from the List?")
|
||||
if (answer)
|
||||
{
|
||||
var td = document.getElementById(rowid);
|
||||
td.parentNode.removeChild(td);
|
||||
|
||||
if(DelRows != '')
|
||||
{
|
||||
DelRows = DelRows + ":" + rowid;
|
||||
}
|
||||
else
|
||||
{
|
||||
DelRows= "0" + ":" + rowid;
|
||||
}
|
||||
$('#txtDeletedRow').val(DelRows);
|
||||
}
|
||||
|
||||
}
|
||||
function validateBeforeAdd()
|
||||
{
|
||||
if($("option:selected", $("#RequestType")).val() == '-1')
|
||||
{
|
||||
alert('Please select the Request Type ');
|
||||
$("#RequestType").focus();
|
||||
return false;
|
||||
}
|
||||
else if($("#CostCenter").val() == '-1')
|
||||
{
|
||||
alert('Please select the Cost center to check the Budget Availablity ');
|
||||
$("#CostCenter").focus();
|
||||
return false;
|
||||
}
|
||||
else if( isExceed == '1')
|
||||
{
|
||||
alert('You dont have available Budget Amount. You cant raise new Requisition');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#myModal1').modal('show');
|
||||
}
|
||||
}
|
||||
|
||||
$('.addClick').click(function(){
|
||||
|
||||
if ($("#MaterialCode option:selected").val() =='-1' )
|
||||
{
|
||||
alert('Please Select the MaterialCode ');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.getElementById('Quantity').value == '' )
|
||||
{
|
||||
alert('Please Enter the Quantity');
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
if ($("#MaterialCode option:selected").val() !='-1' && $('#Quantity').val() != '' )
|
||||
{
|
||||
var temp = index;
|
||||
var materialCode = $("#MaterialCode option:selected").val();
|
||||
var materialName = $("#Description").val();
|
||||
var uom = $("#UOM").val();
|
||||
var quantity = $("#Quantity").val();
|
||||
|
||||
$('#MaterialCode option[value='+materialCode+']').remove();
|
||||
|
||||
$('#Description').val('');
|
||||
$('#UOM').val('');
|
||||
$('#Quantity').val('');
|
||||
|
||||
index = parseInt(index)+1;
|
||||
|
||||
var template = jQuery("#tempList").html();
|
||||
|
||||
|
||||
$('#tempAppend').append(_.template(template,{index:temp,MaterialCode:materialCode,MaterialName:materialName,UOM:uom,Quantity:quantity}));
|
||||
|
||||
|
||||
var theForm = $(".requistion");
|
||||
|
||||
addHidden(theForm,"MaterialCode"+temp,materialCode);
|
||||
addHidden(theForm,"Description"+temp,materialName);
|
||||
addHidden(theForm,"UOM"+temp,uom);
|
||||
addHidden(theForm,"Quantity"+temp,quantity);
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
function addHidden(theForm, key, value) {
|
||||
// Create a hidden input element, and append it to the form:
|
||||
var input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = key;'name-as-seen-at-the-server';
|
||||
input.id = key;'name-as-seen-at-the-server';
|
||||
input.value = value;
|
||||
theForm.append(input);
|
||||
}
|
||||
$("#myModal1").on("shown.bs.modal", function(e) {
|
||||
if($("option:selected", $("#RequestType")).val() == '-1')
|
||||
{
|
||||
alert('Please select the Request Type ');
|
||||
e.close();
|
||||
}
|
||||
});
|
||||
|
||||
$("#EditItem").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
// alert(userid);
|
||||
var tr= document.getElementById(userid);
|
||||
var cellval = tr.cells;
|
||||
//alert(x[1].innerHTML);
|
||||
$('#EditMaterialCode').val(cellval[1].innerHTML);
|
||||
$('#EditDescription').val(cellval[2].innerHTML);
|
||||
$('#EditUOM').val(cellval[3].innerHTML);
|
||||
$('#EditQuantity').val(cellval[4].innerHTML);
|
||||
});
|
||||
|
||||
$('.EditClick').click(function(){
|
||||
|
||||
if(document.getElementById('EditQuantity').value == '' )
|
||||
{
|
||||
alert('Please Enter the Quantity' );
|
||||
}
|
||||
|
||||
if ( $('#EditQuantity').val() != '' )
|
||||
{
|
||||
|
||||
var editMaterialCode = $("#EditMaterialCode").val();
|
||||
var editDescription = $("#EditDescription").val();
|
||||
var editUOM = $('#EditUOM').val();
|
||||
var editQuantity = $('#EditQuantity').val();
|
||||
|
||||
var tr= document.getElementById(userid);
|
||||
var cellval = tr.cells;
|
||||
cellval[1].innerHTML = editMaterialCode;
|
||||
cellval[2].innerHTML = editDescription;
|
||||
cellval[3].innerHTML =editUOM;
|
||||
cellval[4].innerHTML = editQuantity;
|
||||
|
||||
$('#MaterialCode'+userid).val(editMaterialCode);
|
||||
$('#Description'+userid).val(editDescription);
|
||||
$('#UOM'+userid).val(editUOM);
|
||||
$('#Quantity'+userid).val(editQuantity);
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
$(".requistion").submit(function(e) {
|
||||
|
||||
var id='<?php echo REQ_PENDING_APPROVAL;?>'
|
||||
e.preventDefault();
|
||||
if(validate())
|
||||
{
|
||||
if(document.getElementById('Items').rows.length < 0)
|
||||
{
|
||||
alert('Please Select Line item to Create Requisition');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var serviceSchedule='';
|
||||
var servicePeriod='';
|
||||
var noOfService='';
|
||||
if($('#RequestType').val()=='SERVICE'){
|
||||
if($('#ScheduleType').val()=='Recurring'){
|
||||
serviceSchedule=$('#ScheduleType').val();
|
||||
servicePeriod=$('#ServiceOptions').val();
|
||||
noOfService=$('#ServiceNo').val();
|
||||
}
|
||||
else{
|
||||
serviceSchedule=$('#ScheduleType').val();
|
||||
servicePeriod='';
|
||||
noOfService=0;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
var serviceSchedule='';
|
||||
var servicePeriod='';
|
||||
var noOfService='';
|
||||
}
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.requistion').serialize()+"&serviceSchedule="+serviceSchedule+"&servicePeriod="+servicePeriod+"&noOfService="+noOfService,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>requisitionform/addNewRequistion?ID="+id,
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
|
||||
window.location = "Requisition";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Items').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": true,
|
||||
"searching": false,
|
||||
"ordering": false,
|
||||
"info": false,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#ScheduleType").change(function(){
|
||||
if($('#ScheduleType').val().trim()!='Recurring'){
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
|
||||
$('#ServiceNo').val('');
|
||||
}
|
||||
else{
|
||||
document.getElementById('ServicePeriodOption').style.display = 'block';
|
||||
document.getElementById('NoServices').style.display = 'block';
|
||||
document.getElementById('ServiceNo').value = 1;
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -1,326 +0,0 @@
|
||||
<?php
|
||||
|
||||
$PONO = '';
|
||||
$postatus ='';
|
||||
$CompanyAddress = '';
|
||||
$CompanyName = '';
|
||||
$SuplierName = '';
|
||||
$SuplierAddress = '';
|
||||
$DeliveryAddress = '';
|
||||
$Podt = '';
|
||||
$DeliveryDate ='';
|
||||
$postatus='';
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms = '';
|
||||
$PaymentDays='';
|
||||
$PayableAT='';
|
||||
$DeliverySchedule='';
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $CO)
|
||||
{
|
||||
$CompanyName = $CO->CompanyName;
|
||||
$CompanyAddress = $CO->Address;
|
||||
|
||||
}
|
||||
}
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
foreach ($POItem as $PO)
|
||||
{
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$postatus= $PO->Status;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
if($PO->DeliveryOption=='1'){
|
||||
$DeliveryDate = '';
|
||||
$DeliverySchedule = $PO->DeliverySchedule;
|
||||
}
|
||||
else{
|
||||
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
$PaymentDays=$PO->PaymentDays;
|
||||
$PayableAT=$PO->PayableAT;
|
||||
|
||||
}
|
||||
}
|
||||
$currencyName='INR';
|
||||
$currencyCode ='';
|
||||
if(!empty($CurrencySymbol))
|
||||
{
|
||||
foreach ($CurrencySymbol as $Curr)
|
||||
{
|
||||
|
||||
$currencyCode = $Curr->FontCode2000;
|
||||
//$currencyName = $currencyName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<style>
|
||||
@page { margin: 280px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
|
||||
.footer { position: fixed; bottom: 0px; }
|
||||
.pagenum:before { content: counter(page); }
|
||||
</style>
|
||||
<div class="footer">Page: <span class="pagenum"></span></div>
|
||||
<div class="header">
|
||||
<div style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><b>DRAFT</b> </div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?> </a></span></center>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td colspan="2">
|
||||
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
<p> <?php echo $CompanyAddress; ?></p>
|
||||
</td>
|
||||
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Vendor Address :</strong></p>
|
||||
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<p><strong>Delivery To :</strong></p>
|
||||
<p><?php echo $DeliveryAddress; ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Requistion Number</td>
|
||||
<td>Requested By</td>
|
||||
<td>Requested Department</td>
|
||||
<td>Cost Center </td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
foreach($RequistionDetails as $ReqDetails)
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td>Item Name</td>
|
||||
<td>UOM</td>
|
||||
<td>Qty</td>
|
||||
<td>Rate In INR</td>
|
||||
<td>Basic Value In INR</td>
|
||||
<td>Discount In INR</td>
|
||||
<td>SGST In INR</td>
|
||||
<td>CGST In INR</td>
|
||||
<td>IGST In INR</td>
|
||||
<td>Packaging In INR</td>
|
||||
<td>Insurance In INR</td>
|
||||
<td>Freight In INR</td>
|
||||
<td>Total Amount In INR</td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount = 0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
$TotalAmount = $record->BasicValue+$record->Taxamount;
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo $record->BasicValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterDiscount;?></td>
|
||||
<td align="right"><?php echo $record->AfterSGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterCGST ; ?></td>
|
||||
|
||||
|
||||
<td align="right"><?php echo $record->AfterIGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterPackagingValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterFreightValue;?></td>
|
||||
<td align="right"><?php echo $record->Insurance;?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$TotalTax = $TotalTax+$record->Taxamount;
|
||||
$OrderValue = $SubTotalAmount + $TotalTax;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: center;" rowspan="3">
|
||||
|
||||
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
|
||||
|
||||
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount Before Tax In INR <?php echo number_format($SubTotalAmount,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Tax Amount In INR <?php echo number_format($TotalTax,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount After Tax In INR <?php echo number_format($OrderValue,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p><strong>Payment Terms </strong></p>
|
||||
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<p style="text-align: center;">Certified that the particulars given above are true and correct</p>
|
||||
|
||||
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p style="text-align: center;">Authorized Signatory</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Special Instruction:</strong></p>
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
<?php
|
||||
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
<td style="text-align:right;"><b>Released On:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,431 +0,0 @@
|
||||
<?php
|
||||
|
||||
$PONO = '';
|
||||
$postatus ='';
|
||||
$CompanyAddress = '';
|
||||
$CompanyName = '';
|
||||
$SuplierName = '';
|
||||
$SuplierAddress = '';
|
||||
$DeliveryAddress = '';
|
||||
$Podt = '';
|
||||
$DeliveryDate ='';
|
||||
$DeliverySchedule='';
|
||||
$Cgst=0.00;
|
||||
$Sgst =0.00;
|
||||
$Igst =0.00;
|
||||
|
||||
$TotalAmount =0.00;
|
||||
$SubTotalAmount =0.00;
|
||||
$TaxAmount =0.00;
|
||||
$BasicAmount = 0.00;
|
||||
$OtherAllowance = 0.00;
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms='';
|
||||
|
||||
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $CO)
|
||||
{
|
||||
$CompanyName = $CO->CompanyName;
|
||||
$CompanyAddress = $CO->Address;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$currencyName='INR';
|
||||
$currencyCode ='';
|
||||
if(!empty($CurrencySymbol))
|
||||
{
|
||||
foreach ($CurrencySymbol as $Curr)
|
||||
{
|
||||
|
||||
$currencyCode = $Curr->FontCode2000;
|
||||
//$currencyName = $currencyName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
foreach ($POItem as $PO)
|
||||
{
|
||||
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
@page { margin: 280px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
|
||||
.footer { position: fixed; bottom: 0px; }
|
||||
.pagenum:before { content: counter(page); }
|
||||
</style>
|
||||
<div class="footer">Page: <span class="pagenum"></span></div>
|
||||
|
||||
<div class="header">
|
||||
<div style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><b>DRAFT</b> </div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?> </a></span></center>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td colspan="2">
|
||||
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
<p> <?php echo $CompanyAddress; ?></p>
|
||||
</td>
|
||||
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Vendor Address :</strong></p>
|
||||
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<p><strong>Delivery To :</strong></p>
|
||||
<p><?php echo $DeliveryAddress; ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>Requistion Number</td>
|
||||
|
||||
<td>Requested By</td>
|
||||
|
||||
<td>Requested Department</td>
|
||||
|
||||
<td>Cost Center </td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
foreach($RequistionDetails as $ReqDetails)
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>#</td>
|
||||
|
||||
<td>Item Name</td>
|
||||
|
||||
<td>Service Description</td>
|
||||
|
||||
<td>UOM</td>
|
||||
|
||||
<td>Qty</td>
|
||||
|
||||
<td>Rate In INR</td>
|
||||
|
||||
<td>Basic Value In INR</td>
|
||||
|
||||
<td>CGST In INR</td>
|
||||
|
||||
<td>SGST In INR</td>
|
||||
|
||||
<td>IGST In INR</td>
|
||||
|
||||
<td>Other Allow In INR</td>
|
||||
|
||||
<td>Total Amount In INR</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount=0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td><?php echo $record->ServiceMaterialDescription ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php if($record->NumberOfService==0 || $record->NumberOfService==''){
|
||||
echo $record->BasicValue;
|
||||
$TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance;
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance;
|
||||
}
|
||||
else{
|
||||
echo $record->BasicValue * $record->NumberOfService;
|
||||
$TotalAmount = $record->BasicValue * $record->NumberOfService + $record->Taxamount + $record->otherallowance;
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue * $record->NumberOfService + $record->otherallowance;
|
||||
}
|
||||
?></td>
|
||||
<td align="right"><?php echo $record->After_SGST ; ?></td>
|
||||
<td align="right"><?php echo $record->After_CGST ; ?></td>
|
||||
<td align="right"><?php echo $record->After_IGST ; ?></td>
|
||||
<td align="right"><?php echo $record->otherallowance ; ?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$Sgst =$Sgst + $record->After_SGST;
|
||||
$Cgst =$Cgst + $record->After_CGST;
|
||||
$Igst = $Igst + $record->After_IGST;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst;
|
||||
$OrderValue = $OrderValue + $SubTotalAmount + $TotalTax;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: center;" rowspan="3">
|
||||
|
||||
|
||||
|
||||
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
|
||||
|
||||
|
||||
|
||||
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount Before Tax In INR - <?php echo number_format($SubTotalAmount,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Tax Amount In INR - <?php echo number_format($TotalTax,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount After Tax In INR - <?php echo number_format($OrderValue,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
<p><strong>Payment Terms </strong></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
<p style="text-align: center;">Certified that the particulars given above are true and correct</p>
|
||||
|
||||
|
||||
|
||||
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
<p style="text-align: center;">Authorized Signatory</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p><strong>Scope Of Work:</strong></p>
|
||||
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
<td style="text-align:right;"><b>Released On:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
@ -1,189 +0,0 @@
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#PONO").select2();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="content-wrapper" style="min-height:435px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Status Of Service Purchase Order</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left Status ','name' => 'Status','id' => 'Status');
|
||||
|
||||
echo form_open($this->config->base_url().'servicepurchaseorder/UpdateServiceStatus',$attributes); ?>
|
||||
|
||||
<div class="row" style="padding-bottom:1%">
|
||||
<div id="content" > </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
/* $attributes = array('class' => 'form-label-left ','name' => 'IGR','id' => ''); */
|
||||
|
||||
/* echo form_open($this->config->base_url().'/inwardgateregister/addNewigr/',$attributes); */?>
|
||||
<label>Select Service Purchase Order NO </label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1"=>'Purchase Order No');
|
||||
|
||||
if(!empty($PO))
|
||||
{
|
||||
//print_r($PO_NO);
|
||||
foreach ($PO as $SI):
|
||||
|
||||
$options[$SI->PONO] = $SI->PONO ;
|
||||
// $PONO = $SI->PONO;
|
||||
|
||||
endforeach;
|
||||
|
||||
}
|
||||
|
||||
echo form_dropdown('PONO', $options,set_value('PONO'),'id="PONO"' ,'class="form-control select2"' , 'required="true"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Work Status</label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array();
|
||||
|
||||
if(!empty($WorkStatus))
|
||||
{
|
||||
//print_r($PO_NO);
|
||||
foreach ($WorkStatus as $SI):
|
||||
|
||||
$options[$SI->StatusCode] = $SI->StatusName ;
|
||||
|
||||
|
||||
endforeach;
|
||||
|
||||
}
|
||||
|
||||
echo form_dropdown('WorkStatus', $options,set_value('WorkStatus'),'id="WorkStatus"' ,'class="form-control"' , 'required="true"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Remarks</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control' );
|
||||
echo form_input($data);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" align="right"><br/>
|
||||
|
||||
<input type="submit" value="Submit" class="btn btn-primary">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="padding:1% 2%;">
|
||||
|
||||
<table id="StatusTable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>Req No</th>
|
||||
<th>Req By</th>
|
||||
<th>Req Date</th>
|
||||
<th>Supplier Name</th>
|
||||
<th>Item Code</th>
|
||||
<th>Description</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Rate</th>
|
||||
|
||||
<th>Work Status</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tblAppend">
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#PONO').change(function() {
|
||||
$("#tblAppend").empty();
|
||||
|
||||
var id = $('#PONO').val();
|
||||
|
||||
if(id != '-1')
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
|
||||
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>servicepurchaseorder/getPODetails",
|
||||
success:function(data) {
|
||||
$('#content').loader('hide');
|
||||
|
||||
|
||||
$("#tblAppend").empty();
|
||||
|
||||
|
||||
$('#tblAppend').append(data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please Select the Purchase Order Number to change the status');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user