From: Joe Date: Wed, 21 Jan 2015 11:03:42 +0000 (+0100) Subject: cleanup2 according to Apmuthu's list. X-Git-Tag: v2.4.2~19^2~259 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=211598c5964fd138631395c7f329ec8b87c43c0b cleanup2 according to Apmuthu's list. --- diff --git a/includes/current_user.inc b/includes/current_user.inc index 8c754aec..87f71b1e 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -486,9 +486,27 @@ function user_date_format() function user_date_display() { - global $SysPrefs; - - return isset($_SESSION["wa_current_user"]) ? $_SESSION["wa_current_user"]->prefs->date_display() : $SysPrefs->dflt_date_sep; + $fmt ='m/d/Y'; + if (isset($_SESSION["wa_current_user"])) { + $fmt = $_SESSION["wa_current_user"]->prefs->date_display(); + } else { + $sep = user_date_sep(); + $user_date_fmt = user_date_format(); + switch ($user_date_fmt) { + case 0: + $fmt = "m".$sep."d".$sep."Y"; break; + case 1: + $fmt = "d".$sep."m".$sep."Y"; break; + case 2: + $fmt = "Y".$sep."m".$sep."d"; break; + case 3: + $fmt = "M".$sep."j".$sep."Y"; break; + case 4: + $fmt = "j".$sep."M".$sep."Y"; break; + default: + $fmt = "Y".$sep."M".$sep."j"; + } + } } function user_date_sep() diff --git a/reporting/rep111.php b/reporting/rep111.php index 4f3588b0..df2b2dbe 100644 --- a/reporting/rep111.php +++ b/reporting/rep111.php @@ -84,8 +84,8 @@ function print_sales_quotations() $rep->Info($params, $cols, null, $aligns); $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], true); - $rep->SetHeaderType('Header2'); $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts); + $rep->SetHeaderType('Header2'); $rep->NewPage(); $result = get_sales_order_details($i, ST_SALESQUOTE);