[salary structure] Cleanup, Fixed Monthly Register Report and other minor changes
diff --git a/utilities/demo_docs/Employee.csv b/utilities/demo_docs/Employee.csv
new file mode 100644
index 0000000..c9b340a
--- /dev/null
+++ b/utilities/demo_docs/Employee.csv
@@ -0,0 +1,40 @@
+Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+Table:,Employee,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+DocType:,Employee,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+Column Labels:,ID,Full Name,Date of Joining,Date of Birth,Gender,Company,Status,Naming Series,Salutation,Image,User ID,Employee Number,Employment Type,Holiday List,Scheduled Confirmation Date,Final Confirmation Date,Contract End Date,Date Of Retirement,Branch,Department,Designation,Grade,Email (By company),Notice - Number of Days,Salary Mode,Bank Name,Bank A/C No.,ESIC CARD No,PF Number,Gratuity LIC ID,Reports to,Cell Number,Personal Email,Person To Be Contacted,Relation,Emergency Phone Number,Permanent Accommodation Type,Permanent Address,Current Accommodation Type,Current Address,Bio,PAN Number,Passport Number,Date of Issue,Valid Upto,Place of Issue,Marital Status,Blood Group,Family Background,Health Details,Resignation Letter Date,Relieving Date,Reason for Leaving,Leave Encashed?,Encashment Date,Held On,Reason for Resignation,New Workplace,Feedback

+Column Name:,name,employee_name,date_of_joining,date_of_birth,gender,company,status,naming_series,salutation,image,user_id,employee_number,employment_type,holiday_list,scheduled_confirmation_date,final_confirmation_date,contract_end_date,date_of_retirement,branch,department,designation,grade,company_email,notice_number_of_days,salary_mode,bank_name,bank_ac_no,esic_card_no,pf_number,gratuity_lic_id,reports_to,cell_number,personal_email,person_to_be_contacted,relation,emergency_phone_number,permanent_accommodation_type,permanent_address,current_accommodation_type,current_address,bio,pan_number,passport_number,date_of_issue,valid_upto,place_of_issue,marital_status,blood_group,family_background,health_details,resignation_letter_date,relieving_date,reason_for_leaving,leave_encashed,encashment_date,held_on,reason_for_resignation,new_workplace,feedback

+Mandatory:,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No

+Type:,Data (text),Data,Date,Date,Select,Select,Select,Select,Select,Select,Link,Data,Link,Link,Date,Date,Date,Date,Link,Link,Link,Link,Data,Int,Select,Data,Data,Data,Data,Data,Link,Data,Data,Data,Data,Data,Select,Small Text,Select,Small Text,Text Editor,Data,Data,Date,Date,Data,Select,Select,Small Text,Small Text,Date,Date,Data,Select,Date,Date,Select,Data,Small Text

+Info:,,,,,"One of: Male, Female",Valid Company,"One of: Active, Left",One of: EMP/,"One of: Mr, Ms",One of: attach_files:,Valid Profile,,Valid Employment Type,Valid Holiday List,,,,,Valid Branch,Valid Department,Valid Designation,Valid Grade,,Integer,"One of: Bank, Cash, Cheque",,,,,,Valid Employee,,,,,,"One of: Rented, Owned",,"One of: Rented, Owned",,,,,,,,"One of: Single, Married, Divorced, Widowed","One of: A+, A-, B+, B-, AB+, AB-, O+, O-",,,,,,"One of: Yes, No",,,"One of: Better Prospects, Health Concerns",,

+Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Dikman Shervashidze Shervashidze,10-10-2001,03-01-1982,Female,Wind Power LLC,Active,EMP/,,,DikmanShervashidze@armyspy.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Zukutakitoteka ,09-16-1976,03-02-1959,Female,Wind Power LLC,Active,EMP/,,,Zukutakitoteka@teleworm.us,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Hatsue Kashiwagi,06-16-2000,03-03-1982,Female,Wind Power LLC,Active,EMP/,,,HatsueKashiwagi@cuvox.de,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Nuran Verkleij,07-01-1969,04-04-1945,Female,Wind Power LLC,Active,EMP/,,,NuranVerkleij@einrot.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Дмитрий Пирогов,12-24-1999,03-05-1978,Male,Wind Power LLC,Active,EMP/,,,aromn@armyspy.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Tilde Lindqvist,08-05-1981,03-06-1964,Female,Wind Power LLC,Active,EMP/,,,TildeLindqvist@cuvox.de,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Michał Sobczak,06-10-2006,03-07-1982,Male,Wind Power LLC,Active,EMP/,,,MichalSobczak@teleworm.us,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Gabrielle Loftus,10-21-1993,03-08-1969,Female,Wind Power LLC,Active,EMP/,,,GabrielleLoftus@superrito.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Vakhita Ryzaev,09-06-2005,03-09-1982,Male,Wind Power LLC,Active,EMP/,,,VakhitaRyzaev@teleworm.us,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Charmaine Gaudreau,12-25-2007,03-10-1985,Female,Wind Power LLC,Active,EMP/,,,CharmaineGaudreau@cuvox.de,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Rafaëla Maartens,09-02-2002,03-11-1982,Female,Wind Power LLC,Active,EMP/,,,RafaelaMaartens@cuvox.de,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Nuguse Yohannes,08-24-1984,07-12-1966,Male,Wind Power LLC,Active,EMP/,,,NuguseYohannes@dayrep.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Раиса Белякова,12-04-2002,03-13-1982,Female,Wind Power LLC,Active,EMP/,,,panca@armyspy.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,胤隆 蔡,03-14-2011,06-14-1991,Male,Wind Power LLC,Active,EMP/,,,CaYinLong@gustr.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Freddie Scott,12-14-2004,03-15-1982,Male,Wind Power LLC,Active,EMP/,,,FreddieScott@armyspy.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Bergþóra Vigfúsdóttir,05-17-2004,03-16-1982,Female,Wind Power LLC,Active,EMP/,,,BergoraVigfusdottir@superrito.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Ward Kalb,05-13-1994,03-17-1973,Male,Wind Power LLC,Active,EMP/,,,WardNajmalDinKalb@cuvox.de,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Wan Mai,12-15-2003,09-18-1982,Female,Wind Power LLC,Active,EMP/,,,WanMai@teleworm.us,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Leon Abdulov,03-15-1999,03-19-1982,Male,Wind Power LLC,Active,EMP/,,,LeonAbdulov@superrito.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

+,,Sabina Novotná,01-25-1991,03-20-1974,Female,Wind Power LLC,Active,EMP/,,,SabinaNovotna@superrito.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
\ No newline at end of file
diff --git a/utilities/demo_docs/Item_Price.csv b/utilities/demo_docs/Item_Price.csv
index 1a80a7f..f0f657e 100644
--- a/utilities/demo_docs/Item_Price.csv
+++ b/utilities/demo_docs/Item_Price.csv
@@ -19,16 +19,16 @@
 Type:,Data (text),Link,Select,Currency,Link

 Info:,,Valid Price List,"One of: Buying, Selling",,Valid Currency

 Start entering data below this line,,,,,

-,Base Bearing Plate,Standard Buying,Buying,750,INR

-,Base Plate,Standard Buying,Buying,1092,INR

-,Bearing Block,Standard Buying,Buying,355,INR

-,Bearing Collar,Standard Buying,Buying,980,INR

-,Bearing Pipe,Standard Buying,Buying,599,INR

-,Blade Rib,Standard Buying,Buying,430,INR

-,Disc Collars,Standard Buying,Buying,3000,INR

-,External Disc,Standard Buying,Buying,1200,INR

-,Internal Disc,Standard Buying,Buying,1000,INR

-,Shaft,Standard Buying,Buying,600,INR

-,Stand,Standard Buying,Buying,200,INR

-,Upper Bearing Plate,Standard Buying,Buying,400,INR

-,Wing Sheet,Standard Buying,Buying,20300,INR
\ No newline at end of file
+,Base Bearing Plate,Standard Buying,Buying,15,USD

+,Base Plate,Standard Buying,Buying,20,USD

+,Bearing Block,Standard Buying,Buying,10,USD

+,Bearing Collar,Standard Buying,Buying,20,USD

+,Bearing Pipe,Standard Buying,Buying,15,USD

+,Blade Rib,Standard Buying,Buying,10,USD

+,Disc Collars,Standard Buying,Buying,74,USD

+,External Disc,Standard Buying,Buying,45,USD

+,Internal Disc,Standard Buying,Buying,33,USD

+,Shaft,Standard Buying,Buying,30,USD

+,Stand,Standard Buying,Buying,40,USD

+,Upper Bearing Plate,Standard Buying,Buying,50,USD

+,Wing Sheet,Standard Buying,Buying,22,USD
\ No newline at end of file
diff --git a/utilities/demo_docs/Profile.csv b/utilities/demo_docs/Profile.csv
new file mode 100644
index 0000000..2e7a2ce
--- /dev/null
+++ b/utilities/demo_docs/Profile.csv
@@ -0,0 +1,40 @@
+Data Import Template,,,,,,,,,,,,,,,,,,,,,

+Table:,Profile,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,

+Notes:,,,,,,,,,,,,,,,,,,,,,

+Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,

+First data column must be blank.,,,,,,,,,,,,,,,,,,,,,

+"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,

+"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,

+Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,

+"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,

+You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,

+DocType:,Profile,,,,,,,,,,,,,,,,,,,,

+Column Labels:,ID,Email,First Name,User Type,Enabled,Middle Name (Optional),Last Name,Send Invite Email,Language,Birth Date,Gender,New Password,User Image,Background Image,Bio,Email Signature,Login After,Login Before,Restrict IP,Last Login,Last IP

+Column Name:,name,email,first_name,user_type,enabled,middle_name,last_name,send_invite_email,language,birth_date,gender,new_password,user_image,background_image,bio,email_signature,login_after,login_before,restrict_ip,last_login,last_ip

+Mandatory:,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No

+Type:,Data (text),Data,Data,Select,Check,Data,Data,Check,Select,Date,Select,Password,Select,Select,Small Text,Small Text,Int,Int,Data,Read Only,Read Only

+Info:,,,,"One of: System User, Website User",0 or 1,,,0 or 1,"One of: العربية, Deutsch, english, español, français, हिंदी, Hrvatski, nederlands, português, português brasileiro, српски, தமிழ், ไทย",,"One of: Male, Female, Other",,One of: attach_files:,One of: attach_files:,,,Integer,Integer,,,

+Start entering data below this line,,,,,,,,,,,,,,,,,,,,,

+,,DikmanShervashidze@armyspy.com,Dikman,System User,1,V,Shervashidze,0,,,,testpass,,,,,,,,,

+,,Zukutakitoteka@teleworm.us,Zukutakitoteka,System User,1,,,0,,,,testpass,,,,,,,,,

+,,HatsueKashiwagi@cuvox.de,Hatsue,System User,1,H,Kashiwagi,0,,,,testpass,,,,,,,,,

+,,NuranVerkleij@einrot.com,Nuran,System User,1,T,Verkleij,0,,,,testpass,,,,,,,,,

+,,aromn@armyspy.com,Дмитрий,System User,1,З,Пирогов,0,,,,testpass,,,,,,,,,

+,,TildeLindqvist@cuvox.de,Tilde,System User,1,T,Lindqvist,0,,,,testpass,,,,,,,,,

+,,MichalSobczak@teleworm.us,Michał,System User,1,S,Sobczak,0,,,,testpass,,,,,,,,,

+,,GabrielleLoftus@superrito.com,Gabrielle,System User,1,J,Loftus,0,,,,testpass,,,,,,,,,

+,,VakhitaRyzaev@teleworm.us,Vakhita,System User,1,A,Ryzaev,0,,,,testpass,,,,,,,,,

+,,CharmaineGaudreau@cuvox.de,Charmaine,System User,1,D,Gaudreau,0,,,,testpass,,,,,,,,,

+,,RafaelaMaartens@cuvox.de,Rafaëla,System User,1,Z,Maartens,0,,,,testpass,,,,,,,,,

+,,NuguseYohannes@dayrep.com,Nuguse,System User,0,S,Yohannes,0,,,,testpass,,,,,,,,,

+,,panca@armyspy.com,Раиса,System User,0,В,Белякова,0,,,,testpass,,,,,,,,,

+,,CaYinLong@gustr.com,胤隆,System User,1,婷,蔡,0,,,,testpass,,,,,,,,,

+,,FreddieScott@armyspy.com,Freddie,System User,1,A,Scott,0,,,,testpass,,,,,,,,,

+,,BergoraVigfusdottir@superrito.com,Bergþóra,System User,1,Ö,Vigfúsdóttir,0,,,,testpass,,,,,,,,,

+,,WardNajmalDinKalb@cuvox.de,Ward,System User,1,N,Kalb,0,,,,testpass,,,,,,,,,

+,,WanMai@teleworm.us,Wan,System User,1,A,Mai,0,,,,testpass,,,,,,,,,

+,,LeonAbdulov@superrito.com,Leon,System User,1,A,Abdulov,0,,,,testpass,,,,,,,,,

+,,SabinaNovotna@superrito.com,Sabina,System User,1,J,Novotná,0,,,,testpass,,,,,,,,,
\ No newline at end of file
diff --git a/utilities/demo_docs/Salary_Structure.csv b/utilities/demo_docs/Salary_Structure.csv
new file mode 100644
index 0000000..07d95be
--- /dev/null
+++ b/utilities/demo_docs/Salary_Structure.csv
@@ -0,0 +1,25 @@
+"Data Import Template"

+"Table:","Salary Structure"

+""

+""

+"Notes:"

+"Please do not change the template headings."

+"First data column must be blank."

+"If you are uploading new records, leave the ""name"" (ID) column blank."

+"If you are uploading new records, ""Naming Series"" becomes mandatory, if present."

+"Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish."

+"For updating, you can update only selective columns."

+"You can only upload upto 5000 records in one go. (may be less in some cases)"

+""

+"DocType:","Salary Structure","","","","","","","","","","","","","","","-","Salary Structure Earning","earning_details","","","-","Salary Structure Deduction","deduction_details","",""

+"Column Labels:","ID","Last Updated On","Employee","Is Active","From Date","Company","Employee Name","Branch","Designation","Department","Grade","To Date","Total Earning","Total Deduction","Net Pay","-","ID","Type","Amount","Reduce Earning for Leave Without Pay (LWP)","-","ID","Type","Amount","Reduce Deduction for Leave Without Pay (LWP)"

+"Column Name:","name","modified","employee","is_active","from_date","company","employee_name","branch","designation","department","grade","to_date","total_earning","total_deduction","net_pay","-","name","e_type","modified_value","depend_on_lwp","-","name","d_type","d_modified_amt","depend_on_lwp"

+"Mandatory:","Yes","Yes","Yes","Yes","Yes","Yes","No","No","No","No","No","No","No","No","No","-","Yes","Yes","No","No","-","Yes","Yes","No","No"

+"Type:","Data (text)","Data","Link","Select","Date","Select","Data","Select","Select","Select","Select","Date","Currency","Currency","Currency","-","Data","Link","Currency","Check","-","Data","Link","Currency","Check"

+"Info:","","Don't change!","Valid Employee","One of: Yes, No","","Valid Company","","Valid Branch","Valid Designation","Valid Department","Valid Grade","","","","","-","Leave blank for new records","Valid Earning Type","","0 or 1","-","Leave blank for new records","Valid Deduction Type","","0 or 1"

+"Start entering data below this line"

+"","EMP/0001/SST/00001","""2013-08-06 17:07:22""","EMP/0001","Yes","2013-08-06","Wind Power LLC","Dikman Shervashidze Shervashidze","","","","","",5000.0,400.0,4600.0,"","000000154","Basic",5000.0,"","","000000155","Income Tax",400.0,""

+"","EMP/0002/SST/00001","""2013-08-06 17:07:43""","EMP/0002","Yes","2013-08-06","Wind Power LLC","Zukutakitoteka","","","","","",6700.0,400.0,6300.0,"","000000156","Basic",6700.0,"","","000000157","Income Tax",400.0,""

+"","EMP/0003/SST/00001","""2013-08-06 17:08:02""","EMP/0003","Yes","2013-08-06","Wind Power LLC","Hatsue Kashiwagi","","","","","",3400.0,400.0,3000.0,"","000000158","Basic",3400.0,"","","000000159","Income Tax",400.0,""

+"","EMP/0004/SST/00001","""2013-08-06 17:14:39""","EMP/0004","Yes","2013-08-06","Wind Power LLC","Nuran Verkleij","","","","","",6990.0,566.0,6424.0,"","000000160","Basic",6990.0,"","","000000161","Income Tax",566.0,""

+
diff --git a/utilities/make_demo.py b/utilities/make_demo.py
index a2cdefb..951aded 100644
--- a/utilities/make_demo.py
+++ b/utilities/make_demo.py
@@ -13,6 +13,7 @@
 	complete_setup()
 	make_items()
 	make_customers_suppliers_contacts()
+	make_users_and_employees()
 	# make_bom()
 	# make_opening_stock()
 	# make_opening_accounts()
@@ -32,7 +33,7 @@
 		"industry": "Manufacturing",
 		"company_name": "Wind Power LLC",
 		"company_abbr": "WP",
-		"currency": "INR",
+		"currency": "USD",
 		"timezone": "America/New York",
 		"country": "United States"
 	})
@@ -62,6 +63,20 @@
 	webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", "Lead.csv")
 	upload()
 
+def make_users_and_employees():
+	print "Importing Profile..."
+	webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", "Profile.csv")
+	upload()
+	webnotes.conn.set_value("HR Settings", None, "emp_created_by", "Naming Series")
+	webnotes.conn.commit()
+	
+	print "Importing Employee..."
+	webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", "Employee.csv")
+	upload()
+
+	print "Importing Salary Structure..."
+	webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", "Salary Structure.csv")
+	upload()
 
 if __name__=="__main__":
 	make()
\ No newline at end of file