From 2c935c1c5697d67280d6d01b9f2ce1978cbdf2a8 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 15 May 2012 14:11:29 +0530 Subject: [PATCH 001/207] [IMP/ADD]added l10_in_hr_payroll.changes in module descrpition and added notes in salary rules. bzr revid: kbh@tinyerp.com-20120515084129-uu7aroc0izfb0zk5 --- addons/hr_payroll/hr_payroll_demo.xml | 8 + addons/l10n_in_hr_payroll/__init__.py | 26 ++ addons/l10n_in_hr_payroll/__openerp__.py | 55 +++ .../data/hr.salary.rule.csv | 12 + .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 34 ++ .../l10n_in_hr_payroll_data.xml | 425 ++++++++++++++++++ .../l10n_in_hr_payroll_demo.xml | 16 + .../l10n_in_hr_payroll_report.xml | 14 + .../l10n_in_hr_payroll_view.xml | 21 + addons/l10n_in_hr_payroll/report/__init__.py | 27 ++ .../report/report_payslip_details.py | 38 ++ .../report/report_payslip_details.rml | 372 +++++++++++++++ .../security/hr.salary.rule.csv | 3 + 13 files changed, 1051 insertions(+) create mode 100644 addons/l10n_in_hr_payroll/__init__.py create mode 100644 addons/l10n_in_hr_payroll/__openerp__.py create mode 100644 addons/l10n_in_hr_payroll/data/hr.salary.rule.csv create mode 100644 addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py create mode 100644 addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml create mode 100644 addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml create mode 100644 addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml create mode 100644 addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml create mode 100644 addons/l10n_in_hr_payroll/report/__init__.py create mode 100644 addons/l10n_in_hr_payroll/report/report_payslip_details.py create mode 100644 addons/l10n_in_hr_payroll/report/report_payslip_details.rml create mode 100644 addons/l10n_in_hr_payroll/security/hr.salary.rule.csv diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index 36ac3e23a7b..33b345591eb 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -31,6 +31,12 @@ House Rent Allowance + Rent receipts can be shown for taking tax benefit for living in a rented house.Income tax exemption for HRA will be least of following: + 1. The actual amount of HRA received as a part of salary. + 2. 40% (if living in non-metro area) or 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). + 3. Rent paid minus 10% of (basic salary+DA). + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + @@ -50,6 +56,8 @@ Professional Tax + Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uugbJcaM diff --git a/addons/l10n_in_hr_payroll/__init__.py b/addons/l10n_in_hr_payroll/__init__.py new file mode 100644 index 00000000000..dd0fa2330b7 --- /dev/null +++ b/addons/l10n_in_hr_payroll/__init__.py @@ -0,0 +1,26 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import hr_payroll +import l10n_in_hr_payroll +import report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py new file mode 100644 index 00000000000..27528fbddcf --- /dev/null +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -0,0 +1,55 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'India payroll', + 'category': 'Localization', + 'init_xml': [], + 'author': 'OpenERP SA', + 'website':'http://www.openerp.com', + 'depends': ['hr_payroll'], + 'version': '1.0', + 'description': """ +Indian Payroll Rules. +======================= + + * Employee Details + * Employee Contracts + * Passport based Contract + * Allowances / Deductions + * Allow to configure Basic / Grows / Net Salary + * Employee PaySlip + * Monthly Payroll Register + * Integrated with Holiday Management + * Medical Allowance, Travel Allowance, Child Allowance, ... + """, + + 'active': False, + 'update_xml': [ + 'l10n_in_hr_payroll_view.xml', + 'l10n_in_hr_payroll_data.xml', + 'data/hr.salary.rule.csv', + 'l10n_in_hr_payroll_report.xml', + ], + 'demo_xml': ['l10n_in_hr_payroll_demo.xml'], + 'installable': True +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv new file mode 100644 index 00000000000..0d62cf670e0 --- /dev/null +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -0,0 +1,12 @@ +"id","amount_select","condition_range_min","condition_range_max","amount_percentage","amount_fix","name","category_id","sequence","code","parent_rule_id/id","condition_select","condition_range","amount_percentage_base" +1,"fix",1,1,,50,"Education Allowance","Child Education Allowance",23,"CHEA","hr_payroll_rule_child1","range","employee.children", +2,"fix",2,2,,100,"Education Allowance","Child Education Allowance",24,"CHEA","hr_payroll_rule_child1","range","employee.children", +,,,,,,,,,,,,, +3,"fix",1,1,,150,"Education Allowance with Hostel","Child Education Allowance",26,"CHEAH","hr_payroll_rule_child2","range","employee.children", +4,"fix",2,2,,300,"Education Allowance with Hostel","Child Education Allowance",27,"CHEAH","hr_payroll_rule_child2","range","employee.children", +,,,,,,,,,,,,, +5,"fix",0,2999,,0,"Professional Tax for Gujarat","Deduction",121,"PT0","hr_payslip_line_professionaltax_guj","range","categories.GROSS", +6,"fix",3000,5999,,-20,"Professional Tax for Gujarat","Deduction",121,"PT20","hr_payslip_line_professionaltax_guj","range","categories.GROSS", +7,"fix",6000,8999,,-80,"Professional Tax for Gujarat","Deduction",121,"PT80","hr_payslip_line_professionaltax_guj","range","categories.GROSS", +8,"fix",9000,11999,,-150,"Professional Tax for Gujarat","Deduction",121,"PT150","hr_payslip_line_professionaltax_guj","range","categories.GROSS", +9,"fix",12000,1000000,,-200,"Professional Tax for Gujarat","Deduction",121,"PT200","hr_payslip_line_professionaltax_guj","range","categories.GROSS", diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py new file mode 100644 index 00000000000..dc075b0be36 --- /dev/null +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -0,0 +1,34 @@ +#-*- coding:utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2011 OpenERP SA (). All Rights Reserved +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields, osv +import decimal_precision as dp + +class hr_contract_in(osv.osv): + _inherit = 'hr.contract' + + _columns = { + 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), + } + +hr_contract_in() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml new file mode 100644 index 00000000000..6edee15874f --- /dev/null +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -0,0 +1,425 @@ + + + + + + + + Child Education Allowance + CEA + + + + + + + DA + Dearness Allowance + + percentage + contract.wage + + + DA is calculated in % + for more details:http://www.citehr.com/26809-how-calculate-dearness-allowance-da.html + + + + CEA + Child Education Allowance + + fix + none + + Per school going child 1200 per annum is non-taxable. Maximum for 2 children, so max 2400 per annum becomes non-taxable. + + + + CHEA + Education Allowance + + + python + result = bool(employee.children) + fix + Education allowance of Rs. 50 per month per child for up to 2 children of the employee is exempted. + + + + + CHEAH + Education Allowance with Hostel + + + python + result = bool(employee.children) + fix + In case the children are in hostel, the exemption available is Rs.150 per month per child for up to 2 children. + + + + + MGMTA + Grade/Special/Management/Supplementary Allowance + + fix + + + This allowance is normally given as an additional benefit to employees and is fully taxable. + for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/income-tax-guides/tax-implications-of-salary-components.php + + + + CCA + City Compensatory Allowance + + fix + + + 10% of basic+da is the maximum. + for more details :http://www.citehr.com/250071-what-cca-allowance.html + + + + ARRE + Arrears + + fix + + + Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). + One would need to compute income tax on the arrears if it would have been received in actual year. + Now difference of income tax between payment year and actual year would be allowed for deduction. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uurtGGGd + + + + GRA + Gratuity + + none + code + result = (categories.NET/26) * 15 * 5 + + Covered under the Payment of Gratuity Act, 1971: (Last drawn monthly basic salary + dearness allowance)/26 x 15 days x number of years of service (date of joining – date of retirement/leaving job) + + + + + LTA + Leave Travel Allowance + + percentage + contract.wage + + + As per Income tax rules of India, if transport bills for LTA are not provided, + the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 in his CTC(cost to company), + and he provides proofs of Rs 40,000 (boarding pass, air tickets, taxi vouchers) then income tax will be + deducted for rest of the Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, + income tax laws only permits domestic air tickets only for LTA claim. + Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-not-required-supreme-court-india-ruling/#ixzz1uutlHSez + + + + LE + Leave Encashment + + none + fix + 0.0 + + Payment by way of leave encashment received by Central & State Govt. + employees at the time of retirement in respect of the period of earned + leave at credit is fully exempt. In case of other employees, the exemption + is to be limited to minimum of all below: + 1.The actual amount received + 2.The cash equivalent of leave balance (max 30 days per year of service) + 3.Maximum of 10 months of leave encashment, based on last 10 months average salary + 4.Rs. 3 Lakh + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuunHwjE + + + + PI + Performance Incentive/Bonus + + fix + + + This would be fully taxable based on incentive. + + + + MEDA + Medical Reimbursement + + fix + + + This component is on-taxable up to 15000 per year (or Rs 1250 per month) on producing medical bills. + + + + PERJ + Periodical Journals + + fix + + + Some employers may provide component for buying magazines, + journals and books as a part of knowledge enhancement for business growth. + This part would become non taxable on providing original bills. + + + + UNIF + Uniform/Dress Allowance + + fix + + + Some sections of employees mat get allowance for purchase of office dress/uniform. + In such case, the component would become non-taxable. + + + + TELR + Telephone Reimbursement + + fix + + + In some of the cases, companies may provide a component for telephone bills. + Employees may provide actual phone usage bills to reimburse this component and make it non-taxable. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A + + + + CAR + Car Expenses Reimbursement + + fix + + + In case company provides component for this and employee use self owned car for official + and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or + can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuw12Cjj + + + + INT + Internet Expense + + fix + + + Employer may also provide reimbursement of internet expenses and thus this would become non taxable. + + + + DRI + Driver Salary + + fix + + + Rs. 900 per month (non taxable) + + + + GFNR + Gifts From Non-Relatives + + fix + + + gift gift is from non relatives person worth more than Rs.50000, + one is liable to pay the tax what ever he received excess of the limit or Rs 50,000. + + + + GFR + Gifts From Relatives + + fix + + + gift is from relaives whould be non taxable with no limits. + + + + HRI + House Rent Income + + fix + + Income from house property + + 30% of the rental income can be reduced as a standard deduction + + + + OTI + Other Income + + python + result = bool(contract.others) + code + result = contract.others + Bank account/NSC/Post Office/SCSS interest + + + + + STG + Short Term Gains from Share Trading/Equity MFs + + fix + + + if stocks/equity mutual funds are sold before one year, + 15% tax would be payable on such gains. STT should have been on transaction. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwSxEvI + + + + LTG + Long Term Gains from Share Trading/Equity MFs + + fix + + + If stocks/equity mutual funds are kept for more than a year before sale, + it would be long term gains and such gains would be fully exempt from income tax. + Securities transaction tax (STT) must have been paid on transactions for availing + this exemption. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwtRkCT + + + + + PTG + Professional Tax for Gujarat + + fix + + + + + PROFESSIONAL TAX FOR COMPANY SHOULD BE PAID ON OR BEFORE 30TH SEPT, + THE AMOUNT IS Rs. 2000 PER YEAR. THERE IS NO PAYMENT FORM TO BE FLLED. + Attribution: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#ixzz1uuyvgt2L + + + + TDS + Tax Deducted at Source + + python + result = bool(contract.tds) + code + result = -(contract.tds) + + As per income tax rules, all payment which are taxable in nature should be + done after deduction of taxes at the source itself. Hence employer compute + income tax on salary payment and deduct it every month. This TDS is based + on employee’s saving/investment declaration at the start of year. If + investments for tax saving is not done, large amount may be deducted in last few months. + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uv0gPhgQ + + + + VPF + Voluntarily Provident Fund Contribution + + fix + + + + VPF is a safe option wherein you can contribute more than the PF ceiling of 12% + that has been mandated by the government. This additional amount enjoys all the + benefits of PF except that the employer is not liable to contribute any extra amount + apart from 12%. An added advantage is that the interest rate is equal to the interest + rate of PF and the withdrawal is tax free. Please note that the maximum contribution + towards VPF is 100% of your Basic. The highest rate of interest (close to 9%) makes + it a very attractive saving scheme. Because of these advantages many employees chose + not to close their PF account even after getting employment else where other than India. + Employees also get a major tax break on their entire contribution to the fund up to a + ceiling of Rs. 70,000/- + for more details:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fund-special-benefits-for-employees + + + + CPT + Dedution for Company Provided Transport + + fix + + + + + + LWF + Dedution Towards State Labour Welfare Fund + + fix + + + The LWF is applicable to all the members of the organisation except the + Management staff (Staffs having authority to sign on the cheque/official + documents on behalf of the organisation) + Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 + Total Rs 9.00 and deposited to the LWF office. + It is half yearly contribution (June and December) + Attribution: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.html + + + + CGTI + Dedution Towards Company Provided Group Term Insurance + + fix + + + + + + DLA + Dedution Towards Leave Availed + + fix + + + + + + CMT + Dedution Towards Company Provided Medical Insurance + + fix + + + + + + ODE + Other Dedution from Employer + + fix + + + + + + EPC + Employer's PF Contribution + + code + result = (rules.PF.amount_percentage * contract.wage)/100 + + + + + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml new file mode 100644 index 00000000000..3160e238a6f --- /dev/null +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml @@ -0,0 +1,16 @@ + + + + + + + + IND + Indian Employee + + + + + + + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml new file mode 100644 index 00000000000..e3fff82fc38 --- /dev/null +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml new file mode 100644 index 00000000000..cb9a2d93a81 --- /dev/null +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -0,0 +1,21 @@ + + + + + + hr.contract.form.in.inherit + hr.contract + form + 20 + + + + + + + + + + + + diff --git a/addons/l10n_in_hr_payroll/report/__init__.py b/addons/l10n_in_hr_payroll/report/__init__.py new file mode 100644 index 00000000000..c90599352c2 --- /dev/null +++ b/addons/l10n_in_hr_payroll/report/__init__.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# d$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import report_payslip_details + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.py b/addons/l10n_in_hr_payroll/report/report_payslip_details.py new file mode 100644 index 00000000000..cfd29f8afba --- /dev/null +++ b/addons/l10n_in_hr_payroll/report/report_payslip_details.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# d$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from report import report_sxw +from hr_payroll import report + +class payslip_details_report_in(report.report_payslip_details.payslip_details_report): + + def __init__(self, cr, uid, name, context): + super(payslip_details_report_in, self).__init__(cr, uid, name, context) + self.localcontext.update({ + 'get_details_by_rule_category': self.get_details_by_rule_category, + }) + +report_sxw.report_sxw('report.paylip.details.in', 'hr.payslip', 'l10n_in_hr_payroll/report/report_payslip_details.rml', parser=payslip_details_report_in) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml new file mode 100644 index 00000000000..a7ab3db3185 --- /dev/null +++ b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[repeatIn(objects,'o')]] + + + + Pay Slip Details + + + + + [[o.credit_note==False and removeParentNode('para')]] + Credit + + Note + + ([[o.name or removeParentNode('para')]]) + + + + Name + + + [[o.employee_id.name]] + + + Designation + + + [[ o.employee_id.job_id.name or '' ]] + + + + + + + + Address + + + + [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]] + + + + + + + Email + + + [[ o.employee_id.work_email or '' ]] + + + + Identification No + + + + [[ o.employee_id.identification_id or '' ]] + + + + + + + Reference + + + [[ o.number or '' ]] + + + Bank Account + + + [[ o.employee_id.otherid or '' ]] + + + + + + + Date From + + + [[ o.date_from or '']] + + + + Date To + + + + [[ o.date_to or '' ]] + + + + + + + + + + + + + + Details by Salary Rule Category: + + + + + + + Code + + + Salary Rule Category + + + Total + + + + + + +
+ [[repeatIn(get_details_by_rule_category(o.details_by_salary_rule_category),'h') ]] + + + + + [[ h['code'] ]] + [[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]] + + + + [[ '..'*h['level'] ]][[ h['rule_category'] ]][[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]] + + + [[ formatLang(h['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] + + + +
+ + + + + + + + + + + + + + + + + + + + + + Authorized Signature + + + + + + +
+
+ diff --git a/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv new file mode 100644 index 00000000000..f18a77cd01b --- /dev/null +++ b/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_hr_salary_head","hr.salary.head","model_hr_salary_head","base.group_hr_user",1,1,1,1 +"access_hr_salary_rule","hr.salary.rule","model_hr_salary_rule","base.group_hr_user",1,1,1,1 From c34e57aaf632ef45df11cbeb36e1d02f3d2c52e1 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 15 May 2012 16:54:43 +0530 Subject: [PATCH 002/207] [IMP]improved child allowance rule for employee. bzr revid: kbh@tinyerp.com-20120515112443-h79ixtb311xs7sdt --- .../data/hr.salary.rule.csv | 6 ++--- .../l10n_in_hr_payroll_data.xml | 23 ++++++------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv index 0d62cf670e0..c7a257e8675 100644 --- a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -1,9 +1,7 @@ "id","amount_select","condition_range_min","condition_range_max","amount_percentage","amount_fix","name","category_id","sequence","code","parent_rule_id/id","condition_select","condition_range","amount_percentage_base" -1,"fix",1,1,,50,"Education Allowance","Child Education Allowance",23,"CHEA","hr_payroll_rule_child1","range","employee.children", -2,"fix",2,2,,100,"Education Allowance","Child Education Allowance",24,"CHEA","hr_payroll_rule_child1","range","employee.children", +1,"fix",1,1,,1200,"Education Allowance","Child Education Allowance",23,"CHEA","hr_payroll_rule_child1","range","employee.children", +2,"fix",2,2,,2400,"Education Allowance","Child Education Allowance",24,"CHEA","hr_payroll_rule_child1","range","employee.children", ,,,,,,,,,,,,, -3,"fix",1,1,,150,"Education Allowance with Hostel","Child Education Allowance",26,"CHEAH","hr_payroll_rule_child2","range","employee.children", -4,"fix",2,2,,300,"Education Allowance with Hostel","Child Education Allowance",27,"CHEAH","hr_payroll_rule_child2","range","employee.children", ,,,,,,,,,,,,, 5,"fix",0,2999,,0,"Professional Tax for Gujarat","Deduction",121,"PT0","hr_payslip_line_professionaltax_guj","range","categories.GROSS", 6,"fix",3000,5999,,-20,"Professional Tax for Gujarat","Deduction",121,"PT20","hr_payslip_line_professionaltax_guj","range","categories.GROSS", diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 6edee15874f..e5286409100 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -42,21 +42,10 @@ python result = bool(employee.children) fix - Education allowance of Rs. 50 per month per child for up to 2 children of the employee is exempted. + Per school going child 1200 per annum is non-taxable. Maximum for 2 children, so max 2400 per annum becomes non-taxable.
- - CHEAH - Education Allowance with Hostel - - - python - result = bool(employee.children) - fix - In case the children are in hostel, the exemption available is Rs.150 per month per child for up to 2 children. - - MGMTA @@ -129,7 +118,7 @@ fix 0.0 - Payment by way of leave encashment received by Central & State Govt. + Payment by way of leave encashment received by Central and State Govt. employees at the time of retirement in respect of the period of earned leave at credit is fully exempt. In case of other employees, the exemption is to be limited to minimum of all below: @@ -137,7 +126,8 @@ 2.The cash equivalent of leave balance (max 30 days per year of service) 3.Maximum of 10 months of leave encashment, based on last 10 months average salary 4.Rs. 3 Lakh - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuunHwjE + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuunHwjE + @@ -190,9 +180,10 @@ fix - In some of the cases, companies may provide a component for telephone bills. + In some of the cases, companies may provide a component for telephone bills. Employees may provide actual phone usage bills to reimburse this component and make it non-taxable. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A + From 0752cc0fe9bef22a448ae2fec7b52a68cb634335 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 16 May 2012 10:37:16 +0530 Subject: [PATCH 003/207] [IMP]improved child allowance rule for employee. bzr revid: kbh@tinyerp.com-20120516050716-kprn03ib238h5tua --- addons/l10n_in_hr_payroll/data/hr.salary.rule.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv index c7a257e8675..2b6b4fbd847 100644 --- a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -1,6 +1,6 @@ "id","amount_select","condition_range_min","condition_range_max","amount_percentage","amount_fix","name","category_id","sequence","code","parent_rule_id/id","condition_select","condition_range","amount_percentage_base" -1,"fix",1,1,,1200,"Education Allowance","Child Education Allowance",23,"CHEA","hr_payroll_rule_child1","range","employee.children", -2,"fix",2,2,,2400,"Education Allowance","Child Education Allowance",24,"CHEA","hr_payroll_rule_child1","range","employee.children", +1,"fix",1,1,,1200,"Education Allowance","Child Education Allowance",23,"CHEAONE","hr_payroll_rule_child1","range","employee.children", +2,"fix",2,10,,2400,"Education Allowance","Child Education Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", ,,,,,,,,,,,,, ,,,,,,,,,,,,, 5,"fix",0,2999,,0,"Professional Tax for Gujarat","Deduction",121,"PT0","hr_payslip_line_professionaltax_guj","range","categories.GROSS", From 38bc8ca8f0cb2dd98c7f98446df9b1ba8c5b96ec Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 17 May 2012 17:33:35 +0530 Subject: [PATCH 004/207] [IMP]improved rules(HRA,DA,city allowance,driver salary,transport allowance). bzr revid: kbh@tinyerp.com-20120517120335-inov2l3rsfraix96 --- addons/hr_payroll/hr_payroll_demo.xml | 67 ++++-- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 2 + .../l10n_in_hr_payroll_data.xml | 222 +++++++++++------- .../l10n_in_hr_payroll_view.xml | 1 + 4 files changed, 185 insertions(+), 107 deletions(-) diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index 33b345591eb..d3826773e7d 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -16,29 +16,48 @@ Professional Tax Register - - Meal Voucher Register + + Food coupon Register - - percentage - - contract.wage - HRA + + HRA_M + code + result = (contract.wage + DA) * 0.50 - House Rent Allowance - - Rent receipts can be shown for taking tax benefit for living in a rented house.Income tax exemption for HRA will be least of following: - 1. The actual amount of HRA received as a part of salary. - 2. 40% (if living in non-metro area) or 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). - 3. Rent paid minus 10% of (basic salary+DA). - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + House Rent Allowance for metro city + + +Rent receipts can be shown for taking tax benefit for living in a rented house. +Income tax exemption for HRA will be least of following: + 1. The actual amount of HRA received as a part of salary. + 2. 40% (if living in non-metro area). + 3. Rent paid minus 10% of (basic salary+DA). + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + + code + result = (contract.wage + DA) * 0.40 + HRA_NONM + + + House Rent Allowance for non metro city + + +Rent receipts can be shown for taking tax benefit for living in a rented house. +Income tax exemption for HRA will be least of following: + 1. The actual amount of HRA received as a part of salary. + 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). + 3. Rent paid minus 10% of (basic salary+DA). + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + + + fix @@ -56,8 +75,9 @@ Professional Tax - Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uugbJcaM + +Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uugbJcaM @@ -80,14 +100,17 @@ - - fix + + code worked_days.WORK100.number_of_days - MA + FC - - Meal Voucher + + python + result = bool(contract.food_coupon_amount) + Food Coupons + result = worked_days.WORK100.number_of_days * contract.food_coupon_amount @@ -98,7 +121,7 @@ Get 1% of sales result = (inputs.SALEURO.amount + inputs.SALASIA.amount) * 0.01 - + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index dc075b0be36..f7505257537 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -27,6 +27,8 @@ class hr_contract_in(osv.osv): _columns = { 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), + 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll')), + } hr_contract_in() diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index e5286409100..19500c73e48 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -18,10 +18,11 @@ percentage contract.wage - + - DA is calculated in % - for more details:http://www.citehr.com/26809-how-calculate-dearness-allowance-da.html + +DA is calculated in % +for more details:http://www.citehr.com/26809-how-calculate-dearness-allowance-da.html @@ -31,7 +32,9 @@ fix none - Per school going child 1200 per annum is non-taxable. Maximum for 2 children, so max 2400 per annum becomes non-taxable. + +Per school going child 1200 per annum is non-taxable. + Maximum for 2 children, so max 2400 per annum becomes non-taxable. @@ -42,7 +45,6 @@ python result = bool(employee.children) fix - Per school going child 1200 per annum is non-taxable. Maximum for 2 children, so max 2400 per annum becomes non-taxable. @@ -54,19 +56,40 @@ fix - This allowance is normally given as an additional benefit to employees and is fully taxable. - for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/income-tax-guides/tax-implications-of-salary-components.php + +This allowance is normally given as an additional benefit to employees and is fully taxable. +for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/income-tax-guides/tax-implications-of-salary-components.php - - CCA + + CBDA City Compensatory Allowance + none + + code + result = (contract.wage + DA) * 0.10 + + + + + CMETRO + City Allowance for Metro city + + none + fix - - - 10% of basic+da is the maximum. - for more details :http://www.citehr.com/250071-what-cca-allowance.html + 850.0 + + + + CNMETRO + City Allowance for Non Metro city + + none + + fix + 800.0 @@ -76,10 +99,11 @@ fix - Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). - One would need to compute income tax on the arrears if it would have been received in actual year. - Now difference of income tax between payment year and actual year would be allowed for deduction. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uurtGGGd + +Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). +One would need to compute income tax on the arrears if it would have been received in actual year. +Now difference of income tax between payment year and actual year would be allowed for deduction. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uurtGGGd @@ -90,7 +114,10 @@ code result = (categories.NET/26) * 15 * 5 - Covered under the Payment of Gratuity Act, 1971: (Last drawn monthly basic salary + dearness allowance)/26 x 15 days x number of years of service (date of joining – date of retirement/leaving job) + +Covered under the Payment of Gratuity Act, 1971: +(Last drawn monthly basic salary + dearness allowance)/26 x 15 days x +number of years of service (date of joining – date of retirement/leaving job) @@ -102,12 +129,14 @@ contract.wage - As per Income tax rules of India, if transport bills for LTA are not provided, - the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 in his CTC(cost to company), - and he provides proofs of Rs 40,000 (boarding pass, air tickets, taxi vouchers) then income tax will be - deducted for rest of the Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, - income tax laws only permits domestic air tickets only for LTA claim. - Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-not-required-supreme-court-india-ruling/#ixzz1uutlHSez + +As per Income tax rules of India, if transport bills for LTA are not provided, +the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 +in his CTC(cost to company),and he provides proofs of Rs 40,000 (boarding pass, +air tickets, taxi vouchers) then income tax will be deducted for rest of the +Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, +income tax laws only permits domestic air tickets only for LTA claim. +Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-not-required-supreme-court-india-ruling/#ixzz1uutlHSez @@ -118,15 +147,16 @@ fix 0.0 - Payment by way of leave encashment received by Central and State Govt. - employees at the time of retirement in respect of the period of earned - leave at credit is fully exempt. In case of other employees, the exemption - is to be limited to minimum of all below: - 1.The actual amount received - 2.The cash equivalent of leave balance (max 30 days per year of service) - 3.Maximum of 10 months of leave encashment, based on last 10 months average salary - 4.Rs. 3 Lakh - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuunHwjE + +Payment by way of leave encashment received by Central and State Govt. +employees at the time of retirement in respect of the period of earned +leave at credit is fully exempt. In case of other employees, the exemption +is to be limited to minimum of all below: + 1.The actual amount received + 2.The cash equivalent of leave balance (max 30 days per year of service) + 3.Maximum of 10 months of leave encashment, based on last 10 months average salary + 4.Rs. 3 Lakh + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuunHwjE @@ -155,11 +185,12 @@ Periodical Journals fix - + - Some employers may provide component for buying magazines, - journals and books as a part of knowledge enhancement for business growth. - This part would become non taxable on providing original bills. + +Some employers may provide component for buying magazines, +journals and books as a part of knowledge enhancement for +business growth.This part would become non taxable on providing original bills. @@ -169,8 +200,9 @@ fix - Some sections of employees mat get allowance for purchase of office dress/uniform. - In such case, the component would become non-taxable. + +Some sections of employees mat get allowance for purchase of office dress/uniform. +In such case, the component would become non-taxable. @@ -180,9 +212,11 @@ fix - In some of the cases, companies may provide a component for telephone bills. - Employees may provide actual phone usage bills to reimburse this component and make it non-taxable. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A + +In some of the cases, companies may provide a component for telephone bills. +Employees may provide actual phone usage bills to reimburse this component +and make it non-taxable. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A @@ -193,10 +227,11 @@ fix - In case company provides component for this and employee use self owned car for official - and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or - can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuw12Cjj + +In case company provides component for this and employee use self owned car for official +and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or +can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuw12Cjj @@ -214,7 +249,10 @@ Driver Salary fix - + + python + result = bool(employee.vehicle) + Rs. 900 per month (non taxable) @@ -226,8 +264,9 @@ fix - gift gift is from non relatives person worth more than Rs.50000, - one is liable to pay the tax what ever he received excess of the limit or Rs 50,000. + +gift gift is from non relatives person worth more than Rs.50000, +one is liable to pay the tax what ever he received excess of the limit or Rs 50,000. @@ -251,6 +290,15 @@ 30% of the rental income can be reduced as a standard deduction + + TA + Transport/Conveyance Allownace + + fix + + + + OTI Other Income @@ -270,9 +318,10 @@ fix - if stocks/equity mutual funds are sold before one year, - 15% tax would be payable on such gains. STT should have been on transaction. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwSxEvI + +If stocks/equity mutual funds are sold before one year, +15% tax would be payable on such gains. STT should have been on transaction. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwSxEvI @@ -282,11 +331,12 @@ fix - If stocks/equity mutual funds are kept for more than a year before sale, - it would be long term gains and such gains would be fully exempt from income tax. - Securities transaction tax (STT) must have been paid on transactions for availing - this exemption. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwtRkCT + +If stocks/equity mutual funds are kept for more than a year before sale, +it would be long term gains and such gains would be fully exempt from income tax. +Securities transaction tax (STT) must have been paid on transactions for availing +this exemption. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwtRkCT @@ -299,9 +349,9 @@ - PROFESSIONAL TAX FOR COMPANY SHOULD BE PAID ON OR BEFORE 30TH SEPT, - THE AMOUNT IS Rs. 2000 PER YEAR. THERE IS NO PAYMENT FORM TO BE FLLED. - Attribution: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#ixzz1uuyvgt2L +Professional tax for company should be paid on or before 30th sept, +The amount is Rs.2000 per year.There is no payment form to be filled. +Read more: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#ixzz1uuyvgt2L @@ -313,12 +363,13 @@ code result = -(contract.tds) - As per income tax rules, all payment which are taxable in nature should be - done after deduction of taxes at the source itself. Hence employer compute - income tax on salary payment and deduct it every month. This TDS is based - on employee’s saving/investment declaration at the start of year. If - investments for tax saving is not done, large amount may be deducted in last few months. - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uv0gPhgQ + +As per income tax rules, all payment which are taxable in nature should be +done after deduction of taxes at the source itself. Hence employer compute +income tax on salary payment and deduct it every month. This TDS is based +on employee’s saving/investment declaration at the start of year. If investments +for tax saving is not done, large amount may be deducted in last few months. +Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uv0gPhgQ @@ -329,17 +380,17 @@ - VPF is a safe option wherein you can contribute more than the PF ceiling of 12% - that has been mandated by the government. This additional amount enjoys all the - benefits of PF except that the employer is not liable to contribute any extra amount - apart from 12%. An added advantage is that the interest rate is equal to the interest - rate of PF and the withdrawal is tax free. Please note that the maximum contribution - towards VPF is 100% of your Basic. The highest rate of interest (close to 9%) makes - it a very attractive saving scheme. Because of these advantages many employees chose - not to close their PF account even after getting employment else where other than India. - Employees also get a major tax break on their entire contribution to the fund up to a - ceiling of Rs. 70,000/- - for more details:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fund-special-benefits-for-employees +VPF is a safe option wherein you can contribute more than the PF ceiling of 12% +that has been mandated by the government. This additional amount enjoys all the +benefits of PF except that the employer is not liable to contribute any extra amount +apart from 12%. An added advantage is that the interest rate is equal to the interest +rate of PF and the withdrawal is tax free. Please note that the maximum contribution +towards VPF is 100% of your Basic. The highest rate of interest (close to 9%) makes +it a very attractive saving scheme. Because of these advantages many employees chose +not to close their PF account even after getting employment else where other than India. +Employees also get a major tax break on their entire contribution to the fund up to a +ceiling of Rs. 70,000/- +read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fund-special-benefits-for-employees @@ -347,7 +398,7 @@ Dedution for Company Provided Transport fix - + @@ -358,13 +409,14 @@ fix - The LWF is applicable to all the members of the organisation except the - Management staff (Staffs having authority to sign on the cheque/official - documents on behalf of the organisation) - Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 - Total Rs 9.00 and deposited to the LWF office. - It is half yearly contribution (June and December) - Attribution: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.html + +The LWF is applicable to all the members of the organisation except the +Management staff (Staffs having authority to sign on the cheque/official +documents on behalf of the organisation). +for e.x. Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 +Total Rs 9.00 and deposited to the LWF office. +It is half yearly contribution (June and December) +read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.html diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index cb9a2d93a81..939dc0b3b79 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -12,6 +12,7 @@ + From 00dd3743f8d1c39b7388078564b9f66acac61c68 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 21 May 2012 12:36:43 +0530 Subject: [PATCH 005/207] [IMP]improved rules for gratuity,leave,uniform,telephone,proffessional developement. And implement method for gratuity rule. bzr revid: kbh@tinyerp.com-20120521070643-523rov1a8v63f13p --- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 37 +++++++++++++++++++ .../l10n_in_hr_payroll_data.xml | 19 +++++++--- .../l10n_in_hr_payroll_view.xml | 1 + 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index f7505257537..ee373b20f3c 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -22,12 +22,49 @@ from osv import fields, osv import decimal_precision as dp +import time +from datetime import datetime +from datetime import timedelta +from datetime import date +from calendar import isleap +from dateutil.relativedelta import relativedelta + class hr_contract_in(osv.osv): _inherit = 'hr.contract' + + def _compute_year(self, cr, uid, ids, fields, args, context=None): + """ + @param cr: the current row, from the database cursor, + @param uid: the current user’s ID for security checks, + @param ids: List of Openday’s IDs + @return: No. of years of experience. + @param context: A standard dictionary for contextual values + """ + res = {} + for contract in self.browse(cr, uid, ids, context=context): + c_date = time.strftime('%Y-%m-%d') + DATETIME_FORMAT = "%Y-%m-%d" + date_start = datetime.strptime(contract.date_start, DATETIME_FORMAT) + current_date = datetime.strptime(c_date,DATETIME_FORMAT) + diffyears = current_date.year - date_start.year + difference = current_date - date_start.replace(current_date.year) + days_in_year = isleap(current_date.year) and 366 or 365 + difference_in_years = diffyears + (difference.days + difference.seconds/86400.0)/days_in_year + years = relativedelta(current_date, date_start).years + months = relativedelta(current_date, date_start).months + mnth = months * 0.01 + if months < 10: + year_month= float(mnth) + float(years) + res[contract.id] = year_month + else: + year_months = float(mnth) + float(years) + res[contract.id] = year_months + return res _columns = { 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll')), + 'No_of_year':fields.function(_compute_year, string='No. of Years of service',type="float",readonly=True), } diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 19500c73e48..101877a9d3b 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -97,7 +97,7 @@ for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/inc Arrears fix - + Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). @@ -112,7 +112,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 none code - result = (categories.NET/26) * 15 * 5 + result = (contract.wage + DA) * 15 * contract.No_of_year / worked_days.WORK100.number_of_days Covered under the Payment of Gratuity Act, 1971: @@ -165,7 +165,7 @@ is to be limited to minimum of all below: Performance Incentive/Bonus fix - + This would be fully taxable based on incentive. @@ -198,7 +198,7 @@ business growth.This part would become non taxable on providing original bills.< Uniform/Dress Allowance fix - + Some sections of employees mat get allowance for purchase of office dress/uniform. @@ -210,7 +210,7 @@ In such case, the component would become non-taxable. Telephone Reimbursement fix - + In some of the cases, companies may provide a component for telephone bills. @@ -220,6 +220,15 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 + + PDA + Professional Development Allowance + + fix + + + + CAR Car Expenses Reimbursement diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index 939dc0b3b79..f09c326bff1 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -13,6 +13,7 @@ + From cf28ac19188994335b59ea50d88d394cd9c1a1d5 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 21 May 2012 18:57:03 +0530 Subject: [PATCH 006/207] [IMP]improved salary rules for allowance and deduction. bzr revid: kbh@tinyerp.com-20120521132703-m1q4s1ccxyp3nr0p --- .../data/hr.salary.rule.csv | 5 - .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 12 +- .../l10n_in_hr_payroll_data.xml | 133 +++++++++++++----- .../l10n_in_hr_payroll_view.xml | 19 ++- 4 files changed, 127 insertions(+), 42 deletions(-) diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv index 2b6b4fbd847..b41229965c8 100644 --- a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -3,8 +3,3 @@ 2,"fix",2,10,,2400,"Education Allowance","Child Education Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", ,,,,,,,,,,,,, ,,,,,,,,,,,,, -5,"fix",0,2999,,0,"Professional Tax for Gujarat","Deduction",121,"PT0","hr_payslip_line_professionaltax_guj","range","categories.GROSS", -6,"fix",3000,5999,,-20,"Professional Tax for Gujarat","Deduction",121,"PT20","hr_payslip_line_professionaltax_guj","range","categories.GROSS", -7,"fix",6000,8999,,-80,"Professional Tax for Gujarat","Deduction",121,"PT80","hr_payslip_line_professionaltax_guj","range","categories.GROSS", -8,"fix",9000,11999,,-150,"Professional Tax for Gujarat","Deduction",121,"PT150","hr_payslip_line_professionaltax_guj","range","categories.GROSS", -9,"fix",12000,1000000,,-200,"Professional Tax for Gujarat","Deduction",121,"PT200","hr_payslip_line_professionaltax_guj","range","categories.GROSS", diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index ee373b20f3c..1a2f25be562 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -63,9 +63,19 @@ class hr_contract_in(osv.osv): _columns = { 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), + 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll')), + 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll')), + 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll')), + 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll')), + 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll')), 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll')), + 'driver_salay': fields.boolean('Driver salary '), + 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll')), + 'leave_avail_dedution': fields.float('leave Avail deduction ', digits_compute=dp.get_precision('Payroll')), 'No_of_year':fields.function(_compute_year, string='No. of Years of service',type="float",readonly=True), - + 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll')), + 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll')), + 'company_transport': fields.float('Company provided transport', digits_compute=dp.get_precision('Payroll')), } hr_contract_in() diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 101877a9d3b..81cb1bcd725 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -54,7 +54,7 @@ Per school going child 1200 per annum is non-taxable. Grade/Special/Management/Supplementary Allowance fix - + This allowance is normally given as an additional benefit to employees and is fully taxable. @@ -209,8 +209,8 @@ In such case, the component would become non-taxable. TELR Telephone Reimbursement - fix - + code + result = 1500 *12 In some of the cases, companies may provide a component for telephone bills. @@ -233,8 +233,8 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 CAR Car Expenses Reimbursement - fix - + code + result = 1800 * 12 In case company provides component for this and employee use self owned car for official @@ -248,7 +248,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 Internet Expense fix - + Employer may also provide reimbursement of internet expenses and thus this would become non taxable. @@ -257,11 +257,10 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 DRI Driver Salary + python + result = bool(contract.driver_salay) fix - python - result = bool(employee.vehicle) - Rs. 900 per month (non taxable) @@ -271,7 +270,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 Gifts From Non-Relatives fix - + gift gift is from non relatives person worth more than Rs.50000, @@ -283,7 +282,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, Gifts From Relatives fix - + gift is from relaives whould be non taxable with no limits. @@ -293,10 +292,22 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, House Rent Income fix - - Income from house property + + python + result = bool(contract.house_rent_income) - 30% of the rental income can be reduced as a standard deduction + Income from house property.30% of the rental income can be reduced as a standard deduction + + + + SBAI + Saving Bank Account Interest + + code + result = contract.saving_bank_account + python + result = bool(contract.saving_bank_account) + @@ -313,19 +324,30 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, Other Income python - result = bool(contract.others) + result = bool(contract.other_income) code - result = contract.others + result = contract.other_income Bank account/NSC/Post Office/SCSS interest + + AI + Agricultural Income + + fix + + + + STG Short Term Gains from Share Trading/Equity MFs - fix - + code + result = contract.short_term_gain + python + result = bool(contract.short_term_gain) If stocks/equity mutual funds are sold before one year, @@ -337,8 +359,10 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 LTG Long Term Gains from Share Trading/Equity MFs - fix - + code + result = contract.long_term_gain + python + result = bool(contract.long_term_gain) If stocks/equity mutual funds are kept for more than a year before sale, @@ -349,13 +373,15 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 - - PTG - Professional Tax for Gujarat + + PT + Professional Tax - fix + python + result = bool(contract.professional_tax) + code + result = -(contract.professional_tax) - Professional tax for company should be paid on or before 30th sept, @@ -385,8 +411,10 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 VPF Voluntarily Provident Fund Contribution - fix - + python + result = bool(contract.voluntarily_provident_fund) + code + result = -(contract.voluntarily_provident_fund) VPF is a safe option wherein you can contribute more than the PF ceiling of 12% @@ -406,8 +434,10 @@ read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fun CPT Dedution for Company Provided Transport - fix - + python + result = bool(contract.company_transport) + code + result = -(contract.company_transport) @@ -416,7 +446,7 @@ read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fun Dedution Towards State Labour Welfare Fund fix - + The LWF is applicable to all the members of the organisation except the @@ -433,7 +463,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm Dedution Towards Company Provided Group Term Insurance fix - + @@ -441,8 +471,10 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm DLA Dedution Towards Leave Availed - fix - + python + result = bool(contract.leave_avail_dedution) + code + result = -(contract.leave_avail_dedution) @@ -450,7 +482,10 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm CMT Dedution Towards Company Provided Medical Insurance - fix + python + result = bool(contract.medical_insurance) + code + result = - (contract.medical_insurance) @@ -469,9 +504,37 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm Employer's PF Contribution code - result = (rules.PF.amount_percentage * contract.wage)/100 + result = (contract.wage + DA) * 0.12 + + + EPFC + Employee's PF Contribution + + code + result = (contract.wage + DA) / 8.33 + + + + + ENPC + Employer's NPS Contribution + + code + result = (contract.wage + DA) * 0.10 + + + + + ENPFC + Employee's NPS Contribution + + code + result = (contract.wage + DA) * 0.10 + + + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index f09c326bff1..b6096873748 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -11,9 +11,26 @@ - + + + + + + + + + + + + + + + + + + From d2d7cd1292c260a2aae4a459e85784d66e14b6dd Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 22 May 2012 11:19:59 +0530 Subject: [PATCH 007/207] [IMP]improved salary rules for VPF,LTA,medical Allowance,howse income. bzr revid: kbh@tinyerp.com-20120522054959-s95pc1goslo28t38 --- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 2 +- .../l10n_in_hr_payroll_data.xml | 32 +++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 1a2f25be562..f093fefced3 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -74,7 +74,7 @@ class hr_contract_in(osv.osv): 'leave_avail_dedution': fields.float('leave Avail deduction ', digits_compute=dp.get_precision('Payroll')), 'No_of_year':fields.function(_compute_year, string='No. of Years of service',type="float",readonly=True), 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll')), - 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll')), + 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll'),help="it is computed as percentage.(%)"), 'company_transport': fields.float('Company provided transport', digits_compute=dp.get_precision('Payroll')), } diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 81cb1bcd725..0d8d18b5e80 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -125,9 +125,8 @@ number of years of service (date of joining – date of retirement/leaving job) LTA Leave Travel Allowance - percentage - contract.wage - + fix + 1666 As per Income tax rules of India, if transport bills for LTA are not provided, @@ -175,7 +174,7 @@ is to be limited to minimum of all below: Medical Reimbursement fix - + This component is on-taxable up to 15000 per year (or Rs 1250 per month) on producing medical bills. @@ -209,8 +208,8 @@ In such case, the component would become non-taxable. TELR Telephone Reimbursement - code - result = 1500 *12 + fix + 1500 In some of the cases, companies may provide a component for telephone bills. @@ -233,8 +232,8 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 CAR Car Expenses Reimbursement - code - result = 1800 * 12 + fix + 1800 In case company provides component for this and employee use self owned car for official @@ -291,10 +290,9 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, HRI House Rent Income - fix - - python - result = bool(contract.house_rent_income) + code + result = contract.house_rent_income + none Income from house property.30% of the rental income can be reduced as a standard deduction @@ -414,7 +412,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 python result = bool(contract.voluntarily_provident_fund) code - result = -(contract.voluntarily_provident_fund) + result = -(contract.wage + DA) * contract.voluntarily_provident_fund / 100 VPF is a safe option wherein you can contribute more than the PF ceiling of 12% @@ -504,7 +502,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm Employer's PF Contribution code - result = (contract.wage + DA) * 0.12 + result = - (contract.wage + DA) * 0.12 @@ -513,7 +511,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm Employee's PF Contribution code - result = (contract.wage + DA) / 8.33 + result = - (contract.wage + DA) * 8.33 / 100 @@ -522,7 +520,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm Employer's NPS Contribution code - result = (contract.wage + DA) * 0.10 + result = - (contract.wage + DA) * 0.10 @@ -531,7 +529,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm Employee's NPS Contribution code - result = (contract.wage + DA) * 0.10 + result = - (contract.wage + DA) * 0.10 From cf88acabfa7c1e18f9f88c0497d8eec135ac7dbd Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 11:15:19 +0530 Subject: [PATCH 008/207] [IMP]improved salary rules,descriptions for rules, fields tooltip,gratuity calculation method,code for rules. bzr revid: kbh@tinyerp.com-20120523054519-bdrmcnryfvj30j99 --- addons/hr_payroll/hr_payroll_demo.xml | 17 ++- addons/hr_payroll/test/payslip.yml | 4 +- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 78 +++++++------ .../l10n_in_hr_payroll_data.xml | 107 ++++-------------- .../l10n_in_hr_payroll_view.xml | 16 ++- .../security/hr.salary.rule.csv | 1 - 6 files changed, 92 insertions(+), 131 deletions(-) diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index d3826773e7d..7fd266c628b 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -23,15 +23,14 @@ - HRA_M + HRAM code result = (contract.wage + DA) * 0.50 House Rent Allowance for metro city - -Rent receipts can be shown for taking tax benefit for living in a rented house. + Rent receipts can be shown for taking tax benefit for living in a rented house. Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. 2. 40% (if living in non-metro area). @@ -43,13 +42,12 @@ Income tax exemption for HRA will be least of following: code result = (contract.wage + DA) * 0.40 - HRA_NONM + HRANM House Rent Allowance for non metro city - -Rent receipts can be shown for taking tax benefit for living in a rented house. + Rent receipts can be shown for taking tax benefit for living in a rented house. Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). @@ -75,8 +73,7 @@ Income tax exemption for HRA will be least of following: Professional Tax - -Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. + Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uugbJcaM @@ -142,7 +139,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 ME Marketing Executive - + @@ -150,7 +147,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 MEQP Marketing Executive for Quentin Paolino - + diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml index c3ad3a1a85c..e44cfcaa325 100644 --- a/addons/hr_payroll/test/payslip.yml +++ b/addons/hr_payroll/test/payslip.yml @@ -17,11 +17,11 @@ code: SD company_id: base.main_company rule_ids: - - hr_salary_rule_houserentallowance1 + - hr_salary_rule_houserentallowancemetro - hr_salary_rule_convanceallowance1 - hr_salary_rule_professionaltax1 - hr_salary_rule_providentfund1 - - hr_salary_rule_meal_voucher + - hr_salary_rule_food_coupon - hr_salary_rule_sales_commission - I create a contract for "Richard" diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index f093fefced3..3e3fcaa0006 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -23,11 +23,11 @@ from osv import fields, osv import decimal_precision as dp import time -from datetime import datetime -from datetime import timedelta -from datetime import date +from datetime import datetime, timedelta, date from calendar import isleap from dateutil.relativedelta import relativedelta +from bsddb.dbtables import _columns +from epsilon.hotfix import require class hr_contract_in(osv.osv): _inherit = 'hr.contract' @@ -41,43 +41,53 @@ class hr_contract_in(osv.osv): @param context: A standard dictionary for contextual values """ res = {} - for contract in self.browse(cr, uid, ids, context=context): - c_date = time.strftime('%Y-%m-%d') - DATETIME_FORMAT = "%Y-%m-%d" - date_start = datetime.strptime(contract.date_start, DATETIME_FORMAT) - current_date = datetime.strptime(c_date,DATETIME_FORMAT) - diffyears = current_date.year - date_start.year - difference = current_date - date_start.replace(current_date.year) - days_in_year = isleap(current_date.year) and 366 or 365 - difference_in_years = diffyears + (difference.days + difference.seconds/86400.0)/days_in_year - years = relativedelta(current_date, date_start).years - months = relativedelta(current_date, date_start).months - mnth = months * 0.01 - if months < 10: - year_month= float(mnth) + float(years) - res[contract.id] = year_month - else: - year_months = float(mnth) + float(years) - res[contract.id] = year_months + c_date = time.strftime('%Y-%m-%d') + DATETIME_FORMAT = "%Y-%m-%d" + current_date = datetime.strptime(c_date,DATETIME_FORMAT) + employee_pool = self.pool.get('hr.employee') + for contract in self.browse(cr, uid, ids, context): + employee = employee_pool.browse(cr, uid, contract.employee_id.id, context=context) + if employee.join_date: + date_start = datetime.strptime(employee.join_date, DATETIME_FORMAT) + diffyears = current_date.year - date_start.year + difference = current_date - date_start.replace(current_date.year) + days_in_year = isleap(current_date.year) and 366 or 365 + difference_in_years = diffyears + (difference.days + difference.seconds/86400.0)/days_in_year + total_years = relativedelta(current_date, date_start).years + total_months = relativedelta(current_date, date_start).months + if total_months < 10: + year_month= float(total_months)/10 + float(total_years) + res[contract.id] = year_month + else: + year_months = float(total_months)/100 + float(total_years) + res[contract.id] = year_months return res _columns = { 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), - 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll')), - 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll')), - 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll')), - 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll')), - 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll')), - 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll')), - 'driver_salay': fields.boolean('Driver salary '), - 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll')), - 'leave_avail_dedution': fields.float('leave Avail deduction ', digits_compute=dp.get_precision('Payroll')), - 'No_of_year':fields.function(_compute_year, string='No. of Years of service',type="float",readonly=True), - 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll')), - 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll'),help="it is computed as percentage.(%)"), - 'company_transport': fields.float('Company provided transport', digits_compute=dp.get_precision('Payroll')), + 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'),help="Income from house property."), + 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'),help="saving income for bank account."), + 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'),help="Other income of employee."), + 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'),help="stocks/equity mutual funds are sold before one year."), + 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'),help="stocks/equity mutual funds are kept for more than a year."), + 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'),help="amount of food coupon per day"), + 'driver_salay': fields.boolean('Driver salary',help="if checked,driver get fixed salary per month."), + 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll'),help="Professional tax deducted from salary"), + 'leave_avail_dedution': fields.float('leave availed deduction ', digits_compute=dp.get_precision('Payroll'),help="emergency leave of employee"), + 'number_of_year':fields.function(_compute_year, string='No. of Years of service',type="float",help="Total number of years and months of employee has work in company",store=True), + 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'),help="Deduction towards company provided medical insurance"), + 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll'),help="VPF computed as percentage.(%)"), + 'company_transport': fields.float('Company provided transport', digits_compute=dp.get_precision('Payroll'),help="Deduction for company provided transport."), } hr_contract_in() + +class hr_employee(osv.osv): + _inherit = 'hr.employee' + _columns = { + 'join_date': fields.date('Join date',help="join date of employee in company",required=True) + } +hr_employee() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 0d8d18b5e80..71ef017b838 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -9,7 +9,6 @@ CEA - @@ -20,8 +19,7 @@ contract.wage - -DA is calculated in % + DA is calculated in % for more details:http://www.citehr.com/26809-how-calculate-dearness-allowance-da.html @@ -32,9 +30,8 @@ for more details:http://www.citehr.com/26809-how-calculate-dearness-allowance-da fix none - -Per school going child 1200 per annum is non-taxable. - Maximum for 2 children, so max 2400 per annum becomes non-taxable. + Per school going child 1200 per annum is non-taxable. +Maximum for 2 children, so max 2400 per annum becomes non-taxable. @@ -50,14 +47,13 @@ Per school going child 1200 per annum is non-taxable. - MGMTA + SA Grade/Special/Management/Supplementary Allowance fix - -This allowance is normally given as an additional benefit to employees and is fully taxable. + This allowance is normally given as an additional benefit to employees and is fully taxable. for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/income-tax-guides/tax-implications-of-salary-components.php @@ -99,8 +95,7 @@ for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/inc fix - -Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). + Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). One would need to compute income tax on the arrears if it would have been received in actual year. Now difference of income tax between payment year and actual year would be allowed for deduction. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uurtGGGd @@ -112,10 +107,9 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 none code - result = (contract.wage + DA) * 15 * contract.No_of_year / worked_days.WORK100.number_of_days + result = (contract.wage + DA) * 15 * contract.number_of_year / worked_days.WORK100.number_of_days - -Covered under the Payment of Gratuity Act, 1971: + Covered under the Payment of Gratuity Act, 1971: (Last drawn monthly basic salary + dearness allowance)/26 x 15 days x number of years of service (date of joining – date of retirement/leaving job) @@ -128,13 +122,7 @@ number of years of service (date of joining – date of retirement/leaving job) fix 1666 - -As per Income tax rules of India, if transport bills for LTA are not provided, -the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 -in his CTC(cost to company),and he provides proofs of Rs 40,000 (boarding pass, -air tickets, taxi vouchers) then income tax will be deducted for rest of the -Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, -income tax laws only permits domestic air tickets only for LTA claim. + As per Income tax rules of India, if transport bills for LTA are not provided,the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 in his CTC(cost to company),and he provides proofs of Rs 40,000 (boarding pass,air tickets, taxi vouchers) then income tax will be deducted for rest of the Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, income tax laws only permits domestic air tickets only for LTA claim. Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-not-required-supreme-court-india-ruling/#ixzz1uutlHSez @@ -146,11 +134,7 @@ Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-n fix 0.0 - -Payment by way of leave encashment received by Central and State Govt. -employees at the time of retirement in respect of the period of earned -leave at credit is fully exempt. In case of other employees, the exemption -is to be limited to minimum of all below: + Payment by way of leave encashment received by Central and State Govt.employees at the time of retirement in respect of the period of earned leave at credit is fully exempt. In case of other employees, the exemption is to be limited to minimum of all below: 1.The actual amount received 2.The cash equivalent of leave balance (max 30 days per year of service) 3.Maximum of 10 months of leave encashment, based on last 10 months average salary @@ -186,10 +170,7 @@ is to be limited to minimum of all below: fix - -Some employers may provide component for buying magazines, -journals and books as a part of knowledge enhancement for -business growth.This part would become non taxable on providing original bills. + Some employers may provide component for buying magazines, journals and books as a part of knowledge enhancement for business growth.This part would become non taxable on providing original bills. @@ -199,9 +180,7 @@ business growth.This part would become non taxable on providing original bills.< fix - -Some sections of employees mat get allowance for purchase of office dress/uniform. -In such case, the component would become non-taxable. + Some sections of employees mat get allowance for purchase of office dress/uniform.In such case, the component would become non-taxable. @@ -211,10 +190,7 @@ In such case, the component would become non-taxable. fix 1500 - -In some of the cases, companies may provide a component for telephone bills. -Employees may provide actual phone usage bills to reimburse this component -and make it non-taxable. + In some of the cases, companies may provide a component for telephone bills.Employees may provide actual phone usage bills to reimburse this component and make it non-taxable. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A @@ -235,10 +211,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 fix 1800 - -In case company provides component for this and employee use self owned car for official -and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or -can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. + In case company provides component for this and employee use self owned car for official and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuw12Cjj @@ -271,8 +244,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 fix - -gift gift is from non relatives person worth more than Rs.50000, + Gift is from non relatives person worth more than Rs.50000, one is liable to pay the tax what ever he received excess of the limit or Rs 50,000. @@ -294,7 +266,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = contract.house_rent_income none - Income from house property.30% of the rental income can be reduced as a standard deduction + Income from house property.30% of the rental income can be reduced as a standard deduction. @@ -309,7 +281,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - TA + TCA Transport/Conveyance Allownace fix @@ -347,9 +319,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, python result = bool(contract.short_term_gain) - -If stocks/equity mutual funds are sold before one year, -15% tax would be payable on such gains. STT should have been on transaction. + If stocks/equity mutual funds are sold before one year, 15% tax would be payable on such gains. STT should have been on transaction. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwSxEvI @@ -362,11 +332,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 python result = bool(contract.long_term_gain) - -If stocks/equity mutual funds are kept for more than a year before sale, -it would be long term gains and such gains would be fully exempt from income tax. -Securities transaction tax (STT) must have been paid on transactions for availing -this exemption. + If stocks/equity mutual funds are kept for more than a year before sale,it would be long term gains and such gains would be fully exempt from income tax. Securities transaction tax (STT) must have been paid on transactions for availing this exemption. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwtRkCT @@ -381,9 +347,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 result = -(contract.professional_tax) - -Professional tax for company should be paid on or before 30th sept, -The amount is Rs.2000 per year.There is no payment form to be filled. + Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. Read more: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#ixzz1uuyvgt2L @@ -396,12 +360,7 @@ Read more: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#i code result = -(contract.tds) - -As per income tax rules, all payment which are taxable in nature should be -done after deduction of taxes at the source itself. Hence employer compute -income tax on salary payment and deduct it every month. This TDS is based -on employee’s saving/investment declaration at the start of year. If investments -for tax saving is not done, large amount may be deducted in last few months. + As per income tax rules, all payment which are taxable in nature should be done after deduction of taxes at the source itself. Hence employer compute income tax on salary payment and deduct it every month. This TDS is based on employee’s saving/investment declaration at the start of year. If investments for tax saving is not done, large amount may be deducted in last few months. Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uv0gPhgQ @@ -414,17 +373,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 code result = -(contract.wage + DA) * contract.voluntarily_provident_fund / 100 - -VPF is a safe option wherein you can contribute more than the PF ceiling of 12% -that has been mandated by the government. This additional amount enjoys all the -benefits of PF except that the employer is not liable to contribute any extra amount -apart from 12%. An added advantage is that the interest rate is equal to the interest -rate of PF and the withdrawal is tax free. Please note that the maximum contribution -towards VPF is 100% of your Basic. The highest rate of interest (close to 9%) makes -it a very attractive saving scheme. Because of these advantages many employees chose -not to close their PF account even after getting employment else where other than India. -Employees also get a major tax break on their entire contribution to the fund up to a -ceiling of Rs. 70,000/- + VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government.This additional amount enjoys all the benefits of PF except that the employer is not liable to contribute any extra amount apart from 12%.An added advantage is that the interest rate is equal to the interest rate of PF and he withdrawal is tax free. Please note that the maximum contribution towards VPF is 100% of your Basic.The highest rate of interest (close to 9%) makes it a very attractive saving scheme. Because of these advantages many employees chose not to close their PF account even after getting employment else where other than India.Employees also get a major tax break on their entire contribution to the fund up to a ceiling of Rs. 70,000/- read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fund-special-benefits-for-employees @@ -446,13 +395,7 @@ read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fun fix - -The LWF is applicable to all the members of the organisation except the -Management staff (Staffs having authority to sign on the cheque/official -documents on behalf of the organisation). -for e.x. Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 -Total Rs 9.00 and deposited to the LWF office. -It is half yearly contribution (June and December) + The LWF is applicable to all the members of the organisation except the Management staff (Staffs having authority to sign on the cheque/official documents on behalf of the organisation). for e.x. Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 Total Rs 9.00 and deposited to the LWF office.It is half yearly contribution (June and December) read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.html @@ -498,7 +441,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm - EPC + EPF Employer's PF Contribution code @@ -507,7 +450,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm - EPFC + EPMF Employee's PF Contribution code diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index b6096873748..6e8ad07d37c 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -12,7 +12,7 @@ - + @@ -35,6 +35,18 @@ - + + hr.employee.form.inherit + hr.employee + form + + + + + + + + + diff --git a/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv index f18a77cd01b..0015ef665b0 100644 --- a/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/security/hr.salary.rule.csv @@ -1,3 +1,2 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_salary_head","hr.salary.head","model_hr_salary_head","base.group_hr_user",1,1,1,1 "access_hr_salary_rule","hr.salary.rule","model_hr_salary_rule","base.group_hr_user",1,1,1,1 From 5f3e8f9c92c0c3b5db05fafd9db24ed36754afd9 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 11:42:03 +0530 Subject: [PATCH 009/207] [IMP]improved salary rule for child hostel allowance. bzr revid: kbh@tinyerp.com-20120523061203-rwgfx6opd07t1r9g --- addons/l10n_in_hr_payroll/data/hr.salary.rule.csv | 3 +++ addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py | 4 ++-- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml | 11 +++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv index b41229965c8..8a563d762e4 100644 --- a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -2,4 +2,7 @@ 1,"fix",1,1,,1200,"Education Allowance","Child Education Allowance",23,"CHEAONE","hr_payroll_rule_child1","range","employee.children", 2,"fix",2,10,,2400,"Education Allowance","Child Education Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", ,,,,,,,,,,,,, +3,"fix",1,1,,300,"Child Hostel Allowance","Child Education Allowance",26,"CHOONE","hr_payroll_rule_child2","range","employee.children", +4,"fix",2,10,,600,"Child Hostel Allowance","Child Education Allowance",27,"CHOTWO","hr_payroll_rule_child2","range","employee.children", + ,,,,,,,,,,,,, diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 3e3fcaa0006..3ec0d50cf0a 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -59,8 +59,8 @@ class hr_contract_in(osv.osv): year_month= float(total_months)/10 + float(total_years) res[contract.id] = year_month else: - year_months = float(total_months)/100 + float(total_years) - res[contract.id] = year_months + year_months = float(total_months)/100 + float(total_years) + res[contract.id] = year_months return res _columns = { diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 71ef017b838..77124d8c419 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -45,6 +45,17 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. + + CHEAH + Child Hostel Allowance + + + python + result = bool(employee.children) + fix + In case the children are in hostel, the exemption available is Rs.300 per month per child for up to 2 children. + + SA From 48e4dd20ce7486251721e7182e24667026984924 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 12:24:47 +0530 Subject: [PATCH 010/207] [IMP]removed unnecessary category of salary rule,changed category_id for child allowance. bzr revid: kbh@tinyerp.com-20120523065447-cl7f1xuav7z9p1uj --- addons/l10n_in_hr_payroll/data/hr.salary.rule.csv | 8 ++++---- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml | 7 ------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv index 8a563d762e4..0877a73d02a 100644 --- a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -1,8 +1,8 @@ "id","amount_select","condition_range_min","condition_range_max","amount_percentage","amount_fix","name","category_id","sequence","code","parent_rule_id/id","condition_select","condition_range","amount_percentage_base" -1,"fix",1,1,,1200,"Education Allowance","Child Education Allowance",23,"CHEAONE","hr_payroll_rule_child1","range","employee.children", -2,"fix",2,10,,2400,"Education Allowance","Child Education Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", +1,"fix",1,1,,1200,"Education Allowance","Allowance",23,"CHEAONE","hr_payroll_rule_child1","range","employee.children", +2,"fix",2,10,,2400,"Education Allowance","Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", ,,,,,,,,,,,,, -3,"fix",1,1,,300,"Child Hostel Allowance","Child Education Allowance",26,"CHOONE","hr_payroll_rule_child2","range","employee.children", -4,"fix",2,10,,600,"Child Hostel Allowance","Child Education Allowance",27,"CHOTWO","hr_payroll_rule_child2","range","employee.children", +3,"fix",1,1,,300,"Child Hostel Allowance","Allowance",26,"CHOONE","hr_payroll_rule_child2","range","employee.children", +4,"fix",2,10,,600,"Child Hostel Allowance","Allowance",27,"CHOTWO","hr_payroll_rule_child2","range","employee.children", ,,,,,,,,,,,,, diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 77124d8c419..56d6f97f98c 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -2,13 +2,6 @@ - - - - Child Education Allowance - CEA - - From c6410d12582767019039c4d0db072d3415112b79 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 12:59:45 +0530 Subject: [PATCH 011/207] [IMP]improve method for gratuity rule. bzr revid: kbh@tinyerp.com-20120523072945-2gtphj2fageseg7g --- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 57 +++++++++---------- .../l10n_in_hr_payroll_data.xml | 2 +- .../l10n_in_hr_payroll_view.xml | 2 +- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 3ec0d50cf0a..e4b485a08aa 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -31,6 +31,28 @@ from epsilon.hotfix import require class hr_contract_in(osv.osv): _inherit = 'hr.contract' + + _columns = { + 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), + 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'),help="Income from house property."), + 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'),help="Saving income for bank account."), + 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'),help="Other income of employee."), + 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'),help="Stocks/equity mutual funds are sold before one year."), + 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'),help="Stocks/equity mutual funds are kept for more than a year."), + 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'),help="Amount of food coupon per day."), + 'driver_salay': fields.boolean('Driver Salary',help="If checked,driver get fixed salary per month."), + 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll'),help="Professional tax deducted from salary"), + 'leave_avail_dedution': fields.float('Leave Availed Deduction ', digits_compute=dp.get_precision('Payroll'),help="Deduction for emergency leave of employee."), + 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'),help="Deduction towards company provided medical insurance."), + 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll'),help="VPF computed as percentage.(%)"), + 'company_transport': fields.float('Company Provided Transport', digits_compute=dp.get_precision('Payroll'),help="Deduction for company provided transport."), + } + +hr_contract_in() + + +class hr_employee(osv.osv): + _inherit = 'hr.employee' def _compute_year(self, cr, uid, ids, fields, args, context=None): """ @@ -44,9 +66,7 @@ class hr_contract_in(osv.osv): c_date = time.strftime('%Y-%m-%d') DATETIME_FORMAT = "%Y-%m-%d" current_date = datetime.strptime(c_date,DATETIME_FORMAT) - employee_pool = self.pool.get('hr.employee') - for contract in self.browse(cr, uid, ids, context): - employee = employee_pool.browse(cr, uid, contract.employee_id.id, context=context) + for employee in self.browse(cr, uid, ids, context): if employee.join_date: date_start = datetime.strptime(employee.join_date, DATETIME_FORMAT) diffyears = current_date.year - date_start.year @@ -57,36 +77,15 @@ class hr_contract_in(osv.osv): total_months = relativedelta(current_date, date_start).months if total_months < 10: year_month= float(total_months)/10 + float(total_years) - res[contract.id] = year_month + res[employee.id] = year_month else: year_months = float(total_months)/100 + float(total_years) - res[contract.id] = year_months + res[employee.id] = year_months return res - + _columns = { - 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), - 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'),help="Income from house property."), - 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'),help="saving income for bank account."), - 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'),help="Other income of employee."), - 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'),help="stocks/equity mutual funds are sold before one year."), - 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'),help="stocks/equity mutual funds are kept for more than a year."), - 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'),help="amount of food coupon per day"), - 'driver_salay': fields.boolean('Driver salary',help="if checked,driver get fixed salary per month."), - 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll'),help="Professional tax deducted from salary"), - 'leave_avail_dedution': fields.float('leave availed deduction ', digits_compute=dp.get_precision('Payroll'),help="emergency leave of employee"), - 'number_of_year':fields.function(_compute_year, string='No. of Years of service',type="float",help="Total number of years and months of employee has work in company",store=True), - 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'),help="Deduction towards company provided medical insurance"), - 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll'),help="VPF computed as percentage.(%)"), - 'company_transport': fields.float('Company provided transport', digits_compute=dp.get_precision('Payroll'),help="Deduction for company provided transport."), - } - -hr_contract_in() - - -class hr_employee(osv.osv): - _inherit = 'hr.employee' - _columns = { - 'join_date': fields.date('Join date',help="join date of employee in company",required=True) + 'join_date': fields.date('Join Date',help="joining date of employee "), + 'number_of_year':fields.function(_compute_year, string='No. of Years of Service',type="float",help="Total years of work experience.",store=True), } hr_employee() diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 56d6f97f98c..03f4fc164f4 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -111,7 +111,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 none code - result = (contract.wage + DA) * 15 * contract.number_of_year / worked_days.WORK100.number_of_days + result = (contract.wage + DA) * 15 * employee.number_of_year / worked_days.WORK100.number_of_days Covered under the Payment of Gratuity Act, 1971: (Last drawn monthly basic salary + dearness allowance)/26 x 15 days x diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index 6e8ad07d37c..750965d09ce 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -12,7 +12,6 @@ - @@ -44,6 +43,7 @@ + From b7e6823cf6e0fc73a1b356a3821a1916e8365fb8 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 14:33:31 +0530 Subject: [PATCH 012/207] [IMP]remove unnessesary import and variable. bzr revid: kbh@tinyerp.com-20120523090331-gibnbltx5a5nvhli --- addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index e4b485a08aa..9e74c925d01 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -19,15 +19,12 @@ # ############################################################################## -from osv import fields, osv -import decimal_precision as dp - import time from datetime import datetime, timedelta, date from calendar import isleap from dateutil.relativedelta import relativedelta -from bsddb.dbtables import _columns -from epsilon.hotfix import require +from osv import fields, osv +import decimal_precision as dp class hr_contract_in(osv.osv): _inherit = 'hr.contract' @@ -77,10 +74,9 @@ class hr_employee(osv.osv): total_months = relativedelta(current_date, date_start).months if total_months < 10: year_month= float(total_months)/10 + float(total_years) - res[employee.id] = year_month else: - year_months = float(total_months)/100 + float(total_years) - res[employee.id] = year_months + year_month = float(total_months)/100 + float(total_years) + res[employee.id] = year_month return res _columns = { From 2672c529790c48faef2abb771640c6c03d1f60e8 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 17:42:10 +0530 Subject: [PATCH 013/207] [IMP]improved method for gratuity,added House rent Allowance rule and food coupon rule,added Contribution Register. bzr revid: kbh@tinyerp.com-20120523121210-qy0sv0xq2be1v7gw --- addons/hr_payroll/hr_payroll_demo.xml | 56 ----------------- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 43 +++++++------ .../l10n_in_hr_payroll_data.xml | 62 ++++++++++++++++++- .../l10n_in_hr_payroll_view.xml | 2 +- 4 files changed, 85 insertions(+), 78 deletions(-) diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index 7fd266c628b..76189c85306 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -4,10 +4,6 @@ - - House Rent Allowance Register - - Provident Fund Register @@ -16,46 +12,8 @@ Professional Tax Register - - Food coupon Register - - - - HRAM - code - result = (contract.wage + DA) * 0.50 - - - House Rent Allowance for metro city - - Rent receipts can be shown for taking tax benefit for living in a rented house. -Income tax exemption for HRA will be least of following: - 1. The actual amount of HRA received as a part of salary. - 2. 40% (if living in non-metro area). - 3. Rent paid minus 10% of (basic salary+DA). - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 - - - - - code - result = (contract.wage + DA) * 0.40 - HRANM - - - House Rent Allowance for non metro city - - Rent receipts can be shown for taking tax benefit for living in a rented house. -Income tax exemption for HRA will be least of following: - 1. The actual amount of HRA received as a part of salary. - 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). - 3. Rent paid minus 10% of (basic salary+DA). - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 - - - fix @@ -97,20 +55,6 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 - - code - - worked_days.WORK100.number_of_days - FC - - - python - result = bool(contract.food_coupon_amount) - Food Coupons - result = worked_days.WORK100.number_of_days * contract.food_coupon_amount - - - code SALE diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 9e74c925d01..bb149ba4b19 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -20,29 +20,31 @@ ############################################################################## import time -from datetime import datetime, timedelta, date +from datetime import datetime, timedelta from calendar import isleap from dateutil.relativedelta import relativedelta + from osv import fields, osv import decimal_precision as dp class hr_contract_in(osv.osv): _inherit = 'hr.contract' - + _description = 'contract' + _columns = { 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll')), - 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'),help="Income from house property."), - 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'),help="Saving income for bank account."), - 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'),help="Other income of employee."), - 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'),help="Stocks/equity mutual funds are sold before one year."), - 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'),help="Stocks/equity mutual funds are kept for more than a year."), - 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'),help="Amount of food coupon per day."), - 'driver_salay': fields.boolean('Driver Salary',help="If checked,driver get fixed salary per month."), - 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll'),help="Professional tax deducted from salary"), - 'leave_avail_dedution': fields.float('Leave Availed Deduction ', digits_compute=dp.get_precision('Payroll'),help="Deduction for emergency leave of employee."), - 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'),help="Deduction towards company provided medical insurance."), - 'voluntarily_provident_fund': fields.float('Voluntarily Provident Fund', digits_compute=dp.get_precision('Payroll'),help="VPF computed as percentage.(%)"), - 'company_transport': fields.float('Company Provided Transport', digits_compute=dp.get_precision('Payroll'),help="Deduction for company provided transport."), + 'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'), help="Income from house property."), + 'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'), help="Saving income for bank account."), + 'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'), help="Other income of employee."), + 'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'), help="Stocks/equity mutual funds are sold before one year."), + 'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'), help="Stocks/equity mutual funds are kept for more than a year."), + 'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'), help="Amount of food coupon per day."), + 'driver_salay': fields.boolean('Driver Salary', help=" Allowance for company provided driver."), + 'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll'), help="Professional tax deducted from salary"), + 'leave_avail_dedution': fields.float('Leave Availed Deduction ', digits_compute=dp.get_precision('Payroll'), help="Deduction for emergency leave of employee."), + 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance."), + 'voluntary_provident_fund': fields.float('Voluntary Provident Fund', digits_compute=dp.get_precision('Payroll'), help="VPF computed as percentage.(%)"), + 'company_transport': fields.float('Company Provided Transport', digits_compute=dp.get_precision('Payroll'), help="Deduction for company provided transport."), } hr_contract_in() @@ -50,7 +52,8 @@ hr_contract_in() class hr_employee(osv.osv): _inherit = 'hr.employee' - + _description = 'employee' + def _compute_year(self, cr, uid, ids, fields, args, context=None): """ @param cr: the current row, from the database cursor, @@ -63,7 +66,7 @@ class hr_employee(osv.osv): c_date = time.strftime('%Y-%m-%d') DATETIME_FORMAT = "%Y-%m-%d" current_date = datetime.strptime(c_date,DATETIME_FORMAT) - for employee in self.browse(cr, uid, ids, context): + for employee in self.browse(cr, uid, ids, context=context): if employee.join_date: date_start = datetime.strptime(employee.join_date, DATETIME_FORMAT) diffyears = current_date.year - date_start.year @@ -73,15 +76,15 @@ class hr_employee(osv.osv): total_years = relativedelta(current_date, date_start).years total_months = relativedelta(current_date, date_start).months if total_months < 10: - year_month= float(total_months)/10 + float(total_years) + year_month= float(total_months)/10 + total_years else: - year_month = float(total_months)/100 + float(total_years) + year_month = float(total_months)/100 + total_years res[employee.id] = year_month return res _columns = { - 'join_date': fields.date('Join Date',help="joining date of employee "), - 'number_of_year':fields.function(_compute_year, string='No. of Years of Service',type="float",help="Total years of work experience.",store=True), + 'join_date': fields.date('Join Date', help="joining date of employee "), + 'number_of_year':fields.function(_compute_year, string='No. of Years of Service', type="float", help="Total years of work experience."), } hr_employee() diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 03f4fc164f4..203a6a9c82d 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -1,9 +1,66 @@ + + + + House Rent Allowance Register + + + + Food coupon Register + + + HRAM + code + result = (contract.wage + DA) * 0.50 + + + House Rent Allowance for metro city + + Rent receipts can be shown for taking tax benefit for living in a rented house. +Income tax exemption for HRA will be least of following: + 1. The actual amount of HRA received as a part of salary. + 2. 40% (if living in non-metro area). + 3. Rent paid minus 10% of (basic salary+DA). + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + + + + + code + result = (contract.wage + DA) * 0.40 + HRANM + + + House Rent Allowance for non metro city + + Rent receipts can be shown for taking tax benefit for living in a rented house. +Income tax exemption for HRA will be least of following: + 1. The actual amount of HRA received as a part of salary. + 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). + 3. Rent paid minus 10% of (basic salary+DA). + Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + + + + + code + + worked_days.WORK100.number_of_days + FC + + + python + result = bool(contract.food_coupon_amount) + Food Coupons + result = worked_days.WORK100.number_of_days * contract.food_coupon_amount + + + DA Dearness Allowance @@ -451,6 +508,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm code result = - (contract.wage + DA) * 0.12 + Both the employees and employer contribute to the fund at the rate of 12% of the basic wages, dearness allowance and retaining allowance, if any, payable to employees per month. @@ -459,6 +517,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm code result = - (contract.wage + DA) * 8.33 / 100 + Employer contribution does not become part of employee’s income and hence income tax is not payable on this part. @@ -469,6 +528,7 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm code result = - (contract.wage + DA) * 0.10 + Any amount contributed by your employer to your NPS account is treated as part of your salary and is included in your income but you can claim deduction under Section 80C for this too.thus, effectively making it exempt from tax within the limit of 10% of your basic salary. This is very useful and tax efficient for you particularly if you fall in the maximum tax. @@ -478,8 +538,8 @@ read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.htm code result = - (contract.wage + DA) * 0.10 + Employee can claim deduction even of employer's contribution to NPS. - diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index 750965d09ce..d6b8eb02724 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -25,7 +25,7 @@ - + From dc6e8fa90423afe2766355d2c2ed4f4f153ba102 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 23 May 2012 19:05:05 +0530 Subject: [PATCH 014/207] [IMP]improved method for gratuity,added House rent Allowance rule and food coupon rule,added Contribution Register. bzr revid: kbh@tinyerp.com-20120523133505-v6pvrvo25q9ur5kv --- addons/hr_payroll/hr_payroll_demo.xml | 27 +++++++- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 2 + .../l10n_in_hr_payroll_data.xml | 61 +++++-------------- 3 files changed, 43 insertions(+), 47 deletions(-) diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index 76189c85306..e7ab610b8bb 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -4,6 +4,10 @@ + + House Rent Allowance Register + + Provident Fund Register @@ -12,8 +16,28 @@ Professional Tax Register + + Meal Voucher Register + + + + House Rent Allowance + percentage + + contract.wage + HRA + + + Rent receipts can be shown for taking tax benefit for living in a rented house. +Income tax exemption for HRA will be least of following: + 1. The actual amount of HRA received as a part of salary. + 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). + 3. Rent paid minus 10% of (basic salary+DA). + + + fix @@ -31,8 +55,7 @@ Professional Tax - Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uugbJcaM + Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index bb149ba4b19..9444afd74e0 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -80,6 +80,8 @@ class hr_employee(osv.osv): else: year_month = float(total_months)/100 + total_years res[employee.id] = year_month + else: + res[employee.id] = 0.0 return res _columns = { diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 203a6a9c82d..7afd6eecba1 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -1,16 +1,6 @@ - - - - House Rent Allowance Register - - - - Food coupon Register - - @@ -18,7 +8,6 @@ code result = (contract.wage + DA) * 0.50 - House Rent Allowance for metro city Rent receipts can be shown for taking tax benefit for living in a rented house. @@ -26,7 +15,6 @@ Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. 2. 40% (if living in non-metro area). 3. Rent paid minus 10% of (basic salary+DA). - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 @@ -35,7 +23,6 @@ Income tax exemption for HRA will be least of following: result = (contract.wage + DA) * 0.40 HRANM - House Rent Allowance for non metro city Rent receipts can be shown for taking tax benefit for living in a rented house. @@ -43,20 +30,19 @@ Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). 3. Rent paid minus 10% of (basic salary+DA). - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1upoomH73 + code worked_days.WORK100.number_of_days FC - python result = bool(contract.food_coupon_amount) - Food Coupons + Food Coupons Allowance result = worked_days.WORK100.number_of_days * contract.food_coupon_amount @@ -69,8 +55,7 @@ Income tax exemption for HRA will be least of following: contract.wage - DA is calculated in % -for more details:http://www.citehr.com/26809-how-calculate-dearness-allowance-da.html + DA is calculated in % @@ -114,8 +99,7 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. fix - This allowance is normally given as an additional benefit to employees and is fully taxable. -for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/income-tax-guides/tax-implications-of-salary-components.php + This allowance is normally given as an additional benefit to employees and is fully taxable. @@ -156,10 +140,9 @@ for more details : http://www.rupeetalk.com/finance-basics/income-tax-basics/inc fix - Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). + Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). One would need to compute income tax on the arrears if it would have been received in actual year. -Now difference of income tax between payment year and actual year would be allowed for deduction. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uurtGGGd +Now difference of income tax between payment year and actual year would be allowed for deduction. @@ -172,8 +155,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 Covered under the Payment of Gratuity Act, 1971: (Last drawn monthly basic salary + dearness allowance)/26 x 15 days x -number of years of service (date of joining – date of retirement/leaving job) - +number of years of service (date of joining – date of retirement/leaving job) @@ -183,8 +165,7 @@ number of years of service (date of joining – date of retirement/leaving job) fix 1666 - As per Income tax rules of India, if transport bills for LTA are not provided,the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 in his CTC(cost to company),and he provides proofs of Rs 40,000 (boarding pass,air tickets, taxi vouchers) then income tax will be deducted for rest of the Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, income tax laws only permits domestic air tickets only for LTA claim. -Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-not-required-supreme-court-india-ruling/#ixzz1uutlHSez + As per Income tax rules of India, if transport bills for LTA are not provided,the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 in his CTC(cost to company),and he provides proofs of Rs 40,000 (boarding pass,air tickets, taxi vouchers) then income tax will be deducted for rest of the Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, income tax laws only permits domestic air tickets only for LTA claim. @@ -199,9 +180,7 @@ Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-n 1.The actual amount received 2.The cash equivalent of leave balance (max 30 days per year of service) 3.Maximum of 10 months of leave encashment, based on last 10 months average salary - 4.Rs. 3 Lakh - Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuunHwjE - + 4.Rs. 3 Lakh @@ -252,7 +231,6 @@ Read more: http://www.pankajbatra.com/news/lta-proof-reimbursement-to-employer-n 1500 In some of the cases, companies may provide a component for telephone bills.Employees may provide actual phone usage bills to reimburse this component and make it non-taxable. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuvaUK7A @@ -272,8 +250,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 fix 1800 - In case company provides component for this and employee use self owned car for official and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuw12Cjj + In case company provides component for this and employee use self owned car for official and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. @@ -380,8 +357,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, python result = bool(contract.short_term_gain) - If stocks/equity mutual funds are sold before one year, 15% tax would be payable on such gains. STT should have been on transaction. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwSxEvI + If stocks/equity mutual funds are sold before one year, 15% tax would be payable on such gains. STT should have been on transaction. @@ -393,8 +369,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 python result = bool(contract.long_term_gain) - If stocks/equity mutual funds are kept for more than a year before sale,it would be long term gains and such gains would be fully exempt from income tax. Securities transaction tax (STT) must have been paid on transactions for availing this exemption. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uuwtRkCT + If stocks/equity mutual funds are kept for more than a year before sale,it would be long term gains and such gains would be fully exempt from income tax. Securities transaction tax (STT) must have been paid on transactions for availing this exemption. @@ -408,8 +383,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 result = -(contract.professional_tax) - Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. -Read more: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#ixzz1uuyvgt2L + Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. @@ -421,8 +395,7 @@ Read more: http://www.citehr.com/249518-companys-professional-tax-gujarat.html#i code result = -(contract.tds) - As per income tax rules, all payment which are taxable in nature should be done after deduction of taxes at the source itself. Hence employer compute income tax on salary payment and deduct it every month. This TDS is based on employee’s saving/investment declaration at the start of year. If investments for tax saving is not done, large amount may be deducted in last few months. -Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-2014/#ixzz1uv0gPhgQ + As per income tax rules, all payment which are taxable in nature should be done after deduction of taxes at the source itself. Hence employer compute income tax on salary payment and deduct it every month. This TDS is based on employee’s saving/investment declaration at the start of year. If investments for tax saving is not done, large amount may be deducted in last few months. @@ -434,8 +407,7 @@ Read more: http://www.pankajbatra.com/finance/income-tax-calculator-2012-2013-20 code result = -(contract.wage + DA) * contract.voluntarily_provident_fund / 100 - VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government.This additional amount enjoys all the benefits of PF except that the employer is not liable to contribute any extra amount apart from 12%.An added advantage is that the interest rate is equal to the interest rate of PF and he withdrawal is tax free. Please note that the maximum contribution towards VPF is 100% of your Basic.The highest rate of interest (close to 9%) makes it a very attractive saving scheme. Because of these advantages many employees chose not to close their PF account even after getting employment else where other than India.Employees also get a major tax break on their entire contribution to the fund up to a ceiling of Rs. 70,000/- -read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fund-special-benefits-for-employees + VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government.This additional amount enjoys all the benefits of PF except that the employer is not liable to contribute any extra amount apart from 12%.An added advantage is that the interest rate is equal to the interest rate of PF and he withdrawal is tax free. Please note that the maximum contribution towards VPF is 100% of your Basic.The highest rate of interest (close to 9%) makes it a very attractive saving scheme. Because of these advantages many employees chose not to close their PF account even after getting employment else where other than India.Employees also get a major tax break on their entire contribution to the fund up to a ceiling of Rs. 70,000/- @@ -456,8 +428,7 @@ read more: more:http://www.dotcominfoway.com/blog/vpf-or-voluntary-provident-fun fix - The LWF is applicable to all the members of the organisation except the Management staff (Staffs having authority to sign on the cheque/official documents on behalf of the organisation). for e.x. Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 Total Rs 9.00 and deposited to the LWF office.It is half yearly contribution (June and December) -read more: http://www.citehr.com/270132-labour-welfare-fund-deduction-salary.html + The LWF is applicable to all the members of the organisation except the Management staff (Staffs having authority to sign on the cheque/official documents on behalf of the organisation). for e.x. Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 Total Rs 9.00 and deposited to the LWF office.It is half yearly contribution (June and December). From c77d5a88e9d096a0bc6f38fffbebfae567aa01c0 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 24 May 2012 10:42:26 +0530 Subject: [PATCH 015/207] [IMP]added icon on module. bzr revid: kbh@tinyerp.com-20120524051226-rrsq51grjcstmuyw --- .../l10n_in_hr_payroll/static/src/img/icon.png | Bin 0 -> 2519 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 addons/l10n_in_hr_payroll/static/src/img/icon.png diff --git a/addons/l10n_in_hr_payroll/static/src/img/icon.png b/addons/l10n_in_hr_payroll/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ddaf38f8b6ddad86483eb34aa261ac964f444443 GIT binary patch literal 2519 zcmb_ec{r5q8hN zn3<`eHHZm2!Vdw*Ha(9n5FnlwCWat_&-$5`cn}0grjDTi!1rKBc(|m2&7H{z62=$A zgueyBLgoVi|EQTE#y09BXA~Ed<1J2K*w*OiE%{x0FgMxS9JlZB#Vg90iO2Sz;kjuj zTzgzxMEHJi+gTCela10xScy;M4-wuFmd%Y)2~f4F=G*QG^19c@r$mqEG%OqT+4yRw z^e&92)!^S75<7dfzb~~A7j?6@TbaYFMMBs18}J|b&jXE^{BzWY%t_ln;?>FJyZ$W; zP*vdZ!}9hQ?!Koba5_{tVOAFCF$40m|Ca^d7l@iTm`oZpd{rvuPYFLDnWwBcso3hC z=;sxGcg2Tw;?YMkJwih6rlv~2aEAgJ9T@+Ll$ow2M(vky`#Ssv?-o4A8Vc86mcgUaI0cpvS87^*{sEnhAXuNio5_U>za>MSbribsl$EpBC$HK~#M8(d ztK|-~=Q(E!j(?sjm}-Y_^V8vOztZXhEk4gnPW2WE*iltjJsJ|x(>IN8q%GCzzVspw z@{F}=b&e9Zi-v|Ssj63&JW?zkb|c=ad7CmkCnIbIOoohrK|uHQE-rNZ-re1;|Fa;H zxhW!{QQ6H^%*g1p;&68TQ90j;Dqvc-MAFI$V~4D#r!i#nhwsTs`i~q=l>FL4&a7rs zfLf*VI_9CZznY$;tp)*FG2X(o@ma#{SO*ZL-f%TD&SLczmRHUOul-QieHDo<)}vS0 zoV0OqxyIB_w!UpyCMHHXdia*ezK$J*Vp%G>w&`VS4-fwOuB%WlF2Nn~n$=d^KdeFK zR7<86?v*}hL7IBS*W3&lsrLH)5?4n+QAcu*d^X0HE$vF(ON&omU+0@;!+&ga{D^T0 zi`eIh5{uH=ce>iQFZRXkS7;ItV=@YqcxKS1=Y~IGG>XapRi&j)s=IpEs=oo!U zg0(o~s!nh=3!Kx&rx%_$+N5_((|u}5OS6h#(0hauWrdFgHH@u&4)GF{&bBfv6$l8h zJ8#9B{#dUEmL;X=rcUf_+}MV_AeiQWUtxPG=DIO_b=TOu4oa;3mErZd;f)>Ytvidt z*)~?J(lQ^u0l%pMF$0x16u?q`SNY)UXUqv-Kfm0#4fWfm4=&g6T4IwCP*Mv=vxsY= zlrTt18NKMHBd0EwlY8)&Cto9pb%`(@L$^8i^fkV-=*;~>0Wjby&!iMnS?q~iJYJSw zbSgXJE>El;+{lQKoXp!e9-&UGTw|aUMlUK9*@+%#T3A1*af85=j9-TCPm@bEoOg8MQWfV{{Z zOZhQ^L{bvg*myRIm2?v<7ZE{a9VhNnJ9K@$_lRVu*~~lImC=R^9@Td=qZgHAGBpX$ ziXPj4fBRmoduy{mQIS*?K!%qOCXW+d1gRqmVBaG4V#{w{c-$%~s<}gb7ne5YKV#s} zMzONO>`x48m4ju_s2%yAB!a=nVPQ}d@;6zEW$op-V=WQ77z+yxSLzZ=n6UM}h(0k9 z>>3xo7c3y5NLX8X`ffkJM>z*3w<%rT)BPpJSqxR*zKAS_q8*hxFf^3WG41|+Lj31O zxqm=R;!6VsFo}0VxmFIJA5?r10H;S)N5wg7D3Qu=O zhLrwYPMU)`nXETIUNF@rgiCF=4*F0fT+q`E@~iHdkhP0Tdb{UqpW4ZlX7G-|EFBuU z%^XKi#wPKg6QOHu!3HIK6VdGA*kvmvYHLl>QIq^Cr=AhXVDMcE0+XZBaWT6)vhS6W$_4i@i zJnQq3&_|DzN@?-QM@{rfo7N9YW?V)4x_WUwW(8%eIDC2+{G*RSky z=zL6dL(g4wyS-xg)s(^sF*1XzcKyWLxnzaQnE%sn{O^w7zc&$6tMkkn-sq&Yyv@sC zzatlB Date: Thu, 24 May 2012 11:58:46 +0530 Subject: [PATCH 016/207] [IMP]removed changes from hr_payroll and changed code for Professional tax. bzr revid: kbh@tinyerp.com-20120524062846-5had196y4n50fpli --- addons/hr_payroll/hr_payroll_demo.xml | 39 +++++++++++-------- .../l10n_in_hr_payroll_data.xml | 2 +- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index e7ab610b8bb..36ac3e23a7b 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -16,26 +16,21 @@ Professional Tax Register - + Meal Voucher Register + percentage + + contract.wage + HRA + + House Rent Allowance - percentage - - contract.wage - HRA - - - Rent receipts can be shown for taking tax benefit for living in a rented house. -Income tax exemption for HRA will be least of following: - 1. The actual amount of HRA received as a part of salary. - 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). - 3. Rent paid minus 10% of (basic salary+DA). - + @@ -55,7 +50,6 @@ Income tax exemption for HRA will be least of following: Professional Tax - Professional tax deducted from salary by employer should be removed from taxable salary before computation of income tax. @@ -78,6 +72,17 @@ Income tax exemption for HRA will be least of following: + + fix + + worked_days.WORK100.number_of_days + MA + + + Meal Voucher + + + code SALE @@ -85,7 +90,7 @@ Income tax exemption for HRA will be least of following: Get 1% of sales result = (inputs.SALEURO.amount + inputs.SALASIA.amount) * 0.01 - + @@ -106,7 +111,7 @@ Income tax exemption for HRA will be least of following: ME Marketing Executive - + @@ -114,7 +119,7 @@ Income tax exemption for HRA will be least of following: MEQP Marketing Executive for Quentin Paolino - + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 7afd6eecba1..0d8d1664700 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -374,7 +374,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - PT + PTD Professional Tax python From 4e3f8665b0c49b34ab56f32d9127cbb75342f88d Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 24 May 2012 12:09:48 +0530 Subject: [PATCH 017/207] [IMP]removed unnessary changes. bzr revid: kbh@tinyerp.com-20120524063948-hj3waasxo0h15a2c --- addons/hr_payroll/test/payslip.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml index e44cfcaa325..c3ad3a1a85c 100644 --- a/addons/hr_payroll/test/payslip.yml +++ b/addons/hr_payroll/test/payslip.yml @@ -17,11 +17,11 @@ code: SD company_id: base.main_company rule_ids: - - hr_salary_rule_houserentallowancemetro + - hr_salary_rule_houserentallowance1 - hr_salary_rule_convanceallowance1 - hr_salary_rule_professionaltax1 - hr_salary_rule_providentfund1 - - hr_salary_rule_food_coupon + - hr_salary_rule_meal_voucher - hr_salary_rule_sales_commission - I create a contract for "Richard" From 034a85428f8a93dcab1d5e259bc54450156fcf52 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 24 May 2012 16:54:12 +0530 Subject: [PATCH 018/207] [IMP]sequence changed for rules,update module descriptor,improved rule of gratuity and VPF. bzr revid: kbh@tinyerp.com-20120524112412-8142nscbm8zl7zzr --- addons/l10n_in_hr_payroll/__openerp__.py | 7 +- .../data/hr.salary.rule.csv | 9 +- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 8 +- .../l10n_in_hr_payroll_data.xml | 105 ++++++++---------- .../l10n_in_hr_payroll_view.xml | 10 +- 5 files changed, 62 insertions(+), 77 deletions(-) diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 27528fbddcf..c605756417e 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -30,12 +30,13 @@ Indian Payroll Rules. ======================= - * Employee Details + -Configuration of hr_payroll for India localization + -All main contributions rules for India payslip. + * New payslip report * Employee Contracts - * Passport based Contract - * Allowances / Deductions * Allow to configure Basic / Grows / Net Salary * Employee PaySlip + * Allowance / Deduction * Monthly Payroll Register * Integrated with Holiday Management * Medical Allowance, Travel Allowance, Child Allowance, ... diff --git a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv index 0877a73d02a..04e265e136f 100644 --- a/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv +++ b/addons/l10n_in_hr_payroll/data/hr.salary.rule.csv @@ -1,8 +1,7 @@ "id","amount_select","condition_range_min","condition_range_max","amount_percentage","amount_fix","name","category_id","sequence","code","parent_rule_id/id","condition_select","condition_range","amount_percentage_base" -1,"fix",1,1,,1200,"Education Allowance","Allowance",23,"CHEAONE","hr_payroll_rule_child1","range","employee.children", -2,"fix",2,10,,2400,"Education Allowance","Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", +1,"fix",1,1,,1200,"Education Allowance For One Child","Allowance",23,"CHEAONE","hr_payroll_rule_child1","range","employee.children", +2,"fix",2,10,,2400,"Education Allowance For Two Child","Allowance",24,"CHEATWO","hr_payroll_rule_child1","range","employee.children", ,,,,,,,,,,,,, -3,"fix",1,1,,300,"Child Hostel Allowance","Allowance",26,"CHOONE","hr_payroll_rule_child2","range","employee.children", -4,"fix",2,10,,600,"Child Hostel Allowance","Allowance",27,"CHOTWO","hr_payroll_rule_child2","range","employee.children", - +3,"fix",1,1,,300,"Child Hostel Allowance For One Child","Allowance",26,"CHOONE","hr_payroll_rule_child2","range","employee.children", +4,"fix",2,10,,600,"Child Hostel Allowance For Two Child","Allowance",27,"CHOTWO","hr_payroll_rule_child2","range","employee.children", ,,,,,,,,,,,,, diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 9444afd74e0..8d85ebbdf09 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -20,7 +20,7 @@ ############################################################################## import time -from datetime import datetime, timedelta +from datetime import datetime from calendar import isleap from dateutil.relativedelta import relativedelta @@ -58,13 +58,13 @@ class hr_employee(osv.osv): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, - @param ids: List of Openday’s IDs + @param ids: List of employee’s IDs @return: No. of years of experience. @param context: A standard dictionary for contextual values """ res = {} - c_date = time.strftime('%Y-%m-%d') DATETIME_FORMAT = "%Y-%m-%d" + c_date = time.strftime(DATETIME_FORMAT) current_date = datetime.strptime(c_date,DATETIME_FORMAT) for employee in self.browse(cr, uid, ids, context=context): if employee.join_date: @@ -86,7 +86,7 @@ class hr_employee(osv.osv): _columns = { 'join_date': fields.date('Join Date', help="joining date of employee "), - 'number_of_year':fields.function(_compute_year, string='No. of Years of Service', type="float", help="Total years of work experience."), + 'number_of_year':fields.function(_compute_year, string='No. of Years of Service', type="float", store=True, help="Total years of work experience."), } hr_employee() diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index 0d8d1664700..c21a1aed02b 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -1,7 +1,7 @@ - + HRAM @@ -9,7 +9,7 @@ result = (contract.wage + DA) * 0.50 House Rent Allowance for metro city - + Rent receipts can be shown for taking tax benefit for living in a rented house. Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. @@ -24,7 +24,7 @@ Income tax exemption for HRA will be least of following: HRANM House Rent Allowance for non metro city - + Rent receipts can be shown for taking tax benefit for living in a rented house. Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. @@ -35,16 +35,13 @@ Income tax exemption for HRA will be least of following: - code - - worked_days.WORK100.number_of_days FC - python - result = bool(contract.food_coupon_amount) + none Food Coupons Allowance + code result = worked_days.WORK100.number_of_days * contract.food_coupon_amount - + @@ -54,42 +51,30 @@ Income tax exemption for HRA will be least of following: percentage contract.wage - + DA is calculated in % - - CEA - Child Education Allowance - - fix - none - - Per school going child 1200 per annum is non-taxable. -Maximum for 2 children, so max 2400 per annum becomes non-taxable. - - CHEA - Education Allowance + Child Education Allowance - python result = bool(employee.children) fix - + + Per school going child 1200 per annum is non-taxable.Maximum for 2 children, so max 2400 per annum becomes non-taxable. CHEAH Child Hostel Allowance - python result = bool(employee.children) fix - In case the children are in hostel, the exemption available is Rs.300 per month per child for up to 2 children. - + In case the children are in hostel, the exemption available for child. + @@ -98,7 +83,7 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. fix - + This allowance is normally given as an additional benefit to employees and is fully taxable. @@ -107,7 +92,7 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. City Compensatory Allowance none - + code result = (contract.wage + DA) * 0.10 @@ -118,7 +103,7 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. City Allowance for Metro city none - + fix 850.0 @@ -128,7 +113,7 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. City Allowance for Non Metro city none - + fix 800.0 @@ -139,7 +124,7 @@ Maximum for 2 children, so max 2400 per annum becomes non-taxable. fix - + Generally arrears are fully taxable, but employee may claim exemption u/s 89(1). One would need to compute income tax on the arrears if it would have been received in actual year. Now difference of income tax between payment year and actual year would be allowed for deduction. @@ -164,7 +149,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix 1666 - + As per Income tax rules of India, if transport bills for LTA are not provided,the amount will be taxed. E.g. If an employee has LTA allowance as Rs 50,000 in his CTC(cost to company),and he provides proofs of Rs 40,000 (boarding pass,air tickets, taxi vouchers) then income tax will be deducted for rest of the Rs 10,000. Does not matter whats the amount of LTA in an employee’s package, income tax laws only permits domestic air tickets only for LTA claim. @@ -175,7 +160,7 @@ number of years of service (date of joining – date of retirement/leaving job)< none fix 0.0 - + Payment by way of leave encashment received by Central and State Govt.employees at the time of retirement in respect of the period of earned leave at credit is fully exempt. In case of other employees, the exemption is to be limited to minimum of all below: 1.The actual amount received 2.The cash equivalent of leave balance (max 30 days per year of service) @@ -189,7 +174,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + This would be fully taxable based on incentive. @@ -199,7 +184,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + This component is on-taxable up to 15000 per year (or Rs 1250 per month) on producing medical bills. @@ -209,7 +194,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + Some employers may provide component for buying magazines, journals and books as a part of knowledge enhancement for business growth.This part would become non taxable on providing original bills. @@ -219,7 +204,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + Some sections of employees mat get allowance for purchase of office dress/uniform.In such case, the component would become non-taxable. @@ -229,7 +214,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix 1500 - + In some of the cases, companies may provide a component for telephone bills.Employees may provide actual phone usage bills to reimburse this component and make it non-taxable. @@ -240,7 +225,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + @@ -249,7 +234,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix 1800 - + In case company provides component for this and employee use self owned car for official and personal purposes, Rs 1800 per month would be non-taxable on showing bills for fuel or can maintenance. This amount would be Rs 2400 in case car is more capacity than 1600cc. @@ -259,7 +244,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + Employer may also provide reimbursement of internet expenses and thus this would become non taxable. @@ -271,7 +256,7 @@ number of years of service (date of joining – date of retirement/leaving job)< result = bool(contract.driver_salay) fix - + Rs. 900 per month (non taxable) @@ -281,7 +266,7 @@ number of years of service (date of joining – date of retirement/leaving job)< fix - + Gift is from non relatives person worth more than Rs.50000, one is liable to pay the tax what ever he received excess of the limit or Rs 50,000. @@ -292,7 +277,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, fix - + gift is from relaives whould be non taxable with no limits. @@ -303,7 +288,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = contract.house_rent_income none - + Income from house property.30% of the rental income can be reduced as a standard deduction. @@ -315,7 +300,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = contract.saving_bank_account python result = bool(contract.saving_bank_account) - + @@ -324,7 +309,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, fix - + @@ -336,7 +321,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = contract.other_income Bank account/NSC/Post Office/SCSS interest - + @@ -345,7 +330,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, fix - + @@ -356,7 +341,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = contract.short_term_gain python result = bool(contract.short_term_gain) - + If stocks/equity mutual funds are sold before one year, 15% tax would be payable on such gains. STT should have been on transaction. @@ -368,11 +353,11 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = contract.long_term_gain python result = bool(contract.long_term_gain) - + If stocks/equity mutual funds are kept for more than a year before sale,it would be long term gains and such gains would be fully exempt from income tax. Securities transaction tax (STT) must have been paid on transactions for availing this exemption. - + PTD Professional Tax @@ -381,7 +366,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = bool(contract.professional_tax) code result = -(contract.professional_tax) - + Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. @@ -403,10 +388,10 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, Voluntarily Provident Fund Contribution python - result = bool(contract.voluntarily_provident_fund) + result = bool(contract.voluntary_provident_fund) code - result = -(contract.wage + DA) * contract.voluntarily_provident_fund / 100 - + result = -(contract.wage + DA) * contract.voluntary_provident_fund / 100 + VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government.This additional amount enjoys all the benefits of PF except that the employer is not liable to contribute any extra amount apart from 12%.An added advantage is that the interest rate is equal to the interest rate of PF and he withdrawal is tax free. Please note that the maximum contribution towards VPF is 100% of your Basic.The highest rate of interest (close to 9%) makes it a very attractive saving scheme. Because of these advantages many employees chose not to close their PF account even after getting employment else where other than India.Employees also get a major tax break on their entire contribution to the fund up to a ceiling of Rs. 70,000/- @@ -489,7 +474,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = - (contract.wage + DA) * 8.33 / 100 Employer contribution does not become part of employee’s income and hence income tax is not payable on this part. - + @@ -498,7 +483,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = - (contract.wage + DA) * 0.10 - + Any amount contributed by your employer to your NPS account is treated as part of your salary and is included in your income but you can claim deduction under Section 80C for this too.thus, effectively making it exempt from tax within the limit of 10% of your basic salary. This is very useful and tax efficient for you particularly if you fall in the maximum tax. @@ -508,7 +493,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = - (contract.wage + DA) * 0.10 - + Employee can claim deduction even of employer's contribution to NPS. diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index d6b8eb02724..29323b458d5 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -11,20 +11,20 @@ - + + + + - - - - + From c1c6205388a46e823ed97776643ddde8013fc4d1 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 28 May 2012 11:48:02 +0530 Subject: [PATCH 019/207] [IMP]changed sequence of salary rules. bzr revid: kbh@tinyerp.com-20120528061802-rqijgqi3pbb4isjg --- .../l10n_in_hr_payroll_data.xml | 191 +++++++++--------- 1 file changed, 95 insertions(+), 96 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index c21a1aed02b..a9e219c33a6 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -3,6 +3,17 @@ + + DA + Dearness Allowance + + percentage + contract.wage + + + DA is calculated in % + + HRAM code @@ -33,26 +44,23 @@ Income tax exemption for HRA will be least of following: - - - FC + + TCA + Transport/Conveyance Allownace - none - Food Coupons Allowance - code - result = worked_days.WORK100.number_of_days * contract.food_coupon_amount - - + fix + + + - - DA - Dearness Allowance + + SA + Grade/Special/Management/Supplementary Allowance - percentage - contract.wage - - - DA is calculated in % + fix + + + This allowance is normally given as an additional benefit to employees and is fully taxable. @@ -77,16 +85,6 @@ Income tax exemption for HRA will be least of following: - - SA - Grade/Special/Management/Supplementary Allowance - - fix - - - This allowance is normally given as an additional benefit to employees and is fully taxable. - - CBDA City Compensatory Allowance @@ -97,7 +95,6 @@ Income tax exemption for HRA will be least of following: result = (contract.wage + DA) * 0.10 - CMETRO City Allowance for Metro city @@ -188,6 +185,16 @@ number of years of service (date of joining – date of retirement/leaving job)< This component is on-taxable up to 15000 per year (or Rs 1250 per month) on producing medical bills. + + FC + + none + Food Coupons Allowance + code + result = worked_days.WORK100.number_of_days * contract.food_coupon_amount + + + PERJ Periodical Journals @@ -281,6 +288,15 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, gift is from relaives whould be non taxable with no limits. + + AI + Agricultural Income + + fix + + + + HRI House Rent Income @@ -303,15 +319,6 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - - TCA - Transport/Conveyance Allownace - - fix - - - - OTI Other Income @@ -324,15 +331,6 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - - AI - Agricultural Income - - fix - - - - STG Short Term Gains from Share Trading/Equity MFs @@ -358,18 +356,6 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - - PTD - Professional Tax - - python - result = bool(contract.professional_tax) - code - result = -(contract.professional_tax) - - - Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. - TDS @@ -383,6 +369,39 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, As per income tax rules, all payment which are taxable in nature should be done after deduction of taxes at the source itself. Hence employer compute income tax on salary payment and deduct it every month. This TDS is based on employee’s saving/investment declaration at the start of year. If investments for tax saving is not done, large amount may be deducted in last few months. + + PTD + Professional Tax + + python + result = bool(contract.professional_tax) + code + result = -(contract.professional_tax) + + + Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. + + + + EPMF + Employee's PF Contribution + + code + result = - (contract.wage + DA) * 8.33 / 100 + Employer contribution does not become part of employee’s income and hence income tax is not payable on this part. + + + + + ENPFC + Employee's NPS Contribution + + code + result = - (contract.wage + DA) * 0.10 + + Employee can claim deduction even of employer's contribution to NPS. + + VPF Voluntarily Provident Fund Contribution @@ -391,7 +410,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = bool(contract.voluntary_provident_fund) code result = -(contract.wage + DA) * contract.voluntary_provident_fund / 100 - + VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government.This additional amount enjoys all the benefits of PF except that the employer is not liable to contribute any extra amount apart from 12%.An added advantage is that the interest rate is equal to the interest rate of PF and he withdrawal is tax free. Please note that the maximum contribution towards VPF is 100% of your Basic.The highest rate of interest (close to 9%) makes it a very attractive saving scheme. Because of these advantages many employees chose not to close their PF account even after getting employment else where other than India.Employees also get a major tax break on their entire contribution to the fund up to a ceiling of Rs. 70,000/- @@ -403,7 +422,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = bool(contract.company_transport) code result = -(contract.company_transport) - + @@ -412,7 +431,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, fix - + The LWF is applicable to all the members of the organisation except the Management staff (Staffs having authority to sign on the cheque/official documents on behalf of the organisation). for e.x. Employee Contribution is Rs. 3.00 and Employer contribution Rs. 6.00 Total Rs 9.00 and deposited to the LWF office.It is half yearly contribution (June and December). @@ -422,7 +441,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, fix - + @@ -433,7 +452,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, result = bool(contract.leave_avail_dedution) code result = -(contract.leave_avail_dedution) - + @@ -445,7 +464,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = - (contract.medical_insurance) - + @@ -454,7 +473,17 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, fix - + + + + + ENPC + Employer's NPS Contribution + + code + result = - (contract.wage + DA) * 0.10 + + Any amount contributed by your employer to your NPS account is treated as part of your salary and is included in your income but you can claim deduction under Section 80C for this too.thus, effectively making it exempt from tax within the limit of 10% of your basic salary. This is very useful and tax efficient for you particularly if you fall in the maximum tax. @@ -463,39 +492,9 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, code result = - (contract.wage + DA) * 0.12 - + Both the employees and employer contribute to the fund at the rate of 12% of the basic wages, dearness allowance and retaining allowance, if any, payable to employees per month. - - - EPMF - Employee's PF Contribution - - code - result = - (contract.wage + DA) * 8.33 / 100 - Employer contribution does not become part of employee’s income and hence income tax is not payable on this part. - - - - - ENPC - Employer's NPS Contribution - - code - result = - (contract.wage + DA) * 0.10 - - Any amount contributed by your employer to your NPS account is treated as part of your salary and is included in your income but you can claim deduction under Section 80C for this too.thus, effectively making it exempt from tax within the limit of 10% of your basic salary. This is very useful and tax efficient for you particularly if you fall in the maximum tax. - - - - ENPFC - Employee's NPS Contribution - - code - result = - (contract.wage + DA) * 0.10 - - Employee can claim deduction even of employer's contribution to NPS. - From a15c85fd4a93152d074ad6f7dc602507bb11ee7f Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 28 May 2012 14:24:08 +0530 Subject: [PATCH 020/207] [IMP]ids changed. bzr revid: kbh@tinyerp.com-20120528085408-p1409ajat1yu5vkk --- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index a9e219c33a6..d5c83722784 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -382,7 +382,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, Professional tax for company should be paid on or before 30th sept,The amount is Rs.2000 per year.There is no payment form to be filled. - + EPMF Employee's PF Contribution @@ -392,7 +392,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - + ENPFC Employee's NPS Contribution @@ -476,7 +476,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, - + ENPC Employer's NPS Contribution @@ -486,7 +486,7 @@ one is liable to pay the tax what ever he received excess of the limit or Rs 50, Any amount contributed by your employer to your NPS account is treated as part of your salary and is included in your income but you can claim deduction under Section 80C for this too.thus, effectively making it exempt from tax within the limit of 10% of your basic salary. This is very useful and tax efficient for you particularly if you fall in the maximum tax. - + EPF Employer's PF Contribution From 986fd1159f8e59d370728c7f8c82ccc449a0cf7d Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 4 Jun 2012 11:48:28 +0530 Subject: [PATCH 021/207] [IMP]object and view of payment_advice and advice_line are added. bzr revid: kbh@tinyerp.com-20120604061828-4dhq5c9w8t2o42sk --- .../l10n_in_hr_payroll/l10n_in_hr_payroll.py | 115 +++++++++++++++++- .../l10n_in_hr_payroll_data.xml | 2 +- .../l10n_in_hr_payroll_view.xml | 65 ++++++++++ 3 files changed, 180 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 8d85ebbdf09..b2bd5c111da 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -20,13 +20,29 @@ ############################################################################## import time +from datetime import date from datetime import datetime -from calendar import isleap +from datetime import timedelta from dateutil.relativedelta import relativedelta +from tools.translate import _ +from calendar import isleap + from osv import fields, osv import decimal_precision as dp +def prev_bounds(cdate=False): + when = date.fromtimestamp(time.mktime(time.strptime(cdate,"%Y-%m-%d"))) + this_first = date(when.year, when.month, 1) + month = when.month + 1 + year = when.year + if month > 12: + month = 1 + year += 1 + next_month = date(year, month, 1) + prev_end = next_month - timedelta(days=1) + return this_first, prev_end + class hr_contract_in(osv.osv): _inherit = 'hr.contract' _description = 'contract' @@ -90,4 +106,101 @@ class hr_employee(osv.osv): } hr_employee() +class payroll_advice(osv.osv): + ''' + Bank Advice Note + ''' + + _name = 'hr.payroll.advice' + _description = 'Bank Advice Note' + _columns = { + 'name':fields.char('Name', size=2048, required=True, readonly=False), + 'note': fields.text('Description'), + 'date': fields.date('Date'), + 'state':fields.selection([ + ('draft','Draft Sheet'), + ('confirm','Confirm Sheet'), + ('cancel','Reject'), + ],'State', select=True, readonly=True), + 'number':fields.char('Number', size=64, required=False, readonly=True), + 'line_ids':fields.one2many('hr.payroll.advice.line', 'advice_id', 'Employee Salary', required=False), + 'chaque_nos':fields.char('Chaque Nos', size=256, required=False, readonly=False), + 'company_id':fields.many2one('res.company', 'Company', required=False), + 'bank_id':fields.many2one('res.bank', 'Bank', required=False, help="Select the Bank Address from whcih the salary is going to be paid"), + } + _defaults = { + 'date': lambda *a: time.strftime('%Y-%m-%d'), + 'state': lambda *a: 'draft', + 'company_id': lambda self, cr, uid, context: \ + self.pool.get('res.users').browse(cr, uid, uid, + context=context).company_id.id, + } + + def compute_advice(self, cr, uid, ids, context=None): + payslip_pool = self.pool.get('hr.payslip') + advice_line_pool = self.pool.get('hr.payroll.advice.line') + sequence_pool = self.pool.get('ir.sequence') + payslip_line_pool = self.pool.get('hr.payslip.line') + + for advice in self.browse(cr, uid, ids, context=context): + dates = prev_bounds(advice.date) + slip_ids = payslip_pool.search(cr, uid, [ ('date_from','<=',advice.date),('date_to','>=',advice.date),('date_from','=',dates[0]),('date_to','=',dates[1])], context=context) + if not slip_ids: + raise osv.except_osv(_('Error !'), _('You can get only current month payslips') % (slip_ids)) + for slip in payslip_pool.browse(cr, uid, slip_ids, context=context): + line_ids = payslip_line_pool.search(cr, uid, [ ('slip_id','in',slip_ids),('code','=',"NET")], context=context) + for line in slip.line_ids: + if not slip.employee_id.bank_account_id: + raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name)) + advice_line= { + 'advice_id':advice.id, + 'name':slip.employee_id.bank_account_id.acc_number, + 'employee_id':slip.employee_id.id, + 'bysal':line.total + } + id = advice_line_pool.create(cr, uid, advice_line, context=context) + number = self.pool.get('ir.sequence').get(cr, uid, 'advice.line') + self.write(cr, uid, ids, {'state':'confirm','number':number}, context=context) + + def confirm_sheet(self, cr, uid, ids, context=None): + self.write(cr, uid, ids, {'state':'confirm'}, context=context) + return True + + def set_to_draft(self, cr, uid, ids, context=None): + self.write(cr, uid, ids, {'state':'draft'}, context=context) + return True + + def cancel_sheet(self, cr, uid, ids, context=None): + self.write(cr, uid, ids, {'state':'cancel'}, context=context) + return True + + def onchange_company_id(self, cr, uid, ids, company_id=False, context=None): + res = {} + if company_id: + company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) + if company.partner_id.bank_ids: + res.update({'bank': company.partner_id.bank_ids[0].bank.name}) + return { + 'value':res + } + +payroll_advice() + +class payroll_advice_line(osv.osv): + ''' + Bank Advice Lines + ''' + + _name = 'hr.payroll.advice.line' + _description = 'Bank Advice Lines' + _columns = { + 'advice_id':fields.many2one('hr.payroll.advice', 'Bank Advice', required=False), + 'name':fields.char('Bank Account A/C', size=64, required=True, readonly=False), + 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), + 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')), + 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')), + } + +payroll_advice_line() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml index d5c83722784..8e62df86de6 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_data.xml @@ -134,7 +134,7 @@ Now difference of income tax between payment year and actual year would be allow none code result = (contract.wage + DA) * 15 * employee.number_of_year / worked_days.WORK100.number_of_days - + Covered under the Payment of Gratuity Act, 1971: (Last drawn monthly basic salary + dearness allowance)/26 x 15 days x number of years of service (date of joining – date of retirement/leaving job) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index 29323b458d5..de131f43e55 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -48,5 +48,70 @@ + + + hr.payroll.advice.form + hr.payroll.advice + form + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +