{ "pluginname": "Payroll", "systemplugin": "0", "iswebsite":0, "version": "1.0", "icon": "mif-delicious", "table_def": [ { "name": "nbbi_beneficiary", "importtabledef":{"pluginname":"NBBI Management"} },{ "name":"payroll_db", "saveid":"1sv","getid":"1gt","delid":"1dt", "form":{ "0":{"title":"Payroll","icon":"mif-delicious","type":"Inline Form", "fields":"staffid,payrolldate,workdays,basic,da,hra,conveyance,otherallowance,deduction_food_housing,deduction_epf,deduction_mut,deduction_medical,deduction_other,deduction_total" } }, "list":{ "1lt":{ "name":"Payroll List Project Wise", "tbl":"nbbi_beneficiary b", "fld":"b.beneficiaryname,b.designation,b.dateofadmission,basic,da,hra,conveyance,otherallowance,gross,deduction_food_housing,deduction_epf,deduction_mut,deduction_medical,deduction_other,deduction_total,netpay", "join":"LEFT JOIN ||thistbl|| a ON a.staffid=b.id", "whr":"b.recordstatus=1 and b.project='||project||' and DATE_FORMAT(a.payrolldate,'%y-%m')=DATE_FORMAT('||payrolldate||','%y-%m')", "header":"Name,Designation,DOJ,Basic,DA,HRA,Conveyance,Other,Gross,Food & Accom.,EPF,MUT,Medical,Other,Deduction Total,Net Pay", "prepend":"Project: ||project|| Payroll Month:||payrollmonth||" }, "1lt1":{ "name":"Payroll List Workdays Entry", "tbl":"||thistbl|| a", "fld":"b.beneficiaryname,b.designation,b.dateofadmission,workdays", "join":"INNER JOIN nbbi_beneficiary b ON a.staffid=b.id", "whr":"b.recordstatus=1 and b.project='||project||' and DATE_FORMAT(a.payrolldate,'%y-%m')='||yearmonth||'", "header":"Name,Designation,DOJ,Work Days Count", "prepend":"Project: ||project|| Payroll Month:||payrollmonth||" } }, "fields":[ {"name":"staffid","type":"lookup","label":"Staff","lookup":{"sqlid":"1stlup","tbl":"nbbi_beneficiary","fld":"CONCAT(beneficiaryname,'-',project) as beneficiaryname","whr":"recordtype='Staff' and recordstatus=1"}}, {"name":"payrolldate","type":"date","label":"Pay Date (Last date for which payment is made)"}, {"name":"workdays","type":"int","other":"NOT NULL DEFAULT 0","label":"Work Days #"}, {"name":"basic","type":"int","other":"NOT NULL DEFAULT 0","label":"Basic"}, {"name":"da","type":"int","other":"NOT NULL DEFAULT 0","label":"DA"}, {"name":"hra","type":"int","other":"NOT NULL DEFAULT 0","label":"HRA"}, {"name":"conveyance","type":"int","other":"NOT NULL DEFAULT 0","label":"Conveyance"}, {"name":"otherallowance","type":"int","other":"NOT NULL DEFAULT 0","label":"Other Allowance"}, {"name":"gross","type":"int","fieldtype":"readonly","other":"GENERATED ALWAYS AS (floor((workdays/30)*(basic+da))+hra+conveyance+otherallowance)","label":"Gross"}, {"name":"deduction_food_housing","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - Food and Housing"}, {"name":"deduction_epf","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - EPF"}, {"name":"deduction_mut","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - MUT"}, {"name":"deduction_medical","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - Medical"}, {"name":"deduction_other","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - Other"}, {"name":"deduction_total","type":"int","fieldtype":"readonly","other":"GENERATED ALWAYS AS (deduction_food_housing+deduction_epf+deduction_mut+deduction_medical+deduction_other)","label":"Deduction - Total"}, {"name":"netpay","type":"int","fieldtype":"readonly","other":"GENERATED ALWAYS AS ((floor((workdays/30)*(basic+da))+hra+conveyance+otherallowance)-(deduction_food_housing+deduction_epf+deduction_mut+deduction_medical+deduction_other))","label":"Net Pay"} ] },{ "name":"payroll_allowance", "saveid":"2sv","getid":"2gt","delpermanentid":"2dl", "form":{ "0":{"title":"Payroll Allowance","icon":"mif-delicious","type":"Inline Form", "fields":"*" } }, "list":{ "2lt":{ "tbl":"nbbi_beneficiary b","getform":"||thistbl|| 0", "includeeditdelete":true, "primarytablenamealias":"a", "join":"LEFT JOIN ||thistbl|| a ON a.staffid=b.id", "fld":"b.beneficiaryname,a.basic,a.da,a.hra,a.conveyance,a.other,deduction_food_housing,deduction_epf,deduction_mut,deduction_medical", "header":"Staff,Basic,DA,HRA,Conveyance,Other Allowance,Deducation-Food,Deducation-EPF,Deduction-MUT,Deduction-Medical", "whr":[ "b.recordstatus=1 and b.project='||project||' and b.recordtype='Staff'", {"if":"||location||","op":"!=","value":"BLANK","then":"and b.location='||location||'"}, {"if":"||epf||","op":"!=","value":"BLANK","then":"and b.epf=||epf||"} ], "editablefields":"a.basic,a.da,a.hra,a.conveyance,a.other,deduction_food_housing,deduction_epf,deduction_mut,deduction_medical" } }, "fields":[ {"name":"staffid","type":"lookup","label":"Staff","lookupdetails":{"sqlid":"1stlup","tbl":"nbbi_beneficiary","fld":"CONCAT(beneficiaryname,'-',project) as beneficiaryname","whr":"recordtype='Staff' and recordstatus=1"}}, {"name":"basic","type":"int","other":"NOT NULL DEFAULT 0","label":"Basic"}, {"name":"da","type":"int","other":"NOT NULL DEFAULT 0","label":"DA"}, {"name":"hra","type":"int","other":"NOT NULL DEFAULT 0","label":"HRA"}, {"name":"conveyance","type":"int","other":"NOT NULL DEFAULT 0","label":"Conveyance"}, {"name":"other","type":"int","other":"NOT NULL DEFAULT 0","label":"Other Allowance"}, {"name":"deduction_food_housing","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - Food and Housing"}, {"name":"deduction_epf","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - EPF"}, {"name":"deduction_mut","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - MUT"}, {"name":"deduction_medical","type":"int","other":"NOT NULL DEFAULT 0","label":"Deduction - Medical"} ] } ], "sqlcommands_oninstall": [], "form":[], "form_html": "", "navbutton": [{ "customid": "1", "caption": "Payroll", "icon": "mif-delicious", "btntype": "ribbon-button", "btngroup": "Others", "btntab": "Developer", "btnorder": "1", "onclick": "initializePlugin()" }], "script": "", "formbuttons": [{ "name": "payroll", "caption": "Payroll", "icon": "mif-delicious fg-red", "onclick": "Eirene.runStmt('1pymnu')" } ], "sqlstatement": [ { "id":"1pymnu", "name":"Payroll Main Menu", "sql":{ "action":"Return","outputto":"html","output":"#workareaFilter", "value":[ "