mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Miscelaneous debug on barcode features.
This commit is contained in:
parent
ad67fe50a3
commit
cc1d506614
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
|
|
@ -430,6 +430,5 @@ print '</form>';
|
|||
|
||||
print "<br>";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|||
$langs->load("admin");
|
||||
$langs->load("members");
|
||||
$langs->load("errors");
|
||||
$langs->load("other");
|
||||
|
||||
// Choice of print year or current year.
|
||||
$now = dol_now();
|
||||
|
|
@ -229,7 +230,7 @@ if ($conf->societe->enabled)
|
|||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("Thirdparties")).'<br>'."\n";
|
||||
print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ThirdParties")).'<br>'."\n";
|
||||
|
||||
print '<br><input class="button" type="submit" id="submitformbarcodethirdpartygen" '.((GETPOST("selectorforbarcode") && GETPOST("selectorforbarcode"))?'':'disabled="checked" ').'value="'.$langs->trans("InitEmptyBarCode",$nbno).'"';
|
||||
print ' title="'.dol_escape_htmltag($langs->trans("FeatureNotYetAvailable")).'" disabled="disabled"';
|
||||
|
|
@ -251,10 +252,10 @@ if ($conf->product->enabled || $conf->product->service)
|
|||
$nbno=$nbtotal=0;
|
||||
|
||||
print_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','').'<br>'."\n";
|
||||
$sql ="SELECT count(rowid) as nb, fk_product_type";
|
||||
$sql ="SELECT count(rowid) as nb, fk_product_type, datec";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.=" WHERE barcode IS NULL OR barcode = ''";
|
||||
$sql.=" GROUP BY fk_product_type";
|
||||
$sql.=" GROUP BY fk_product_type, datec";
|
||||
$sql.=" ORDER BY datec";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
|
|
|
|||
|
|
@ -221,5 +221,5 @@ if ($id > 0 || ! empty($ref))
|
|||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -217,8 +217,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||
|
||||
|
||||
// Tools
|
||||
$tmpentry=array('enabled'=>(! empty($conf->mailing->enabled) || ! empty($conf->export->enabled) || ! empty($conf->import->enabled) || ! empty($conf->opensurvey->enabled)),
|
||||
'perms'=>(! empty($user->rights->mailing->lire) || ! empty($user->rights->export->lire) || ! empty($user->rights->import->run) || ! empty($user->rights->opensurvey->read)),
|
||||
$tmpentry=array('enabled'=>(! empty($conf->barcode->enabled) || ! empty($conf->mailing->enabled) || ! empty($conf->export->enabled) || ! empty($conf->import->enabled) || ! empty($conf->opensurvey->enabled)),
|
||||
'perms'=>(! empty($conf->barcode->enabled) || ! empty($user->rights->mailing->lire) || ! empty($user->rights->export->lire) || ! empty($user->rights->import->run) || ! empty($user->rights->opensurvey->read)),
|
||||
'module'=>'mailing|export|import|opensurvey');
|
||||
$showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal);
|
||||
if ($showmode)
|
||||
|
|
|
|||
|
|
@ -193,7 +193,9 @@ abstract class DolibarrModules
|
|||
* Inserts all informations into database
|
||||
*
|
||||
* @param string[] $array_sql SQL requests to be executed when enabling module
|
||||
* @param string $options String with options when disabling module ('newboxdefonly|noboxes')
|
||||
* @param string $options String with options when disabling module:
|
||||
* 'noboxes' = Do not insert boxes
|
||||
* 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
|
||||
*
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
|
|
@ -279,7 +281,8 @@ abstract class DolibarrModules
|
|||
* Disable function. Deletes the module constant and boxes from the database.
|
||||
*
|
||||
* @param string[] $array_sql SQL requests to be executed when module is disabled
|
||||
* @param string $options Options when disabling module ('newboxdefonly|noboxes')
|
||||
* @param string $options Options when disabling module:
|
||||
* 'newboxdefonly|noboxes' = We don't remove boxes.
|
||||
*
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ llxHeader('',$langs->trans("CronAdd"));
|
|||
if ($action=='edit' || empty($action) || $action=='delete' || $action=='execute')
|
||||
{
|
||||
$head=cron_prepare_head($object);
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'bill');
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron');
|
||||
}
|
||||
elseif ($action=='create')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ $object->info($id);
|
|||
|
||||
$head = cron_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("CronTask"), 0, 'bill');
|
||||
dol_fiche_head($head, 'info', $langs->trans("CronTask"), 0, 'cron');
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_print_object_info($object);
|
||||
|
|
|
|||
|
|
@ -367,19 +367,21 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
|
|||
// Reload modules (this must be always and only into last targeted version)
|
||||
$listofmodule=array(
|
||||
'MAIN_MODULE_AGENDA',
|
||||
'MAIN_MODULE_SOCIETE',
|
||||
'MAIN_MODULE_PRODUIT',
|
||||
'MAIN_MODULE_SERVICE',
|
||||
'MAIN_MODULE_BARCODE',
|
||||
'MAIN_MODULE_CRON',
|
||||
'MAIN_MODULE_COMMANDE',
|
||||
'MAIN_MODULE_FACTURE',
|
||||
'MAIN_MODULE_FOURNISSEUR',
|
||||
'MAIN_MODULE_USER',
|
||||
'MAIN_MODULE_DEPLACEMENT',
|
||||
'MAIN_MODULE_DON',
|
||||
'MAIN_MODULE_ECM',
|
||||
'MAIN_MODULE_PAYBOX',
|
||||
'MAIN_MODULE_OPENSURVEY'
|
||||
);
|
||||
'MAIN_MODULE_FACTURE',
|
||||
'MAIN_MODULE_FOURNISSEUR',
|
||||
'MAIN_MODULE_OPENSURVEY',
|
||||
'MAIN_MODULE_PAYBOX',
|
||||
'MAIN_MODULE_PRODUIT',
|
||||
'MAIN_MODULE_SOCIETE',
|
||||
'MAIN_MODULE_SERVICE',
|
||||
'MAIN_MODULE_USER'
|
||||
);
|
||||
migrate_reload_modules($db,$langs,$conf,$listofmodule);
|
||||
|
||||
// Reload menus (this must be always and only into last targeted version)
|
||||
|
|
@ -3773,6 +3775,26 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
|||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
if ($moduletoreload == 'MAIN_MODULE_BARCODE')
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Barcode");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modBarcode.class.php';
|
||||
if ($res) {
|
||||
$mod=new modBarcode($db);
|
||||
$mod->remove('noboxes');
|
||||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
if ($moduletoreload == 'MAIN_MODULE_CRON')
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Cron");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCron.class.php';
|
||||
if ($res) {
|
||||
$mod=new modCron($db);
|
||||
$mod->remove('noboxes');
|
||||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
if ($moduletoreload == 'MAIN_MODULE_SOCIETE')
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Societe");
|
||||
|
|
@ -3833,17 +3855,6 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
|||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
|
||||
if ($moduletoreload == 'MAIN_MODULE_USER') // Permission has changed into 3.0
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module User");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modUser.class.php';
|
||||
if ($res) {
|
||||
$mod=new modUser($db);
|
||||
//$mod->remove('noboxes'); // We need to remove because id of module has changed
|
||||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
if ($moduletoreload == 'MAIN_MODULE_DEPLACEMENT') // Permission has changed into 3.0
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Deplacement");
|
||||
|
|
@ -3894,6 +3905,17 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
|||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
if ($moduletoreload == 'MAIN_MODULE_USER') // Permission has changed into 3.0
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module User");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modUser.class.php';
|
||||
if ($res) {
|
||||
$mod=new modUser($db);
|
||||
//$mod->remove('noboxes'); // We need to remove because id of module has changed
|
||||
$mod->init('newboxdefonly');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1374,7 +1374,7 @@ BarcodeDescUPC=Barcode of type UPC
|
|||
BarcodeDescISBN=Barcode of type ISBN
|
||||
BarcodeDescC39=Barcode of type C39
|
||||
BarcodeDescC128=Barcode of type C128
|
||||
GenbarcodeLocation=Bar code generation command line tool (used by internal engine for some bar code types)
|
||||
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
|
||||
BarCodeNumberManager=Manager to auto define barcode numbers
|
||||
##### Prelevements #####
|
||||
|
|
|
|||
|
|
@ -84,3 +84,4 @@ CronType_command=Shell command
|
|||
CronMenu=Cron
|
||||
CronCannotLoadClass=Cannot load class %s or object %s
|
||||
UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Modules tools - Job list" to see and edit scheduled jobs.
|
||||
TaskDisabled=Task disabled
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ ErrorFromToAccountsMustDiffers=Source and targets bank accounts must be differen
|
|||
ErrorBadThirdPartyName=Bad value for third party name
|
||||
ErrorProdIdIsMandatory=The %s is mandatory
|
||||
ErrorBadCustomerCodeSyntax=Bad syntax for customer code
|
||||
ErrorBadBarCodeSyntax=Bad syntax for bar code
|
||||
ErrorBadBarCodeSyntax=Bad syntax for bar code. May be you set a bad barcode type or you defined a barcode mask for numbering that does not match value scanned.
|
||||
ErrorCustomerCodeRequired=Customer code required
|
||||
ErrorBarCodeRequired=Bar code required
|
||||
ErrorCustomerCodeAlreadyUsed=Customer code already used
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user