X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Faccruals.php;h=5e45e3a35604beab11e8332f8c1e42c6a9c66d23;hb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;hp=c9233a058868f61ef074d2da853e24c224c0f19d;hpb=76ca9fef9bb510236a6a7740fa0f60eb7db384c9;p=fa-stable.git diff --git a/gl/accruals.php b/gl/accruals.php index c9233a05..5e45e3a3 100644 --- a/gl/accruals.php +++ b/gl/accruals.php @@ -11,7 +11,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/gl/includes/db/gl_db_trans.inc"); $js = get_js_open_window(800, 500); -if ($use_date_picker) +if (user_use_date_picker()) $js .= get_js_date_picker(); // Begin the UI @@ -57,6 +57,10 @@ if (isset($_POST['go']) || isset($_POST['show'])) $per = $periods - 1; $date = $date_ = get_post('date_'); $freq = get_post('freq'); + if ($freq == 3 || $freq == 4) { + $date_ = begin_month($date_); // avoid skip on shorter months + $date = end_month($date_); // avoid skip on shorter months + } $lastdate = ($freq == 1 ? add_days($date_, 7*$per) : ($freq == 2 ? add_days($date_, 14*$per) : ($freq == 3 ? add_months($date_, $per) @@ -221,4 +225,3 @@ end_form(); end_page(); -?>