Allowing SA_MULTIFISCALYEAR access to enter transactions on open fiscal years
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 6 Jun 2010 15:25:17 +0000 (15:25 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 6 Jun 2010 15:25:17 +0000 (15:25 +0000)
CHANGELOG.txt
includes/access_levels.inc
includes/date_functions.inc

index 894e5fe45baefa848dc440c6622a5ee26fec141b..40c22395e2ce30e2cce78142213d64d80c79be3c 100644 (file)
@@ -20,9 +20,10 @@ Legend:
 $ -> Affected files
 
 05-Jun-2010 Joe Hunt
-! Allowing SA_FISCALYEAR access to enter transactions on open fiscal years
+! Allowing SA_MULTIFISCALYEAR access to enter transactions on open fiscal years
 $ /admin/db/fiscalyears_db.inc
   /includes/date_functions.inc
+  /includes/acces_levels.inc
   
 31-May-2010 Joe Hunt
 ! Allowing modifying of Bank Payments/Deposits
index 709e46f33d23844ee5cf7cff3b605bf1b90485c4..77dcae9afc1f6ccf489945e2e76f957224b07131 100644 (file)
@@ -227,6 +227,7 @@ $security_areas =array(
        'SA_FISCALYEARS' => array(SS_GL_C|9, _("Fiscal years maintenance")),
        'SA_GLSETUP' => array(SS_GL_C|10, _("Company GL setup")),
        'SA_GLACCOUNTTAGS' => array(SS_GL_C|11, _("GL Account tags")),
+       'SA_MULTIFISCALYEARS' => array(SS_GL_C|13, _("Allow entry on non closed Fiscal years")),
 
        'SA_BANKTRANSVIEW' => array(SS_GL|1, _("Bank transactions view")),
        'SA_GLTRANSVIEW' => array(SS_GL|2, _("GL postings view")),
index 963cf361df2fa84c8f3b7cdaa7544e6fa1e86963..c06dc4d323a8882e61726edd6894e09b11d33ee3 100644 (file)
@@ -162,7 +162,7 @@ function is_date_in_fiscalyear($date, $convert=false)
        global $path_to_root;
        include_once($path_to_root . "/admin/db/fiscalyears_db.inc");
 
-       if ($_SESSION["wa_current_user"]->can_access('SA_FISCALYEARS')) // allow all open years for this one
+       if ($_SESSION["wa_current_user"]->can_access('SA_MULTIFISCALYEARS')) // allow all open years for this one
                return is_date_in_fiscalyears($date, false);
        $myrow = get_current_fiscalyear();
        if ($myrow['closed'] == 1)