diff --git a/fannie/item/ajax.php b/fannie/item/ajax.php
index 7e16877e24..3914b0c4cb 100644
--- a/fannie/item/ajax.php
+++ b/fannie/item/ajax.php
@@ -1,5 +1,6 @@
diff --git a/fannie/item/insertItem_WEFC_Toronto.php b/fannie/item/insertItem_WEFC_Toronto.php
index af06f2c470..061cbf5f9b 100644
--- a/fannie/item/insertItem_WEFC_Toronto.php
+++ b/fannie/item/insertItem_WEFC_Toronto.php
@@ -22,7 +22,7 @@
*********************************************************************************/
/* --FUNCTIONALITY- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * These lines grepped in from this listing: !!grep "^/. [0-9]\." %
+ * These lines grepped in from this listing: !!grep "^/. [0-9]*\." %
*/
/* 1. Insert or update coop-specific product data */
/* 2. Replace likecode. */
@@ -31,8 +31,9 @@
/* 5. Insert to prodExtra */
/* 6. Insert to prodUpdate, an audit table. */
/* 7. Insert to scaleItem */
-/* 8. Delete and re-add to product-related tables on the lanes. */
-/* 9. Display the post-update values and an input for the next edit. */
+/* 8. Delete and re-add to product-related tables on the lanes. */
+/* 9. Display the post-update values and an input for the next edit. */
+/* 10. If requested on the capture form, pop a window for making a shelf tag. */
/* --COMMENTS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
@@ -463,6 +464,7 @@
echo "";
+ /* 10. If requested on the capture form, pop a window for making a shelf tag. */
if (isset($_REQUEST['newshelftag'])){
echo "
-
-
-
-
Edit Item";
-echo "";
-echo "";
-}
-
-include ('../src/footer.html');
-
-?>
diff --git a/fannie/item/itemMaint.php b/fannie/item/itemMaint.php
new file mode 120000
index 0000000000..8bfbeb73ed
--- /dev/null
+++ b/fannie/item/itemMaint.php
@@ -0,0 +1 @@
+itemMaint_WEFC_Toronto.php
\ No newline at end of file
diff --git a/fannie/item/itemMaint_orig.php b/fannie/item/itemMaint_orig.php
new file mode 100644
index 0000000000..ff0f87e434
--- /dev/null
+++ b/fannie/item/itemMaint_orig.php
@@ -0,0 +1,91 @@
+
+
+
+
+
+Edit Item";
+echo "";
+echo "";
+}
+
+include ('../src/footer.html');
+
+?>
diff --git a/fannie/item/prodFunction.php b/fannie/item/prodFunction.php
index 736622ba9e..3a6f1854e0 100644
--- a/fannie/item/prodFunction.php
+++ b/fannie/item/prodFunction.php
@@ -24,54 +24,66 @@
*********************************************************************************/
// TODO -- Add javascript for batcher product entry popup window ~joel 2007-08-21
+/* --COMMENTS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ * 22Feb2013 Eric Lee Add support for editing
+ * products.quantity, .groupprice, .pricemethod, .mixmatchcode
+ * products.size, .unitofmeasure
+ * 10Feb2013 Eric Lee In itemParse add FANNIE_STORE_ID to globals.
+
+*/
+
+
include_once('../src/mysql_connect.php');
include_once('../auth/login.php');
include_once('ajax.php');
function itemParse($upc){
global $dbc,$FANNIE_URL;
+ global $FANNIE_STORE_ID;
+ global $FANNIE_COOP_ID;
$logged_in = checkLogin();
$queryItem = "";
$numType = (isset($_REQUEST['ntype'])?$_REQUEST['ntype']:'UPC');
if(is_numeric($upc)){
- switch($numType){
- case 'UPC':
- $upc = str_pad($upc,13,0,STR_PAD_LEFT);
- $savedUPC = $upc;
- $queryItem = "SELECT p.*,x.distributor,x.manufacturer
- FROM products as p left join
- prodExtra as x on p.upc=x.upc
- WHERE (p.upc = '$upc' or x.upc = '$upc')
- AND p.store_id=0";
- break;
- case 'SKU':
- $queryItem = "SELECT p.*,x.distributor,x.manufacturer
- FROM products as p inner join
- vendorItems as v ON p.upc=v.upc
- left join prodExtra as x on p.upc=x.upc
- WHERE v.sku='$upc'
- AND p.store_id=0";
- break;
- case 'Brand Prefix':
- $queryItem = "SELECT p.*,x.distributor,x.manufacturer
- FROM products as p left join
- prodExtra as x on p.upc=x.upc
- WHERE p.upc like '%$upc%'
- AND p.store_id=0
- ORDER BY p.upc";
- break;
- }
+ switch($numType){
+ case 'UPC':
+ $upc = str_pad($upc,13,0,STR_PAD_LEFT);
+ $savedUPC = $upc;
+ $queryItem = "SELECT p.*,x.distributor,x.manufacturer
+ FROM products as p left join
+ prodExtra as x on p.upc=x.upc
+ WHERE (p.upc = '$upc' or x.upc = '$upc')
+ AND p.store_id=0";
+ break;
+ case 'SKU':
+ $queryItem = "SELECT p.*,x.distributor,x.manufacturer
+ FROM products as p inner join
+ vendorItems as v ON p.upc=v.upc
+ left join prodExtra as x on p.upc=x.upc
+ WHERE v.sku='$upc'
+ AND p.store_id=0";
+ break;
+ case 'Brand Prefix':
+ $queryItem = "SELECT p.*,x.distributor,x.manufacturer
+ FROM products as p left join
+ prodExtra as x on p.upc=x.upc
+ WHERE p.upc like '%$upc%'
+ AND p.store_id=0
+ ORDER BY p.upc";
+ break;
+ }
}else{
+ /* note: only search by HQ records (store_id=0) to avoid duplicates */
$queryItem = "SELECT p.*,x.distributor,x.manufacturer
- FROM products AS p LEFT JOIN
- prodExtra AS x ON p.upc=x.upc
- WHERE description LIKE '%$upc%'
- AND p.store_id=0
- ORDER BY description";
+ FROM products AS p LEFT JOIN
+ prodExtra AS x ON p.upc=x.upc
+ WHERE description LIKE '%$upc%'
+ AND p.store_id=0
+ ORDER BY description";
}
- /* note: only search by HQ records (store_id=0) to avoid duplicates */
$resultItem = $dbc->query($queryItem);
$num = $dbc->num_rows($resultItem);
@@ -655,8 +667,13 @@ function itemParse($upc){
echo '';
echo " ";
echo '