From ffd80e3f8ffbe2b07b2e8f26dc995a47341dd100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 30 Apr 2016 18:56:16 +0200 Subject: [PATCH] select engine for code 128 didn't work --- htdocs/admin/barcode.php | 54 +++++++++++++++------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index b7cc6e94bf2..29475d712df 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -62,21 +62,12 @@ if ($action == 'setcoder') } else if ($action == 'update') { - if (GETPOST('submit_GENBARCODE_LOCATION')) - { - $location = GETPOST('GENBARCODE_LOCATION','alpha'); - $res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity); - } - if (GETPOST('submit_PRODUIT_DEFAULT_BARCODE_TYPE')) - { - $coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha'); - $res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity); - } - if (GETPOST('submit_GENBARCODE_BARCODETYPE_THIRDPARTY')) - { - $coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha'); - $res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity); - } + $location = GETPOST('GENBARCODE_LOCATION','alpha'); + $res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity); + $coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha'); + $res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity); + $coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha'); + $res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity); } else if ($action == 'updateengine') { @@ -195,9 +186,9 @@ $var=true; print '
'; print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'',''); -print "
"; -print ''; -print ""; +//print ""; +//print ''; +//print ""; print ''; print ''; @@ -261,7 +252,7 @@ if ($resql) // Build barcode on disk (not used, this is done to make debug easier) $result=$module->writeBarCode($obj->example,$obj->encoding,'Y'); // Generate on the fly and output barcode with generator - $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding); + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding); //print $url; print ''; } @@ -296,7 +287,7 @@ if (empty($conf->use_javascript_ajax)) // TODO Implement code behind action updateengine //print '
'; } -print ''; +//print ''; print "
"; @@ -331,9 +322,7 @@ if (! isset($_SERVER['WINDIR'])) $langs->load("errors"); print '
'.$langs->trans("ErrorFileNotFound",$conf->global->GENBARCODE_LOCATION).''; } - print ''; - print ''; - print ''; + print ''; } // Module products @@ -344,10 +333,7 @@ if (! empty($conf->product->enabled)) print ''; print '"; - print ''; + print ''; } // Module thirdparty @@ -358,13 +344,13 @@ if (! empty($conf->societe->enabled)) print ''; print '"; - print ''; + print ''; } print "
'.$langs->trans("SetDefaultBarcodeTypeProducts").''; $formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"PRODUIT_DEFAULT_BARCODE_TYPE",1); - print ''; - print ''; - print "
'.$langs->trans("SetDefaultBarcodeTypeThirdParties").''; print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"GENBARCODE_BARCODETYPE_THIRDPARTY",1); - print ''; - print ''; - print "
\n"; +print '
'; +print ''; +print "
"; print ''; print '
'; @@ -419,13 +405,13 @@ if ($conf->produit->enabled) if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") { - print ''; + print ''; print img_picto($langs->trans("Activated"),'switch_on'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"),'switch_off'); print ''; } @@ -442,7 +428,7 @@ if ($conf->produit->enabled) print "\n"; } -print ''; +//print ''; print "
";