X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep710.php;h=d0cb82bfbfbd47e77f4f48e1faa58f8bba67e2de;hb=6bcd87642330092910f5d6977845a76ac59350ac;hp=131b4b4e8a162fcc6a090230111d1a243400de08;hpb=2ed5e8e82b3c6e8d86ece8875528a4e89009e415;p=fa-stable.git diff --git a/reporting/rep710.php b/reporting/rep710.php index 131b4b4e..d0cb82bf 100644 --- a/reporting/rep710.php +++ b/reporting/rep710.php @@ -36,7 +36,6 @@ function getTransactions($from, $to, $type, $user) $sql = "SELECT a.*, SUM(IF(ISNULL(g.amount), NULL, IF(g.amount > 0, g.amount, 0))) AS amount, u.user_id, - DATE(a.stamp) as stamp, UNIX_TIMESTAMP(a.stamp) as unix_stamp FROM ".TB_PREF."audit_trail AS a JOIN ".TB_PREF."users AS u LEFT JOIN ".TB_PREF."gl_trans AS g ON (g.type_no=a.trans_no @@ -63,12 +62,14 @@ function print_audit_trail() $systype = $_POST['PARAM_2']; $user = $_POST['PARAM_3']; $comments = $_POST['PARAM_4']; - $destination = $_POST['PARAM_5']; + $orientation = $_POST['PARAM_5']; + $destination = $_POST['PARAM_6']; if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else include_once($path_to_root . "/reporting/includes/pdf_report.inc"); + $orientation = ($orientation ? 'L' : 'P'); $dec = user_price_dec(); $cols = array(0, 60, 120, 180, 240, 340, 400, 460, 520); @@ -85,17 +86,19 @@ function print_audit_trail() 2 => array('text' => _('Type'), 'from' => ($systype != -1 ? $systypes_array[$systype] : _('All')), 'to' => ''), 3 => array('text' => _('User'), 'from' => ($user != -1 ? $user_id : _('All')), 'to' => '')); - $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize()); + $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize(), 9, $orientation); + if ($orientation == 'L') + recalculate_cols($cols); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $trans = getTransactions($from, $to, $systype, $user); while ($myrow=db_fetch($trans)) { - $rep->TextCol(0, 1, sql2date($myrow['stamp'])); + $rep->TextCol(0, 1, sql2date(date("Y-m-d", $myrow['unix_stamp']))); if (user_date_format() == 0) $rep->TextCol(1, 2, date("h:i:s a", $myrow['unix_stamp'])); else @@ -117,4 +120,3 @@ function print_audit_trail() $rep->End(); } -?> \ No newline at end of file