Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2025-04-24 10:10:13 +05:30
commit c73fd48baf
33 changed files with 7305 additions and 8828 deletions

View File

@ -418,6 +418,9 @@ $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_Material_Supplier', 'Re
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_Material_Item', 'Report::MM_Item'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_Material_Item', 'Report::MM_Item');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_Material_ReceiptValue', 'Report::MM_ReceiptValue'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_Material_ReceiptValue', 'Report::MM_ReceiptValue');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_purchase', 'Report::purchase'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_purchase', 'Report::purchase');
$routes->get('report/consolidate_month', 'Report::consolidate_month');
$routes->get('report/link_purchase', 'Report::link_purchase');
$routes->get('report/consolidate_year', 'Report::consolidate_year');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_year_wise', 'Report::year_wise'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_year_wise', 'Report::year_wise');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_supplier', 'Report::purchase_supplier'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_supplier', 'Report::purchase_supplier');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_consolidate', 'Report::consolidate'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_consolidate', 'Report::consolidate');
@ -429,12 +432,25 @@ $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'cashbookmonthlyexpenses', 'Rep
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'cashbookyearlyexpenses', 'Report::yearexpenses'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'cashbookyearlyexpenses', 'Report::yearexpenses');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_purchase_inward', 'Report::ipurchase'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_purchase_inward', 'Report::ipurchase');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_year_wise_inward', 'Report::iyear_wise'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_year_wise_inward', 'Report::iyear_wise');
$routes->get('report/imonth_wise', 'Report::imonth_wise');
$routes->get('report/iyear_wise_total/(:any)', 'Report::iyear_wise_total/$1');
$routes->get('report/ilink_purchase', 'Report::ilink_purchase');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_supplier_inward', 'Report::ipurchase_supplier'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_supplier_inward', 'Report::ipurchase_supplier');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_supplier_summary', 'Report::suppliersummary'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_supplier_summary', 'Report::suppliersummary');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_consolidate_inward', 'Report::iconsolidate'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_consolidate_inward', 'Report::iconsolidate');
$routes->get('report/i_consolidate_month', 'Report::i_consolidate_month');
$routes->get('report/i_consolidate_year', 'Report::i_consolidate_year');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_cumulative_inward', 'Report::icumulative'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_cumulative_inward', 'Report::icumulative');
$routes->get('report/icum_day/(:any)/(:any)', 'Report::icum_day/$1/$2');
$routes->get('report/icum_month/(:any)/(:any)', 'Report::icum_month/$1/$2');
$routes->get('report/icum_year/(:any)/(:any)', 'Report::icum_year/$1/$2');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_cumulative_raw', 'Report::rawi_cumulative'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_cumulative_raw', 'Report::rawi_cumulative');
$routes->get('report/rawi_cum_day', 'Report::rawi_cum_day');
$routes->get('report/rawi_cum_month', 'Report::rawi_cum_month');
$routes->get('report/rawi_cum_year', 'Report::rawi_cum_year');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_consolidate_category', 'Report::rawi_consolidate'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_consolidate_category', 'Report::rawi_consolidate');
$routes->get('report/rawi_consolidate_month', 'Report::rawi_consolidate_month');
$routes->get('report/rawi_consolidate_year', 'Report::rawi_consolidate_year');
$routes->match(['GET', 'POST'], 'Report_pending_purchase', 'Report::pending_purchase'); $routes->match(['GET', 'POST'], 'Report_pending_purchase', 'Report::pending_purchase');
$routes->match(['GET', 'POST'], '/Report_pending_purchase', 'Report::pending_purchase'); $routes->match(['GET', 'POST'], '/Report_pending_purchase', 'Report::pending_purchase');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_purchase_attach', 'Report::iattach'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'Report_purchase_attach', 'Report::iattach');
@ -547,18 +563,4 @@ $routes->post('updateAbstractDetails','StockController::updateAbstractDetails');
//Reports Module //Reports Module
$routes->get('allReports','Report::allReports'); $routes->get('allReports','Report::allReports');
// Material Report Links
$routes->get('MM_Supplier', 'Report::MM_Supplier');
$routes->get('MM_Item','Report::MM_Item');
$routes->match(['GET', 'POST'],'MM_ReceiptValue','Report::MM_ReceiptValue');
//Inward Report Links
$routes->match(['GET', 'POST'],'ipurchase','Report::ipurchase');
$routes->match(['GET', 'POST'],'iyear_wise', 'Report::iyear_wise');
$routes->match(['GET', 'POST'],'ipurchase_supplier' , 'Report::ipurchase_supplier');
$routes->match(['GET', 'POST'],'iconsolidate' , 'Report::iconsolidate');
$routes->match(['GET', 'POST'],'icumulative' , 'Report::icumulative');
$routes->match(['GET', 'POST'],'rawi_cumulative' , 'Report::rawi_cumulative');
$routes->match(['GET', 'POST'],'rawi_consolidate' , 'Report::rawi_consolidate');

View File

@ -284,13 +284,19 @@ class Report extends BaseController
$this->global['pageTitle'] = 'Reports'; $this->global['pageTitle'] = 'Reports';
//$this->request->getPost('btn_submit'); //$this->request->getPost('btn_submit');
$cname = $this->request->getPost('client_name'); $cname = $this->request->getPost('client_name');
$data['cname'] = $cname;
$prod = $this->request->getPost('item_name'); $prod = $this->request->getPost('item_name');
$data['prod'] = $prod;
$ab = $this->request->getPost('financialyear'); $ab = $this->request->getPost('financialyear');
$data['ab'] = $ab;
$fa = substr((string)$ab, 0, -5); $fa = substr((string)$ab, 0, -5);
$aa = substr((string)$ab, 5, 5); $aa = substr((string)$ab, 5, 5);
$m = $this->request->getPost('month'); $m = $this->request->getPost('month');
$data['m'] = $m;
$frm = $this->request->getPost('from_date'); $frm = $this->request->getPost('from_date');
$data['frm'] = $frm;
$t = $this->request->getPost('to_date'); $t = $this->request->getPost('to_date');
$data['t'] = $t;
//print_r($prod); //print_r($prod);
$data['material'] = $this->dahsboard_Model->material_name(); $data['material'] = $this->dahsboard_Model->material_name();
$data['cust'] = $this->dahsboard_Model->customer_name(); $data['cust'] = $this->dahsboard_Model->customer_name();
@ -300,13 +306,19 @@ class Report extends BaseController
$this->global['pageTitle'] = 'Reports'; $this->global['pageTitle'] = 'Reports';
//$this->request->getPost('btn_submit'); //$this->request->getPost('btn_submit');
$cname = $this->request->getVar('cname'); $cname = $this->request->getVar('cname');
$data['cname'] = $cname;
$prod = $this->request->getVar('prod'); $prod = $this->request->getVar('prod');
$data['prod'] = $prod;
$ab = $this->request->getVar('ab'); $ab = $this->request->getVar('ab');
$data['ab'] = $ab;
$fa = substr((string)$ab, 0, -5); $fa = substr((string)$ab, 0, -5);
$aa = substr((string)$ab, 5, 5); $aa = substr((string)$ab, 5, 5);
$m = $this->request->getVar('month'); $m = $this->request->getVar('month');
$data['m'] = $m;
$frm = $this->request->getVar('frm'); $frm = $this->request->getVar('frm');
$data['frm'] = $frm;
$t = $this->request->getVar('t'); $t = $this->request->getVar('t');
$data['t'] = $t;
$sid = $this->request->getVar('sid'); $sid = $this->request->getVar('sid');
$mid = $this->request->getVar('mid'); $mid = $this->request->getVar('mid');
$d = $this->request->getVar('d'); $d = $this->request->getVar('d');
@ -448,7 +460,9 @@ class Report extends BaseController
$prod = $this->request->getVar('prod'); $prod = $this->request->getVar('prod');
//$mat = $this->request->getVar('mid'); //$mat = $this->request->getVar('mid');
$m = $this->request->getVar('m'); $m = $this->request->getVar('m');
$data['month'] = $m;
$ab = $this->request->getVar('ab'); $ab = $this->request->getVar('ab');
$data['financialyear'] = $ab;
$fa = substr((string)$ab, 0, -5); $fa = substr((string)$ab, 0, -5);
$aa = substr((string)$ab, 5, 5); $aa = substr((string)$ab, 5, 5);
//print_r($prod); //print_r($prod);
@ -471,6 +485,7 @@ class Report extends BaseController
$prod = $this->request->getVar('prod'); $prod = $this->request->getVar('prod');
//$mat = $this->request->getVar('mid'); //$mat = $this->request->getVar('mid');
$ab = $this->request->getVar('ab'); $ab = $this->request->getVar('ab');
$data['financialyear'] = $ab;
$fa = substr((string)$ab, 0, -5); $fa = substr((string)$ab, 0, -5);
$aa = substr((string)$ab, 5, 5); $aa = substr((string)$ab, 5, 5);
//print_r($prod); //print_r($prod);

View File

@ -897,22 +897,22 @@ class User extends BaseController
*/ */
function userListing() function userListing()
{ {
$isDeleted = 0 ; // default showing active data $isDeleted = 0; // default showing active data
$showArchive = 0 ; // $showArchive = 0; //
if ($this->request->getMethod() === 'POST') { if ($this->request->getMethod() === 'POST') {
$showArchive = $this->request->getPost('showArchive'); $showArchive = $this->request->getPost('showArchive');
//reversing condition that when user wants deleted data to be shown then we are making active filter 0 //reversing condition that when user wants deleted data to be shown then we are making active filter 0
if($showArchive){ if ($showArchive) {
$isDeleted = 1; $isDeleted = 1;
} }
} }
$data['showArchive'] = $showArchive; $data['showArchive'] = $showArchive;
// dd($data); // dd($data);
$data['userRecords'] = $this->user_model->userListing($isDeleted); $data['userRecords'] = $this->user_model->userListing($isDeleted);
@ -1024,7 +1024,7 @@ class User extends BaseController
$password = (string)$this->request->getPost('password'); $password = (string)$this->request->getPost('password');
$Createddt = date('Y-m-d H:i:s'); $Createddt = date('Y-m-d H:i:s');
$email = $this->request->getPost('MailID'); $email = $this->request->getPost('MailID');
$userInfo = [ $userInfo = [
'email' => $email, 'email' => $email,
'EmpID' => $EmpID, 'EmpID' => $EmpID,
@ -1036,7 +1036,7 @@ class User extends BaseController
$result = $this->user_model->addNewUser($userInfo); $result = $this->user_model->addNewUser($userInfo);
if ($result > 0) { if ($result > 0) {
// return redirect()->to('userListing')->with('success', 'New user created successfully!'); // return redirect()->to('userListing')->with('success', 'New user created successfully!');
$this->session->setFlashdata('success', 'New user created successfully!'); $this->session->setFlashdata('success', 'New user created successfully!');
@ -1059,25 +1059,25 @@ class User extends BaseController
}; };
} }
function isEmailExists(){ function isEmailExists()
{
$MailID = $this->request->getPost('MailID'); $MailID = $this->request->getPost('MailID');
$empID = $this->request->getPost('EmpID'); $empID = $this->request->getPost('EmpID');
if (!$MailID) { if (!$MailID) {
return $this->response->setJSON(['success' => false, 'message' => 'Mail ID not provided']); return $this->response->setJSON(['success' => false, 'message' => 'Mail ID not provided']);
} }
$isEmailExists = $this->user_model->isEmailExists($MailID,$empID); $isEmailExists = $this->user_model->isEmailExists($MailID, $empID);
if ($isEmailExists) { if ($isEmailExists) {
return $this->response->setJSON(['success' => true, 'message' => 'Email Already Exsiting']); return $this->response->setJSON(['success' => true, 'message' => 'Email Already Exsiting']);
} else { } else {
return $this->response->setJSON(['success' => false, 'message' => '']); return $this->response->setJSON(['success' => false, 'message' => '']);
} }
} }
@ -1161,7 +1161,7 @@ class User extends BaseController
$userInfo = array(); $userInfo = array();
// $userInfo = array('password' => getHashedPassword($password), 'roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate); // $userInfo = array('password' => getHashedPassword($password), 'roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
$userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate , 'email'=> $this->request->getPost('MailID')); $userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate, 'email' => $this->request->getPost('MailID'));
$result = $this->user_model->editUser($userInfo, $EmpID); $result = $this->user_model->editUser($userInfo, $EmpID);
@ -1183,16 +1183,16 @@ class User extends BaseController
*/ */
function deleteUser() function deleteUser()
{ {
$Uid = $this->request->getGet('UID'); $Uid = $this->request->getGet('UID');
$updatedDate = get_current_date_time(); $updatedDate = get_current_date_time();
$updateInfo = array('isDeleted' => 1, 'updatedBy' => $this->vendorId, 'updatedDtm' => $updatedDate); $updateInfo = array('isDeleted' => 1, 'updatedBy' => $this->vendorId, 'updatedDtm' => $updatedDate);
$result = $this->user_model->userActivation($Uid, $updateInfo); $result = $this->user_model->userActivation($Uid, $updateInfo);
return redirect()->route('userListing'); return redirect()->route('userListing');
} }
function reActivateUser() function reActivateUser()
@ -1208,31 +1208,31 @@ class User extends BaseController
$result = $this->user_model->userActivation($Uid, $updateInfo); $result = $this->user_model->userActivation($Uid, $updateInfo);
return redirect()->route('userListing'); return redirect()->route('userListing');
} }
function userChangePassword() function userChangePassword()
{ {
helper('form'); helper('form');
$userId = $this->request->getPost('userId'); $userId = $this->request->getPost('userId');
$newPassword = $this->request->getPost('password'); $newPassword = $this->request->getPost('password');
$cNewPassword = $this->request->getPost('cpassword'); $cNewPassword = $this->request->getPost('cpassword');
if ($newPassword == $cNewPassword) { if ($newPassword == $cNewPassword) {
$usersData = array( $usersData = array(
'password' => getHashedPassword($newPassword), 'password' => getHashedPassword($newPassword),
'updatedBy' => $userId, 'updatedBy' => $userId,
'updatedDtm' => date('Y-m-d H:i:sa') 'updatedDtm' => date('Y-m-d H:i:sa')
); );
$result = $this->user_model->changePassword($userId, $usersData); $result = $this->user_model->changePassword($userId, $usersData);
if ($result > 0) { if ($result > 0) {
$this->session->setFlashdata('success', 'Password updation successful'); $this->session->setFlashdata('success', 'Password updation successful');
} else { } else {
$this->session->setFlashdata('error', 'Password updation failed'); $this->session->setFlashdata('error', 'Password updation failed');
} }
return redirect()->route('userListing'); return redirect()->route('userListing');
} else { } else {
$this->session->setFlashdata('error', 'New Password and Confirm Password Not Same'); $this->session->setFlashdata('error', 'New Password and Confirm Password Not Same');
return redirect()->route('userListing'); return redirect()->route('userListing');
@ -1300,10 +1300,12 @@ class User extends BaseController
if ($this->request->getPost('btn_submit')) { if ($this->request->getPost('btn_submit')) {
$ab = (string)$this->request->getPost('financialyear'); $ab = (string)$this->request->getPost('financialyear');
$data['financialyear'] = $ab;
$fa = substr($ab, 0, -5); $fa = substr($ab, 0, -5);
$aa = substr($ab, 5, 5); $aa = substr($ab, 5, 5);
$m = $this->request->getPost('month'); $m = $this->request->getPost('month');
$data['month'] = $m;
$data['fy'] = $this->user_model->fincalYear(); $data['fy'] = $this->user_model->fincalYear();
$data['per'] = $this->user_model->deliver_perform($fa, $aa, $m); $data['per'] = $this->user_model->deliver_perform($fa, $aa, $m);
@ -1355,9 +1357,9 @@ class User extends BaseController
function zohobooks_api_fetch_all() function zohobooks_api_fetch_all()
{ {
try { try {
helper('zohobook'); helper('zohobook');
$Zohobook_model = model('Zohobook_api_model'); $Zohobook_model = model('Zohobook_api_model');
if (isset($_GET['from']) && $_GET['from'] != null && isset($_GET['to']) && $_GET['to'] != null) { if (isset($_GET['from']) && $_GET['from'] != null && isset($_GET['to']) && $_GET['to'] != null) {
@ -1367,13 +1369,13 @@ class User extends BaseController
$date_today = date('Y-m-d'); $date_today = date('Y-m-d');
$date_yesterday = date('Y-m-d', strtotime('-3 day', strtotime($date_today))); $date_yesterday = date('Y-m-d', strtotime('-3 day', strtotime($date_today)));
} }
$chk_acc_token_val = $Zohobook_model->get_data('zohobook_accesstoken', 'id', 1); $chk_acc_token_val = $Zohobook_model->get_data('zohobook_accesstoken', 'id', 1);
$date = new \DateTime($chk_acc_token_val[0]['created_at']); $date = new \DateTime($chk_acc_token_val[0]['created_at']);
$date->add(new \DateInterval('PT1H')); $date->add(new \DateInterval('PT1H'));
$token = 0; $token = 0;
if ($date->format('Y-m-d H:i:s') > date('Y-m-d H:i:s')) { if ($date->format('Y-m-d H:i:s') > date('Y-m-d H:i:s')) {
$token = $chk_acc_token_val[0]['token']; $token = $chk_acc_token_val[0]['token'];
@ -1385,7 +1387,7 @@ class User extends BaseController
// $token = generateNewToken(); $tokendata['token'] = $token; // $token = generateNewToken(); $tokendata['token'] = $token;
//$Zohobook_model->update($tokendata , 1,'zohobook_accesstoken'); //$Zohobook_model->update($tokendata , 1,'zohobook_accesstoken');
$result = getheringInvoiceDetails($date_today, $date_yesterday, $token); $result = getheringInvoiceDetails($date_today, $date_yesterday, $token);
$headers_new = $result['headers_new']; $headers_new = $result['headers_new'];
$res = json_decode($result['data'], true); $res = json_decode($result['data'], true);
$inv_array = $res['invoices']; $inv_array = $res['invoices'];
@ -1393,16 +1395,15 @@ class User extends BaseController
$tokenWithCreditNoteScope = generateNewTokenForCreditNoteScope(); $tokenWithCreditNoteScope = generateNewTokenForCreditNoteScope();
$cteditNotesRes = getAllCreditNotes($date_today, $date_yesterday, $tokenWithCreditNoteScope); $cteditNotesRes = getAllCreditNotes($date_today, $date_yesterday, $tokenWithCreditNoteScope);
$cteditNotesData = json_decode($cteditNotesRes['data'],true); $cteditNotesData = json_decode($cteditNotesRes['data'], true);
if(count($cteditNotesData['creditnotes'])) if (count($cteditNotesData['creditnotes'])) {
{ $this->saveOrUpdateCreditNote($cteditNotesData['creditnotes'], $tokenWithCreditNoteScope);
$this->saveOrUpdateCreditNote($cteditNotesData['creditnotes'] , $tokenWithCreditNoteScope);
} }
// dd($cteditNotesData); // dd($cteditNotesData);
foreach ($inv_array as $inv) { foreach ($inv_array as $inv) {
$invoice_id = $inv['invoice_id']; $invoice_id = $inv['invoice_id'];
//filter only einvoice status pushed invoices only //filter only einvoice status pushed invoices only
@ -1419,7 +1420,7 @@ class User extends BaseController
// dd($res2); // dd($res2);
foreach ($res2 as $rs) { foreach ($res2 as $rs) {
$gst_no = $rs['gst_no']; $gst_no = $rs['gst_no'];
$customer_id = $rs['customer_id']; $customer_id = $rs['customer_id'];
$customer_name = $rs['customer_name']; $customer_name = $rs['customer_name'];
@ -1440,16 +1441,14 @@ class User extends BaseController
if ($sql_invoice_chk <= 0) { if ($sql_invoice_chk <= 0) {
//this check only for ASHOK LEYLAND LIMITED //this check only for ASHOK LEYLAND LIMITED
if($customer_id == '3215000000000082604' || $customer_id == '3215000000000082724') if ($customer_id == '3215000000000082604' || $customer_id == '3215000000000082724') {
{
//this combination of customer_id & gst_no search only for client ASHOK LEYLAND //this combination of customer_id & gst_no search only for client ASHOK LEYLAND
$gst_sql = $Zohobook_model->ip_client_ashok_leyland($gst_no,$customer_id); $gst_sql = $Zohobook_model->ip_client_ashok_leyland($gst_no, $customer_id);
if ($gst_sql) { if ($gst_sql) {
$client_id = $gst_sql[0]['client_id']; $client_id = $gst_sql[0]['client_id'];
log_message('error', 'Data fetch success DB : ip_clients , client_id : ' . $client_id); log_message('error', 'Data fetch success DB : ip_clients , client_id : ' . $client_id);
} }
} else {
}else{
$gst_sql = $Zohobook_model->ip_clients($gst_no); $gst_sql = $Zohobook_model->ip_clients($gst_no);
if ($gst_sql) { if ($gst_sql) {
@ -1464,13 +1463,12 @@ class User extends BaseController
$client_id = $gst_inserted_id; $client_id = $gst_inserted_id;
log_message('error', 'New Data Created : DB : ip_clients , client_id : ' . $client_id); log_message('error', 'New Data Created : DB : ip_clients , client_id : ' . $client_id);
} }
} }
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@ -1656,7 +1654,7 @@ class User extends BaseController
$ip_invoice_items['Sgst_item_tax_rate_id'] = $sgsttaxid; $ip_invoice_items['Sgst_item_tax_rate_id'] = $sgsttaxid;
$ip_invoice_items['Cgst_item_tax_rate_id'] = $cgsttaxid; $ip_invoice_items['Cgst_item_tax_rate_id'] = $cgsttaxid;
$ip_invoice_items['hsn_or_sac'] = $hsn_or_sac; $ip_invoice_items['hsn_or_sac'] = $hsn_or_sac;
$item_insert_id = $Zohobook_model->customInsert($ip_invoice_items, 'ip_invoice_items'); $item_insert_id = $Zohobook_model->customInsert($ip_invoice_items, 'ip_invoice_items');
if ($item_insert_id) if ($item_insert_id)
log_message('error', 'Data insert success DB : ip_invoice_items => Sgst_item_tax_rate_id :' . $sgsttaxid); log_message('error', 'Data insert success DB : ip_invoice_items => Sgst_item_tax_rate_id :' . $sgsttaxid);
@ -1726,54 +1724,44 @@ class User extends BaseController
} }
// END zoho API // END zoho API
public function saveOrUpdateCreditNote($data , $tokenWithCreditNoteScope ) public function saveOrUpdateCreditNote($data, $tokenWithCreditNoteScope)
{ {
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$existingCreditNote = $this->CreditNoteModel->where('creditnote_id', $value['creditnote_id'])->first(); $existingCreditNote = $this->CreditNoteModel->where('creditnote_id', $value['creditnote_id'])->first();
if ($existingCreditNote) { if ($existingCreditNote) {
// Update existing record // Update existing record
$this->CreditNoteModel->update($value['creditnote_id'], $value); $this->CreditNoteModel->update($value['creditnote_id'], $value);
} else { } else {
// Insert new record // Insert new record
$this->CreditNoteModel->insert($value); $this->CreditNoteModel->insert($value);
} }
//credit note line item api call //credit note line item api call
$cteditNotesLineItemsRes = getCreditNotesItemDetails($value['creditnote_id'], $tokenWithCreditNoteScope); $cteditNotesLineItemsRes = getCreditNotesItemDetails($value['creditnote_id'], $tokenWithCreditNoteScope);
$lineItemData = json_decode($cteditNotesLineItemsRes['data'],true);
if(count($lineItemData['creditnote']['line_items'])) $lineItemData = json_decode($cteditNotesLineItemsRes['data'], true);
{
foreach ($lineItemData['creditnote']['line_items'] as $itemkey => $itemvalue) if (count($lineItemData['creditnote']['line_items'])) {
{ foreach ($lineItemData['creditnote']['line_items'] as $itemkey => $itemvalue) {
$itemvalue['creditnote_id'] = $value['creditnote_id']; $itemvalue['creditnote_id'] = $value['creditnote_id'];
$existingCreditNoteItems = $this->CreditNotesItemsModel->where('line_item_id', $itemvalue['line_item_id'])->first(); $existingCreditNoteItems = $this->CreditNotesItemsModel->where('line_item_id', $itemvalue['line_item_id'])->first();
if ($existingCreditNoteItems) { if ($existingCreditNoteItems) {
// Update existing record // Update existing record
$this->CreditNotesItemsModel->update($itemvalue['line_item_id'], $itemvalue); $this->CreditNotesItemsModel->update($itemvalue['line_item_id'], $itemvalue);
} else { } else {
// Insert new record // Insert new record
$this->CreditNotesItemsModel->insert($itemvalue); $this->CreditNotesItemsModel->insert($itemvalue);
} }
} }
} }
} }
} }

View File

@ -943,33 +943,33 @@ where pm.PODate != 0 ";
where where
pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027'"; pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027'";
if ($cname != '') { if ($cname != '') {
$sql .= "and sd.SupplierName = '" . $cname . "'"; $sql .= "and sd.SupplierName = '" . $cname . "'";
} }
if ($fa and $aa != '') { if ($fa and $aa != '') {
$sql .= " and (pm.PODate >= '" . $fa . "-04-01' and pm.PODate <= '" . $aa . "-03-31')"; $sql .= " and (pm.PODate >= '" . $fa . "-04-01' and pm.PODate <= '" . $aa . "-03-31')";
} }
if ($m != '') { if ($m != '') {
$sql .= "and monthname(pm.PODate) = '" . $m . "'"; $sql .= "and monthname(pm.PODate) = '" . $m . "'";
} }
if ($frm and $t != '') { if ($frm and $t != '') {
$fromd = date("Y-m-d", strtotime($frm)); $fromd = date("Y-m-d", strtotime($frm));
$tod = date("Y-m-d", strtotime($t)); $tod = date("Y-m-d", strtotime($t));
$sql .= "and date(pm.PODate) >= '" . $fromd . "' $sql .= "and date(pm.PODate) >= '" . $fromd . "'
and date(pm.PODate) <= '" . $tod . "'"; and date(pm.PODate) <= '" . $tod . "'";
} }
if ($prod != '') { if ($prod != '') {
$sql .= " and mm.MaterialName = '" . $prod . "' "; $sql .= " and mm.MaterialName = '" . $prod . "' ";
} }
@ -2032,7 +2032,8 @@ group by supplier_name,material_name";
$ab = $yearl; $ab = $yearl;
$fa = substr($ab, 0, -5); $fa = substr($ab, 0, -5);
$aa = substr($ab, 5, 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 $sql = "SELECT cd.ConfigValue as category_id,
cd.key, year.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 (SELECT category,sum(Quantity) as quantity,sum(value) as total
FROM igr FROM igr
where status != 'ST030' and where status != 'ST030' and
@ -2052,6 +2053,7 @@ where status != 'ST030' and
date(materialrcvddate) = current_date() date(materialrcvddate) = current_date()
group by category group by category
) as today on today.category=month.category ) as today on today.category=month.category
left join t_configdetails cd on cd.key = year.category
group by category "; group by category ";
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->getResult(); return $query->getResult();
@ -2238,7 +2240,7 @@ where po.Status != 'ST030' and po.Status = 'ST026'
// } // }
if($purchaseorder_number != ''){ if ($purchaseorder_number != '') {
$sql .= " and po.PONO = '" . $purchaseorder_number . "' "; $sql .= " and po.PONO = '" . $purchaseorder_number . "' ";
} }
$sql .= "order by date(po.PODate) desc"; $sql .= "order by date(po.PODate) desc";
@ -3044,5 +3046,4 @@ function daybeforetotal($yesterday){
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->getResult(); return $query->getResult();
} }
} }

View File

@ -1,147 +1,113 @@
<!-- Report_Material_Master_ItemWise.php -->
<?php
if(!empty($mmi))
{
}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter input {padding: 4px;} table {
.dataTables_filter { width: auto;
width: 50%; }
float: right; </style>
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <div class="content-page">
<div class="content">
<!-- Start Content-->
</style> <div class="container-fluid">
<div class="content-wrapper"> <!-- start page title -->
<section="content"> <div>
<div class="row" style="min-height: 600px;"> <div class="row">
<!-- Left col --> <div class="col-12">
<div class="col-md-12"> <div class="page-title-box page-title-box-alt">
<!-- TABLE: LATEST ORDERS --> <div class="page-title-right">
<div class="box box-info"> <ol class="breadcrumb m-0">
<div class="box-header with-border"> <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Material Master - Item Wise</b></p></h3></center> <li class="breadcrumb-item"><a href="javascript: void(0);">Material Master</a></li>
</div> <li class="breadcrumb-item active">
<!-- /.box-header --> <h4 class="page-title"><b> Item Wise </b></h4>
</li>
</ol>
</div>
</div>
<div class="box-body"> </div>
<div> </div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> <div class="row">
<thead> <div class="col-12">
<tr> <div class="card">
<div class="card-body">
<th>Material Code</th> <table id="MM_Supplier" class="table table-bordered table-hover mb-0 nowrap w-100"
<th>Material Name</th> style="background-color:#fff; font-size:12px;">
<th>UOM</th> <thead>
<th>Category</th> <tr>
<th>HSNCODE</th> <th>Material Code</th>
<th>Material Name</th>
<th>UOM</th>
</tr> <th>Category</th>
</thead> <th>HSNCODE</th>
<tbody>
<?php if(!empty($mmi)){ </tr>
foreach($mmi as $rel) </thead>
{ <tbody>
?> <?php if (!empty($mmi)) {
<tr> foreach ($mmi as $rel) {
?>
<td><span><?php echo $rel->MaterialCode?></span></td> <tr>
<td><span><?php echo $rel->MaterialName?></span></td>
<td><span><?php echo $rel->UOM?></span></td> <td><span><?php echo $rel->MaterialCode ?></span></td>
<td><span><?php echo $rel->Category?></span></td> <td><span><?php echo $rel->MaterialName ?></span></td>
<td><span><?php echo $rel->HSNCODE?></span></td> <td><span><?php echo $rel->UOM ?></span></td>
<td><span><?php echo $rel->Category ?></span></td>
<td><span><?php echo $rel->HSNCODE ?></span></td>
</tr>
<?php
} </tr>
<?php
} }
?> }
</tbody> ?>
</table> </tbody>
</table>
</div> </div> <!-- end card body-->
</div> </div> <!-- end card -->
</div> </div><!-- end col-->
<!-- /.box -->
</div> </div>
<!-- /.col -->
</div> </div>
</div> </div> <!-- container -->
</section> </div> <!-- content -->
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#MM_Supplier').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
table = $('#cc').DataTable( { buttons: [
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + 'excel' // Export buttons
"<'row'<'col-md-6'><'col-md-6'>>" + ],
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", pageLength: 10, // Default rows per page
buttons: [ lengthMenu: [
[10, 20, 30, 50, -1],
{ [10, 20, 30, 50, "All"]
extend: 'excelHtml5', ], // Rows per page options
footer: 'true', responsive: true, // Responsive table
//messageTop: $('h3').text(), ordering: false,
title: 'Report - Material Master - Item Wise', language: {
exportOptions: { paginate: {
columns: ':visible' next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
} },
}, emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
'colvis'
]
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
}); });
function Reset() });
{ </script>
$('#mySelect').val('');
}
</script>

View File

@ -1,267 +1,236 @@
<!-- Report_Material_Master_ReceiptValue.php -->
<script>
$(document).ready(function() {
$("#financialyear").select2();
$("#month").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
</style>
<div class="content-wrapper">
<section="content">
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Material Master - Receipt Value</b>
<br><br>
<?php
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
echo ' ';
}
if($this->input->post('month')){
$m=$this->input->post('month');
echo '('.$m.')';
echo ' ';
}
?>
</p></h3></center>
</div>
<!-- /.box-header -->
<div class="panel-body">
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>"> <div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Material Master</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Receipt Value </b></h4>
</li>
</ol>
</div>
<div class="form-group has-feedback"> </div>
</div>
</div>
<div class="row">
<div class="col-md-2"> <div class="col-12">
<label for="to_date"> <div class="card">
<?php echo 'Year'; ?> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
</label>
<div class="input-group"> <div class="card-body">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option> <form method="post" action="<?php echo base_url("MM_ReceiptValue"); ?>">
<?php <div class="form-group">
<div class="row">
foreach($finyear as $item): <div class="col-3">
<label for="financialyear">
{?> <?php echo 'Year'; ?>
</label>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option> <select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
<?php } endforeach; ?>
</select> foreach ($finyear as $item): { ?>
</div>
</div> <option value="<?php echo $item->financial_year; ?>" <?php if (isset($financialyear) && ($financialyear == $item->financial_year)) {
<div class="col-md-2"> echo 'selected';
<label for="to_date"> } ?>><?php echo $item->financial_year; ?></option>
<?php echo 'Month'; ?>
</label>
<div class="input-group"> <?php }
<select class="form-control" id="month" name="month"> endforeach; ?>
<option value="">Select Month</option> </select>
<option value="January">January</option> </div>
<option value="February">February</option>
<option value="March">March</option> <div class="col-3">
<option value="April">April</option> <label for="month">
<option value="May">May</option> <?php echo 'Month'; ?>
<option value="June">June</option> </label>
<option value="July">July</option>
<option value="August">August</option> <select class="form-control" id="month" name="month">
<option value="September">September</option> <option value="">Select Month</option>
<option value="October">October</option> <option value="January" <?php if (isset($month) && ($month == "January")) {
<option value="November">November</option> echo 'selected';
<option value="December">December</option> } ?>>January</option>
</select> <option value="February" <?php if (isset($month) && ($month == "February")) {
</div> echo 'selected';
</div> } ?>>February</option>
<option value="March" <?php if (isset($month) && ($month == "March")) {
echo 'selected';
} ?>>March</option>
<option value="April" <?php if (isset($month) && ($month == "April")) {
echo 'selected';
} ?>>April</option>
<option value="May" <?php if (isset($month) && ($month == "May")) {
<div class="col-md-2 col-md-offset-0"><br> echo 'selected';
<input type="submit" class="btn btn-success" name="btn_submit" style="padding:10px;" } ?>>May</option>
value="View Report"> <option value="June" <?php if (isset($month) && ($month == "June")) {
echo 'selected';
</div> } ?>>June</option>
</div> <option value="July" <?php if (isset($month) && ($month == "July")) {
</form> echo 'selected';
} ?>>July</option>
<option value="August" <?php if (isset($month) && ($month == "August")) {
echo 'selected';
</div> } ?>>August</option>
<option value="September" <?php if (isset($month) && ($month == "September")) {
echo 'selected';
} ?>>September</option>
<div class="box-body"> <option value="October" <?php if (isset($month) && ($month == "October")) {
<div> echo 'selected';
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> } ?>>October</option>
<thead> <option value="November" <?php if (isset($month) && ($month == "November")) {
<tr> echo 'selected';
<th>Month</th> } ?>>November</option>
<th>Material Code</th> <option value="December" <?php if (isset($month) && ($month == "December")) {
<th>Material Name</th> echo 'selected';
<th>UOM</th> } ?>>December</option>
<th>Average Rate (&#8377;)</th> </select>
</div>
</tr> <div class="col-3"></div>
</thead>
<tbody> <div class="col-3 text-right">
<?php <input type="button" class="btn btn-danger m-2" value="Reset" onclick="window.location.href='<?= base_url('MM_ReceiptValue') ?>';">
$tot=0.00; <input type="submit" class="btn btn-success m-2" name="btn_submit" value="View Report">
if(!empty($mmr)){ </div>
foreach($mmr as $rel)
{ </div>
?> </div>
<tr> <div class="form-group has-feedback">
<td><span><?php echo $rel->Month?></span></td> </div>
<td><span><?php echo $rel->MaterialCode?></span></td>
<td><span><?php echo $rel->MaterialName?></span></td>
<td><span><?php echo $rel->UOM?></span></td> </form>
<td align="right"><span><?php <table id="cc" class="table table-bordered table-hover mb-0 nowrap w-100"
$tot= $tot + number_format($rel->Average_Rate,2,'.',''); style="background-color:#fff; font-size:12px;">
echo number_format($rel->Average_Rate,2,'.','')?></span></td>
<thead>
</tr> <tr>
<?php <th style="white-space: nowrap !important;">Month</th>
} <th style="white-space: nowrap !important;">Material Code</th>
<th style="white-space: nowrap !important;">Material Name</th>
} <th style="white-space: nowrap !important;">UOM</th>
?> <th style="white-space: nowrap !important;">Average Rate (&#8377;)</th>
</tbody> </tr>
<tfoot> </thead>
<td style="text-align:center"><?php <tbody>
$t='Total'; <?php $tot = 0.00;
echo $t;?></td> if (!empty($mmr)) {
<td><?php echo '';?></td> foreach ($mmr as $rel) {
<td><?php echo '';?></td>
<td><?php echo '';?></td> ?>
<td style="text-align:right"><?php echo number_format($tot,2,'.','');?></td> <tr>
</tfoot> <!-- Main invoice row -->
</table> <td><span><?php echo $rel->Month ?></span></td>
<td><span><?php echo $rel->MaterialCode ?></span></td>
<td><span><?php echo $rel->MaterialName ?></span></td>
<td><span><?php echo $rel->UOM ?></span></td>
<td align="right"><span><?php
$tot = $tot + number_format($rel->Average_Rate, 2, '.', '');
echo number_format($rel->Average_Rate, 2, '.', '') ?></span></td>
</tr>
<?php
}
} ?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><strong><?php {
echo '';
} ?></strong></td>
<td style="text-align:right"><strong><?php {
echo '';
} ?></strong></td>
<td style="text-align:right"><strong><?php {
echo '';
} ?></strong></td>
<td style="text-align:right"><?php echo number_format($tot, 2, '.', ''); ?></td>
</td>
</tr>
</tfoot>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</div>
</section>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script> <script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable": "<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalVALUE = api
.column( 4, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2) );
} // Initialize the DataTable
} ); var table = $('#cc').DataTable({
} ); dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
$('#mySelect').on('change',function(){ buttons: [
'excel' // Export buttons
table ],
.column(4) pageLength: 10, // Default rows per page
.search(this.value) lengthMenu: [
.draw(); [10, 20, 30, 50, -1],
}); [10, 20, 30, 50, "All"]
function Reset() ], // Rows per page options
{ responsive: true, // Responsive table
$('#mySelect').val(''); ordering: false,
language: {
} paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
</script> previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
});
});
</script>

View File

@ -1,154 +1,119 @@
<!-- Report_Material_Master_SupplierWise.php -->
<?php
if(!empty($mms))
{
}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter input {padding: 4px;} table {
.dataTables_filter { width: auto;
width: 50%; }
float: right; </style>
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <div class="content-page">
<div class="content">
<!-- Start Content-->
</style> <div class="container-fluid">
<div class="content-wrapper"> <!-- start page title -->
<section class="content"> <div>
<div class="row" style="min-height: 600px;"> <div class="row">
<!-- Left col --> <div class="col-12">
<div class="col-md-12"> <div class="page-title-box page-title-box-alt">
<!-- TABLE: LATEST ORDERS --> <div class="page-title-right">
<div class="box box-info"> <ol class="breadcrumb m-0">
<div class="box-header with-border"> <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Material Master - Supplier Wise</b></p></h3></center> <li class="breadcrumb-item"><a href="javascript: void(0);">Material Master</a></li>
</div> <li class="breadcrumb-item active">
<!-- /.box-header --> <h4 class="page-title"><b> Supplier Wise </b></h4>
</li>
</ol>
</div>
</div>
<div class="box-body"> </div>
<div> </div>
<table class="table table-bordered table-hover" id="cc" style="font-size:12.5px;"> <div class="row">
<thead> <div class="col-12">
<tr> <div class="card">
<th>Material Date</th> <div class="card-body">
<th>Supplier ID </th> <table id="MM_Supplier" class="table table-bordered table-hover mb-0 nowrap w-100"
<th>Supplier Name</th> style="background-color:#fff; font-size:12px;">
<th>Material Code</th> <thead>
<th>Material Name</th> <tr>
<th>Material Type</th> <th>Material Date</th>
<th>UOM</th> <th>Supplier ID </th>
<th>HSNCODE</th> <th>Supplier Name</th>
<th>Material Code</th>
</tr> <th>Material Name</th>
</thead> <th>Material Type</th>
<tbody> <th>UOM</th>
<?php if(!empty($mms)){ <th>HSNCODE</th>
foreach($mms as $rel)
{ </tr>
?> </thead>
<tr> <tbody>
<td><span><?php $date = new DateTime($rel->Material_Date);echo $date->format('d-m-Y');?></span></td> <?php if (!empty($mms)) {
<td><span><?php echo $rel->SupplierID?></span></td> foreach ($mms as $rel) {
<td><span><?php echo $rel->SupplierName?></span></td> ?>
<td><span><?php echo $rel->MaterialCode?></span></td> <tr>
<td><span><?php echo $rel->MaterialName?></span></td> <td><span><?php $date = new DateTime($rel->Material_Date);
<td><span><?php echo $rel->MaterialType?></span></td> echo $date->format('d-m-Y'); ?></span></td>
<td><span><?php echo $rel->UOM?></span></td> <td><span><?php echo $rel->SupplierID ?></span></td>
<td><span><?php echo $rel->HSNCODE?></span></td> <td><span><?php echo $rel->SupplierName ?></span></td>
<td><span><?php echo $rel->MaterialCode ?></span></td>
<td><span><?php echo $rel->MaterialName ?></span></td>
<td><span><?php echo $rel->MaterialType ?></span></td>
</tr> <td><span><?php echo $rel->UOM ?></span></td>
<?php <td><span><?php echo $rel->HSNCODE ?></span></td>
}
}
?> </tr>
</tbody> <?php
</table> }
}
</div> ?>
</div> </tbody>
</div> </table>
<!-- /.box --> </div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
<!-- /.col -->
</div> </div>
</section> </div> <!-- container -->
</div> </div> <!-- content -->
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script> <script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script> <script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
table = $('#cc').DataTable( {
"aaSorting": [[ 0, "desc" ]],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(), // Initialize the DataTable
title: 'Report - Material Master - SupplierWise', var table = $('#MM_Supplier').DataTable({
exportOptions: { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
columns: ':visible' buttons: [
'excel' // Export buttons
} ],
}, pageLength: 10, // Default rows per page
lengthMenu: [
'colvis' [10, 20, 30, 50, -1],
] [10, 20, 30, 50, "All"]
} ); ], // Rows per page options
} ); responsive: true, // Responsive table
$('#mySelect').on('change',function(){ ordering: false,
language: {
table paginate: {
.column(4) next: '<i class="fas fa-angle-right"></i>', // Next button icon
.search(this.value) previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
.draw(); },
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
}); });
function Reset() });
{ </script>
$('#mySelect').val('');
}
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,231 +1,218 @@
<!-- Report_consolidate_m -->
<script>
$(document).ready(function() {
$("#client_name").select2();
$("#item_name").select2();
$("#purchaseorder_number").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter input {padding: 4px;} table {
.dataTables_filter { width: auto;
width: 50%; }
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} .dataTables_filter input {
.btn-success { padding: 4px;
background-color: #00d976;; }
border-color: #00d976;;
} .dataTables_filter {
/* width: 50%; */
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
/* float: right; */
}
</style> </style>
<div class="content-wrapper">
<section class="content"> <div class="content-page">
<div class="row" style="min-height: 600px;"> <div class="content">
<!-- Left col --> <!-- Start Content-->
<div class="col-md-12"> <div class="container-fluid">
<!-- TABLE: LATEST ORDERS --> <!-- start page title -->
<div class="box box-info"> <div>
<div class="box-header with-border"> <div class="row">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Consolidate(<?php <div class="col-12">
$m = $this->input->get('m'); <div class="page-title-box page-title-box-alt">
echo $m; <div class="page-title-right">
?>)</b></p></h3></center> <ol class="breadcrumb m-0">
</div> <li class="breadcrumb-item"><a href="javascript: void(0);">Reports</a></li>
<!-- /.box-header --> <li class="breadcrumb-item"><a href="javascript: void(0);">Purchase</a></li>
<li class="breadcrumb-item active">
<div class="box-body"> <h4 class="page-title"><b> Report - Purchase Consolidate <?php echo isset($month) ? $month : ''; ?> </b></h4>
<div> </li>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </ol>
<thead> </div>
<tr>
<th style="text-align:center" rowspan="2">Supplier Name</th> </div>
<th style="text-align:center" rowspan="2">Material Name</th> </div>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> </div>
</tr> <div class="row">
<tr> <div class="col-12">
<th style="text-align:center">Quantity</th> <div class="card">
<th style="text-align:center">Value &nbsp;(&#8377;)</th> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<div class="card-body">
</tr>
</thead> <table id="cc" class="table table-bordered table-hover wrap" style="background-color:#fff;width: 100% !important;">
<tbody> <thead>
<?php <tr>
<th style="text-align:center" rowspan="2">Supplier Name</th>
if(!empty($spurchse)){ <th style="text-align:center" rowspan="2">Material Name</th>
$tqt=0; <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
$tvt=0; </tr>
$ab=$this->input->get('ab'); <tr>
$month=date('F'); <th style="text-align:center">Quantity</th>
$m = $this->input->get('m'); <th style="text-align:center">Value &nbsp;(&#8377;)</th>
//echo $month;
foreach($spurchse as $rel)
{ </tr>
?> </thead>
<tr> <tbody>
<?php
<td><span>
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab;?>&sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&month=<?php echo $m;?>"><?php echo $rel->supplier_name;?> </a> if (!empty($spurchse)) {
</span></td> $tqt = 0;
<td><span><?php echo $rel->material_name;?></span></td> $tvt = 0;
<td style="text-align:right"><span><?php $ab = $financialyear;
$tqt= $tqt + round($rel->quantity); $m = $month;
echo round($rel->quantity);?></span></td> //echo $month;
<td style="text-align:right"><span><?php $month = date('F');
$tvt= $tvt + number_format($rel->total,2,'.',''); //echo $month;
echo number_format($rel->total,2,'.','');?></span></td> foreach ($spurchse as $rel) {
?>
<tr>
</tr>
<?php <td><span>
} <a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab; ?>&sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&month=<?php echo $m; ?>"><?php echo $rel->supplier_name; ?> </a>
</span></td>
?> <td><span><?php echo $rel->material_name; ?></span></td>
</tbody> <td style="text-align:right"><span><?php
<tfoot width="100%"> $tqt = $tqt + round($rel->quantity);
<tr> echo round($rel->quantity); ?></span></td>
<td style="text-align:center;"><strong>Total</strong></td> <td style="text-align:right"><span><?php
$tvt = $tvt + number_format($rel->total, 2, '.', '');
echo number_format($rel->total, 2, '.', ''); ?></span></td>
<td style="text-align:right"><strong>
<?php
{ </tr>
echo ''; <?php
}
}
?> ?>
</strong> </tbody>
</td> <tfoot width="100%">
<td style="text-align:right"> <tr>
<strong> <td style="text-align:center;"><strong>Total</strong></td>
<?php
{
echo $tqt; <td style="text-align:right"><strong>
<?php {
} echo '';
?> }
</strong> ?>
</td> </strong>
<td style="text-align:right"> </td>
<strong> <td style="text-align:right">
<?php <strong>
{ <?php {
echo number_format($tvt,2,'.',''); echo $tqt;
}
} ?>
?> </strong>
</strong> </td>
</td> <td style="text-align:right">
<strong>
<?php {
echo number_format($tvt, 2, '.', '');
</tr> }
?>
</tfoot> </strong>
<?php </td>
}
?>
</table> </tr>
</tfoot>
<?php
}
?>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Initialize the DataTable with only pagination enabled
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [{
extend: 'excel',
text: 'Excel',
}],
paging: true, // Enable pagination
searching: true, // Disable search
ordering: false, // Disable column sorting
info: false, // Disable table information
lengthChange: false, // Disable page length options
pageLength: 10, // Default rows per page
responsive: true, // Keep responsive design
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>
<script>
// Bootstrap datepicker <script>
// Set up your table function toggleTables(which) {
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable":"<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api if (which == "1") {
.column( 2, { search:'applied' } ) document.getElementById('a').style.display = "block";
.data() document.getElementById('b').style.display = "none";
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() ); }
if (which == "2") {
TotalVALUE = api document.getElementById('b').style.display = "block";
.column( 3, { search:'applied' } ) document.getElementById('a').style.display = "none";
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} }
</script>
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,239 +1,208 @@
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <!-- Report_consolidate_month -->
<style> <style>
.dataTables_filter input {padding: 4px;} table {
.dataTables_filter { width: auto;
width: 50%; }
float: right; </style>
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <div class="content-page">
.btn-success { <div class="content">
background-color: #00d976;; <!-- Start Content-->
border-color: #00d976;; <div class="container-fluid">
} <!-- start page title -->
<div>
<div class="row">
</style> <div class="col-12">
<div class="content-wrapper"> <div class="page-title-box page-title-box-alt">
<section class="content"> <div class="page-title-right">
<div class="row" style="min-height: 600px;"> <ol class="breadcrumb m-0">
<!-- Left col --> <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<div class="col-md-12"> <li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<!-- TABLE: LATEST ORDERS --> <li class="breadcrumb-item active">
<div class="box box-info"> <h4 class="page-title"><b> Consolidate Category-Wise <?php echo isset($month) ? '(' . $month . ')' : '' ?> </b></h4>
<div class="box-header with-border"> </li>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Consolidate Category-Wise(<?php </ol>
$m = $this->input->get('m'); </div>
echo $m;
?>)</b></p></h3></center> </div>
</div> </div>
<!-- /.box-header --> </div>
<div class="row">
<div class="box-body"> <div class="col-12">
<div> <div class="card">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> <div class="card-body">
<thead> <table id="cc" class="table table-bordered table-hover mb-0 nowrap w-100"
<tr> style="background-color:#fff; font-size:12px;">
<th style="text-align:center" rowspan="2">Category</th> <thead>
<th style="text-align:center" rowspan="2">Supplier Name</th> <tr>
<th style="text-align:center" rowspan="2">Material Name</th> <th style="text-align:center" rowspan="2">Category</th>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> <th style="text-align:center" rowspan="2">Supplier Name</th>
</tr> <th style="text-align:center" rowspan="2">Material Name</th>
<tr> <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
<th style="text-align:center">Quantity</th> </tr>
<th style="text-align:center">Value &nbsp; (&#8377;)</th> <tr>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp; (&#8377;)</th>
</tr>
</thead>
<tbody> </tr>
<?php </thead>
<tbody>
if(!empty($spurchse)){ <?php
$tqt=0;
$tvt=0; if (!empty($spurchse)) {
$ab=$this->input->get('ab'); $tqt = 0;
$month=date('F'); $tvt = 0;
$m = $this->input->get('m'); $ab = isset($financialyear) ? $financialyear : '';
//echo $month;
foreach($spurchse as $rel) $month = date('F');
{ $m = $month;
?> //echo $month;
<tr> foreach ($spurchse as $rel) {
<td style="text-align:left;"> ?>
<?php echo $rel->category;?> <tr>
</td> <td style="text-align:left;">
<td><span> <?php echo $rel->category; ?>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>&m=<?php echo $m;?>"><?php echo $rel->supplier_name;?> </a> </td>
</span></td> <td><span>
<td><span><?php echo $rel->material_name;?></span></td> <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>&m=<?php echo $m; ?>"><?php echo $rel->supplier_name; ?> </a>
<td style="text-align:right"><span><?php </span></td>
$tqt= $tqt + round($rel->quantity); <td><span><?php echo $rel->material_name; ?></span></td>
echo round($rel->quantity);?></span></td> <td style="text-align:right"><span><?php
<td style="text-align:right"><span><?php $tqt = $tqt + round($rel->quantity);
$tvt= $tvt + number_format($rel->total,2,'.',''); echo round($rel->quantity); ?></span></td>
echo number_format($rel->total,2,'.','');?></span></td> <td style="text-align:right"><span><?php
$tvt = $tvt + number_format($rel->total, 2, '.', '');
echo number_format($rel->total, 2, '.', ''); ?></span></td>
</tr>
<?php
} </tr>
<?php
?> }
</tbody>
<tfoot width="100%"> ?>
<tr> </tbody>
<td style="text-align:center;"><strong>Total</strong></td> <tfoot width="100%">
<tr>
<td style="text-align:right"><strong> <td style="text-align:center;"><strong>Total</strong></td>
<?php
{ <td style="text-align:right"><strong>
echo ''; <?php {
echo '';
} }
?> ?>
</strong> </strong>
</td> </td>
<td style="text-align:right"><strong> <td style="text-align:right"><strong>
<?php <?php {
{ echo '';
echo ''; }
?>
} </strong>
?> </td>
</strong> <td style="text-align:right">
</td> <strong>
<td style="text-align:right"> <?php {
<strong> echo $tqt;
<?php }
{ ?>
echo $tqt; </strong>
</td>
} <td style="text-align:right">
?> <strong>
</strong> <?php {
</td> echo number_format($tvt, 2, '.', '');
<td style="text-align:right"> }
<strong> ?>
<?php </strong>
{ </td>
echo number_format($tvt,2,'.','');
}
?> </tr>
</strong>
</td> </tfoot>
<?php
}
</tr> ?>
</table>
</tfoot> </div> <!-- end card body-->
<?php </div> <!-- end card -->
} </div><!-- end col-->
?>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div> </div>
<!-- /.col -->
</div> </div>
</section> </div> <!-- container -->
</div> </div> <!-- content -->
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#cc').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
table = $('#cc').DataTable( { buttons: [
"language": { 'excel' // Export buttons
"emptyTable":"<center> Data Not Found ! </center>" ],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}, },
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api }
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 4, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
}); });
});
</script>
// "footerCallback": function ( row, data, start, end, display ) {
// var api = this.api(), data;
</script> // // Remove the formatting to get integer data for summation
// var intVal = function ( i ) {
// return typeof i === 'string' ?
// parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
// typeof i === 'number' ?
// parseFloat(i) : 0;
// };
// TotalQTY = api
// .column( 3, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
// TotalVALUE = api
// .column( 4, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
// }
</script>

View File

@ -1,232 +1,178 @@
<!-- Report_consolidate_month_inward.php -->
<script>
$(document).ready(function() {
$("#financialyear").select2();
$("#month").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
<div class="content-page">
</style> <div class="content">
<div class="content-wrapper"> <!-- Start Content-->
<section class="content"> <div class="container-fluid">
<div class="row" style="min-height: 600px;"> <!-- start page title -->
<!-- Left col --> <div>
<div class="col-md-12"> <div class="row">
<!-- TABLE: LATEST ORDERS --> <div class="col-12">
<div class="box box-info"> <div class="page-title-box page-title-box-alt">
<div class="box-header with-border"> <div class="page-title-right">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Consolidate-Inward(<?php <ol class="breadcrumb m-0">
$m = $this->input->get('m'); <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
echo $m; <li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
?>)</b></p></h3></center> <li class="breadcrumb-item active">
</div> <h4 class="page-title"><b> Consolidate ( <?php echo $month; ?> ) </b></h4>
<!-- /.box-header --> </li>
</ol>
<div class="box-body"> </div>
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </div>
<thead> </div>
<tr> </div>
<th style="text-align:center" rowspan="2">Supplier Name</th> <div class="row">
<th style="text-align:center" rowspan="2">Material Name</th> <div class="col-12">
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> <div class="card">
</tr> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<tr>
<th style="text-align:center">Quantity</th> <div class="card-body">
<th style="text-align:center">Value &nbsp;(&#8377;)</th>
<table id="cc" class="table table-bordered table-hover mb-0 nowrap w-100"
style="background-color:#fff; font-size:12px;">
</tr> <thead>
</thead> <tr>
<tbody> <th style="text-align:center" rowspan="2">Supplier Name</th>
<?php <th style="text-align:center" rowspan="2">Material Name</th>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
if(!empty($spurchse)){ </tr>
$tqt=0; <tr>
$tvt=0; <th style="text-align:center">Quantity</th>
$ab=$this->input->get('ab'); <th style="text-align:center">Value &nbsp;(&#8377;)</th>
$month=date('F');
$m = $this->input->get('m');
//echo $month; </tr>
foreach($spurchse as $rel) </thead>
{ <tbody>
?> <?php
<tr>
if (!empty($spurchse)) {
<td><span> $tqt = 0;
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&month=<?php echo $m;?>"><?php echo $rel->supplier_name;?> </a> $tvt = 0;
</span></td> $ab = $financialyear;
<td><span><?php echo $rel->material_name;?></span></td> $month_letter = date('F');
<td style="text-align:right"><span><?php $m = $month;
$tqt= $tqt + round($rel->quantity); //echo $month_letter;
echo round($rel->quantity);?></span></td> foreach ($spurchse as $rel) {
<td style="text-align:right"><span><?php ?>
$tvt= $tvt + number_format($rel->total,2,'.',''); <tr>
echo number_format($rel->total,2,'.','');?></span></td>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&month=<?php echo $m; ?>"><?php echo $rel->supplier_name; ?> </a>
</tr> </span></td>
<?php <td><span><?php echo $rel->material_name; ?></span></td>
} <td style="text-align:right"><span><?php
$tqt = $tqt + round($rel->quantity);
?> echo round($rel->quantity); ?></span></td>
</tbody> <td style="text-align:right"><span><?php
<tfoot width="100%"> $tvt = $tvt + number_format($rel->total, 2, '.', '');
<tr> echo number_format($rel->total, 2, '.', ''); ?></span></td>
<td style="text-align:center;"><strong>Total</strong></td>
</tr>
<td style="text-align:right"><strong> <?php
<?php }
{
echo ''; ?>
</tbody>
} <tfoot width="100%">
?> <tr>
</strong> <td style="text-align:center;"><strong>Total</strong></td>
</td>
<td style="text-align:right">
<strong> <td style="text-align:right"><strong>
<?php <?php {
{ echo '';
echo $tqt; }
?>
} </strong>
?> </td>
</strong> <td style="text-align:right">
</td> <strong>
<td style="text-align:right"> <?php {
<strong> echo $tqt;
<?php }
{ ?>
echo number_format($tvt,2,'.',''); </strong>
</td>
} <td style="text-align:right">
?> <strong>
</strong> <?php {
</td> echo number_format($tvt, 2, '.', '');
}
?>
</strong>
</tr> </td>
</tfoot>
<?php
} </tr>
?> </tfoot>
</table> <?php
}
?>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#cc').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
table = $('#cc').DataTable( { buttons: [
"language": { 'excel' // Export buttons
"emptyTable":"<center> Data Not Found ! </center>" ],
}, pageLength: 10, // Default rows per page
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + lengthMenu: [
"<'row'<'col-md-6'><'col-md-6'>>" + [10, 20, 30, 50, -1],
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", [10, 20, 30, 50, "All"]
buttons: [ ], // Rows per page options
responsive: true, // Responsive table
{ ordering: false,
extend: 'excelHtml5', language: {
footer: 'true', paginate: {
//messageTop: $('h3').text(), next: '<i class="fas fa-angle-right"></i>', // Next button icon
title: $('h3').text(), previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
exportOptions: { },
columns: ':visible' emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
} });
}, });
</script>
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 2, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,231 +1,215 @@
<!-- Report_consolidate_y -->
<script>
$(document).ready(function() {
$("#client_name").select2();
$("#item_name").select2();
$("#purchaseorder_number").select2();
});
</script>
<?php $ab = isset($financialyear) ? $financialyear : '';
$m = isset($month) ? $month : '';
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter input {padding: 4px;} table {
.dataTables_filter { width: auto;
width: 50%; }
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} .dataTables_filter input {
.btn-success { padding: 4px;
background-color: #00d976;; }
border-color: #00d976;;
} .dataTables_filter {
/* width: 50%; */
float: right;
</style> text-align: right;
<div class="content-wrapper"> }
<section class="content">
<div class="row" style="min-height: 600px;"> .dataTables_paginate {
<!-- Left col --> width: 50%;
<div class="col-md-12"> float: right;
<!-- TABLE: LATEST ORDERS --> text-align: right;
<div class="box box-info"> }
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Consolidate(<?php div.dt-buttons {
$m = $this->input->get('ab'); position: relative;
echo $m; /* float: right; */
?>)</b></p></h3></center>
</div> }
<!-- /.box-header --> </style>
<div class="box-body"> <div class="content-page">
<div> <div class="content">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> <!-- Start Content-->
<thead> <div class="container-fluid">
<tr> <!-- start page title -->
<th style="text-align:center" rowspan="2">Supplier Name</th> <div>
<th style="text-align:center" rowspan="2">Material Name</th> <div class="row">
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> <div class="col-12">
</tr> <div class="page-title-box page-title-box-alt">
<tr> <div class="page-title-right">
<th style="text-align:center">Quantity</th> <ol class="breadcrumb m-0">
<th style="text-align:center">Value &nbsp;(&#8377;)</th> <li class="breadcrumb-item"><a href="javascript: void(0);">Reports</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Purchase</a></li>
<li class="breadcrumb-item active">
</tr> <h4 class="page-title"><b> Report - Purchase Consolidate <?php echo isset($month) ? $month : ''; ?> </b></h4>
</thead> </li>
<tbody> </ol>
<?php </div>
if(!empty($spurchse)){ </div>
$tqt=0; </div>
$tvt=0; </div>
$ab=$this->input->get('ab'); <div class="row">
<div class="col-12">
$month=date('F'); <div class="card">
//echo $month; <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
foreach($spurchse as $rel)
{ <div class="card-body">
?>
<tr> <table id="cc" class="table table-bordered table-hover wrap" style="background-color:#fff;width: 100% !important;">
<thead>
<td><span> <tr>
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?> </a> <th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th>
</span></td> <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
<td><span><?php echo $rel->material_name;?></span></td> </tr>
<td style="text-align:right"><span><?php <tr>
$tqt= $tqt + round($rel->quantity); <th style="text-align:center">Quantity</th>
echo round($rel->quantity);?></span></td> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<td style="text-align:right"><span><?php
$tvt= $tvt + number_format($rel->total,2,'.','');
echo number_format($rel->total,2,'.','');?></span></td> </tr>
</thead>
<tbody>
</tr> <?php
<?php
} if (!empty($spurchse)) {
$tqt = 0;
?> $tvt = 0;
</tbody> foreach ($spurchse as $rel) {
<tfoot width="100%"> ?>
<tr> <tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td><span>
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab; ?>&sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&month=<?php echo $m; ?>"><?php echo $rel->supplier_name; ?> </a>
<td style="text-align:right"><strong> </span></td>
<?php <td><span><?php echo $rel->material_name; ?></span></td>
{ <td style="text-align:right"><span><?php
echo ''; $tqt = $tqt + round($rel->quantity);
echo round($rel->quantity); ?></span></td>
} <td style="text-align:right"><span><?php
?> $tvt = $tvt + number_format($rel->total, 2, '.', '');
</strong> echo number_format($rel->total, 2, '.', ''); ?></span></td>
</td>
<td style="text-align:right">
<strong> </tr>
<?php <?php
{ }
echo $tqt;
?>
} </tbody>
?> <tfoot width="100%">
</strong> <tr>
</td> <td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right">
<strong>
<?php <td style="text-align:right"><strong>
{ <?php {
echo number_format($tvt,2,'.',''); echo '';
}
} ?>
?> </strong>
</strong> </td>
</td> <td style="text-align:right">
<strong>
<?php {
echo $tqt;
</tr> }
?>
</tfoot> </strong>
<?php </td>
} <td style="text-align:right">
<strong>
?> <?php {
</table> echo number_format($tvt, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Initialize the DataTable with only pagination enabled
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [{
extend: 'excel',
text: 'Excel',
}],
paging: true, // Enable pagination
searching: true, // Disable search
ordering: false, // Disable column sorting
info: false, // Disable table information
lengthChange: false, // Disable page length options
pageLength: 10, // Default rows per page
responsive: true, // Keep responsive design
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>
<script>
// Bootstrap datepicker <script>
// Set up your table function toggleTables(which) {
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable":"<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api if (which == "1") {
.column( 2, { search:'applied' } ) document.getElementById('a').style.display = "block";
.data() document.getElementById('b').style.display = "none";
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() ); }
if (which == "2") {
TotalVALUE = api document.getElementById('b').style.display = "block";
.column( 3, { search:'applied' } ) document.getElementById('a').style.display = "none";
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} }
} ); </script>
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,249 +1,207 @@
<!-- Report_consolidate_month -->
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Consolidate Category-Wise <?php echo isset($financialyear) ? '(' . $financialyear . ')' : '' ?> </b></h4>
</li>
</ol>
</div>
<?php </div>
if(!empty($mms)) </div>
{ </div>
<div class="row">
} <div class="col-12">
?> <div class="card">
<div class="card-body">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <table id="cc" class="table table-bordered table-hover mb-0 nowrap w-100"
<style> style="background-color:#fff; font-size:12px;">
.dataTables_filter input {padding: 4px;} <thead>
.dataTables_filter { <tr>
width: 50%; <th style="text-align:center" rowspan="2">Category</th>
float: right; <th style="text-align:center" rowspan="2">Supplier Name</th>
text-align: right; <th style="text-align:center" rowspan="2">Material Name</th>
} <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
.dataTables_paginate { </tr>
width: 50%; <tr>
float: right; <th style="text-align:center">Quantity</th>
text-align: right; <th style="text-align:center">Value &nbsp;(&#8377;)</th>
}
div.dt-buttons {
position: relative; </tr>
float: right; </thead>
<tbody>
} <?php
.btn-success {
background-color: #00d976;; if (!empty($spurchse)) {
border-color: #00d976;; $tqt = 0;
} $tvt = 0;
$ab = isset($financialyear) ? $financialyear : '';
</style> // $month=date('F');
<div class="content-wrapper"> //echo $month;
<section class="content"> foreach ($spurchse as $rel) {
<div class="row" style="min-height: 600px;"> ?>
<!-- Left col --> <tr>
<div class="col-md-12"> <td style="text-align:left;">
<!-- TABLE: LATEST ORDERS --> <?php echo $rel->category; ?>
<div class="box box-info"> </td>
<div class="box-header with-border"> <td><span>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Consolidate Category-Wise(<?php <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?> </a>
$m = $this->input->get('ab');
echo $m; </span></td>
?>)</b></p></h3></center> <td><span><?php echo $rel->material_name; ?></span></td>
</div> <td style="text-align:right"><span><?php
<!-- /.box-header --> $tqt = $tqt + round($rel->quantity);
echo round($rel->quantity); ?></span></td>
<div class="box-body"> <td style="text-align:right"><span><?php
<div> $tvt = $tvt + number_format($rel->total, 2, '.', '');
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> echo number_format($rel->total, 2, '.', ''); ?></span></td>
<thead>
<tr>
<th style="text-align:center" rowspan="2">Category</th> </tr>
<th style="text-align:center" rowspan="2">Supplier Name</th> <?php
<th style="text-align:center" rowspan="2">Material Name</th> }
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
</tr> ?>
<tr> </tbody>
<th style="text-align:center">Quantity</th> <tfoot width="100%">
<th style="text-align:center">Value &nbsp;(&#8377;)</th> <tr>
<td style="text-align:center;"><strong>Total</strong></td>
</tr> <td style="text-align:right"><strong>
</thead> <?php {
<tbody> echo '';
<?php }
?>
if(!empty($spurchse)){ </strong>
$tqt=0; </td>
$tvt=0; <td style="text-align:right"><strong>
$ab=$this->input->get('ab'); <?php {
echo '';
$month=date('F'); }
//echo $month; ?>
foreach($spurchse as $rel) </strong>
{ </td>
?> <td style="text-align:right">
<tr> <strong>
<td style="text-align:left;"> <?php {
<?php echo $rel->category;?> echo $tqt;
</td> }
<td><span> ?>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?> </a> </strong>
</td>
</span></td> <td style="text-align:right">
<td><span><?php echo $rel->material_name;?></span></td> <strong>
<td style="text-align:right"><span><?php <?php {
$tqt= $tqt + round($rel->quantity); echo number_format($tvt, 2, '.', '');
echo round($rel->quantity);?></span></td> }
<td style="text-align:right"><span><?php ?>
$tvt= $tvt + number_format($rel->total,2,'.',''); </strong>
echo number_format($rel->total,2,'.','');?></span></td> </td>
</tr>
<?php </tr>
}
</tfoot>
?> <?php
</tbody> }
<tfoot width="100%">
<tr> ?>
<td style="text-align:center;"><strong>Total</strong></td> </table>
</div> <!-- end card body-->
<td style="text-align:right"><strong> </div> <!-- end card -->
<?php </div><!-- end col-->
{
echo '';
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo '';
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div> </div>
<!-- /.col -->
</div> </div>
</section> </div> <!-- container -->
</div> </div> <!-- content -->
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#cc').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
table = $('#cc').DataTable( { buttons: [
"language": { 'excel' // Export buttons
"emptyTable":"<center> Data Not Found ! </center>" ],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}, },
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api }
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 4, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
}); });
});
</script>
</script> <script>
// "footerCallback": function ( row, data, start, end, display ) {
// var api = this.api(), data;
// // Remove the formatting to get integer data for summation
// var intVal = function ( i ) {
// return typeof i === 'string' ?
// parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
// typeof i === 'number' ?
// parseFloat(i) : 0;
// };
// TotalQTY = api
// .column( 3, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
// TotalVALUE = api
// .column( 4, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
</script>

View File

@ -1,233 +1,183 @@
<!-- Report_consolidate_year_inward -->
<!-- Report_consolidate_month_inward.php -->
<script>
$(document).ready(function() {
$("#financialyear").select2();
$("#month").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
<div class="content-page">
</style> <div class="content">
<div class="content-wrapper"> <!-- Start Content-->
<section class="content"> <div class="container-fluid">
<div class="row" style="min-height: 600px;"> <!-- start page title -->
<!-- Left col --> <div>
<div class="col-md-12"> <div class="row">
<!-- TABLE: LATEST ORDERS --> <div class="col-12">
<div class="box box-info"> <div class="page-title-box page-title-box-alt">
<div class="box-header with-border"> <div class="page-title-right">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Consolidate-Inward<?php <ol class="breadcrumb m-0">
if ($this->input->get('ab')){ <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
$ab = $this->input->get('ab'); <li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
echo '('.$ab.')'; <li class="breadcrumb-item active">
} <h4 class="page-title"><b> Consolidate <!-- ( <?php echo $financialyear; ?> ) --> </b></h4>
?></b></p></h3></center> </li>
</div> </ol>
<!-- /.box-header --> </div>
<div class="box-body"> </div>
<div> </div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </div>
<thead> <div class="row">
<tr> <div class="col-12">
<th style="text-align:center" rowspan="2">Supplier Name</th> <div class="card">
<th style="text-align:center" rowspan="2">Material Name</th> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
</tr> <div class="card-body">
<tr>
<th style="text-align:center">Quantity</th> <table id="cc" class="table table-bordered table-hover mb-0 nowrap w-100"
<th style="text-align:center">Value &nbsp;(&#8377;)</th> style="background-color:#fff; font-size:12px;">
</tr>
</thead> <thead>
<tbody> <tr>
<?php <th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th>
if(!empty($spurchse)){ <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
$tqt=0; </tr>
$tvt=0; <tr>
$ab=$this->input->get('ab'); <th style="text-align:center">Quantity</th>
$month=date('F'); <th style="text-align:center">Value &nbsp;(&#8377;)</th>
$m = $this->input->get('m');
//echo $month;
foreach($spurchse as $rel) </tr>
{ </thead>
?> <tbody>
<tr> <?php
<td><span> if (!empty($spurchse)) {
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?> </a> $tqt = 0;
</span></td> $tvt = 0;
<td><span><?php echo $rel->material_name;?></span></td> $ab = $financialyear;
<td style="text-align:right"><span><?php $month_word = date('F');
$tqt= $tqt + round($rel->quantity); $m = isset($month) ? $month : '';
echo round($rel->quantity);?></span></td> //echo $month_word;
<td style="text-align:right"><span><?php foreach ($spurchse as $rel) {
$tvt= $tvt + number_format($rel->total,2,'.',''); ?>
echo number_format($rel->total,2,'.','');?></span></td> <tr>
<td><span>
</tr> <a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>"><?php echo $rel->supplier_name; ?> </a>
<?php </span></td>
} <td><span><?php echo $rel->material_name; ?></span></td>
<td style="text-align:right"><span><?php
?> $tqt = $tqt + round($rel->quantity);
</tbody> echo round($rel->quantity); ?></span></td>
<tfoot width="100%"> <td style="text-align:right"><span><?php
<tr> $tvt = $tvt + number_format($rel->total, 2, '.', '');
<td style="text-align:center;"><strong>Total</strong></td> echo number_format($rel->total, 2, '.', ''); ?></span></td>
<td style="text-align:right"><strong> </tr>
<?php <?php
{ }
echo '';
?>
} </tbody>
?> <tfoot width="100%">
</strong> <tr>
</td> <td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right">
<strong>
<?php <td style="text-align:right"><strong>
{ <?php {
echo $tqt; echo '';
}
} ?>
?> </strong>
</strong> </td>
</td> <td style="text-align:right">
<td style="text-align:right"> <strong>
<strong> <?php {
<?php echo $tqt;
{ }
echo number_format($tvt,2,'.',''); ?>
</strong>
} </td>
?> <td style="text-align:right">
</strong> <strong>
</td> <?php {
echo number_format($tvt, 2, '.', '');
}
?>
</tr> </strong>
</td>
</tfoot>
<?php
}
</tr>
?>
</table> </tfoot>
<?php
}
?>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#cc').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
table = $('#cc').DataTable( { buttons: [
"language": { 'excel' // Export buttons
"emptyTable":"<center> Data Not Found ! </center>" ],
}, pageLength: 10, // Default rows per page
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + lengthMenu: [
"<'row'<'col-md-6'><'col-md-6'>>" + [10, 20, 30, 50, -1],
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", [10, 20, 30, 50, "All"]
buttons: [ ], // Rows per page options
responsive: true, // Responsive table
{ ordering: false,
extend: 'excelHtml5', language: {
footer: 'true', paginate: {
//messageTop: $('h3').text(), next: '<i class="fas fa-angle-right"></i>', // Next button icon
title: $('h3').text(), previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
exportOptions: { },
columns: ':visible' emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
} });
}, });
</script>
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 2, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,149 +1,131 @@
<!-- Report_cumulative_day_inward -->
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative Month (<?php echo date('F'); ?>) </b></h4>
</li>
</ol>
</div>
</div>
<?php </div>
if(!empty($mms)) </div>
{ <div class="row">
<div class="col-12">
} <div class="card">
?> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <div class="card-body">
<style>
.dataTables_filter input {padding: 4px;} <div class="table-responsive">
.dataTables_filter { <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
width: 50%; <thead>
float: right; <tr>
text-align: right;
} <th style="text-align:center" rowspan="2">Supplier Name</th>
.dataTables_paginate { <th style="text-align:center" rowspan="2">Material Name</th>
width: 50%; <th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
float: right; </tr>
text-align: right; <tr>
} <th style="text-align:center">Quantity</th>
div.dt-buttons { <th style="text-align:center">Value &nbsp;(&#8377;)</th>
position: relative;
float: right;
</tr>
} </thead>
.btn-success { <tbody>
background-color: #00d976;; <?php if (!empty($cum_day)) {
border-color: #00d976;; $tqt = 0;
} $tvt = 0.00;
$d = date('Y-m-d');
</style> foreach ($cum_day as $rel) {
<div class="content-wrapper"> ?>
<section class="content"> <tr>
<div class="row" style="min-height: 600px;"> <td><span>
<!-- Left col --> <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&d=<?php echo $d; ?>&mid=<?php echo $rel->mid; ?>"><?php echo $rel->supplier_name; ?></a>
<div class="col-md-12"> </span></td>
<!-- TABLE: LATEST ORDERS --> <td><span><?php echo $rel->material_name; ?></span></td>
<div class="box box-info"> <td style="text-align:right"><span><?php
<div class="box-header with-border"> $tqt = $tqt + round($rel->tquantity);
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative - Inward(<?php echo date('d-m-Y'); ?>)</b></p></h3></center> echo round($rel->tquantity); ?></span></td>
</div> <td style="text-align:right"><span><?php
<!-- /.box-header --> $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
echo number_format($rel->ttotal, 2, '.', ''); ?></span></td>
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </tr>
<thead> <?php
<tr> }
<th style="text-align:center" rowspan="2">Supplier Name</th> ?>
<th style="text-align:center" rowspan="2">Material Name</th> </tbody>
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th> <tfoot width="100%">
</tr> <tr>
<tr> <td style="text-align:center;"><strong>Total</strong></td>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th> <td style="text-align:right"><strong>
<?php {
echo '';
</tr> }
</thead> ?>
<tbody> </strong>
<?php if(!empty($cum_day)){ </td>
$tqt=0;
$tvt=0.00; <td style="text-align:right">
<strong>
$d=date('Y-m-d'); <?php {
foreach($cum_day as $rel) echo $tqt;
{ }
?> ?>
<tr> </strong>
<td><span> </td>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a> <td style="text-align:right">
</span></td> <strong>
<td><span><?php echo $rel->material_name;?></span></td> <?php {
<td style="text-align:right"><span><?php echo number_format($tvt, 2, '.', '');
$tqt= $tqt + round($rel->tquantity); }
echo round($rel->tquantity);?></span></td> ?>
<td style="text-align:right"><span><?php </strong>
$tvt= $tvt + number_format($rel->ttotal,2,'.',''); </td>
echo number_format($rel->ttotal,2,'.','');?></span></td>
</tr> </tr>
<?php
} </tfoot>
<?php
?> }
</tbody>
<tfoot width="100%"> ?>
<tr> </table>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><strong> </div>
<?php </div> <!-- end card body-->
{ </div> <!-- end card -->
echo ''; </div><!-- end col-->
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -152,78 +134,32 @@ if(!empty($mms))
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'excel' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
// Bootstrap datepicker }
// Set up your table });
$(document).ready(function() { });
table = $('#cc').DataTable( { </script>
"language": {
"emptyTable":"<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 4, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,151 +1,140 @@
<!-- Report_cumulative_day_raw -->
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative-Category-Wise(<?php echo date('d-m-Y'); ?>) </b></h4>
</li>
</ol>
</div>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> </div>
<style> </div>
.dataTables_filter input {padding: 4px;} </div>
.dataTables_filter { <div class="row">
width: 50%; <div class="col-12">
float: right; <div class="card">
text-align: right; <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
}
.dataTables_paginate { <div class="card-body">
width: 50%;
float: right; <div class="table-responsive">
text-align: right; <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
} <thead>
div.dt-buttons {
position: relative; <tr>
float: right; <th style="text-align:center" rowspan="2">Category</th>
<th style="text-align:center" rowspan="2">Supplier Name</th>
} <th style="text-align:center" rowspan="2">Material Name</th>
.btn-success { <th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
background-color: #00d976;; </tr>
border-color: #00d976;; <tr>
} <th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th>
</style>
<div class="content-wrapper"> </tr>
<section class="content"> </thead>
<div class="row" style="min-height: 600px;"> <tbody>
<!-- Left col --> <?php if (!empty($cum_day)) {
<div class="col-md-12"> $tqt = 0;
<!-- TABLE: LATEST ORDERS --> $tvt = 0.00;
<div class="box box-info">
<div class="box-header with-border"> $d = date('Y-m-d');
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative-Category-Wise(<?php echo date('d-m-Y'); ?>)</b></p></h3></center> foreach ($cum_day as $rel) {
</div> ?>
<!-- /.box-header --> <tr>
<td><span><?php echo $rel->category; ?></span></td>
<div class="box-body"> <td><span>
<div> <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&d=<?php echo $d; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?></a>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </span></td>
<thead> <td><span><?php echo $rel->material_name; ?></span></td>
<tr> <td style="text-align:right"><span><?php
<th style="text-align:center" rowspan="2">Category</th> $tqt = $tqt + round($rel->tquantity);
<th style="text-align:center" rowspan="2">Supplier Name</th> echo round($rel->tquantity); ?></span></td>
<th style="text-align:center" rowspan="2">Material Name</th> <td style="text-align:right"><span><?php
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th> $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
</tr> echo number_format($rel->ttotal, 2, '.', ''); ?></span></td>
<tr>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th> </tr>
<?php
}
</tr>
</thead> ?>
<tbody> </tbody>
<?php if(!empty($cum_day)){ <tfoot width="100%">
$tqt=0; <tr>
$tvt=0.00; <td style="text-align:center;"><strong>Total</strong></td>
$d=date('Y-m-d'); <td style="text-align:right"><strong>
foreach($cum_day as $rel) <?php {
{ echo '';
?> }
<tr> ?>
<td><span><?php echo $rel->category;?></span></td> </strong>
<td><span> </td>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a> <td style="text-align:right">
</span></td> <strong>
<td><span><?php echo $rel->material_name;?></span></td> <?php {
<td style="text-align:right"><span><?php echo '';
$tqt= $tqt + round($rel->tquantity); }
echo round($rel->tquantity);?></span></td> ?>
<td style="text-align:right"><span><?php </strong>
$tvt= $tvt + number_format($rel->ttotal,2,'.',''); </td>
echo number_format($rel->ttotal,2,'.','');?></span></td> <td style="text-align:right">
<strong>
<?php {
</tr> echo $tqt;
<?php }
} ?>
</strong>
?> </td>
</tbody> <td style="text-align:right">
<tfoot width="100%"> <strong>
<tr> <?php {
<td style="text-align:center;"><strong>Total</strong></td> echo number_format($tvt, 2, '.', '');
}
<td style="text-align:right"><strong> ?>
<?php </strong>
{ </td>
echo '';
}
?> </tr>
</strong>
</td> </tfoot>
<td style="text-align:right"> <?php
<strong> }
<?php
{ ?>
echo ''; </table>
}
?> </div>
</strong> </div> <!-- end card body-->
</td> </div> <!-- end card -->
<td style="text-align:right"> </div><!-- end col-->
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -154,78 +143,32 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'excel' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
// Bootstrap datepicker }
// Set up your table });
$(document).ready(function() { });
table = $('#cc').DataTable( { </script>
"language": {
"emptyTable":"<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 4, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,233 +1,205 @@
<!-- Report_cumulative_inward -->
<style>
table {
width: auto;
}
</style>
<?php <?php
if(!empty($mms)) if (date('m') >= 4) {
{ $yearl = date('Y') . '-' . (date('Y') + 1);
} else {
$yearl = (date('Y') - 1) . '-' . date('Y');
} }
?> ?>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative ( <?php echo $yearl; ?> ) </b></h4>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> </li>
<style> </ol>
.dataTables_filter input {padding: 4px;} </div>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} </div>
.btn-success { </div>
background-color: #00d976;; </div>
border-color: #00d976;; <div class="row">
} <div class="col-12">
<div class="card">
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
</style>
<div class="content-wrapper"> <div class="card-body">
<section class="content">
<div class="row" style="min-height: 600px;"> <div class="table-responsive">
<!-- Left col --> <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<div class="col-md-12"> <thead>
<!-- TABLE: LATEST ORDERS --> <tr>
<div class="box box-info"> <?php
<div class="box-header with-border"> if (date('m') >= 4) {
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative - Inward</b>(<i> $yearl = date('Y') . '-' . (date('Y') + 1);
<?php } else {
if (date('m') >= 4) { $yearl = (date('Y') - 1) . '-' . date('Y');
$yearl = date('Y').'-'.(date('Y')+1); }
} else { $ab = $yearl;
$yearl = (date('Y')-1).'-'.date('Y'); ?>
} <th style="text-align:center" rowspan="2">Supplier Name</th>
echo $yearl; <th style="text-align:center" rowspan="2">Material Name</th>
?> <th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
</i>)</p></h3></center> <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
</div> <th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
<!-- /.box-header --> </tr>
<tr>
<div class="box-body"> <th style="text-align:center">Quantity</th>
<div> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> <th style="text-align:center">Quantity</th>
<thead> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<tr> <th style="text-align:center">Quantity</th>
<?php <th style="text-align:center">Value &nbsp;(&#8377;)</th>
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1); </tr>
} else { </thead>
$yearl = (date('Y')-1).'-'.date('Y'); <tbody>
} <?php if (!empty($cum)) {
$ab=$yearl; $yqt = 0.00;
?> $yvt = 0.00;
<th style="text-align:center" rowspan="2">Supplier Name</th> $mqt = 0.00;
<th style="text-align:center" rowspan="2">Material Name</th> $mvt = 0.00;
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th> $tqt = 0.00;
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> $tvt = 0.00;
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
</tr> if (date('m') >= 4) {
<tr> $yearl = date('Y') . '-' . (date('Y') + 1);
<th style="text-align:center">Quantity</th> } else {
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th> $yearl = (date('Y') - 1) . '-' . date('Y');
<th style="text-align:center">Quantity</th> }
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th> $ab = $yearl;
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th> foreach ($cum as $index => $rel) {
?>
</tr> <tr>
</thead> <td><span>
<tbody> <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>"><?php echo $rel->supplier_name; ?></a>
<?php if(!empty($cum)){ </span></td>
$yqt=0.00; <td><span><?php echo $rel->material_name; ?></span></td>
$yvt=0.00; <td style="text-align:right"><span id="d_qty<?php echo $index; ?>"><?php
$mqt=0.00; $tqt = $tqt + round($rel->tquantity);
$mvt=0.00; echo anchor('report/icum_day/' . $rel->sid . '/' . $rel->mid, round($rel->tquantity)); ?></span></td>
$tqt=0.00; <td style="text-align:right"><span id="d_value<?php echo $index ?>"><?php
$tvt=0.00; $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
echo anchor('report/icum_day/' . $rel->sid . '/' . $rel->mid, number_format($rel->ttotal, 2, '.', '')); ?></span></td>
if (date('m') >= 4) { <td style="text-align:right"><span id="m_quty<?php echo $index ?>"><?php
$yearl = date('Y').'-'.(date('Y')+1); $mqt = $mqt + round($rel->mquantity);
} else { echo anchor('report/icum_month/' . $rel->sid . '/' . $rel->mid, round($rel->mquantity)); ?></span></td>
$yearl = (date('Y')-1).'-'.date('Y'); <td style="text-align:right"><span id="m_value<?php echo $index ?>"><?php
} $mvt = $mvt + number_format($rel->mtotal, 2, '.', '');
$ab=$yearl; echo anchor('report/icum_month/' . $rel->sid . '/' . $rel->mid, number_format($rel->mtotal, 2, '.', '')); ?></span></td>
<td style="text-align:right"><span id="y_qty<?php echo $index ?>"><?php
foreach($cum as $index=>$rel) $yqt = $yqt + round($rel->quantity);
{ echo anchor('report/icum_year/' . $rel->sid . '/' . $rel->mid, round($rel->quantity)); ?></span></td>
?> <td style="text-align:right"><span id="y_value<?php echo $index; ?>"><?php
<tr> $yvt = $yvt + number_format($rel->total, 2, '.', '');
<td><span> echo anchor('report/icum_year/' . $rel->sid . '/' . $rel->mid, number_format($rel->total, 2, '.', '')); ?></span></td>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
</span></td>
<td><span><?php echo $rel->material_name;?></span></td>
<td style="text-align:right"><span id="d_qty<?php echo $index;?>"><?php </tr>
$tqt= $tqt + round($rel->tquantity); <?php
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?></span></td> }
<td style="text-align:right"><span id="d_value<?php echo $index?>"><?php
$tvt= $tvt + number_format($rel->ttotal,2,'.',''); ?>
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?></span></td> </tbody>
<td style="text-align:right"><span id="m_quty<?php echo $index?>"><?php <tfoot width="100%">
$mqt= $mqt + round($rel->mquantity); <tr>
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?></span></td> <td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><span id="m_value<?php echo $index?>"><?php
$mvt= $mvt + number_format($rel->mtotal,2,'.',''); <td style="text-align:right"><strong>
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?></span></td> <?php {
<td style="text-align:right"><span id="y_qty<?php echo $index?>"><?php echo '';
$yqt= $yqt + round($rel->quantity); }
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?></span></td> ?>
<td style="text-align:right"><span id="y_value<?php echo $index;?>"><?php </strong>
$yvt= $yvt + number_format($rel->total,2,'.',''); </td>
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?></span></td>
<td style="text-align:right">
<strong>
<?php {
</tr> echo $tqt;
<?php }
} ?>
</strong>
?> </td>
</tbody> <td style="text-align:right">
<tfoot width="100%"> <strong>
<tr> <?php {
<td style="text-align:center;"><strong>Total</strong></td> echo number_format($tvt, 2, '.', '');
}
<td style="text-align:right"><strong> ?>
<?php </strong>
{ </td>
echo ''; <td style="text-align:right">
<strong>
} <?php {
?> echo $mqt;
</strong> }
</td> ?>
</strong>
<td style="text-align:right"> </td>
<strong> <td style="text-align:right">
<?php <strong>
{ <?php {
echo $tqt; echo number_format($mvt, 2, '.', '');
}
} ?>
?> </strong>
</strong> </td>
</td> <td style="text-align:right">
<td style="text-align:right"> <strong>
<strong> <?php {
<?php echo $yqt;
{ }
echo number_format($tvt,2,'.',''); ?>
</strong>
} </td>
?> <td style="text-align:right">
</strong> <strong>
</td> <?php {
<td style="text-align:right"> echo number_format($yvt, 2, '.', '');
<strong> }
<?php ?>
{ </strong>
echo $mqt; </td>
}
?> </tr>
</strong>
</td> </tfoot>
<td style="text-align:right"> <?php
<strong> }
<?php
{ ?>
echo number_format($mvt,2,'.',''); </table>
}
?> </div>
</strong> </div> <!-- end card body-->
</td> </div> <!-- end card -->
<td style="text-align:right"> </div><!-- end col-->
<strong>
<?php
{
echo $yqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($yvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -236,155 +208,207 @@ if(!empty($mms))
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'excel' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
});
});
// Bootstrap datepicker $(function() {
// Set up your table //var dateFormat = "mm/dd/yy",
$(document).ready(function() { from = $("#min-date")
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
var vtxt_count = 0; })
.on("change", function() {
to.datepicker("option", "minDate", getDate(this));
}),
to = $("#max-date").datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on("change", function() {
from.datepicker("option", "maxDate", getDate(this));
});
function getDate(element) {
var date;
$('#cc').on('search.dt', function() { try {
date = $.datepicker.parseDate(dateFormat, element.value);
var vvalue = $('#cc_filter input').val(); } catch (error) {
date = null;
if(vvalue !=''){ }
vtxt_count = 1;
}else{
vtxt_count = 0;
}
});
//console.log(vtxt_count);
var Fm_qsum ="<?php echo json_encode($mqt)?>";
var Fd_qsum= "<?php echo json_encode($tqt)?>";
var Fd_valuesum="<?php echo json_encode($tvt)?>";
var Fm_valuesum= "<?php echo json_encode($mvt)?>";
var Fy_quty="<?php echo json_encode($yqt)?>";
var Fyear_value = "<?php echo json_encode($yvt)?>";
table = $('#cc').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display )
{
var m_qsum =0;
var d_qsum= 0;
var d_valuesum= 0;
var m_valuesum= 0;
var y_quty=0;
var year_value = 0;
if(vtxt_count !=0)
{
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var te= $('#m_quty'+count).text();
var dte= $('#d_qty'+count).text();
var dvte= $('#d_value'+count).text();
var m_value= $('#m_value'+count).text();
var y_qty= $('#y_qty'+count).text();
var y_value = $('#y_value'+count).text();
m_qsum += +te;
d_qsum += +dte;
d_valuesum += +dvte;
m_valuesum += +m_value;
y_quty += +y_qty;
year_value += +y_value;
}
var FinalTotal =parseInt(m_qsum);
var DailyFinalToatal=parseInt(d_qsum);
var DailyvalueFinalTotal=parseInt(d_valuesum);
var MonthlyValueFinal = parseInt(m_valuesum);
var yearlyFinalQty = parseInt(y_quty);
var yearlyValueFinal = parseInt(year_value);
var api = this.api(), data;
$( api.column( 4 ).footer() ).html( FinalTotal.toFixed(2).bold() );
$( api.column( 2 ).footer() ).html( DailyFinalToatal.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( DailyvalueFinalTotal.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( MonthlyValueFinal.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( yearlyFinalQty.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( yearlyValueFinal.toFixed(2).bold() );
}
else
{
var FinalTotal =parseInt(Fm_qsum);
var DailyFinalToatal=parseInt(Fd_qsum);
var DailyvalueFinalTotal=parseInt(Fd_valuesum);
var MonthlyValueFinal = parseInt(Fm_valuesum);
var yearlyFinalQty = parseInt(Fy_quty);
var yearlyValueFinal = parseInt(Fyear_value);
var api = this.api(), data;
$( api.column( 4 ).footer() ).html( FinalTotal.toFixed(2).bold() );
$( api.column( 2 ).footer() ).html( DailyFinalToatal.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( DailyvalueFinalTotal.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( MonthlyValueFinal.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( yearlyFinalQty.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( yearlyValueFinal.toFixed(2).bold() );
}
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
return date;
}
});
</script> </script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
var vtxt_count = 0;
$('#cc').on('search.dt', function() {
var vvalue = $('#cc_filter input').val();
if (vvalue != '') {
vtxt_count = 1;
} else {
vtxt_count = 0;
}
});
//console.log(vtxt_count);
var Fm_qsum = "<?php echo json_encode($mqt) ?>";
var Fd_qsum = "<?php echo json_encode($tqt) ?>";
var Fd_valuesum = "<?php echo json_encode($tvt) ?>";
var Fm_valuesum = "<?php echo json_encode($mvt) ?>";
var Fy_quty = "<?php echo json_encode($yqt) ?>";
var Fyear_value = "<?php echo json_encode($yvt) ?>";
table = $('#cc').DataTable({
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function(row, data, start, end, display) {
var m_qsum = 0;
var d_qsum = 0;
var d_valuesum = 0;
var m_valuesum = 0;
var y_quty = 0;
var year_value = 0;
if (vtxt_count != 0) {
for (var j = 0; j <= display.length - 1; j++) {
var count = display[j];
var te = $('#m_quty' + count).text();
var dte = $('#d_qty' + count).text();
var dvte = $('#d_value' + count).text();
var m_value = $('#m_value' + count).text();
var y_qty = $('#y_qty' + count).text();
var y_value = $('#y_value' + count).text();
m_qsum += +te;
d_qsum += +dte;
d_valuesum += +dvte;
m_valuesum += +m_value;
y_quty += +y_qty;
year_value += +y_value;
}
var FinalTotal = parseInt(m_qsum);
var DailyFinalToatal = parseInt(d_qsum);
var DailyvalueFinalTotal = parseInt(d_valuesum);
var MonthlyValueFinal = parseInt(m_valuesum);
var yearlyFinalQty = parseInt(y_quty);
var yearlyValueFinal = parseInt(year_value);
var api = this.api(),
data;
$(api.column(4).footer()).html(FinalTotal.toFixed(2).bold());
$(api.column(2).footer()).html(DailyFinalToatal.toFixed(2).bold());
$(api.column(3).footer()).html(DailyvalueFinalTotal.toFixed(2).bold());
$(api.column(5).footer()).html(MonthlyValueFinal.toFixed(2).bold());
$(api.column(6).footer()).html(yearlyFinalQty.toFixed(2).bold());
$(api.column(7).footer()).html(yearlyValueFinal.toFixed(2).bold());
} else {
var FinalTotal = parseInt(Fm_qsum);
var DailyFinalToatal = parseInt(Fd_qsum);
var DailyvalueFinalTotal = parseInt(Fd_valuesum);
var MonthlyValueFinal = parseInt(Fm_valuesum);
var yearlyFinalQty = parseInt(Fy_quty);
var yearlyValueFinal = parseInt(Fyear_value);
var api = this.api(),
data;
$(api.column(4).footer()).html(FinalTotal.toFixed(2).bold());
$(api.column(2).footer()).html(DailyFinalToatal.toFixed(2).bold());
$(api.column(3).footer()).html(DailyvalueFinalTotal.toFixed(2).bold());
$(api.column(5).footer()).html(MonthlyValueFinal.toFixed(2).bold());
$(api.column(6).footer()).html(yearlyFinalQty.toFixed(2).bold());
$(api.column(7).footer()).html(yearlyValueFinal.toFixed(2).bold());
}
}
});
});
$('#mySelect').on('change', function() {
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,145 +1,136 @@
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <!-- Report_cumulative_inward -->
<style> <style>
.dataTables_filter input {padding: 4px;} table {
.dataTables_filter { width: auto;
width: 50%; }
float: right; </style>
text-align: right; <div class="content-page">
} <div class="content">
.dataTables_paginate { <!-- Start Content-->
width: 50%; <div class="container-fluid">
float: right; <!-- start page title -->
text-align: right; <div>
} <div class="row">
div.dt-buttons { <div class="col-12">
position: relative; <div class="page-title-box page-title-box-alt">
float: right; <div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative Month (<?php echo date('F'); ?>) </b></h4>
</li>
</ol>
</div>
} </div>
.btn-success { </div>
background-color: #00d976;; </div>
border-color: #00d976;; <div class="row">
} <div class="col-12">
<div class="card">
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
</style>
<div class="content-wrapper"> <div class="card-body">
<section class="content">
<div class="row" style="min-height: 600px;"> <div class="table-responsive">
<!-- Left col --> <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<div class="col-md-12"> <thead>
<!-- TABLE: LATEST ORDERS --> <tr>
<div class="box box-info">
<div class="box-header with-border"> <th style="text-align:center" rowspan="2">Supplier Name</th>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative Month - Inward(<?php echo date('F'); ?>)</b></p></h3></center> <th style="text-align:center" rowspan="2">Material Name</th>
</div> <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
<!-- /.box-header --> </tr>
<tr>
<div class="box-body"> <th style="text-align:center">Quantity</th>
<div> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead> </tr>
<tr> </thead>
<tbody>
<th style="text-align:center" rowspan="2">Supplier Name</th> <?php if (!empty($cum_month)) {
<th style="text-align:center" rowspan="2">Material Name</th> $tqt = 0;
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> $tvt = 0;
</tr> if (date('m') >= 4) {
<tr> $yearl = date('Y') . '-' . (date('Y') + 1);
<th style="text-align:center">Quantity</th> } else {
<th style="text-align:center">Value &nbsp;(&#8377;)</th> $yearl = (date('Y') - 1) . '-' . date('Y');
}
</tr> $ab = $yearl;
</thead> $month = date('F');
<tbody> //echo $month;
<?php if(!empty($cum_month)){ foreach ($cum_month as $rel) {
$tqt=0; ?>
$tvt=0; <tr>
if (date('m') >= 4) { <td><span>
$yearl = date('Y').'-'.(date('Y')+1); <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&m=<?php echo $month; ?>&mid=<?php echo $rel->mid; ?>"><?php echo $rel->supplier_name; ?></a>
} else { </span></td>
$yearl = (date('Y')-1).'-'.date('Y'); <td><span><?php echo $rel->material_name; ?></span></td>
} <td style="text-align:right"><span><?php
$ab=$yearl; $tqt = $tqt + round($rel->tquantity);
$month=date('F'); echo round($rel->tquantity); ?></span></td>
//echo $month; <td style="text-align:right"><span><?php
foreach($cum_month as $rel) $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
{ echo number_format($rel->ttotal, 2, '.', ''); ?></span></td>
?>
<tr>
<td><span> </tr>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&m=<?php echo $month;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a> <?php
</span></td> }
<td><span><?php echo $rel->material_name;?></span></td>
<td style="text-align:right"><span><?php ?>
$tqt= $tqt + round($rel->tquantity); </tbody>
echo round($rel->tquantity);?></span></td> <tfoot width="100%">
<td style="text-align:right"><span><?php <tr>
$tvt= $tvt + number_format($rel->ttotal,2,'.',''); <td style="text-align:center;"><strong>Total</strong></td>
echo number_format($rel->ttotal,2,'.','');?></span></td>
<td style="text-align:right"><strong>
<?php {
</tr> echo '';
<?php }
} ?>
</strong>
?> </td>
</tbody>
<tfoot width="100%"> <td style="text-align:right">
<tr> <strong>
<td style="text-align:center;"><strong>Total</strong></td> <?php {
echo $tqt;
<td style="text-align:right"><strong> }
<?php ?>
{ </strong>
echo ''; </td>
<td style="text-align:right">
} <strong>
?> <?php {
</strong> echo number_format($tvt, 2, '.', '');
</td> }
?>
<td style="text-align:right"> </strong>
<strong> </td>
<?php
{
echo $tqt;
</tr>
}
?> </tfoot>
</strong> <?php
</td> }
<td style="text-align:right">
<strong> ?>
<?php </table>
{
echo number_format($tvt,2,'.','');
</div>
} </div> <!-- end card body-->
?> </div> <!-- end card -->
</strong> </div><!-- end col-->
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -148,81 +139,31 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
// Bootstrap datepicker dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
// Set up your table buttons: [
$(document).ready(function() { 'excel' // Export buttons
table = $('#cc').DataTable( { ],
"language": { pageLength: 10, // Default rows per page
"emptyTable":"<center> Data Not Found ! </center>" lengthMenu: [
}, [10, 20, 30, 50, -1],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + [10, 20, 30, 50, "All"]
"<'row'<'col-md-6'><'col-md-6'>>" + ], // Rows per page options
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", responsive: true, // Responsive table
buttons: [ ordering: false,
language: {
{ paginate: {
extend: 'excelHtml5', next: '<i class="fas fa-angle-right"></i>', // Next button icon
footer: 'true', previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
//messageTop: $('h3').text(), },
title: $('h3').text(), emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
exportOptions: { }
columns: ':visible' });
});
} </script>
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 2, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,157 +1,145 @@
<!-- Report_cumulative_month_raw -->
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative Month-Category-Wise(<?php echo date('F'); ?>) </b></h4>
</li>
</ol>
</div>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> </div>
<style> </div>
.dataTables_filter input {padding: 4px;} </div>
.dataTables_filter { <div class="row">
width: 50%; <div class="col-12">
float: right; <div class="card">
text-align: right; <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
}
.dataTables_paginate { <div class="card-body">
width: 50%;
float: right; <div class="table-responsive">
text-align: right; <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
} <thead>
div.dt-buttons { <tr>
position: relative; <th style="text-align:center" rowspan="2">Category</th>
float: right; <th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th>
} <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
.btn-success { </tr>
background-color: #00d976;; <tr>
border-color: #00d976;; <th style="text-align:center">Quantity</th>
} <th style="text-align:center">Value &nbsp;(&#8377;)</th>
</tr>
</style> </thead>
<div class="content-wrapper"> <tbody>
<section class="content"> <?php if (!empty($cum_month)) {
<div class="row" style="min-height: 600px;"> $tqt = 0;
<!-- Left col --> $tvt = 0;
<div class="col-md-12"> if (date('m') >= 4) {
<!-- TABLE: LATEST ORDERS --> $yearl = date('Y') . '-' . (date('Y') + 1);
<div class="box box-info"> } else {
<div class="box-header with-border"> $yearl = (date('Y') - 1) . '-' . date('Y');
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative Month-Category-Wise(<?php echo date('F'); ?>)</b></p></h3></center> }
</div> $ab = $yearl;
<!-- /.box-header --> $month = date('F');
//echo $month;
<div class="box-body"> foreach ($cum_month as $rel) {
<div> ?>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> <tr>
<thead> <td><span><?php echo $rel->category; ?></span></td>
<tr> <td><span>
<th style="text-align:center" rowspan="2">Category</th> <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&m=<?php echo $month; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?></a>
<th style="text-align:center" rowspan="2">Supplier Name</th> </span></td>
<th style="text-align:center" rowspan="2">Material Name</th> <td><span><?php echo $rel->material_name; ?></span></td>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> <td style="text-align:right"><span><?php
</tr> $tqt = $tqt + round($rel->tquantity);
<tr> echo round($rel->tquantity); ?></span></td>
<th style="text-align:center">Quantity</th> <td style="text-align:right"><span><?php
<th style="text-align:center">Value &nbsp;(&#8377;)</th> $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
echo number_format($rel->ttotal, 2, '.', ''); ?></span></td>
</tr>
</thead>
<tbody> </tr>
<?php if(!empty($cum_month)){ <?php
$tqt=0; }
$tvt=0;
if (date('m') >= 4) { ?>
$yearl = date('Y').'-'.(date('Y')+1); </tbody>
} else { <tfoot width="100%">
$yearl = (date('Y')-1).'-'.date('Y'); <tr>
} <td style="text-align:center;"><strong>Total</strong></td>
$ab=$yearl;
$month=date('F'); <td style="text-align:right"><strong>
//echo $month; <?php {
foreach($cum_month as $rel) echo '';
{ }
?> ?>
<tr> </strong>
<td><span><?php echo $rel->category;?></span></td> </td>
<td><span> <td style="text-align:right">
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&m=<?php echo $month;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a> <strong>
</span></td> <?php {
<td><span><?php echo $rel->material_name;?></span></td> echo '';
<td style="text-align:right"><span><?php }
$tqt= $tqt + round($rel->tquantity); ?>
echo round($rel->tquantity);?></span></td> </strong>
<td style="text-align:right"><span><?php </td>
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
echo number_format($rel->ttotal,2,'.','');?></span></td> <td style="text-align:right">
<strong>
<?php {
</tr> echo $tqt;
<?php }
} ?>
</strong>
?> </td>
</tbody> <td style="text-align:right">
<tfoot width="100%"> <strong>
<tr> <?php {
<td style="text-align:center;"><strong>Total</strong></td> echo number_format($tvt, 2, '.', '');
}
<td style="text-align:right"><strong> ?>
<?php </strong>
{ </td>
echo '';
}
?> </tr>
</strong>
</td> </tfoot>
<td style="text-align:right"> <?php
<strong> }
<?php
{ ?>
echo ''; </table>
}
?> </div>
</strong> </div> <!-- end card body-->
</td> </div> <!-- end card -->
</div><!-- end col-->
<td style="text-align:right">
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -160,78 +148,64 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
// Bootstrap datepicker dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
// Set up your table buttons: [
$(document).ready(function() { 'excel' // Export buttons
table = $('#cc').DataTable( { ],
"language": { pageLength: 10, // Default rows per page
"emptyTable":"<center> Data Not Found ! </center>" lengthMenu: [
}, [10, 20, 30, 50, -1],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + [10, 20, 30, 50, "All"]
"<'row'<'col-md-6'><'col-md-6'>>" + ], // Rows per page options
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", responsive: true, // Responsive table
buttons: [ ordering: false,
language: {
{ paginate: {
extend: 'excelHtml5', next: '<i class="fas fa-angle-right"></i>', // Next button icon
footer: 'true', previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
//messageTop: $('h3').text(), },
title: $('h3').text(), emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 4, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
}
});
});
</script> </script>
<script>
// "footerCallback": function ( row, data, start, end, display ) {
// var api = this.api(), data;
// // Remove the formatting to get integer data for summation
// var intVal = function ( i ) {
// return typeof i === 'string' ?
// parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
// typeof i === 'number' ?
// parseFloat(i) : 0;
// };
// TotalQTY = api
// .column( 3, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() );
// TotalVALUE = api
// .column( 4, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
// }
</script>

View File

@ -1,241 +1,221 @@
<!-- Report_cumulative_raw -->
<?php <?php
if(!empty($mms)) if (date('m') >= 4) {
{ $yearl = date('Y') . '-' . (date('Y') + 1);
} else {
$yearl = (date('Y') - 1) . '-' . date('Y');
} }
?> ?>
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative-Category-Wise (<?php echo $yearl; ?>) </b></h4>
</li>
</ol>
</div>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> </div>
<style> </div>
.dataTables_filter input {padding: 4px;} </div>
.dataTables_filter { <div class="row">
width: 50%; <div class="col-12">
float: right; <div class="card">
text-align: right; <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
}
.dataTables_paginate { <div class="card-body">
width: 50%;
float: right; <div class="table-responsive">
text-align: right; <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
} <thead>
div.dt-buttons { <tr>
position: relative; <thead>
float: right; <tr>
<?php
} if (date('m') >= 4) {
.btn-success { $yearl = date('Y') . '-' . (date('Y') + 1);
background-color: #00d976;; } else {
border-color: #00d976;; $yearl = (date('Y') - 1) . '-' . date('Y');
} }
$ab = $yearl;
?>
</style> <th style="text-align:center" rowspan="2">Category</th>
<div class="content-wrapper"> <th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
<section class="content"> <th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
<div class="row" style="min-height: 600px;"> <th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
<!-- Left col --> </tr>
<div class="col-md-12"> <tr>
<!-- TABLE: LATEST ORDERS --> <th style="text-align:center">Quantity</th>
<div class="box box-info"> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<div class="box-header with-border"> <th style="text-align:center">Quantity</th>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative-Category-Wise</b>(<i> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<?php <th style="text-align:center">Quantity</th>
if (date('m') >= 4) { <th style="text-align:center">Value &nbsp;(&#8377;)</th>
$yearl = date('Y').'-'.(date('Y')+1);
} else { </tr>
$yearl = (date('Y')-1).'-'.date('Y'); </thead>
} <tbody>
echo $yearl; <?php if (!empty($cum)) {
?> $yqt = 0.00;
</i>)</p></h3></center> $yvt = 0.00;
</div> $mqt = 0.00;
<!-- /.box-header --> $mvt = 0.00;
$tqt = 0.00;
<div class="box-body"> $tvt = 0.00;
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> if (date('m') >= 4) {
<thead> $yearl = date('Y') . '-' . (date('Y') + 1);
<tr> } else {
<?php $yearl = (date('Y') - 1) . '-' . date('Y');
if (date('m') >= 4) { }
$yearl = date('Y').'-'.(date('Y')+1); $ab = $yearl;
} else {
$yearl = (date('Y')-1).'-'.date('Y');
} foreach ($cum as $index => $rel) {
$ab=$yearl; $cat = $rel->category;
?> ?>
<th style="text-align:center" rowspan="2">Category</th> <tr>
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th> <!-- <td><span>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th> <a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th> ?>&ab=<?php //echo $ab;
</tr> ?>&mid=<?php //echo $rel->mid;
<tr> ?>"><?php //echo $rel->supplier_name;
<th style="text-align:center">Quantity</th> ?></a>
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th> </span></td>-->
<th style="text-align:center">Quantity</th> <td><span>
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th> <a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->category; ?></a>
<th style="text-align:center">Quantity</th> </span></td>
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th> <td style="text-align:right"><span id="d_qty<?php echo $index; ?>">
<?php
</tr> $tqt = $tqt + round($rel->tquantity);
</thead> ?>
<tbody> <a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category; ?>&ab=<?php echo $ab; ?>"><?php echo round($rel->tquantity); ?></a>
<?php if(!empty($cum)){ </span></td>
$yqt=0.00; <td style="text-align:right"><span id="d_value<?php echo $index ?>"><?php
$yvt=0.00; $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
$mqt=0.00; ?>
$mvt=0.00; <a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category; ?>&ab=<?php echo $ab; ?>"><?php echo number_format($rel->ttotal, 2, '.', ''); ?></a>
$tqt=0.00; </span></td>
$tvt=0.00; <td style="text-align:right"><span id="m_quty<?php echo $index ?>"><?php
$mqt = $mqt + round($rel->mquantity);
if (date('m') >= 4) { ?>
$yearl = date('Y').'-'.(date('Y')+1); <a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category; ?>&ab=<?php echo $ab; ?>"><?php echo round($rel->mquantity); ?></a>
} else { </span></td>
$yearl = (date('Y')-1).'-'.date('Y'); <td style="text-align:right"><span id="m_value<?php echo $index ?>"><?php
} $mvt = $mvt + number_format($rel->mtotal, 2, '.', '');
$ab=$yearl; ?>
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category; ?>&ab=<?php echo $ab; ?>"><?php echo number_format($rel->mtotal, 2, '.', ''); ?></a>
</span></td>
foreach($cum as $index=>$rel) <td style="text-align:right"><span id="y_qty<?php echo $index ?>"><?php
{ $yqt = $yqt + round($rel->quantity);
$cat = $rel->category; ?>
?> <a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category; ?>&ab=<?php echo $ab; ?>"><?php echo round($rel->quantity); ?></a>
<tr> </span></td>
<!-- <td><span> <td style="text-align:right"><span id="y_value<?php echo $index; ?>"><?php
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a> $yvt = $yvt + number_format($rel->total, 2, '.', '');
</span></td>--> ?>
<td><span> <a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category; ?>&ab=<?php echo $ab; ?>"><?php echo number_format($rel->total, 2, '.', ''); ?></a>
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->category;?></a> </span></td>
</span></td>
<td style="text-align:right"><span id="d_qty<?php echo $index;?>">
<?php
$tqt= $tqt + round($rel->tquantity); </tr>
?> <?php
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->tquantity);?></a> }
</span></td>
<td style="text-align:right"><span id="d_value<?php echo $index?>"><?php ?>
$tvt= $tvt + number_format($rel->ttotal,2,'.',''); </tbody>
?> <tfoot width="100%">
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo number_format($rel->ttotal,2,'.','');?></a> <tr>
</span></td> <td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><span id="m_quty<?php echo $index?>"><?php
$mqt= $mqt + round($rel->mquantity);
?>
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->mquantity);?></a> <td style="text-align:right">
</span></td> <strong>
<td style="text-align:right"><span id="m_value<?php echo $index?>"><?php <?php {
$mvt= $mvt + number_format($rel->mtotal,2,'.',''); echo $tqt;
?> }
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo number_format($rel->mtotal,2,'.','');?></a> ?>
</span></td> </strong>
<td style="text-align:right"><span id="y_qty<?php echo $index?>"><?php </td>
$yqt= $yqt + round($rel->quantity); <td style="text-align:right">
?> <strong>
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->quantity);?></a> <?php {
</span></td> echo number_format($tvt, 2, '.', '');
<td style="text-align:right"><span id="y_value<?php echo $index;?>"><?php }
$yvt= $yvt + number_format($rel->total,2,'.',''); ?>
?> </strong>
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo number_format($rel->total,2,'.','');?></a> </td>
</span></td> <td style="text-align:right">
<strong>
<?php {
echo $mqt;
</tr> }
<?php ?>
} </strong>
</td>
?> <td style="text-align:right">
</tbody> <strong>
<tfoot width="100%"> <?php {
<tr> echo number_format($mvt, 2, '.', '');
<td style="text-align:center;"><strong>Total</strong></td> }
?>
</strong>
</td>
<td style="text-align:right"> <td style="text-align:right">
<strong> <strong>
<?php <?php {
{ echo $yqt;
echo $tqt; }
?>
} </strong>
?> </td>
</strong> <td style="text-align:right">
</td> <strong>
<td style="text-align:right"> <?php {
<strong> echo number_format($yvt, 2, '.', '');
<?php }
{ ?>
echo number_format($tvt,2,'.',''); </strong>
</td>
}
?>
</strong> </tr>
</td>
<td style="text-align:right"> </tfoot>
<strong> <?php
<?php }
{
echo $mqt; ?>
</table>
}
?>
</strong> </div>
</td> </div> <!-- end card body-->
<td style="text-align:right"> </div> <!-- end card -->
<strong> </div><!-- end col-->
<?php
{
echo number_format($mvt,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo $yqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($yvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -244,58 +224,37 @@ if(!empty($mms))
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'excel' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
// Bootstrap datepicker }
// Set up your table });
$(document).ready(function() { });
</script>
var vtxt_count = 0;
$('#cc').on('search.dt', function() {
var vvalue = $('#cc_filter input').val();
if(vvalue !=''){
vtxt_count = 1;
}else{
vtxt_count = 0;
}
});
var Fm_qsum ="<?php echo json_encode($mqt)?>";
var Fd_qsum= "<?php echo json_encode($tqt)?>";
var Fd_valuesum="<?php echo json_encode($tvt)?>";
var Fm_valuesum= "<?php echo json_encode($mvt)?>";
var Fy_quty="<?php echo json_encode($yqt)?>";
var Fyear_value = "<?php echo json_encode($yvt)?>";
console.log(Fm_qsum);
table = $('#cc').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
<!--
"footerCallback": function ( row, data, start, end, display ) "footerCallback": function ( row, data, start, end, display )
{ {
@ -373,21 +332,4 @@ console.log(Fm_qsum);
} }
} }
-->
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,250 +1,215 @@
<!-- Report_cumulative_year_inward -->
<?php <?php
if(!empty($mms)) if (date('m') >= 4) {
{ $yearl = date('Y') . '-' . (date('Y') + 1);
} else {
$yearl = (date('Y') - 1) . '-' . date('Y');
} }
$yearl;
?> ?>
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative Year (<?php echo $yearl; ?>) </b></h4>
</li>
</ol>
</div>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> </div>
<style> </div>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #00d976;;
border-color: #00d976;;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative Year - Inward</b>(<i>
<?php
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1);
} else {
$yearl = (date('Y')-1).'-'.date('Y');
}
echo $yearl;
?>
</i>)</p></h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<?php
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1);
} else {
$yearl = (date('Y')-1).'-'.date('Y');
}
$ab=$yearl;
?>
<th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th>
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
</tr>
<tr>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;( <i class="fa fa-rupee " ></i>)</th>
</tr>
</thead>
<tbody>
<?php if(!empty($cum_year)){
$tqt=0;
$tvt=0;
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1);
} else {
$yearl = (date('Y')-1).'-'.date('Y');
}
$ab=$yearl;
foreach($cum_year as $rel)
{
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
</span></td>
<td><span><?php echo $rel->material_name;?></span></td>
<td style="text-align:right"><span><?php
$tqt= $tqt + round($rel->tquantity);
echo round($rel->tquantity);?></span></td>
<td style="text-align:right"><span><?php
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
echo number_format($rel->ttotal,2,'.','');?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><strong>
<?php
{
echo '';
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div> <div class="row">
</div> <div class="col-12">
<!-- /.box --> <div class="card">
</div> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<!-- /.col -->
</div> <div class="card-body">
</section>
</div> <div class="table-responsive">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<?php
if (date('m') >= 4) {
$yearl = date('Y') . '-' . (date('Y') + 1);
} else {
$yearl = (date('Y') - 1) . '-' . date('Y');
}
$ab = $yearl;
?>
<th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th>
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
</tr>
<tr>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if (!empty($cum_year)) {
$tqt = 0;
$tvt = 0;
if (date('m') >= 4) {
$yearl = date('Y') . '-' . (date('Y') + 1);
} else {
$yearl = (date('Y') - 1) . '-' . date('Y');
}
$ab = $yearl;
foreach ($cum_year as $rel) {
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>"><?php echo $rel->supplier_name; ?></a>
</span></td>
<td><span><?php echo $rel->material_name; ?></span></td>
<td style="text-align:right"><span><?php
$tqt = $tqt + round($rel->tquantity);
echo round($rel->tquantity); ?></span></td>
<td style="text-align:right"><span><?php
$tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
echo number_format($rel->ttotal, 2, '.', ''); ?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><strong>
<?php {
echo '';
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo number_format($tvt, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script> $.fn.dataTable.moment('DD-MM-YYYY');
// Initialize the DataTable
var table = $('#cc').DataTable({
// Bootstrap datepicker dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
// Set up your table buttons: [
$(document).ready(function() { 'excel' // Export buttons
table = $('#cc').DataTable( { ],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + pageLength: 10, // Default rows per page
"<'row'<'col-md-6'><'col-md-6'>>" + lengthMenu: [
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", [10, 20, 30, 50, -1],
buttons: [ [10, 20, 30, 50, "All"]
], // Rows per page options
{ responsive: true, // Responsive table
extend: 'excelHtml5', ordering: false,
footer: 'true', language: {
//messageTop: $('h3').text(), paginate: {
title: $('h3').text(), next: '<i class="fas fa-angle-right"></i>', // Next button icon
exportOptions: { previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
columns: ':visible' },
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 2, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
}
});
});
</script> </script>
<script>
// "footerCallback": function ( row, data, start, end, display ) {
// var api = this.api(), data;
// // Remove the formatting to get integer data for summation
// var intVal = function ( i ) {
// return typeof i === 'string' ?
// parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
// typeof i === 'number' ?
// parseFloat(i) : 0;
// };
// TotalQTY = api
// .column( 2, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
// TotalVALUE = api
// .column( 3, { search:'applied' } )
// .data()
// .reduce( function (a, b) {
// return intVal(a) + intVal(b);
// }, 0 );
// $( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
</script>

View File

@ -1,253 +1,223 @@
<!-- Report_cumulative_year_raw -->
<?php
if (date('m') >= 4) {
$yearl = date('Y') . '-' . (date('Y') + 1);
} else {
$yearl = (date('Y') - 1) . '-' . date('Y');
}
$yearl;
?>
<style>
table {
width: auto;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Cumulative Year-Category-Wise (<?php echo $yearl; ?>) </b></h4>
</li>
</ol>
</div>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> </div>
<style> </div>
.dataTables_filter input {padding: 4px;} </div>
.dataTables_filter { <div class="row">
width: 50%; <div class="col-12">
float: right; <div class="card">
text-align: right; <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
}
.dataTables_paginate { <div class="card-body">
width: 50%;
float: right; <div class="table-responsive">
text-align: right; <table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
} <thead>
div.dt-buttons { <tr>
position: relative; <?php
float: right; if (date('m') >= 4) {
$yearl = date('Y') . '-' . (date('Y') + 1);
} } else {
.btn-success { $yearl = (date('Y') - 1) . '-' . date('Y');
background-color: #00d976;; }
border-color: #00d976;; $ab = $yearl;
} ?>
<th style="text-align:center" rowspan="2">Category</th>
<th style="text-align:center" rowspan="2">Supplier Name</th>
</style> <th style="text-align:center" rowspan="2">Material Name</th>
<div class="content-wrapper"> <th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
<section class="content"> </tr>
<div class="row" style="min-height: 600px;"> <tr>
<!-- Left col --> <th style="text-align:center">Quantity</th>
<div class="col-md-12"> <th style="text-align:center">Value &nbsp;(&#8377;)</th>
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border"> </tr>
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Cumulative Year-Category-Wise</b>(<i> </thead>
<?php <tbody>
if (date('m') >= 4) { <?php if (!empty($cum_year)) {
$yearl = date('Y').'-'.(date('Y')+1); $tqt = 0;
} else { $tvt = 0;
$yearl = (date('Y')-1).'-'.date('Y');
} if (date('m') >= 4) {
echo $yearl; $yearl = date('Y') . '-' . (date('Y') + 1);
?> } else {
</i>)</p></h3></center> $yearl = (date('Y') - 1) . '-' . date('Y');
</div> }
<!-- /.box-header --> $ab = $yearl;
foreach ($cum_year as $rel) {
<div class="box-body"> ?>
<div> <tr>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> <td><span><?php echo $rel->category; ?></span></td>
<thead> <td><span>
<tr> <a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&mid=<?php echo $rel->mid; ?>&cat=<?php echo $rel->category; ?>"><?php echo $rel->supplier_name; ?></a>
<?php </span></td>
if (date('m') >= 4) { <td><span><?php echo $rel->material_name; ?></span></td>
$yearl = date('Y').'-'.(date('Y')+1); <td style="text-align:right"><span><?php
} else { $tqt = $tqt + round($rel->tquantity);
$yearl = (date('Y')-1).'-'.date('Y'); echo round($rel->tquantity); ?></span></td>
} <td style="text-align:right"><span><?php
$ab=$yearl; $tvt = $tvt + number_format($rel->ttotal, 2, '.', '');
?> echo number_format($rel->ttotal, 2, '.', ''); ?></span></td>
<th style="text-align:center" rowspan="2">Category</th>
<th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th> </tr>
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th> <?php
</tr> }
<tr>
<th style="text-align:center">Quantity</th> ?>
<th style="text-align:center">Value &nbsp;( &#8377; )</th> </tbody>
<tfoot width="100%">
<tr>
</tr> <td style="text-align:center;"><strong>Total</strong></td>
</thead>
<tbody> <td style="text-align:right"><strong>
<?php if(!empty($cum_year)){ <?php {
$tqt=0; echo '';
$tvt=0; }
?>
if (date('m') >= 4) { </strong>
$yearl = date('Y').'-'.(date('Y')+1); </td>
} else { <td style="text-align:right">
$yearl = (date('Y')-1).'-'.date('Y'); <strong>
} <?php {
$ab=$yearl; echo '';
foreach($cum_year as $rel) }
{ ?>
?> </strong>
<tr> </td>
<td><span><?php echo $rel->category;?></span></td> <td style="text-align:right">
<td><span> <strong>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a> <?php {
</span></td> echo $tqt;
<td><span><?php echo $rel->material_name;?></span></td> }
<td style="text-align:right"><span><?php ?>
$tqt= $tqt + round($rel->tquantity); </strong>
echo round($rel->tquantity);?></span></td> </td>
<td style="text-align:right"><span><?php <td style="text-align:right">
$tvt= $tvt + number_format($rel->ttotal,2,'.',''); <strong>
echo number_format($rel->ttotal,2,'.','');?></span></td> <?php {
echo number_format($tvt, 2, '.', '');
}
</tr> ?>
<?php </strong>
} </td>
?>
</tbody>
<tfoot width="100%"> </tr>
<tr>
<td style="text-align:center;"><strong>Total</strong></td> </tfoot>
<?php
<td style="text-align:right"><strong> }
<?php
{ ?>
echo ''; </table>
}
?>
</strong> </div>
</td> </div> <!-- end card body-->
<td style="text-align:right"> </div> <!-- end card -->
<strong> </div><!-- end col-->
<?php
{
echo '';
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> $.fn.dataTable.moment('DD-MM-YYYY');
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> // Initialize the DataTable
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> var table = $('#cc').DataTable({
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> buttons: [
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> 'excel' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
});
});
</script>
<script>
// "footerCallback": function ( row, data, start, end, display ) {
// var api = this.api(), data;
<script> // // Remove the formatting to get integer data for summation
// var intVal = function ( i ) {
// return typeof i === 'string' ?
// parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
// typeof i === 'number' ?
// parseFloat(i) : 0;
// };
// Bootstrap datepicker // TotalQTY = api
// Set up your table // .column( 2, { search:'applied' } )
$(document).ready(function() { // .data()
table = $('#cc').DataTable( { // .reduce( function (a, b) {
"language": { // return intVal(a) + intVal(b);
"emptyTable":"<center> Data Not Found ! </center>" // }, 0 );
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api // $( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalQTY.toFixed().bold() ); // TotalVALUE = api
// .column( 3, { search:'applied' } )
TotalVALUE = api // .data()
.column( 4, { search:'applied' } ) // .reduce( function (a, b) {
.data() // return intVal(a) + intVal(b);
.reduce( function (a, b) { // }, 0 );
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
} // $( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
} ); </script>
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -1,252 +1,190 @@
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <!-- Report_month_wise_inward.php -->
<style> <style>
.dataTables_filter input { table {
padding: 4px; width: auto;
}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #00d976;
;
border-color: #00d976;
;
} }
</style> </style>
<div class="content-wrapper">
<section class="content">
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center>
<h3 class="box-title">
<p style="color: #00d976;"><b>Report - Month-wise-Inward(<?php echo $mont; ?>)</b></p>
</h3>
</center>
</div>
<!-- /.box-header -->
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Material Name</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Total Value &nbsp;(&#8377;)</th>
<div class="content-page">
</tr> <div class="content">
</thead> <!-- Start Content-->
<tbody> <div class="container-fluid">
<?php if (!empty($month)) { <!-- start page title -->
$tr3 = 0; <div>
$tr4 = 0; <div class="row">
$ab = $this->input->get('ab'); <div class="col-12">
$last = $this->input->get('dat'); <div class="page-title-box page-title-box-alt">
$new = date("F", strtotime($last)) . "\n"; <div class="page-title-right">
foreach ($month as $rel) { <ol class="breadcrumb m-0">
?> <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<tr> <li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<td><span> <li class="breadcrumb-item active">
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&ab=<?php echo $ab; ?>&m=<?php echo $new; ?>"><?php echo $rel->supplier_name; ?></a> <h4 class="page-title"><b> Month-wise ( <?php echo $mont; ?> )
</span></td> </b></h4>
<td><span><?php echo $rel->material_name; ?></span></td> </li>
<td style="text-align:right"><span><?php </ol>
$tr3 = $tr3 + round($rel->quantity); </div>
echo round($rel->quantity); ?></span></td>
<td style="text-align:right"><span><?php
$tr4 = $tr4 + number_format($rel->total, 2, '.', '');
echo number_format($rel->total, 2, '.', ''); ?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;">
<strong><?php echo 'Total'; ?></strong>
</td>
<td style="text-align:center;">
<?php echo ''; ?>
</td>
<td style="text-align:right">
<strong>
<?php {
echo round($tr3);
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo number_format($tr4, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div> </div>
</div> </div>
<!-- /.box --> <div class="row">
<div class="col-12">
<div class="card">
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Material Name</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Total Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if (!empty($month)) {
$tr3 = 0;
$tr4 = 0;
$ab = isset($_GET['ab']) ? $_GET['ab'] : '';
$last = isset($_GET['dat']) ? $_GET['dat'] : '';
$new = date("F", strtotime($last)) . "\n";
foreach ($month as $rel) {
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&ab=<?php echo $ab; ?>&m=<?php echo $new; ?>"><?php echo $rel->supplier_name; ?></a>
</span></td>
<td><span><?php echo $rel->material_name; ?></span></td>
<td style="text-align:right"><span><?php
$tr3 = $tr3 + round($rel->quantity);
echo round($rel->quantity); ?></span></td>
<td style="text-align:right"><span><?php
$tr4 = $tr4 + number_format($rel->total, 2, '.', '');
echo number_format($rel->total, 2, '.', ''); ?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;">
<strong><?php echo 'Total'; ?></strong>
</td>
<td style="text-align:center;">
<?php echo ''; ?>
</td>
<td style="text-align:right">
<strong>
<?php {
echo round($tr3);
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo number_format($tr4, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> </div>
<!-- /.col --> </div> <!-- container -->
</div> </div> <!-- content -->
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
// Bootstrap datepicker <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
// Set up your table <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
$(document).ready(function() { <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
table = $('#cc').DataTable({ <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
"language": { <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
"emptyTable": "<center> Data Not Found ! </center>" <script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
}, <script>
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + $(document).ready(function() {
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{ $.fn.dataTable.moment('DD-MM-YYYY');
extend: 'excelHtml5', // Initialize the DataTable
footer: 'true', var table = $('#cc').DataTable({
//messageTop: $('h3').text(), dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
title: $('h3').text(), buttons: [
exportOptions: { 'excel' // Export buttons
columns: ':visible' ],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
});
});
} $(function() {
}, //var dateFormat = "mm/dd/yy",
from = $("#min-date")
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
'colvis' })
], .on("change", function() {
, to.datepicker("option", "minDate", getDate(this));
"footerCallback": function(row, data, start, end, display) { }),
var api = this.api(), to = $("#max-date").datepicker({
data; dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
// Remove the formatting to get integer data for summation })
var intVal = function(i) { .on("change", function() {
return typeof i === 'string' ? from.datepicker("option", "maxDate", getDate(this));
parseFloat(i.replace(/[^0.00-9.00]+/g, "") * 1) : });
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api function getDate(element) {
.column(2, { var date;
search: 'applied'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(2).footer()).html(TotalQTY.toFixed().bold()); try {
date = $.datepicker.parseDate(dateFormat, element.value);
TotalVALUE = api } catch (error) {
.column(3, { date = null;
search: 'applied' }
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(3).footer()).html(TotalVALUE.toFixed(2).bold());
return date;
} }
}); });
}); </script>
$('#mySelect').on('change', function() {
table
.column(4)
.search(this.value)
.draw();
});
$(function() {
//var dateFormat = "mm/dd/yy",
from = $("#min-date")
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on("change", function() {
to.datepicker("option", "minDate", getDate(this));
}),
to = $("#max-date").datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on("change", function() {
from.datepicker("option", "maxDate", getDate(this));
});
function getDate(element) {
var date;
try {
date = $.datepicker.parseDate(dateFormat, element.value);
} catch (error) {
date = null;
}
return date;
}
});
function Reset() {
$('#mySelect').val('');
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,420 +1,314 @@
<!-- Report_supplier_inward.php -->
<script> <script>
$(document).ready(function () { $(document).ready(function() {
$("#financialyear").select2();
$("#client_name").select2(); $("#month").select2();
$("#client_name").select2();
});
});
</script> </script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
</style>
<div class="content-wrapper">
<section class="content">
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Supplier-Inward</b><br><br>
<?php
if($this->input->post('client_name')){
$cl=$this->input->post('client_name');
echo $cl;
echo ' '.' ';
}
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
echo ' ';
}
if($this->input->post('month')){
$m=$this->input->post('month');
echo '('.$m.')';
echo ' ';
}
if($this->input->post('from_date') && $this->input->post('to_date')){
$frm = $this->input->post('from_date');
$t = $this->input->post('to_date');
echo $frm.'to'.$t;
}
?></p></h3></center>
</div>
<!-- /.box-header -->
<div class="panel-body">
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>"> <div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b>Supplier-Wise
</b></h4>
</li>
</ol>
</div>
<div class="form-group has-feedback">
<div class="col-md-2">
<label for="client_name">
<?php echo 'Supplier'; ?><span style="color:red;">* </span>
</label>
<div class="input-group">
<select class="form-control" id="client_name" name="client_name" required="true">
<option value="">Select Supplier</option>
<?php
foreach($cust as $item):
{?>
<option value="<?php echo $item->SupplierName;?>"><?php echo $item->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'Year'; ?>
</label>
<div class="input-group">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($finyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'Month'; ?>
</label>
<div class="input-group">
<select class="form-control" id="month" name="month">
<option value="">Select Month</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
</div>
</div>
<div class="col-md-2">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div> </div>
<div class="col-md-2 " ><br> </div>
<input type="submit" class="btn btn-success" name="btn_submit" </div>
value="View Report"> <div class="row">
<div class="col-12">
</div> <div class="card">
</div> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
</form>
<div class="card-body">
<form method="post" action="<?php echo base_url('Report_supplier_inward'); ?>">
</div>
<div class="form-group has-feedback">
<div class="row">
<div class="col-4">
<div class="box-body"> <label for="client_name">
<div> <?php echo 'Supplier'; ?><span style="color:red;">* </span>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </label>
<thead> <select class="form-control" id="client_name" name="client_name">
<tr> <option value="">Select Supplier</option>
<th style="text-align:center">Supplier Name</th> <?php
<th style="text-align:center">PO Count</th> foreach ($cust as $item): { ?>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th> <option
<?php if (isset($client_name) && ($client_name == $item->SupplierName)) {
echo 'selected';
</tr> } ?>
</thead> value="<?php echo $item->SupplierName; ?>"><?php echo $item->SupplierName; ?></option>
<tbody>
<?php if(!empty($spurchse)){
$tot_rate = 0; <?php }
$tot_qty = 0; endforeach; ?>
$tot_value = 0;
$tot_tot = 0; </select>
$ab=$this->input->post('financialyear'); </div>
$month=$this->input->post('month'); <div class="col-4">
$frm = $this->input->post('from_date'); <label for="to_date">
$t = $this->input->post('to_date'); <?php echo 'Year'; ?>
foreach($spurchse as $rel) </label>
{ <select class="form-control" id="financialyear" name="financialyear">
?> <option value="">Select Year</option>
<tr> <?php
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><?php echo $rel->supplier_name;?></a>
</span></td> foreach ($finyear as $item): { ?>
<td style="text-align:right"><span><?php
$tot_rate= $tot_rate + round($rel->counts); <option value="<?php echo $item->financial_year; ?>" <?php if (isset($financialyear) && ($financialyear == $item->financial_year)) {
echo round($rel->counts);?></span></td> echo 'selected';
<td style="text-align:right"><span><?php } ?>><?php echo $item->financial_year; ?></option>
$tot_qty= $tot_qty + round($rel->quantity);
echo round($rel->quantity);?></span></td>
<td style="text-align:right"><span><?php <?php }
$tot_value= $tot_value + $rel->value; endforeach; ?>
echo number_format($rel->value,2,'.','');?></span></td> </select>
</div>
<div class="col-4">
<label for="to_date">
<?php echo 'Month'; ?>
</tr> </label>
<?php
} <select class="form-control" id="month" name="month">
<option value="">Select Month</option>
?> <option value="January" <?php if (isset($month) && ($month == "January")) {
</tbody> echo 'selected';
<tfoot width="100%"> } ?>>January</option>
<tr> <option value="February" <?php if (isset($month) && ($month == "February")) {
<td style="text-align:center;"><strong>Total</strong></td> echo 'selected';
} ?>>February</option>
<td class="amount" style="text-align:right"><strong> <option value="March" <?php if (isset($month) && ($month == "March")) {
<?php echo 'selected';
{ } ?>>March</option>
echo $tot_rate; <option value="April" <?php if (isset($month) && ($month == "April")) {
echo 'selected';
} } ?>>April</option>
?> <option value="May" <?php if (isset($month) && ($month == "May")) {
</strong> echo 'selected';
</td> } ?>>May</option>
<option value="June" <?php if (isset($month) && ($month == "June")) {
<td class="amount" style="text-align:right"> echo 'selected';
<strong> } ?>>June</option>
<?php <option value="July" <?php if (isset($month) && ($month == "July")) {
{ echo 'selected';
echo $tot_qty; } ?>>July</option>
<option value="August" <?php if (isset($month) && ($month == "August")) {
} echo 'selected';
?> } ?>>August</option>
</strong> <option value="September" <?php if (isset($month) && ($month == "September")) {
</td> echo 'selected';
<td class="amount" style="text-align:right"> } ?>>September</option>
<strong> <option value="October" <?php if (isset($month) && ($month == "October")) {
<?php echo 'selected';
{ } ?>>October</option>
echo number_format($tot_value,2,'.',''); <option value="November" <?php if (isset($month) && ($month == "November")) {
echo 'selected';
} } ?>>November</option>
?> <option value="December" <?php if (isset($month) && ($month == "December")) {
</strong> echo 'selected';
</td> } ?>>December</option>
</select>
</div>
</tr> </div>
</tfoot>
<?php <div class="row mt-2">
} <div class="col-2">
<label for="from_date">
?> <?php echo 'From Date'; ?>
</table> </label>
<input name="from_date" id="max-date" class="form-control datepicker" autocomplete="off" value="<?php if (isset($from_date)) {
echo $from_date;
} ?>">
</div>
<div class="col-2">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<input name="to_date" id="min-date" class="form-control datepicker" autocomplete="off" value="<?php if (isset($to_date)) {
echo $to_date;
} ?>">
</div>
<div class="col-8 mt-2 text-right">
<input type="button" class="btn btn-danger m-2" value="Reset" onclick="window.location.href='<?= base_url('Report_supplier_inward') ?>';">
<input type="submit" class="btn btn-success m-2" name="btn_submit" value="View Report">
</div>
</div>
</div>
</form>
<div class="table-responsive">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">PO Count</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if (!empty($spurchse)) {
$tot_rate = 0;
$tot_qty = 0;
$tot_value = 0;
$tot_tot = 0;
$ab = $financialyear;
$month = $month;
$frm = $frm;
$t = $t;
foreach ($spurchse as $rel) {
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&month=<?php echo $month; ?>&frm=<?php echo $frm; ?>&t=<?php echo $t; ?>"><?php echo $rel->supplier_name; ?></a>
</span></td>
<td style="text-align:right"><span><?php
$tot_rate = $tot_rate + round($rel->counts);
echo round($rel->counts); ?></span></td>
<td style="text-align:right"><span><?php
$tot_qty = $tot_qty + round($rel->quantity);
echo round($rel->quantity); ?></span></td>
<td style="text-align:right"><span><?php
$tot_value = $tot_value + $rel->value;
echo number_format($rel->value, 2, '.', ''); ?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td class="amount" style="text-align:right"><strong>
<?php {
echo $tot_rate;
}
?>
</strong>
</td>
<td class="amount" style="text-align:right">
<strong>
<?php {
echo $tot_qty;
}
?>
</strong>
</td>
<td class="amount" style="text-align:right">
<strong>
<?php {
echo number_format($tot_value, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#cc').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
table = $('#cc').DataTable( { buttons: [
"language": { 'excel' // Export buttons
"emptyTable": "<center> Data Not Found ! </center>" ],
}, pageLength: 10, // Default rows per page
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + lengthMenu: [
"<'row'<'col-md-6'><'col-md-6'>>" + [10, 20, 30, 50, -1],
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", [10, 20, 30, 50, "All"]
buttons: [ ], // Rows per page options
responsive: true, // Responsive table
{ ordering: false,
extend: 'excelHtml5', language: {
footer: 'true', paginate: {
//messageTop: $('h3').text(), next: '<i class="fas fa-angle-right"></i>', // Next button icon
title: $('h3').text(), previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
exportOptions: { },
columns: ':visible' emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalPOCount = api
.column( 1, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 1 ).footer() ).html( TotalPOCount.toFixed().bold() );
TotalQTY = api
.column( 2, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
} }
});
return date; });
} </script>
} );
function Reset()
{
$('#mySelect').val('');
}
</script>

View File

@ -1,404 +1,257 @@
<!-- Report_supplier_summary.php -->
<script> <script>
$(document).ready(function () { $(document).ready(function() {
$("#client_name").select2();
$("#client_name").select2(); $("#financialyear").select2();
$("#month").select2();
});
});
</script> </script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
</style>
<div class="content-wrapper">
<section class="content"><br/>
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Supplier_Summary</b><br><br>
<?php
if($this->input->post('client_name')){
$cl=$this->input->post('client_name');
echo $cl;
echo ' '.' ';
}
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
echo ' ';
}
if($this->input->post('month')){
$m=$this->input->post('month');
echo '('.$m.')';
echo ' ';
}
if($this->input->post('from_date') && $this->input->post('to_date')){
$frm = $this->input->post('from_date');
$t = $this->input->post('to_date');
echo $frm.'to'.$t;
}
?></p></h3></center>
</div>
<!-- /.box-header -->
<div class="panel-body">
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>"> <div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);"> Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Inward Summary
</b></h4>
</li>
</ol>
</div>
<div class="form-group has-feedback">
<!-- <div class="col-md-2">
<label for="client_name">
<?php echo 'Supplier'; ?><span style="color:red;"> </span>
</label>
<div class="input-group">
<select class="form-control" id="client_name" name="client_name" >
<option value="">Select Supplier</option>
<?php
foreach($cust as $item):
{?>
<option value="<?php echo $item->SupplierName;?>"><?php echo $item->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div> -->
<div class="col-md-2">
<label for="to_date">
<?php echo 'Year'; ?>
</label>
<div class="input-group">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($finyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'Month'; ?>
</label>
<div class="input-group">
<select class="form-control" id="month" name="month">
<option value="">Select Month</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
</div>
</div>
<div class="col-md-2">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div> </div>
<div class="col-md-2 " ><br> </div>
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</form>
</div>
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if(!empty($spurchse)){
$tot_rate = 0;
$tot_qty = 0;
$tot_value = 0;
$tot_tot = 0;
$ab=$this->input->post('financialyear');
$month=$this->input->post('month');
$frm = $this->input->post('from_date');
$t = $this->input->post('to_date');
foreach($spurchse as $rel)
{
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchasesummary?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><?php echo $rel->supplier_name;?></a>
</span></td>
<td style="text-align:right"><span><?php
$tot_qty= $tot_qty + round($rel->quantity);
echo round($rel->quantity);?></span></td>
<td style="text-align:right"><span><?php
$tot_value= $tot_value + $rel->value;
echo number_format($rel->value,2,'.','');?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo $tot_qty;
}
?>
</strong>
</td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_value,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div> </div>
</div> <div class="row">
<div class="col-12">
<div class="card">
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<div class="card-body">
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<div class="form-group has-feedback">
<div class="col-md-2">
<label for="to_date">
<?php echo 'Year'; ?>
</label>
<div class="input-group">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach ($finyear as $item): { ?>
<option value="<?php echo $item->financial_year; ?>"><?php echo $item->financial_year; ?></option>
<?php }
endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'Month'; ?>
</label>
<div class="input-group">
<select class="form-control" id="month" name="month">
<option value="">Select Month</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
</div>
</div>
<div class="col-md-2">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-2 "><br>
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</div>
</form>
<div class="table-responsive">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if (!empty($spurchse)) {
$tot_rate = 0;
$tot_qty = 0;
$tot_value = 0;
$tot_tot = 0;
$ab = $this->input->post('financialyear');
$month = $this->input->post('month');
$frm = $this->input->post('from_date');
$t = $this->input->post('to_date');
foreach ($spurchse as $rel) {
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchasesummary?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&month=<?php echo $month; ?>&frm=<?php echo $frm; ?>&t=<?php echo $t; ?>"><?php echo $rel->supplier_name; ?></a>
</span></td>
<td style="text-align:right"><span><?php
$tot_qty = $tot_qty + round($rel->quantity);
echo round($rel->quantity); ?></span></td>
<td style="text-align:right"><span><?php
$tot_value = $tot_value + $rel->value;
echo number_format($rel->value, 2, '.', ''); ?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php {
echo $tot_qty;
}
?>
</strong>
</td>
<td class="amount" style="text-align:right">
<strong>
<?php {
echo number_format($tot_value, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
<!-- /.box --> </div>
</div> </div> <!-- container -->
<!-- /.col --> </div> <!-- content -->
</div> </div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script> <script>
// Bootstrap datepicker
// Set up your table
// Bootstrap datepicker $(document).ready(function() {
// Set up your table
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable": "<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
// Initialize the DataTable
TotalQTY = api var table = $('#cc').DataTable({
.column( 1, { search:'applied' } ) dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
.data() buttons: [
.reduce( function (a, b) { 'excel' // Export buttons
return intVal(a) + intVal(b); ],
}, 0 ); pageLength: 10, // Default rows per page
lengthMenu: [
$( api.column( 1 ).footer() ).html( TotalQTY.toFixed().bold() ); [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
TotalVALUE = api ], // Rows per page options
.column( 2, { search:'applied' } ) responsive: true, // Responsive table
.data() ordering: false,
.reduce( function (a, b) { language: {
return intVal(a) + intVal(b); paginate: {
}, 0 ); next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
$( api.column( 2 ).footer() ).html( TotalVALUE.toFixed(2).bold() ); },
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(3)
.search(this.value)
.draw();
});
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
} }
});
return date; });
} </script>
} );
function Reset()
{
$('#mySelect').val('');
}
</script>

View File

@ -1,179 +1,178 @@
<!-- Report_year_wise_inward.php -->
<script>
$(document).ready(function() {
$("#client_name").select2();
$("#financialyear").select2();
$("#month").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
<div class="content-page">
</style> <div class="content">
<div class="content-wrapper"> <!-- Start Content-->
<section class="content"> <div class="container-fluid">
<div class="row" style="min-height: 600px;"> <!-- start page title -->
<!-- Left col --> <div>
<div class="col-md-12"> <div class="row">
<!-- TABLE: LATEST ORDERS --> <div class="col-12">
<div class="box box-info"> <div class="page-title-box page-title-box-alt">
<div class="box-header with-border"> <div class="page-title-right">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Year-Wise-Inward</b><br><br> <ol class="breadcrumb m-0">
<?php <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
if($this->input->post('financialyear')){ <li class="breadcrumb-item active">
$ab=$this->input->post('financialyear'); <h4 class="page-title"><b> Year-Wise
echo '('.$ab.')'; </b></h4>
echo ' '; </li>
</ol>
} </div>
?></p></h3></center> </div>
</div>
<!-- /.box-header -->
<div class="col-xs-12 col-md-6 col-md-offset-3">
<center>
<div class="panel-body">
<form method="post" action=" ">
<div class="col-md-8">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($finyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select></div>
<div class="col-md-2">
<input type="submit" class="btn btn-success" id="year" name="btn_submit"
value="View Report"></div>
</form>
</div>
</center>
</div>
<?php
if(!empty($year)){
?>
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Month-Year</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Total Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php
$tr3=0;
$tr4=00;
foreach($year as $rel)
{
?>
<tr>
<td style="text-align:center"><span>
<?php
$da = strtotime($rel->materialrcvddate);
$new = date('M-y', $da);
$pass = date('Y-m-d',$da);
$ab=$this->input->post('financialyear');
//echo $rel->CreatedDate;
?>
<a href="<?= base_url() ?>report/imonth_wise?ab=<?php echo $ab;?>&dat=<?php echo $pass;?>"><?php echo $new;?></a>
</span></td>
<td style="text-align:right"><span><?php
$tr3= $tr3 + $rel->quantity;
echo round($rel->quantity);?></span></td>
<td style="text-align:right"><span><?php
$tr4= $tr4 + number_format($rel->value,2,'.','');
echo number_format($rel->value,2,'.','');?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong><?php
$ab=$this->input->post('financialyear');
$Total="Total";
echo anchor('report/iyear_wise_total/' . $ab,$Total); ?></strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo round($tr3);
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tr4,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<?php
}
?>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
</div> </div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<div class="card-body">
<form method="post" action="<?php echo base_url('Report_year_wise_inward'); ?>">
<div class="row">
<div class="col-4">
<label for="financialyear">
<?php echo 'Year'; ?>
</label>
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach ($finyear as $item): { ?>
<option value="<?php echo $item->financial_year; ?>" <?php if (isset($financialyear) && ($financialyear == $item->financial_year)) {
echo 'selected';
} ?>><?php echo $item->financial_year; ?></option>
<?php }
endforeach; ?>
</select>
</div>
<div class="col-8 text-right">
<input type="button" class="btn btn-danger" value="Reset" onclick="window.location.href='<?= base_url('Report_year_wise_inward') ?>';">
<input type="submit" class="btn btn-success ml-2" name="btn_submit" value="View Report">
</div>
</div>
</form>
<div class="form-group has-feedback"></div>
<div class="table-responsive">
<table class="table table-bordered table-hover" id="cc">
<thead>
<tr>
<th style="text-align:center">Month-Year</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Total Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php
$tr3 = 0;
$tr4 = 00;
if (!empty($year)) {
foreach ($year as $rel) {
?>
<tr>
<td style="text-align:center"><span>
<?php
$da = strtotime($rel->materialrcvddate);
$new = date('M-y', $da);
$pass = date('Y-m-d', $da);
$ab = $financialyear;
//echo $rel->CreatedDate;
?>
<a href="<?= base_url() ?>report/imonth_wise?ab=<?php echo $ab; ?>&dat=<?php echo $pass; ?>"><?php echo $new; ?></a>
</span></td>
<td style="text-align:right"><span><?php
$tr3 = $tr3 + $rel->quantity;
echo round($rel->quantity); ?></span></td>
<td style="text-align:right"><span><?php
$tr4 = $tr4 + number_format($rel->value, 2, '.', '');
echo number_format($rel->value, 2, '.', ''); ?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<?php if (!empty($year)) { ?>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong><?php
$ab = isset($financialyear) ? $financialyear : '';
$Total = "Total";
echo anchor('report/iyear_wise_total/' . $ab, $Total); ?></strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo round($tr3);
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo number_format($tr4, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php } ?>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -182,95 +181,44 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
"date-range-pre": function(a) {
var monthArr = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
return monthArr.indexOf(a);
},
"date-range-asc": function(a, b) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"date-range-desc": function(a, b) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
});
<script> $(document).ready(function() {
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"date-range-pre": function ( a ) {
var monthArr = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
return monthArr.indexOf(a);
},
"date-range-asc": function ( a, b ) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"date-range-desc": function ( a, b ) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
} );
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable":"<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
columnDefs: [
{ type: 'date-range', targets: 0 }
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api $.fn.dataTable.moment('DD-MM-YYYY');
.column( 1, { search:'applied' } ) // Initialize the DataTable
.data() var table = $('#cc').DataTable({
.reduce( function (a, b) { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
return intVal(a) + intVal(b); buttons: [
}, 0 ); 'excel' // Export buttons
],
$( api.column( 1 ).footer() ).html( TotalQTY.toFixed().bold() ); pageLength: 10, // Default rows per page
lengthMenu: [
TotalVALUE = api [10, 20, 30, 50, -1],
.column( 2, { search:'applied' } ) [10, 20, 30, 50, "All"]
.data() ], // Rows per page options
.reduce( function (a, b) { responsive: true, // Responsive table
return intVal(a) + intVal(b); ordering: false,
}, 0 ); language: {
paginate: {
$( api.column( 2 ).footer() ).html( TotalVALUE.toFixed(2).bold() ); next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
} },
} ); emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
} ); }
$('#mySelect').on('change',function(){ });
});
table </script>
.column(4)
.search(this.value)
.draw();
});
function Reset()
{
$('#mySelect').val('');
}
</script>

View File

@ -1,130 +1,130 @@
<!-- Report_year_wise_total_inward.php -->
<script>
$(document).ready(function() {
$("#client_name").select2();
$("#financialyear").select2();
$("#month").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
<div class="content-page">
</style> <div class="content">
<div class="content-wrapper"> <!-- Start Content-->
<section class="content"> <div class="container-fluid">
<div class="row" style="min-height: 600px;"> <!-- start page title -->
<!-- Left col --> <div>
<div class="col-md-12"> <div class="row">
<!-- TABLE: LATEST ORDERS --> <div class="col-12">
<div class="box box-info"> <div class="page-title-box page-title-box-alt">
<div class="box-header with-border"> <div class="page-title-right">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Report - Year-wise-Total(<?php echo $year; ?>)</b></p></h3></center> <ol class="breadcrumb m-0">
</div> <li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<!-- /.box-header --> <li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<div class="box-body"> <li class="breadcrumb-item active">
<div> <h4 class="page-title"><b> Year-wise-Total ( <?php echo $year; ?> )
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> </b></h4>
<thead> </li>
<tr> </ol>
<th style="text-align:center">Supplier Name</th> </div>
<th style="text-align:center">Material Name</th> </div>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Total Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if(!empty($ytotal)){
$tr3=0;
$tr4=0;
$last = $this->uri->total_segments();
$ab=$this->uri->segment($last);
foreach($ytotal as $rel)
{
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>"><?php echo $rel->supplier_name;?></a>
</span></td>
<td><span><?php echo $rel->material_name;?></span></td>
<td style="text-align:right"><span><?php
$tr3= $tr3 + round($rel->quantity);
echo round($rel->quantity);?></span></td>
<td style="text-align:right"><span><?php
$tr4= $tr4 + number_format($rel->total,2,'.','');
echo number_format($rel->total,2,'.','');?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;">
<strong><?php echo 'Total'; ?></strong>
</td>
<td style="text-align:center;">
<?php echo ''; ?>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo round($tr3);
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tr4,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
</div> </div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Material Name</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Total Value &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if (!empty($ytotal)) {
$tr3 = 0;
$tr4 = 0;
$ab = $year;
foreach ($ytotal as $rel) {
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&ab=<?php echo $ab; ?>"><?php echo $rel->supplier_name; ?></a>
</span></td>
<td><span><?php echo $rel->material_name; ?></span></td>
<td style="text-align:right"><span><?php
$tr3 = $tr3 + round($rel->quantity);
echo round($rel->quantity); ?></span></td>
<td style="text-align:right"><span><?php
$tr4 = $tr4 + number_format($rel->total, 2, '.', '');
echo number_format($rel->total, 2, '.', ''); ?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;">
<strong><?php echo 'Total'; ?></strong>
</td>
<td style="text-align:center;">
<?php echo ''; ?>
</td>
<td style="text-align:right">
<strong>
<?php {
echo round($tr3);
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php {
echo number_format($tr4, 2, '.', '');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
@ -133,120 +133,82 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
"date-range-pre": function(a) {
var monthArr = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
return monthArr.indexOf(a);
},
"date-range-asc": function(a, b) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"date-range-desc": function(a, b) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
});
<script> $(function() {
//var dateFormat = "mm/dd/yy",
from = $("#min-date")
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable": "<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalQTY = api
.column( 2, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
TotalVALUE = api
.column( 3, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({ .datepicker({
dateFormat: "dd-mm-yy", dateFormat: "dd-mm-yy",
defaultDate: "+0d", defaultDate: "+0d",
changeMonth: true, changeMonth: true,
//numberOfMonths: 1 //numberOfMonths: 1
}) })
.on( "change", function() { .on("change", function() {
to.datepicker("option", "minDate", getDate( this ) ); to.datepicker("option", "minDate", getDate(this));
}), }),
to = $( "#max-date" ).datepicker({ to = $("#max-date").datepicker({
dateFormat: "dd-mm-yy", dateFormat: "dd-mm-yy",
defaultDate: "+0d", defaultDate: "+0d",
changeMonth: true, changeMonth: true,
//numberOfMonths: 1 //numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) { })
var date; .on("change", function() {
from.datepicker("option", "maxDate", getDate(this));
try { });
date = $.datepicker.parseDate( dateFormat, element.value );
function getDate(element) {
} catch( error ) { var date;
date = null;
try {
date = $.datepicker.parseDate(dateFormat, element.value);
} catch (error) {
date = null;
}
return date;
} }
});
return date; $(document).ready(function() {
}
} );
function Reset() $.fn.dataTable.moment('DD-MM-YYYY');
{ // Initialize the DataTable
$('#mySelect').val(''); var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
} buttons: [
'excel' // Export buttons
</script> ],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering: false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
},
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
}
});
});
</script>

View File

@ -1,379 +1,286 @@
<!-- deliver_perform.php -->
<script>
$(document).ready(function() {
$("#financialyear").select2();
$("#month").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
} <style>
.btn-success { table {
background-color: #00d976;; width: auto;
border-color: #00d976;; }
} </style>
.col-md-offset-1 {
margin-left: 2.333333%;
padding-top: 5px;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color: #00d976;"><b>Delivery Performance</b><br>
<?php
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
echo ' ';
}
if($this->input->post('month')){
$m=$this->input->post('month');
echo '('.$m.')';
echo ' ';
}
?>
</p></h3></center>
</div>
<!-- /.box-header -->
<div class="panel-body">
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>"> <div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Report</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Inward</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"><b> Delivery Performance
<?php echo isset($month) ? '(' . $month . ')' : ''; ?>
<?php echo isset($financialyear) ? '(' . $financialyear . ')' : ''; ?>
</b></h4>
</li>
</ol>
</div>
<div class="form-group has-feedback"> </div>
</div>
</div>
<div class="row">
<div class="col-md-2"> <div class="col-12">
<label for="to_date"> <div class="card">
<?php echo 'Year'; ?> <!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
</label>
<div class="input-group"> <div class="card-body">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option> <form method="post" action="<?php echo base_url("DeliveryPerformance"); ?>">
<?php <div class="form-group">
<div class="row">
foreach($fy as $item): <div class="col-3">
<label for="financialyear">
{?> <?php echo 'Year'; ?>
</label>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option> <select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
<?php } endforeach; ?>
</select> foreach ($fy as $item): { ?>
</div>
</div> <option value="<?php echo $item->financial_year; ?>" <?php if (isset($financialyear) && ($financialyear == $item->financial_year)) {
<div class="col-md-2"> echo 'selected';
<label for="to_date"> } ?>><?php echo $item->financial_year; ?></option>
<?php echo 'Month'; ?>
</label>
<div class="input-group"> <?php }
<select class="form-control" id="month" name="month"> endforeach; ?>
<option value="">Select Month</option> </select>
<option value="January">January</option> </div>
<option value="February">February</option>
<option value="March">March</option> <div class="col-3">
<option value="April">April</option> <label for="month">
<option value="May">May</option> <?php echo 'Month'; ?>
<option value="June">June</option> </label>
<option value="July">July</option>
<option value="August">August</option> <select class="form-control" id="month" name="month">
<option value="September">September</option> <option value="">Select Month</option>
<option value="October">October</option> <option value="January" <?php if (isset($month) && ($month == "January")) {
<option value="November">November</option> echo 'selected';
<option value="December">December</option> } ?>>January</option>
</select> <option value="February" <?php if (isset($month) && ($month == "February")) {
</div> echo 'selected';
} ?>>February</option>
<option value="March" <?php if (isset($month) && ($month == "March")) {
echo 'selected';
</div> } ?>>March</option>
<div class="col-md-2 col-md-offset-1"><br> <option value="April" <?php if (isset($month) && ($month == "April")) {
<input type="submit" class="btn btn-success" name="btn_submit" echo 'selected';
value="View Report"> } ?>>April</option>
<option value="May" <?php if (isset($month) && ($month == "May")) {
</div> echo 'selected';
} ?>>May</option>
</form> <option value="June" <?php if (isset($month) && ($month == "June")) {
echo 'selected';
} ?>>June</option>
<option value="July" <?php if (isset($month) && ($month == "July")) {
</div> echo 'selected';
</div> } ?>>July</option>
<div class="box-body"> <option value="August" <?php if (isset($month) && ($month == "August")) {
<div> echo 'selected';
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;"> } ?>>August</option>
<thead> <option value="September" <?php if (isset($month) && ($month == "September")) {
<tr> echo 'selected';
} ?>>September</option>
<option value="October" <?php if (isset($month) && ($month == "October")) {
<!-- <th>S.No</th> --> echo 'selected';
<th>OrderedDate</th> } ?>>October</option>
<th>DispatchDate</th> <option value="November" <?php if (isset($month) && ($month == "November")) {
<th>CustomerName</th> echo 'selected';
<th>InvoiceNumber</th> } ?>>November</option>
<th>OrderedQuantity</th> <option value="December" <?php if (isset($month) && ($month == "December")) {
<th>DispatchQuantity</th> echo 'selected';
<th>Rating</th> } ?>>December</option>
</select>
</tr>
</thead>
<tbody> </div>
<?php if(!empty($per)){
$tr1=0;
$tr2=0; <div class="col-md-6 text-right">
// $last = $this->uri->total_segments(); <input type="button" class="btn btn-danger m-2" value="Reset" onclick="window.location.href='<?= base_url('DeliveryPerformance') ?>';">
// $ab=$this->uri->segment($last);
$i=0;
foreach($per as $rel) <input type="submit" class="btn btn-success m-2" name="btn_submit" value="View Report">
{ </div>
?>
<tr> </div>
</div>
<!-- <td style="text-align:left;"><span><?php echo ++$i;?></span></td> --> <div class="form-group has-feedback">
<td ><?php
$itemdate=date("d-m-Y",strtotime($rel->invoice_date_created)); </div>
echo $itemdate;
?>
</td> </form>
<td ><?php <table id="cc" class="table table-bordered table-hover mb-0 nowrap w-100"
$invoicedate=date("d-m-Y",strtotime($rel->invoice_date_created)); style="background-color:#fff; font-size:12px;">
echo $invoicedate;
?>
</td>
<thead>
<td style="text-align:left;"><?php echo ($rel->client_name);?></td> <tr>
<td style="text-align:center;"><?php echo ($rel->invoice_number); ?></td>
<!-- <th>S.No</th> -->
<td class="amount" style="text-align:right;"><?php <th>OrderedDate</th>
$tr1= $tr1 + round($rel->qty); <th>DispatchDate</th>
echo number_format(round($rel->qty)); <th>CustomerName</th>
?></td> <th>InvoiceNumber</th>
<th>OrderedQuantity</th>
<td class="amount" style="text-align:right;"><?php <th>DispatchQuantity</th>
$tr2= $tr2 + round($rel->qty); <th>Rating</th>
echo number_format(round($rel->qty));
?></td> </tr>
</thead>
<tbody>
<?php if (!empty($per)) {
$tr1 = 0;
<td style="text-align:right;"><?php $tr2 = 0;
$OrderedQuantity= round($rel->qty); // $last = $this->uri->total_segments();
$DispatchQuantity= round($rel->qty); // $ab=$this->uri->segment($last);
$Rating =@($DispatchQuantity / $OrderedQuantity )*100; $i = 0;
foreach ($per as $rel) {
?>
echo number_format($Rating, 2, '.', ' ') ; ?></td> <tr>
</tr> <!-- <td style="text-align:left;"><span><?php echo ++$i; ?></span></td> -->
<?php <td><?php
} $itemdate = date("d-m-Y", strtotime($rel->invoice_date_created));
echo $itemdate;
?> ?>
</tbody> </td>
<tfoot width="100%"> <td><?php
$invoicedate = date("d-m-Y", strtotime($rel->invoice_date_created));
echo $invoicedate;
<td><strong>&nbsp</strong></td> ?>
<td><strong>&nbsp</strong></td> </td>
<td><strong>&nbsp</strong></td>
<td><strong>Total</strong></td> <td style="text-align:left;"><?php echo ($rel->client_name); ?></td>
<td><strong>&nbsp</strong></td> <td style="text-align:center;"><?php echo ($rel->invoice_number); ?></td>
<td class="amount" style="text-align:right"><strong>
<?php <td class="amount" style="text-align:right;"><?php
{ $tr1 = $tr1 + round($rel->qty);
echo $tr1; echo number_format(round($rel->qty));
?></td>
}
?> <td class="amount" style="text-align:right;"><?php
</strong> $tr2 = $tr2 + round($rel->qty);
</td> echo number_format(round($rel->qty));
<td class="amount" style="text-align:right"><strong> ?></td>
<?php
{
echo $tr2;
} <td style="text-align:right;"><?php
?> $OrderedQuantity = round($rel->qty);
</strong> $DispatchQuantity = round($rel->qty);
</td> $Rating = @($DispatchQuantity / $OrderedQuantity) * 100;
<td><strong>&nbsp</strong></td>
echo number_format($Rating, 2, '.', ' '); ?></td>
</tfoot>
<?php </tr>
} <?php
}
?>
</table> ?>
</tbody>
<tfoot width="100%">
<td><strong>&nbsp</strong></td>
<td><strong>&nbsp</strong></td>
<td><strong>&nbsp</strong></td>
<td><strong>Total</strong></td>
<td><strong>&nbsp</strong></td>
<td class="amount" style="text-align:right"><strong>
<?php {
echo $tr1;
}
?>
</strong>
</td>
<td class="amount" style="text-align:right"><strong>
<?php {
echo $tr2;
}
?>
</strong>
</td>
<td><strong>&nbsp</strong></td>
</tfoot>
<?php
}
?>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div>
</div> </div>
<!-- /.box --> </div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col --> </div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script> <script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
<script>
// Bootstrap datepicker // Initialize the DataTable
// Set up your table var table = $('#cc').DataTable({
$(document).ready(function() { dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
$.fn.dataTable.moment( 'DD-MM-YYYY' ); buttons: ['excel'],
table = $('#cc').DataTable( { pageLength: 10, // Default rows per page
"language": { lengthMenu: [
"emptyTable": "<center> Data Not Found ! </center>" [10, 20, 30, 50, -1],
}, [10, 20, 30, 50, "All"]
"aaSorting": [[ 1, "desc" ]], ], // Rows per page options
"autoWidth": false, responsive: true, // Responsive table
orderCellsTop: true, ordering: false,
language: {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + paginate: {
"<'row'<'col-md-6'><'col-md-6'>>" + next: '<i class="fas fa-angle-right"></i>', // Next button icon
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
buttons: [ }
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
],
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
parseFloat(i.replace(/[^0-9]+/g,"")*1) :
typeof i === 'number' ?
parseFloat(i) : 0;
};
TotalPOCount = api
.column( 5, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 5 ).footer() ).html( TotalPOCount.toFixed().bold() );
TotalQTY = api
.column( 6, { search:'applied' } )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
$( api.column( 6 ).footer() ).html( TotalQTY.toFixed().bold() );
}
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
} }
});
return date; });
} </script>
} );
function Reset()
{
$('#mySelect').val('');
}
</script>

View File

@ -229,7 +229,7 @@
<input type="text" class="form-control" id="no_of_days" name="no_of_days" readonly> <input type="text" class="form-control" id="no_of_days" name="no_of_days" readonly>
</div> </div>
</div><!--/. r o w 5 --> </div><!--/. r o w 5 -->
<div class="row mt-2 security-restricted labstaff-restricted stock-restricted"> <div class="row mt-2 auditor-restricted security-restricted labstaff-restricted stock-restricted">
<div class="col-md-2" style="text-align: end; align-content: center;"> <div class="col-md-2" style="text-align: end; align-content: center;">
<label class="form" for="status_val">Status</label> <label class="form" for="status_val">Status</label>
</div> </div>
@ -258,10 +258,10 @@
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal" <button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal"
value="Cancel">Cancel</button> value="Cancel">Cancel</button>
<span class="auditor-restricted labstaff-restricted security-restricted">
<button type="button" class="btn btn-info waves-effect waves-light tempClick" <button type="button" class="btn btn-info waves-effect waves-light tempClick"
id="tempClick">Submit</button> id="tempClick">Submit</button>
</span>
</div> </div>
</div><!-- /. m o d a l-c o n t e n t --> </div><!-- /. m o d a l-c o n t e n t -->
</div><!-- /.m o d a l-d i a l o g --> </div><!-- /.m o d a l-d i a l o g -->

View File

@ -17,7 +17,7 @@
</div> </div>
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a> <a class="btn btn-success auditor-restricted-btn" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a>
</div> </div>
</div> </div>
</div> </div>