December 28, 2016

Attendance Tracking System Consumerfed kozhikode it section


Online Attendance Monitoring System IT Section


          Created a robust G suite application for consumerfed regional office kozhikode (attendance monitoring system), which helps multiple users can mark their attendance simultaneously through a google form. The form is linked with a google spreadsheet where all the responses are saved which can be viewed in real time. The google spreadsheet is designed in such a way that the monitoring users can only view present day report. The attendance is mailed daily both as html and pdf format. Once in every month the google script will automatically back up the spreadsheet in google drive.

         The Google form and spreadsheet works only on javascript enabled web browsers.

         Maximum number of rows allowed is approximately 4 lakhs and the 250 sheets on google spreadsheet. Maximum of 15GB space is allowed in google drive.

contact number : 8281 8080 29, mail us




History

The project was initially developed in 2015 November for Regional office kozhikode Regional Manager then new features was added in 2016 September and application was very much active during that period, New features like consolidation, tracking, automatic error tracking etc were included.

Consumerfed I T Section

Google Form


A Google Form is a tool from google that allow you to collect the information in an easy way to a google spreadsheet

Tutorial

Google Form - UI through which end users enter the data

link to google form


Google Spreadsheet


Each and every information entered by employees is kept in spreadsheet , but the view is restricted to that day. Downloading the sheet helps you view all the data from starting

Tutorial


GOOGLE SPREADSHEETS
link to google spreadsheet


Google Script - Script Editor


GOOGLE SCRIPT CODE

How script Editor works


Go To Tools >> Script Editor in google spread sheet.

Select any function then click on run command. For example if you want to send an email with pdf, go to script editor, choose the function mailLeaveDetails() from the combo box, then click on run command. An email will be send to the mail described in the controller spreadsheet

SCRIPT EDITOR

Google script failure alert



E mail while script error

Google controller Spreadsheet


Google controller spread sheet act as a property value sheet where the admin can control all the attendance works like e mail address to which the mail should be send, the subject of the email, the footer etc. He can also stop the mail sending by giving property value as NO.

CONTROLLER SPREADSHEET
link to controller spreadsheet



Flow chart (context level)




DATA FLOW

Backup in google drive


Backup of spreadsheet is done automatically on first day of the month in office google drive.


BACKUP IN GOOGLE DRIVE

Emailing attendance information directly on google form submit


E-mail template for attendance


Smart monitoring of Cfed Attendance


Monitoring the attendance application using a third party smart apps let us know when the server is down and how long the server being down. Help us to identify the fake complaints

Cfed Attendance

Email information regarding the up and down time of attendance application


E mail while attendance apps is down

Google Spreadsheet attendance tracking system



Attendance Reporting google sheet

link to sheet


Automatic consolidation spreadsheet

         
           Google consolidation sheet will consolidate the entered attendance details automatically

Consolidation sheet

Link to google spreadsheet


Sample consolidation excel sheet


Automatic deletion of duplicate entries

         There is a script running on the background of the sheet that will track the duplicate entries on the particular day and automatically delete the first entered value. A separate sheet 'INFORMATIONS' is kept , where all details regarding such automatic operation summaries is kept.


Google script sample

Graphical representation of Attendance Status


Pie chart showing attendance percentage in our region

Pie chart showing branch attendance status


Pie chart showing employees attendance status



Download file here





Message Me Here


E-mail templates

List of employees who fails to mark attendance on the day


E mail to IT head informing the employees who fails to mark the attendances on that day

Employee list who forget to mark attendances

Daily consolidation E mail


Sending attendance status daily consolidated email to IT Head

email template
E mail Template


Direct Email


E mail directly to office mail who mark attendance after noon

E mail templates
Automatic update details

Attendance consolidation for salary 


sample consolidation report
link to video



Email Report to users





Attendance form created by Regional Office Kozhikode IT Section. +Consumerfed IT Division



☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺

CONSUMERFED KOZHIKODE WEBSITE

Issues and solutions



Download documentation

Kerala State Rule Leave Details

Thanks to +rasmi pramod , +Shimjith Kumar , +Vipin Cp for their valuable supports

Thanks to IT section Head office for Assigning this project

Today's Attendance Status





Google App Script Complete Tutorial

http://javabelazy.blogspot.in/

October 04, 2016

Attendance Tracking System online





Attendance Google Form




Source code


function consolidatingAttendance(){

  var attendanceSpreadSheet = SpreadsheetApp.openById("consumerfedAttendanceSheet");

  var attendanceSheet = attendanceSpreadSheet.getSheetByName("ATTENDANCE");
  var consolidationSheet = attendanceSpreadSheet.getSheetByName("CONSOLIDATION");

  var startRowAttendance = consolidationSheet.getRange("H1").getValue();
  var lastRowAttendance = attendanceSheet.getLastRow();
  var lastRowOfAttendanceArray = lastRowAttendance - startRowAttendance - 1;

  var branchListAS = attendanceSheet.getRange(startRowAttendance,2,lastRowOfAttendanceArray,1).getValues();
  var empListAS = attendanceSheet.getRange(startRowAttendance,3,lastRowOfAttendanceArray,1).getValues();
  var attndListAS = attendanceSheet.getRange(startRowAttendance,4,lastRowOfAttendanceArray,1).getValues();

  //Logger.log(branchListAS);
  var currentAttndRowPstn = startRowAttendance;

  //var branchListCS = consolidationSheet.getRange(1,1,consolidationSheet.getLastRow(),1).getValues();
 // Logger.log(branchListCS);

  //var branchListCS = consolidationSheet.getRange(1,1,consolidationSheet.getLastRow(),1).getValues();
  //var empListCS = consolidationSheet.getRange(1,2,consolidationSheet.getLastRow(),1).getValues();

  Logger.log( " Len :"+branchListAS.length);

  for(var rowCount = 0; rowCount < branchListAS.length; rowCount++){
    //Logger.log(currentAttndRowPstn+" , "+branchListAS[rowCount]+" , "+empListAS[rowCount]+" , "+attndListAS[rowCount]);
 
          var branchListCS = consolidationSheet.getRange(1,1,consolidationSheet.getLastRow(),1).getValues();
          var empListCS = consolidationSheet.getRange(1,2,consolidationSheet.getLastRow(),1).getValues();
       
          //Logger.log(" B :"+branchListCS[0]);
       
          var lastRowCS = consolidationSheet.getLastRow();
          var lastConsolidationRow = lastRowCS + 1;
       
          var branchNameAS = branchListAS[rowCount].toString();
          var employeeNameAS = empListAS[rowCount].toString();
          var attendanceTypeAS = attndListAS[rowCount].toString();  // present,onduty etc
       
       
          currentAttndRowPstn = currentAttndRowPstn + 1;
          consolidationSheet.getRange("H1").setValue(currentAttndRowPstn);
       
       
          var isInserted = 1;
       
          for(var rowCS = 0; rowCS < branchListCS.length; rowCS++){
       
                var attendanceType = attendanceTypeAS;
                var branchNameCS = branchListCS[rowCS].toString();
                var employeeNameCS = empListCS[rowCS].toString();
             
                var as = branchNameAS.concat(employeeNameAS);
                var cs = branchNameCS.concat(employeeNameCS);
             
                var value = as.localeCompare(cs);
             
                //Logger.log("v :"+value +"as :"+as +"cs :"+cs);
             
                if(value == 0){
               
                  var row = rowCS + 1;
                  var choose = attendanceType;
                  attendanceType = "";
               
                  //Logger.log(" A :"+attendanceType+" R :"+row );
               
                  switch(choose){
                         case "PRESENT":
                               value = consolidationSheet.getRange("C"+row).getValue();
                               consolidationSheet.getRange("C"+row).setValue(value+1);
                               consolidationSheet.getRange("I"+row).setValue(new Date());
                               attendanceType = "";
                              // Logger.log('----'+value);
                               break;
                        case "FULL DAY(L)":
                               value = consolidationSheet.getRange("D"+row).getValue();
                               consolidationSheet.getRange("D"+row).setValue(value+1);
                               consolidationSheet.getRange("I"+row).setValue(new Date());
                               attendanceType = "";
                               //Logger.log('----'+value);
                               break;
                        case "HALF DAY - MORNING(L)":
                               value = consolidationSheet.getRange("E"+row).getValue();
                               consolidationSheet.getRange("E"+row).setValue(value+1);
                               consolidationSheet.getRange("I"+row).setValue(new Date());
                               attendanceType = "";
                               //Logger.log('----'+value);
                                break;
                         case "HALF DAY - AFTER NOON(L)":
                               value = consolidationSheet.getRange("F"+row).getValue();
                               consolidationSheet.getRange("F"+row).setValue(value+1);
                               consolidationSheet.getRange("I"+row).setValue(new Date());
                               attendanceType = "";
                               //Logger.log('----'+value);
                                break;
                        case "ON DUTY":
                               value = consolidationSheet.getRange("G"+row).getValue();
                               consolidationSheet.getRange("G"+row).setValue(value+1);
                               consolidationSheet.getRange("I"+row).setValue(new Date());
                               attendanceType = "";
                               //Logger.log('----'+value);
                              break;
                        default:    
                             }
                     
                        isInserted = 0;
                        attendanceType = "";
                        branchNameAS = "";
                        employeeNameAS = "";
                     
                 
                      }
                   
                      else{
                     
                        if(attendanceType.length > 0) {
                     
                        var choose = attendanceType;
                        consolidationSheet.getRange("A"+lastConsolidationRow).setValue(branchNameAS);
                        consolidationSheet.getRange("B"+lastConsolidationRow).setValue(employeeNameAS);
                     
                        Logger.log(" Before switch : "+choose);
                     
                        switch(choose){
                       
                     
                        case "FULL DAY(L)":
                               consolidationSheet.getRange("D"+lastConsolidationRow).setValue(1);
                               consolidationSheet.getRange("C"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("E"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("F"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("G"+lastConsolidationRow).setValue(0);
                        break;
                        case "HALF DAY - MORNING(L)":
                               consolidationSheet.getRange("E"+lastConsolidationRow).setValue(1);
                               consolidationSheet.getRange("C"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("D"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("F"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("G"+lastConsolidationRow).setValue(0);
                        break;
                        case "HALF DAY - AFTER NOON(L)":
                               consolidationSheet.getRange("F"+lastConsolidationRow).setValue(1);
                               consolidationSheet.getRange("C"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("E"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("D"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("G"+lastConsolidationRow).setValue(0);
                        break;
                        case "ON DUTY":
                               consolidationSheet.getRange("G"+lastConsolidationRow).setValue(1);
                               consolidationSheet.getRange("C"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("E"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("F"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("D"+lastConsolidationRow).setValue(0);
                        break;
                        case "PRESENT":
                               consolidationSheet.getRange("C"+lastConsolidationRow).setValue(1);
                               consolidationSheet.getRange("D"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("E"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("F"+lastConsolidationRow).setValue(0);
                               consolidationSheet.getRange("G"+lastConsolidationRow).setValue(0);
                        break;
                        default :
                               Logger.log("test : "+attendanceType);
                               var values = [[ "0", "0", "0" , "0", "0"]];
                               consolidationSheet.getRange("C"+lastConsolidationRow+":G"+lastConsolidationRow).setValue(values);
                           
                        } //end switch
                     
                       }// if attendanceType
                     
                       // consolidationSheet.getRange("I"+lastConsolidationRow).setValue(new Date());
                     
                } //end if - else
             
                  //Logger.log(" R: "+rowCount+" isInserted "+isInserted );
           
   
           
          }
 
 
  }


  }



Link to attendance form


http://javabelazy.blogspot.in/

September 30, 2016

consumerfed sales application - കൺസ്യുമർഫെഡ് സെയ്ൽസ് അപ്ലിക്കേഷൻ

കൺസ്യുമർഫെഡ് സെയ്ൽസ് അപ്ലിക്കേഷൻ 


കൺസ്യുമർഫെഡ് കോഴിക്കോട് റീജിയണിന്റെ കീഴിൽ ഉള്ള ത്രിവേണി സ്റ്റോർ , ലിക്യുർ ഷോപ് , ഗോഡൗൺ എന്നിവടങ്ങളിലെ സെയ്ൽസ് തത്സമയം തന്നെ റീജിയണൽ ഓഫീസിനെ അറിയിക്കുവാനുള്ള സവിധാനമാണ് കൺസ്യുമർഫെഡ് സെയ്ൽസ് അപ്ലിക്കേഷൻ . ഇത് കൺസ്യൂമർഫെഡ് ഹെഡ് ഓഫീസ് നിർമിച്ചിരിക്കുന്ന സോഫ്റ്റ്‌വെയർ "ബീ ബീ " യിലെ സെയിൽസ് , ഡാറ്റ മിസ്സിംഗ് എന്നിവ യ്ക്ക്  ഉപയോഗിക്കുന്നു . 

മത്രമെല്ല സബ്സിഡി സമയങ്ങളിൽ സബ്‌സിഡി സെയിൽസ് , കസ്റ്റമർ ന്റെ എണ്ണം , ടോക്കൺ കൊടുത്ത ഡീറ്റെയിൽസ് എന്നിവ അറിയാൻ ഇതേ സഹായിക്കുന്നു .

ഇത് 2015 മാർച്ച് മാസത്തിൽ ആണ് നിർമിച്ചത് . ബീ ബീ സെർവർ അന്ന് ഡൗൺ ആയതിനാൽ അക്കൗണ്ട്സ് സംബദ്ധമായ വിവരങ്ങൾ റീജിയണൽ ഓഫീസിൽ എത്തിക്കുവാൻ ഇത് സഹായിച്ചു .


ഈ എക്സൽ ഷീറ്റിൽ , അതെ ദിവസത്തെ തീയതി കാണാം , ഒരു വശത്തു ത്രിവേണി യുടെ പേര് കാണാം . ഈ ഷീറ്റ് എഡിറ്റ് ചെയുവാൻ കൺസ്യൂമർഫെഡ് റീജിയണൽ ഐ ടി ക് മാത്രമേ സാധിക്കുള്ളു 

ഈ ഷീറ്റ് കൺസ്യൂമർഫെഡ് റീജിയണൽ ഓഫീസിന്റെ ഡ്രൈവ് ഇൽ  ആണ് നിർമിച്ചിരിക്കുന്നത് . ഒരു പബ്ലിക് ഡ്രൈവിൽ നിർമിച്ചത് മൂലം ഇത് എല്ലാർകും അക്സസ്സ് ചെയാം.

ഇതിൽ കഴിഞ്ഞ മാസത്തെ സെയിൽസ് ഡീറ്റെയിൽസ് എന്റർ ചെയാനുള്ള കോളം നിർമിച്ചിട്ടുണ്ട്‌ , ഇത് മാസത്തിലെ ആദ്യ 8 ദിവസങ്ങളിൽ മാത്രം പ്രവര്തികുകയുള്ളു .

എല്ലാ ഡീറ്റൈൽസും ഓഫീസ് ഇ മെയിലിൽ ലഭ്യമാണ് . 

എല്ലാ മാസവും ഒന്നാം തിയതി ഇതിൻറെ ബാക്ക് അപ്പ് ഓട്ടോമാറ്റിക് ആയി , ഗൂഗിൾ ഡ്രൈവിൽ എടുക്കും , ഡീറ്റെയിൽസ് ഐ ട്ടി ക് ഇമെയിൽ അയക്കും 

ഇതിന് പുറമേ കസ്റ്റമൈസ ചെയ്യാൻ സാധിക്കുന്ന ഒരു എക്സൽ കൂടി നിർമിച്ചിട്ടുണ്ട്‌ .


നിങ്ങളുടെ അഭിപ്രായങ്ങൾ ഞങ്ങളെ അറിയിക്കുക 








itatcalicut@gmail.com



September 14, 2016

Sales Power point presentation

Sales power point presentation for regional office








http://javabelazy.blogspot.in/

September 12, 2016

Reverse Engineering in Java

How Reverse Engineering achieved in java


In simple way we can say , we are going back ward in development life cycle. How can we implement this in our project ?.



http://javabelazy.blogspot.in/

August 01, 2016

Combination Sales Graph for Consumerfed Kozhikode

Combination Sales Graph Tutorial

Combination Sales Graph Demo

Download File here

References


http://office.microsoft.com/en-in/excel-help/show-trends-and-forecast-sales-with-charts-HA001087785.aspx

http://office.microsoft.com/en-in/templates/annual-report-TC102896593.aspx

http://office.microsoft.com/en-in/templates/channel-partner-scorecard-TC104099162.aspx

http://www.seotakeaways.com/how-to-select-best-excel-charts-for-your-data-analysis-reporting/


Thanks to accounts manager +deepa for her  supports



http://javabelazy.blogspot.in/

pdf creator progam in java - portable document format

A pdf creator in java


Description

descripiton

Source code

package com.konzn.kims.utils;


import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Font;
import com.lowagie.text.PageSize;
import com.lowagie.text.Phrase;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter;


import java.io.FileNotFoundException;

import java.io.FileOutputStream;
import java.io.File;

import javax.swing.JTable;

/**
 * 
 * @author aromal
 * @version 1.0
 */
public class PdfCreator {

String filename = "accounts_consumerfed";
String path = null;
String projectName = "accounts manager";

public PdfCreator(){
initialize();
}

private void initialize() {
path = System.getProperty("user.home");
createDirectory(path+"\\"+projectName);
}

/**

* @see 
* @param 
* @return void
* Description : to create a directory if not exists
* Date : Jan 4, 2012
* Coded by : +deepa
*/
private void createDirectory(String dirPath) {
File directory = new File(dirPath);
if(directory.exists() == false){
directory.mkdir();
path = dirPath;
}else if(directory.exists()){
path = dirPath;
}else{
System.out.println("error at create directory ");
}

}

public static void main(String[] args) {
}

public void createPdfFromTable(JTable test) {
String[] headers = new String[test.getColumnCount()];
for (int j = 0; j < test.getColumnCount(); j++) {
headers[j] = test.getColumnName(j);
}

//

// Create a new document.

//

Document document = new Document(PageSize.LETTER.rotate());

try {

// Get an instance of PdfWriter and create a Table.pdf file

// as an output.

//

PdfWriter.getInstance(document,

new FileOutputStream(new File("E:\\AromalTable.pdf")));

document.open();

//

// Create an instance of PdfPTable. After that we transform

// the header and data array into a PdfPCell object. When
// each table row is complete we have to call the

// table.completeRow() method.

//
// For better presentation we also set the cell font name,

// size and weight. And we also define the background fill

// for the cell.

//

PdfPTable table = new PdfPTable(headers.length);

for (int i = 0; i < headers.length; i++) {

String header = headers[i];

PdfPCell cell = new PdfPCell();

cell.setGrayFill(0.9f);

cell.setPhrase(new Phrase(header.toUpperCase(),

new Font(Font.HELVETICA, 10,

Font.BOLD)));

table.addCell(cell);

}

table.completeRow();

for (int i = 0; i < test.getRowCount(); i++) {

for (int j = 0; j < test.getColumnCount(); j++) {

String datum = test.getValueAt(i, j).toString();

PdfPCell cell = new PdfPCell();

cell.setPhrase(new Phrase(datum.toUpperCase(),

new Font(Font.HELVETICA, 10,

Font.NORMAL)));

table.addCell(cell);

}

table.completeRow();

}

document.addTitle("Table Demo");

document.add(table);

} catch (DocumentException e) {

e.printStackTrace();

} catch (FileNotFoundException e) {

e.printStackTrace();

} finally {

document.close();

}


}


/**

* @see 
* @param 
* @return String
* Description : create a pdf by specified name and table
* Date : Jan 4, 2012
* Coded by : nithin,aromal
*/
public String createPdfFromTable(JTable test,String fileName) {
String message = "error in creation";
filename = fileName+".pdf";
String location = path+"\\"+filename;
String[] headers = new String[test.getColumnCount()];
for (int j = 0; j < test.getColumnCount(); j++) {
headers[j] = test.getColumnName(j);
}
Document document = new Document(PageSize.LETTER.rotate());
try {
PdfWriter.getInstance(document,
new FileOutputStream(new File(location)));
document.open();
PdfPTable table = new PdfPTable(headers.length);
for (int i = 0; i < headers.length; i++) {
String header = headers[i];

PdfPCell cell = new PdfPCell();

cell.setGrayFill(0.9f);

cell.setPhrase(new Phrase(header.toUpperCase(),

new Font(Font.HELVETICA, 10,

Font.BOLD)));

table.addCell(cell);

}

table.completeRow();

for (int i = 0; i < test.getRowCount(); i++) {

for (int j = 0; j < test.getColumnCount(); j++) {

String datum =  null;
if(test.getValueAt(i, j)== null){
datum = "      ";
}
else{
datum =test.getValueAt(i, j).toString();
}


PdfPCell cell = new PdfPCell();

cell.setPhrase(new Phrase(datum.toUpperCase(),

new Font(Font.HELVETICA, 10,

Font.NORMAL)));

table.addCell(cell);

}

table.completeRow();

}

document.addTitle("Table Demo");

document.add(table);
message = fileName + " created ";
} catch (DocumentException e) {

e.printStackTrace();

} catch (FileNotFoundException e) {

e.printStackTrace();

} finally {

document.close();

}


return message;
}

/**

* @see 
* @param Bean
* @return String
* Description :TODO
* Date : Jan 9, 2012
* Coded by : +joseph james 
*/
public String createForm8(){

return null;
}
}


http://javabelazy.blogspot.in/

July 28, 2016

Method overriding example in java

Method overriding example in java


Description

In method overriding, the sub class and super class contains the same function with type and signature.
The function in the subclass overrides the funtion in the super class at the run time.This is a runtime polymorphism. The class must be in Is-A relation ship ie, Clerk is a emloyee , sweeper is a employee. Note: static methods cannot be overriden, because static methods are bound with class, we class static method using class name and not by the objects, so we cannot override public static void main().

Source code

/**
 *
 */
package oops;

/**
 * @author java programs
 *
 */
public class Employees {

int name;
int age;
int salary;

int getSalary(){
return 15000;
}

}





/**
 * 
 */
package oops;

/**
 * @author java programs
 *
 */
public class Clerk extends Employees {
int getSalary(){
return 20000;
}

}


/**
 * 
 */
package oops;

/**
 * @author java programs
 *
 */
public class HumanResource extends Employees {
int getSalary(){
return 35000;
}

}


package oops;

public class Sweeper extends Employees {
 int getSalary(){
return 5000;
 }
}

/**
 * 
 */
package oops;

/**
 * @author java programs
 *
 */
public class MethodOverriding {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Employees employee = new Employees();
System.out.println("This is employee class : "+employee.getSalary());
employee = new Clerk();
System.out.println("This is clerk class : "+employee.getSalary());
employee = new HumanResource();
System.out.println("This is human resource class : "+employee.getSalary());
employee = new Sweeper();
System.out.println("This is sweeper class : "+employee.getSalary());
System.out.println(" Method overriding example in java");

}

}


Output



Method overriding example in java

Similar posts


http://javabelazy.blogspot.in/

Facebook comments