Loan and QAD CHANGES
This commit is contained in:
parent
4852dde0e2
commit
aa9f63e261
@ -137,7 +137,7 @@ class quality extends BaseController
|
||||
{
|
||||
$reportid = $this->uri->segment(3);
|
||||
|
||||
$data['reportdata'] = $this->quality_model->getIndividualReportData($reportid);
|
||||
$data['reportdata'] = $this->quality_model-> ($reportid);
|
||||
$this->global['pageTitle'] = 'Siddharth : View Individual Report';
|
||||
$this->loadViews("viewindreport", $this->global, $data, NULL);
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ class Quality_model extends CI_Model
|
||||
{
|
||||
function getAllInvoiceNo()
|
||||
{
|
||||
$this->db->select('invoice_id');
|
||||
$this->db->select('invoice_number');
|
||||
$this->db->from('ip_invoices');
|
||||
$result = $this->db->get();
|
||||
return $result->result();
|
||||
@ -97,14 +97,14 @@ class Quality_model extends CI_Model
|
||||
|
||||
function getDataforReport()
|
||||
{
|
||||
$this->db->select('ip_invoices.invoice_id,ip_invoices.client_id,ip_invoice_custom.invoice_custom_fieldvalue,ip_clients.client_name,ip_invoices.invoice_date_created,ip_invoice_items.item_product_id,ip_products.product_name,ip_products.product_description,ip_invoice_items.item_quantity');
|
||||
$this->db->select('ip_invoices.invoice_number,ip_invoices.client_id,ip_invoice_custom.invoice_custom_fieldvalue,ip_clients.client_name,ip_invoices.invoice_date_created,ip_invoice_items.item_product_id,ip_products.product_name,ip_products.product_description,ip_invoice_items.item_quantity');
|
||||
$this->db->from('ip_invoices');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
$this->db->join('ip_products','ip_invoice_items.item_product_id=ip_products.product_id');
|
||||
$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62');
|
||||
$this->db->where('ip_invoices.invoice_id NOT IN (SELECT invoiceid from T_Test_Report_Master)',NULL,false);
|
||||
$this->db->order_by('ip_invoices.invoice_id');
|
||||
$this->db->join('ip_invoice_custom','ip_invoices.invoice_number=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62');
|
||||
$this->db->where('ip_invoices.invoice_number NOT IN (SELECT invoiceid from T_Test_Report_Master)',NULL,false);
|
||||
$this->db->order_by('ip_invoices.invoice_number');
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
@ -122,9 +122,9 @@ class Quality_model extends CI_Model
|
||||
$this->db->select('T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.Departmentcode,T_DepartmentDetails.shortName,');
|
||||
$this->db->from('T_Employee_Details');
|
||||
$this->db->join('T_DepartmentDetails','T_Employee_Details.Departmentcode=T_DepartmentDetails.DEPCode');
|
||||
//$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
//$this->db->join('ip_invoice_items','ip_invoices.invoice_number=ip_invoice_items.invoice_number');
|
||||
//$this->db->join('ip_products','ip_invoice_items.item_product_id=ip_products.product_id');
|
||||
//$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62');
|
||||
//$this->db->join('ip_invoice_custom','ip_invoices.invoice_number=ip_invoice_custom.invoice_number and invoice_custom_fieldid=62');
|
||||
$this->db->order_by('T_Employee_Details.EmpID');
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
@ -165,7 +165,7 @@ class Quality_model extends CI_Model
|
||||
|
||||
$this->db->select('T_Test_Report_Master.testreport_id,ip_invoices.invoice_date_created,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,T_Test_Report_Master.chartdata,ip_clients.client_id,ip_clients.client_name,invoice_custom_fieldvalue,ip_products.product_id,ip_products.product_name,ip_products.product_description,T_Employee_Details.FirstName,T_Employee_Details.LastName,ip_invoice_items.item_quantity,T_Test_Report_Master.approvedby');
|
||||
$this->db->from('T_Test_Report_Master');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_id');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
|
||||
@ -173,7 +173,7 @@ class Quality_model extends CI_Model
|
||||
$this->db->join('tbl_users','T_Test_Report_Master.createdby=tbl_users.userid');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID');
|
||||
//$this->db->join('T_Employee_Details','T_Test_Report_Master.EmpID=T_Employee_Details.EmpID');
|
||||
//$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62');
|
||||
//$this->db->join('ip_invoice_custom','ip_invoices.invoice_number=ip_invoice_custom.invoice_number and invoice_custom_fieldid=62');
|
||||
$this->db->where('testreport_id',$reportid);
|
||||
// $this->db->join('T_Test_Report','T_Test_Report_Master.testreport_id=T_Test_Report.testreport_id');
|
||||
// $this->db->join('T_Test_Report_loi','T_Test_Report_Master.testreport_id=T_Test_Report_loi.testreport_id');
|
||||
@ -214,7 +214,7 @@ class Quality_model extends CI_Model
|
||||
{
|
||||
$this->db->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description');
|
||||
$this->db->from('T_Test_Report_Master');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_id');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
$dateflag=0;
|
||||
$statusflag =0;
|
||||
$overdueflag = 0;
|
||||
$source = array('company'=>'Company');
|
||||
$source = array('company'=>'ALL');
|
||||
$historytableflag = 0;
|
||||
if(!empty($childdata) )
|
||||
{
|
||||
@ -197,6 +197,8 @@
|
||||
<?php }?>
|
||||
<th>Loan Recovered ₹ </th>
|
||||
<?php if($statusflag == 1) {?>
|
||||
<th>No Of Dues</th>
|
||||
<th>Due Amount</th>
|
||||
<th>Loan Status</th>
|
||||
<?php }?>
|
||||
<th>Loan Balance ₹</th>
|
||||
@ -253,6 +255,8 @@
|
||||
// }
|
||||
|
||||
?>
|
||||
<td style="text-align:right;"><?php if(!empty($rec->No_of_Dues)){echo $rec->No_of_Dues;}else{echo "0.00";} ?></td>
|
||||
<td style="text-align:right;"><?php if(!empty($rec->Monthly_Due)){echo $rec->Monthly_Due;}else{echo "0.00";} ?></td>
|
||||
<td style="text-align:center;" ><?php $final = ''; if($rec->is_Active == 1){$final = "<font color='blue'>Pending</font>"; }else{$final = "<font color='green'>Completed</font>";} if($overdueflag == 1 and $rec->is_Active == 1){$final.=",<font color='red'>Over Due</font>";} echo $final;?></td>
|
||||
<?php }?>
|
||||
<td style="text-align:right;"><?php if(!empty(($rec->Loan_Amount) and ($rec->Paid_Amount))){ $totalbalance+= ($rec->Loan_Amount - $rec->Paid_Amount);echo number_format(($rec->Loan_Amount - $rec->Paid_Amount),2,'.','');}else {echo "0.00";}?></td>
|
||||
@ -279,6 +283,8 @@
|
||||
|
||||
<?php if($statusflag == 1) {?>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<?php }?>
|
||||
|
||||
<td style="text-align:right;"><strong><?php echo number_format( $totalbalance,2,'.','');?></strong></td>
|
||||
|
||||
@ -11,7 +11,7 @@ background-color:#eeffcc ! important;
|
||||
$invoicenos = array(-1=>'Select Invoice No');
|
||||
foreach($records as $rec)
|
||||
{
|
||||
$invoicenos[$rec->invoice_id] = $rec->invoice_id;
|
||||
$invoicenos[$rec->invoice_number] = $rec->invoice_number;
|
||||
}
|
||||
|
||||
//print_r($emplist);
|
||||
@ -280,7 +280,7 @@ $(document).ready(function(){
|
||||
$.each(jsrecords,function(index,value){
|
||||
// console.log(index+'-'+value['invoice_id']);
|
||||
|
||||
if(invoiceid == value['invoice_id'])
|
||||
if(invoiceid == value['invoice_number'])
|
||||
{
|
||||
|
||||
$('#testreport tbody').remove();
|
||||
|
||||
@ -54,7 +54,7 @@ td{
|
||||
</style>
|
||||
<html>
|
||||
<body>
|
||||
<table style="border-collapse:collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<!-- <table style="border-collapse:collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr><td colspan="6" style="text-align:center;"><h2>PRE DISPATCH INSPECTION REPORT</h2></td></tr>
|
||||
<tr><td rowspan="5" style="text-align:center;width:20%"><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
|
||||
@ -68,11 +68,45 @@ td{
|
||||
<tr><td>Batch NO</td><td><b><?php echo $batchno;?></b></td></tr>
|
||||
<tr><td>BATCH DATE</td><td><b><?php echo date_format(date_create($batchdate),'d-m-Y');?></b></td></tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<table style="border-collapse:collapse;border-left-style:hidden;width:100%" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="6"><h2>PRE DISPATCH INSPECTION REPORT</h2></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td rowspan="5" ><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
|
||||
<td rowspan="5" width="38%"><b><?php echo $cname;?></b><br><?php echo $caddress;?></td>
|
||||
<td width="8%" >CUSTOMER NAME</td>
|
||||
<td colspan="3"><b><?php echo $customername;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" width="8%">MATERIAL NAME</td>
|
||||
<td rowspan="2" ><b><?php echo $product_description;?></td>
|
||||
<td >INVOICE NO</td>
|
||||
<td ><b><?php echo $invoiceno;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >INVOICE DATE</td>
|
||||
<td ><b><?php echo date_format(date_create($invoicedate),'d-m-Y');?></b></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td rowspan="2" width="8%">QTY</td>
|
||||
<td rowspan="2" ><b><?php echo $qty;?> kgs</b></td>
|
||||
<td >BATCH NO</td>
|
||||
<td ><b><?php echo $batchno;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >BATCH DATE</td>
|
||||
<td><b><?php echo date_format(date_create($batchdate),'d-m-Y');?></b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr><th rowspan="3">S.NO</th><th rowspan="3" width="160">DESCRIPTION</th><th rowspan="2" colspan="3" width="110">SPECIFICATION</th><th colspan="3" width="170">ACT</th> <th rowspan="3" width="50">Average</th> <th rowspan="3" width="50">Results</th> <th rowspan="3">Remarks</th> </tr> <tr><th rowspan="2">X1</th> <th rowspan="2">X2</th> <th rowspan="2">X3</th></tr><tr><th>Min</th><th>Max</th><th width="46">UOM</th></tr>
|
||||
<tr><th rowspan="3">S.NO</th><th rowspan="3" width="160">DESCRIPTION</th><th rowspan="2" colspan="3" width="110">SPECIFICATION</th><th colspan="3" width="170">ACT</th> <th rowspan="3" width="50">Average</th> <th rowspan="3" width="110">Results</th> <th rowspan="3" width="90">Remarks</th> </tr> <tr><th rowspan="2">X1</th> <th rowspan="2">X2</th> <th rowspan="2">X3</th></tr><tr><th>Min</th><th>Max</th><th width="46">UOM</th></tr>
|
||||
|
||||
<?php
|
||||
$index = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user