Joe Hun rerun, didn't work (empty file when inserting). Better ratio when showing...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 22 Mar 2009 14:32:41 +0000 (14:32 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 22 Mar 2009 14:32:41 +0000 (14:32 +0000)
CHANGELOG.txt
inventory/manage/items.php
reporting/rep104.php
reporting/rep303.php

index 62c302034de2ed8a25bfea06f85519a59d213d49..625b5275850b0839ea88d73f342e825fa64d07f2 100644 (file)
@@ -19,7 +19,7 @@ Legend:
 ! -> Note
 $ -> Affected files
 
-22-Mar-2009 Janusz Dobrowolski
+22-Mar-2009 Janusz Dobrowolski/Joe Hun rerun, didn't work (empty file when inserting)
 # Fixed item picture display after upload, fixed item image filenames.
 $ /inventory/manage/items.php
   /inventory/includes/inventory_db.inc
index c841514c599fa8a0d1c05ed379b88bbc61d3f402..ca65111db900345424a3d1f162618e33c2f4cd36 100644 (file)
@@ -29,11 +29,10 @@ if (isset($_GET['stock_id']))
 {
        $_POST['stock_id'] = $stock_id = $_GET['stock_id'];
 }
-else if (isset($_POST['stock_id']))
+elseif (isset($_POST['stock_id']))
 {
        $stock_id = $_POST['stock_id'];
 }
-
 if (list_updated('stock_id')) {
        $_POST['NewStockID'] = get_post('stock_id');
     clear_data();
@@ -43,6 +42,7 @@ if (list_updated('stock_id')) {
 $upload_file = "";
 if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '') 
 {
+       $stock_id = $_POST['NewStockID'];
        $result = $_FILES['pic']['error'];
        $upload_file = 'Yes'; //Assume all is well to start off with
        $filename = $comp_path . "/$user_comp/images";
@@ -397,7 +397,7 @@ if (isset($_POST['NewStockID']) && file_exists("$comp_path/$user_comp/images/"
  // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D.
        $stock_img_link .= "<img id='item_img' alt = '[".$_POST['NewStockID'].".jpg".
                "]' src='$comp_path/$user_comp/images/".item_img_name($_POST['NewStockID']).".jpg?nocache=".rand()."'".
-               " width='$pic_width' height='$pic_height' border='0'>";
+               " height='$pic_height' border='0'>";
 } 
 else 
 {
index ac9a5f8fa3097d6ff19c2d13e3bbe5571d4fcd7f..d8f8d3bdebffba2d6a2823a724e3988b2fc64cde 100644 (file)
@@ -166,7 +166,7 @@ function print_price_listing()
                                $rep->NewLine();
                                if ($rep->row - $pic_height < $rep->bottomMargin)
                                        $rep->Header();
-                               $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, $pic_width, $pic_height);
+                               $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
                                $rep->row -= $pic_height;
                                $rep->NewLine();
                        }
index f4c73db30d67ebe125575587b4ae42074e88f590..4babe6e2efc3f1a449395b8a16e278c345984a5e 100644 (file)
@@ -207,7 +207,7 @@ function print_stock_check()
                                $rep->NewLine();
                                if ($rep->row - $pic_height < $rep->bottomMargin)
                                        $rep->Header();
-                               $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, $pic_width, $pic_height);
+                               $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
                                $rep->row -= $pic_height;
                                $rep->NewLine();
                        }