From: wertthey <jp...@nu...> - 2015-02-11 16:04:28
|
Over the last few years I keep adding the same code each revision I upgrade I think that it is very helpful and would like to share it. It uses code from FROM http://phpqrcode.sourceforge.net/ http://phpqrcode.sourceforge.net/examples/index.php * PHP QR Code is distributed under LGPL 3 * Copyright (C) 2010 Dominik Dzienia I do understand that there is a whole label feature, but it really doesn't really work well for me. When I send people out on a job, they where loosing (not accounting) for product that they installed. So when we receive the product we add a label that allows us to quickly identify the product, and have something that our field people's cell phones can record (bar-code box scan app works well) as a list as they use the product which allows us to quickly to invoice. So during our receiving processes. As shipping receives the product. We have them count the items Enter the "This Delivery Quantity" then click on the Item code, which opens a new target window to show the label. <http://weberp-accounting.1478800.n4.nabble.com/file/n4658074/GoodsReceived.jpg> I modified the follow line to GoodsReceived.php below the jwp jpalof //Now Display LineItem //jwp jpalof 11182014 Removed the below line as who needs the picture if it is on the label. //echo ' StockID . '.jpg" target="_blank">' . $LnItm->StockID . ' <"' . $RootPath . '/' . $_SESSION['part_pics_dir'] . '/' . $LnItm-> //jwp jpalof 1118014 added the below line so you can click on the part number and then print the label. echo ' StockID . '&Description=' . $LnItm->ItemDescription . '"target="' . $LnItm->StockID . '">' . $LnItm->StockID . ' <"' . $RootPath . 'qrcode/phpqrcode/index.php?StockID=' . $LnItm-> ' . $LnItm->ItemDescription . ' ' . $DisplaySupplierQtyOrd . ' ' . $LnItm->SuppliersUnit . ' ' . $DisplaySupplierQtyRec . ' ' . $LnItm->ConversionFactor . ' ' . $DisplayQtyOrd . ' <http://weberp-accounting.1478800.n4.nabble.com/file/n4658074/label.jpg> this label is really nice as we can print it on a dymo labelwriter 400 on cheap address labels. The shipping person just hits print and chooses the number of copies. If for some reason we find a part in the stock room that does not have a label, I have modified the SelectProduct.php page so that while you are looking at the item you can print a label. <http://weberp-accounting.1478800.n4.nabble.com/file/n4658074/SelectProduct.jpg> which opens the label in its own page. the code from http://phpqrcode.sourceforge.net/ resides for me under /qrcode/phpqrcode/ where I modified the index.php that came with the phpqrcode. so it looks like <?php /* * PHP QR Code encoder * * Exemplatory usage * * PHP QR Code is distributed under LGPL 3 * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* $Id: SelectProduct.php 6908 2014-10-06 05:13:27Z daintree $ echo ' ' . _('Print Stock Label') . ' <' . $RootPath . '/qrcode/phpqrcode/index2.php?StockID=' . $StockID . '> <br />';*/ $PricesSecurity = 12;//don't show pricing info unless security token 12 available to user $SuppliersSecurity = 9; //don't show supplier purchasing info unless security token 9 available to user include ('includes/session.inc'); $Title = _('Search Inventory Items'); /* webERP manual links before header.inc */ $ViewTopic= 'Inventory'; $BookMark = 'SelectingInventory'; include ('includes/header.inc'); include ('includes/SQL_CommonFunctions.inc'); //set it to writable location, a place for temp generated PNG files $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //html PNG location prefix $PNG_WEB_DIR = 'temp/'; include "qrlib.php"; //ofcourse we need rights to create temp dir if (!file_exists($PNG_TEMP_DIR)) mkdir($PNG_TEMP_DIR); $filename = $PNG_TEMP_DIR.'test.png'; //Correction Level Options. array('L','M','Q','H') $errorCorrectionLevel = 'L'; // Size option 1-10 $matrixPointSize = 4; //Defining the size and quality of the qr code. QRcode::png($_GET['StockID'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); // Writing the code to the screen echo ' <'.$PNG_WEB_DIR.basename($filename).'> '.$_GET["StockID"].' <' . $RootPath . '/companies/weberp/part_pics/'.$_GET[> <p style="font-size:11px">..'.$_GET["Description"].'</p> '; I hope this helps someone and I would hope even more, it may be added to future versions. It would be nice to be able to have a setting for both the label image size pixels and the qrcode size (1-5) in setup System Parameters since the description and the part number are already limited in size it works out nicely ----- Using weberp since 2004, Thanks for all your hard work! -- View this message in context: http://weberp-accounting.1478800.n4.nabble.com/For-Consideration-I-have-Added-qrcode-for-part-labeling-tp4658074.html Sent from the web-ERP-developers mailing list archive at Nabble.com. |
From: wertthey <jp...@nu...> - 2015-02-11 16:08:44
|
Over the last few years I keep adding the same code each revision I upgrade I think that it is very helpful and would like to share it. It uses code from FROM http://phpqrcode.sourceforge.net/ http://phpqrcode.sourceforge.net/examples/index.php * PHP QR Code is distributed under LGPL 3 * Copyright (C) 2010 Dominik Dzienia I do understand that there is a whole label feature, but it really doesn't really work well for me. When I send people out on a job, they where loosing (not accounting) for product that they installed. So when we receive the product we add a label that allows us to quickly identify the product, and have something that our field people's cell phones can record (bar-code box scan app works well) as a list as they use the product which allows us to quickly to invoice. So during our receiving processes. As shipping receives the product. We have them count the items Enter the "This Delivery Quantity" then click on the Item code, which opens a new target window to show the label. <http://weberp-accounting.1478800.n4.nabble.com/file/n4658076/GoodsReceived.jpg> I modified the follow line to GoodsReceived.php below the jwp jpalof //Now Display LineItem //jwp jpalof 11182014 Removed the below line as who needs the picture if it is on the label. //echo ' StockID . '.jpg" target="_blank">' . $LnItm->StockID . ' <"' . $RootPath . '/' . $_SESSION['part_pics_dir'] . '/' . $LnItm-> //jwp jpalof 1118014 added the below line so you can click on the part number and then print the label. echo ' StockID . '&Description=' . $LnItm->ItemDescription . '"target="' . $LnItm->StockID . '">' . $LnItm->StockID . ' <"' . $RootPath . 'qrcode/phpqrcode/index.php?StockID=' . $LnItm-> ' . $LnItm->ItemDescription . ' ' . $DisplaySupplierQtyOrd . ' ' . $LnItm->SuppliersUnit . ' ' . $DisplaySupplierQtyRec . ' ' . $LnItm->ConversionFactor . ' ' . $DisplayQtyOrd . ' <http://weberp-accounting.1478800.n4.nabble.com/file/n4658076/label.jpg> this label is really nice as we can print it on a dymo labelwriter 400 on cheap address labels. The shipping person just hits print and chooses the number of copies. If for some reason we find a part in the stock room that does not have a label, I have modified the SelectProduct.php page so that while you are looking at the item you can print a label. <http://weberp-accounting.1478800.n4.nabble.com/file/n4658076/SelectProduct.jpg> which opens the label in its own page. the code from http://phpqrcode.sourceforge.net/ resides for me under /qrcode/phpqrcode/ where I modified the index.php that came with the phpqrcode. so it looks like <?php /* * PHP QR Code encoder * * Exemplatory usage * * PHP QR Code is distributed under LGPL 3 * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* $Id: SelectProduct.php 6908 2014-10-06 05:13:27Z daintree $ echo ' ' . _('Print Stock Label') . ' <' . $RootPath . '/qrcode/phpqrcode/index2.php?StockID=' . $StockID . '> <br />';*/ $PricesSecurity = 12;//don't show pricing info unless security token 12 available to user $SuppliersSecurity = 9; //don't show supplier purchasing info unless security token 9 available to user include ('includes/session.inc'); $Title = _('Search Inventory Items'); /* webERP manual links before header.inc */ $ViewTopic= 'Inventory'; $BookMark = 'SelectingInventory'; include ('includes/header.inc'); include ('includes/SQL_CommonFunctions.inc'); //set it to writable location, a place for temp generated PNG files $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //html PNG location prefix $PNG_WEB_DIR = 'temp/'; include "qrlib.php"; //ofcourse we need rights to create temp dir if (!file_exists($PNG_TEMP_DIR)) mkdir($PNG_TEMP_DIR); $filename = $PNG_TEMP_DIR.'test.png'; //Correction Level Options. array('L','M','Q','H') $errorCorrectionLevel = 'L'; // Size option 1-10 $matrixPointSize = 4; //Defining the size and quality of the qr code. QRcode::png($_GET['StockID'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); // Writing the code to the screen echo ' <'.$PNG_WEB_DIR.basename($filename).'> '.$_GET["StockID"].' <' . $RootPath . '/companies/weberp/part_pics/'.$_GET[> <p style="font-size:11px">..'.$_GET["Description"].'</p> '; I hope this helps someone and I would hope even more, it may be added to future versions. It would be nice to be able to have a setting for both the label image size pixels and the qrcode size (1-5) in setup System Parameters since the description and the part number are already limited in size it works out nicely ----- Using weberp since 2004, Thanks for all your hard work! -- View this message in context: http://weberp-accounting.1478800.n4.nabble.com/For-Consideration-I-have-Added-qrcode-for-part-labeling-tp4658076.html Sent from the web-ERP-developers mailing list archive at Nabble.com. |