X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep302.php;h=55c766c02440db9448d6e0a3556573e5dd6d85ed;hb=9451db1760036985de791ba24c442801e37f37de;hp=cdeae91dc7e4be8c7e5ca383afbdfa0a77635a25;hpb=dd93eb96f52f33994111da9c8ad40ad112d0ec1a;p=fa-stable.git diff --git a/reporting/rep302.php b/reporting/rep302.php index cdeae91d..55c766c0 100644 --- a/reporting/rep302.php +++ b/reporting/rep302.php @@ -75,8 +75,7 @@ function getPeriods($stockid, $location) FROM ".TB_PREF."stock_moves WHERE stock_id='$stockid' AND loc_code ='$location' - AND (type=13 OR type=11) - AND visible=1"; + AND (type=13 OR type=11)"; $TransResult = db_query($sql,"No transactions were returned"); return db_fetch($TransResult); @@ -91,12 +90,14 @@ function print_inventory_planning() $category = $_POST['PARAM_0']; $location = $_POST['PARAM_1']; $comments = $_POST['PARAM_2']; - $destination = $_POST['PARAM_3']; + $orientation = $_POST['PARAM_3']; + $destination = $_POST['PARAM_4']; 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'); if ($category == ALL_NUMERIC) $category = 0; if ($category == 0) @@ -129,7 +130,9 @@ function print_inventory_planning() 1 => array('text' => _('Category'), 'from' => $cat, 'to' => ''), 2 => array('text' => _('Location'), 'from' => $loc, 'to' => '')); - $rep = new FrontReport(_('Inventory Planning Report'), "InventoryPlanning", user_pagesize()); + $rep = new FrontReport(_('Inventory Planning Report'), "InventoryPlanning", user_pagesize(), 9, $orientation); + if ($orientation == 'L') + recalculate_cols($cols); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); @@ -188,4 +191,3 @@ function print_inventory_planning() $rep->End(); } -?> \ No newline at end of file