IGR and payroll change requirement

This commit is contained in:
venbatechnologies@gmail.com 2018-01-29 20:15:17 +05:30
parent e54ab31105
commit ef23545a67
10 changed files with 44 additions and 20 deletions

View File

@ -114,8 +114,9 @@ class MRIRcontroller extends BaseController
{ {
$IgrNo= $_GET['IGRNO']; $IgrNo= $_GET['IGRNO'];
$IgrItemno = $_GET['IGRitemno'];
$data['IGRDetails'] = $this->mrir_model->get_IGR($IgrNo); $data['IGRDetails'] = $this->mrir_model->get_IGR($IgrNo,$IgrItemno);
$this->global['pageTitle'] = 'Resico: IGR Details '; $this->global['pageTitle'] = 'Resico: IGR Details ';
@ -124,7 +125,7 @@ class MRIRcontroller extends BaseController
} }
/* /*
* For view IGR datas.(security login only) * For view IGR datas.(store login only)
*/ */
function viewinwardgateregister() function viewinwardgateregister()
{ {

View File

@ -94,8 +94,7 @@ class companycontroller extends BaseController
function add() function add()
{ {
$picture = ''; $picture = '';
photo[0] if(!empty($_FILES['photo']['name']))
if(!empty($_FILES['photo[0]']['name']))
{ {
$config['upload_path'] = 'uploads/images/'; $config['upload_path'] = 'uploads/images/';
$config['allowed_types'] = 'jpg|jpeg|png|gif'; $config['allowed_types'] = 'jpg|jpeg|png|gif';

View File

@ -10,11 +10,15 @@ class inwardgateregister_model extends CI_Model
function igrListing() function igrListing()
{ {
$this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file'); $this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file,igrdetail.QuantityAsPerInvoice,POL.Quantity,MM.MaterialName');
$this->db->from('T_IGR_Master igr'); $this->db->from('T_IGR_Master igr');
$this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO'); $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO');
$this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID'); $this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID');
$this->db->order_by('igr.CreatedDate','desc'); $this->db->join('T_IGR_Details igrdetail','igrdetail.IGRNO = igr.IGRNO');
$this->db->join('T_PurchaseOrder_LineItem POL','igr.PONO = POL.PONO and POL.MaterialCode=igrdetail.MaterialCode');
$this->db->join('T_MaterialMaster MM', 'MM.MaterialCode = igrdetail.MaterialCode');
$this->db->order_by('igr.IGRNO','desc');
//$this->db->group_by('igr.IGRNO');
$query = $this->db->get(); $query = $this->db->get();
$result = $query->result(); $result = $query->result();

View File

@ -25,10 +25,13 @@ class mrir_model extends CI_Model
{ {
$this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName'); $this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igrdetail.QuantityAsPerInvoice,igrdetail.IGRItemNo,POL.Quantity,MM.MaterialName');
$this->db->from('T_IGR_Master igr'); $this->db->from('T_IGR_Master igr');
$this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO'); $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO');
$this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID'); $this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID');
$this->db->join('T_IGR_Details igrdetail','igrdetail.IGRNO = igr.IGRNO');
$this->db->join('T_PurchaseOrder_LineItem POL','igr.PONO = POL.PONO and POL.MaterialCode=igrdetail.MaterialCode');
$this->db->join('T_MaterialMaster MM', 'MM.MaterialCode = igrdetail.MaterialCode');
$this->db->where('igr.IGRStatus !=',MRIR_CREATED); $this->db->where('igr.IGRStatus !=',MRIR_CREATED);
$this->db->order_by("CreatedDate","desc"); $this->db->order_by("CreatedDate","desc");
$query = $this->db->get(); $query = $this->db->get();
@ -42,7 +45,7 @@ class mrir_model extends CI_Model
* @param number $Igrno : this is igrno * @param number $Igrno : this is igrno
* @return array $result : result of the query (returns igr details ) * @return array $result : result of the query (returns igr details )
*/ */
function get_IGR($IgrNo) function get_IGR($IgrNo,$IgrItemno)
{ {
$this->db->distinct(); $this->db->distinct();
$this->db->select('IGRM.DeliveryChellanDate,IGRM.CreatedDate,IGRM.IGRNO,IGRM.VehicleNo,IGRM.DeliveryChellanOrInvoiceNo,IGRM.CourierNo,IGRM.PONO,IGRD.MaterialCode,IGRD.QuantityAsPerInvoice,POMR.ServiceDescription,POMR.PODate,POMR.DeliveryDate,POMR.CreatedBy,SUPP.SupplierName,SUPP.Address,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity,ED.FirstName'); $this->db->select('IGRM.DeliveryChellanDate,IGRM.CreatedDate,IGRM.IGRNO,IGRM.VehicleNo,IGRM.DeliveryChellanOrInvoiceNo,IGRM.CourierNo,IGRM.PONO,IGRD.MaterialCode,IGRD.QuantityAsPerInvoice,POMR.ServiceDescription,POMR.PODate,POMR.DeliveryDate,POMR.CreatedBy,SUPP.SupplierName,SUPP.Address,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity,ED.FirstName');
@ -55,6 +58,7 @@ class mrir_model extends CI_Model
$this->db->join ('tbl_users user','user.userid=POMR.CreatedBy','left'); $this->db->join ('tbl_users user','user.userid=POMR.CreatedBy','left');
$this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID','left'); $this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID','left');
$this->db->where('IGRM.IGRNO',$IgrNo); $this->db->where('IGRM.IGRNO',$IgrNo);
$this->db->where('IGRD.IGRItemNo',$IgrItemno);
$query = $this->db->get(); $query = $this->db->get();
$result = $query->result(); $result = $query->result();

View File

@ -153,8 +153,9 @@ class Payroll_model extends CI_Model
$this->db->from('T_Payroll Pay'); $this->db->from('T_Payroll Pay');
//$this->db->join('T_Payroll_File payfile', 'Pay.PayOn = payfile.PayOn'); //$this->db->join('T_Payroll_File payfile', 'Pay.PayOn = payfile.PayOn');
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID'); $this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID');
$this->db->join('T_Loan_Master Lm', 'Lm.EmpID = Pay.EmpID'); $this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode');
$this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode'); $this->db->join('T_Loan_Master Lm','Lm.EmpID=Pay.EmpID and Lm.is_Active=1',left);
if($PayOn != '') if($PayOn != '')
{ {
$this->db->where('Pay.PayOn', $PayOn); $this->db->where('Pay.PayOn', $PayOn);

View File

@ -92,7 +92,7 @@ class rawmaterialdetails_model extends CI_Model
function addNewRawMaterial($RawMaterial='') function addNewRawMaterial($RawMaterial='')
{ {
print_r($RawMaterial); //print_r($RawMaterial);
$this->db->insert('T_MaterialMaster', $RawMaterial); $this->db->insert('T_MaterialMaster', $RawMaterial);
return TRUE; return TRUE;
} }

View File

@ -91,8 +91,13 @@ if(!empty($PayDetails))
$Designation = $Pay->Designation; $Designation = $Pay->Designation;
//$PANNo =$Pay->Pan; //$PANNo =$Pay->Pan;
//$AadharNo=$Pay->AadharNo; //$AadharNo=$Pay->AadharNo;
$LoanIssued = new DateTime($Pay->Loan_Issued_Date); if($Pay->Loan_Issued_Date != ''){
$LoanIssuedDate = $LoanIssued ->format('d-m-Y'); $LoanIssued = new DateTime($Pay->Loan_Issued_Date);
$LoanIssuedDate = $LoanIssued ->format('d-m-Y');
}
else{
$LoanIssuedDate = '';
}
$BankAccountNo = $Pay->BankAccountNumber; $BankAccountNo = $Pay->BankAccountNumber;
$IFSCCode =$Pay->IFSCCode; $IFSCCode =$Pay->IFSCCode;
$BankBranchName = $Pay->BankName; $BankBranchName = $Pay->BankName;

View File

@ -33,6 +33,8 @@
<th>Supplier Name</th> <th>Supplier Name</th>
<th>Invoice No</th> <th>Invoice No</th>
<th>Date of Invoice</th> <th>Date of Invoice</th>
<th>Material Name</th>
<th>Quantity</th>
<th>Vechicle No</th> <th>Vechicle No</th>
<th>Courier No</th> <th>Courier No</th>
<th>File</th> <th>File</th>
@ -59,6 +61,10 @@
<td align="right"><?php <td align="right"><?php
$date = new DateTime($record->DeliveryChellanDate); $date = new DateTime($record->DeliveryChellanDate);
echo $date->format('d-m-Y'); ?></td> echo $date->format('d-m-Y'); ?></td>
<!-- <td><span data-toggle="tooltip" title="Quantity as per Invoice"><?php echo $record->Quantity ?></span></td> -->
<td><?php echo $record->MaterialName ?></td>
<td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice ?></span></td>
<!-- <td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice."/".$record->Quantity ?></span></td>-->
<td><?php echo $record->VehicleNo ?></td> <td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->CourierNo ?></td> <td><?php echo $record->CourierNo ?></td>
<td> <td>

View File

@ -33,6 +33,8 @@
<th>Supplier Name</th> <th>Supplier Name</th>
<th>Invoice No</th> <th>Invoice No</th>
<th>Date of Invoice</th> <th>Date of Invoice</th>
<th>Material Name</th>
<th>Quantity</th>
<th>Vechicle No</th> <th>Vechicle No</th>
<th>Courier No</th> <th>Courier No</th>
<th>Action</th> <th>Action</th>
@ -51,17 +53,20 @@
?> ?>
<tr id="<?php echo $index ?>" > <tr id="<?php echo $index ?>" >
<td style="text-align: center;"><?php echo $index?></td> <td style="text-align: center;"><?php echo $index?></td>
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<%=index%>" data-userid="<?php echo $record->IGRNO ?>" > <u><?php echo $record->IGRNO ?></u></a></td> <td><a data-toggle="modal" data-target="#Igrshow" data-id="<%=index%>" data-userid="<?php echo $record->IGRNO?>" > <u><?php echo $record->IGRNO ?></u></a></td>
<td><?php echo $record->PONO ?></a></td> <td><?php echo $record->PONO ?></a></td>
<td><?php echo $record->SupplierName ?></td> <td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td> <td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
<td align="right"><?php <td align="right"><?php
$date = new DateTime($record->DeliveryChellanDate); $date = new DateTime($record->DeliveryChellanDate);
echo $date->format('d-m-Y'); ?></td> echo $date->format('d-m-Y'); ?></td>
<td><?php echo $record->MaterialName ?></td>
<td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice ?></span></td>
<!--<td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice."/".$record->Quantity ?></span></td>-->
<td><?php echo $record->VehicleNo ?></td> <td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->CourierNo ?></td> <td><?php echo $record->CourierNo ?></td>
<td> <td>
<a href="<?php echo base_url().'MRIRcontroller/igrdatavalues?IGRNO='.$record->IGRNO; ?>"><button style="font-size:12px" id="generated" name="generated">Generate MRIR <i class="fa fa-file-text"></i></button></a> <a href="<?php echo base_url().'MRIRcontroller/igrdatavalues?IGRNO='.$record->IGRNO.'&IGRitemno='.$record->IGRItemNo; ?>"><button style="font-size:12px" id="generated" name="generated">Generate MRIR <i class="fa fa-file-text"></i></button></a>
</td> </td>
</tr> </tr>
<?php <?php
@ -219,7 +224,6 @@
$("#Igrshow").on("shown.bs.modal", function(e) { $("#Igrshow").on("shown.bs.modal", function(e) {
var igr = $(e.relatedTarget).data('userid'); var igr = $(e.relatedTarget).data('userid');
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:igr}, data:{id:igr},

File diff suppressed because one or more lines are too long