Add datamatrix en qrcode barcodes

This commit is contained in:
Francis Appels 2015-05-03 10:07:04 +02:00
parent 96dfdfeb73
commit f9908c48cb
3 changed files with 11 additions and 5 deletions

View File

@ -194,7 +194,7 @@ class modTcpdfbarcode extends ModeleBarCode
* @param string $dolEncodingType dolibarr barcode encoding type * @param string $dolEncodingType dolibarr barcode encoding type
* @return string tcpdf encoding type * @return string tcpdf encoding type
*/ */
private function getTcpdfEncodingType($dolEncodingType) public function getTcpdfEncodingType($dolEncodingType)
{ {
$tcpdf1dEncodingTypes = array( $tcpdf1dEncodingTypes = array(
'C39' => 'C39', 'C39' => 'C39',

View File

@ -65,9 +65,11 @@ class modBarcode extends DolibarrModules
// Constants // Constants
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0), // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) ); // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
$this->const = array( $this->const = array();
//0=>array('GENBARCODE_LOCATION','chaine',DOL_DOCUMENT_ROOT.'/includes/barcode/genbarcode/genbarcode','Path to genbarcode command line tool',0) //$this->const[0] = array('BARCODE_LABEL_LEFT_TEXT','chaine','%BARCODE%','Print barcode on left side of label',1);
); //$this->const[1] = array('BARCODE_LABEL_RIGHT_TEXT','chaine','%LOGO%','Print Company logo on right side',1);
//$this->const[2] = array('BARCODE_LABEL_HEADER_TEXT','chaine','My header','Print header text on label',1);
//$this->const[3] = array('BARCODE_LABEL_FOOTER_TEXT','chaine','My footer','Print footer text on label',1);
// Boxes // Boxes
$this->boxes = array(); $this->boxes = array();
@ -137,7 +139,9 @@ class modBarcode extends DolibarrModules
array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)",'ignoreerror'=>1), array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)",'ignoreerror'=>1),
array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)",'ignoreerror'=>1), array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)",'ignoreerror'=>1),
array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)",'ignoreerror'=>1), array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)",'ignoreerror'=>1),
array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)",'ignoreerror'=>1) array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)",'ignoreerror'=>1),
array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('DATAMATRIX', 'Datamatrix', 0, '1234567xyz', __ENTITY__)",'ignoreerror'=>1),
array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('QRCODE', 'Qr Code', 0, 'www.dolibarr.org', __ENTITY__)",'ignoreerror'=>1)
); );
return $this->_init($sql, $options); return $this->_init($sql, $options);

View File

@ -1422,6 +1422,8 @@ BarcodeDescUPC=Barcode of type UPC
BarcodeDescISBN=Barcode of type ISBN BarcodeDescISBN=Barcode of type ISBN
BarcodeDescC39=Barcode of type C39 BarcodeDescC39=Barcode of type C39
BarcodeDescC128=Barcode of type C128 BarcodeDescC128=Barcode of type C128
BarcodeDescDATAMATRIX=Barcode of type Datamatrix
BarcodeDescQRCODE=Barcode of type QR code
GenbarcodeLocation=Bar code generation command line tool (used by internal engine for some bar code types). Must be compatible with "genbarcode".<br>For example: /usr/local/bin/genbarcode GenbarcodeLocation=Bar code generation command line tool (used by internal engine for some bar code types). Must be compatible with "genbarcode".<br>For example: /usr/local/bin/genbarcode
BarcodeInternalEngine=Internal engine BarcodeInternalEngine=Internal engine
BarCodeNumberManager=Manager to auto define barcode numbers BarCodeNumberManager=Manager to auto define barcode numbers