unpaid changes

This commit is contained in:
gayathri1990 2018-11-28 20:14:18 +05:30
parent bd5c8ff609
commit fa1b9c7f79
4 changed files with 13386 additions and 43 deletions

View File

@ -1682,6 +1682,7 @@ class cashbook extends BaseController
else
{
$supplierid1 = $_GET['sid'];
$fa=$_GET['fa'];
$aa=$_GET['aa'];
$m=$_GET['m'];

View File

@ -474,8 +474,8 @@ function edituploadfile()
// //echo $RowCount;
$igr = array();
$igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$MaterialRcvdDt,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt);
$paymentstatus = NO_PAIDIGR;
$igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$MaterialRcvdDt,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt,'Paymentstatus'=>$paymentstatus);
//print_r($igr);die();
$igrM = $this->inwardgateregister_model->addigrM($igr);

File diff suppressed because it is too large Load Diff

View File

@ -440,7 +440,7 @@ function clearedcreditbalance(){
$sql="select pono,igrn,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,sid,
sum(total) as total,file,ifile
from igr
where Status ='ST027' or Status='ST056' and PaymentStatus ='ST072'";
where Status ='ST027' and Paymentstatus ='ST072'";
@ -474,51 +474,14 @@ function clearedcreditbalance(){
}
// function suppliertotalfooilter($fa,$aa,$m,$fdate,$tdate)
// {
// $status= array('ST027','ST056');
// $this->db->select('pom.PONO,sum(pom.TotalOrderValue) as TotalOrderValue,sd.SupplierName,sd.SupplierID as SupplierID,im.MaterialRcvdDate,im.CreatedDate');
// $this->db->from ('T_PurchaseOrder_Master pom');
// $this->db->join('T_IGR_Master im','pom.PONO=im.PONO','left');
// $this->db->join('T_SupplierDetailsN sd','pom.SupplierID=sd.SupplierID','left');
// // $this->db->or_where_in('pom.Status',$status);
// $this->db->where('pom.Status','ST027');
// $this->db->where('pom.Paymentstatus',NO_PAIDIGR);
// if ($fa and $aa != ''){
// $year="(im.MaterialRcvdDate >= '".$fa."-04-01' and im.MaterialRcvdDate <= '".$aa."-03-31')";
// $this->db->where($year);
// }
// if ($m!= ''){
// $month="monthname(im.MaterialRcvdDate) = '".$m."'";
// $this->db->where($month);
// }
// if($fdate!='' && $tdate!='')
// {
// $this->db->where('im.MaterialRcvdDate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
// }
// // $this->db->group_by(array("sd.SupplierID", "pom.PONO"));
// // $this->db->group_by(['pom.SupplierID', 'pom.PONO']);
// $this->db->group_by('sd.SupplierID','pom.PONO');
// //$this->db->group_by('pom.PONO');
// $query = $this->db->get();
// return $query->result();
// }
function amountunpaid($supplierid1,$fa,$aa,$m,$fdate,$tdate)
{
$sql="select pono,igrn,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,sid,
sum(total) as total,file,ifile
from igr
where Status ='ST027' or Status='ST056' and PaymentStatus ='ST072' and sid='".$supplierid1."'";
where Status ='ST027' and Paymentstatus ='ST072' and sid='".$supplierid1."'";
@ -555,7 +518,7 @@ function amountunpaid($supplierid1,$fa,$aa,$m,$fdate,$tdate)
$sql="select pono,igrn,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,sid,
sum(total) as total,file,ifile
from igr
where Status ='ST027' or Status='ST056' and PaymentStatus ='ST072' and sid='".$sd."'";
where Status ='ST027' and Paymentstatus ='ST072' and sid='".$sd."'";