{"id":8,"date":"2007-10-03T05:23:00","date_gmt":"2007-10-03T05:23:00","guid":{"rendered":"http:\/\/supportingelement.wordpress.com\/2007\/10\/03\/control-the-resolution-of-comp-rate-based-earnings\/"},"modified":"2007-10-03T05:23:00","modified_gmt":"2007-10-03T05:23:00","slug":"control-the-resolution-of-comp-rate-based-earnings","status":"publish","type":"post","link":"https:\/\/supportingelement.com\/index.php\/2007\/10\/03\/control-the-resolution-of-comp-rate-based-earnings\/","title":{"rendered":"Control the Resolution of Comp Rate based Earnings"},"content":{"rendered":"<p>\nHow do you control the resolution of an Earning element based on the assignment of a Compensation Rate code on an employee\u2019s Job Data?  It is not as easy as you think: If a Comp Rate Code is configured with a Default Value and a related Earning Element is assigned \u201cby Eligibility Group\u201d the Element will resolve for all employees, even if they don\u2019t have the Comp Rate Code assigned on the Job Data, Compensation page.\n<\/p>\n<p>\nThis example shows how to ensure an Earning Element only resolves if a specified Comp Rate Code is present on an Employee\u2019s Job Data, Compensation Page.\n<\/p>\n<p>\nPrerequisites:\n<\/p>\n<ul>\n<li>Comp Rate Code with default amount\/value exists<\/li>\n<li>Earning Element that uses the above mentioned Comp Rate Code is configured (and resolves) <\/li>\n<\/ul>\n<p>\n<b>Step 1<\/b> \u2013 Create a Flag Variable to indicate if the Comp Rate Code is assigned.\n<\/p>\n<p><a href=\"http:\/\/bp0.blogger.com\/_jye0NzelumM\/RwMp1ieZnGI\/AAAAAAAAACU\/J9CowcgclJE\/s1600-h\/exists_variable.gif\"><img decoding=\"async\" style=\"display:block;text-align:center;cursor:pointer;margin:0 auto 10px;\" src=\"http:\/\/bp0.blogger.com\/_jye0NzelumM\/RwMp1ieZnGI\/AAAAAAAAACU\/J9CowcgclJE\/s320\/exists_variable.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>\n<b>Step 2<\/b> \u2013 Create a Variable to hold a Comp Rate Code.\n<\/p>\n<p><a href=\"http:\/\/bp1.blogger.com\/_jye0NzelumM\/RwMp7yeZnHI\/AAAAAAAAACc\/VPg5C6bzFjE\/s1600-h\/variable.gif\"><img decoding=\"async\" style=\"display:block;text-align:center;cursor:pointer;margin:0 auto 10px;\" src=\"http:\/\/bp1.blogger.com\/_jye0NzelumM\/RwMp7yeZnHI\/AAAAAAAAACc\/VPg5C6bzFjE\/s320\/variable.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>\n<b>Step 3<\/b> \u2013 Create an Array to check the Employee\u2019s Job Data, Compensation details\n<\/p>\n<p><a href=\"http:\/\/bp3.blogger.com\/_jye0NzelumM\/RwMpTSeZnFI\/AAAAAAAAACM\/P1cO00KwE1A\/s1600-h\/array_keys.gif\"><img decoding=\"async\" style=\"display:block;text-align:center;cursor:pointer;margin:0 auto 10px;\" src=\"http:\/\/bp3.blogger.com\/_jye0NzelumM\/RwMpTSeZnFI\/AAAAAAAAACM\/P1cO00KwE1A\/s320\/array_keys.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>\n<b>Step 4<\/b> \u2013 Create a Formula to check for the specified Comp Rate Code.\n<\/p>\n<p><a href=\"http:\/\/bp1.blogger.com\/_jye0NzelumM\/RwMo3yeZnEI\/AAAAAAAAACE\/jfupakPsHbU\/s1600-h\/check_formula.gif\"><img decoding=\"async\" style=\"display:block;text-align:center;cursor:pointer;margin:0 auto 10px;\" src=\"http:\/\/bp1.blogger.com\/_jye0NzelumM\/RwMo3yeZnEI\/AAAAAAAAACE\/jfupakPsHbU\/s320\/check_formula.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>\n<b>Step 5<\/b> \u2013 Add the Formula to the Array&#8217;s Processing Formulas.\n<\/p>\n<p><a href=\"http:\/\/bp3.blogger.com\/_jye0NzelumM\/RwMq5SeZnII\/AAAAAAAAACk\/Dm4ObzkaWNg\/s1600-h\/array_formula.gif\"><img decoding=\"async\" style=\"display:block;text-align:center;cursor:hand;margin:0 auto 10px;\" src=\"http:\/\/bp3.blogger.com\/_jye0NzelumM\/RwMq5SeZnII\/AAAAAAAAACk\/Dm4ObzkaWNg\/s320\/array_formula.gif\" border=\"0\" \/><\/a><\/p>\n<p>\n<b>Step 6<\/b> \u2013 Assign the Array to the Initialise Section of the Payroll Process List\n<\/p>\n<p>\n<b>Step 7<\/b> \u2013 Attach a generation control to the Earning Element to check if the Flag Variable is set to 1.\n<\/p>\n<p>\nResult: When the Array is called from the Initialise Section, it retrieves the data related to the employee from the PS_GP_ table.  The Formula is run for each row and if the Comp Rate Code if found, the Flag Variable is set to 1.  A simple Generation Control then checks the Flag Variable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you control the resolution of an Earning element based on the assignment of a Compensation Rate code on an employee\u2019s Job Data? It is not as easy as you think: If a Comp Rate Code is configured with a Default Value and a related Earning Element is assigned \u201cby Eligibility Group\u201d the Element\u2026 <span class=\"read-more\"><a href=\"https:\/\/supportingelement.com\/index.php\/2007\/10\/03\/control-the-resolution-of-comp-rate-based-earnings\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}