New Company Setup 'Barcodes On Stock' implemented. Rep303 shows barcodes if set.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 22 Nov 2017 23:12:27 +0000 (00:12 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 22 Nov 2017 23:12:27 +0000 (00:12 +0100)
admin/company_preferences.php
inventory/manage/items.php
reporting/includes/barcodes.php
reporting/rep303.php
sql/alter2.4.php

index 34af247c9b601b43d540242fbeaac5d9c9bb471b..b23c92c7bf520dcd4848fe7fb8091221f162afe4 100644 (file)
@@ -114,8 +114,8 @@ if (isset($_POST['update']) && $_POST['update'] != "")
                                'use_dimension', 'curr_default', 'f_year', 'shortname_name_in_list',
                                'no_item_list' => 0, 'no_customer_list' => 0, 
                                'no_supplier_list' =>0, 'base_sales', 
-                               'time_zone' => 0, 'company_logo_report' => 0, 'add_pct', 'round_to', 'login_tout', 'auto_curr_reval',
-                               'bcc_email', 'alternative_tax_include_on_docs', 'suppress_tax_rates',
+                               'time_zone' => 0, 'company_logo_report' => 0, 'barcodes_on_stock' => 0, 'add_pct', 'round_to', 'login_tout', 
+                               'auto_curr_reval', 'bcc_email', 'alternative_tax_include_on_docs', 'suppress_tax_rates',
                                'use_manufacturing', 'use_fixed_assets'))
                );
 
@@ -161,6 +161,12 @@ if (!isset($myrow["company_logo_report"]))
        $myrow["company_logo_report"] = get_company_pref("company_logo_report");
 }
 $_POST['company_logo_report']  = $myrow["company_logo_report"];
+if (!isset($myrow["barcodes_on_stock"]))
+{
+       set_company_pref("barcodes_on_stock", "setup.company", "tinyint", 1, '0');
+       $myrow["barcodes_on_stock"] = get_company_pref("barcodes_on_stock");
+}
+$_POST['barcodes_on_stock']  = $myrow["barcodes_on_stock"];
 $_POST['version_id']  = $myrow["version_id"];
 $_POST['add_pct'] = $myrow['add_pct'];
 $_POST['login_tout'] = $myrow['login_tout'];
@@ -201,6 +207,7 @@ check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']);
 check_row(_("Automatic Revaluation Currency Accounts"), 'auto_curr_reval', $_POST['auto_curr_reval']);
 check_row(_("Time Zone on Reports"), 'time_zone', $_POST['time_zone']);
 check_row(_("Company Logo on Reports"), 'company_logo_report', $_POST['company_logo_report']);
+check_row(_("Use Barcodes on Stocks"), 'barcodes_on_stock', $_POST['barcodes_on_stock']);
 label_row(_("Database Scheme Version"), $_POST['version_id']);
 
 table_section(2);
index 8ed29d2cb0bdaf7f484d86a3c7d8618f3c4fde71..06f27ea75fc98849f3e78626b70f3a14bf2de473 100644 (file)
@@ -316,8 +316,18 @@ function item_settings(&$stock_id, $new_item)
        //------------------------------------------------------------------------------------
        if ($new_item) 
        {
-               text_row(_("Item Code:"), 'NewStockID', null, 21, 20);
-
+               $tmpCodeID=null;
+               $post_label = null;
+               if (!empty($SysPrefs->prefs['barcodes_on_stock']))
+               {
+                       $post_label = '<button class="ajaxsubmit" type="submit" aspect=\'default\'  name="generateBarcode"  id="generateBarcode" value="Generate Barcode EAN8"> '._("Generate EAN-8 Barcode").' </button>';
+                       if (isset($_POST['generateBarcode']))
+                       {
+                               $tmpCodeID=generateBarcode();
+                               $_POST['NewStockID'] = $tmpCodeID;
+                       }
+               }       
+               text_row(_("Item Code:"), 'NewStockID', $tmpCodeID, 21, 20, null, "", $post_label);
                $_POST['inactive'] = 0;
        } 
        else 
@@ -652,3 +662,41 @@ end_form();
 //------------------------------------------------------------------------------------
 
 end_page();
+
+function generateBarcode() {
+       $tmpBarcodeID = "";
+       $tmpCountTrys = 0;
+       while ($tmpBarcodeID == "")     {
+               srand ((double) microtime( )*1000000);
+               $random_1  = rand(1,9);
+               $random_2  = rand(0,9);
+               $random_3  = rand(0,9);
+               $random_4  = rand(0,9);
+               $random_5  = rand(0,9);
+               $random_6  = rand(0,9);
+               $random_7  = rand(0,9);
+               //$random_8  = rand(0,9);
+
+                       // http://stackoverflow.com/questions/1136642/ean-8-how-to-calculate-checksum-digit
+               $sum1 = $random_2 + $random_4 + $random_6; 
+               $sum2 = 3 * ($random_1  + $random_3  + $random_5  + $random_7 );
+               $checksum_value = $sum1 + $sum2;
+
+               $checksum_digit = 10 - ($checksum_value % 10);
+               if ($checksum_digit == 10) 
+                       $checksum_digit = 0;
+
+               $random_8  = $checksum_digit;
+
+               $tmpBarcodeID = $random_1 . $random_2 . $random_3 . $random_4 . $random_5 . $random_6 . $random_7 . $random_8;
+
+               // LETS CHECK TO SEE IF THIS NUMBER HAS EVER BEEN USED
+               $query = "SELECT stock_id FROM ".TB_PREF."stock_master WHERE stock_id='" . $tmpBarcodeID . "'";
+               $arr_stock = db_fetch(db_query($query));
+  
+               if (  !$arr_stock['stock_id'] ) {
+                       return $tmpBarcodeID;
+               }
+               $tmpBarcodeID = "";      
+       }
+}
index 03ee468e215f9398a5fccc47ef78733083c165ed..bfe7f4a8fe1f50ba8728c62e0c4fa68df3878133 100644 (file)
@@ -79,7 +79,7 @@ class TCPDFBarcode {
         * <li>$arrcode["bcode"][$k]["h"] bar height in units.</li>
         * <li>$arrcode["bcode"][$k]["p"] bar top position (0 = top, 1 = middle)</li></ul>
         * @param string $code code to print
-        * @param string $type type of barcode: <ul><li>C39 : CODE 39</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED with checksum</li><li>I25 : Interleaved 2 of 5</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>POSTNET : POSTNET</li><li>CODABAR : CODABAR</li></ul>
+        * @param string $type type of barcode: <ul><li>C39 : CODE 39</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED with checksum</li><li>I25 : Interleaved 2 of 5</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>POSTNET : POSTNET</li><li>CODABAR : CODABAR</li></ul>
         */
        function __construct($code, $type) {
                $this->setBarcode($code, $type);
@@ -96,7 +96,7 @@ class TCPDFBarcode {
        /** 
         * Set the barcode.
         * @param string $code code to print
-        * @param string $type type of barcode: <ul><li>C39 : CODE 39</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED with checksum</li><li>I25 : Interleaved 2 of 5</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>POSTNET : POSTNET</li><li>CODABAR : CODABAR</li></ul>
+        * @param string $type type of barcode: <ul><li>C39 : CODE 39</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED with checksum</li><li>I25 : Interleaved 2 of 5</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>POSTNET : POSTNET</li><li>CODABAR : CODABAR</li></ul>
         * @return array
         */
        function setBarcode($code, $type) {
@@ -133,12 +133,28 @@ class TCPDFBarcode {
                                $arrcode = $this->barcode_c128($code, "C");
                                break;
                        }
-                       case "EAN13": { // EAN 13
-                               $arrcode = $this->barcode_ean13($code, 13);
+                       case 'EAN2': { // 2-Digits UPC-Based Extension
+                               $arrcode = $this->barcode_eanext($code, 2);
                                break;
                        }
-                       case "UPCA": { // UPC-A
-                               $arrcode = $this->barcode_ean13($code, 12);
+                       case 'EAN5': { // 5-Digits UPC-Based Extension
+                               $arrcode = $this->barcode_eanext($code, 5);
+                               break;
+                       }
+                       case 'EAN8': { // EAN 8
+                               $arrcode = $this->barcode_eanupc($code, 8);
+                               break;
+                       }
+                       case 'EAN13': { // EAN 13
+                               $arrcode = $this->barcode_eanupc($code, 13);
+                               break;
+                       }
+                       case 'UPCA': { // UPC-A
+                               $arrcode = $this->barcode_eanupc($code, 12);
+                               break;
+                       }
+                       case 'UPCE': { // UPC-E
+                               $arrcode = $this->barcode_eanupc($code, 6);
                                break;
                        }
                        case "POSTNET": { // POSTNET
@@ -570,49 +586,84 @@ class TCPDFBarcode {
                }
                return $bararray;               
        }
-       
+
        /**
         * EAN13 and UPC-A barcodes.
-        * @param string $code code to represent.
-        * @param string $len barcode type: 13 = EAN13, 12 = UPC-A
+        * EAN13: European Article Numbering international retail product code
+        * UPC-A: Universal product code seen on almost all retail products in the USA and Canada
+        * UPC-E: Short version of UPC symbol
+        * @param $code (string) code to represent.
+        * @param $len (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
         * @return array barcode representation.
-        * @access protected
+        * @protected
         */
-       function barcode_ean13($code, $len=13) {
+       protected function barcode_eanupc($code, $len=13) {
+               $upce = false;
+               if ($len == 6) {
+                       $len = 12; // UPC-A
+                       $upce = true; // UPC-E mode
+               }
+               $data_len = $len - 1;
                //Padding
-               $code = str_pad($code, $len-1, '0', STR_PAD_LEFT);
-               if($len == 12) {
-                       $code = '0'.$code;
+               $code = str_pad($code, $data_len, '0', STR_PAD_LEFT);
+               $code_len = strlen($code);
+               // calculate check digit
+               $sum_a = 0;
+               for ($i = 1; $i < $data_len; $i+=2) {
+                       $sum_a += $code{$i};
                }
-               // add check digit
-               if(strlen($code) == 12) {
-                       $sum=0;
-                       for($i=1;$i<=11;$i+=2) {
-                               $sum += (3 * $code{$i});
-                       }
-                       for($i=0; $i <= 10; $i+=2) {
-                               $sum += ($code{$i});
-                       }
-                       $r = $sum % 10;
-                       if($r > 0) {
-                               $r = (10 - $r);
-                       }
+               if ($len > 12) {
+                       $sum_a *= 3;
+               }
+               $sum_b = 0;
+               for ($i = 0; $i < $data_len; $i+=2) {
+                       $sum_b += ($code{$i});
+               }
+               if ($len < 13) {
+                       $sum_b *= 3;
+               }
+               $r = ($sum_a + $sum_b) % 10;
+               if($r > 0) {
+                       $r = (10 - $r);
+               }
+               if ($code_len == $data_len) {
+                       // add check digit
                        $code .= $r;
-               } else { // test checkdigit
-                       $sum = 0;
-                       for($i=1; $i <= 11; $i+=2) {
-                               $sum += (3 * $code{$i});
-                       }
-                       for($i=0; $i <= 10; $i+=2) {
-                               $sum += $code{$i};
-                       }
-                       if ((($sum + $code{12}) % 10) != 0) {
-                               return false;
+               } elseif ($r !== intval($code{$data_len})) {
+                       // wrong checkdigit
+                       return false;
+               }
+               if ($len == 12) {
+                       // UPC-A
+                       $code = '0'.$code;
+                       ++$len;
+               }
+               if ($upce) {
+                       // convert UPC-A to UPC-E
+                       $tmp = substr($code, 4, 3);
+                       if (($tmp == '000') OR ($tmp == '100') OR ($tmp == '200')) {
+                               // manufacturer code ends in 000, 100, or 200
+                               $upce_code = substr($code, 2, 2).substr($code, 9, 3).substr($code, 4, 1);
+                       } else {
+                               $tmp = substr($code, 5, 2);
+                               if ($tmp == '00') {
+                                       // manufacturer code ends in 00
+                                       $upce_code = substr($code, 2, 3).substr($code, 10, 2).'3';
+                               } else {
+                                       $tmp = substr($code, 6, 1);
+                                       if ($tmp == '0') {
+                                               // manufacturer code ends in 0
+                                               $upce_code = substr($code, 2, 4).substr($code, 11, 1).'4';
+                                       } else {
+                                               // manufacturer code does not end in zero
+                                               $upce_code = substr($code, 2, 5).substr($code, 11, 1);
+                                       }
+                               }
                        }
                }
                //Convert digits to bars
                $codes = array(
-                       'A'=>array(
+                       'A'=>array( // left odd parity
                                '0'=>'0001101',
                                '1'=>'0011001',
                                '2'=>'0010011',
@@ -623,7 +674,7 @@ class TCPDFBarcode {
                                '7'=>'0111011',
                                '8'=>'0110111',
                                '9'=>'0001011'),
-                       'B'=>array(
+                       'B'=>array( // left even parity
                                '0'=>'0100111',
                                '1'=>'0110011',
                                '2'=>'0011011',
@@ -634,7 +685,7 @@ class TCPDFBarcode {
                                '7'=>'0010001',
                                '8'=>'0001001',
                                '9'=>'0010111'),
-                       'C'=>array(
+                       'C'=>array( // right
                                '0'=>'1110010',
                                '1'=>'1100110',
                                '2'=>'1101100',
@@ -658,38 +709,78 @@ class TCPDFBarcode {
                        '8'=>array('A','B','A','B','B','A'),
                        '9'=>array('A','B','B','A','B','A')
                );
-               
-               $bararray = array("code" => $code, "maxw" => 0, "maxh" => 1, "bcode" => array());
+               $upce_parities = array();
+               $upce_parities[0] = array(
+                       '0'=>array('B','B','B','A','A','A'),
+                       '1'=>array('B','B','A','B','A','A'),
+                       '2'=>array('B','B','A','A','B','A'),
+                       '3'=>array('B','B','A','A','A','B'),
+                       '4'=>array('B','A','B','B','A','A'),
+                       '5'=>array('B','A','A','B','B','A'),
+                       '6'=>array('B','A','A','A','B','B'),
+                       '7'=>array('B','A','B','A','B','A'),
+                       '8'=>array('B','A','B','A','A','B'),
+                       '9'=>array('B','A','A','B','A','B')
+               );
+               $upce_parities[1] = array(
+                       '0'=>array('A','A','A','B','B','B'),
+                       '1'=>array('A','A','B','A','B','B'),
+                       '2'=>array('A','A','B','B','A','B'),
+                       '3'=>array('A','A','B','B','B','A'),
+                       '4'=>array('A','B','A','A','B','B'),
+                       '5'=>array('A','B','B','A','A','B'),
+                       '6'=>array('A','B','B','B','A','A'),
+                       '7'=>array('A','B','A','B','A','B'),
+                       '8'=>array('A','B','A','B','B','A'),
+                       '9'=>array('A','B','B','A','B','A')
+               );
                $k = 0;
-               $seq = '101';
-               $p = $parities[$code{0}];
-               for($i=1; $i < 7; $i++) {
-                       $seq .= $codes[$p[$i-1]][$code{$i}];
-               }
-               $seq .= '01010';
-               for($i=7; $i < 13; $i++) {
-                       $seq .= $codes['C'][$code{$i}];
+               $seq = '101'; // left guard bar
+               if ($upce) {
+                       $bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+                       $p = $upce_parities[$code[1]][$r];
+                       for ($i = 0; $i < 6; ++$i) {
+                               $seq .= $codes[$p[$i]][$upce_code{$i}];
+                       }
+                       $seq .= '010101'; // right guard bar
+               } else {
+                       $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+                       $half_len = intval(ceil($len / 2));
+                       if ($len == 8) {
+                               for ($i = 0; $i < $half_len; ++$i) {
+                                       $seq .= $codes['A'][$code{$i}];
+                               }
+                       } else {
+                               $p = $parities[$code[0]];
+                               for ($i = 1; $i < $half_len; ++$i) {
+                                       $seq .= $codes[$p[$i-1]][$code{$i}];
+                               }
+                       }
+                       $seq .= '01010'; // center guard bar
+                       for ($i = $half_len; $i < $len; ++$i) {
+                               $seq .= $codes['C'][$code{$i}];
+                       }
+                       $seq .= '101'; // right guard bar
                }
-               $seq .= '101';
-               $len = strlen($seq);
+               $clen = strlen($seq);
                $w = 0;
-               for($i=0; $i < $len; $i++) {
+               for ($i = 0; $i < $clen; ++$i) {
                        $w += 1;
-                       if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
+                       if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
                                if ($seq{$i} == '1') {
                                        $t = true; // bar
                                } else {
                                        $t = false; // space
                                }
-                               $bararray["bcode"][$k] = array("t" => $t, "w" => $w, "h" => 1, "p" => 0);
-                               $bararray["maxw"] += $w;
-                               $k++;
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
                                $w = 0;
                        }
                }
                return $bararray;
        }
-       
+
        /**
         * POSTNET barcodes.
         * @param string $code zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
index 7d8984dbfca13d4b2af6974b529c3b901985d9a5..8851ca7ebc1836f1df4bcae90c088ed29a8bc4be 100644 (file)
@@ -112,6 +112,7 @@ function print_stock_check()
                $short = _('No');
                $available = _('Available');
        }
+       $barcodes = !empty($SysPrefs->prefs['barcodes_on_stock']);
        if ($no_zeros) $nozeros = _('Yes');
        else $nozeros = _('No');
        if ($check)
@@ -127,12 +128,33 @@ function print_stock_check()
                $aligns = array('left', 'left', 'left', 'right', 'right', 'right', 'right');
        }
 
+    $params =   array(
+               0 => $comments,
+       1 => array('text' => _('Category'), 'from' => $cat, 'to' => ''),
+       2 => array('text' => _('Location'), 'from' => $loc, 'to' => ''),
+       3 => array('text' => _('Only Shortage'), 'from' => $short, 'to' => ''),
+               4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => '')
+       );
 
-       $params =   array(      0 => $comments,
-                               1 => array('text' => _('Category'), 'from' => $cat, 'to' => ''),
-                               2 => array('text' => _('Location'), 'from' => $loc, 'to' => ''),
-                               3 => array('text' => _('Only Shortage'), 'from' => $short, 'to' => ''),
-                                       4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => ''));
+       if ($barcodes)
+       {
+       // define barcode style
+       $style = array(
+               'position' => 'L', // If blank string, barcode starts on left edge of page
+               'stretch' => false,
+               'fitwidth' => true,
+               'cellfitalign' => '',
+               'border' => false,
+               'padding' => 3,
+               'fgcolor' => array(0,0,0),
+               'bgcolor' => false, //array(255,255,255),
+               'text' => true,
+               'font' => 'helvetica',
+               'fontsize' => 8,
+               'stretchtext' => 4
+       );
+       // write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres=0.4, $style='', $align='')
+    }  
 
        $rep = new FrontReport(_('Stock Check Sheets'), "StockCheckSheet", user_pagesize(), 9, $orientation);
     if ($orientation == 'L')
@@ -191,19 +213,29 @@ function print_stock_check()
                        $rep->AmountCol(5, 6, $trans['QtyOnHand'] - $demandqty, $dec);
                        $rep->AmountCol(6, 7, $onorder, $dec);
                }
-               if ($pictures)
+               if ($pictures || $barcodes)
                {
-                       $image = company_path() . '/images/'
-                               . item_img_name($trans['stock_id']) . '.jpg';
-                       if (file_exists($image))
+                       $rep->NewLine();
+                       if ($rep->row - $SysPrefs->pic_height < $rep->bottomMargin)
+                               $rep->NewPage();
+                       $firstcol = 1;  
+                       if ($barcodes)
                        {
-                               $rep->NewLine();
-                               if ($rep->row - $SysPrefs->pic_height < $rep->bottomMargin)
-                                       $rep->NewPage();
-                               $rep->AddImage($image, $rep->cols[1], $rep->row - $SysPrefs->pic_height, 0, $SysPrefs->pic_height);
-                               $rep->row -= $SysPrefs->pic_height;
-                               $rep->NewLine();
-                       }
+                               $bar_y = $rep->GetY();
+                               $barcode = str_pad($trans['stock_id'], 7, '0', STR_PAD_LEFT);
+                               $barcode = substr($barcode, 0, 8); // EAN 8 Check digit is auto computed and barcode printed
+                               $rep->write1DBarcode($barcode, 'EAN8', $rep->cols[$firstcol++], $bar_y + 22, 22, $SysPrefs->pic_height, 1.2, $style, 'N');
+                       }       
+                       if ($pictures)
+                       {
+                               $image = company_path() . '/images/' . item_img_name($trans['stock_id']) . '.jpg';
+                               if (file_exists($image))
+                               {
+                                       $rep->AddImage($image, $rep->cols[$firstcol], $rep->row - $SysPrefs->pic_height, 0, $SysPrefs->pic_height);
+                               }
+                       }       
+                       $rep->row -= $SysPrefs->pic_height;
+                       $rep->NewLine();
                }
        }
        $rep->Line($rep->row - 4);
index b3ec864dc6a04da9673678ad3ddacefbabe5166b..51136eac266e98d0f6faefa4b8bac725eb0f9983 100644 (file)
@@ -74,6 +74,9 @@ class fa2_4 extends fa_patch {
                if (get_company_pref('company_logo_report') === null) { // available from 2.4.2, during updates
                        set_company_pref('company_logo_report', 'setup.company', 'tinyint', 1, '0');
                }
+               if (get_company_pref('barcodes_on_stock') === null) { // available from 2.4.3, during updates
+                       set_company_pref('barcodes_on_stock', 'setup.company', 'tinyint', 1, '0');
+               }
                if (get_company_pref('shortname_name_in_list') === null) { // available from 2.4.2, during updates
                        set_company_pref('shortname_name_in_list', 'setup.company', 'tinyint', 1, '0');
                }
@@ -114,7 +117,8 @@ class fa2_4 extends fa_patch {
                                'tax_algorithm', 'grn_clearing_act', 'default_receival_required',
                                'default_quote_valid_days',     'no_zero_lines_amount', 'show_po_item_codes', 'accounts_alpha',
                                'loc_notification', 'print_invoice_no', 'allow_negative_prices', 'print_item_images_on_quote',
-                               'bcc_email', 'alternative_tax_include_on_docs', 'suppress_tax_rates', 'company_logo_report')");
+                               'bcc_email', 'alternative_tax_include_on_docs', 'suppress_tax_rates', 'company_logo_report',
+                               'barcodes_on_report')");
        }
 
        function update_workorders()