material rcvd date change in inward report screen
This commit is contained in:
parent
8a1f14ef39
commit
e5e20c226a
@ -523,460 +523,469 @@ class report extends BaseController
|
||||
echo json_encode($data);
|
||||
|
||||
}
|
||||
public function ipurchase()
|
||||
{
|
||||
public function ipurchase()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$prod = $this->input->post('item_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$cat = $this->input->get('cat');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat);
|
||||
$data['cashbookdatas']=$this->dahsboard_Model->report_inwardcashbook($cname,$fa,$aa,$m,$frm,$t,$cat);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward PO Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$prod = $this->input->post('item_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$cat = $this->input->get('cat');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
// $data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat);
|
||||
$data['cashbookdatas']=$this->dahsboard_Model->report_inwardcashbook($cname,$fa,$aa,$m,$frm,$t,$cat);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
|
||||
$this->loadviews("Report_purchase_inward",$this->global,$data, NULL);
|
||||
$this->loadviews("Report_purchase_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function ilink_purchase()
|
||||
{
|
||||
if ($this->input->post('btn_submit')) {
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward PO Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cname = $this->input->post('client_name');
|
||||
$prod = $this->input->post('item_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$d = $this->input->get('d');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d);
|
||||
|
||||
|
||||
} else{
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward PO Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->get('m');
|
||||
$frm = $this->input->get('frm');
|
||||
$t = $this->input->get('t');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$d = $this->input->get('d');
|
||||
$da = $this->input->get('da');
|
||||
$po = $this->input->get('po');
|
||||
|
||||
//print_r($m);die();
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po);
|
||||
}
|
||||
|
||||
}
|
||||
public function ilink_purchase()
|
||||
{
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$this->loadviews("Report_purchase_inward",$this->global,$data, NULL);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cname = $this->input->post('client_name');
|
||||
$prod = $this->input->post('item_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$d = $this->input->get('d');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d);
|
||||
}
|
||||
public function iattach()
|
||||
{
|
||||
|
||||
|
||||
} else{
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->get('m');
|
||||
$frm = $this->input->get('frm');
|
||||
$t = $this->input->get('t');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$d = $this->input->get('d');
|
||||
$da = $this->input->get('da');
|
||||
$po = $this->input->get('po');
|
||||
|
||||
//print_r($m);die();
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po);
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Summary';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_attachment($cname,$fa,$aa,$m,$frm,$t);
|
||||
}
|
||||
|
||||
$this->loadviews("Report_purchase_inward",$this->global,$data, NULL);
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
// if($this->DEPCode == MANAGEMENT)
|
||||
// {
|
||||
$this->loadviews("Report_attach_inward",$this->global,$data, NULL);
|
||||
// }
|
||||
|
||||
}
|
||||
public function iattach()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_attachment($cname,$fa,$aa,$m,$frm,$t);
|
||||
}
|
||||
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
// if($this->DEPCode == MANAGEMENT)
|
||||
// {
|
||||
$this->loadviews("Report_attach_inward",$this->global,$data, NULL);
|
||||
// }
|
||||
|
||||
// else
|
||||
// {
|
||||
// $this->loadViews("access", $this->global, $data, NULL);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $this->loadViews("access", $this->global, $data, NULL);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
public function iyear_wise()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
}
|
||||
public function iyear_wise()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Yearwise ';
|
||||
|
||||
|
||||
if ($this->input->post('financialyear')) {
|
||||
$ab=$this->input->post('financialyear');
|
||||
$a=substr($ab,0,-5);
|
||||
$b=substr($ab,5,5);
|
||||
$data['year']=$this->dahsboard_Model->ireport_year_wise($a,$b);
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
if ($this->input->post('financialyear')) {
|
||||
$ab=$this->input->post('financialyear');
|
||||
$a=substr($ab,0,-5);
|
||||
$b=substr($ab,5,5);
|
||||
$data['year']=$this->dahsboard_Model->ireport_year_wise($a,$b);
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
|
||||
//$this->loadviews("Report_year_wise",$this->global,$data, NULL);
|
||||
//$this->loadviews("Report_year_wise",$this->global,$data, NULL);
|
||||
}
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
|
||||
|
||||
|
||||
$this->loadviews("Report_year_wise_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
public function imonth_wise()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Monthwise';
|
||||
|
||||
|
||||
$month=$this->input->get('dat');
|
||||
$mon= date("F",strtotime($month));
|
||||
//print_r($month);
|
||||
$data['mont']=$mon;
|
||||
$data['month']=$this->dahsboard_Model->ireport_month_wise($month);
|
||||
$this->loadviews("Report_month_wise_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function iyear_wise_total()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Yearwise';
|
||||
|
||||
$last = $this->uri->total_segments();
|
||||
$month=$this->uri->segment($last);
|
||||
$a=substr($month,0,-5);
|
||||
$b=substr($month,5,5);
|
||||
//print_r($month);
|
||||
$data['year']=$month;
|
||||
$data['ytotal']=$this->dahsboard_Model->ireport_year_wise_total($a,$b);
|
||||
$this->loadviews("Report_year_wise_total_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
public function ipurchase_supplier()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Supplierwise';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->ireport_supplier($cname,$fa,$aa,$m,$frm,$t);
|
||||
}
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
|
||||
|
||||
|
||||
$this->loadviews("Report_supplier_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
public function iconsolidate()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Consolidate';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->ireport_consolidate($cname,$fa,$aa);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
|
||||
$this->loadviews("Report_consolidate_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function i_consolidate_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Consolidate-Monthwise';
|
||||
//$this->input->post('btn_submit');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
//$mat = $this->input->get('mid');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->i_consolidate_month($m,$sid,$mid,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
|
||||
$this->loadviews("Report_consolidate_month_inward",$this->global,$data, NULL);
|
||||
|
||||
|
||||
$this->loadviews("Report_year_wise_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
public function imonth_wise()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
}
|
||||
public function i_consolidate_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Consolidate-Yearwise';
|
||||
//$this->input->post('btn_submit');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
//$mat = $this->input->get('mid');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->i_consolidate_year($sid,$mid,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
|
||||
$month=$this->input->get('dat');
|
||||
$mon= date("F",strtotime($month));
|
||||
//print_r($month);
|
||||
$data['mont']=$mon;
|
||||
$data['month']=$this->dahsboard_Model->ireport_month_wise($month);
|
||||
$this->loadviews("Report_month_wise_inward",$this->global,$data, NULL);
|
||||
$this->loadviews("Report_consolidate_year_inward",$this->global,$data, NULL);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $this->loadViews("access", $this->global, $data, NULL);
|
||||
// }
|
||||
|
||||
}
|
||||
public function iyear_wise_total()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
|
||||
$last = $this->uri->total_segments();
|
||||
$month=$this->uri->segment($last);
|
||||
$a=substr($month,0,-5);
|
||||
$b=substr($month,5,5);
|
||||
//print_r($month);
|
||||
$data['year']=$month;
|
||||
$data['ytotal']=$this->dahsboard_Model->ireport_year_wise_total($a,$b);
|
||||
$this->loadviews("Report_year_wise_total_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
public function ipurchase_supplier()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->ireport_supplier($cname,$fa,$aa,$m,$frm,$t);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
}
|
||||
public function icumulative()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative ';
|
||||
|
||||
//print_r($prod);
|
||||
|
||||
$this->loadviews("Report_supplier_inward",$this->global,$data, NULL);
|
||||
$data['cum']=$this->dahsboard_Model->ireport_cumulative();
|
||||
|
||||
|
||||
$this->loadviews("Report_cumulative_inward",$this->global,$data, NULL);
|
||||
|
||||
|
||||
|
||||
}
|
||||
public function iconsolidate()
|
||||
{
|
||||
}
|
||||
public function icum_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->ireport_consolidate($cname,$fa,$aa);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative-Monthwise';
|
||||
$last = $this->uri->segment_array();
|
||||
|
||||
$this->loadviews("Report_consolidate_inward",$this->global,$data, NULL);
|
||||
$sup = $last[3];
|
||||
$mat = $last[4];
|
||||
//print_r($prod);
|
||||
|
||||
}
|
||||
public function i_consolidate_month()
|
||||
{
|
||||
$data['cum_month']=$this->dahsboard_Model->ireport_cum_month($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_month_inward",$this->global,$data, NULL);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
//$mat = $this->input->get('mid');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->i_consolidate_month($m,$sid,$mid,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
}
|
||||
public function icum_year()
|
||||
{
|
||||
|
||||
$this->loadviews("Report_consolidate_month_inward",$this->global,$data, NULL);
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative-Yearwise ';
|
||||
$last = $this->uri->segment_array();
|
||||
|
||||
$sup = $last[3];
|
||||
$mat = $last[4];
|
||||
|
||||
}
|
||||
public function i_consolidate_year()
|
||||
{
|
||||
//print_r($sup);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
//$mat = $this->input->get('mid');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->i_consolidate_year($sid,$mid,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
$data['cum_year']=$this->dahsboard_Model->ireport_cum_year($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_year_inward",$this->global,$data, NULL);
|
||||
|
||||
$this->loadviews("Report_consolidate_year_inward",$this->global,$data, NULL);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $this->loadViews("access", $this->global, $data, NULL);
|
||||
// }
|
||||
}
|
||||
public function icum_day()
|
||||
{
|
||||
|
||||
}
|
||||
public function icumulative()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative-Daywise ';
|
||||
$last = $this->uri->segment_array();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$sup = $last[3];
|
||||
$mat = $last[4];
|
||||
//print_r($prod);
|
||||
|
||||
//print_r($prod);
|
||||
$data['cum_day']=$this->dahsboard_Model->ireport_cum_day($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL);
|
||||
|
||||
$data['cum']=$this->dahsboard_Model->ireport_cumulative();
|
||||
}
|
||||
public function rawi_cumulative()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative Category-Wise';
|
||||
|
||||
$this->loadviews("Report_cumulative_inward",$this->global,$data, NULL);
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum']=$this->dahsboard_Model->rawi_report_cumulative();
|
||||
|
||||
|
||||
}
|
||||
public function icum_month()
|
||||
{
|
||||
$this->loadviews("Report_cumulative_raw",$this->global,$data, NULL);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$last = $this->uri->segment_array();
|
||||
|
||||
$sup = $last[3];
|
||||
$mat = $last[4];
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_month']=$this->dahsboard_Model->ireport_cum_month($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_month_inward",$this->global,$data, NULL);
|
||||
}
|
||||
public function rawi_cum_year()
|
||||
{
|
||||
|
||||
}
|
||||
public function icum_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$last = $this->uri->segment_array();
|
||||
|
||||
$sup = $last[3];
|
||||
$mat = $last[4];
|
||||
|
||||
//print_r($sup);
|
||||
|
||||
$data['cum_year']=$this->dahsboard_Model->ireport_cum_year($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_year_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function icum_day()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$last = $this->uri->segment_array();
|
||||
|
||||
$sup = $last[3];
|
||||
$mat = $last[4];
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_day']=$this->dahsboard_Model->ireport_cum_day($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cumulative()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum']=$this->dahsboard_Model->rawi_report_cumulative();
|
||||
|
||||
|
||||
$this->loadviews("Report_cumulative_raw",$this->global,$data, NULL);
|
||||
|
||||
|
||||
|
||||
}
|
||||
public function rawi_cum_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($sup);
|
||||
|
||||
$data['cum_year']=$this->dahsboard_Model->rawi_report_cum_year($cat);
|
||||
$this->loadviews("Report_cumulative_year_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cum_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative Year-Category-Wise';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($sup);
|
||||
|
||||
//print_r($prod);
|
||||
$data['cum_year']=$this->dahsboard_Model->rawi_report_cum_year($cat);
|
||||
$this->loadviews("Report_cumulative_year_raw",$this->global,$data, NULL);
|
||||
|
||||
$data['cum_month']=$this->dahsboard_Model->rawi_report_cum_month($cat);
|
||||
$this->loadviews("Report_cumulative_month_raw",$this->global,$data, NULL);
|
||||
}
|
||||
public function rawi_cum_month()
|
||||
{
|
||||
|
||||
}
|
||||
public function rawi_cum_day()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Report - Cumulative Month-Category-Wise';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($prod);
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_day']=$this->dahsboard_Model->rawi_report_cum_day($cat);
|
||||
$this->loadviews("Report_cumulative_day_raw",$this->global,$data, NULL);
|
||||
$data['cum_month']=$this->dahsboard_Model->rawi_report_cum_month($cat);
|
||||
$this->loadviews("Report_cumulative_month_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_consolidate()
|
||||
{
|
||||
}
|
||||
public function rawi_cum_day()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->category();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_report_consolidate($cname,$fa,$aa);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->category();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Cumulative Daily-Category-Wise';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($prod);
|
||||
|
||||
$this->loadviews("Report_consolidate_raw",$this->global,$data, NULL);
|
||||
$data['cum_day']=$this->dahsboard_Model->rawi_report_cum_day($cat);
|
||||
$this->loadviews("Report_cumulative_day_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_consolidate()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Report - Consolidate ';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->category();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_report_consolidate($cname,$fa,$aa);
|
||||
}
|
||||
$data['material']=$this->dahsboard_Model->category();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
|
||||
$this->loadviews("Report_consolidate_raw",$this->global,$data, NULL);
|
||||
|
||||
|
||||
}
|
||||
public function rawi_consolidate_month()
|
||||
{
|
||||
}
|
||||
public function rawi_consolidate_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
//$mat = $this->input->get('mid');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_month($m,$cat,$sup,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Consolidate Month-Wise';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
//$mat = $this->input->get('mid');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_month($m,$cat,$sup,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
|
||||
$this->loadviews("Report_consolidate_month",$this->global,$data, NULL);
|
||||
$this->loadviews("Report_consolidate_month",$this->global,$data, NULL);
|
||||
|
||||
|
||||
}
|
||||
public function rawi_consolidate_year()
|
||||
{
|
||||
}
|
||||
public function rawi_consolidate_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
//$mat = $this->input->get('mid');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_year($cat,$sup,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Reports - Consolidate Year-Wise';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
//$mat = $this->input->get('mid');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
//$data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */
|
||||
$data['finyear']=$this->dahsboard_Model->ireport_finyear();/* year based on material rcvd date */
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_year($cat,$sup,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
|
||||
$this->loadviews("Report_consolidate_year",$this->global,$data, NULL);
|
||||
$this->loadviews("Report_consolidate_year",$this->global,$data, NULL);
|
||||
|
||||
|
||||
}
|
||||
public function pending_purchase()
|
||||
}
|
||||
public function pending_purchase()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
|
||||
@ -1092,6 +1092,21 @@ GROUP BY financial_year";
|
||||
|
||||
|
||||
}
|
||||
|
||||
function ireport_finyear(){
|
||||
|
||||
$sql="SELECT
|
||||
CASE WHEN MONTH(MaterialRcvdDate)>=4
|
||||
THEN concat(YEAR(MaterialRcvdDate), '-',YEAR(MaterialRcvdDate)+1)
|
||||
ELSE concat(YEAR(MaterialRcvdDate)-1,'-', YEAR(MaterialRcvdDate))
|
||||
END AS financial_year
|
||||
FROM T_IGR_Master
|
||||
GROUP BY financial_year";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function report_year_wise($a=null, $b=null){
|
||||
|
||||
|
||||
@ -1425,10 +1440,10 @@ group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){
|
||||
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){
|
||||
|
||||
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
|
||||
@ -1448,27 +1463,27 @@ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
|
||||
|
||||
round((
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
|
||||
- round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
|
||||
im.file as ifile,pb.FilePath as file
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
|
||||
im.file as ifile,pb.FilePath as file
|
||||
from T_IGR_Master im
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
@ -1482,53 +1497,57 @@ where pm.Status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
//$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
$sql.=" and (im.MaterialRcvdDate >= '".$fa."-04-01' and im.MaterialRcvdDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
if ($m!= ''){
|
||||
}
|
||||
if ($m!= ''){
|
||||
|
||||
$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
//$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
$sql.="and monthname(im.MaterialRcvdDate) = '".$m."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
|
||||
$sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
and date(im.CreatedDate) <= '".$tod."'";
|
||||
// $sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
// and date(im.CreatedDate) <= '".$tod."'";
|
||||
$sql.="and date(im.MaterialRcvdDate) >= '".$fromd."'
|
||||
and date(im.MaterialRcvdDate) <= '".$tod."'";
|
||||
|
||||
}
|
||||
if ($prod!= ''){
|
||||
}
|
||||
if ($prod!= ''){
|
||||
|
||||
$sql.=" and mm.MaterialName = '".$prod."' ";
|
||||
$sql.=" and mm.MaterialName = '".$prod."' ";
|
||||
|
||||
}
|
||||
if ($cat!= ''){
|
||||
}
|
||||
if ($cat!= ''){
|
||||
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql.="group by pono,material_name,category,supplier_name,id.IGRItemNo";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po){
|
||||
|
||||
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
|
||||
@ -1548,27 +1567,27 @@ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
|
||||
|
||||
round((
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
|
||||
- round(ifnull(if(POType = 'REVENUE',
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
|
||||
im.file as ifile,pb.FilePath as file
|
||||
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
|
||||
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
|
||||
im.file as ifile,pb.FilePath as file
|
||||
from T_IGR_Master im
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
@ -1582,66 +1601,74 @@ where pm.Status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
//$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
$sql.=" and (im.MaterialRcvdDate >= '".$fa."-04-01' and im.MaterialRcvdDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
if ($m!= ''){
|
||||
}
|
||||
if ($m!= ''){
|
||||
|
||||
$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
//$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
$sql.="and monthname(im.MaterialRcvdDate) = '".$m."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
|
||||
$sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
and date(im.CreatedDate) <= '".$tod."'";
|
||||
// $sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
// and date(im.CreatedDate) <= '".$tod."'";
|
||||
|
||||
}
|
||||
if ($prod!= ''){
|
||||
$sql.="and date(im.MaterialRcvdDate) >= '".$fromd."'
|
||||
and date(im.MaterialRcvdDate) <= '".$tod."'";
|
||||
|
||||
$sql.=" and mm.MaterialName = '".$prod."' ";
|
||||
}
|
||||
if ($prod!= ''){
|
||||
|
||||
}
|
||||
if ($sid!= ''){
|
||||
$sql.=" and mm.MaterialName = '".$prod."' ";
|
||||
|
||||
$sql.=" and sd.SupplierID = '".$sid."' ";
|
||||
}
|
||||
if ($sid!= ''){
|
||||
|
||||
}
|
||||
if ($mid!= ''){
|
||||
$sql.=" and sd.SupplierID = '".$sid."' ";
|
||||
|
||||
$sql.=" and mm.MaterialCode = '".$mid."' ";
|
||||
}
|
||||
if ($mid!= ''){
|
||||
|
||||
}
|
||||
if ($d!= ''){
|
||||
$sql.=" and mm.MaterialCode = '".$mid."' ";
|
||||
|
||||
$sql.=" and date(im.CreatedDate) = '".$d."' ";
|
||||
}
|
||||
if ($d!= ''){
|
||||
|
||||
}
|
||||
if ($cat!= ''){
|
||||
//$sql.=" and date(im.CreatedDate) = '".$d."' ";
|
||||
$sql.=" and date(im.MaterialRcvdDate) = '".$d."' ";
|
||||
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
}
|
||||
if ($cat!= ''){
|
||||
|
||||
}
|
||||
if ($da!= ''){
|
||||
$ddd= date("Y-m-d",strtotime($da));
|
||||
$sql.=" and date(im.CreatedDate) = '".$ddd."' ";
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
|
||||
}
|
||||
if ($po!= ''){
|
||||
}
|
||||
if ($da!= ''){
|
||||
$ddd= date("Y-m-d",strtotime($da));
|
||||
|
||||
$sql.=" and im.PONO = '".$po."' ";
|
||||
//$sql.=" and date(im.CreatedDate) = '".$ddd."' ";
|
||||
$sql.=" and date(im.MaterialRcvdDate) = '".$ddd."' ";
|
||||
|
||||
}
|
||||
}
|
||||
if ($po!= ''){
|
||||
|
||||
$sql.=" and im.PONO = '".$po."' ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1649,13 +1676,13 @@ $sql.="group by pono,material_name,category,supplier_name,id.IGRItemNo";
|
||||
// echo $m;
|
||||
// echo $sid;
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_attachment($cname,$fa,$aa,$m,$frm,$t){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_attachment($cname,$fa,$aa,$m,$frm,$t){
|
||||
|
||||
|
||||
$sql="select pono,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,
|
||||
$sql="select pono,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,
|
||||
sum(total) as total,file,ifile
|
||||
from igr
|
||||
where status != 'ST030'
|
||||
@ -1663,81 +1690,97 @@ where status != 'ST030'
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and supplier_name = '".$cname."'";
|
||||
$sql.="and supplier_name = '".$cname."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (created_date >= '".$fa."-04-01' and created_date <= '".$aa."-03-31')";
|
||||
//$sql.=" and (created_date >= '".$fa."-04-01' and created_date <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
if ($m!= ''){
|
||||
}
|
||||
if ($m!= ''){
|
||||
|
||||
$sql.="and monthname(created_date) = '".$m."'";
|
||||
//$sql.="and monthname(created_date) = '".$m."'";
|
||||
$sql.="and monthname(materialrcvddate) = '".$m."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
|
||||
$sql.="and date(created_date) >= '".$fromd."'
|
||||
and date(created_date) <= '".$tod."'";
|
||||
// $sql.="and date(created_date) >= '".$fromd."'
|
||||
// and date(created_date) <= '".$tod."'";
|
||||
$sql.="and date(materialrcvddate) >= '".$fromd."'
|
||||
and date(materialrcvddate) <= '".$tod."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$sql.="group by pono,igrn";
|
||||
$sql.="group by pono,igrn";
|
||||
// echo $m;
|
||||
// echo $sid;
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function ireport_year_wise($a,$b){
|
||||
function ireport_year_wise($a,$b){
|
||||
|
||||
|
||||
$sql="select dat as CreatedDate,sum(quantity)as quantity,sum(value) as value
|
||||
from year_inward
|
||||
where status != 'ST030' and date(dat) >= '$a-04-01' and date(dat) <= '$b-03-31'
|
||||
group by month(CreatedDate)
|
||||
";
|
||||
// $sql="select dat as CreatedDate,sum(quantity)as quantity,sum(value) as value, materialrcvddate
|
||||
// from year_inward
|
||||
// where status != 'ST030' and date(dat) >= '$a-04-01' and date(dat) <= '$b-03-31'
|
||||
// group by month(CreatedDate)
|
||||
// ";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
$sql="select dat as CreatedDate,sum(quantity)as quantity,sum(value) as value,materialrcvddate
|
||||
from year_inward
|
||||
where status != 'ST030' and date(materialrcvddate) >= '$a-04-01' and date(materialrcvddate) <= '$b-03-31'
|
||||
group by month(materialrcvddate)";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function ireport_month_wise($mont){
|
||||
$month= date("m",strtotime($mont));
|
||||
$year = date("Y",strtotime($mont));
|
||||
function ireport_month_wise($mont){
|
||||
$month= date("m",strtotime($mont));
|
||||
$year = date("Y",strtotime($mont));
|
||||
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total
|
||||
from year_inward
|
||||
where status != 'ST030' and month(dat)= ? and year(dat) = ?
|
||||
group by material_name,supplier_name";
|
||||
$query = $this->db->query($sql,array($month,$year));
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_year_wise_total($a,$b){
|
||||
// $sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total
|
||||
// from year_inward
|
||||
// where status != 'ST030' and month(dat)= ? and year(dat) = ?
|
||||
// group by material_name,supplier_name";
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total,materialrcvddate
|
||||
from year_inward
|
||||
where status != 'ST030' and month(materialrcvddate)= ? and year(materialrcvddate) = ?
|
||||
group by material_name,supplier_name";
|
||||
$query = $this->db->query($sql,array($month,$year));
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_year_wise_total($a,$b){
|
||||
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total
|
||||
from year_inward
|
||||
where status != 'ST030' and date(dat) >= '$a-04-01' and date(dat) <= '$b-03-31'
|
||||
group by material_name,supplier_name";
|
||||
$query = $this->db->query($sql,array());
|
||||
return $query->result();
|
||||
}
|
||||
// $sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total
|
||||
// from year_inward
|
||||
// where status != 'ST030' and date(dat) >= '$a-04-01' and date(dat) <= '$b-03-31'
|
||||
// group by material_name,supplier_name";
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total,materialrcvddate
|
||||
from year_inward
|
||||
where status != 'ST030' and date(materialrcvddate) >= '$a-04-01' and date(materialrcvddate) <= '$b-03-31'
|
||||
group by material_name,supplier_name";
|
||||
$query = $this->db->query($sql,array());
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function ireport_supplier($cname,$fa,$aa,$m,$frm,$t){
|
||||
function ireport_supplier($cname,$fa,$aa,$m,$frm,$t){
|
||||
|
||||
|
||||
$sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(im.PONO) as counts,ifnull(sum(id.QuantityAsPerInvoice),0) as quantity,round(ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0),2) as value,
|
||||
$sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(im.PONO) as counts,ifnull(sum(id.QuantityAsPerInvoice),0) as quantity,round(ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0),2) as value,
|
||||
|
||||
case pm.POType
|
||||
when 'IMPORT'
|
||||
@ -1775,55 +1818,59 @@ then ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)
|
||||
+ ifnull(rt.Insurance,0)
|
||||
|
||||
end
|
||||
as total
|
||||
as total,im.MaterialRcvdDate
|
||||
from T_IGR_Master im
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
|
||||
where pm.Status != 'ST030'";
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
|
||||
where pm.Status != 'ST030'";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
//$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
$sql.=" and (im.MaterialRcvdDate >= '".$fa."-04-01' and im.MaterialRcvdDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
if ($m!= ''){
|
||||
}
|
||||
if ($m!= ''){
|
||||
|
||||
$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
//$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
$sql.="and monthname(im.MaterialRcvdDate) = '".$m."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
|
||||
$sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
and date(im.CreatedDate) <= '".$tod."'";
|
||||
// $sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
// and date(im.CreatedDate) <= '".$tod."'";
|
||||
$sql.="and date(im.MaterialRcvdDate) >= '".$fromd."'
|
||||
and date(im.MaterialRcvdDate) <= '".$tod."'";
|
||||
|
||||
}
|
||||
$sql.= "group by supplier_name";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
$sql.= "group by supplier_name";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function ireport_consolidate($cname,$fa,$aa){
|
||||
}
|
||||
function ireport_consolidate($cname,$fa,$aa){
|
||||
|
||||
|
||||
$sql="select sid,mid,supplier_name,material_name,
|
||||
$sql="select sid,mid,supplier_name,material_name,
|
||||
SUM(IF(month(dat) = 4, quantity, 0)) AS April,
|
||||
SUM(IF(month(dat) = 5, quantity, 0)) AS May,
|
||||
SUM(IF(month(dat) = 6, quantity, 0)) AS June,
|
||||
@ -1855,205 +1902,208 @@ where status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and supplier_name = '".$cname."'";
|
||||
$sql.="and supplier_name = '".$cname."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
// $sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
// echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
// echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function i_consolidate_month($m=null,$sid=null,$mid=null,$fa=null,$aa=null){
|
||||
}
|
||||
function i_consolidate_month($m=null,$sid=null,$mid=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity) as quantity,sum(value) as total
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity) as quantity,sum(value) as total
|
||||
from year_inward
|
||||
where status != 'ST030' and
|
||||
monthname(dat) = '".$m."' and sid = '".$sid."' and mid = '".$mid."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
//$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function i_consolidate_year($sid=null,$mid=null,$fa=null,$aa=null){
|
||||
}
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function i_consolidate_year($sid=null,$mid=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity) as quantity,sum(value) as total
|
||||
$sql="select sid,mid,supplier_name,material_name,sum(quantity) as quantity,sum(value) as total
|
||||
from year_inward
|
||||
where status != 'ST030' and sid = '".$sid."' and mid = '".$mid."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
//$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cumulative(){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT year.sid as sid,year.mid as mid,year.supplier_name as supplier_name,year.material_name as material_name,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
FROM (SELECT sid,mid,supplier_name,material_name,sum(Quantity) as quantity,sum(value) as total
|
||||
}
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cumulative(){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT year.sid as sid,year.mid as mid,year.supplier_name as supplier_name,year.material_name as material_name,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
FROM (SELECT sid,mid,supplier_name,material_name,sum(Quantity) as quantity,sum(value) as total,materialrcvddate
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
(dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')
|
||||
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
|
||||
group by supplier_name,material_name
|
||||
) as year left join
|
||||
(SELECT sid,mid,supplier_name,material_name,sum(Quantity) as mquantity,sum(value) as mtotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
month(dat) = month(current_date())
|
||||
month(materialrcvddate) = month(current_date())
|
||||
group by supplier_name,material_name
|
||||
) as month on month.supplier_name=year.supplier_name and month.material_name=year.material_name
|
||||
left join
|
||||
(SELECT sid,mid,supplier_name,material_name,sum(Quantity) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
date(dat) = current_date()
|
||||
date(materialrcvddate) = current_date()
|
||||
group by supplier_name,material_name
|
||||
) as today on today.supplier_name=month.supplier_name and today.material_name=month.material_name
|
||||
group by supplier_name,material_name
|
||||
";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cum_month($sup=null,$mat=null){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cum_month($sup=null,$mat=null){
|
||||
|
||||
$sql="SELECT sid,mid,supplier_name,material_name,sum(Quantity) as tquantity,sum(value) as ttotal
|
||||
$sql="SELECT sid,mid,supplier_name,material_name,sum(Quantity) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
month(dat) = month(current_date()) and sid = '".$sup."' and mid = '".$mat."'
|
||||
month(materialrcvddate) = month(current_date()) and sid = '".$sup."' and mid = '".$mat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cum_year($sup=null,$mat=null){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cum_year($sup=null,$mat=null){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
(dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')
|
||||
and sid = '".$sup."' and mid= '".$mat."'
|
||||
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
|
||||
and sid = '".$sup."' and mid= '".$mat."'
|
||||
group by supplier_name,material_name
|
||||
";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cum_day($sup=null,$mat=null){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_cum_day($sup=null,$mat=null){
|
||||
|
||||
$sql="SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql="SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
date(dat) = current_date() and sid = '".$sup."' and mid = '".$mat."'
|
||||
date(materialrcvddate) = current_date() and sid = '".$sup."' and mid = '".$mat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cumulative(){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT year.category as category,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cumulative(){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT year.category as category,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
FROM (SELECT category,sum(Quantity) as quantity,sum(value) as total
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
(dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')
|
||||
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
|
||||
group by category
|
||||
) as year left join
|
||||
(SELECT category,sum(Quantity) as mquantity,sum(value) as mtotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
month(dat) = month(current_date())
|
||||
month(materialrcvddate) = month(current_date())
|
||||
group by category
|
||||
) as month on month.category=year.category
|
||||
left join
|
||||
(SELECT category,sum(Quantity) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
date(dat) = current_date()
|
||||
date(materialrcvddate) = current_date()
|
||||
group by category
|
||||
) as today on today.category=month.category
|
||||
group by category ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_year($cat=null){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_year($cat=null){
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
(dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')
|
||||
and category = '".$cat."'
|
||||
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
|
||||
and category = '".$cat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_month($cat=null){
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_month($cat=null){
|
||||
|
||||
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
month(dat) = month(current_date()) and category = '".$cat."'
|
||||
month(materialrcvddate) = month(current_date()) and category = '".$cat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_day($cat=null){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_day($cat=null){
|
||||
|
||||
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
date(dat) = current_date() and category = '".$cat."'
|
||||
date(materialrcvddate) = current_date() and category = '".$cat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_consolidate($cname,$fa,$aa){
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_consolidate($cname,$fa,$aa){
|
||||
|
||||
|
||||
$sql="select sid,mid,category,supplier_name,material_name,
|
||||
$sql="select sid,mid,category,supplier_name,material_name,
|
||||
SUM(IF(month(dat) = 4, quantity, 0)) AS April,
|
||||
SUM(IF(month(dat) = 5, quantity, 0)) AS May,
|
||||
SUM(IF(month(dat) = 6, quantity, 0)) AS June,
|
||||
@ -2085,45 +2135,46 @@ where status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and Category = '".$cname."'";
|
||||
$sql.="and Category = '".$cname."'";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
//$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$sql.= "group by category";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
$sql.= "group by category";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function rawi_consolidate_month($m=null,$cat=null,$sup=null,$fa=null,$aa=null){
|
||||
}
|
||||
function rawi_consolidate_month($m=null,$cat=null,$sup=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select category,sid,supplier_name,mid,material_name,
|
||||
$sql="select category,sid,supplier_name,mid,material_name,
|
||||
sum(Quantity) as quantity,
|
||||
sum(value) as total
|
||||
FROM year_inward
|
||||
where status != 'ST030' and
|
||||
monthname(dat) = '".$m."' and category = '".$cat."' ";
|
||||
monthname(materialrcvddate) = '".$m."' and category = '".$cat."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by category,supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_consolidate_year($cat=null,$sup=null,$fa=null,$aa=null){
|
||||
}
|
||||
$sql.= "group by category,supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_consolidate_year($cat=null,$sup=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select category,sid,supplier_name,mid,material_name,
|
||||
$sql="select category,sid,supplier_name,mid,material_name,
|
||||
sum(Quantity) as quantity,
|
||||
sum(value) as total
|
||||
FROM year_inward
|
||||
@ -2131,14 +2182,14 @@ where status != 'ST030' and
|
||||
category = '".$cat."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
|
||||
$sql.=" and (materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by category,supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
$sql.= "group by category,supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function pending_purchase($cname,$prod,$fa,$aa,$m,$frm,$t){
|
||||
|
||||
$sql="select po.PONO as po,date_format(po.PODate,'%d-%m-%Y') as pdate,sup.SupplierName as supplier,mm.MaterialName as material,mm.Category as category,pl.Quantity as quantity,pl.ReceivedQuantity as received, (pl.Quantity - pl.ReceivedQuantity) as pending
|
||||
|
||||
@ -4,11 +4,9 @@
|
||||
$("#client_name").select2();
|
||||
$("#item_name").select2();
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
|
||||
<style>
|
||||
@ -286,6 +284,7 @@ table.dataTable thead > tr > td.sorting {
|
||||
<th>Freight (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th>Package (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th>Total (<i class="fa fa-rupee "></i>)</th>
|
||||
<th>Attachments</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@ -350,40 +349,22 @@ table.dataTable thead > tr > td.sorting {
|
||||
$tot_pac= $tot_pac + $rel->Package;
|
||||
echo $rel->Package;?></span></td>
|
||||
|
||||
<!-- <td style="text-align:right"><span><?php
|
||||
$tot_tot= $tot_tot + round($rel->total,2);
|
||||
?>
|
||||
<?php
|
||||
if(!empty($rel->file)){ ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><?php echo number_format($rel->total,2,'.','');?></a>
|
||||
<?php }else if(!empty($rel->ifile)) { ?><a target="_blank" href="<?php echo base_url().''.$rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><?php echo number_format($rel->total,2,'.','');?></a>
|
||||
<?php } else { echo number_format($rel->total,2,'.',''); } ?>
|
||||
</span></td> -->
|
||||
|
||||
<td style="text-align:right"><span><?php
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_tot= $tot_tot + round($rel->total,2);
|
||||
echo number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');
|
||||
?></span></td>
|
||||
|
||||
|
||||
|
||||
<td id="download<?php echo $key?>" style="text-align:right"><span><?php
|
||||
$tot_tot= $tot_tot + round($rel->total,2);
|
||||
?><?php
|
||||
<td id="download<?php echo $key?>" style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($rel->file)){ ?><!-- if for Inward po file -->
|
||||
|
||||
<!-- href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file ?>"
|
||||
href="<?php echo base_url().'report/filedownload?pono ='.$rel->pono ?>"-->
|
||||
<a target="_blank"
|
||||
class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<?php }else if(!empty($rel->ifile)) { ?><!-- else if for igr file -->
|
||||
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View">
|
||||
<button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<?php } else { echo 'N/A'; } ?><!-- both inwardpo file and Igr file empty means -->
|
||||
</span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}}
|
||||
@ -394,9 +375,10 @@ table.dataTable thead > tr > td.sorting {
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left"><span><?php echo $cb->AccountCode;?></span></td>
|
||||
<td style="text-align:center"><span><?php echo $cb->Date;?></span></td>
|
||||
<td style="text-align:right"><span><?php echo '-';?></span></td>
|
||||
<td style="text-align:center"><span><?php echo $cb->created_date;?></span></td>
|
||||
<!-- <td style="text-align:right"><span><?php echo $cb->created_time;?></span></td> -->
|
||||
<td style="text-align:right"><span><?php echo '-';?></span></td>
|
||||
<td style="text-align:center"><span><?php echo $cb->Date;?></span></td>
|
||||
<td><span><?php echo $cb->AccountName;?></span></td>
|
||||
<td><span><?php echo $cb->type.'-'.$cb->category;?></span></td>
|
||||
<td><span><?php echo $cb->Suppliername;?></span></td>
|
||||
@ -425,18 +407,19 @@ table.dataTable thead > tr > td.sorting {
|
||||
</span></td> -->
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_tot= $tot_tot + round($cb->Total,2);
|
||||
?>
|
||||
echo number_format($cb->Total,2,'.','');?></span></td>
|
||||
|
||||
<td style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($cb->cashbookfile)){ ?>
|
||||
<a target="_blank" href="<?php echo base_url().''. $cb->cashbookfile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><?php echo number_format($cb->Total,2,'.','');?></a>
|
||||
<?php
|
||||
}else
|
||||
<a target="_blank" href="<?php echo base_url().''. $cb->cashbookfile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button>File Available</button></a>
|
||||
<?php }else
|
||||
{
|
||||
echo number_format($cb->Total,2,'.','');
|
||||
echo 'N/A';
|
||||
}
|
||||
?>
|
||||
|
||||
</span></td>
|
||||
|
||||
</tr>
|
||||
<?php } } ?>
|
||||
|
||||
@ -581,7 +564,7 @@ $("#Fileshow").modal("show");
|
||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
table = $('#cc').DataTable( {
|
||||
|
||||
|
||||
"aaSorting": [[ 3, "asc" ]],
|
||||
"autoWidth": false,
|
||||
orderCellsTop: true,
|
||||
|
||||
@ -662,7 +645,5 @@ $("#Fileshow").modal("show");
|
||||
$(document).ready(function(){
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user