From 6259f4ce59efd71f765161631a025eb0cc902828 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Thu, 21 Feb 2013 23:08:58 +0100 Subject: [PATCH 01/76] Fix : some & -> & --- htdocs/core/menus/standard/eldy.lib.php | 46 ++++++++++++------------- htdocs/index.php | 4 +-- htdocs/main.inc.php | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 5eb0c74a685..fe5bb2c26af 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -466,7 +466,7 @@ function print_eldy_menu($db,$atarget,$type_user) { if (! preg_match('/\?/',$url)) $url.='?'; else $url.='&'; - $url.='mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu='; + $url.='mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu='; } //$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad } @@ -649,7 +649,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) $langs->load("help"); // Setup - $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup'); + $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup'); if ($leftmenu=="setup") { $warnpicto=''; @@ -684,38 +684,38 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) } // System tools - $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); + $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); if (preg_match('/^admintools/',$leftmenu)) { - $newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1); - if ($leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Modules'), 2); - if ($leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Triggers'), 2); - $newmenu->add('/admin/system/os.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoOS'), 1); - $newmenu->add('/admin/system/web.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoWebServer'), 1); - $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1); + $newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1); + if ($leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Modules'), 2); + if ($leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Triggers'), 2); + $newmenu->add('/admin/system/os.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoOS'), 1); + $newmenu->add('/admin/system/web.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoWebServer'), 1); + $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1); //if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1); - $newmenu->add('/admin/system/database.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoDatabase'), 1); + $newmenu->add('/admin/system/database.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoDatabase'), 1); - $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home&leftmenu=admintools", $langs->trans("Backup"),1); - $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home&leftmenu=admintools", $langs->trans("Restore"),1); - $newmenu->add("/admin/tools/update.php?mainmenu=home&leftmenu=admintools", $langs->trans("MenuUpgrade"),1); - if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home&leftmenu=admintools", $langs->trans("EAccelerator"),1); - $newmenu->add("/admin/tools/listevents.php?mainmenu=home&leftmenu=admintools", $langs->trans("Audit"),1); - $newmenu->add("/admin/tools/listsessions.php?mainmenu=home&leftmenu=admintools", $langs->trans("Sessions"),1); - $newmenu->add("/admin/tools/purge.php?mainmenu=home&leftmenu=admintools", $langs->trans("Purge"),1); - $newmenu->add('/admin/system/about.php?mainmenu=home&leftmenu=admintools', $langs->trans('About'), 1); - $newmenu->add("/support/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp'); + $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home&leftmenu=admintools", $langs->trans("Backup"),1); + $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home&leftmenu=admintools", $langs->trans("Restore"),1); + $newmenu->add("/admin/tools/update.php?mainmenu=home&leftmenu=admintools", $langs->trans("MenuUpgrade"),1); + if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home&leftmenu=admintools", $langs->trans("EAccelerator"),1); + $newmenu->add("/admin/tools/listevents.php?mainmenu=home&leftmenu=admintools", $langs->trans("Audit"),1); + $newmenu->add("/admin/tools/listsessions.php?mainmenu=home&leftmenu=admintools", $langs->trans("Sessions"),1); + $newmenu->add("/admin/tools/purge.php?mainmenu=home&leftmenu=admintools", $langs->trans("Purge"),1); + $newmenu->add('/admin/system/about.php?mainmenu=home&leftmenu=admintools', $langs->trans('About'), 1); + $newmenu->add("/support/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp'); } // Modules system tools if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS)) { if (empty($user->societe_id)) { - $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools'); + $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools'); if ($leftmenu=="modulesadmintools" && $user->admin) { $langs->load("products"); - $newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin); + $newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin); } } } @@ -892,7 +892,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) { $langs->load("interventions"); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter'); - $newmenu->add("/fichinter/fiche.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer); + $newmenu->add("/fichinter/fiche.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire); } @@ -1180,7 +1180,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) { $langs->load("sendings"); $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings'); - if ($leftmenu=="sendings") $newmenu->add("/expedition/fiche.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); + if ($leftmenu=="sendings") $newmenu->add("/expedition/fiche.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); if ($leftmenu=="sendings") $newmenu->add("/expedition/liste.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); if ($leftmenu=="sendings") $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); } diff --git a/htdocs/index.php b/htdocs/index.php index 8119e3a83be..756b1f2c60b 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -368,7 +368,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) $board->load_board($user,"inactives"); $board->warning_delay=$conf->contrat->services->inactifs->warning_delay/60/60/24; $board->label=$langs->trans("BoardNotActivatedServices"); - $board->url=DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=0'; + $board->url=DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=0'; $board->img=img_object($langs->trans("Contract"),"contract"); $rowspan++; $dashboardlines[]=$board; @@ -384,7 +384,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) $board->load_board($user,"expired"); $board->warning_delay=$conf->contrat->services->expires->warning_delay/60/60/24; $board->label=$langs->trans("BoardRunningServices"); - $board->url=DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired'; + $board->url=DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired'; $board->img=img_object($langs->trans("Contract"),"contract"); $rowspan++; $dashboardlines[]=$board; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 202a7c0dfb1..caec4de00ae 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1369,7 +1369,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone)) { $qs=$_SERVER["QUERY_STRING"].($_SERVER["QUERY_STRING"]?'&':'').$morequerystring; - $text =''; + $text =''; $text.= img_picto('', 'printer.png', 'class="printer"'); $text.=''; $toprightmenu.=$form->textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'',1); From d26024d8fc44009e1366139408f1646ca71f5faf Mon Sep 17 00:00:00 2001 From: frederic34 Date: Thu, 21 Feb 2013 23:40:25 +0100 Subject: [PATCH 02/76] WIP : Admin for Carriers (Activate/Desactivate) --- htdocs/admin/carrier.php | 140 +++++++ htdocs/admin/confexped.php | 4 + htdocs/admin/expedition.php | 10 +- htdocs/admin/livraison.php | 370 ++++++++++--------- htdocs/expedition/class/expedition.class.php | 59 +++ 5 files changed, 397 insertions(+), 186 deletions(-) create mode 100644 htdocs/admin/carrier.php diff --git a/htdocs/admin/carrier.php b/htdocs/admin/carrier.php new file mode 100644 index 00000000000..5b8eb3724cc --- /dev/null +++ b/htdocs/admin/carrier.php @@ -0,0 +1,140 @@ +. + */ + +/** + * \file htdocs/admin/carrier.php + * \ingroup expedition + * \brief Page d'administration des Transporteurs + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; + +$langs->load("admin"); +$langs->load("sendings"); +$langs->load("deliveries"); +$langs->load('other'); + +if (! $user->admin) + accessforbidden(); + +$action=GETPOST('action','alpha'); +$carrier=GETPOST('carrier','int'); + +$object = new Expedition($db); + + +/* + * Actions + */ + +if ($action==activate_carrier AND $carrier) +{ + $object->activ_delivery_method($carrier); +} + +if ($action==disable_carrier AND $carrier) +{ + $object->disable_delivery_method($carrier); +} + +/* + * View + */ + +$form=new Form($db); + +llxHeader("",""); + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("SendingsSetup"),$linkback,'setup'); +print '
'; + + +//if ($mesg) print $mesg.'
'; + + +$h = 0; + +$head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; +$head[$h][1] = $langs->trans("Setup"); +$h++; + +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$hselected=$h; +$h++; + +if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; + $head[$h][1] = $langs->trans("Sending"); + $h++; +} + +if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][1] = $langs->trans("Receivings"); + $h++; +} + +dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); + +/* + * Carrier List + */ + +$object->all_delivery_methods(); +$var=true; +print_titre($langs->trans("CarrierList")); + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; +for ($i=0; $ilistmeths); $i++) +{ + $var=!$var; + print ""; + print ''; + print ''; + print ''; + print ''; + print ''; +print "\n"; + +print '
'.$langs->trans("Code").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("TracingUrl").''.$langs->trans("Status").'
'.$object->listmeths[$i][code].''.$object->listmeths[$i][libelle].''.$object->listmeths[$i][description].''.$object->listmeths[$i][tracing].''; + if($object->listmeths[$i][active] == 0) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } +} +print '

'; + +llxFooter(); + +$db->close(); +?> \ No newline at end of file diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index d9be768461f..6653badfb36 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -84,6 +84,10 @@ $head[$h][1] = $langs->trans("Setup"); $hselected=$h; $h++; +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$h++; + if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 709832b1968..c012d52efb1 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -201,6 +201,10 @@ $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; $head[$h][1] = $langs->trans("Setup"); $h++; +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$h++; + $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; $head[$h][1] = $langs->trans("Sending"); $hselected=$h; @@ -208,9 +212,9 @@ $h++; if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; - $head[$h][1] = $langs->trans("Receivings"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][1] = $langs->trans("Receivings"); + $h++; } dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 2603a0a1d51..fa4b7b3c1d4 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -5,8 +5,8 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2012 Juanjo Menent - * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2011-2012 Juanjo Menent + * Copyright (C) 2011-2012 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,13 +50,13 @@ $type='delivery'; if ($action == 'updateMask') { - $maskconstdelivery=GETPOST('maskconstdelivery','alpha'); - $maskdelivery=GETPOST('maskdelivery','alpha'); - if ($maskconstdelivery) $res = dolibarr_set_const($db,$maskconstdelivery,$maskdelivery,'chaine',0,'',$conf->entity); + $maskconstdelivery=GETPOST('maskconstdelivery','alpha'); + $maskdelivery=GETPOST('maskdelivery','alpha'); + if ($maskconstdelivery) $res = dolibarr_set_const($db,$maskconstdelivery,$maskdelivery,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; + if (! $res > 0) $error++; - if (! $error) + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -68,12 +68,12 @@ if ($action == 'updateMask') if ($action == 'set_DELIVERY_FREE_TEXT') { - $free=GETPOST('DELIVERY_FREE_TEXT','alpha'); + $free=GETPOST('DELIVERY_FREE_TEXT','alpha'); $res=dolibarr_set_const($db, "DELIVERY_FREE_TEXT",$free,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - if (! $error) + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -85,58 +85,58 @@ if ($action == 'set_DELIVERY_FREE_TEXT') if ($action == 'specimen') { - $modele=GETPOST('module','alpha'); + $modele=GETPOST('module','alpha'); - $sending = new Livraison($db); - $sending->initAsSpecimen(); + $sending = new Livraison($db); + $sending->initAsSpecimen(); - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - $file=dol_buildpath($reldir."core/modules/livraison/pdf/pdf_".$modele.".modules.php",0); - if (file_exists($file)) - { - $filefound=1; - $classname = "pdf_".$modele; - break; - } - } + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + $file=dol_buildpath($reldir."core/modules/livraison/pdf/pdf_".$modele.".modules.php",0); + if (file_exists($file)) + { + $filefound=1; + $classname = "pdf_".$modele; + break; + } + } - if ($filefound) - { - require_once $file; + if ($filefound) + { + require_once $file; - $module = new $classname($db); + $module = new $classname($db); - if ($module->write_file($sending,$langs) > 0) - { - header("Location: ".DOL_URL_ROOT."/document.php?modulepart=livraison&file=SPECIMEN.pdf"); - return; - } - else - { - $mesg=''.$module->error.''; - dol_syslog($module->error, LOG_ERR); - } - } - else - { - $mesg=''.$langs->trans("ErrorModuleNotFound").''; - dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); - } + if ($module->write_file($sending,$langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=livraison&file=SPECIMEN.pdf"); + return; + } + else + { + $mesg=''.$module->error.''; + dol_syslog($module->error, LOG_ERR); + } + } + else + { + $mesg=''.$langs->trans("ErrorModuleNotFound").''; + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } } if ($action == 'set') -{ - $ret = addDocumentModel($value, $type, $label, $scandir); +{ + $ret = addDocumentModel($value, $type, $label, $scandir); } if ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) + if ($ret > 0) { if ($conf->global->LIVRAISON_ADDON_PDF == "$value") dolibarr_del_const($db, 'LIVRAISON_ADDON_PDF',$conf->entity); } @@ -146,17 +146,17 @@ if ($action == 'setdoc') { if (dolibarr_set_const($db, "LIVRAISON_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { - // La constante qui a ete lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage coherent + // La constante qui a ete lue en avant du nouveau set + // on passe donc par une variable pour avoir un affichage coherent $conf->global->LIVRAISON_ADDON_PDF = $value; } // On active le modele - $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - $ret = addDocumentModel($value, $type, $label, $scandir); - } + $ret = delDocumentModel($value, $type); + if ($ret > 0) + { + $ret = addDocumentModel($value, $type, $label, $scandir); + } } if ($action == 'setmod') @@ -164,7 +164,7 @@ if ($action == 'setmod') // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated - dolibarr_set_const($db, "LIVRAISON_ADDON",$value,'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "LIVRAISON_ADDON",$value,'chaine',0,'',$conf->entity); } @@ -189,11 +189,15 @@ $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; $head[$h][1] = $langs->trans("Setup"); $h++; +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$h++; + if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; - $head[$h][1] = $langs->trans("Sending"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; + $head[$h][1] = $langs->trans("Sending"); + $h++; } $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; @@ -222,34 +226,34 @@ clearstatcache(); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/livraison/"); + $dir = dol_buildpath($reldir."core/modules/livraison/"); - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - $var=true; - while (($file = readdir($handle))!==false) - { - if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php') - { - $file = substr($file, 0, dol_strlen($file)-4); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + $var=true; + while (($file = readdir($handle))!==false) + { + if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php') + { + $file = substr($file, 0, dol_strlen($file)-4); - require_once DOL_DOCUMENT_ROOT ."/core/modules/livraison/".$file.'.php'; + require_once DOL_DOCUMENT_ROOT ."/core/modules/livraison/".$file.'.php'; - $module = new $file; + $module = new $file; - // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - if ($module->isEnabled()) - { - $var=!$var; - print ''.$module->nom."\n"; - print $module->info(); - print ''; + if ($module->isEnabled()) + { + $var=!$var; + print ''.$module->nom."\n"; + print $module->info(); + print ''; // Show example of numbering module print ''; @@ -259,48 +263,48 @@ foreach ($dirmodels as $reldir) else print $tmp; print ''."\n"; - print ''; - if ($conf->global->LIVRAISON_ADDON == "$file") - { - print img_picto($langs->trans("Activated"),'switch_on'); - } - else - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - print ''; + print ''; + if ($conf->global->LIVRAISON_ADDON == "$file") + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + print ''; - $livraison=new Livraison($db); - $livraison->initAsSpecimen(); + $livraison=new Livraison($db); + $livraison->initAsSpecimen(); - // Info - $htmltooltip=''; - $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; - $nextval=$module->getNextValue($mysoc,$livraison); - if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval - { - $htmltooltip.=''.$langs->trans("NextValue").': '; - if ($nextval) - { - $htmltooltip.=$nextval.'
'; - } - else - { - $htmltooltip.=$langs->trans($module->error).'
'; - } - } + // Info + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; + $nextval=$module->getNextValue($mysoc,$livraison); + if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval + { + $htmltooltip.=''.$langs->trans("NextValue").': '; + if ($nextval) + { + $htmltooltip.=$nextval.'
'; + } + else + { + $htmltooltip.=$langs->trans($module->error).'
'; + } + } - print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; - print ''; - } - } - } - closedir($handle); - } - } + print ''; + } + } + } + closedir($handle); + } + } } print ''; @@ -352,77 +356,77 @@ clearstatcache(); $var=true; foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/livraison/pdf/"); + $dir = dol_buildpath($reldir."core/modules/livraison/pdf/"); - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_') - { - $name = substr($file, 4, dol_strlen($file) - 16); - $classname = substr($file, 0, dol_strlen($file) - 12); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_') + { + $name = substr($file, 4, dol_strlen($file) - 16); + $classname = substr($file, 0, dol_strlen($file) - 12); - $var=!$var; + $var=!$var; - print ''; - print $name; - print "\n"; - require_once $dir.$file; - $module = new $classname($db); + print ''; + print $name; + print "\n"; + require_once $dir.$file; + $module = new $classname($db); - print $module->description; - print ''; + print $module->description; + print ''; - // Activ - if (in_array($name, $def)) - { - print "\n"; - print 'scandir.'&label='.urlencode($module->name).'">'; - print img_picto($langs->trans("Enabled"),'switch_on'); - print ''; - print ""; - } - else - { - print "\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; - print ""; - } + // Activ + if (in_array($name, $def)) + { + print "\n"; + print 'scandir.'&label='.urlencode($module->name).'">'; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; + print ""; + } + else + { + print "\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print ""; + } - // Defaut - print ""; - if ($conf->global->LIVRAISON_ADDON_PDF == "$name") - { - print img_picto($langs->trans("Default"),'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; - } - print ''; + // Defaut + print ""; + if ($conf->global->LIVRAISON_ADDON_PDF == "$name") + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; - // Info - $htmltooltip = ''.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); - $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); - print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; - print ''; - print ''.img_object($langs->trans("Preview"),'sending').''; - print ''; + // Info + $htmltooltip = ''.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; + print ''; + print ''.img_object($langs->trans("Preview"),'sending').''; + print ''; - print ''; - } - } - closedir($handle); - } - } + print ''; + } + } + closedir($handle); + } + } } print ''; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 1840713b0e6..ca8c5ea2dfe 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1168,6 +1168,65 @@ class Expedition extends CommonObject } } + /** + * Fetch all deliveries method and return an array. Load array this->listmeths. + * + * @return void + */ + function all_delivery_methods() + { + global $langs; + $meths = array(); + $i=0; + + $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.active"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; + //$sql.= " ORDER BY em.libelle ASC"; + + $resql = $this->db->query($sql); + if ($resql) + { + while ($obj = $this->db->fetch_object($resql)) + { + $this->listmeths[$i][rowid] = $obj->rowid; + $this->listmeths[$i][code] = $obj->code; + $label=$langs->trans('SendingMethod'.$obj->code); + $this->listmeths[$i][libelle] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle); + $this->listmeths[$i][description] = $obj->description; + $this->listmeths[$i][active] = $obj->active; + $i++; + } + } + } + + /** + * Activate delivery method. + * @param id $id id method to activate + * @return void + */ + function activ_delivery_method($id) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.'c_shipment_mode SET active=1'; + $sql.= ' WHERE rowid='.$id; + + $resql = $this->db->query($sql); + + } + + /** + * DesActivate delivery method. + * @param id $id id method to desactivate + * @return void + */ + function disable_delivery_method($id) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.'c_shipment_mode SET active=0'; + $sql.= ' WHERE rowid='.$id; + + $resql = $this->db->query($sql); + + } + /** * Get tracking url status * From de4bc7f39d48a77b74572b47e64a22eeea210b83 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Fri, 22 Feb 2013 08:56:14 +0100 Subject: [PATCH 03/76] Fix : It was a bad idea to add COL in the code name of new carriers --- .../expedition/methode_expedition_chrono.modules.php | 2 +- .../modules/expedition/methode_expedition_gls.modules.php | 2 +- .../expedition/methode_expedition_kiala.modules.php | 2 +- .../modules/expedition/methode_expedition_ups.modules.php | 2 +- htdocs/install/mysql/data/llx_c_shipment_mode.sql | 8 ++++---- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php b/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php index acebea53430..412545b3f6f 100644 --- a/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php +++ b/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php @@ -35,7 +35,7 @@ class methode_expedition_chrono extends ModeleShippingMethod { $this->db = $db; $this->id = 8; // Do not change this value - $this->code = "COLCHRONO"; // Do not change this value + $this->code = "CHRONO"; // Do not change this value $this->name = "Chronopost"; $this->description = "Chronopost"; } diff --git a/htdocs/core/modules/expedition/methode_expedition_gls.modules.php b/htdocs/core/modules/expedition/methode_expedition_gls.modules.php index 2f63ff927af..0fc67831a38 100644 --- a/htdocs/core/modules/expedition/methode_expedition_gls.modules.php +++ b/htdocs/core/modules/expedition/methode_expedition_gls.modules.php @@ -35,7 +35,7 @@ class methode_expedition_gls extends ModeleShippingMethod { $this->db = $db; $this->id = 7; // Do not change this value - $this->code = "COLGLS"; // Do not change this value + $this->code = "GLS"; // Do not change this value $this->name = "GLS"; $this->description = "General Logistics Systems"; } diff --git a/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php b/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php index fa8072ecda3..503bacdc421 100644 --- a/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php +++ b/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php @@ -35,7 +35,7 @@ Class methode_expedition_kiala extends ModeleShippingMethod { $this->db = $db; $this->id = 6; // Do not change this value - $this->code = "COLKIALA"; // Do not change this value + $this->code = "KIALA"; // Do not change this value $this->name = "KIALA"; $this->description = "KIALA"; } diff --git a/htdocs/core/modules/expedition/methode_expedition_ups.modules.php b/htdocs/core/modules/expedition/methode_expedition_ups.modules.php index 582f23c9e0a..1225b5d7959 100644 --- a/htdocs/core/modules/expedition/methode_expedition_ups.modules.php +++ b/htdocs/core/modules/expedition/methode_expedition_ups.modules.php @@ -34,7 +34,7 @@ class methode_expedition_ups extends ModeleShippingMethod { $this->db = $db; $this->id = 5; // Do not change this value - $this->code = "COLUPS"; // Do not change this value + $this->code = "UPS"; // Do not change this value $this->name = "UPS"; $this->description = "United Parcel Service"; } diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index ba625191e3d..3bb5a056ed2 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -33,7 +33,7 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES ( INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (2,'TRANS','Transporter','Generic transporter',1); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'COLGLS','GLS','General Logistics Systems',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'COLCHRONO','Chronopost','Chronopost',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'UPS','UPS','United Parcel Service',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'GLS','GLS','General Logistics Systems',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'CHRONO','Chronopost','Chronopost',0); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 00d50ad51d7..97f8bc60bac 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -46,7 +46,7 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'COLGLS','GLS','General Logistics Systems',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'COLCHRONO','Chronopost','Chronopost',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'UPS','UPS','United Parcel Service',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'GLS','GLS','General Logistics Systems',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'CHRONO','Chronopost','Chronopost',0); From 0af5c434af774d243b6ec1346b455ddc3b64dfd1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 09:29:34 +0100 Subject: [PATCH 04/76] english standardization --- htdocs/admin/company.php | 6 +++--- htdocs/comm/propal/class/propal.class.php | 1 - htdocs/compta/bank/class/account.class.php | 10 +++++----- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 28336d2966a..cf57029ad5f 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -65,7 +65,7 @@ if ( ($action == 'update' && empty($_POST["cancel"])) } dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity); @@ -276,7 +276,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; print ''.$langs->trans("CompanyAddress").''; - print ''."\n"; + print ''."\n"; $var=!$var; print ''.$langs->trans("CompanyZip").''; @@ -646,7 +646,7 @@ else print ''; $var=!$var; - print ''.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADRESSE)?'':$conf->global->MAIN_INFO_SOCIETE_ADRESSE) . ''; + print ''.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . ''; $var=!$var; print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP) . ''; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 230e696bf10..c80007c8947 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1049,7 +1049,6 @@ class Propal extends CommonObject $this->demand_reason_id = $obj->fk_input_reason; $this->demand_reason_code = $obj->demand_reason_code; $this->demand_reason = $obj->demand_reason; - //$this->fk_delivery_address = $obj->fk_adresse_livraison; // TODO obsolete $this->fk_address = $obj->fk_delivery_address; $this->mode_reglement_id = $obj->fk_mode_reglement; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 6db6656c726..9d4f3573b6c 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -60,7 +60,7 @@ class Account extends CommonObject //! IBAN number (International Bank Account Number) var $iban_prefix; var $proprio; - var $adresse_proprio; + var $owner_address; var $fk_departement; // deprecated @@ -570,7 +570,7 @@ class Account extends CommonObject $sql.= ",iban_prefix = '".$this->iban."'"; $sql.= ",domiciliation='".$this->db->escape($this->domiciliation)."'"; $sql.= ",proprio = '".$this->db->escape($this->proprio)."'"; - $sql.= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'"; + $sql.= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql.= ",fk_departement = ".($this->state_id>0?"'".$this->state_id."'":"null"); $sql.= ",fk_pays = ".$this->country_id; $sql.= " WHERE rowid = ".$this->id; @@ -611,7 +611,7 @@ class Account extends CommonObject $sql = "SELECT ba.rowid, ba.ref, ba.label, ba.bank, ba.number, ba.courant, ba.clos, ba.rappro, ba.url,"; $sql.= " ba.code_banque, ba.code_guichet, ba.cle_rib, ba.bic, ba.iban_prefix as iban,"; - $sql.= " ba.domiciliation, ba.proprio, ba.adresse_proprio, ba.fk_departement, ba.fk_pays as country_id,"; + $sql.= " ba.domiciliation, ba.proprio, ba.owner_address, ba.fk_departement, ba.fk_pays as country_id,"; $sql.= " ba.account_number, ba.currency_code,"; $sql.= " ba.min_allowed, ba.min_desired, ba.comment,"; $sql.= ' p.code as country_code, p.libelle as country,'; @@ -651,7 +651,7 @@ class Account extends CommonObject $this->iban_prefix = $obj->iban; // deprecated $this->domiciliation = $obj->domiciliation; $this->proprio = $obj->proprio; - $this->adresse_proprio = $obj->adresse_proprio; + $this->owner_address = $obj->owner_address; $this->fk_departement = $obj->fk_departement; // deprecated $this->departement_code= $obj->state_code; // deprecated @@ -1026,7 +1026,7 @@ class Account extends CommonObject $this->iban_prefix = 'FR'; // deprecated $this->domiciliation = 'The bank addresse'; $this->proprio = 'Owner'; - $this->adresse_proprio = 'Owner address'; + $this->owner_address = 'Owner address'; $this->country_id = 1; } diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 00d50ad51d7..53947627544 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -45,6 +45,7 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; +alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0); From 303577a7fa26e2599961e5681ac80e1c811062d6 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 09:36:01 +0100 Subject: [PATCH 05/76] english standardization --- htdocs/compta/bank/bankid_fr.php | 8 ++++---- htdocs/compta/bank/fiche.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index d14da565e0c..6e4dbbeba0c 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -64,7 +64,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $account->iban_prefix = trim($_POST["iban_prefix"]); // deprecated $account->domiciliation = trim($_POST["domiciliation"]); $account->proprio = trim($_POST["proprio"]); - $account->adresse_proprio = trim($_POST["adresse_proprio"]); + $account->owner_address = trim($_POST["owner_address"]); $account->fk_departement = trim($_POST["fk_departement"]); //$account->fk_pays = trim($_POST["fk_pays"]); // We do not change this. @@ -223,7 +223,7 @@ if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') print "\n"; print ''.$langs->trans("BankAccountOwnerAddress").''; - print nl2br($account->adresse_proprio); + print nl2br($account->owner_address); print "\n"; } @@ -368,8 +368,8 @@ if ($_GET["id"] && $action == 'edit' && $user->rights->banque->configurer) print ''; print ''.$langs->trans("BankAccountOwnerAddress").''; - print ""; } diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 00164b99352..fe251cae5cb 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -134,7 +134,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->domiciliation = trim($_POST["domiciliation"]); $account->proprio = trim($_POST["proprio"]); - $account->adresse_proprio = trim($_POST["adresse_proprio"]); + $account->owner_address = trim($_POST["owner_address"]); $account->account_number = trim($_POST["account_number"]); From d229d3a594c38fb7f3cad46c551b72cfa3013f02 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 09:41:56 +0100 Subject: [PATCH 06/76] english standardization --- htdocs/contact/class/contact.class.php | 1 - htdocs/core/boxes/box_comptes.php | 2 +- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 2 +- htdocs/core/modules/dons/html_cerfafr.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 411de5d5fcd..b835879b6cc 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -520,7 +520,6 @@ class Contact extends CommonObject $this->prenom = $obj->firstname; // TODO deprecated $this->address = $obj->address; - //$this->adresse = $obj->address; // TODO deprecated $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; $this->ville = $obj->town; // TODO deprecated diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 4d9ec0e600c..817fec968da 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -76,7 +76,7 @@ class box_comptes extends ModeleBoxes { $sql = "SELECT rowid, ref, label, bank, number, courant, clos, rappro, url,"; $sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix,"; - $sql.= " domiciliation, proprio, adresse_proprio,"; + $sql.= " domiciliation, proprio, owner_address,"; $sql.= " account_number, currency_code,"; $sql.= " min_allowed, min_desired, comment"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 8eed22b7249..386179fe16d 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -623,7 +623,7 @@ class pdf_einstein extends ModelePDFCommandes { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } } diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 664bf54d965..441bbe677fb 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -65,7 +65,7 @@ __Name__ :
__MAIN_INFO_SOCIETE_NOM__
__Address__ :
- __MAIN_INFO_SOCIETE_ADRESSE__
+ __MAIN_INFO_SOCIETE_ADDRESS__
__Zip__ : __MAIN_INFO_SOCIETE_CP__
__Town__ : __MAIN_INFO_SOCIETE_VILLE__
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index cf71f536593..bc24b760edd 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -140,7 +140,7 @@ class html_cerfafr extends ModeleDon $form = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$conf->currency),$form); $form = str_replace('__CURRENCYCODE__',$conf->currency,$form); $form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form); - $form = str_replace('__MAIN_INFO_SOCIETE_ADRESSE__',$mysoc->address,$form); + $form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form); $form = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->zip,$form); $form = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->town,$form); $form = str_replace('__DONATOR_NAME__',$don->nom,$form); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ca247b5ab99..f4df428518a 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -750,7 +750,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } } diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 365bf46f586..41a1068721d 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -651,7 +651,7 @@ class pdf_azur extends ModelePDFPropales { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } } diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index aacddd4f21f..882c2610775 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -570,7 +570,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posy=$pdf->GetY()+1; $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } if ($conf->global->FACTURE_CHQ_NUMBER == -1) From d255dc5114060a7106d367704c1b252c3f1e8c42 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 10:24:24 +0100 Subject: [PATCH 07/76] english standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 53947627544..975ec7376f0 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -30,6 +30,7 @@ UPDATE llx_const set value='auguria_menu.php' where value='auguria_backoffice.ph UPDATE llx_const set value='auguria_menu.php' where value='auguria_frontoffice.php'; UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_backoffice.php'; UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_frontoffice.php'; +UPDATE llx_const set value='MAIN_INFO_SOCIETE_ADDRESS' where value='MAIN_INFO_SOCIETE_ADRESSE'; ALTER TABLE llx_user add COLUMN fk_user integer; From 19201a1015df2ca54c74ea0d018c142741869a9e Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 11:32:19 +0100 Subject: [PATCH 08/76] english standardization --- .../canvas/default/tpl/adherentcard_view.tpl.php | 2 +- htdocs/adherents/cartes/carte.php | 4 ++-- htdocs/adherents/class/adherent.class.php | 14 +++++++------- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index 4518bb535e8..84cb06e2093 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -66,7 +66,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] trans("Zip").' / '.$langs->trans("Town"); ?> - control->tpl['zip'].$this->control->tpl['ville']; ?> + control->tpl['zip'].$this->control->tpl['town']; ?> diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 27fde653695..c069c02be0c 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -62,7 +62,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg // requete en prenant que les adherents a jour de cotisation $sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe as company, d.datefin,"; - $sql.= " d.address, d.cp as zip, d.ville as town, d.naiss, d.email, d.photo,"; + $sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.code as country_code, p.libelle as country"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; @@ -114,7 +114,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%SOCIETE%'=>$objp->company, '%ADDRESS%'=>$objp->address, '%CP%'=>$objp->zip, - '%VILLE%'=>$objp->town, + '%TOWN%'=>$objp->town, '%PAYS%'=>$objp->country, '%ANNEE%'=>$year, '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c59d54d1508..9f813f774ad 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -54,7 +54,7 @@ class Adherent extends CommonObject var $address; var $cp; var $zip; - var $ville; + //var $ville; // deprecated var $town; var $state_id; // Id of department @@ -234,7 +234,7 @@ class Adherent extends CommonObject '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, '%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, - '%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, + '%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, ); @@ -405,7 +405,7 @@ class Adherent extends CommonObject $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom); $this->address=($this->address?$this->address:$this->address); $this->zip=($this->zip?$this->zip:$this->cp); - $this->town=($this->town?$this->town:$this->ville); + $this->town=($this->town?$this->town:$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname)); @@ -430,7 +430,7 @@ class Adherent extends CommonObject $sql.= ", fk_soc=" .($this->fk_soc > 0?"'".$this->fk_soc."'":"null"); $sql.= ", address=" .($this->address?"'".$this->db->escape($this->address)."'":"null"); $sql.= ", cp=" .($this->zip?"'".$this->db->escape($this->zip)."'":"null"); - $sql.= ", ville=" .($this->town?"'".$this->db->escape($this->town)."'":"null"); + $sql.= ", town=" .($this->town?"'".$this->db->escape($this->town)."'":"null"); $sql.= ", pays=" .($this->country_id>0?"'".$this->country_id."'":"null"); $sql.= ", fk_departement=".($this->state_id>0?"'".$this->state_id."'":"null"); $sql.= ", email='".$this->email."'"; @@ -1018,7 +1018,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.ville as town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1067,7 +1067,7 @@ class Adherent extends CommonObject $this->address = $obj->address; $this->cp = $obj->zip; // deprecated $this->zip = $obj->zip; - $this->ville = $obj->town; // deprecated + //$this->ville = $obj->town; // deprecated $this->town = $obj->town; $this->state_id = $obj->fk_departement; @@ -1824,7 +1824,7 @@ class Adherent extends CommonObject if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste; if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address; if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp; - if ($this->ville && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville; + if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code; if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email; if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 975ec7376f0..5798e278a66 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -46,6 +46,7 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; +alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); From 960c9ccbaf8d1371dd51013fb671ce80dbb469ba Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 11:39:47 +0100 Subject: [PATCH 09/76] english standardization --- htdocs/adherents/fiche.php | 4 ++-- htdocs/adherents/liste.php | 2 +- htdocs/adherents/stats/geo.php | 4 ++-- htdocs/adherents/type.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index b0bb18511e9..b2e4bf612d0 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -262,7 +262,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->address = trim($_POST["address"]); $object->cp = trim($_POST["zipcode"]); // deprecated $object->zip = trim($_POST["zipcode"]); - $object->ville = trim($_POST["town"]); // deprecated + //$object->ville = trim($_POST["town"]); // deprecated $object->town = trim($_POST["town"]); $object->state_id = $_POST["departement_id"]; $object->country_id = $_POST["country_id"]; @@ -442,7 +442,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->address = $address; $object->cp = $zip; // deprecated $object->zip = $zip; - $object->ville = $town; // deprecated + //$object->ville = $town; // deprecated $object->town = $town; $object->fk_departement = $state_id; $object->state_id = $state_id; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index b19fcae8d85..afbee9d9ffb 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -105,7 +105,7 @@ if ($sall) if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; $sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; - $sql.=" OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($type > 0) { diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 3ea61e50e35..fcb421e14fe 100755 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -100,12 +100,12 @@ if ($mode) $tab='statstown'; $data = array(); - $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2"; + $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.town as label2"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid"; $sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" AND d.statut = 1"; - $sql.=" GROUP BY p.libelle, p.code, d.ville"; + $sql.=" GROUP BY p.libelle, p.code, d.town"; //print $sql; } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index eaddb4866c4..b44e5b3fde2 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -417,7 +417,7 @@ if ($rowid > 0) { $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; - $sql.= " OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($status != '') { From 67c06225a5e16249e8e8d75ddba0060a24eaf52e Mon Sep 17 00:00:00 2001 From: frederic34 Date: Fri, 22 Feb 2013 14:18:51 +0100 Subject: [PATCH 10/76] WIP : Admin for carriers --- htdocs/admin/carrier.php | 22 +++-- htdocs/expedition/class/expedition.class.php | 83 ++++++++++++------- .../mysql/data/llx_c_shipment_mode.sql | 17 ++-- .../install/mysql/migration/3.3.0-3.4.0.sql | 4 + .../mysql/tables/llx_c_shipment_mode.sql | 1 + 5 files changed, 85 insertions(+), 42 deletions(-) diff --git a/htdocs/admin/carrier.php b/htdocs/admin/carrier.php index 5b8eb3724cc..53f18ae0ca1 100644 --- a/htdocs/admin/carrier.php +++ b/htdocs/admin/carrier.php @@ -105,11 +105,12 @@ print_titre($langs->trans("CarrierList")); print ''; print ''; -print ''; -print ''; +print ''; +print ''; print ''; -print ''; +print ''; print ''; +print ''; print "\n"; for ($i=0; $ilistmeths); $i++) { @@ -118,8 +119,8 @@ for ($i=0; $ilistmeths); $i++) print ''; print ''; print ''; - print ''; - print ''; + print ''; } -print ''; print "\n"; print '
'.$langs->trans("Code").''.$langs->trans("Name").''.$langs->trans("Code").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("TracingUrl").''.$langs->trans("TrackingUrl").''.$langs->trans("Status").''.$langs->trans("Edit").'
'.$object->listmeths[$i][code].''.$object->listmeths[$i][libelle].''.$object->listmeths[$i][description].''.$object->listmeths[$i][tracing].''; + print ''.$object->listmeths[$i][tracking].''; if($object->listmeths[$i][active] == 0) { print ''.img_picto($langs->trans("Disabled"),'switch_off').''; @@ -128,8 +129,17 @@ for ($i=0; $ilistmeths); $i++) { print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } + print ''; + if($object->listmeths[$i][editable] == 1) + { + print ''.img_picto($langs->trans("Edit"),'edit').''; + } + else + { + print ' '; + } + print '

'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index ca8c5ea2dfe..22c0593a632 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1176,12 +1176,11 @@ class Expedition extends CommonObject function all_delivery_methods() { global $langs; - $meths = array(); + $listmeths = array(); $i=0; - $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.active"; + $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - //$sql.= " ORDER BY em.libelle ASC"; $resql = $this->db->query($sql); if ($resql) @@ -1193,6 +1192,25 @@ class Expedition extends CommonObject $label=$langs->trans('SendingMethod'.$obj->code); $this->listmeths[$i][libelle] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle); $this->listmeths[$i][description] = $obj->description; + if ($obj->tracking) + { + $this->listmeths[$i][tracking] = $obj->tracking; + $this->listmeths[$i][editable] = 1; + } + else + { + if ($obj->code) + { + $classname = "methode_expedition_".strtolower($obj->code); + + if (file_exists(DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($obj->code).".modules.php") ) + { + require_once DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($obj->code).'.modules.php'; + $shipmethod = new $classname(); + $this->listmeths[$i][tracking] = $shipmethod->provider_url_status('{TRACKID}'); + } + } + } $this->listmeths[$i][active] = $obj->active; $i++; } @@ -1239,7 +1257,7 @@ class Expedition extends CommonObject if (! empty($this->expedition_method_id)) { - $sql = "SELECT em.code"; + $sql = "SELECT em.code, em.tracking"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; $sql.= " WHERE em.rowid = ".$this->expedition_method_id; @@ -1249,36 +1267,45 @@ class Expedition extends CommonObject if ($obj = $this->db->fetch_object($resql)) { $code = $obj->code; + $tracking = $obj->tracking; } } } - if ($code) - { - $classname = "methode_expedition_".strtolower($code); + if ($tracking) + { + $url = str_replace('{TRACKID}', $value, $tracking); + $this->tracking_url = sprintf(''.($value?$value:'url').'',$url,$url); + } + else + { + if ($code) + { + $classname = "methode_expedition_".strtolower($code); - $url=''; - if (file_exists(DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($code).".modules.php") && ! empty($this->tracking_number)) - { - require_once DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($code).'.modules.php'; - $shipmethod = new $classname(); - $url = $shipmethod->provider_url_status($this->tracking_number); - } + $url=''; + if (file_exists(DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($code).".modules.php") && ! empty($this->tracking_number)) + { + require_once DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($code).'.modules.php'; + $shipmethod = new $classname(); + $url = $shipmethod->provider_url_status($this->tracking_number); + } - if ($url) - { - $this->tracking_url = sprintf(''.($value?$value:'url').'',$url,$url); - } - else - { - $this->tracking_url = $value; - } - } - else - { - $this->tracking_url = $value; - } - } + if ($url) + { + $this->tracking_url = sprintf(''.($value?$value:'url').'',$url,$url); + } + else + { + $this->tracking_url = $value; + } + } + else + { + $this->tracking_url = $value; + } + } + } /** * Classify the shipping as invoiced diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index 3bb5a056ed2..74b8eaea6ce 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -29,11 +29,12 @@ -- -- Sending method -- -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (1,'CATCH','Catch','Catch by client',1); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (2,'TRANS','Transporter','Generic transporter',1); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'UPS','UPS','United Parcel Service',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'GLS','GLS','General Logistics Systems',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'CHRONO','Chronopost','Chronopost',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (5,'UPS','UPS','United Parcel Service','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (8,'CHRONO','Chronopost','Chronopost','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'EDIT','EDITABLE','Transporteur Modifiable','http://www.website.com/dir/{TRACKID}',0); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 97f8bc60bac..cf31f6eb9bb 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -1,3 +1,4 @@ +alter table llx_contratdet add column fk_product_fournisseur_price integer after info_bits; -- -- Be carefull to requests order. -- This file must be loaded by calling /install/index.php page @@ -50,3 +51,6 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES ( INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'GLS','GLS','General Logistics Systems',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'CHRONO','Chronopost','Chronopost',0); + +ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL AFTER description; +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'EDIT','EDITABLE','Transporteur Modifiable','http://www.website.com/dir/{TRACKID}',0); diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql index 7733c980ab4..591e3ff9b93 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql @@ -23,6 +23,7 @@ create table llx_c_shipment_mode code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, + tracking varchar(256) NOT NULL, active tinyint DEFAULT 0, module varchar(32) NULL )ENGINE=innodb; From 87dc3a0b22768e6f80f45b6a7d1c2a9236f088cb Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 22 Feb 2013 15:24:29 +0100 Subject: [PATCH 11/76] LDAP sync : trigger was launched even if LDAP_SYNCHRO_ACTIVE is 'ldap2dolibarr' --- .../interface_50_modLdap_Ldapsynchro.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 77b54f58d7c..d0a1bd45168 100755 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -110,7 +110,7 @@ class InterfaceLdapsynchro if ($action == 'USER_CREATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -129,7 +129,7 @@ class InterfaceLdapsynchro elseif ($action == 'USER_MODIFY') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -166,7 +166,7 @@ class InterfaceLdapsynchro elseif ($action == 'USER_NEW_PASSWORD') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -207,7 +207,7 @@ class InterfaceLdapsynchro elseif ($action == 'USER_DELETE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -226,7 +226,7 @@ class InterfaceLdapsynchro elseif ($action == 'USER_SETINGROUP') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -264,7 +264,7 @@ class InterfaceLdapsynchro elseif ($action == 'USER_REMOVEFROMGROUP') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -304,7 +304,7 @@ class InterfaceLdapsynchro elseif ($action == 'GROUP_CREATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -327,7 +327,7 @@ class InterfaceLdapsynchro elseif ($action == 'GROUP_MODIFY') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); @@ -364,7 +364,7 @@ class InterfaceLdapsynchro elseif ($action == 'GROUP_DELETE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') + if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { $ldap=new Ldap(); $ldap->connect_bind(); From 34bfdf92cd7f0fda3ff345cf0a88f5f67c057d0b Mon Sep 17 00:00:00 2001 From: jfefe Date: Fri, 22 Feb 2013 15:34:20 +0100 Subject: [PATCH 12/76] Fix bug #732 : Missing argument when calling selectcontacts method --- htdocs/core/class/html.form.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 2d46eec81dc..0d0c0ae3f12 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -825,11 +825,12 @@ class Form * @param string $showsoc Add company into label * @param int $forcecombo Force to use combo box * @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) + * @param bool $options_only Return options only (for ajax treatment) * @return int <0 if KO, Nb of contact in list if OK */ - function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $event=array()) + function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $event=array(), $options_only=false) { - print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $showsoc, $forcecombo, $event); + print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $event); return $this->num; } @@ -877,7 +878,7 @@ class Form { $num=$this->db->num_rows($resql); - if ($conf->use_javascript_ajax && $conf->global->CONTACT_USE_SEARCH_TO_SELECT && ! $forcecombo) + if ($conf->use_javascript_ajax && $conf->global->CONTACT_USE_SEARCH_TO_SELECT && ! $forcecombo && ! $options_only) { $out.= ajax_combobox($htmlname, $event); } From fc4ad12a725d25c6c2ce98b48bdf566133076586 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 15:57:30 +0100 Subject: [PATCH 13/76] english standardization --- htdocs/admin/company.php | 6 +++--- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index cf57029ad5f..eb7cb1f9d56 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -66,7 +66,7 @@ if ( ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN",$_POST["town"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity); @@ -284,7 +284,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; print ''.$langs->trans("CompanyTown").''; - print ''."\n"; + print ''."\n"; // Country $var=!$var; @@ -652,7 +652,7 @@ else print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP) . ''; $var=!$var; - print ''.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_VILLE)?'':$conf->global->MAIN_INFO_SOCIETE_VILLE) . ''; + print ''.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . ''; $var=!$var; print ''.$langs->trans("CompanyCountry").''; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 5798e278a66..5a40d9796b7 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -31,6 +31,7 @@ UPDATE llx_const set value='auguria_menu.php' where value='auguria_frontoffice.p UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_backoffice.php'; UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_frontoffice.php'; UPDATE llx_const set value='MAIN_INFO_SOCIETE_ADDRESS' where value='MAIN_INFO_SOCIETE_ADRESSE'; +UPDATE llx_const set value='MAIN_INFO_SOCIETE_TOWN' where value='MAIN_INFO_SOCIETE_VILLE'; ALTER TABLE llx_user add COLUMN fk_user integer; From 7e79e1a574a8dc957438b038a51ecc39b6146e22 Mon Sep 17 00:00:00 2001 From: jfefe Date: Fri, 22 Feb 2013 16:02:19 +0100 Subject: [PATCH 14/76] Fix bug #735 : Error when trying send expedition card --- htdocs/expedition/class/expedition.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 1840713b0e6..fe66ea0fd78 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -402,6 +402,11 @@ class Expedition extends CommonObject // Tracking url $this->GetUrlTrackingStatus($obj->tracking_number); + /* + * Thirparty + */ + $result=$this->fetch_thirdparty(); + /* * Lines */ From a582fd3f157191c82550e5868d53543359378e1e Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:14:52 +0100 Subject: [PATCH 15/76] english standardization --- htdocs/admin/ldap_contacts.php | 6 +++--- htdocs/admin/ldap_members.php | 6 +++--- htdocs/categories/categorie.php | 2 +- htdocs/comm/prospect/list.php | 14 +++++++------- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 4fd4e512483..96382bdaa59 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -230,7 +230,7 @@ print ''.$langs->trans("LDAPFieldAddressExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ADDRESS?' checked="checked"':'').">"; print ''; -// CP +// ZIP $var=!$var; print ''.$langs->trans("LDAPFieldZip").''; print ''; @@ -238,7 +238,7 @@ print ''.$langs->trans("LDAPFieldZipExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ZIP?' checked="checked"':'').">"; print ''; -// Ville +// TOWN $var=!$var; print ''.$langs->trans("LDAPFieldTown").''; print ''; @@ -246,7 +246,7 @@ print ''.$langs->trans("LDAPFieldTownExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_TOWN?' checked="checked"':'').">"; print ''; -// Pays +// COUNTRY $var=!$var; print ''.$langs->trans("LDAPFieldCountry").''; print ''; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index a6207c6b2c4..b8245f2aa34 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -271,7 +271,7 @@ print ''.$langs->trans("LDAPFieldAddressExample").''; print ' '; print ''; -// CP +// ZIP $var=!$var; print ''.$langs->trans("LDAPFieldZip").''; print ''; @@ -279,7 +279,7 @@ print ''.$langs->trans("LDAPFieldZipExample").''; print ' '; print ''; -// Ville +// TOWN $var=!$var; print ''.$langs->trans("LDAPFieldTown").''; print ''; @@ -287,7 +287,7 @@ print ''.$langs->trans("LDAPFieldTownExample").''; print ' '; print ''; -// Pays +// COUNTRY $var=!$var; print ''.$langs->trans("LDAPFieldCountry").''; print ''; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index d3a06304e46..95755a3e59a 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -244,7 +244,7 @@ if ($socid) // Zip / Town print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; // Country if ($soc->pays) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 302c47e2d1e..9e0d61f5e2b 100755 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -41,7 +41,7 @@ $socname = GETPOST("socname",'alpha'); $stcomm = GETPOST("stcomm",'int'); $search_nom = GETPOST("search_nom"); $search_zipcode = GETPOST("search_zipcode"); -$search_ville = GETPOST("search_ville"); +$search_town = GETPOST("search_town"); $search_departement = GETPOST("search_departement"); $search_datec = GETPOST("search_datec"); $search_categ = GETPOST("search_categ",'int'); @@ -172,7 +172,7 @@ if ($action == 'cstc') $formother=new FormOther($db); -$sql = "SELECT s.rowid, s.nom, s.cp as zip, s.ville, s.datec, s.datea, s.status as status,"; +$sql = "SELECT s.rowid, s.nom, s.cp as zip, s.town, s.datec, s.datea, s.status as status,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; $sql.= " d.nom as departement"; // Updated by Matelli @@ -194,7 +194,7 @@ if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'"; if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape(strtolower($search_zipcode))."%'"; -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape(strtolower($search_town))."%'"; if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'"; if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; // Insert levels filters @@ -242,7 +242,7 @@ if ($resql) llxHeader('',$langs->trans("ThirdParty"),$help_url); } - $param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_code).'&search_ville='.urlencode($search_ville); + $param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_code).'&search_town='.urlencode($search_town); // Added by Matelli // Store the status filter in the URL if (isSet($search_cstc)) @@ -294,7 +294,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ProspectLevelShort"),$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); @@ -315,7 +315,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -393,7 +393,7 @@ if ($resql) print $prospectstatic->getNomUrl(1,'prospect'); print ''; print "".$obj->zip." "; - print "".$obj->ville." "; + print "".$obj->town." "; print ''.$obj->departement.''; // Creation date print ''.dol_print_date($db->jdate($obj->datec)).''; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 5a40d9796b7..1c10ca0e730 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -48,6 +48,7 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_societe CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); From 38480f5962f68c537eaac7556f16e1403cdaff83 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:19:16 +0100 Subject: [PATCH 16/76] english standardization --- htdocs/comm/list.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index fd7ea79f345..e585733805c 100755 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -48,7 +48,7 @@ if (! $sortfield) $sortfield="s.nom"; $search_nom=GETPOST("search_nom"); $search_zipcode=GETPOST("search_zipcode"); -$search_ville=GETPOST("search_ville"); +$search_town=GETPOST("search_town"); $search_code=GETPOST("search_code"); $search_compta=GETPOST("search_compta"); @@ -77,7 +77,7 @@ if (GETPOST("button_removefilter_x")) $socname=""; $search_nom=""; $search_zipcode=""; - $search_ville=""; + $search_town=""; $search_idprof1=''; $search_idprof2=''; $search_idprof3=''; @@ -96,7 +96,7 @@ $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); -$sql = "SELECT s.rowid, s.nom as name, s.client, s.cp as zip, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; +$sql = "SELECT s.rowid, s.nom as name, s.client, s.cp as zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; $sql.= " s.datec, s.datea, s.canvas"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; @@ -117,7 +117,7 @@ if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; if ($search_zipcode) $sql.= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'"; -if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql.= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'"; if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'"; // Insert sale filter @@ -142,7 +142,7 @@ if ($result) { $num = $db->num_rows($result); - $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_ville=".$search_ville; + $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town; if ($search_categ != '') $param.='&search_categ='.$search_categ; if ($search_sale != '') $param.='&search_sale='.$search_sale; @@ -178,7 +178,7 @@ if ($result) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder); @@ -200,7 +200,7 @@ if ($result) print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -241,7 +241,7 @@ if ($result) print $thirdpartystatic->getNomUrl(1); print ''; print ''.$obj->zip.''; - print ''.$obj->ville.''; + print ''.$obj->town.''; print ''.$obj->code_client.''; print ''.$obj->code_compta.''; print ''.dol_print_date($db->jdate($obj->datec),'day').''; From aa28e17953afadf4447820dc0aebe5061f38877f Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:21:30 +0100 Subject: [PATCH 17/76] english standardization --- htdocs/commande/customer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 8b9cba89b41..bc04697f93f 100755 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -67,7 +67,7 @@ $thirdpartystatic=new Societe($db); * Mode List */ -$sql = "SELECT s.rowid, s.nom, s.client, s.ville, s.datec, s.datea"; +$sql = "SELECT s.rowid, s.nom, s.client, s.town, s.datec, s.datea"; $sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st, ".MAIN_DB_PREFIX."commande as c"; @@ -119,7 +119,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","","",'valign="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec",$addu,"",'align="right"',$sortfield,$sortorder); @@ -167,7 +167,7 @@ if ($resql) print $result; print ''; - print ''.$obj->ville.' '; + print ''.$obj->town.' '; print ''.$obj->code_client.' '; print ''.$obj->code_compta.' '; print ''.dol_print_date($db->jdate($obj->datec)).''; From 890b9ca44a911f09808971ceb35a11ee2d84e630 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:27:58 +0100 Subject: [PATCH 18/76] english standardization --- htdocs/compta/dons/class/don.class.php | 20 +++++++++---------- .../install/mysql/migration/3.3.0-3.4.0.sql | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index 4942c8f3f7e..f2c3a6f0704 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -44,7 +44,7 @@ class Don extends CommonObject var $societe; var $address; var $cp; - var $ville; + var $town; var $pays; var $email; var $public; @@ -190,7 +190,7 @@ class Don extends CommonObject $this->societe = 'The Company'; $this->address = 'Twist road'; $this->cp = '99999'; - $this->ville = 'Town'; + $this->town = 'Town'; $this->note_public='SPECIMEN'; $this->email='email@email.com'; $this->note=''; @@ -229,7 +229,7 @@ class Don extends CommonObject $err++; } - if (dol_strlen(trim($this->ville)) == 0) + if (dol_strlen(trim($this->town)) == 0) { $error_string[$err] = "La ville saisie est invalide"; $err++; @@ -299,7 +299,7 @@ class Don extends CommonObject // Clean parameters $this->address=($this->address>0?$this->address:$this->address); $this->zip=($this->zip>0?$this->zip:$this->cp); - $this->town=($this->town>0?$this->town:$this->ville); + $this->town=($this->town>0?$this->town:$this->town); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); $this->country=($this->country?$this->country:$this->pays); @@ -315,7 +315,7 @@ class Don extends CommonObject $sql.= ", societe"; $sql.= ", address"; $sql.= ", cp"; - $sql.= ", ville"; + $sql.= ", town"; $sql.= ", pays"; $sql.= ", public"; $sql.= ", fk_don_projet"; @@ -384,7 +384,7 @@ class Don extends CommonObject // Clean parameters $this->address=($this->address>0?$this->address:$this->address); $this->zip=($this->zip>0?$this->zip:$this->cp); - $this->town=($this->town>0?$this->town:$this->ville); + $this->town=($this->town>0?$this->town:$this->town); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); $this->country=($this->country?$this->country:$this->pays); @@ -396,7 +396,7 @@ class Don extends CommonObject $sql .= ",societe='".$this->db->escape($this->societe)."'"; $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",cp='".$this->db->escape($this->zip)."'"; - $sql .= ",ville='".$this->db->escape($this->town)."'"; + $sql .= ",town='".$this->db->escape($this->town)."'"; $sql .= ",pays='".$this->db->escape($this->country)."'"; // TODO use country_id $sql .= ",public=".$this->public; $sql .= ",fk_don_projet=".($this->fk_project>0?$this->fk_project:'null'); @@ -463,7 +463,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,"; - $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; + $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; $sql.= " p.title as project_label"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet"; @@ -489,9 +489,9 @@ class Don extends CommonObject $this->statut = $obj->fk_statut; $this->address = $obj->address; $this->cp = $obj->cp; - $this->ville = $obj->ville; + $this->town = $obj->town; $this->zip = $obj->cp; - $this->town = $obj->ville; + $this->town = $obj->town; $this->email = $obj->email; $this->phone = $obj->phone; $this->phone_mobile = $obj->phone_mobile; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 1c10ca0e730..ad5f77a422f 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -46,6 +46,7 @@ alter table llx_extrafields add column param text after pos; alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; +alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; From 9a431bb8e3e92516b996e44026d8a9c95da62e83 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:33:48 +0100 Subject: [PATCH 19/76] english standardization --- htdocs/compta/clients.php | 6 +++--- htdocs/compta/dons/fiche.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index a866b4cac79..e1a6f02d49f 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -93,7 +93,7 @@ if ($mode == 'search') { * Mode List */ -$sql = "SELECT s.rowid, s.nom, s.client, s.ville, s.datec, s.datea"; +$sql = "SELECT s.rowid, s.nom, s.client, s.town, s.datec, s.datea"; $sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st"; @@ -148,7 +148,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","","",'valign="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec",$addu,"",'align="right"',$sortfield,$sortorder); @@ -190,7 +190,7 @@ if ($resql) $thirdpartystatic->client=$obj->client; print $thirdpartystatic->getNomUrl(1,'compta'); print ''; - print ''.$obj->ville.' '; + print ''.$obj->town.' '; print ''.$obj->code_client.' '; print ''.$obj->code_compta.' '; print ''.dol_print_date($db->jdate($obj->datec)).''; diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 5ea563fbf14..9f5d08cdf60 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -91,7 +91,7 @@ if ($action == 'update') $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); $don->cp = $_POST["zipcode"]; - $don->ville = $_POST["town"]; + $don->town = $_POST["town"]; $don->zip = $_POST["zipcode"]; $don->town = $_POST["town"]; $don->email = $_POST["email"]; @@ -143,7 +143,7 @@ if ($action == 'add') $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); $don->cp = $_POST["zipcode"]; - $don->ville = $_POST["town"]; + $don->town = $_POST["town"]; $don->zip = $_POST["zipcode"]; $don->town = $_POST["town"]; $don->email = $_POST["email"]; @@ -488,7 +488,7 @@ if (! empty($id) && $action != 'edit') print "".''.$langs->trans("Address").''.dol_nl2br($don->address).''; // Zip / Town - print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->cp.($don->cp && $don->ville?' / ':'').$don->ville.''; + print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->cp.($don->cp && $don->town?' / ':'').$don->town.''; // Country print "".''.$langs->trans("Country").''.$don->pays.''; From fb54bceafb4bd439faac95b58c390954b53febe8 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:53:50 +0100 Subject: [PATCH 20/76] english standardization --- .../canvas/default/tpl/contactcard_view.tpl.php | 2 +- htdocs/contact/class/contact.class.php | 12 +++++------- htdocs/contact/fiche.php | 2 +- htdocs/contact/vcard.php | 6 +++--- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index 971388d62c8..d0ad081e92e 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -65,7 +65,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] trans("Zip").' / '.$langs->trans("Town"); ?> - control->tpl['zip'].$this->control->tpl['ville']; ?> + control->tpl['zip'].$this->control->tpl['town']; ?> diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b835879b6cc..17e646b5a8d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -46,7 +46,6 @@ class Contact extends CommonObject var $address; var $cp; // TODO deprecated var $zip; - var $ville; // TODO deprecated var $town; var $fk_departement; // deprecated @@ -225,7 +224,7 @@ class Contact extends CommonObject $this->phone_mobile=trim($this->phone_mobile); $this->fax=trim($this->fax); $this->zip=($this->zip?$this->zip:$this->cp); - $this->town=($this->town?$this->town:$this->ville); + $this->town=($this->town?$this->town:$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); @@ -239,7 +238,7 @@ class Contact extends CommonObject $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'"; $sql .= ", cp='".$this->db->escape($this->zip)."'"; - $sql .= ", ville='".$this->db->escape($this->town)."'"; + $sql .= ", town='".$this->db->escape($this->town)."'"; $sql .= ", fk_pays=".($this->country_id>0?$this->country_id:'NULL'); $sql .= ", fk_departement=".($this->state_id>0?$this->state_id:'NULL'); $sql .= ", poste='".$this->db->escape($this->poste)."'"; @@ -367,7 +366,7 @@ class Contact extends CommonObject } if ($this->address && ! empty($conf->global->LDAP_CONTACT_FIELD_ADDRESS)) $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address; if ($this->cp && ! empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->cp; - if ($this->ville && ! empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->ville; + if ($this->town && ! empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_CONTACT_FIELD_COUNTRY)) $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code; if ($this->phone_pro && ! empty($conf->global->LDAP_CONTACT_FIELD_PHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro; if ($this->phone_perso && ! empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso; @@ -484,7 +483,7 @@ class Contact extends CommonObject $langs->load("companies"); $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.name as lastname, c.firstname,"; - $sql.= " c.address, c.cp as zip, c.ville as town,"; + $sql.= " c.address, c.cp as zip, c.town as town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; $sql.= " c.birthday,"; @@ -494,7 +493,7 @@ class Contact extends CommonObject $sql.= " p.libelle as country, p.code as country_code,"; $sql.= " d.nom as state, d.code_departement as state_code,"; $sql.= " u.rowid as user_id, u.login as user_login,"; - $sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.ville as soccity, s.default_lang as socdefault_lang"; + $sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.town as soccity, s.default_lang as socdefault_lang"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON c.fk_pays = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d ON c.fk_departement = d.rowid"; @@ -522,7 +521,6 @@ class Contact extends CommonObject $this->address = $obj->address; $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; - $this->ville = $obj->town; // TODO deprecated $this->town = $obj->town; $this->fk_departement = $obj->fk_departement; // deprecated diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 2926ec75b75..4151a2f078b 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -885,7 +885,7 @@ else print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; print $object->cp; if ($object->cp) print ' '; - print $object->ville.''; + print $object->town.''; // Country print ''.$langs->trans("Country").''; diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 0448bb519e0..9638c5ff188 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -54,8 +54,8 @@ $v->setPhoneNumber($contact->phone_pro, "PREF;WORK;VOICE"); $v->setPhoneNumber($contact->phone_mobile, "CELL;VOICE"); $v->setPhoneNumber($contact->fax, "WORK;FAX"); -$v->setAddress("", "", $contact->address, $contact->ville, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL"); -$v->setLabel("", "", $contact->address, $contact->ville, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK"); +$v->setAddress("", "", $contact->address, $contact->town, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL"); +$v->setLabel("", "", $contact->address, $contact->town, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK"); $v->setEmail($contact->email,'internet,pref'); $v->setNote($contact->note); @@ -67,7 +67,7 @@ if ($company->id) $v->setURL($company->url, "WORK"); if (! $contact->phone_pro) $v->setPhoneNumber($company->tel, "WORK;VOICE"); if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX"); - if (! $contact->cp) $v->setAddress("", "", $company->address, $company->ville, "", $company->cp, $company->pays_code, "WORK;POSTAL"); + if (! $contact->cp) $v->setAddress("", "", $company->address, $company->town, "", $company->cp, $company->pays_code, "WORK;POSTAL"); if ($company->email != $contact->email) $v->setEmail($company->email,'internet'); // Si contact lie a un tiers non de type "particulier" if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index ad5f77a422f..a085eed35f1 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -50,6 +50,7 @@ alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; +alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); From 844433d0a27cecdda737557489304711163ef6e5 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:11:53 +0100 Subject: [PATCH 21/76] english standardization --- htdocs/core/ajax/ziptown.php | 6 +++--- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/files.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 2 +- .../modules/dons/html_cerfafr.modules.php | 4 ++-- htdocs/core/modules/modAdherent.class.php | 10 +++++----- htdocs/core/modules/modCategorie.class.php | 12 +++++------ htdocs/core/modules/modCommande.class.php | 8 ++++---- htdocs/core/modules/modExpedition.class.php | 8 ++++---- htdocs/core/modules/modFacture.class.php | 16 +++++++-------- htdocs/core/modules/modFicheinter.class.php | 8 ++++---- htdocs/core/modules/modFournisseur.class.php | 20 +++++++++---------- htdocs/core/modules/modGravatar.class.php | 4 ++-- htdocs/core/modules/modHoliday.class.php | 6 +++--- htdocs/core/modules/modPaybox.class.php | 4 ++-- htdocs/core/modules/modPaypal.class.php | 4 ++-- htdocs/core/modules/modProjet.class.php | 8 ++++---- htdocs/core/modules/modPropale.class.php | 8 ++++---- htdocs/core/modules/modSociete.class.php | 16 +++++++-------- 19 files changed, 74 insertions(+), 74 deletions(-) diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index e7dc07f99da..90ece7f36e4 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -77,7 +77,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) } else // Use table of third parties { - $sql = "SELECT DISTINCT s.cp as zip, s.ville as town, s.fk_departement as fk_county, s.fk_pays as fk_country"; + $sql = "SELECT DISTINCT s.cp as zip, s.town, s.fk_departement as fk_county, s.fk_pays as fk_country"; $sql.= ", p.code as country_code, p.libelle as country"; $sql.= ", d.code_departement as county_code , d.nom as county"; $sql.= " FROM ".MAIN_DB_PREFIX.'societe as s'; @@ -85,8 +85,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON fk_pays = p.rowid'; $sql.= " WHERE"; if ($zipcode) $sql.= " s.cp LIKE '".$db->escape($zipcode)."%'"; - if ($town) $sql.= " s.ville LIKE '%" . $db->escape($town) . "%'"; - $sql.= " ORDER BY s.fk_pays, s.cp, s.ville"; + if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'"; + $sql.= " ORDER BY s.fk_pays, s.cp, s.town"; $sql.= $db->plimit(50); // Avoid pb with bad criteria } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index afd9522801a..95827872bb7 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1161,7 +1161,7 @@ function show_subsidiaries($conf,$langs,$db,$object) $i=-1; - $sql = "SELECT s.rowid, s.nom as name, s.address, s.cp as zip, s.ville as town, s.code_client, s.canvas"; + $sql = "SELECT s.rowid, s.nom as name, s.address, s.cp as zip, s.town, s.code_client, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE s.parent = ".$object->id; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index b3ce04157d0..b2360bb15bb 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -909,7 +909,7 @@ function dol_meta_create($object) if (is_dir($dir)) { $nblignes = count($object->lines); - $client = $object->client->nom . " " . $object->client->address . " " . $object->client->cp . " " . $object->client->ville; + $client = $object->client->nom . " " . $object->client->address . " " . $object->client->cp . " " . $object->client->town; $meta = "REFERENCE=\"" . $object->ref . "\" DATE=\"" . dol_print_date($object->date,'') . "\" NB_ITEMS=\"" . $nblignes . "\" diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 441bbe677fb..2a1d1cb16d7 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -67,7 +67,7 @@ __Address__ :
__MAIN_INFO_SOCIETE_ADDRESS__
__Zip__ : __MAIN_INFO_SOCIETE_CP__
- __Town__ : __MAIN_INFO_SOCIETE_VILLE__
+ __Town__ : __MAIN_INFO_SOCIETE_TOWN__
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index bc24b760edd..71ef2364056 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -142,11 +142,11 @@ class html_cerfafr extends ModeleDon $form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form); $form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form); $form = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->zip,$form); - $form = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->town,$form); + $form = str_replace('__MAIN_INFO_SOCIETE_TOWN__',$mysoc->town,$form); $form = str_replace('__DONATOR_NAME__',$don->nom,$form); $form = str_replace('__DONATOR_ADDRESS__',$don->address,$form); $form = str_replace('__DONATOR_ZIP__',$don->cp,$form); - $form = str_replace('__DONATOR_TOWN__',$don->ville,$form); + $form = str_replace('__DONATOR_TOWN__',$don->town,$form); $form = str_replace('__PAYMENTMODE_LIB__ ', $paymentmode,$form); $form = str_replace('__NOW__',dol_print_date($now,'',false,$outputlangs),$form); $form = str_replace('__DonationRef__',$outputlangs->trans("DonationRef"),$form); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 4dea8571657..d6122188d4a 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='MembersAndSubscriptions'; $this->export_permission[$r]=array(array("adherent","export")); - $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); - $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.ville'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); - $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.ville'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); + $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); + $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); + $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields'); $this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); + $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules // End add extra fields $this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.ville'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); + $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 841517904a8..976a5d97a5d 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -109,9 +109,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->fournisseur->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("fournisseur","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text"); - $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text"); + $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_fournisseur as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; $this->export_sql_end[$r] .=' WHERE u.rowid = cf.fk_categorie AND cf.fk_societe = s.rowid'; @@ -124,9 +124,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->societe->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("societe","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code'); - $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code'); + $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_societe as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; $this->export_sql_end[$r] .=' WHERE u.rowid = cf.fk_categorie AND cf.fk_societe = s.rowid'; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index c0eba504153..fbf3242dfec 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -173,10 +173,10 @@ class modCommande extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("commande","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 090fccecc0c..1bf908b7738 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -200,10 +200,10 @@ class modExpedition extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Shipments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("expedition","shipment","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('shipment_line'=>'ed.rowid','product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 5abfb38522f..bdef1b5e6b9 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -174,10 +174,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -194,10 +194,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 2dbce31d675..a46347ee895 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -138,10 +138,10 @@ class modFicheinter extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("ficheinter","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); $this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index e484b41dabf..b6f0866d996 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -242,10 +242,10 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et lignes de facture'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -261,10 +261,10 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et reglements'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -281,9 +281,9 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Commandes fournisseurs et lignes de commandes'; $this->export_icon[$r]='order'; $this->export_permission[$r]=array(array("fournisseur","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); //$this->export_TypeFields_array[$r]=array(); // TODO add fields type - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index 13aef872a05..219e9f3e562 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -168,8 +168,8 @@ class modGravatar extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index d9095f05711..b1582c632f0 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -265,9 +265,9 @@ class modHoliday extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); - // $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 61b94756890..01747274e66 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -164,8 +164,8 @@ class modPayBox extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index b5bc49c7092..a62034f3a50 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -156,8 +156,8 @@ class modPaypal extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index e2aa17d9cb8..b4644c9b1c0 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -147,18 +147,18 @@ class modProjet extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("projet","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country', + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country', 's.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode', 'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote", 'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.duration_planned'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc"); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle', - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle', + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', 's.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', 'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text", 'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.duration_planned'=>"Duree",'pt.progress'=>"Number",'pt.description'=>"Text"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company', + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company', 's.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', 'f.rowid'=>"project",'f.ref'=>"project",'f.datec'=>"project",'f.duree'=>"project",'f.fk_statut'=>"project",'f.description'=>"project", 'pt.rowid'=>'task','pt.dateo'=>"task",'pt.datee'=>"task",'pt.duration_effective'=>"task",'pt.duration_planned'=>"task",'pt.progress'=>"task",'pt.description'=>"task"); diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 1ec8a26c29b..82966ac8b18 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -167,10 +167,10 @@ class modPropale extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("propale","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 5581b5720b3..1f4af151555 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -248,10 +248,10 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_1'; $this->export_icon[$r]='company'; $this->export_permission[$r]=array(array("societe","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); + $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid'); - $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'Text'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid'); + $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'Text'); $this->export_entities_array[$r]=array(); // We define here only fields that use another picto // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; @@ -283,7 +283,7 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_2'; $this->export_icon[$r]='contact'; $this->export_permission[$r]=array(array("societe","contact","export")); - $this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); + $this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.town'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company"); // We define here only fields that use another picto if (empty($conf->fournisseur->enabled)) { @@ -322,7 +322,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; $resql=$this->db->query($sql); @@ -348,7 +348,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); + $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); // Import list of contact and attributes $r++; @@ -357,7 +357,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='contact'; $this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact'"; $resql=$this->db->query($sql); @@ -378,7 +378,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.ville'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); + $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); // Import Bank Accounts $r++; From a0df6764d8da1073cfee1993113cf1161e5d72a8 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:13:11 +0100 Subject: [PATCH 22/76] english standardization --- htdocs/core/modules/modStock.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 6375db4da5e..8b18e5d0c1c 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -122,9 +122,9 @@ class modStock extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]="WarehousesAndProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("stock","lire")); - $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LocationSummary','e.description'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.ville'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock'); - $this->export_TypeFields_array[$r]=array('e.rowid'=>'List:entrepot:LabelWareHouse','e.label'=>'Text','e.label'=>'Text','e.lieu'=>'Text','e.address'=>'Text','e.cp'=>'Text','e.ville'=>'Text','p.rowid'=>"List:produit:label",'p.ref'=>"Text",'p.fk_product_type'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.note'=>"Text",'p.price'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date','ps.reel'=>'Number'); - $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.description'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.ville'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.tosell'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock'); + $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LocationSummary','e.description'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.town'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock'); + $this->export_TypeFields_array[$r]=array('e.rowid'=>'List:entrepot:LabelWareHouse','e.label'=>'Text','e.label'=>'Text','e.lieu'=>'Text','e.address'=>'Text','e.cp'=>'Text','e.town'=>'Text','p.rowid'=>"List:produit:label",'p.ref'=>"Text",'p.fk_product_type'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.note'=>"Text",'p.price'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date','ps.reel'=>'Number'); + $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.description'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.town'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.tosell'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock'); $this->export_aggregate_array[$r]=array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r]=array('stock'=>array('p.rowid','e.rowid')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them From 57a75d9882ff7b653ac519d3447636253d19455e Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:15:49 +0100 Subject: [PATCH 23/76] english standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index a085eed35f1..75d303b4da8 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -49,6 +49,7 @@ alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; From c88f2bcb45d0e853d36069c6298dc51155f2a210 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:43:33 +0100 Subject: [PATCH 24/76] english standardization --- htdocs/fourn/index.php | 2 +- htdocs/fourn/liste.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 51fda73d8df..c03004cf7b5 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -228,7 +228,7 @@ print ''; * List last modified supliers */ $max=10; -$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, s.tms, s.prefix_comm, s.code_fournisseur, s.code_compta_fournisseur"; +$sql = "SELECT s.rowid as socid, s.nom, s.town, s.datec, s.datea, s.tms, s.prefix_comm, s.code_fournisseur, s.code_compta_fournisseur"; $sql.= ", st.libelle as stcomm"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index 13361f10eb2..74913f4e548 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -34,7 +34,7 @@ $langs->load("companies"); $socname = GETPOST("socname"); $search_nom = GETPOST("search_nom"); $search_zipcode = GETPOST("search_zipcode"); -$search_ville = GETPOST("search_ville"); +$search_town = GETPOST("search_town"); $search_code_fournisseur = GETPOST("search_code_fournisseur"); $search_compta_fournisseur = GETPOST("search_compta_fournisseur"); $search_datec = GETPOST("search_datec"); @@ -77,7 +77,7 @@ $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); -$sql = "SELECT s.rowid as socid, s.nom, s.cp as zip, s.ville, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, "; +$sql = "SELECT s.rowid as socid, s.nom, s.cp as zip, s.town, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, "; $sql.= "code_fournisseur, code_compta_fournisseur"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -96,7 +96,7 @@ if ($socname) } if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'"; -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_code_fournisseur) $sql .= " AND s.code_fournisseur LIKE '%".$db->escape($search_code_fournisseur)."%'"; if ($search_compta_fournisseur) $sql .= " AND s.code_compta_fournisseur LIKE '%".$db->escape($search_compta_fournisseur)."%'"; if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; @@ -120,7 +120,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $param = "&search_nom=".$search_nom."&search_code_fournisseur=".$search_code_fournisseur."&search_zipcode=".$search_zipcode."&search_ville=".$search_ville; + $param = "&search_nom=".$search_nom."&search_code_fournisseur=".$search_code_fournisseur."&search_zipcode=".$search_zipcode."&search_town=".$search_town; if ($search_categ != '') $param.='&search_categ='.$search_categ; print_barre_liste($langs->trans("ListOfSuppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); @@ -147,7 +147,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,'valign="middle"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,'valign="middle"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="right"',$sortfield,$sortorder); @@ -164,7 +164,7 @@ if ($resql) print ''; - print ''; + print ''; print ''; print ''; @@ -201,7 +201,7 @@ if ($resql) print $thirdpartystatic->getNomUrl(1,'supplier'); print "\n"; print ''.$obj->zip.''."\n"; - print ''.$obj->ville.''."\n"; + print ''.$obj->town.''."\n"; print ''.$obj->code_fournisseur.' '; print ''.$obj->code_compta_fournisseur.' '; print ''; From 88458ca466fd90e69023db3599d7af8944f6c277 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:18:05 +0100 Subject: [PATCH 25/76] english standardization --- htdocs/product/stock/class/entrepot.class.php | 6 ++---- htdocs/product/stock/fiche-valo.php | 2 +- htdocs/product/stock/fiche.php | 6 ++---- htdocs/product/stock/liste.php | 4 ++-- htdocs/product/stock/valo.php | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index f3f84b42262..3f597aae505 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -44,7 +44,6 @@ class Entrepot extends CommonObject var $address; //! Code Postal var $cp; // deprecated - var $ville; // deprecated var $zip; var $town; @@ -155,7 +154,7 @@ class Entrepot extends CommonObject $sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'"; $sql .= ", address = '" . $this->db->escape($this->address) ."'"; $sql .= ", cp = '" . $this->db->escape($this->zip) ."'"; - $sql .= ", ville = '" . $this->db->escape($this->town) ."'"; + $sql .= ", town = '" . $this->db->escape($this->town) ."'"; $sql .= ", fk_pays = " . $this->country_id; $sql .= " WHERE rowid = " . $id; @@ -247,7 +246,7 @@ class Entrepot extends CommonObject { global $conf; - $sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, ville as town, fk_pays as country_id"; + $sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, town, fk_pays as country_id"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot"; if ($id) @@ -277,7 +276,6 @@ class Entrepot extends CommonObject $this->lieu = $obj->lieu; $this->address = $obj->address; $this->cp = $obj->zip; // deprecated - $this->ville = $obj->town; // deprecated $this->pays_id = $obj->country_id; // deprecated $this->zip = $obj->zip; $this->town = $obj->town; diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index 05d1053a0a5..b8da31aa889 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -78,7 +78,7 @@ if ($_GET["id"]) print ''; print ''.$langs->trans('Zip').''.$entrepot->cp.''; - print ''.$langs->trans('Town').''.$entrepot->ville.''; + print ''.$langs->trans('Town').''.$entrepot->town.''; print ''.$langs->trans('Country').''; print $entrepot->pays; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 5737bd04e62..07b01bb7d34 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -65,7 +65,6 @@ if ($action == 'add' && $user->rights->stock->creer) $object->lieu = $_POST["lieu"]; $object->address = $_POST["address"]; $object->cp = $_POST["zipcode"]; - $object->ville = $_POST["town"]; $object->pays_id = $_POST["country_id"]; $object->zip = $_POST["zipcode"]; $object->town = $_POST["town"]; @@ -118,7 +117,6 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->lieu = $_POST["lieu"]; $object->address = $_POST["address"]; $object->cp = $_POST["zipcode"]; - $object->ville = $_POST["town"]; $object->pays_id = $_POST["country_id"]; $object->zip = $_POST["zipcode"]; $object->town = $_POST["town"]; @@ -270,7 +268,7 @@ else print $object->address; print ''; - // Ville + // Town print ''.$langs->trans('Zip').''.$object->zip.''; print ''.$langs->trans('Town').''.$object->town.''; @@ -281,7 +279,7 @@ else print $object->country; print ''; - // Statut + // Status print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; $calcproducts=$object->nb_products(); diff --git a/htdocs/product/stock/liste.php b/htdocs/product/stock/liste.php index a17cc1891c5..e9ab3819d33 100644 --- a/htdocs/product/stock/liste.php +++ b/htdocs/product/stock/liste.php @@ -45,7 +45,7 @@ $limit = $conf->liste_limit; $offset = $limit * $page; -$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.cp, e.ville, e.fk_pays"; +$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.cp, e.town, e.fk_pays"; $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql.= " WHERE e.entity = ".$conf->entity; if ($sref) @@ -54,7 +54,7 @@ if ($sref) } if ($sall) { - $sql.= " AND (e.description like '%".$sall."%' OR e.lieu like '%".$sall."%' OR e.address like '%".$sall."%' OR e.ville like '%".$sall."%')"; + $sql.= " AND (e.description like '%".$sall."%' OR e.lieu like '%".$sall."%' OR e.address like '%".$sall."%' OR e.town like '%".$sall."%')"; } $sql.= " ORDER BY $sortfield $sortorder"; $sql.= $db->plimit($limit+1, $offset); diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 1c3ef982667..842c2163202 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -68,7 +68,7 @@ if ($sall) $sql.= " OR e.description LIKE '%".$db->escape($sall)."%'"; $sql.= " OR e.lieu LIKE '%".$db->escape($sall)."%'"; $sql.= " OR e.address LIKE '%".$db->escape($sall)."%'"; - $sql.= " OR e.ville LIKE '%".$db->escape($sall)."%')"; + $sql.= " OR e.town LIKE '%".$db->escape($sall)."%')"; } $sql.= " GROUP BY e.rowid, e.label, e.statut, e.lieu"; $sql.= $db->order($sortfield,$sortorder); From c8872d7e982dd9535c794f871be17d44dc2261bd Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sat, 23 Feb 2013 10:20:31 +0100 Subject: [PATCH 26/76] WIP : Admin for carriers --- htdocs/admin/carrier.php | 154 +++++++++++++----- htdocs/expedition/class/expedition.class.php | 6 +- .../install/mysql/migration/3.3.0-3.4.0.sql | 1 - 3 files changed, 115 insertions(+), 46 deletions(-) diff --git a/htdocs/admin/carrier.php b/htdocs/admin/carrier.php index 53f18ae0ca1..d105dd28e6a 100644 --- a/htdocs/admin/carrier.php +++ b/htdocs/admin/carrier.php @@ -41,6 +41,10 @@ $object = new Expedition($db); /* * Actions */ +if ($action==setvalue AND $carrier) +{ + //$object->update_delivery_method($carrier); +} if ($action==activate_carrier AND $carrier) { @@ -98,51 +102,115 @@ dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); /* * Carrier List */ - -$object->all_delivery_methods(); -$var=true; -print_titre($langs->trans("CarrierList")); - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print "\n"; -for ($i=0; $ilistmeths); $i++) +if ($action=='edit_carrier' || $action=='setvalue') { - $var=!$var; - print ""; - print ''; - print ''; - print ''; - print ''; - print ''; -} -print "\n"; + // Carrier Edit + if ($carrier) $object->list_delivery_methods($carrier); + print_titre($langs->trans("CarrierEdit")); -print '
'.$langs->trans("Code").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("TrackingUrl").''.$langs->trans("Status").''.$langs->trans("Edit").'
'.$object->listmeths[$i][code].''.$object->listmeths[$i][libelle].''.$object->listmeths[$i][description].''.$object->listmeths[$i][tracking].''; - if($object->listmeths[$i][active] == 0) - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - } - print ''; - if($object->listmeths[$i][editable] == 1) - { - print ''.img_picto($langs->trans("Edit"),'edit').''; - } - else - { - print ' '; - } - print '

'; + print '
'; + print ''; + print ''; + + + print ''; + + $var=true; + print ''; + print ''; + print ''; + print "\n"; + + $var=!$var; + print ''; + + $var=!$var; + print ''; + + $var=!$var; + print ''; + + $var=!$var; + print ''; + + if ($carrier) + { + print ''; + } + else + { + print ''; + } + + print '
'.$langs->trans("CarrierParameter").''.$langs->trans("Value").'
'; + print $langs->trans("Code").''; + print ''; + print '   '.$langs->trans("Example").': CODE'; + print '
'; + print $langs->trans("Name").''; + print ''; + print '
'; + print $langs->trans("Description").''; + print ''; + print '
'; + print $langs->trans("Tracking").''; + print ''; + print '   '.$langs->trans("Example").': http://www.website.com/dir/{TRACKID}'; + print '


'; + print '
'; + +} +else +{ + // Display List + $object->list_delivery_methods(); + $var=true; + print_titre($langs->trans("CarrierList")); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + for ($i=0; $ilistmeths); $i++) + { + $var=!$var; + print ""; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + } + print ''; + + print '
'.$langs->trans("Code").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("TrackingUrl").''.$langs->trans("Status").''.$langs->trans("Edit").'
'.$object->listmeths[$i][code].''.$object->listmeths[$i][libelle].''.$object->listmeths[$i][description].''.$object->listmeths[$i][tracking].''; + if($object->listmeths[$i][active] == 0) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } + print ''; + if($object->listmeths[$i][editable] == 1) + { + print ''.img_picto($langs->trans("Edit"),'edit').''; + } + else + { + print ' '; + } + print '

'.$langs->trans("Add").'

'; + + print ''; +} llxFooter(); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 22c0593a632..240d5b8df13 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1170,10 +1170,10 @@ class Expedition extends CommonObject /** * Fetch all deliveries method and return an array. Load array this->listmeths. - * + * @param id $id only this carrier, all if none * @return void */ - function all_delivery_methods() + function list_delivery_methods($id='') { global $langs; $listmeths = array(); @@ -1181,6 +1181,7 @@ class Expedition extends CommonObject $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; + if ($id) $sql.= " WHERE em.rowid=".$id; $resql = $this->db->query($sql); if ($resql) @@ -1195,6 +1196,7 @@ class Expedition extends CommonObject if ($obj->tracking) { $this->listmeths[$i][tracking] = $obj->tracking; + // editable or hardcoded $this->listmeths[$i][editable] = 1; } else diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index cf31f6eb9bb..d09e3ac6799 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -1,4 +1,3 @@ -alter table llx_contratdet add column fk_product_fournisseur_price integer after info_bits; -- -- Be carefull to requests order. -- This file must be loaded by calling /install/index.php page From 9400d9897a9a26c56998c8cc23583d629608ffcc Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:35:46 +0100 Subject: [PATCH 27/76] english standardization --- htdocs/public/members/public_list.php | 6 ++--- htdocs/societe/agenda.php | 2 +- .../canvas/individual/tpl/card_create.tpl.php | 2 +- .../canvas/individual/tpl/card_view.tpl.php | 2 +- htdocs/societe/class/address.class.php | 7 ++--- htdocs/societe/class/societe.class.php | 26 ++++++------------- 6 files changed, 16 insertions(+), 29 deletions(-) diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index e49bab35a4d..13fced8eda2 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -101,14 +101,14 @@ if (! $sortfield) { $sortfield="nom"; } llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers")); -$sql = "SELECT rowid, prenom, nom, societe, cp as zip, ville as town, email, naiss, photo"; +$sql = "SELECT rowid, prenom, nom, societe, cp as zip, town, email, naiss, photo"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent"; $sql.= " WHERE entity = ".$entity; $sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, ville, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; +//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); @@ -130,7 +130,7 @@ if ($result) //print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","naiss",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),"public_list.php","cp","",$param,$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),"public_list.php","ville","",$param,$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),"public_list.php","town","",$param,$sortfield,$sortorder); print "".$langs->trans("Photo")."\n"; print "\n"; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index bc9b11b3149..abe85206fca 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -120,7 +120,7 @@ if ($socid) // Zip / Town print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; // Country if ($soc->pays) { diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index b4ae5c5547c..d889db81ab9 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -122,7 +122,7 @@ trans('Zip'); ?> control->tpl['autofilltownfromzip']; ?> trans('Town'); ?> - + diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 75179a3a04a..30794b2a604 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -84,7 +84,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); trans('Zip'); ?> control->tpl['cp']; ?> trans('Town'); ?> - control->tpl['ville']; ?> + control->tpl['town']; ?> diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 07830e7bb0b..7a8ba22dd41 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -40,7 +40,6 @@ class Address var $address; var $cp; // deprecated var $zip; - var $ville; // deprecated var $town; var $pays_id; // deprecated var $country_id; @@ -271,7 +270,7 @@ class Address { $sql = 'SELECT a.rowid as id, a.label, a.name, a.address, a.datec as dc'; $sql .= ', a.tms as date_update, a.fk_soc'; - $sql .= ', a.cp as zip, a.ville as town, a.note, a.fk_pays as country_id, a.tel, a.fax'; + $sql .= ', a.cp as zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; $sql .= ', p.code as country_code, p.libelle as country'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; @@ -305,7 +304,6 @@ class Address // deprecated $line->cp = $line->zip; - $line->ville = $line->town; $line->pays_id = $line->country_id; $line->pays_code = $line->country_code; $line->pays = $line->country; @@ -350,7 +348,7 @@ class Address $sql = 'SELECT a.rowid, a.fk_soc, a.label, a.name, a.address, a.datec as date_creation'; $sql .= ', a.tms as date_update'; - $sql .= ', a.cp as zip, a.ville as town, a.note, a.fk_pays as country_id, a.tel, a.fax'; + $sql .= ', a.cp as zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; $sql .= ', p.code as country_code, p.libelle as country'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; @@ -384,7 +382,6 @@ class Address // deprecated $this->cp = $this->zip; - $this->ville = $this->town; $this->pays_id = $this->country_id; $this->pays_code = $this->country_code; $this->pays = $this->country; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 4d45d8d01f9..b73902851db 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -48,10 +48,8 @@ class Societe extends CommonObject var $particulier; var $civility_id; var $address; - var $adresse; // TODO obsolete var $cp; // TODO obsolete var $zip; - var $ville; // TODO obsolete var $town; var $status; // 0=activity ceased, 1= in activity @@ -394,12 +392,10 @@ class Societe extends CommonObject $this->name = $this->name?trim($this->name):trim($this->nom); $this->nom = trim($this->nom); // TODO obsolete $this->ref_ext = trim($this->ref_ext); - $this->address = $this->address?trim($this->address):trim($this->adresse); - $this->adresse = $this->address; // TODO obsolete + $this->address = $this->address?trim($this->address):trim($this->address); $this->zip = $this->zip?trim($this->zip):trim($this->cp); $this->cp = $this->zip; // TODO obsolete - $this->town = $this->town?trim($this->town):trim($this->ville); - $this->ville = $this->town; // TODO obsolete + $this->town = $this->town?trim($this->town):trim($this->town); $this->state_id = trim($this->state_id); $this->country_id = ($this->country_id > 0)?$this->country_id:$this->pays_id; $this->pays_id = $this->country_id; // TODO obsolete @@ -501,7 +497,7 @@ class Societe extends CommonObject $sql .= ",address = '" . $this->db->escape($this->address) ."'"; $sql .= ",cp = ".(! empty($this->zip)?"'".$this->zip."'":"null"); - $sql .= ",ville = ".(! empty($this->town)?"'".$this->db->escape($this->town)."'":"null"); + $sql .= ",town = ".(! empty($this->town)?"'".$this->db->escape($this->town)."'":"null"); $sql .= ",fk_departement = '" . (! empty($this->state_id)?$this->state_id:'0') ."'"; $sql .= ",fk_pays = '" . (! empty($this->country_id)?$this->country_id:'0') ."'"; @@ -699,7 +695,7 @@ class Societe extends CommonObject $sql .= ', s.status'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_update'; - $sql .= ', s.tel as phone, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur'; + $sql .= ', s.tel as phone, s.fax, s.email, s.url, s.cp as zip, s.town, s.note, s.client, s.fournisseur'; $sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; @@ -760,11 +756,9 @@ class Societe extends CommonObject $this->date_update = $this->db->jdate($obj->date_update); $this->address = $obj->address; - $this->adresse = $obj->address; // TODO obsolete $this->zip = $obj->zip; $this->cp = $obj->zip; // TODO obsolete $this->town = $obj->town; - $this->ville = $obj->town; // TODO obsolete $this->pays_id = $obj->country_id; // TODO obsolete $this->country_id = $obj->country_id; @@ -2442,12 +2436,10 @@ class Societe extends CommonObject // Positionne parametres $this->nom=$name; // TODO obsolete $this->name=$name; - $this->adresse=$member->adresse; // TODO obsolete - $this->address=$member->adresse; + $this->address=$member->address; $this->cp=$member->cp; // TODO obsolete $this->zip=$member->cp; - $this->ville=$member->ville; // TODO obsolete - $this->town=$member->ville; + $this->town=$member->town; $this->pays_code=$member->country_code; // TODO obsolete $this->country_code=$member->country_code; $this->pays_id=$member->country_id; // TODO obsolete @@ -2508,16 +2500,14 @@ class Societe extends CommonObject $this->id=0; $this->name=empty($conf->global->MAIN_INFO_SOCIETE_NOM)?'':$conf->global->MAIN_INFO_SOCIETE_NOM; - $this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADRESSE)?'':$conf->global->MAIN_INFO_SOCIETE_ADRESSE; + $this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS; $this->zip=empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP; - $this->town=empty($conf->global->MAIN_INFO_SOCIETE_VILLE)?'':$conf->global->MAIN_INFO_SOCIETE_VILLE; + $this->town=empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN; $this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT; $this->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE; $this->nom=$this->name; // deprecated - $this->adresse=$this->address; // deprecated $this->cp=$this->zip; // deprecated - $this->ville=$this->town; // deprecated // We define country_id, country_code and country $country_id=$country_code=$country_label=''; From 529b8ae38e915e0ddf91fb1ff00dccfff0cf0b80 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:43:16 +0100 Subject: [PATCH 28/76] english standardization --- htdocs/societe/commerciaux.php | 2 +- htdocs/societe/lien.php | 6 +++--- htdocs/societe/societe.php | 16 ++++++++-------- scripts/members/sync_members_ldap2dolibarr.php | 2 -- test/phpunit/AdherentTest.php | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 8305e973adf..a5c8ec4a8b4 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -126,7 +126,7 @@ if ($_GET["socid"]) print "".$langs->trans('Address')."".nl2br($soc->address).""; print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; print ''.$langs->trans('Country').''.$soc->pays.''; diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index dbc2bb8a45d..cbb5aed7300 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -193,7 +193,7 @@ if ($socid) $socm = new Societe($db); $socm->fetch($soc->parent); print ''.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.''.($socm->code_client?" (".$socm->code_client.")":""); - print ($socm->ville?' - '.$socm->ville:''); + print ($socm->town?' - '.$socm->town:''); print ' '; print img_delete(); print '
'; @@ -233,7 +233,7 @@ if ($socid) $title=$langs->trans("CompanyList"); - $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; + $sql = "SELECT s.rowid as socid, s.nom, s.town, s.prefix_comm, s.client, s.fournisseur,"; $sql.= " te.code, te.libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."c_typent as te"; @@ -284,7 +284,7 @@ if ($socid) $var=!$var; print ""; print $obj->nom."\n"; - print "".$obj->ville." \n"; + print "".$obj->town." \n"; print "".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."\n"; print ''; if ($obj->client==1) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 6e370ea2220..9147d550242 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -40,7 +40,7 @@ $result = restrictedArea($user,'societe',$socid,''); $search_nom=trim(GETPOST("search_nom")); $search_nom_only=trim(GETPOST("search_nom_only")); $search_all=trim(GETPOST("search_all")); -$search_ville=trim(GETPOST("search_ville")); +$search_town=trim(GETPOST("search_town")); $socname=trim(GETPOST("socname")); $search_idprof1=trim(GETPOST('search_idprof1')); $search_idprof2=trim(GETPOST('search_idprof2')); @@ -150,7 +150,7 @@ if (GETPOST("button_removefilter_x")) $search_sale=''; $socname=""; $search_nom=""; - $search_ville=""; + $search_town=""; $search_idprof1=''; $search_idprof2=''; $search_idprof3=''; @@ -177,7 +177,7 @@ if ($socname) */ $title=$langs->trans("ListOfThirdParties"); -$sql = "SELECT s.rowid, s.nom as name, s.ville, s.datec, s.datea,"; +$sql = "SELECT s.rowid, s.nom as name, s.town, s.datec, s.datea,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; $sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) @@ -229,7 +229,7 @@ if ($search_nom) $sql.= " OR s.url LIKE '%".$db->escape($search_nom)."%'"; $sql.= ")"; } -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_idprof1) $sql .= " AND s.siren LIKE '%".$db->escape($search_idprof1)."%'"; if ($search_idprof2) $sql .= " AND s.siret LIKE '%".$db->escape($search_idprof2)."%'"; if ($search_idprof3) $sql .= " AND s.ape LIKE '%".$db->escape($search_idprof3)."%'"; @@ -259,7 +259,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $params = "&socname=".$socname."&search_nom=".$search_nom."&search_ville=".$search_ville; + $params = "&socname=".$socname."&search_nom=".$search_nom."&search_town=".$search_town; $params.= '&search_idprof1='.$search_idprof1; $params.= '&search_idprof2='.$search_idprof2; $params.= '&search_idprof3='.$search_idprof3; @@ -318,7 +318,7 @@ if ($resql) // Lines of titles print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$params,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$params,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$params,'',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$params,'nowrap="nowrap"',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$params,'nowrap="nowrap"',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$params,'nowrap="nowrap"',$sortfield,$sortorder); @@ -335,7 +335,7 @@ if ($resql) if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only; print ''; print ''; - print ''; + print ''; print ''; // IdProf1 print ''; @@ -385,7 +385,7 @@ if ($resql) $companystatic->status=$obj->status; print $companystatic->getNomUrl(1,'',24); print "\n"; - print "".$obj->ville."\n"; + print "".$obj->town."\n"; print "".$obj->idprof1."\n"; print "".$obj->idprof2."\n"; print "".$obj->idprof3."\n"; diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index bbe3f9ab100..d2e26aa2527 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -193,11 +193,9 @@ if ($result >= 0) $member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD]; //$member->societe; - $member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // deprecated $member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; $member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; // deprecated $member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; - $member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; // deprecated $member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; $member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // deprecated $member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 75a95cb4df0..07c7703605a 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -282,7 +282,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase $template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITE%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'. '%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%NAISS%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'. - '%NOM%,%SOCIETE%,%ADRESSE%,%CP%,%VILLE%,%PAYS%'; + '%NOM%,%SOCIETE%,%ADDRESS%,%CP%,%TOWN%,%PAYS%'; $expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',0,New firstname,New name,New firstname New name,'. 'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->naiss,'day').',,'. From 250a94109689ff1900f2cafb0a20c2121fc57bde Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 11:11:33 +0100 Subject: [PATCH 29/76] english standardization --- .../actions_adherentcard_common.class.php | 2 +- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/cartes/carte.php | 4 ++-- htdocs/adherents/class/adherent.class.php | 15 +++++--------- htdocs/adherents/cotisations.php | 6 +++--- htdocs/adherents/document.php | 2 +- htdocs/adherents/fiche.php | 14 +++++-------- htdocs/adherents/index.php | 6 +++--- htdocs/adherents/liste.php | 18 ++++++++--------- htdocs/adherents/type.php | 20 +++++++++---------- .../install/mysql/migration/3.3.0-3.4.0.sql | 1 + 11 files changed, 41 insertions(+), 49 deletions(-) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 9fc872f6e2f..c0777275201 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -367,7 +367,7 @@ abstract class ActionsAdherentCardCommon // Full firstname and name separated with a dot : firstname.name include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $login=dol_buildlogin($this->object->nom, $this->object->prenom); + $login=dol_buildlogin($this->object->lastname, $this->object->prenom); $generated_password=getRandomPassword(''); $password=$generated_password; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9d408af9ed6..7e124e37e8a 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -654,7 +654,7 @@ if ($rowid) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe,"; + $sql = "SELECT d.rowid, d.prenom, d.lastname, d.societe,"; $sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index c069c02be0c..490dddbb268 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -61,7 +61,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg $arrayofmembers=array(); // requete en prenant que les adherents a jour de cotisation - $sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe as company, d.datefin,"; + $sql = "SELECT d.rowid, d.prenom as firstname, d.lastname, d.login, d.societe as company, d.datefin,"; $sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.code as country_code, p.libelle as country"; @@ -110,7 +110,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated // For backward compatibility '%PRENOM%'=>$objp->firstname, - '%NOM%'=>$objp->lastname, + '%LASTNAME%'=>$objp->lastname, '%SOCIETE%'=>$objp->company, '%ADDRESS%'=>$objp->address, '%CP%'=>$objp->zip, diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 9f813f774ad..3b348f027a5 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -47,14 +47,12 @@ class Adherent extends CommonObject var $firstname; var $prenom; // deprecated var $lastname; - var $nom; // deprecated var $login; var $pass; var $societe; var $address; var $cp; var $zip; - //var $ville; // deprecated var $town; var $state_id; // Id of department @@ -230,7 +228,7 @@ class Adherent extends CommonObject // For backward compatibility '%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, '%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, - '%NOM%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, + '%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, '%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, @@ -401,7 +399,7 @@ class Adherent extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass.", email=".$this->email); // Clean parameters - $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->nom); + $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom); $this->address=($this->address?$this->address:$this->address); $this->zip=($this->zip?$this->zip:$this->cp); @@ -424,7 +422,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null"); $sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null"); - $sql.= ", nom=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null"); + $sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null"); $sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null"); $sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null"); $sql.= ", fk_soc=" .($this->fk_soc > 0?"'".$this->fk_soc."'":"null"); @@ -526,7 +524,6 @@ class Adherent extends CommonObject $luser->firstname=$this->firstname; $luser->lastname=$this->lastname; $luser->prenom=$this->firstname; // deprecated - $luser->nom=$this->lastname; // deprecated $luser->login=$this->user_login; $luser->pass=$this->pass; $luser->societe_id=$this->societe; @@ -1018,7 +1015,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1058,7 +1055,6 @@ class Adherent extends CommonObject $this->civilite_id = $obj->civilite; $this->prenom = $obj->firstname; // deprecated $this->firstname = $obj->firstname; - $this->nom = $obj->lastname; // deprecated $this->lastname = $obj->lastname; $this->login = $obj->login; $this->pass = $obj->pass; @@ -1067,7 +1063,6 @@ class Adherent extends CommonObject $this->address = $obj->address; $this->cp = $obj->zip; // deprecated $this->zip = $obj->zip; - //$this->ville = $obj->town; // deprecated $this->town = $obj->town; $this->state_id = $obj->fk_departement; @@ -1817,7 +1812,7 @@ class Adherent extends CommonObject // Member if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname; - if ($this->nom && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom; + if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname; if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom; if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login; if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 1361a5f9123..b9a02903a15 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu if ($msg) print $msg.'
'; // Liste des cotisations -$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe,"; +$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe,"; $sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; @@ -96,7 +96,7 @@ if ($result) print ''; print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder); if (! empty($conf->banque->enabled)) @@ -141,7 +141,7 @@ if ($result) // Ref print ''.$cotisation->getNomUrl(1).''; - // Nom + // Lastname print ''.$adherent->getNomUrl(1).''; // Login diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 720d1a8a17f..589b946a52c 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -159,7 +159,7 @@ if ($id > 0) print ''.$langs->trans("UserTitle").''.$member->getCivilityLabel().' '; print ''; - // Nom + // Lastname print ''.$langs->trans("Lastname").''.$member->lastname.' '; print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index b2e4bf612d0..3b1102fe31d 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -252,7 +252,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) // Change values $object->civilite_id = trim($_POST["civilite_id"]); $object->prenom = trim($_POST["prenom"]); // deprecated - $object->nom = trim($_POST["nom"]); // deprecated $object->firstname = trim($_POST["prenom"]); $object->lastname = trim($_POST["nom"]); $object->login = trim($_POST["login"]); @@ -262,7 +261,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->address = trim($_POST["address"]); $object->cp = trim($_POST["zipcode"]); // deprecated $object->zip = trim($_POST["zipcode"]); - //$object->ville = trim($_POST["town"]); // deprecated $object->town = trim($_POST["town"]); $object->state_id = $_POST["departement_id"]; $object->country_id = $_POST["country_id"]; @@ -409,7 +407,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $typeid=$_POST["typeid"]; $civilite_id=$_POST["civilite_id"]; - $nom=$_POST["nom"]; + $lastname=$_POST["lastname"]; $prenom=$_POST["prenom"]; $societe=$_POST["societe"]; $address=$_POST["address"]; @@ -435,14 +433,12 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->civilite_id = $civilite_id; $object->prenom = $prenom; // deprecated - $object->nom = $nom; // deprecated $object->firstname = $prenom; $object->lastname = $nom; $object->societe = $societe; $object->address = $address; $object->cp = $zip; // deprecated $object->zip = $zip; - //$object->ville = $town; // deprecated $object->town = $town; $object->fk_departement = $state_id; $object->state_id = $state_id; @@ -501,7 +497,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Password"))."
\n"; } } - if (empty($nom)) { + if (empty($lastname)) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; @@ -821,7 +817,7 @@ else print ''; // Lastname - print ''.$langs->trans("Lastname").''; + print ''.$langs->trans("Lastname").''; print ''; // Firstname @@ -1077,8 +1073,8 @@ else print ''; print ''; - // Name - print ''.$langs->trans("Lastname").'lastname).'">'; + // Lastname + print ''.$langs->trans("Lastname").'lastname).'">'; print ''; // Firstname diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 03048a443bf..263e25fc4ec 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -140,7 +140,7 @@ print $langs->trans("Ref").':'; print ""; print ''; -print $langs->trans("Name").':'; +print $langs->trans("Name").':'; print ''; print ""; print ''; @@ -205,7 +205,7 @@ $var=true; */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; $sql.= " a.tms as datem, datefin as date_end_subscription,"; $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; @@ -265,7 +265,7 @@ else */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; $sql.= " datefin as date_end_subscription,"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index afbee9d9ffb..3332e4f8334 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -39,7 +39,7 @@ $filter=GETPOST("filter"); $statut=GETPOST("statut"); $search=GETPOST("search"); $search_ref=GETPOST("search_ref"); -$search_nom=GETPOST("search_nom"); +$search_lastname=GETPOST("search_lastname"); $search_prenom=GETPOST("search_prenom"); $search_login=GETPOST("search_login"); $type=GETPOST("type"); @@ -56,13 +56,13 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } -if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.nom"); } +if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } if (GETPOST("button_removefilter")) { $search=""; $search_ref=""; - $search_nom=""; + $search_lastname=""; $search_prenom=""; $search_login=""; $type=""; @@ -86,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé $now=dol_now(); -$sql = "SELECT d.rowid, d.login, d.nom as lastname, d.prenom as firstname, d.societe as company, d.fk_soc,"; +$sql = "SELECT d.rowid, d.login, d.lastname, d.prenom as firstname, d.societe as company, d.fk_soc,"; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -103,7 +103,7 @@ if ($sall) { $sql.=" AND ("; if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; - $sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.=" d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -120,9 +120,9 @@ if ($search_ref) if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$search_ref.")"; else $sql.=" AND 1 = 2"; // Always wrong } -if ($search_nom) +if ($search_lastname) { - $sql.= " AND (d.prenom LIKE '%".$search_nom."%' OR d.nom LIKE '%".$search_nom."%')"; + $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if ($search_login) { @@ -216,7 +216,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"t.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder); @@ -233,7 +233,7 @@ if ($resql) print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b44e5b3fde2..4734679131e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -35,7 +35,7 @@ $langs->load("members"); $rowid = GETPOST('rowid','int'); $action = GETPOST('action','alpha'); -$search_lastname = GETPOST('search_nom','alpha'); +$search_lastname = GETPOST('search_lastname','alpha'); $search_login = GETPOST('search_login','alpha'); $search_email = GETPOST('search_email','alpha'); $type = GETPOST('type','alpha'); @@ -49,7 +49,7 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) { $sortorder="DESC"; } -if (! $sortfield) { $sortfield="d.nom"; } +if (! $sortfield) { $sortfield="d.lastname"; } // Security check $result=restrictedArea($user,'adherent',$rowid,'adherent_type'); @@ -405,7 +405,7 @@ if ($rowid > 0) $now=dol_now(); - $sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe, "; + $sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe, "; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -415,7 +415,7 @@ if ($rowid > 0) $sql.= " AND t.rowid = ".$adht->id; if ($sall) { - $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -427,12 +427,12 @@ if ($rowid > 0) { if (isset($_POST['search']) && $_POST['search'] != '') { - $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.nom LIKE '%".$_POST['search']."%')"; + $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')"; } } if (! empty($search_lastname)) { - $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.nom LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if (! empty($search_login)) { @@ -492,7 +492,7 @@ if ($rowid > 0) $param="&rowid=".$rowid; if (! empty($status)) $param.="&status=".$status; - if (! empty($search_lastname)) $param.="&search_nom=".$search_lastname; + if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname; if (! empty($search_login)) $param.="&search_login=".$search_login; if (! empty($search_email)) $param.="&search_email=".$search_email; @@ -508,7 +508,7 @@ if ($rowid > 0) print ''; print ''; - print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"d.email",$param,"","",$sortfield,$sortorder); @@ -524,7 +524,7 @@ if ($rowid > 0) print ''; print ''; + print ''; print ''; @@ -556,7 +556,7 @@ if ($rowid > 0) $adh->lastname=$objp->lastname; $adh->firstname=$objp->firstname; - // Nom + // Lastname $var=!$var; print ''; if ($objp->societe != '') diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 75d303b4da8..8b3b1dc43e2 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -48,6 +48,7 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; +alter table llx_adherent CHANGE COLUMN nom lastname text; alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; From 869a014d320ff738def8b02e91a126425aba93f7 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 11:42:12 +0100 Subject: [PATCH 30/76] english standardization --- htdocs/user/class/user.class.php | 10 ++-------- htdocs/user/fiche.php | 28 ++++++++++++++-------------- htdocs/user/ldap.php | 4 ++-- htdocs/user/note.php | 4 ++-- htdocs/user/param_ihm.php | 4 ++-- htdocs/user/perms.php | 2 +- 6 files changed, 23 insertions(+), 29 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 5569f1b6784..bf3437dd4b0 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -46,7 +46,6 @@ class User extends CommonObject var $ref_ext; var $ldap_sid; var $search_sid; - var $nom; // TODO deprecated var $prenom; // TODO deprecated var $lastname; var $firstname; @@ -190,7 +189,6 @@ class User extends CommonObject $this->ref_ext = $obj->ref_ext; $this->ldap_sid = $obj->ldap_sid; - $this->nom = $obj->name; // TODO deprecated $this->lastname = $obj->name; $this->prenom = $obj->firstname; // TODO deprecated $this->firstname = $obj->firstname; @@ -910,7 +908,6 @@ class User extends CommonObject // Positionne parametres $this->admin = 0; - $this->nom = $contact->nom; // TODO deprecated $this->prenom = $contact->prenom; // TODO deprecated $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; @@ -1090,7 +1087,6 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters - $this->nom = trim($this->nom); // deprecated $this->prenom = trim($this->prenom); // deprecated $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); @@ -1189,7 +1185,6 @@ class User extends CommonObject if ($result >= 0) { $adh->prenom=$this->firstname; // deprecated - $adh->nom=$this->lastname; // deprecated $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; $adh->login=$this->login; @@ -1728,7 +1723,7 @@ class User extends CommonObject /** * Return a link to the user card (with optionnaly the picto) - * Use this->id,this->nom, this->prenom + * Use this->id,this->lastname, this->prenom * * @param int $withpicto Include picto in link (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul) * @param string $option On what the link point to @@ -1887,7 +1882,7 @@ class User extends CommonObject $soc = new Societe($this->db); $soc->fetch($this->societe_id); - $info["o"] = $soc->nom; + $info["o"] = $soc->lastname; if ($soc->client == 1) $info["businessCategory"] = "Customers"; if ($soc->client == 2) $info["businessCategory"] = "Prospects"; if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers"; @@ -1946,7 +1941,6 @@ class User extends CommonObject $this->ref = 'SPECIMEN'; $this->specimen=1; - $this->nom='DOLIBARR'; // deprecated $this->prenom='SPECIMEN'; // deprecated $this->lastname='DOLIBARR'; $this->firstname='SPECIMEN'; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 4c1f40049a0..38751435534 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -151,7 +151,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) // Action ajout user if ($action == 'add' && $canadduser) { - if (! $_POST["nom"]) + if (! $_POST["lastname"]) { $message='
'.$langs->trans("NameNotDefined").'
'; $action="create"; // Go back to create page @@ -174,7 +174,7 @@ if ($action == 'add' && $canadduser) if (! $message) { - $object->lastname = $_POST["nom"]; + $object->lastname = $_POST["lastname"]; $object->firstname = $_POST["prenom"]; $object->login = $_POST["login"]; $object->admin = $_POST["admin"]; @@ -277,7 +277,7 @@ if ($action == 'update' && ! $_POST["cancel"]) { $error=0; - if (! $_POST["nom"]) + if (! $_POST["lastname"]) { $message='
'.$langs->trans("NameNotDefined").'
'; $action="edit"; // Go back to create page @@ -315,7 +315,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->oldcopy=dol_clone($object); - $object->lastname = GETPOST("nom"); + $object->lastname = GETPOST("lastname"); $object->firstname = GETPOST("prenom"); $object->login = GETPOST("login"); $object->pass = GETPOST("password"); @@ -546,7 +546,7 @@ if ($action == 'adduserldap') { foreach ($ldapusers as $key => $attribute) { - $ldap_nom = $attribute[$conf->global->LDAP_FIELD_NAME]; + $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; $ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; @@ -682,7 +682,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print '
'; } - print dol_set_focus('#nom'); + print dol_set_focus('#lastname'); print '
'; print ''; @@ -694,17 +694,17 @@ if (($action == 'create') || ($action == 'adduserldap')) print '
'; - // Nom + // Lastname print ''; print ''; @@ -1558,12 +1558,12 @@ else print ''; // Photo diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index a04674720f6..837684334b2 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -100,9 +100,9 @@ print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user- print ''; print ''; -// Nom +// Lastname print ''; -print ''; +print ''; print "\n"; // Prenom diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 72c6237ef44..13a45f61cb2 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -101,8 +101,8 @@ if ($id) print ''; print ''; - // Nom - print ''; + // Lastname + print ''; print ''; // Prenom diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 534ae00ddc4..f389fdaf713 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -130,9 +130,9 @@ print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user- print ''; print ''; -// Nom +// LastName print ''; -print ''; +print ''; print "\n"; // Prenom diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 7443d3d69b5..dc6421d886b 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -256,7 +256,7 @@ print ''."\n"; // Lastname print ''; -print ''; +print ''; print ''."\n"; // Firstname From 15f8b588d697d745808a8c1bcc13a57d8a828724 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 11:54:46 +0100 Subject: [PATCH 31/76] english standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + htdocs/user/class/user.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 8b3b1dc43e2..31715239739 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -50,6 +50,7 @@ alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN nom lastname text; alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_user CHANGE COLUMN name lastname text; alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index bf3437dd4b0..ac16c30e220 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1120,7 +1120,7 @@ class User extends CommonObject // Mise a jour autres infos $sql = "UPDATE ".MAIN_DB_PREFIX."user SET"; - $sql.= " name = '".$this->db->escape($this->lastname)."'"; + $sql.= " lastname = '".$this->db->escape($this->lastname)."'"; $sql.= ", firstname = '".$this->db->escape($this->firstname)."'"; $sql.= ", login = '".$this->db->escape($this->login)."'"; $sql.= ", admin = ".$this->admin; From 7c2a4500d635af9cf45dfa4f0049883b69e2b705 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 12:30:01 +0100 Subject: [PATCH 32/76] fix: change name with lastname --- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/compta/stats/cabyuser.php | 4 ++-- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/modules/mailings/pomme.modules.php | 2 +- htdocs/societe/commerciaux.php | 4 ++-- htdocs/user/index.php | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 43278dbaaa2..95da4f0e34b 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -287,7 +287,7 @@ class ActionComm extends CommonObject $sql.= " a.priority, a.fulldayevent, a.location,"; $sql.= " c.id as type_id, c.code as type_code, c.libelle,"; $sql.= " s.nom as socname,"; - $sql.= " u.firstname, u.name as lastname"; + $sql.= " u.firstname, u.lastname as lastname"; $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index dc33cd1aa14..3e0afb9966f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -135,7 +135,7 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl $catotal=0; if ($modecompta == 'CREANCES-DETTES') { - $sql = "SELECT u.rowid as rowid, u.name as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; + $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid"; $sql.= " WHERE f.fk_statut in (1,2)"; @@ -149,7 +149,7 @@ else * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) */ - $sql = "SELECT u.rowid as rowid, u.name as name, u.firstname as firstname, sum(pf.amount) as amount_ttc"; + $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(pf.amount) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u" ; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid "; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON pf.fk_facture = f.rowid"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0d0c0ae3f12..76dcc96197f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1005,7 +1005,7 @@ class Form $out=''; // On recherche les utilisateurs - $sql = "SELECT DISTINCT u.rowid, u.name as lastname, u.firstname, u.login, u.admin, u.entity"; + $sql = "SELECT DISTINCT u.rowid, u.lastname as lastname, u.firstname, u.login, u.admin, u.entity"; if (! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity) { $sql.= ", e.label"; @@ -1033,7 +1033,7 @@ class Form if (! empty($user->societe_id)) $sql.= " AND u.fk_societe = ".$user->societe_id; if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN ('".$excludeUsers."')"; if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')"; - $sql.= " ORDER BY u.name ASC"; + $sql.= " ORDER BY u.lastname ASC"; dol_syslog(get_class($this)."::select_dolusers sql=".$sql); $resql=$this->db->query($sql); diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index d07360a3503..e5c1f2e6a2f 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -299,7 +299,7 @@ class FormOther $moreforfilter.=''; // Get list of users allowed to be viewed - $sql_usr = "SELECT u.rowid, u.name as name, u.firstname, u.login"; + $sql_usr = "SELECT u.rowid, u.lastname as name, u.firstname, u.login"; $sql_usr.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql_usr.= " WHERE u.entity IN (0,".$conf->entity.")"; if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.fk_societe = ".($user->societe_id?$user->societe_id:0); diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 64992b251a1..4541b2c92dc 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -146,7 +146,7 @@ class mailing_pomme extends MailingTargets // La requete doit retourner: id, email, fk_contact, name, firstname $sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,"; - $sql.= " u.name as name, u.firstname as firstname, u.login, u.office_phone"; + $sql.= " u.lastname as name, u.firstname as firstname, u.login, u.office_phone"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test $sql.= " AND u.entity IN (0,".$conf->entity.")"; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index a5c8ec4a8b4..3636a1cb35a 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -146,7 +146,7 @@ if ($_GET["socid"]) $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE sc.fk_soc =".$soc->id; $sql .= " AND sc.fk_user = u.rowid"; - $sql .= " ORDER BY u.name ASC "; + $sql .= " ORDER BY u.lastname ASC "; $resql = $db->query($sql); if ($resql) @@ -199,7 +199,7 @@ if ($_GET["socid"]) $sql = "SELECT u.rowid, u.name, u.firstname, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; - $sql.= " ORDER BY u.name ASC "; + $sql.= " ORDER BY u.lastname ASC "; $resql = $db->query($sql); if ($resql) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 0a052135792..1a3a00b7d18 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -84,9 +84,9 @@ else if (! empty($socid)) $sql.= " AND u.fk_societe = ".$socid; if (! empty($search_user)) { - $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.name LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')"; + $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')"; } -if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.name LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')"; +if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')"; $sql.=$db->order($sortfield,$sortorder); $result = $db->query($sql); From 9fc18d23e7b00cdb347ccf11386b2a9127a84495 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 13:59:17 +0100 Subject: [PATCH 33/76] fix: change name with lastname --- htdocs/user/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 1a3a00b7d18..1c1de4c0ccc 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -99,7 +99,7 @@ if ($result) print '
'; - print ''; print '
'.$langs->trans("Lastname").''; - if (! empty($ldap_nom)) + if (! empty($ldap_lastname)) { - print ''; - print $ldap_nom; + print ''; + print $ldap_lastname; } else { - print ''; + print ''; } print '
'; if ($caneditfield && !$object->ldap_sid) { - print ''; + print ''; } else { - print ''; - print $object->nom; + print ''; + print $object->lastname; } print '
'.$langs->trans("Lastname").''.$fuser->nom.''.$fuser->lastname.'
'.$langs->trans("Lastname").''.$fuser->nom.' 
'.$langs->trans("Lastname").''.$fuser->lastname.' 
'.$langs->trans("LastName").''.$fuser->nom.''.$fuser->lastname.'
'.$langs->trans("Lastname").''.$fuser->nom.''.$fuser->lastName.'
'; print ''; print_liste_field_titre($langs->trans("Login"),"index.php","u.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("LastName"),"index.php","u.name",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("LastName"),"index.php","u.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("FirstName"),"index.php","u.firstname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder); @@ -123,7 +123,7 @@ if ($result) print img_picto($langs->trans("Administrator"),'star'); } print ''; - print ''; + print ''; print ''; print "'; $var=!$var; @@ -194,14 +202,7 @@ else print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } print ''; print "\n"; } @@ -215,4 +216,4 @@ else llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php b/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php deleted file mode 100644 index 412545b3f6f..00000000000 --- a/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php +++ /dev/null @@ -1,55 +0,0 @@ -. - */ - -/** - * \file htdocs/core/modules/expedition/methode_expedition_chrono.modules.php - * \ingroup expedition - */ - -include_once "methode_expedition.modules.php"; - -/** - * Class to manage shipment Chronopost - */ -class methode_expedition_chrono extends ModeleShippingMethod -{ - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - function __construct($db=0) - { - $this->db = $db; - $this->id = 8; // Do not change this value - $this->code = "CHRONO"; // Do not change this value - $this->name = "Chronopost"; - $this->description = "Chronopost"; - } - - /** - * Return URL of provider - * - * @param string $tracking_number Tracking number - * @return string URL for tracking - */ - function provider_url_status($tracking_number) - { - return sprintf("http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros=%s",$tracking_number); - } -} - -?> diff --git a/htdocs/core/modules/expedition/methode_expedition_gls.modules.php b/htdocs/core/modules/expedition/methode_expedition_gls.modules.php deleted file mode 100644 index 0fc67831a38..00000000000 --- a/htdocs/core/modules/expedition/methode_expedition_gls.modules.php +++ /dev/null @@ -1,55 +0,0 @@ -. - */ - -/* - * \file htdocs/core/modules/expedition/methode_expedition_gls.modules.php - * \ingroup expedition - */ - -include_once "methode_expedition.modules.php"; - -/** - * Class to manage shipment GLS - */ -class methode_expedition_gls extends ModeleShippingMethod -{ - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - function __construct($db=0) - { - $this->db = $db; - $this->id = 7; // Do not change this value - $this->code = "GLS"; // Do not change this value - $this->name = "GLS"; - $this->description = "General Logistics Systems"; - } - - /** - * Return URL of provider - * - * @param string $tracking_number Tracking number - * @return string URL for tracking - */ - function provider_url_status($tracking_number) - { - return sprintf("http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo=%s",$tracking_number); - } -} - -?> diff --git a/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php b/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php deleted file mode 100644 index 503bacdc421..00000000000 --- a/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php +++ /dev/null @@ -1,55 +0,0 @@ -. - * or see http://www.gnu.org/ - */ - -/* - * \file htdocs/core/modules/expedition/methode_expedition_kiala.modules.php - * \ingroup expedition - */ - -include_once "methode_expedition.modules.php"; - - -Class methode_expedition_kiala extends ModeleShippingMethod - -{ - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - function methode_expedition_kiala($db=0) - { - $this->db = $db; - $this->id = 6; // Do not change this value - $this->code = "KIALA"; // Do not change this value - $this->name = "KIALA"; - $this->description = "KIALA"; - } - - /** - * Return URL of provider - * - * @param string $tracking_number Tracking number - * @return string URL for tracking - */ - function provider_url_status($tracking_number) - { - return sprintf("http://www.kiala.fr/tnt/delivery/%s",$tracking_number); - } -} - -?> diff --git a/htdocs/core/modules/expedition/methode_expedition_ups.modules.php b/htdocs/core/modules/expedition/methode_expedition_ups.modules.php deleted file mode 100644 index 1225b5d7959..00000000000 --- a/htdocs/core/modules/expedition/methode_expedition_ups.modules.php +++ /dev/null @@ -1,54 +0,0 @@ -. - * or see http://www.gnu.org/ - */ - -/* - * \file htdocs/core/modules/expedition/methode_expedition_ups.modules.php - * \ingroup expedition - */ - -include_once "methode_expedition.modules.php"; - - -class methode_expedition_ups extends ModeleShippingMethod -{ - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - function methode_expedition_ups($db=0) - { - $this->db = $db; - $this->id = 5; // Do not change this value - $this->code = "UPS"; // Do not change this value - $this->name = "UPS"; - $this->description = "United Parcel Service"; - } - - /** - * Return URL of provider - * - * @param string $tracking_number Tracking number - * @return string URL for tracking - */ - function provider_url_status($tracking_number) - { - return sprintf("http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1=%s",$tracking_number); - } -} - -?> diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 240d5b8df13..030afdda322 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1181,7 +1181,7 @@ class Expedition extends CommonObject $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - if ($id) $sql.= " WHERE em.rowid=".$id; + if ($id!='') $sql.= " WHERE em.rowid=".$id; $resql = $this->db->query($sql); if ($resql) @@ -1196,8 +1196,6 @@ class Expedition extends CommonObject if ($obj->tracking) { $this->listmeths[$i][tracking] = $obj->tracking; - // editable or hardcoded - $this->listmeths[$i][editable] = 1; } else { @@ -1219,6 +1217,32 @@ class Expedition extends CommonObject } } + /** + * Update/create delivery method. + * @param id $id id method to activate + * @return void + */ + function update_delivery_method($id='') + { + if ($id=='') + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_shipment_mode (rowid, code, libelle, description, tracking)"; + $sql.=" VALUES ('','".$this->update[code]."','".$this->update[libelle]."','".$this->update[description]."','".$this->update[tracking]."')"; + $resql = $this->db->query($sql); + } + else + { + $sql = "UPDATE ".MAIN_DB_PREFIX."c_shipment_mode SET"; + $sql.= " code='".$this->update[code]."'"; + $sql.= ",libelle='".$this->update[libelle]."'"; + $sql.= ",description='".$this->update[description]."'"; + $sql.= ",tracking='".$this->update[tracking]."'"; + $sql.= " WHERE rowid=".$id; + $resql = $this->db->query($sql); + } + + } + /** * Activate delivery method. * @param id $id id method to activate diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index 74b8eaea6ce..a54a392fac7 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -33,8 +33,7 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max','',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (5,'UPS','UPS','United Parcel Service','',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (8,'CHRONO','Chronopost','Chronopost','',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'EDIT','EDITABLE','Transporteur Modifiable','http://www.website.com/dir/{TRACKID}',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (5,'UPS','UPS','United Parcel Service','http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1={TRACKID}',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo={TRACKID}',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (8,'CHRONO','Chronopost','Chronopost','http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros={TRACKID}',0); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index d09e3ac6799..994b0dac14b 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -52,4 +52,9 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES ( INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'CHRONO','Chronopost','Chronopost',0); ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL AFTER description; -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'EDIT','EDITABLE','Transporteur Modifiable','http://www.website.com/dir/{TRACKID}',0); +ALTER TABLE llx_c_shipment_mode MODIFY COLUMN rowid INT(11) NOT NULL AUTO_INCREMENT; + +INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('UPS','UPS','United Parcel Service','http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1={TRACKID}',0); +INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}',0); +INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('GLS','GLS','General Logistics Systems','http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo={TRACKID}',0); +INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('CHRONO','Chronopost','Chronopost','http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros={TRACKID}',0); diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql index 591e3ff9b93..37d2d5f85c1 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql @@ -18,7 +18,7 @@ create table llx_c_shipment_mode ( - rowid integer PRIMARY KEY, + rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, From a237be0d2481aa9d1e7f3a2557812d14c2bc5cec Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:26:39 +0100 Subject: [PATCH 37/76] english language standardization --- .../actions_adherentcard_common.class.php | 4 +-- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/cartes/carte.php | 6 +--- htdocs/adherents/class/adherent.class.php | 15 +++------- htdocs/adherents/cotisations.php | 2 +- htdocs/adherents/document.php | 2 +- htdocs/adherents/fiche.php | 14 ++++----- htdocs/adherents/index.php | 4 +-- htdocs/adherents/ldap.php | 4 +-- htdocs/adherents/liste.php | 10 +++---- htdocs/adherents/type.php | 10 +++---- htdocs/cashdesk/index_verif.php | 4 +-- htdocs/cashdesk/tpl/menu.tpl.php | 2 +- htdocs/categories/categorie.php | 8 ++--- htdocs/categories/viewcat.php | 4 +-- htdocs/comm/contact.php | 2 +- htdocs/comm/mailing/cibles.php | 30 +++++++++---------- htdocs/comm/mailing/fiche.php | 8 ++--- .../install/mysql/migration/3.3.0-3.4.0.sql | 7 +++-- htdocs/user/class/user.class.php | 8 +---- htdocs/user/clicktodial.php | 4 +-- htdocs/user/fiche.php | 26 ++++++++-------- htdocs/user/ldap.php | 4 +-- htdocs/user/note.php | 4 +-- htdocs/user/param_ihm.php | 4 +-- htdocs/user/perms.php | 2 +- 26 files changed, 87 insertions(+), 103 deletions(-) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index c0777275201..e7c07c23b4c 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -364,10 +364,10 @@ abstract class ActionsAdherentCardCommon if ($action == 'create_user') { - // Full firstname and name separated with a dot : firstname.name + // Full firstname and lastname separated with a dot : firstname.lastname include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $login=dol_buildlogin($this->object->lastname, $this->object->prenom); + $login=dol_buildlogin($this->object->lastname, $this->object->firstname); $generated_password=getRandomPassword(''); $password=$generated_password; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 7e124e37e8a..199e2025b47 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -654,7 +654,7 @@ if ($rowid) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.prenom, d.lastname, d.societe,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,"; $sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 490dddbb268..fa3d50ed3d2 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -61,7 +61,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg $arrayofmembers=array(); // requete en prenant que les adherents a jour de cotisation - $sql = "SELECT d.rowid, d.prenom as firstname, d.lastname, d.login, d.societe as company, d.datefin,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,"; $sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.code as country_code, p.libelle as country"; @@ -109,12 +109,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated // For backward compatibility - '%PRENOM%'=>$objp->firstname, - '%LASTNAME%'=>$objp->lastname, '%SOCIETE%'=>$objp->company, - '%ADDRESS%'=>$objp->address, '%CP%'=>$objp->zip, - '%TOWN%'=>$objp->town, '%PAYS%'=>$objp->country, '%ANNEE%'=>$year, '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3b348f027a5..81d746ec9c7 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -45,7 +45,6 @@ class Adherent extends CommonObject var $ref; var $civilite_id; var $firstname; - var $prenom; // deprecated var $lastname; var $login; var $pass; @@ -227,12 +226,8 @@ class Adherent extends CommonObject '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass, // For backward compatibility '%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, - '%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, - '%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, - '%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, - '%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, ); @@ -400,7 +395,7 @@ class Adherent extends CommonObject // Clean parameters $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); - $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom); + $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->firstname); $this->address=($this->address?$this->address:$this->address); $this->zip=($this->zip?$this->zip:$this->cp); $this->town=($this->town?$this->town:$this->town); @@ -421,7 +416,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null"); - $sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null"); + $sql.= ", firstname = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null"); $sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null"); $sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null"); $sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null"); @@ -523,7 +518,6 @@ class Adherent extends CommonObject $luser->civilite_id=$this->civilite_id; $luser->firstname=$this->firstname; $luser->lastname=$this->lastname; - $luser->prenom=$this->firstname; // deprecated $luser->login=$this->user_login; $luser->pass=$this->pass; $luser->societe_id=$this->societe; @@ -1015,7 +1009,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1053,7 +1047,6 @@ class Adherent extends CommonObject $this->ref = $obj->rowid; $this->id = $obj->rowid; $this->civilite_id = $obj->civilite; - $this->prenom = $obj->firstname; // deprecated $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->login = $obj->login; @@ -1813,7 +1806,7 @@ class Adherent extends CommonObject // Member if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname; if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname; - if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom; + if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname; if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login; if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste; diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index b9a02903a15..ad71332eff2 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu if ($msg) print $msg.'
'; // Liste des cotisations -$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe,"; +$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe,"; $sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 589b946a52c..01c4da22ba9 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -163,7 +163,7 @@ if ($id > 0) print '
'; print ''; - // Prenom + // Firstname print ''; print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 1915f260f69..79d41e3525f 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -251,8 +251,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) // Change values $object->civilite_id = trim($_POST["civilite_id"]); - $object->prenom = trim($_POST["prenom"]); // deprecated - $object->firstname = trim($_POST["prenom"]); + $object->firstname = trim($_POST["firstname"]); $object->lastname = trim($_POST["lastname"]); $object->login = trim($_POST["login"]); $object->pass = trim($_POST["pass"]); @@ -408,7 +407,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $typeid=$_POST["typeid"]; $civilite_id=$_POST["civilite_id"]; $lastname=$_POST["lastname"]; - $prenom=$_POST["prenom"]; + $firstname=$_POST["firstname"]; $societe=$_POST["societe"]; $address=$_POST["address"]; $zip=$_POST["zipcode"]; @@ -432,8 +431,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $socid=$_POST["socid"]; $object->civilite_id = $civilite_id; - $object->prenom = $prenom; // deprecated - $object->firstname = $prenom; + $object->firstname = $firstname; $object->lastname = $lastname; $object->societe = $societe; $object->address = $address; @@ -502,7 +500,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; } - if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) { + if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; @@ -821,7 +819,7 @@ else print ''; // Firstname - print ''; + print ''; print ''; // Password @@ -1078,7 +1076,7 @@ else print ''; // Firstname - print ''; + print ''; print ''; // Password diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 263e25fc4ec..9e86de34c58 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -205,7 +205,7 @@ $var=true; */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " a.tms as datem, datefin as date_end_subscription,"; $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; @@ -265,7 +265,7 @@ else */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " datefin as date_end_subscription,"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 7d22a417ba7..86667b20122 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -108,11 +108,11 @@ print ''; -// Nom +// Lastname print ''; print ''; -// Prenom +// Firstname print ''; print ''; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 3332e4f8334..8bab0cab35b 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -40,7 +40,7 @@ $statut=GETPOST("statut"); $search=GETPOST("search"); $search_ref=GETPOST("search_ref"); $search_lastname=GETPOST("search_lastname"); -$search_prenom=GETPOST("search_prenom"); +$search_firstname=GETPOST("search_firstname"); $search_login=GETPOST("search_login"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); @@ -63,7 +63,7 @@ if (GETPOST("button_removefilter")) $search=""; $search_ref=""; $search_lastname=""; - $search_prenom=""; + $search_firstname=""; $search_login=""; $type=""; $search_email=""; @@ -86,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé $now=dol_now(); -$sql = "SELECT d.rowid, d.login, d.lastname, d.prenom as firstname, d.societe as company, d.fk_soc,"; +$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,"; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -103,7 +103,7 @@ if ($sall) { $sql.=" AND ("; if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; - $sql.=" d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.=" d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -122,7 +122,7 @@ if ($search_ref) } if ($search_lastname) { - $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if ($search_login) { diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 4734679131e..f4a60f55cd9 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -405,7 +405,7 @@ if ($rowid > 0) $now=dol_now(); - $sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe, "; + $sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, "; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -415,7 +415,7 @@ if ($rowid > 0) $sql.= " AND t.rowid = ".$adht->id; if ($sall) { - $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.= " AND (d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -427,12 +427,12 @@ if ($rowid > 0) { if (isset($_POST['search']) && $_POST['search'] != '') { - $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')"; + $sql.= " AND (d.firstname LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')"; } } if (! empty($search_lastname)) { - $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if (! empty($search_login)) { @@ -493,7 +493,7 @@ if ($rowid > 0) $param="&rowid=".$rowid; if (! empty($status)) $param.="&status=".$status; if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; - if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname; + if (! empty($search_firstname)) $param.="&search_firstname=".$search_firstname; if (! empty($search_login)) $param.="&search_login=".$search_login; if (! empty($search_email)) $param.="&search_email=".$search_email; if (! empty($filter)) $param.="&filter=".$filter; diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index cd35bc02174..b6dc3cb2046 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -94,8 +94,8 @@ if ( $retour >= 0 ) $_SESSION['uid'] = $tab['rowid']; $_SESSION['uname'] = $username; - $_SESSION['nom'] = $tab['name']; - $_SESSION['prenom'] = $tab['firstname']; + $_SESSION['lastname'] = $tab['lastname']; + $_SESSION['firstname'] = $tab['firstname']; $_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid; $_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid; $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : ''); diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index e43c8527e23..59800fb57c1 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -66,7 +66,7 @@ print ''; // Disconnect -print ''; print ''; - // Nom - print ''; + // Lastname + print ''; print ''; - // Prenom - print ''; + // Firstname + print ''; print ''; // Status diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 20bf2f81eff..f174f5f4a60 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -338,8 +338,8 @@ if ($object->type == 3) print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; } } diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 98f12489fea..e55f88de7aa 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -39,7 +39,7 @@ $offset = $limit * $page ; $type=GETPOST('type', 'alpha'); $search_lastname=GETPOST('search_nom')?GETPOST('search_nom'):GETPOST('search_lastname'); // For backward compatibility -$search_firstname=GETPOST('search_prenom')?GETPOST('search_prenom'):GETPOST('search_firstname'); // For backward compatibility +$search_firstname=GETPOST('search_firstname')?GETPOST('search_firstname'):GETPOST('search_firstname'); // For backward compatibility $search_company=GETPOST('search_societe')?GETPOST('search_societe'):GETPOST('search_company'); // For backward compatibility $contactname=GETPOST('contactname'); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 277fc83fd48..95bb905348f 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -51,8 +51,8 @@ if (! $sortfield) $sortfield="email"; $id=GETPOST('id','int'); $rowid=GETPOST('rowid','int'); $action=GETPOST("action"); -$search_nom=GETPOST("search_nom"); -$search_prenom=GETPOST("search_prenom"); +$search_lastname=GETPOST("search_lastname"); +$search_firstname=GETPOST("search_firstname"); $search_email=GETPOST("search_email"); // Search modules dirs @@ -154,8 +154,8 @@ if ($action == 'delete') if ($_POST["button_removefilter"]) { - $search_nom=''; - $search_prenom=''; + $search_lastname=''; + $search_firstname=''; $search_email=''; } @@ -369,11 +369,11 @@ if ($object->fetch($id) >= 0) print ''; print ''; - $sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type"; + $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.fk_mailing=".$object->id; - if ($search_nom) $sql.= " AND mc.nom LIKE '%".$db->escape($search_nom)."%'"; - if ($search_prenom) $sql.= " AND mc.prenom LIKE '%".$db->escape($search_prenom)."%'"; + if ($search_lastname) $sql.= " AND mc.lastname LIKE '%".$db->escape($search_lastname)."%'"; + if ($search_firstname) $sql.= " AND mc.firstname LIKE '%".$db->escape($search_firstname)."%'"; if ($search_email) $sql.= " AND mc.email LIKE '%".$db->escape($search_email)."%'"; $sql .= $db->order($sortfield,$sortorder); $sql .= $db->plimit($conf->liste_limit+1, $offset); @@ -384,8 +384,8 @@ if ($object->fetch($id) >= 0) $num = $db->num_rows($resql); $parm = "&id=".$object->id; - if ($search_nom) $parm.= "&search_nom=".urlencode($search_nom); - if ($search_prenom) $parm.= "&search_prenom=".urlencode($search_prenom); + if ($search_lastname) $parm.= "&search_lastname=".urlencode($search_lastname); + if ($search_firstname) $parm.= "&search_firstname=".urlencode($search_firstname); if ($search_email) $parm.= "&search_email=".urlencode($search_email); print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$parm,$sortfield,$sortorder,"",$num,$object->nbemail,''); @@ -394,8 +394,8 @@ if ($object->fetch($id) >= 0) print '
'.ucfirst($obj->name).''.ucfirst($obj->lastname).''.ucfirst($obj->firstname).'"; if ($obj->fk_societe) From 5d8dea788c021f0f89b6277e031f2db8ab0b301d Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 14:17:52 +0100 Subject: [PATCH 34/76] fix: change name with lastname --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ac16c30e220..e42a64d80ff 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -139,7 +139,7 @@ class User extends CommonObject $login=trim($login); // Get user - $sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; $sql.= " u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note,"; $sql.= " u.pass, u.pass_crypted, u.pass_temp,"; $sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid,"; From 37cce5d8607eea1fe2149aed8fe0561e624d41d1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 14:31:59 +0100 Subject: [PATCH 35/76] fix: change name with lastname --- htdocs/adherents/fiche.php | 4 ++-- htdocs/core/boxes/box_members.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 3b1102fe31d..1915f260f69 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -253,7 +253,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->civilite_id = trim($_POST["civilite_id"]); $object->prenom = trim($_POST["prenom"]); // deprecated $object->firstname = trim($_POST["prenom"]); - $object->lastname = trim($_POST["nom"]); + $object->lastname = trim($_POST["lastname"]); $object->login = trim($_POST["login"]); $object->pass = trim($_POST["pass"]); @@ -434,7 +434,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->civilite_id = $civilite_id; $object->prenom = $prenom; // deprecated $object->firstname = $prenom; - $object->lastname = $nom; + $object->lastname = $lastname; $object->societe = $societe; $object->address = $address; $object->cp = $zip; // deprecated diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 1692abffe0a..c24a87b1e24 100755 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -78,7 +78,7 @@ class box_members extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT a.rowid, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; + $sql = "SELECT a.rowid, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; $sql.= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,"; $sql.= " t.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as t"; From 9333fdb97f83f4e9120da35d07091bcb13f7a64d Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sat, 23 Feb 2013 15:23:33 +0100 Subject: [PATCH 36/76] WIP : Admin for Carriers --- htdocs/admin/carrier.php | 31 ++++++----- .../methode_expedition_chrono.modules.php | 55 ------------------- .../methode_expedition_gls.modules.php | 55 ------------------- .../methode_expedition_kiala.modules.php | 55 ------------------- .../methode_expedition_ups.modules.php | 54 ------------------ htdocs/expedition/class/expedition.class.php | 30 +++++++++- .../mysql/data/llx_c_shipment_mode.sql | 9 ++- .../install/mysql/migration/3.3.0-3.4.0.sql | 7 ++- .../mysql/tables/llx_c_shipment_mode.sql | 2 +- 9 files changed, 54 insertions(+), 244 deletions(-) delete mode 100644 htdocs/core/modules/expedition/methode_expedition_chrono.modules.php delete mode 100644 htdocs/core/modules/expedition/methode_expedition_gls.modules.php delete mode 100644 htdocs/core/modules/expedition/methode_expedition_kiala.modules.php delete mode 100644 htdocs/core/modules/expedition/methode_expedition_ups.modules.php diff --git a/htdocs/admin/carrier.php b/htdocs/admin/carrier.php index d105dd28e6a..305b3f30529 100644 --- a/htdocs/admin/carrier.php +++ b/htdocs/admin/carrier.php @@ -41,17 +41,25 @@ $object = new Expedition($db); /* * Actions */ -if ($action==setvalue AND $carrier) +//if ($action==setvalue AND $carrier) +if ($action==setvalue) { - //$object->update_delivery_method($carrier); + // need to add check on values + $object->update[code]=GETPOST('code','alpha'); + $object->update[libelle]=GETPOST('libelle','alpha'); + $object->update[description]=GETPOST('description','alpha'); + $object->update[tracking]=GETPOST('tracking','alpha'); + $object->update_delivery_method($carrier); + header("Location: carrier.php"); + exit; } -if ($action==activate_carrier AND $carrier) +if ($action==activate_carrier AND $carrier!='') { $object->activ_delivery_method($carrier); } -if ($action==disable_carrier AND $carrier) +if ($action==disable_carrier AND $carrier!='') { $object->disable_delivery_method($carrier); } @@ -105,7 +113,7 @@ dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); if ($action=='edit_carrier' || $action=='setvalue') { // Carrier Edit - if ($carrier) $object->list_delivery_methods($carrier); + if ($carrier!='') $object->list_delivery_methods($carrier); print_titre($langs->trans("CarrierEdit")); print ''; @@ -131,7 +139,7 @@ if ($action=='edit_carrier' || $action=='setvalue') $var=!$var; print '
'; print $langs->trans("Name").''; - print ''; + print ''; print '
'; - if($object->listmeths[$i][editable] == 1) - { - print ''.img_picto($langs->trans("Edit"),'edit').''; - } - else - { - print ' '; - } + print ''.img_picto($langs->trans("Edit"),'edit').''; print '
'.$langs->trans("Lastname").''.$member->lastname.' 
'.$langs->trans("Firstname").''.$member->firstname.' 
'.$langs->trans("Firstname").'
'.$langs->trans("Firstname").'
'.$langs->trans("Firstname").'firstname).'">
'.$langs->trans("Firstname").'firstname).'">
'; print $form->showrefnav($adh,'id'); print '
'.$langs->trans("Lastname").''.$adh->lastname.' 
'.$langs->trans("Firstname").''.$adh->firstname.' 
'.$langs->trans("UserTitle").''.$member->getCivilityLabel().' 
'.$langs->trans("Lastname").''.$member->nom.' 
'.$langs->trans("Lastname").''.$member->lastname.' 
'.$langs->trans("Firstname").''.$member->prenom.' 
'.$langs->trans("Firstname").''.$member->firstname.' 
'; print $member->getNomUrl(1); print "'.$member->nom."'.$member->prenom."'.$member->lastname."'.$member->firstname."
'; print ''; print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"mc.email",$parm,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"mc.nom",$parm,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.prenom",$parm,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"mc.lastname",$parm,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.firstname",$parm,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("OtherInformations"),$_SERVER["PHP_SELF"],"",$parm,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"],"",$parm,"",'align="center"',$sortfield,$sortorder); @@ -422,11 +422,11 @@ if ($object->fetch($id) >= 0) print ''; // Name print ''; // Firstname print ''; // Other print '"; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; print "\n"; - // Prenom + // Firstname print ''; - print ''; + print ''; print "\n"; print "
'; - print ''; + print ''; print ''; - print ''; + print ''; print ''; @@ -452,8 +452,8 @@ if ($object->fetch($id) >= 0) print "
'.$obj->email.''.$obj->nom.''.$obj->prenom.''.$obj->lastname.''.$obj->firstname.''.$obj->other.''; if (empty($obj->source_id) || empty($obj->source_type)) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 310a48eb935..ef2655ad80c 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -174,7 +174,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') // On choisit les mails non deja envoyes pour ce mailing (statut=0) // ou envoyes en erreur (statut=-1) - $sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type, mc.tag"; + $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type, mc.tag"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$object->id; @@ -209,7 +209,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') $obj = $db->fetch_object($resql); // sendto en RFC2822 - $sendto = str_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">"; + $sendto = str_replace(',',' ',$obj->firstname." ".$obj->lastname)." <".$obj->email.">"; // Make substitutions on topic and body. From (AA=YY;BB=CC;...) we keep YY, CC, ... $other=explode(';',$obj->other); @@ -224,8 +224,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') '__CHECK_READ__' => '', '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', '__MAILTOEMAIL__' => ''.$obj->email.'', - '__LASTNAME__' => $obj->nom, - '__FIRSTNAME__' => $obj->prenom, + '__LASTNAME__' => $obj->lastname, + '__FIRSTNAME__' => $obj->firstname, '__OTHER1__' => $other1, '__OTHER2__' => $other2, '__OTHER3__' => $other3, diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 31715239739..63142254bf3 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -48,9 +48,12 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; -alter table llx_adherent CHANGE COLUMN nom lastname text; +alter table llx_adherent CHANGE COLUMN nom lastname varchar(50); +alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50); alter table llx_adherent CHANGE COLUMN ville town text; -alter table llx_user CHANGE COLUMN name lastname text; +alter table llx_mailing_cibles CHANGE COLUMN nom lastname varchar(50); +alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50); +alter table llx_user CHANGE COLUMN name lastname varchar(50); alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e42a64d80ff..6d7b4fcfb0e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -46,7 +46,6 @@ class User extends CommonObject var $ref_ext; var $ldap_sid; var $search_sid; - var $prenom; // TODO deprecated var $lastname; var $firstname; var $note; @@ -190,7 +189,6 @@ class User extends CommonObject $this->ldap_sid = $obj->ldap_sid; $this->lastname = $obj->name; - $this->prenom = $obj->firstname; // TODO deprecated $this->firstname = $obj->firstname; $this->login = $obj->login; @@ -908,7 +906,6 @@ class User extends CommonObject // Positionne parametres $this->admin = 0; - $this->prenom = $contact->prenom; // TODO deprecated $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; $this->email = $contact->email; @@ -1087,7 +1084,6 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters - $this->prenom = trim($this->prenom); // deprecated $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); $this->login = trim($this->login); @@ -1184,7 +1180,6 @@ class User extends CommonObject if ($result >= 0) { - $adh->prenom=$this->firstname; // deprecated $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; $adh->login=$this->login; @@ -1723,7 +1718,7 @@ class User extends CommonObject /** * Return a link to the user card (with optionnaly the picto) - * Use this->id,this->lastname, this->prenom + * Use this->id,this->lastname, this->firstname * * @param int $withpicto Include picto in link (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul) * @param string $option On what the link point to @@ -1941,7 +1936,6 @@ class User extends CommonObject $this->ref = 'SPECIMEN'; $this->specimen=1; - $this->prenom='SPECIMEN'; // deprecated $this->lastname='DOLIBARR'; $this->firstname='SPECIMEN'; $this->note='This is a note'; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 135f1ccb71b..bd39655b730 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -102,9 +102,9 @@ if ($id > 0) print ''.$fuser->lastname.'
'.$langs->trans("Firstname").''.$fuser->name.''.$fuser->firstname.'
\n"; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 38751435534..79e77debffa 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -175,7 +175,7 @@ if ($action == 'add' && $canadduser) if (! $message) { $object->lastname = $_POST["lastname"]; - $object->firstname = $_POST["prenom"]; + $object->firstname = $_POST["firstname"]; $object->login = $_POST["login"]; $object->admin = $_POST["admin"]; $object->office_phone = $_POST["office_phone"]; @@ -316,7 +316,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->oldcopy=dol_clone($object); $object->lastname = GETPOST("lastname"); - $object->firstname = GETPOST("prenom"); + $object->firstname = GETPOST("firstname"); $object->login = GETPOST("login"); $object->pass = GETPOST("password"); $object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin @@ -546,8 +546,8 @@ if ($action == 'adduserldap') { foreach ($ldapusers as $key => $attribute) { - $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; - $ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; + $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; + $ldap_firstname = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; $ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD]; @@ -708,17 +708,17 @@ if (($action == 'create') || ($action == 'adduserldap')) } print ''; - // Prenom + // Firstname print ''.$langs->trans("Firstname").''; print ''; - if (! empty($ldap_prenom)) + if (! empty($ldap_firstname)) { - print ''; - print $ldap_prenom; + print ''; + print $ldap_firstname; } else { - print ''; + print ''; } print ''; @@ -1087,7 +1087,7 @@ else // Firstname print ''.$langs->trans("Firstname").''; - print ''.$object->prenom.''; + print ''.$object->Firstname.''; print ''."\n"; // Position/Job @@ -1587,12 +1587,12 @@ else print ''; if ($caneditfield && !$object->ldap_sid) { - print ''; + print ''; } else { - print ''; - print $object->prenom; + print ''; + print $object->Firstname; } print ''; diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 837684334b2..50820569979 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -105,9 +105,9 @@ print ''.$langs->trans("Lastname").''; print ''.$fuser->lastname.''; print "\n"; -// Prenom +// Firstname print ''.$langs->trans("Firstname").''; -print ''.$fuser->prenom.''; +print ''.$fuser->firstname.''; print "\n"; // Login diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 13a45f61cb2..421d30cbc7a 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -105,8 +105,8 @@ if ($id) print ''.$langs->trans("Lastname").''.$fuser->lastname.' '; print ''; - // Prenom - print ''.$langs->trans("Firstname").''.$fuser->prenom.' '; + // Firstname + print ''.$langs->trans("Firstname").''.$fuser->firstname.' '; // Login print ''.$langs->trans("Login").''.$fuser->login.' '; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index f389fdaf713..ef620dbd023 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -135,9 +135,9 @@ print ''.$langs->trans("LastName").''; print ''.$fuser->lastname.''; print "\n"; -// Prenom +// FirstName print ''.$langs->trans("FirstName").''; -print ''.$fuser->prenom.''; +print ''.$fuser->firstname.''; print "\n"; print '
'; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index dc6421d886b..1513776e35d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -261,7 +261,7 @@ print ''."\n"; // Firstname print ''.$langs->trans("Firstname").''; -print ''.$fuser->prenom.''; +print ''.$fuser->firstname.''; print ''."\n"; print '
'; From b699b79a15d117e13bae7020ef5fd8533d86ed16 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:36:12 +0100 Subject: [PATCH 38/76] english language standardization --- htdocs/compta/dons/class/don.class.php | 28 +++++++++---------- .../install/mysql/migration/3.3.0-3.4.0.sql | 2 ++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index f2c3a6f0704..4abf60b7cf5 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -39,8 +39,8 @@ class Don extends CommonObject var $ref; var $date; var $amount; - var $prenom; - var $nom; + var $firstname; + var $lastname; var $societe; var $address; var $cp; @@ -181,8 +181,8 @@ class Don extends CommonObject $this->id=0; $this->ref = 'SPECIMEN'; $this->specimen=1; - $this->nom = 'Doe'; - $this->prenom = 'John'; + $this->lastname = 'Doe'; + $this->firstname = 'John'; $this->socid = 1; $this->date = dol_now(); $this->amount = 100; @@ -210,7 +210,7 @@ class Don extends CommonObject if (dol_strlen(trim($this->societe)) == 0) { - if ((dol_strlen(trim($this->nom)) + dol_strlen(trim($this->prenom))) == 0) + if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0) { $error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe."; $err++; @@ -310,8 +310,8 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_paiement"; - $sql.= ", prenom"; - $sql.= ", nom"; + $sql.= ", firstname"; + $sql.= ", lastname"; $sql.= ", societe"; $sql.= ", address"; $sql.= ", cp"; @@ -331,8 +331,8 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaiementid?$this->modepaiementid:"null"); - $sql.= ", '".$this->db->escape($this->prenom)."'"; - $sql.= ", '".$this->db->escape($this->nom)."'"; + $sql.= ", '".$this->db->escape($this->firstname)."'"; + $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; $sql.= ", '".$this->db->escape($this->address)."'"; $sql.= ", '".$this->db->escape($this->zip)."'"; @@ -391,8 +391,8 @@ class Don extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."don SET "; $sql .= "amount = " . price2num($this->amount); $sql .= ",fk_paiement = ".($this->modepaiementid?$this->modepaiementid:"null"); - $sql .= ",prenom = '".$this->db->escape($this->prenom)."'"; - $sql .= ",nom='".$this->db->escape($this->nom)."'"; + $sql .= ",firstname = '".$this->db->escape($this->firstname)."'"; + $sql .= ",lastname='".$this->db->escape($this->lastname)."'"; $sql .= ",societe='".$this->db->escape($this->societe)."'"; $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",cp='".$this->db->escape($this->zip)."'"; @@ -463,7 +463,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,"; - $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; + $sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; $sql.= " p.title as project_label"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet"; @@ -483,8 +483,8 @@ class Don extends CommonObject $this->datec = $this->db->jdate($obj->datec); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); - $this->prenom = $obj->prenom; - $this->nom = $obj->nom; + $this->firstname = $obj->firstname; + $this->lastname = $obj->lastname; $this->societe = $obj->societe; $this->statut = $obj->fk_statut; $this->address = $obj->address; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index f1b05b925e5..3f38d9439a9 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -47,6 +47,8 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; +alter table llx_don CHANGE COLUMN prenom firstname varchar(50); +alter table llx_don CHANGE COLUMN nom lastname varchar(50); alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN nom lastname varchar(50); alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50); From 8d7654916fc16f0aa4eefe2ee308ddc6b961409c Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:46:12 +0100 Subject: [PATCH 39/76] english language standardization --- htdocs/compta/dons/fiche.php | 20 +++++++++---------- htdocs/compta/dons/liste.php | 10 +++++----- htdocs/compta/index.php | 6 +++--- .../class/bonprelevement.class.php | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 9f5d08cdf60..3ffa3847ba3 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -85,8 +85,8 @@ if ($action == 'update') { $don->fetch($id); - $don->prenom = $_POST["prenom"]; - $don->nom = $_POST["nom"]; + $don->firstname = $_POST["firstname"]; + $don->lastname = $_POST["lastname"]; $don->societe = $_POST["societe"]; $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); @@ -137,8 +137,8 @@ if ($action == 'add') if (! $error) { - $don->prenom = $_POST["prenom"]; - $don->nom = $_POST["nom"]; + $don->firstname = $_POST["firstname"]; + $don->lastname = $_POST["lastname"]; $don->societe = $_POST["societe"]; $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); @@ -297,8 +297,8 @@ if ($action == 'create') print "\n"; print "".''.$langs->trans("Company").''; - print "".''.$langs->trans("Firstname").''; - print "".''.$langs->trans("Lastname").''; + print "".''.$langs->trans("Firstname").''; + print "".''.$langs->trans("Lastname").''; print "".''.$langs->trans("Address").''; print ''; @@ -387,8 +387,8 @@ if (! empty($id) && $action == 'edit') $langs->load("companies"); print "".''.$langs->trans("Company").''; - print "".''.$langs->trans("Firstname").''; - print "".''.$langs->trans("Lastname").''; + print "".''.$langs->trans("Firstname").''; + print "".''.$langs->trans("Lastname").''; print "".''.$langs->trans("Address").''; print ''; @@ -483,8 +483,8 @@ if (! empty($id) && $action != 'edit') print "\n"; print "".''.$langs->trans("Company").''.$don->societe.''; - print "".''.$langs->trans("Firstname").''.$don->prenom.''; - print "".''.$langs->trans("Lastname").''.$don->nom.''; + print "".''.$langs->trans("Firstname").''.$don->firstname.''; + print "".''.$langs->trans("Lastname").''.$don->lastname.''; print "".''.$langs->trans("Address").''.dol_nl2br($don->address).''; // Zip / Town diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php index bf96d5243f8..38ad764182d 100644 --- a/htdocs/compta/dons/liste.php +++ b/htdocs/compta/dons/liste.php @@ -60,7 +60,7 @@ llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M $donationstatic=new Don($db); // Genere requete de liste des dons -$sql = "SELECT d.rowid, d.datedon, d.prenom, d.nom, d.societe,"; +$sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,"; $sql.= " d.amount, d.fk_statut as statut, "; $sql.= " p.rowid as pid, p.ref, p.title, p.public"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; @@ -79,7 +79,7 @@ if (trim($search_company) != '') } if (trim($search_name) != '') { - $sql.= ' AND d.nom LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.prenom LIKE \'%'.$db->escape(trim($search_name)) . '%\''; + $sql.= ' AND d.lastname LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.firstname LIKE \'%'.$db->escape(trim($search_name)) . '%\''; } $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); @@ -109,7 +109,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","&page=$page&statut=$statut","","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"d.societe","&page=$page&statut=$statut","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.nom","&page=$page&statut=$statut","","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.lastname","&page=$page&statut=$statut","","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.datedon","&page=$page&statut=$statut","",'align="center"',$sortfield,$sortorder); if (! empty($conf->projet->enabled)) { @@ -154,8 +154,8 @@ if ($resql) print ""; $donationstatic->id=$objp->rowid; $donationstatic->ref=$objp->rowid; - $donationstatic->nom=$objp->nom; - $donationstatic->prenom=$objp->prenom; + $donationstatic->lastname=$objp->lastname; + $donationstatic->firstname=$objp->firstname; print "".$donationstatic->getNomUrl(1)."\n"; print "".$objp->societe."\n"; print "".$donationstatic->getFullName($langs)."\n"; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 281c315eec4..e6a5162b61d 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -512,7 +512,7 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) $langs->load("boxes"); $donationstatic=new Don($db); - $sql = "SELECT d.rowid, d.nom, d.prenom, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut"; + $sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " WHERE d.entity = ".$conf->entity; $sql.= $db->order("d.tms","DESC"); @@ -544,8 +544,8 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) $var=!$var; print ''; $donationstatic->id=$objp->rowid; - $donationstatic->nom=$objp->nom; - $donationstatic->prenom=$objp->prenom; + $donationstatic->lastname=$objp->lastname; + $donationstatic->firstname=$objp->firstname; $label=$donationstatic->getFullName($langs); if ($objp->societe) $label.=($label?' - ':'').$objp->societe; $donationstatic->ref=$label; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 4182e66c919..0c0c55ebf57 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -540,7 +540,7 @@ class BonPrelevement extends CommonObject $this->method_trans = $method; $langs->load('withdrawals'); $subject = $langs->trans("InfoTransSubject", $this->ref); - $message = $langs->trans("InfoTransMessage", $this->ref, $user->prenom, $user->nom); + $message = $langs->trans("InfoTransMessage", $this->ref, $user->firstname, $user->lastname); $message .=$langs->trans("InfoTransData", price($this->amount), $this->methodes_trans[$this->method_trans], dol_print_date($date,'day')); // TODO Call trigger to create a notification using notification module From 382d216d54bd4d6ce0fef9c19a8f0ac0ce0d4670 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:58:26 +0100 Subject: [PATCH 40/76] english language standardization --- .../actions_contactcard_common.class.php | 4 ++-- htdocs/contact/class/contact.class.php | 19 +++++++------------ .../install/mysql/migration/3.3.0-3.4.0.sql | 1 + 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 1bb8a29ad5a..af621b7a53a 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -395,10 +395,10 @@ abstract class ActionsContactCardCommon if ($action == 'create_user') { - // Full firstname and name separated with a dot : firstname.name + // Full firstname and lastname separated with a dot : firstname.lastname include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $login=dol_buildlogin($this->object->nom, $this->object->prenom); + $login=dol_buildlogin($this->object->lastname, $this->object->firstname); $generated_password=getRandomPassword(''); $password=$generated_password; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 17e646b5a8d..9c5ff1a2a6f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -42,7 +42,6 @@ class Contact extends CommonObject var $name; // TODO deprecated var $nom; // TODO deprecated var $firstname; - var $prenom; // TODO deprecated var $address; var $cp; // TODO deprecated var $zip; @@ -110,7 +109,7 @@ class Contact extends CommonObject $this->db->begin(); // Clean parameters - $this->lastname=$this->lastname?trim($this->lastname):$this->name; + $this->lastname=$this->lastname?trim($this->lastname):$this->lastname; $this->firstname=trim($this->firstname); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords($this->lastname); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname); @@ -120,7 +119,7 @@ class Contact extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople ("; $sql.= " datec"; $sql.= ", fk_soc"; - $sql.= ", name"; + $sql.= ", lastname"; $sql.= ", firstname"; $sql.= ", fk_user_creat"; $sql.= ", priv"; @@ -216,7 +215,7 @@ class Contact extends CommonObject $this->id = $id; // Clean parameters - $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->name); + $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); $this->firstname=trim($this->firstname); $this->email=trim($this->email); $this->phone_pro=trim($this->phone_pro); @@ -234,7 +233,7 @@ class Contact extends CommonObject if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; else if ($this->socid == -1) $sql .= " fk_soc=null,"; $sql .= " civilite='".$this->db->escape($this->civilite_id)."'"; - $sql .= ", name='".$this->db->escape($this->lastname)."'"; + $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'"; $sql .= ", cp='".$this->db->escape($this->zip)."'"; @@ -482,7 +481,7 @@ class Contact extends CommonObject $langs->load("companies"); - $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.name as lastname, c.firstname,"; + $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.lastname, c.firstname,"; $sql.= " c.address, c.cp as zip, c.town as town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; @@ -513,11 +512,7 @@ class Contact extends CommonObject $this->ref = $obj->rowid; $this->civilite_id = $obj->civilite_id; $this->lastname = $obj->lastname; - $this->name = $obj->lastname; // TODO deprecated $this->firstname = $obj->firstname; - $this->nom = $obj->lastname; // TODO deprecated - $this->prenom = $obj->firstname; // TODO deprecated - $this->address = $obj->address; $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; @@ -683,7 +678,7 @@ class Contact extends CommonObject $error=0; - $this->old_name = $obj->name; + $this->old_lastname = $obj->lastname; $this->old_firstname = $obj->firstname; $this->db->begin(); @@ -853,7 +848,7 @@ class Contact extends CommonObject /** * Return name of contact with link (and eventually picto) - * Use $this->id, $this->name, $this->firstname, this->civilite_id + * Use $this->id, $this->lastname, $this->firstname, this->civilite_id * * @param int $withpicto Include picto with link * @param string $option Where the link point to diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 3f38d9439a9..8eadd64e931 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -58,6 +58,7 @@ alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50); alter table llx_user CHANGE COLUMN name lastname varchar(50); alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; +alter table llx_socpeople CHANGE COLUMN name lastname varchar(50); alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; From 048035a05b443cb6a6ad009e6f02173ec1173a21 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 16:08:35 +0100 Subject: [PATCH 41/76] english language standardization --- htdocs/contact/fiche.php | 6 +++--- htdocs/contact/list.php | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4151a2f078b..b48236acf03 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -633,7 +633,7 @@ else print $object->ref; print ''; - // Name + // Lastname print ''.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'; print ''.$langs->trans("Firstname").'firstname).'">'; @@ -811,9 +811,9 @@ else if ($action == 'create_user') { - // Full firstname and name separated with a dot : firstname.name + // Full firstname and lastname separated with a dot : firstname.lastname include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $login=dol_buildlogin($object->nom,$object->prenom); + $login=dol_buildlogin($object->lastname,$object->firstname); $generated_password=''; if (! $ldap_sid) // TODO ldap_sid ? diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index fe0187624fe..50853260350 100755 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -35,8 +35,8 @@ $contactid = GETPOST('id','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'contact', $contactid,''); -$search_nom=GETPOST("search_nom"); -$search_prenom=GETPOST("search_prenom"); +$search_lastname=GETPOST("search_lastname"); +$search_firstname=GETPOST("search_firstname"); $search_societe=GETPOST("search_societe"); $search_poste=GETPOST("search_poste"); $search_phone=GETPOST("search_phone"); @@ -87,8 +87,8 @@ if (! empty($text)) $titre.= " $text"; if (GETPOST('button_removefilter')) { - $search_nom=""; - $search_prenom=""; + $search_lastname=""; + $search_firstname=""; $search_societe=""; $search_poste=""; $search_phone=""; @@ -142,13 +142,13 @@ else if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")"; } -if ($search_nom) // filtre sur le nom +if ($search_lastname) // filtre sur le nom { - $sql .= " AND p.name LIKE '%".$db->escape($search_nom)."%'"; + $sql .= " AND p.name LIKE '%".$db->escape($search_lastname)."%'"; } -if ($search_prenom) // filtre sur le prenom +if ($search_firstname) // filtre sur le prenom { - $sql .= " AND p.firstname LIKE '%".$db->escape($search_prenom)."%'"; + $sql .= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'"; } if ($search_societe) // filtre sur la societe { @@ -233,7 +233,7 @@ if ($result) $contactstatic=new Contact($db); $param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); - $param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_nom='.urlencode($search_nom).'&search_prenom='.urlencode($search_prenom).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email); + $param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email); if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv); $num = $db->num_rows($result); @@ -279,10 +279,10 @@ if ($result) // Ligne des champs de filtres print ''; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; From ac0e99bc1a7af555d9f91be046bb4752ce031370 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 16:21:49 +0100 Subject: [PATCH 42/76] english language standardization --- htdocs/core/boxes/box_members.php | 2 +- htdocs/core/class/CMailFile.class.php | 4 ++-- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/lib/company.lib.php | 4 ++-- htdocs/core/modules/mailings/fraise.modules.php | 2 +- htdocs/core/modules/mailings/framboise.modules.php | 2 +- htdocs/core/modules/mailings/modules_mailings.php | 4 ++-- htdocs/core/modules/modAdherent.class.php | 12 ++++++------ htdocs/core/modules/modCategorie.class.php | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index c24a87b1e24..7add5a76939 100755 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -78,7 +78,7 @@ class box_members extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT a.rowid, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; + $sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,"; $sql.= " t.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as t"; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index a9337c87b8b..fd8e38ae3c4 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -85,8 +85,8 @@ class CMailFile * CMailFile * * @param string $subject Topic/Subject of mail - * @param string $to Recipients emails (RFC 2822: "Nom prenom [, ...]" ou "email[, ...]" ou "[, ...]") - * @param string $from Sender email (RFC 2822: "Nom prenom [, ...]" ou "email[, ...]" ou "[, ...]") + * @param string $to Recipients emails (RFC 2822: "Nom firstname [, ...]" ou "email[, ...]" ou "[, ...]") + * @param string $from Sender email (RFC 2822: "Nom firstname [, ...]" ou "email[, ...]" ou "[, ...]") * @param string $msg Message * @param array $filename_list List of files to attach (full path of filename on file system) * @param array $mimetype_list List of MIME type of attached files diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8184e186999..764eb19b66e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -64,7 +64,7 @@ abstract class CommonObject $lastname=$this->lastname; $firstname=$this->firstname; if (empty($lastname)) $lastname=($this->name?$this->name:$this->nom); - if (empty($firstname)) $firstname=$this->prenom; + if (empty($firstname)) $firstname=$this->firstname; $ret=''; if ($option && $this->civilite_id) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 95827872bb7..6dbb0333720 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -769,7 +769,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " a.fk_element, a.elementtype,"; $sql.= " c.code as acode, c.libelle,"; $sql.= " u.login, u.rowid"; - if (get_class($object) == 'Adherent') $sql.= ", m.nom as name, m.prenom as firstname"; + if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname"; if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; @@ -908,7 +908,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " a.fk_user_author, a.fk_contact,"; $sql.= " c.code as acode, c.libelle,"; $sql.= " u.login, u.rowid as user_id"; - if (get_class($object) == 'Adherent') $sql.= ", m.nom as name, m.prenom as firstname"; + if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname"; if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 15897683c55..fda48271159 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -164,7 +164,7 @@ class mailing_fraise extends MailingTargets // La requete doit retourner: id, email, fk_contact, name, firstname $sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, "; - $sql.= " a.nom as name, a.prenom as firstname,"; + $sql.= " a.lastname, a.firstname,"; $sql.= " a.datefin, a.civilite, a.login, a.societe"; // Other fields $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; $sql.= " WHERE a.email IS NOT NULL"; diff --git a/htdocs/core/modules/mailings/framboise.modules.php b/htdocs/core/modules/mailings/framboise.modules.php index 964dbdf8db6..e787f750c47 100644 --- a/htdocs/core/modules/mailings/framboise.modules.php +++ b/htdocs/core/modules/mailings/framboise.modules.php @@ -62,7 +62,7 @@ class mailing_framboise extends MailingTargets $cibles = array(); // Select the members from category - $sql = "SELECT a.rowid as id, a.email as email, a.nom as name, null as fk_contact, a.prenom as firstname,"; + $sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,"; if ($_POST['filter']) $sql.= " c.label"; else $sql.=" null as label"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index ea9a54651a9..573d0987b4c 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -157,14 +157,14 @@ class MailingTargets // This can't be abstract as it is used for some method $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_cibles"; $sql .= " (fk_mailing,"; $sql .= " fk_contact,"; - $sql .= " nom, prenom, email, other, source_url, source_id,"; + $sql .= " lastname, firstname, email, other, source_url, source_id,"; if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) { $sql .= " tag,"; } $sql.= " source_type)"; $sql .= " VALUES (".$mailing_id.","; $sql .= (empty($targetarray['fk_contact']) ? '0' : "'".$targetarray['fk_contact']."'") .","; - $sql .= "'".$this->db->escape($targetarray['name'])."',"; + $sql .= "'".$this->db->escape($targetarray['lastname'])."',"; $sql .= "'".$this->db->escape($targetarray['firstname'])."',"; $sql .= "'".$this->db->escape($targetarray['email'])."',"; $sql .= "'".$this->db->escape($targetarray['other'])."',"; diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index d6122188d4a..17cb7422f4a 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -75,7 +75,7 @@ class modAdherent extends DolibarrModules $this->const[5] = array("ADHERENT_MAIL_VALID_SUBJECT","chaine","Votre adhésion a été validée","Sujet du mail de validation"); $this->const[6] = array("ADHERENT_MAIL_RESIL_SUBJECT","chaine","Résiliation de votre adhésion","Sujet du mail de résiliation"); $this->const[21] = array("ADHERENT_MAIL_FROM","chaine","","From des mails"); - $this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %PRENOM%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation"); + $this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %FIRSTNAME%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation"); $this->const[23] = array("ADHERENT_MAIL_COTIS_SUBJECT","chaine","Reçu de votre cotisation","Sujet du mail de validation de cotisation"); $this->const[25] = array("ADHERENT_CARD_HEADER_TEXT","chaine","%ANNEE%","Texte imprimé sur le haut de la carte adhérent"); $this->const[26] = array("ADHERENT_CARD_FOOTER_TEXT","chaine","Association AZERTY","Texte imprimé sur le bas de la carte adhérent"); @@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='MembersAndSubscriptions'; $this->export_permission[$r]=array(array("adherent","export")); - $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); - $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); - $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); + $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); + $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); + $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields'); $this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); + $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules // End add extra fields $this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); + $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 976a5d97a5d..a9c8b032af8 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -155,9 +155,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->adherent->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("adherent","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.nom'=>'LastName','p.prenom'=>'Firstname'); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:adherent:nom','p.nom'=>'Text','p.prenom'=>'Text'); - $this->export_entities_array[$r]=array('p.rowid'=>'member','p.nom'=>'member','p.prenom'=>'member'); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.lastname'=>'LastName','p.firstname'=>'Firstname'); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:adherent:nom','p.lastname'=>'Text','p.firstname'=>'Text'); + $this->export_entities_array[$r]=array('p.rowid'=>'member','p.lastname'=>'member','p.firstname'=>'member'); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_member as cp, '.MAIN_DB_PREFIX.'adherent as p'; $this->export_sql_end[$r] .=' WHERE u.rowid = cp.fk_categorie AND cp.fk_member = p.rowid'; From 4f9f32eb3e650bb8a098169caec11bf7bbe2d73f Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 16:37:17 +0100 Subject: [PATCH 43/76] english language standardization --- htdocs/holiday/define_holiday.php | 4 ++-- htdocs/holiday/fiche.php | 16 ++++++++-------- htdocs/holiday/index.php | 4 ++-- htdocs/holiday/month_report.php | 2 +- htdocs/projet/tasks/time.php | 4 ++-- htdocs/public/donations/donateurs_code.php | 4 ++-- htdocs/public/members/new.php | 10 +++++----- htdocs/public/members/public_list.php | 10 +++++----- htdocs/societe/soc.php | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 079ecd01e03..e5b609e36d1 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -159,8 +159,8 @@ foreach($listUsers as $users) print ''.$users['rowid'].''; print ''; $userstatic->id=$users['rowid']; - $userstatic->nom=$users['name']; - $userstatic->prenom=$users['firstname']; + $userstatic->lastname=$users['lastname']; + $userstatic->firstname=$users['firstname']; print $userstatic->getNomUrl(1); print ''; print ''; diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index 4e2375acca3..8602163b583 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -288,7 +288,7 @@ if ($action == 'confirm_send') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Veuillez trouver ci-dessous une demande de congés payés à valider.\n"; @@ -319,7 +319,7 @@ if ($action == 'confirm_send') } $message.= "\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; @@ -397,10 +397,10 @@ if($action == 'confirm_valid') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysValidated"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Votre demande de congés payés du ".dol_print_date($cp->date_debut,'day')." au ".dol_print_date($cp->date_fin,'day')." vient d'être validée!\n"; - $message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; @@ -465,11 +465,11 @@ if ($action == 'confirm_refuse') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysRefused"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Votre demande de congés payés ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')." vient d'être refusée pour le motif suivant :\n"; $message.= $_POST['detail_refuse']."\n\n"; - $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; @@ -536,10 +536,10 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysCanceled"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Votre demande de congés ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')." va été annulée.\n"; - $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index 16d2edddf7e..d084c0ce2ef 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -211,12 +211,12 @@ if ($id > 0) print ''; print ''; - // Nom + // LastName print ''.$langs->trans("LastName").''; print ''.$fuser->lastname.''; print "\n"; - // Prenom + // FirstName print ''.$langs->trans("FirstName").''; print ''.$fuser->firstname.''; print "\n"; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 940a870c781..de0ae3a9960 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -126,7 +126,7 @@ if($num == '0') { print ''; print ''.$holidaystatic->getNomUrl(1).''; - print ''.$user->nom.' '.$user->prenom.''; + print ''.$user->lastname.' '.$user->firstname.''; print ''.dol_print_date($start_date,'day'); print ''; print ''.dol_print_date($end_date,'day'); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 19988738e8e..682c46f75a9 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -412,8 +412,8 @@ if ($id > 0 || ! empty($ref)) else { $userstatic->id = $task_time->fk_user; - $userstatic->nom = $task_time->name; - $userstatic->prenom = $task_time->firstname; + $userstatic->lastname = $task_time->lastname; + $userstatic->firstname = $task_time->firstname; print $userstatic->getNomUrl(1); } print ''; diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 508b0c55fcf..f354cffe8a1 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -54,7 +54,7 @@ $langs->load("donations"); llxHeaderVierge(); -$sql = "SELECT d.datedon as datedon, d.nom, d.prenom, d.amount, d.public, d.societe"; +$sql = "SELECT d.datedon as datedon, d.lastname, d.firstname, d.amount, d.public, d.societe"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC"; @@ -84,7 +84,7 @@ if ($resql) print ""; if ($objp->public) { - print "".$objp->prenom." ".$objp->nom." ".$objp->societe."\n"; + print "".$objp->firstname." ".$objp->lastname." ".$objp->societe."\n"; } else { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5d2ef581a7a..078994e3f9a 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -187,7 +187,7 @@ if ($action == 'add') $error+=1; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Lastname"))."
\n"; } - if (empty($_POST["prenom"])) + if (empty($_POST["firstname"])) { $error+=1; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Firstname"))."
\n"; @@ -223,8 +223,8 @@ if ($action == 'add') $adh = new Adherent($db); $adh->statut = -1; $adh->public = $_POST["public"]; - $adh->prenom = $_POST["prenom"]; - $adh->nom = $_POST["nom"]; + $adh->firstname = $_POST["firstname"]; + $adh->lastname = $_POST["lastname"]; $adh->civilite_id = $_POST["civilite_id"]; $adh->societe = $_POST["societe"]; $adh->address = $_POST["address"]; @@ -448,9 +448,9 @@ else print ''.$langs->trans('UserTitle').''; print $formcompany->select_civility(GETPOST('civilite_id'),'civilite_id').''."\n"; // Lastname -print ''.$langs->trans("Lastname").' *'."\n"; +print ''.$langs->trans("Lastname").' *'."\n"; // Firstname -print ''.$langs->trans("Firstname").' *'."\n"; +print ''.$langs->trans("Firstname").' *'."\n"; // Company print ''.$langs->trans("Company").''."\n"; // Address diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 13fced8eda2..00d09e67112 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -101,14 +101,14 @@ if (! $sortfield) { $sortfield="nom"; } llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers")); -$sql = "SELECT rowid, prenom, nom, societe, cp as zip, town, email, naiss, photo"; +$sql = "SELECT rowid, firstname, lastname, societe, cp as zip, town, email, naiss, photo"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent"; $sql.= " WHERE entity = ".$entity; $sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; +//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); @@ -124,8 +124,8 @@ if ($result) print ''; print ''; - print ''."\n"; //print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","naiss",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder); @@ -140,7 +140,7 @@ if ($result) $objp = $db->fetch_object($result); $var=!$var; print ""; - print ''."\n"; + print ''."\n"; //print "\n"; // est-ce nécessaire ?? print ''."\n"; print ''."\n"; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 11056d4381a..c196327e5a2 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -112,11 +112,11 @@ if (empty($reshook)) { $object->particulier = GETPOST("private"); - $object->name = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?GETPOST('prenom').' '.GETPOST('nom'):GETPOST('nom').' '.GETPOST('prenom'); + $object->name = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?GETPOST('firstname').' '.GETPOST('nom'):GETPOST('nom').' '.GETPOST('firstname'); $object->civilite_id = GETPOST('civilite_id'); // Add non official properties $object->name_bis = GETPOST('nom'); - $object->firstname = GETPOST('prenom'); + $object->firstname = GETPOST('firstname'); } else { @@ -748,7 +748,7 @@ else // If javascript on, we show option individual if ($conf->use_javascript_ajax) { - print ''; + print ''; print ''; print ''; From 2a2719d5ebab273bb80363129fefab74ee6a33be Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sat, 23 Feb 2013 16:54:41 +0100 Subject: [PATCH 44/76] WIP : Carrier Admin sql data migration --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 5 ----- 1 file changed, 5 deletions(-) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 994b0dac14b..e188a7df37b 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -46,11 +46,6 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'UPS','UPS','United Parcel Service',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'GLS','GLS','General Logistics Systems',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'CHRONO','Chronopost','Chronopost',0); - ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL AFTER description; ALTER TABLE llx_c_shipment_mode MODIFY COLUMN rowid INT(11) NOT NULL AUTO_INCREMENT; From c9f91a608298b39638f45a1f3ea8d39965bc3fc1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 17:01:10 +0100 Subject: [PATCH 45/76] english language standardization --- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/listactions.php | 2 +- htdocs/core/boxes/box_contacts.php | 2 +- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/lib/company.lib.php | 4 ++-- htdocs/core/modules/mailings/contacts2.modules.php | 6 +++--- htdocs/core/modules/mailings/contacts3.modules.php | 4 ++-- htdocs/societe/canvas/individual/tpl/card_create.tpl.php | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index de55231f101..2a46dbbbae3 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -454,7 +454,7 @@ else if ($showbirthday) { // Add events in array - $sql = 'SELECT sp.rowid, sp.name, sp.firstname, sp.birthday'; + $sql = 'SELECT sp.rowid, sp.lastname, sp.firstname, sp.birthday'; $sql.= ' FROM '.MAIN_DB_PREFIX.'socpeople as sp'; $sql.= ' WHERE (priv=0 OR (priv=1 AND fk_user_creat='.$user->id.'))'; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index b25a955abd0..7648c3db989 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -152,7 +152,7 @@ $sql.= " c.code as acode, c.libelle,"; $sql.= " ua.login as loginauthor, ua.rowid as useridauthor,"; $sql.= " ut.login as logintodo, ut.rowid as useridtodo,"; $sql.= " ud.login as logindone, ud.rowid as useriddone,"; -$sql.= " sp.name, sp.firstname"; +$sql.= " sp.lastname, sp.firstname"; $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,"; $sql.= " ".MAIN_DB_PREFIX.'user as u,'; $sql.= " ".MAIN_DB_PREFIX."actioncomm as a)"; diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 2bbd8f8bf11..99f7560a15e 100755 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -61,7 +61,7 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT sp.rowid, sp.name, sp.firstname, sp.civilite, sp.datec, sp.tms, sp.fk_soc,"; + $sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.civilite, sp.datec, sp.tms, sp.fk_soc,"; $sql.= " s.nom as socname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 76dcc96197f..72ae2f8a1af 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -860,7 +860,7 @@ class Form $out=''; // On recherche les societes - $sql = "SELECT sp.rowid, sp.name as name, sp.firstname, sp.poste"; + $sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.poste"; if ($showsoc > 0) { $sql.= " , s.nom as company"; } @@ -870,7 +870,7 @@ class Form } $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; if ($socid > 0) $sql.= " AND sp.fk_soc=".$socid; - $sql.= " ORDER BY sp.name ASC"; + $sql.= " ORDER BY sp.lastname ASC"; dol_syslog(get_class($this)."::select_contacts sql=".$sql); $resql=$this->db->query($sql); diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 6dbb0333720..c3baf7a28a0 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -770,7 +770,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " c.code as acode, c.libelle,"; $sql.= " u.login, u.rowid"; if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname"; - if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname"; + if (get_class($object) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; if (get_class($object) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; @@ -909,7 +909,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " c.code as acode, c.libelle,"; $sql.= " u.login, u.rowid as user_id"; if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname"; - if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname"; + if (get_class($object) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; if (get_class($object) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; diff --git a/htdocs/core/modules/mailings/contacts2.modules.php b/htdocs/core/modules/mailings/contacts2.modules.php index 256522a6527..21f884f1180 100755 --- a/htdocs/core/modules/mailings/contacts2.modules.php +++ b/htdocs/core/modules/mailings/contacts2.modules.php @@ -78,7 +78,7 @@ class mailing_contacts2 extends MailingTargets // La requete doit retourner: id, email, fk_contact, name, firstname, other $sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,"; - $sql.= " sp.name as name, sp.firstname as firstname, sp.civilite,"; + $sql.= " sp.lastname, sp.firstname as firstname, sp.civilite,"; $sql.= " s.nom as companyname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,"; $sql.= " ".MAIN_DB_PREFIX."societe as s"; @@ -88,7 +88,7 @@ class mailing_contacts2 extends MailingTargets //$sql.= " AND sp.poste != ''"; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$filtersarray[0]."'"; - $sql.= " ORDER BY sp.name, sp.firstname"; + $sql.= " ORDER BY sp.lastname, sp.firstname"; $resql = $this->db->query($sql); if ($resql) { @@ -100,7 +100,7 @@ class mailing_contacts2 extends MailingTargets $target[] = array( 'email' => $obj->email, 'fk_contact' => $obj->fk_contact, - 'name' => $obj->name, + 'lastname' => $obj->lastname, 'firstname' => $obj->firstname, 'other' => ($langs->transnoentities("ThirdParty").'='.$obj->companyname).';'. diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index 9baca3fb080..10afb1dd10f 100755 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -77,7 +77,7 @@ class mailing_contacts3 extends MailingTargets // La requete doit retourner: id, email, fk_contact, name, firstname, other $sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,"; - $sql.= " sp.name as name, sp.firstname as firstname, sp.civilite,"; + $sql.= " sp.lastname, sp.firstname, sp.civilite,"; $sql.= " s.nom as companyname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,"; $sql.= " ".MAIN_DB_PREFIX."societe as s"; @@ -90,7 +90,7 @@ class mailing_contacts3 extends MailingTargets if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid"; if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_societe = sp.fk_soc"; if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'"; - $sql.= " ORDER BY sp.name, sp.firstname"; + $sql.= " ORDER BY sp.lastname, sp.firstname"; $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index d889db81ab9..96371b66092 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -59,7 +59,7 @@ - + From 6adc9eb7f23beebc632016e8fb820c35937987d5 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 17:40:28 +0100 Subject: [PATCH 46/76] english language standardization --- htdocs/admin/prelevement.php | 2 +- htdocs/bookmarks/liste.php | 4 ++-- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/comm/bookmark.php | 4 ++-- htdocs/compta/deplacement/index.php | 2 +- htdocs/compta/deplacement/list.php | 4 ++-- htdocs/compta/facture/prelevement.php | 4 ++-- htdocs/compta/index.php | 2 +- htdocs/compta/stats/cabyuser.php | 2 +- htdocs/core/modules/modDeplacement.class.php | 6 +++--- htdocs/core/modules/modUser.class.php | 6 +++--- htdocs/fourn/commande/history.php | 2 +- htdocs/fourn/commande/index.php | 2 +- htdocs/holiday/class/holiday.class.php | 8 ++++---- htdocs/holiday/month_report.php | 2 +- htdocs/projet/tasks/time.php | 2 +- htdocs/societe/class/societe.class.php | 2 +- htdocs/societe/commerciaux.php | 4 ++-- htdocs/user/class/user.class.php | 2 +- htdocs/user/home.php | 2 +- htdocs/user/index.php | 2 +- 21 files changed, 33 insertions(+), 33 deletions(-) diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index de4d80bee61..c079e5a8d72 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -233,7 +233,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''; } // List of current notifications for objet_type='withdraw' -$sql = "SELECT u.name, u.firstname"; +$sql = "SELECT u.lastname, u.firstname"; $sql.= ", nd.rowid, ad.code, ad.label"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."notify_def as nd"; diff --git a/htdocs/bookmarks/liste.php b/htdocs/bookmarks/liste.php index 2498974f7ba..371870047d9 100644 --- a/htdocs/bookmarks/liste.php +++ b/htdocs/bookmarks/liste.php @@ -70,7 +70,7 @@ print_fiche_titre($langs->trans("Bookmarks")); if ($mesg) print $mesg; $sql = "SELECT b.fk_soc as rowid, b.dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; -$sql.= " u.login, u.name, u.firstname"; +$sql.= " u.login, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid"; $sql.= " WHERE 1=1"; if (! $user->admin) $sql.= " AND (b.fk_user = ".$user->id." OR b.fk_user is NULL OR b.fk_user = 0)"; @@ -91,7 +91,7 @@ if ($resql) print_liste_field_titre($langs->trans("Title"),'','').""; print_liste_field_titre($langs->trans("Link"),'','').""; print_liste_field_titre($langs->trans("Target"),'','','','','align="center"').""; - print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.name","","",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.lastname","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Position"),$_SERVER["PHP_SELF"],"b.position","","",'align="right"',$sortfield,$sortorder); print_liste_field_titre('','',''); diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 95da4f0e34b..cf3be8898d7 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -874,7 +874,7 @@ class ActionComm extends CommonObject $sql.= " a.fk_contact, a.percent as percentage,"; $sql.= " a.fk_element, a.elementtype,"; $sql.= " a.priority, a.fulldayevent, a.location,"; - $sql.= " u.firstname, u.name,"; + $sql.= " u.firstname, u.lastname,"; $sql.= " s.nom as socname,"; $sql.= " c.id as type_id, c.code as type_code, c.libelle"; $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; diff --git a/htdocs/comm/bookmark.php b/htdocs/comm/bookmark.php index dedfcec4ddd..8baa4678510 100644 --- a/htdocs/comm/bookmark.php +++ b/htdocs/comm/bookmark.php @@ -87,7 +87,7 @@ if ($_GET["action"] == 'delete') print_fiche_titre($langs->trans("Bookmarks")); -$sql = "SELECT s.rowid, s.nom, b.dateb as dateb, b.rowid as bid, b.fk_user, b.url, b.target, u.name, u.firstname"; +$sql = "SELECT s.rowid, s.nom, b.dateb as dateb, b.rowid as bid, b.fk_user, b.url, b.target, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE b.fk_soc = s.rowid AND b.fk_user=u.rowid"; if (! $user->admin) $sql.= " AND b.fk_user = ".$user->id; @@ -108,7 +108,7 @@ if ($resql) print ""; //print ""; print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"],"bid","","",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.name","","","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.lastname","","","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Url"),$_SERVER["PHP_SELF"],"b.url","","",'',$sortfield,$sortorder); diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index bbb90ac386a..a4c59834529 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -131,7 +131,7 @@ $max=10; $langs->load("boxes"); -$sql = "SELECT u.rowid as uid, u.name, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; +$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE u.rowid = d.fk_user"; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 19a7d831191..330f493e6ba 100755 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -62,7 +62,7 @@ llxHeader(); $sql = "SELECT s.nom, s.rowid as socid,"; // Ou $sql.= " d.rowid, d.type, d.dated as dd, d.km,"; // Comment $sql.= " d.fk_statut,"; -$sql.= " u.name, u.firstname"; // Qui +$sql.= " u.lastname, u.firstname"; // Qui $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."deplacement as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON d.fk_soc = s.rowid"; @@ -93,7 +93,7 @@ if ($resql) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","","&socid=$socid",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"d.type","","&socid=$socid",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.dated","","&socid=$socid",'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"u.name","","&socid=$socid",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"u.lastname","","&socid=$socid",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socid=$socid",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("FeesKilometersOrAmout"),$_SERVER["PHP_SELF"],"d.km","","&socid=$socid",'align="right"',$sortfield,$sortorder); print_liste_field_titre('',$_SERVER["PHP_SELF"], ''); diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 83b99e4b8fe..e4f5ed4cc25 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -425,7 +425,7 @@ if ($object->id > 0) $sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande"; $sql .= " , pfd.date_traite as date_traite"; $sql .= " , pfd.amount"; - $sql .= " , u.rowid as user_id, u.name, u.firstname, u.login"; + $sql .= " , u.rowid as user_id, u.lastname, u.firstname, u.login"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " , ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE fk_facture = ".$object->id; @@ -516,7 +516,7 @@ if ($object->id > 0) $sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande,"; $sql.= " pfd.date_traite, pfd.fk_prelevement_bons, pfd.amount,"; $sql.= " pb.ref,"; - $sql.= " u.rowid as user_id, u.name, u.firstname, u.login"; + $sql.= " u.rowid as user_id, u.lastname, u.firstname, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd,"; $sql.= " ".MAIN_DB_PREFIX."prelevement_bons as pb,"; $sql.= " ".MAIN_DB_PREFIX."user as u"; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index e6a5162b61d..7250c028b87 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -576,7 +576,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) $langs->load("boxes"); - $sql = "SELECT u.rowid as uid, u.name, u.firstname, d.fk_statut, d.rowid, d.dated as date, d.tms as dm, d.km"; + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.fk_statut, d.rowid, d.dated as date, d.tms as dm, d.km"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE u.rowid = d.fk_user"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 3e0afb9966f..a8bc8b56e64 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -159,7 +159,7 @@ else } $sql.= " AND f.entity = ".$conf->entity; if ($socid) $sql.= " AND f.fk_soc = ".$socid; -$sql .= " GROUP BY u.rowid, u.name, u.firstname"; +$sql .= " GROUP BY u.rowid, u.lastname, u.firstname"; $sql .= " ORDER BY u.rowid"; $result = $db->query($sql); diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index 8484ae9d0b6..2fd50a5e520 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -120,9 +120,9 @@ class modDeplacement extends DolibarrModules $this->export_code[$r]='trips_'.$r; $this->export_label[$r]='ListTripsAndExpenses'; $this->export_permission[$r]=array(array("deplacement","export")); - $this->export_fields_array[$r]=array('u.login'=>'Login','u.name'=>'Lastname','u.firstname'=>'Firstname','d.rowid'=>"TripId",'d.type'=>"Type",'d.km'=>"FeesKilometersOrAmout",'d.dated'=>"Date",'d.note'=>'NotePrivate','d.note_public'=>'NotePublic','s.nom'=>'ThirdParty'); - $this->export_TypeFields_array[$r]=array('u.rowid'=>'List:user:name','u.login'=>'Text','u.name'=>'Text','u.firstname'=>'Text','d.type'=>"Text",'d.km'=>"Number",'d.dated'=>"Date",'d.note'=>'Text','d.note_public'=>'Text','s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text'); - $this->export_entities_array[$r]=array('u.login'=>'user','u.name'=>'user','u.firstname'=>'user','d.rowid'=>"trip",'d.type'=>"trip",'d.km'=>"trip",'d.dated'=>"trip",'d.note'=>'trip','d.note_public'=>'trip','s.nom'=>'company'); + $this->export_fields_array[$r]=array('u.login'=>'Login','u.lastname'=>'Lastname','u.firstname'=>'Firstname','d.rowid'=>"TripId",'d.type'=>"Type",'d.km'=>"FeesKilometersOrAmout",'d.dated'=>"Date",'d.note'=>'NotePrivate','d.note_public'=>'NotePublic','s.nom'=>'ThirdParty'); + $this->export_TypeFields_array[$r]=array('u.rowid'=>'List:user:name','u.login'=>'Text','u.lastname'=>'Text','u.firstname'=>'Text','d.type'=>"Text",'d.km'=>"Number",'d.dated'=>"Date",'d.note'=>'Text','d.note_public'=>'Text','s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text'); + $this->export_entities_array[$r]=array('u.login'=>'user','u.lastname'=>'user','u.firstname'=>'user','d.rowid'=>"trip",'d.type'=>"trip",'d.km'=>"trip",'d.dated'=>"trip",'d.note'=>'trip','d.note_public'=>'trip','s.nom'=>'company'); $this->export_dependencies_array[$r]=array('trip'=>'d.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index fc769e1bf6f..257f37c5411 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -209,10 +209,10 @@ class modUser extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs'; $this->export_permission[$r]=array(array("user","user","export")); - $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Telephone','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.fk_member'=>"MemberId"); - $this->export_TypeFields_array[$r]=array('u.login'=>"Text",'u.name'=>"Text",'u.firstname'=>"Text",'u.office_phone'=>'Text','u.office_fax'=>'Text','u.email'=>'Text','u.datec'=>"Date",'u.tms'=>"Date",'u.admin'=>"Boolean",'u.statut'=>'Status','u.note'=>"Text",'u.datelastlogin'=>'Date','u.datepreviouslogin'=>'Date','u.fk_societe'=>"List:societe:nom:rowid",'u.fk_member'=>"List:adherent:nom"); + $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.lastname'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Telephone','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.fk_member'=>"MemberId"); + $this->export_TypeFields_array[$r]=array('u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.office_phone'=>'Text','u.office_fax'=>'Text','u.email'=>'Text','u.datec'=>"Date",'u.tms'=>"Date",'u.admin'=>"Boolean",'u.statut'=>'Status','u.note'=>"Text",'u.datelastlogin'=>'Date','u.datepreviouslogin'=>'Date','u.fk_societe'=>"List:societe:nom:rowid",'u.fk_member'=>"List:adherent:nom"); - $this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.name'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.fk_member'=>"member"); + $this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.lastname'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.fk_member'=>"member"); if (empty($conf->adherent->enabled)) { unset($this->export_fields_array[$r]['u.fk_member']); diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index ff2112deecd..80a68650d48 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -133,7 +133,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - $sql = "SELECT l.fk_statut, l.datelog as dl, l.comment, u.rowid, u.login, u.firstname, u.name"; + $sql = "SELECT l.fk_statut, l.datelog as dl, l.comment, u.rowid, u.login, u.firstname, u.lastname"; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_log as l"; $sql.= " , ".MAIN_DB_PREFIX."user as u "; $sql.= " WHERE l.fk_commande = ".$commande->id; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 969572e5615..bfb22597be7 100755 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -245,7 +245,7 @@ if (! empty($conf->fournisseur->enabled)) /* * List of users allowed */ -$sql = "SELECT u.rowid, u.name, u.firstname"; +$sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u,"; $sql.= " ".MAIN_DB_PREFIX."user_rights as ur"; $sql.= ", ".MAIN_DB_PREFIX."rights_def as rd"; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 9c20caed835..1fe3dac3d64 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -364,7 +364,7 @@ class Holiday extends CommonObject $sql.= " cp.fk_user_cancel,"; $sql.= " cp.detail_refuse,"; - $sql.= " uu.name as user_lastname,"; + $sql.= " uu.lastname as user_lastname,"; $sql.= " uu.firstname as user_firstname,"; $sql.= " ua.name as validator_lastname,"; @@ -1116,7 +1116,7 @@ class Holiday extends CommonObject // Si c'est pour les utilisateurs de Dolibarr if($type) { - $sql = "SELECT u.rowid, u.name, u.firstname"; + $sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE statut > '0'"; @@ -1155,7 +1155,7 @@ class Holiday extends CommonObject // Si c'est pour les utilisateurs du module Congés Payés } else { - $sql = "SELECT cpu.fk_user, u.name, u.firstname"; + $sql = "SELECT cpu.fk_user, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu,"; $sql.= " ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE cpu.fk_user = u.rowid"; @@ -1232,7 +1232,7 @@ class Holiday extends CommonObject $listUsersCP = $this->fetchUsers(true,false); // On séléctionne les utilisateurs qui ne sont pas déjà dans le module - $sql = "SELECT u.rowid, u.name, u.firstname"; + $sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.rowid NOT IN(".$listUsersCP.")"; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index de0ae3a9960..5e71a08fe9d 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -66,7 +66,7 @@ $sql.= " LEFT JOIN llx_user u ON cp.fk_user = u.rowid"; $sql.= " WHERE cp.statut = 3"; // Approved // TODO Use BETWEEN instead of date_format $sql.= " AND (date_format(cp.date_debut, '%Y-%m') = '$year-$month' OR date_format(cp.date_fin, '%Y-%m') = '$year-$month')"; -$sql.= " ORDER BY u.name,cp.date_debut"; +$sql.= " ORDER BY u.lastname,cp.date_debut"; $result = $db->query($sql); $num = $db->num_rows($result); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 682c46f75a9..a97de4f9f4f 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -344,7 +344,7 @@ if ($id > 0 || ! empty($ref)) * List of time spent */ $sql = "SELECT t.rowid, t.task_date, t.task_duration, t.fk_user, t.note"; - $sql.= ", u.name, u.firstname"; + $sql.= ", u.lastname, u.firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql .= " , ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE t.fk_task =".$object->id; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b73902851db..72ae2b04922 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1314,7 +1314,7 @@ class Societe extends CommonObject $reparray=array(); - $sql = "SELECT u.rowid, u.name, u.firstname"; + $sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.rowid = sc.fk_user AND sc.fk_soc =".$this->id; $sql.= " AND entity in (0, ".$conf->entity.")"; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 3636a1cb35a..7156d7e8cd9 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -141,7 +141,7 @@ if ($_GET["socid"]) print ''; print '
'.$langs->trans("Firstname").''; - print ' '.$langs->trans("Lastname").''; + print ''.$langs->trans("Firstname").''; + print ' '.$langs->trans("Lastname").''; print ' / '.$langs->trans("Company").'
'.$objp->prenom.' '.$objp->nom.($objp->societe?' / '.$objp->societe:'').''.$objp->firstname.' '.$objp->lastname.($objp->societe?' / '.$objp->societe:'').'$objp->naiss'.$objp->email.''.$objp->zip.'
'.$langs->trans('FirstName').'
'.$langs->trans('FirstName').' 
'.$langs->trans("UserTitle").''; print $formcompany->select_civility($object->civility_id).'
trans('FirstName'); ?>  
 '.$langs->trans("Comment").'
'.$langs->trans("SalesRepresentatives").''; - $sql = "SELECT u.rowid, u.name, u.firstname"; + $sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE sc.fk_soc =".$soc->id; @@ -196,7 +196,7 @@ if ($_GET["socid"]) $langs->load("users"); $title=$langs->trans("ListOfUsers"); - $sql = "SELECT u.rowid, u.name, u.firstname, u.login"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; $sql.= " ORDER BY u.lastname ASC "; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 6d7b4fcfb0e..5008f51159c 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2179,7 +2179,7 @@ class User extends CommonObject $this->load_parentof(); // Init $this->users array - $sql = "SELECT DISTINCT u.rowid, u.firstname, u.name, u.fk_user, u.login, u.statut"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut"; // Distinct reduce pb with old tables with duplicates $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 7de26d6f011..ac18fe56c20 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -95,7 +95,7 @@ print ''; */ $max=10; -$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.login, u.fk_societe, u.datec, u.statut, u.entity, u.ldap_sid,"; +$sql = "SELECT u.rowid, u.lastname, u.firstname, u.admin, u.login, u.fk_societe, u.datec, u.statut, u.entity, u.ldap_sid,"; $sql.= " s.nom, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid"; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 1c1de4c0ccc..0713e3cb226 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -65,7 +65,7 @@ llxHeader('',$langs->trans("ListOfUsers")); print_fiche_titre($langs->trans("ListOfUsers"), ''); -$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.fk_societe, u.login,"; +$sql = "SELECT u.rowid, u.lastname, u.firstname, u.admin, u.fk_societe, u.login,"; $sql.= " u.datec,"; $sql.= " u.tms as datem,"; $sql.= " u.datelastlogin,"; From c62f87380c6448c55c1a8d31a703a5426a87ef79 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 02:41:46 +0100 Subject: [PATCH 47/76] Qual: use div instead of table --- htdocs/core/tpl/login.tpl.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 60e8f79274c..3452fbe9e86 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -190,9 +190,9 @@ if ($forgetpasslink || $helpcenterlink) { -
+
-
+ @@ -200,10 +200,9 @@ if ($forgetpasslink || $helpcenterlink) { -
-
+
-

+
From d786e8ca6e38e2d72a8b6c7c175be695cbb6c608 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 02:42:37 +0100 Subject: [PATCH 48/76] Code comment --- htdocs/core/class/translate.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index ae4e2fd2e8f..2110b68d388 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -61,7 +61,7 @@ class Translate /** * Set accessor for this->defaultlang * - * @param string $srclang Language to use + * @param string $srclang Language to use. If '' or 'auto', we use browser lang. * @return void */ function setDefaultLang($srclang='en_US') From d31306609cdc66924190b4564b9b0d085ae227af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 02:47:30 +0100 Subject: [PATCH 49/76] Fix: Bad translation if error --- htdocs/main.inc.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index caec4de00ae..bb4819010ae 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -301,7 +301,7 @@ if (! empty($_SESSION["disablemodules"])) /* * Phase authentication / login -*/ + */ $login=''; if (! defined('NOLOGIN')) { @@ -384,10 +384,18 @@ if (! defined('NOLOGIN')) if ($dolibarr_main_authentication == 'forceuser' && ! empty($dolibarr_auto_user)) $goontestloop=true; if (GETPOST("username","alpha",2) || ! empty($_COOKIE['login_dolibarr']) || GETPOST('openid_mode','alpha',1)) $goontestloop=true; + $langcode=(GETPOST('lang')?((is_object($langs)&&$langs->defaultlang)?$langs->defaultlang:'auto'):GETPOST('lang')); + if (! is_object($langs)) // This can occurs when calling page with NOREQUIRETRAN defined, however we need lang for error messages. + { + include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; + $langs=new Translate("",$conf); + } + $langs->setDefaultLang($langcode); + if ($test && $goontestloop) { - $login = checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmode); - if ($login) + $login = checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmode); + if ($login) { $dol_authmode=$conf->authmode; // This properties is defined only when logged to say what mode was successfully used $dol_tz=$_POST["tz"]; @@ -434,11 +442,6 @@ if (! defined('NOLOGIN')) if (! $login) { // We show login page - if (! is_object($langs)) // This can occurs when calling page with NOREQUIRETRAN defined - { - include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; - $langs=new Translate("",$conf); - } dol_loginfunction($langs,$conf,(! empty($mysoc)?$mysoc:'')); exit; } From d3c2d088a9c52619a0b871ddad1da9800975b380 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 02:55:25 +0100 Subject: [PATCH 50/76] New: Add url to get menu only. Work on progress. --- htdocs/core/getmenu_jmobile.php | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 htdocs/core/getmenu_jmobile.php diff --git a/htdocs/core/getmenu_jmobile.php b/htdocs/core/getmenu_jmobile.php new file mode 100644 index 00000000000..f9bf587db2b --- /dev/null +++ b/htdocs/core/getmenu_jmobile.php @@ -0,0 +1,62 @@ + + * + * This file is a modified version of datepicker.php from phpBSM to fix some + * bugs, to add new features and to dramatically increase speed. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/getmenu_jmobile.php + * \brief File to return menu + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); +//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); + +require_once '../main.inc.php'; + +if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php +$langs->load("main"); +$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); +$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); + +//var_dump($langs->defaultlang); +//var_dump($conf->format_date_short_java); +//var_dump($langs->trans("FormatDateShortJava")); + + + +/* + * View + */ + +// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests +top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); + +print ''."\n"; + +print 'zzz'."\n"; + +print ''."\n"; + +?> From 50de5a944a6fba1e319ffad37175b58cce203feb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 03:29:03 +0100 Subject: [PATCH 51/76] Fix: compatibility with new menu manager --- htdocs/core/class/conf.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 685dfa93b9a..2ea053062b0 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -218,10 +218,10 @@ class Conf $this->bank->cheque = new stdClass(); // Clean some variables - if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php"; - if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_frontoffice.php"; - if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="eldy_backoffice.php"; // Use eldy by default because smartphone does not work on all phones - if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="eldy_frontoffice.php"; // Ue eldy by default because smartphone does not work on all phones + if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_menu.php"; + if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_menu.php"; + if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones + if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones // Variable globales LDAP if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME=''; From 08bde6faa5864ef9e42ad4eb121125e52d57b6f2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 03:45:19 +0100 Subject: [PATCH 52/76] Fix: Do not load menu when not required. --- htdocs/core/class/menubase.class.php | 8 ++-- htdocs/main.inc.php | 55 ++++++++++++++-------------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 549b5b8f956..4ae86208292 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -494,7 +494,7 @@ class Menubase /** * Load entries found in database into variable $tabMenu. Note that only "database menu entries" are loaded here, hardcoded will not be present into output. * - * @param string $mymainmenu Value for left that defined mainmenu + * @param string $mymainmenu Value for mainmenu that defined mainmenu * @param string $myleftmenu Value for left that defined leftmenu * @param int $type_user Looks for menu entry for 0=Internal users, 1=External users * @param string $menu_handler Name of menu_handler used ('auguria', 'eldy'...) @@ -584,7 +584,7 @@ class Menubase } //$tmp4=dol_microtime_float(); //print '>>> 3 '.($tmp4 - $tmp3).'
'; - + // We complete tabMenu $tabMenu[$b]['rowid'] = $menu['rowid']; $tabMenu[$b]['module'] = $menu['module']; @@ -606,10 +606,10 @@ class Menubase $tabMenu[$b]['fk_mainmenu'] = $menu['fk_mainmenu']; $tabMenu[$b]['fk_leftmenu'] = $menu['fk_leftmenu']; $tabMenu[$b]['position'] = $menu['position']; - + $b++; } - + $a++; } $this->db->free($resql); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bb4819010ae..10d67ff3a64 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -768,41 +768,42 @@ if (! empty($conf->multicompany->enabled) && GETPOST('action') == 'switchentity' } } -//print 'eee'.$conf->standard_menu; // Init menu manager -if (empty($user->societe_id)) // If internal user or not defined +if (! defined('NOREQUIREMENU')) { - $conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED); - $conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENU_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENU_SMARTPHONE):$conf->global->MAIN_MENU_SMARTPHONE_FORCED); -} -else // If external user -{ - $conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED); - $conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENUFRONT_SMARTPHONE):$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED); -} - -// Load the menu manager (only if not already done) -$file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu; -if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php -if (! class_exists('MenuManager')) -{ - $menufound=0; - $dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']); - foreach($dirmenus as $dirmenu) + if (empty($user->societe_id)) // If internal user or not defined { - $menufound=dol_include_once($dirmenu."standard/".$file_menu); - if ($menufound) break; + $conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED); + $conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENU_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENU_SMARTPHONE):$conf->global->MAIN_MENU_SMARTPHONE_FORCED); } - if (! $menufound) // If failed to include, we try with standard + else // If external user { - dol_syslog("You define a menu manager '".$file_menu."' that can not be loaded.", LOG_WARNING); - $file_menu='eldy_menu.php'; - include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu; + $conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED); + $conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENUFRONT_SMARTPHONE):$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED); } -} -$menumanager = new MenuManager($db, empty($user->societe_id)?0:1); + // Load the menu manager (only if not already done) + $file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu; + if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php + if (! class_exists('MenuManager')) + { + $menufound=0; + $dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']); + foreach($dirmenus as $dirmenu) + { + $menufound=dol_include_once($dirmenu."standard/".$file_menu); + if ($menufound) break; + } + if (! $menufound) // If failed to include, we try with standard + { + dol_syslog("You define a menu manager '".$file_menu."' that can not be loaded.", LOG_WARNING); + $file_menu='eldy_menu.php'; + include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu; + } + } + $menumanager = new MenuManager($db, empty($user->societe_id)?0:1); +} From 5d3ab26463bd5224044e63340629e0b58fab2631 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 12:26:01 +0100 Subject: [PATCH 53/76] some fix for english language standardization --- htdocs/societe/class/societe.class.php | 18 +++++++++--------- htdocs/societe/notify/fiche.php | 8 ++++---- htdocs/societe/soc.php | 8 ++++---- ...mail_unpaid_invoices_to_representatives.php | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 72ae2b04922..e0d351ef084 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1328,7 +1328,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); $reparray[$i]['id']=$obj->rowid; - $reparray[$i]['name']=$obj->name; + $reparray[$i]['lastname']=$obj->lastname; $reparray[$i]['firstname']=$obj->firstname; $i++; } @@ -1608,7 +1608,7 @@ class Societe extends CommonObject { $contact_property = array(); - $sql = "SELECT rowid, email, phone_mobile, name, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = '".$this->id."'"; @@ -1624,7 +1624,7 @@ class Societe extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $property=$obj->email; else if ($mode == 'mobile') $property=$obj->phone_mobile; - $contact_property[$obj->rowid] = trim($obj->firstname." ".$obj->name)." <".$property.">"; + $contact_property[$obj->rowid] = trim($obj->firstname." ".$obj->lastname)." <".$property.">"; $i++; } } @@ -1646,7 +1646,7 @@ class Societe extends CommonObject { $contacts = array(); - $sql = "SELECT rowid, name, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'"; + $sql = "SELECT rowid, lastname, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'"; $resql=$this->db->query($sql); if ($resql) { @@ -1657,7 +1657,7 @@ class Societe extends CommonObject while ($i < $nump) { $obj = $this->db->fetch_object($resql); - $contacts[$obj->rowid] = $obj->firstname." ".$obj->name; + $contacts[$obj->rowid] = $obj->firstname." ".$obj->lastname; $i++; } } @@ -1680,7 +1680,7 @@ class Societe extends CommonObject { $contact_property=''; - $sql = "SELECT rowid, email, phone_mobile, name, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE rowid = '".$rowid."'"; @@ -1693,7 +1693,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); - if ($mode == 'email') $contact_property = "$obj->firstname $obj->name <$obj->email>"; + if ($mode == 'email') $contact_property = "$obj->firstname $obj->lastname <$obj->email>"; else if ($mode == 'mobile') $contact_property = $obj->phone_mobile; } return $contact_property; @@ -2506,8 +2506,8 @@ class Societe extends CommonObject $this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT; $this->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE; - $this->nom=$this->name; // deprecated - $this->cp=$this->zip; // deprecated + $this->nom=$this->name; // deprecated + $this->cp=$this->zip; // deprecated // We define country_id, country_code and country $country_id=$country_code=$country_label=''; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 9a36e3fba12..9de9bdcea33 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -269,7 +269,7 @@ if ($result > 0) // Line with titles print ''; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder); print_liste_field_titre('','',''); @@ -278,7 +278,7 @@ if ($result > 0) // List of notifications for contacts $sql = "SELECT n.rowid, n.type,"; $sql.= " a.code, a.label,"; - $sql.= " c.rowid as contactid, c.name, c.firstname, c.email"; + $sql.= " c.rowid as contactid, c.lastname, c.firstname, c.email"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; $sql.= " ".MAIN_DB_PREFIX."notify_def as n,"; $sql.= " ".MAIN_DB_PREFIX."socpeople c"; @@ -347,14 +347,14 @@ if ($result > 0) // Line with titles print '
'; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),"fiche.php","a.daten",'',$param,'align="right"',$sortfield,$sortorder); print ''; // List $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type, n.objet_id,"; - $sql.= " c.rowid as id, c.name, c.firstname, c.email,"; + $sql.= " c.rowid as id, c.lastname, c.firstname, c.email,"; $sql.= " a.code, a.label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; $sql.= " ".MAIN_DB_PREFIX."notify as n, "; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index c196327e5a2..6140ccf4261 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -122,7 +122,7 @@ if (empty($reshook)) { $object->name = GETPOST('nom'); } - $object->address = GETPOST('adresse'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id'); @@ -590,7 +590,7 @@ else $object->code_client = GETPOST('code_client'); $object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur; $object->code_fournisseur = GETPOST('code_fournisseur'); - $object->address = GETPOST('adresse'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->state_id = GETPOST('departement_id'); @@ -808,7 +808,7 @@ else } // Address - print ''; @@ -1086,7 +1086,7 @@ else $object->code_client = GETPOST('code_client'); $object->fournisseur = GETPOST('fournisseur'); $object->code_fournisseur = GETPOST('code_fournisseur'); - $object->address = GETPOST('adresse'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id; diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index bf209b63f4a..19741c5f7a0 100644 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -47,7 +47,7 @@ require_once (DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); $error = 0; -$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.name, u.firstname, u.email"; +$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.lastname, u.firstname, u.email"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " , ".MAIN_DB_PREFIX."societe as s"; $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; From 77544de01ad2402842b3d1353e2ee0f230422e05 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 12:50:05 +0100 Subject: [PATCH 54/76] some fix for english language standardization --- htdocs/societe/class/societe.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e0d351ef084..9125b950995 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -45,6 +45,7 @@ class Societe extends CommonObject var $name; var $nom; // TODO obsolete var $firstname; + var $lastname; var $particulier; var $civility_id; var $address; From 0b61c740a9702d30b9eabff99991a056828d3bae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 13:57:17 +0100 Subject: [PATCH 55/76] Fix: To be sure to start onto an selected top menu --- htdocs/core/lib/security2.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 6aa41576c01..0d39fff1d47 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -148,6 +148,7 @@ function dol_loginfunction($langs,$conf,$mysoc) $php_self = $_SERVER['PHP_SELF']; $php_self.= $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:''; + if (! preg_match('/mainmenu=/',$php_self)) $php_self.=(preg_match('/\?/',$php_self)?'&':'?').'mainmenu=home'; // Title $title='Dolibarr '.DOL_VERSION; @@ -190,7 +191,7 @@ function dol_loginfunction($langs,$conf,$mysoc) $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; } } - + // Set cookie for timeout management $prefix=dol_getprefix(); $sessiontimeout='DOLSESSTIMEOUT_'.$prefix; From 36ce7a9a10aa150e360f8de3fdfbbc839208a80a Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 14:11:09 +0100 Subject: [PATCH 56/76] some fix for english language standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + htdocs/societe/class/companybankaccount.class.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 385fe9df9cc..ada566e49f3 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -61,6 +61,7 @@ alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN name lastname varchar(50); alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; +alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'UPS','UPS','United Parcel Service',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index e58b0d42780..29e227f1cfa 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -45,7 +45,7 @@ class CompanyBankAccount extends Account var $iban; var $iban_prefix; // deprecated var $proprio; - var $adresse_proprio; + var $owner_address; /** * Constructor @@ -124,7 +124,7 @@ class CompanyBankAccount extends Account $sql .= ",iban_prefix = '".$this->iban_prefix."'"; $sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'"; $sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; - $sql .= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'"; + $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql .= " WHERE fk_soc = ".$this->socid; $result = $this->db->query($sql); @@ -150,7 +150,7 @@ class CompanyBankAccount extends Account { if (empty($id) && empty($socid)) return -1; - $sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, adresse_proprio"; + $sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, owner_address"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_rib"; if ($id) $sql.= " WHERE rowid = ".$id; if ($socid) $sql.= " WHERE fk_soc = ".$socid; @@ -174,7 +174,7 @@ class CompanyBankAccount extends Account $this->iban_prefix = $obj->iban; // deprecated $this->domiciliation = $obj->domiciliation; $this->proprio = $obj->proprio; - $this->adresse_proprio = $obj->adresse_proprio; + $this->owner_address = $obj->owner_address; } $this->db->free($resql); From 067cb0a409feb0ef8f28081673aa983dc64a1630 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 14:32:15 +0100 Subject: [PATCH 57/76] some fix for english language standardization --- htdocs/societe/notify/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 9de9bdcea33..785326f076d 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -50,7 +50,7 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="c.name"; +if (! $sortfield) $sortfield="c.lastname"; $now=dol_now(); @@ -214,7 +214,7 @@ if ($result > 0) // Line with titles print '
'.$langs->trans('Address').'
'; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder); print_liste_field_titre(''); From 7596096b899fe7a00c5cc19d036dce602c8a8498 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 14:46:00 +0100 Subject: [PATCH 58/76] some fix for english language standardization --- htdocs/core/lib/company.lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index c3baf7a28a0..eb42e4714b0 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -532,7 +532,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') } print ""; - $sql = "SELECT p.rowid, p.name, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.note "; + $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.note "; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; $sql .= " WHERE p.fk_soc = ".$object->id; $sql .= " ORDER by p.datec"; @@ -554,7 +554,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; @@ -830,7 +830,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) // Contact pour cette action if (empty($objcon->id) && $obj->fk_contact > 0) { - $contactstatic->name=$obj->name; + $contactstatic->lastname=$obj->lastname; $contactstatic->firstname=$obj->firstname; $contactstatic->id=$obj->fk_contact; $out.=''; @@ -945,7 +945,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) 'userid'=>$obj->user_id, 'login'=>$obj->login, 'contact_id'=>$obj->fk_contact, - 'name'=>$obj->name, + 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'fk_element'=>$obj->fk_element, 'elementtype'=>$obj->elementtype @@ -1114,7 +1114,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) // Contact pour cette action if (! empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) { - $contactstatic->name=$histo[$key]['name']; + $contactstatic->lastname=$histo[$key]['lastname']; $contactstatic->firstname=$histo[$key]['firstname']; $contactstatic->id=$histo[$key]['contact_id']; $out.=''; From 6b20370ffab6c303456bb63da37ea98432e47a9b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 14:54:08 +0100 Subject: [PATCH 59/76] Fix: Check consitency of option NOREQUIREXXX --- htdocs/core/antispamimage.php | 1 + htdocs/main.inc.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/antispamimage.php b/htdocs/core/antispamimage.php index cbce684a88d..a8830a5a4eb 100644 --- a/htdocs/core/antispamimage.php +++ b/htdocs/core/antispamimage.php @@ -26,6 +26,7 @@ define('NOLOGIN',1); if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER',1); if (! defined('NOREQUIREDB')) define('NOREQUIREDB',1); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN',1); +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC',1); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 10d67ff3a64..8897df31b6f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin @@ -137,6 +137,10 @@ function analyse_sql_and_script(&$var, $type) } } + +// Check consitency of NOREQUIREXXX DEFINES +if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && ! defined('NOREQUIREMENU')) dol_print_error('','If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not use them'); + // Sanity check on URL if (! empty($_SERVER["PHP_SELF"])) { From 3baf8a6c00a5fa51e0d1b3af8bef791c2d4a8817 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 14:57:49 +0100 Subject: [PATCH 60/76] New: Use div instead of tables into login page. --- dev/test/testdiv.php | 71 ++++++++++++++++++++++++ htdocs/core/menus/standard/eldy_menu.php | 16 +++--- htdocs/core/tools.php | 3 +- htdocs/core/tpl/login.tpl.php | 48 +++++++++------- htdocs/theme/amarok/style.css.php | 31 ++++++++--- htdocs/theme/auguria/style.css.php | 21 ++++++- htdocs/theme/bureau2crea/style.css.php | 29 ++++++++-- htdocs/theme/cameleo/style.css.php | 23 +++++++- htdocs/theme/eldy/style.css.php | 30 ++++++++-- 9 files changed, 223 insertions(+), 49 deletions(-) create mode 100644 dev/test/testdiv.php diff --git a/dev/test/testdiv.php b/dev/test/testdiv.php new file mode 100644 index 00000000000..2d6a42ebc14 --- /dev/null +++ b/dev/test/testdiv.php @@ -0,0 +1,71 @@ + + + + + + + + + +Login Dolibarr 3.4.0-alpha + + + + + + + + + + + +
+ +
'; $contactstatic->id = $obj->rowid; - $contactstatic->name = $obj->name; + $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; print $contactstatic->getNomUrl(1); print ''.$contactstatic->getNomUrl(1,'',10).''.$contactstatic->getNomUrl(1,'',10).'
+ + + + + + + + + + + +
  fds fs df sdf gdsfgsdf r   + +
    + +
+ + + + + +
+ + + +
+ + + + + + + + + + + diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index afc427b5d7e..b8864ea80f3 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -31,12 +31,12 @@ class MenuManager var $type_user; // Put 0 for internal users, 1 for external users var $atarget=""; // Valeur du target a utiliser dans les liens var $name="eldy"; - + var $menu_array; var $menu_array_after; var $tabMenu; - + /** * Constructor @@ -52,7 +52,7 @@ class MenuManager // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; - + // Read mainmenu and leftmenu that define which menu to show if (isset($_GET["mainmenu"])) { @@ -62,11 +62,11 @@ class MenuManager $_SESSION["leftmenuopened"]=""; } else - { + { // On va le chercher en session si non defini par le lien $mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:''; } - + if (isset($_GET["leftmenu"])) { // On sauve en session le menu principal choisi @@ -86,7 +86,7 @@ class MenuManager // On va le chercher en session si non defini par le lien $leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:''; } - + require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; $tabMenu=array(); $menuArbo = new Menubase($db,'eldy'); @@ -112,11 +112,11 @@ class MenuManager $conf->global->MAIN_SEARCHFORM_SOCIETE=0; $conf->global->MAIN_SEARCHFORM_CONTACT=0; } - + $res='ErrorBadParameterForMode'; if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu); if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu); - + return $res; } diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index 1a6ef81a58e..21975a1aef4 100755 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -51,7 +51,8 @@ print $langs->trans("ToolsDesc").'

'; -$db->close(); llxFooter(); + +$db->close(); ?> diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 3452fbe9e86..9bdd8369f70 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2012 Laurent Destailleur + * Copyright (C) 2011-2013 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,7 +75,10 @@ $(document).ready(function () { }); +
+
+ @@ -94,11 +97,14 @@ $(document).ready(function () {

- + - - + + + +
-
+
'; + echo ''; } ?> - + + + @@ -233,6 +241,8 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?> + + diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index d7efa19804d..db971ab0799 100755 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -80,12 +80,6 @@ $img_button=dol_buildpath($path.'/theme/amarok/img/button_bg.png',1); font-size:100%; } -/*.fiche ul { - margin:0.5em; - padding:0.5em; - padding-left: 2em; -}*/ - body { background-color:#f5f5f5; @@ -178,11 +172,29 @@ form { margin:0px; } +.valignmiddle { + vertical-align: middle; +} +.centpercent { + width: 100%; +} +.center { + text-align: center; +} +.left { + text-align: ; +} +.right { + text-align: ; +} + /* ============================================================================== */ /* Login */ /* ============================================================================== */ +body.body center{color:white;} + form#login { display:block; border:solid 1px rgba(0,0,0,.4); @@ -240,7 +252,12 @@ form#login table.login_table { background:none !important; } -body.body center{color:white;} +div#login_left, div#login_right { + display: inline-block; + min-width: 220px; + text-align: center; + vertical-align: middle; +} table.login_table { background-color: red !important;} table.login_table tr td {vertical-align:middle;} diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 3360cb07f69..745fa89d7d9 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -161,12 +161,22 @@ div.float { float:; } + .valignmiddle { vertical-align: middle; } .centpercent { width: 100%; } +.center { + text-align: center; +} +.left { + text-align: ; +} +.right { + text-align: ; +} /* ============================================================================== */ @@ -488,7 +498,9 @@ form#login { } .login_table { padding:12px; - width: 540px; + margin-left: 10px; + margin-right: 10px; + max-width: 540px; border: 1px solid #C0C0C0; background-color: #E0E0E0; @@ -527,6 +539,13 @@ div.login_block table { display: inline; } +div#login_left, div#login_right { + display: inline-block; + min-width: 220px; + text-align: center; + vertical-align: middle; +} + div.login { white-space:nowrap; padding: browser->phone?'0':'8')?>px 0px 0px 0px; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 97527a537cd..1a2cd4fdcff 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -183,12 +183,22 @@ form { padding: 0em 0em 0em 0em; margin: 0em 0em 0em 0em; } + .valignmiddle { vertical-align: middle; } .centpercent { width: 100%; } +.center { + text-align: center; +} +.left { + text-align: ; +} +.right { + text-align: ; +} /* ============================================================================== */ @@ -521,7 +531,9 @@ form#login { font-size: 13px; } .login_table_title { - width: 540px; + margin-left: 10px; + margin-right: 10px; + max-width: 540px; color: #888888; text-shadow: 1px 1px 1px #FFF; } @@ -529,8 +541,10 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { + margin-left: 10px; + margin-right: 10px; padding:12px; - width: 540px; + max-width: 540px; border: 1px solid #C0C0C0; background-color: #E0E0E0; @@ -570,6 +584,13 @@ div.login_block table { display: inline; } +div#login_left, div#login_right { + display: inline-block; + min-width: 220px; + text-align: center; + vertical-align: middle; +} + div.login { white-space:nowrap; padding: browser->phone?'0':'8')?>px 0px 0px 0px; @@ -2138,13 +2159,9 @@ div.table-val-border-col { /* ============================================================================== */ #login { - position: relative; display: block; - width: 480px; height: auto; top: 20px; - left: 50%; - margin-left: -240px; margin-bottom: 30px; } diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 2dd4bfc3a2f..2e2f03920c5 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -166,12 +166,22 @@ div.float { float:; } + .valignmiddle { vertical-align: middle; } .centpercent { width: 100%; } +.center { + text-align: center; +} +.left { + text-align: ; +} +.right { + text-align: ; +} /* ============================================================================== */ @@ -535,7 +545,7 @@ form#login { font-size: 13px; } .login_table_title { - width: 540px; + max-width: 540px; color: #888888; text-shadow: 1px 1px 1px #FFF; } @@ -543,8 +553,10 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { + margin-left: 10px; + margin-right: 10px; padding:12px; - width: 540px; + max-width: 540px; border: 1px solid #C0C0C0; background-color: #E0E0E0; @@ -583,6 +595,13 @@ div.login_block table { display: inline; } +div#login_left, div#login_right { + display: inline-block; + min-width: 220px; + text-align: center; + vertical-align: middle; +} + div.login { white-space:nowrap; padding: browser->phone?'0':'8')?>px 0px 0px 0px; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index cbeccbebadc..a3c1837548e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -303,12 +303,22 @@ th .button { -webkit-border-radius:0px !important; border-radius:0px !important; } + .valignmiddle { vertical-align: middle; } .centpercent { width: 100%; } +.center { + text-align: center; +} +.left { + text-align: ; +} +.right { + text-align: ; +} /* ============================================================================== */ @@ -712,12 +722,13 @@ foreach($mainmenuusedarray as $val) /* Login */ form#login { - margin-top: 70px; + margin-top: 60px; margin-bottom: 30px; font-size: 13px; + vertical-align: middle; } .login_table_title { - width: 540px; + max-width: 540px; color: #888888; text-shadow: 1px 1px 1px #FFF; } @@ -725,11 +736,13 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { + margin-left: 10px; + margin-right: 10px; padding-left:6px; padding-right:6px; - padding-top:14px; + padding-top:12px; padding-bottom:12px; - width: 540px; + max-width: 540px; border: 1px solid #C0C0C0; background-color: #E0E0E0; @@ -747,6 +760,13 @@ form#login { background-image: -ms-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%); background-image: linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%); } +div#login_left, div#login_right { + display: inline-block; + min-width: 250px; + padding-top: 10px; + text-align: center; + vertical-align: middle; +} table.login_table tr td table.none tr td { padding: 2px; } @@ -2058,7 +2078,7 @@ table.cal_month { border-spacing: 0px; } .cal_current_month { border-top: 0; border-left: solid 1px #E0E0E0; border-right: 0; border-bottom: solid 1px #E0E0E0; } .cal_other_month { border-top: 0; border-left: solid 1px #C0C0C0; border-right: 0; border-bottom: solid 1px #C0C0C0; } .cal_current_month_right { border-right: solid 1px #E0E0E0; } -.cal_other_month_right { border-right: solid 1px #C0C0C0; } +.cal_other_month_right { border-right: solid 1px #C0C0C0; } .cal_other_month { opacity: 0.6; background: #DDDDDD; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past_month { opacity: 0.6; background: #EEEEEE; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } From dfae543d5e6b8f585a7fef239723ecaaae16104a Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 15:57:02 +0100 Subject: [PATCH 61/76] english language standardization --- htdocs/adherents/cartes/carte.php | 4 ++-- htdocs/adherents/class/adherent.class.php | 10 ++++------ htdocs/adherents/fiche.php | 2 -- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index fa3d50ed3d2..13fc7f2488e 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -62,7 +62,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg // requete en prenant que les adherents a jour de cotisation $sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,"; - $sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,"; + $sql.= " d.address, d.zip, d.town, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.code as country_code, p.libelle as country"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; @@ -110,7 +110,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated // For backward compatibility '%SOCIETE%'=>$objp->company, - '%CP%'=>$objp->zip, + '%ZIP%'=>$objp->zip, '%PAYS%'=>$objp->country, '%ANNEE%'=>$year, '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 81d746ec9c7..f88f646289c 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -50,7 +50,6 @@ class Adherent extends CommonObject var $pass; var $societe; var $address; - var $cp; var $zip; var $town; @@ -227,7 +226,7 @@ class Adherent extends CommonObject // For backward compatibility '%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, - '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, + '%ZIP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, ); @@ -397,7 +396,7 @@ class Adherent extends CommonObject $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->firstname); $this->address=($this->address?$this->address:$this->address); - $this->zip=($this->zip?$this->zip:$this->cp); + $this->zip=($this->zip?$this->zip:$this->zip); $this->town=($this->town?$this->town:$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); @@ -1009,7 +1008,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1054,7 +1053,6 @@ class Adherent extends CommonObject $this->societe = $obj->societe; $this->fk_soc = $obj->fk_soc; $this->address = $obj->address; - $this->cp = $obj->zip; // deprecated $this->zip = $obj->zip; $this->town = $obj->town; @@ -1811,7 +1809,7 @@ class Adherent extends CommonObject if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste; if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address; - if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp; + if ($this->zip && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->zip; if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code; if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 79d41e3525f..9734562016d 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -258,7 +258,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->societe = trim($_POST["societe"]); $object->address = trim($_POST["address"]); - $object->cp = trim($_POST["zipcode"]); // deprecated $object->zip = trim($_POST["zipcode"]); $object->town = trim($_POST["town"]); $object->state_id = $_POST["departement_id"]; @@ -435,7 +434,6 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->lastname = $lastname; $object->societe = $societe; $object->address = $address; - $object->cp = $zip; // deprecated $object->zip = $zip; $object->town = $town; $object->fk_departement = $state_id; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index ada566e49f3..1664a0065dc 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -53,6 +53,7 @@ alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN nom lastname varchar(50); alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50); alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_adherent CHANGE COLUMN cp zip varchar(10); alter table llx_mailing_cibles CHANGE COLUMN nom lastname varchar(50); alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50); alter table llx_user CHANGE COLUMN name lastname varchar(50); From 86de772b31032dbf6ae30ec12f4298ed853670a8 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 17:08:52 +0100 Subject: [PATCH 62/76] english language standardization --- htdocs/admin/company.php | 6 +++--- .../commande/class/boutiquecommande.class.php | 6 +++--- htdocs/boutique/commande/fiche.php | 4 ++-- htdocs/categories/categorie.php | 2 +- htdocs/comm/list.php | 6 +++--- htdocs/comm/prospect/list.php | 6 +++--- htdocs/compta/dons/class/don.class.php | 19 +++++++++--------- htdocs/compta/dons/fiche.php | 4 +--- htdocs/contact/class/contact.class.php | 10 ++++------ htdocs/contact/fiche.php | 6 +++--- htdocs/contact/vcard.php | 6 +++--- htdocs/core/ajax/ziptown.php | 6 +++--- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/files.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 2 +- .../modules/dons/html_cerfafr.modules.php | 4 ++-- htdocs/core/modules/modAdherent.class.php | 10 +++++----- htdocs/core/modules/modCategorie.class.php | 12 +++++------ htdocs/core/modules/modCommande.class.php | 8 ++++---- htdocs/core/modules/modExpedition.class.php | 8 ++++---- htdocs/core/modules/modFacture.class.php | 16 +++++++-------- htdocs/core/modules/modFicheinter.class.php | 8 ++++---- htdocs/core/modules/modFournisseur.class.php | 20 +++++++++---------- htdocs/core/modules/modHoliday.class.php | 6 +++--- htdocs/core/modules/modPaybox.class.php | 4 ++-- htdocs/core/modules/modPaypal.class.php | 4 ++-- htdocs/core/modules/modProjet.class.php | 8 ++++---- htdocs/core/modules/modPropale.class.php | 8 ++++---- htdocs/core/modules/modSociete.class.php | 16 +++++++-------- htdocs/core/modules/modStock.class.php | 10 +++++----- htdocs/fourn/liste.php | 6 +++--- .../install/mysql/migration/3.3.0-3.4.0.sql | 7 +++++++ htdocs/product/stock/class/entrepot.class.php | 10 ++++------ htdocs/product/stock/fiche.php | 2 -- htdocs/product/stock/liste.php | 2 +- htdocs/public/members/public_list.php | 6 +++--- htdocs/societe/agenda.php | 2 +- .../canvas/individual/tpl/card_create.tpl.php | 2 +- .../canvas/individual/tpl/card_view.tpl.php | 2 +- htdocs/societe/class/address.class.php | 11 ++++------ htdocs/societe/class/societe.class.php | 15 +++++--------- htdocs/societe/commerciaux.php | 2 +- htdocs/societe/soc.php | 2 +- htdocs/webservices/server_contact.php | 6 +++--- 44 files changed, 147 insertions(+), 157 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index eb7cb1f9d56..271318258ee 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -67,7 +67,7 @@ if ( ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN",$_POST["town"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP",$_POST["zipcode"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity); @@ -280,7 +280,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; print ''.$langs->trans("CompanyZip").''; - print ''."\n"; + print ''."\n"; $var=!$var; print ''.$langs->trans("CompanyTown").''; @@ -649,7 +649,7 @@ else print ''.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . ''; $var=!$var; - print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP) . ''; + print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . ''; $var=!$var; print ''.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . ''; diff --git a/htdocs/boutique/commande/class/boutiquecommande.class.php b/htdocs/boutique/commande/class/boutiquecommande.class.php index 7168ba977ba..102d43085c2 100644 --- a/htdocs/boutique/commande/class/boutiquecommande.class.php +++ b/htdocs/boutique/commande/class/boutiquecommande.class.php @@ -65,7 +65,7 @@ class BoutiqueCommande { global $conf; - $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, date_purchased, orders_status, orders_date_finished, currency, currency_value"; + $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_zipcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_zipcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, date_purchased, orders_status, orders_date_finished, currency, currency_value"; $sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders"; $sql.= " WHERE orders_id = ".$id; @@ -84,13 +84,13 @@ class BoutiqueCommande $this->delivery_adr->name = stripslashes($array["delivery_name"]); $this->delivery_adr->street = stripslashes($array["delivery_street_address"]); - $this->delivery_adr->cp = stripslashes($array["delivery_postcode"]); + $this->delivery_adr->zip = stripslashes($array["delivery_zipcode"]); $this->delivery_adr->city = stripslashes($array["delivery_city"]); $this->delivery_adr->country = stripslashes($array["delivery_country"]); $this->billing_adr->name = stripslashes($array["billing_name"]); $this->billing_adr->street = stripslashes($array["billing_street_address"]); - $this->billing_adr->cp = stripslashes($array["billing_postcode"]); + $this->billing_adr->zip = stripslashes($array["billing_zipcode"]); $this->billing_adr->city = stripslashes($array["billing_city"]); $this->billing_adr->country = stripslashes($array["billing_country"]); diff --git a/htdocs/boutique/commande/fiche.php b/htdocs/boutique/commande/fiche.php index 598e48d2000..e7f0e83537f 100644 --- a/htdocs/boutique/commande/fiche.php +++ b/htdocs/boutique/commande/fiche.php @@ -55,8 +55,8 @@ if ($id > 0) print "".$langs->trans("Address")."".$langs->trans("Delivery")."".$langs->trans("Invoice").""; - print " ".$commande->delivery_adr->name."
".$commande->delivery_adr->street."
".$commande->delivery_adr->cp."
".$commande->delivery_adr->city."
".$commande->delivery_adr->country.""; - print "".$commande->billing_adr->name."
".$commande->billing_adr->street."
".$commande->billing_adr->cp."
".$commande->billing_adr->city."
".$commande->billing_adr->country.""; + print " ".$commande->delivery_adr->name."
".$commande->delivery_adr->street."
".$commande->delivery_adr->zip."
".$commande->delivery_adr->city."
".$commande->delivery_adr->country.""; + print "".$commande->billing_adr->name."
".$commande->billing_adr->street."
".$commande->billing_adr->zip."
".$commande->billing_adr->city."
".$commande->billing_adr->country.""; print ""; print ""; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 7482fbdb674..9da1d910c0f 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -243,7 +243,7 @@ if ($socid) print ''.$langs->trans('Address').''.nl2br($soc->address).''; // Zip / Town - print ''.$langs->trans('Zip').''.$soc->cp.""; + print ''.$langs->trans('Zip').''.$soc->zip.""; print ''.$langs->trans('Town').''.$soc->town.""; // Country diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index e585733805c..e7d6cd2811d 100755 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -96,7 +96,7 @@ $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); -$sql = "SELECT s.rowid, s.nom as name, s.client, s.cp as zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; +$sql = "SELECT s.rowid, s.nom as name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; $sql.= " s.datec, s.datea, s.canvas"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; @@ -116,7 +116,7 @@ if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; -if ($search_zipcode) $sql.= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'"; +if ($search_zipcode) $sql.= " AND s.zip LIKE '".$db->escape($search_zipcode)."%'"; if ($search_town) $sql.= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'"; if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'"; @@ -177,7 +177,7 @@ if ($result) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 9e0d61f5e2b..727932c0f40 100755 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -172,7 +172,7 @@ if ($action == 'cstc') $formother=new FormOther($db); -$sql = "SELECT s.rowid, s.nom, s.cp as zip, s.town, s.datec, s.datea, s.status as status,"; +$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; $sql.= " d.nom as departement"; // Updated by Matelli @@ -193,7 +193,7 @@ if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'"; -if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape(strtolower($search_zipcode))."%'"; +if ($search_zipcode) $sql .= " AND s.zip LIKE '".$db->escape(strtolower($search_zipcode))."%'"; if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape(strtolower($search_town))."%'"; if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'"; if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; @@ -293,7 +293,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder); diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index 4abf60b7cf5..a03f2cd8f5e 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -43,7 +43,7 @@ class Don extends CommonObject var $lastname; var $societe; var $address; - var $cp; + var $zip; var $town; var $pays; var $email; @@ -189,7 +189,7 @@ class Don extends CommonObject $this->public = 1; $this->societe = 'The Company'; $this->address = 'Twist road'; - $this->cp = '99999'; + $this->zip = '99999'; $this->town = 'Town'; $this->note_public='SPECIMEN'; $this->email='email@email.com'; @@ -223,7 +223,7 @@ class Don extends CommonObject $err++; } - if (dol_strlen(trim($this->cp)) == 0) + if (dol_strlen(trim($this->zip)) == 0) { $error_string[$err] = "Le code postal saisi est invalide"; $err++; @@ -298,7 +298,7 @@ class Don extends CommonObject // Clean parameters $this->address=($this->address>0?$this->address:$this->address); - $this->zip=($this->zip>0?$this->zip:$this->cp); + $this->zip=($this->zip>0?$this->zip:$this->zip); $this->town=($this->town>0?$this->town:$this->town); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); $this->country=($this->country?$this->country:$this->pays); @@ -314,7 +314,7 @@ class Don extends CommonObject $sql.= ", lastname"; $sql.= ", societe"; $sql.= ", address"; - $sql.= ", cp"; + $sql.= ", zip"; $sql.= ", town"; $sql.= ", pays"; $sql.= ", public"; @@ -383,7 +383,7 @@ class Don extends CommonObject { // Clean parameters $this->address=($this->address>0?$this->address:$this->address); - $this->zip=($this->zip>0?$this->zip:$this->cp); + $this->zip=($this->zip>0?$this->zip:$this->zip); $this->town=($this->town>0?$this->town:$this->town); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); $this->country=($this->country?$this->country:$this->pays); @@ -395,7 +395,7 @@ class Don extends CommonObject $sql .= ",lastname='".$this->db->escape($this->lastname)."'"; $sql .= ",societe='".$this->db->escape($this->societe)."'"; $sql .= ",address='".$this->db->escape($this->address)."'"; - $sql .= ",cp='".$this->db->escape($this->zip)."'"; + $sql .= ",zip='".$this->db->escape($this->zip)."'"; $sql .= ",town='".$this->db->escape($this->town)."'"; $sql .= ",pays='".$this->db->escape($this->country)."'"; // TODO use country_id $sql .= ",public=".$this->public; @@ -463,7 +463,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,"; - $sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; + $sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; $sql.= " p.title as project_label"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet"; @@ -488,9 +488,8 @@ class Don extends CommonObject $this->societe = $obj->societe; $this->statut = $obj->fk_statut; $this->address = $obj->address; - $this->cp = $obj->cp; $this->town = $obj->town; - $this->zip = $obj->cp; + $this->zip = $obj->zip; $this->town = $obj->town; $this->email = $obj->email; $this->phone = $obj->phone; diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 3ffa3847ba3..9c4715cc406 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -90,7 +90,6 @@ if ($action == 'update') $don->societe = $_POST["societe"]; $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); - $don->cp = $_POST["zipcode"]; $don->town = $_POST["town"]; $don->zip = $_POST["zipcode"]; $don->town = $_POST["town"]; @@ -142,7 +141,6 @@ if ($action == 'add') $don->societe = $_POST["societe"]; $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); - $don->cp = $_POST["zipcode"]; $don->town = $_POST["town"]; $don->zip = $_POST["zipcode"]; $don->town = $_POST["town"]; @@ -488,7 +486,7 @@ if (! empty($id) && $action != 'edit') print "".''.$langs->trans("Address").''.dol_nl2br($don->address).''; // Zip / Town - print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->cp.($don->cp && $don->town?' / ':'').$don->town.''; + print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->zip.($don->zip && $don->town?' / ':'').$don->town.''; // Country print "".''.$langs->trans("Country").''.$don->pays.''; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 9c5ff1a2a6f..47d1db8ae39 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -43,7 +43,6 @@ class Contact extends CommonObject var $nom; // TODO deprecated var $firstname; var $address; - var $cp; // TODO deprecated var $zip; var $town; @@ -222,7 +221,7 @@ class Contact extends CommonObject $this->phone_perso=trim($this->phone_perso); $this->phone_mobile=trim($this->phone_mobile); $this->fax=trim($this->fax); - $this->zip=($this->zip?$this->zip:$this->cp); + $this->zip=($this->zip?$this->zip:$this->zip); $this->town=($this->town?$this->town:$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); @@ -236,7 +235,7 @@ class Contact extends CommonObject $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'"; - $sql .= ", cp='".$this->db->escape($this->zip)."'"; + $sql .= ", zip='".$this->db->escape($this->zip)."'"; $sql .= ", town='".$this->db->escape($this->town)."'"; $sql .= ", fk_pays=".($this->country_id>0?$this->country_id:'NULL'); $sql .= ", fk_departement=".($this->state_id>0?$this->state_id:'NULL'); @@ -364,7 +363,7 @@ class Contact extends CommonObject if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers"; } if ($this->address && ! empty($conf->global->LDAP_CONTACT_FIELD_ADDRESS)) $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address; - if ($this->cp && ! empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->cp; + if ($this->zip && ! empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->zip; if ($this->town && ! empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_CONTACT_FIELD_COUNTRY)) $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code; if ($this->phone_pro && ! empty($conf->global->LDAP_CONTACT_FIELD_PHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro; @@ -482,7 +481,7 @@ class Contact extends CommonObject $langs->load("companies"); $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.lastname, c.firstname,"; - $sql.= " c.address, c.cp as zip, c.town as town,"; + $sql.= " c.address, c.zip, c.town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; $sql.= " c.birthday,"; @@ -514,7 +513,6 @@ class Contact extends CommonObject $this->lastname = $obj->lastname; $this->firstname = $obj->firstname; $this->address = $obj->address; - $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; $this->town = $obj->town; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index b48236acf03..cc6cdec4b51 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -881,10 +881,10 @@ else dol_print_address($object->address,'gmap','contact',$object->id); print ''; - // Zip Town + // Zip/Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $object->cp; - if ($object->cp) print ' '; + print $object->zip; + if ($object->zip) print ' '; print $object->town.''; // Country diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 9638c5ff188..195c5942e5e 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -54,8 +54,8 @@ $v->setPhoneNumber($contact->phone_pro, "PREF;WORK;VOICE"); $v->setPhoneNumber($contact->phone_mobile, "CELL;VOICE"); $v->setPhoneNumber($contact->fax, "WORK;FAX"); -$v->setAddress("", "", $contact->address, $contact->town, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL"); -$v->setLabel("", "", $contact->address, $contact->town, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK"); +$v->setAddress("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL"); +$v->setLabel("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->pays_code?$contact->pays:''), "WORK"); $v->setEmail($contact->email,'internet,pref'); $v->setNote($contact->note); @@ -67,7 +67,7 @@ if ($company->id) $v->setURL($company->url, "WORK"); if (! $contact->phone_pro) $v->setPhoneNumber($company->tel, "WORK;VOICE"); if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX"); - if (! $contact->cp) $v->setAddress("", "", $company->address, $company->town, "", $company->cp, $company->pays_code, "WORK;POSTAL"); + if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->pays_code, "WORK;POSTAL"); if ($company->email != $contact->email) $v->setEmail($company->email,'internet'); // Si contact lie a un tiers non de type "particulier" if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom); diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 90ece7f36e4..1f4b6acb6fb 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -77,16 +77,16 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) } else // Use table of third parties { - $sql = "SELECT DISTINCT s.cp as zip, s.town, s.fk_departement as fk_county, s.fk_pays as fk_country"; + $sql = "SELECT DISTINCT s.zip, s.town, s.fk_departement as fk_county, s.fk_pays as fk_country"; $sql.= ", p.code as country_code, p.libelle as country"; $sql.= ", d.code_departement as county_code , d.nom as county"; $sql.= " FROM ".MAIN_DB_PREFIX.'societe as s'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON fk_departement = d.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON fk_pays = p.rowid'; $sql.= " WHERE"; - if ($zipcode) $sql.= " s.cp LIKE '".$db->escape($zipcode)."%'"; + if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'"; if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'"; - $sql.= " ORDER BY s.fk_pays, s.cp, s.town"; + $sql.= " ORDER BY s.fk_pays, s.zip, s.town"; $sql.= $db->plimit(50); // Avoid pb with bad criteria } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index eb42e4714b0..8ba3a161712 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1161,7 +1161,7 @@ function show_subsidiaries($conf,$langs,$db,$object) $i=-1; - $sql = "SELECT s.rowid, s.nom as name, s.address, s.cp as zip, s.town, s.code_client, s.canvas"; + $sql = "SELECT s.rowid, s.nom as name, s.address, s.zip, s.town, s.code_client, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE s.parent = ".$object->id; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index b2360bb15bb..351b3fed386 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -909,7 +909,7 @@ function dol_meta_create($object) if (is_dir($dir)) { $nblignes = count($object->lines); - $client = $object->client->nom . " " . $object->client->address . " " . $object->client->cp . " " . $object->client->town; + $client = $object->client->nom . " " . $object->client->address . " " . $object->client->zip . " " . $object->client->town; $meta = "REFERENCE=\"" . $object->ref . "\" DATE=\"" . dol_print_date($object->date,'') . "\" NB_ITEMS=\"" . $nblignes . "\" diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 2a1d1cb16d7..5e6bcd510e4 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -66,7 +66,7 @@ __MAIN_INFO_SOCIETE_NOM__
__Address__ :
__MAIN_INFO_SOCIETE_ADDRESS__
- __Zip__ : __MAIN_INFO_SOCIETE_CP__
+ __Zip__ : __MAIN_INFO_SOCIETE_ZIP__
__Town__ : __MAIN_INFO_SOCIETE_TOWN__
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 71ef2364056..05c3dd96f24 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -141,11 +141,11 @@ class html_cerfafr extends ModeleDon $form = str_replace('__CURRENCYCODE__',$conf->currency,$form); $form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form); $form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form); - $form = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->zip,$form); + $form = str_replace('__MAIN_INFO_SOCIETE_ZIP__',$mysoc->zip,$form); $form = str_replace('__MAIN_INFO_SOCIETE_TOWN__',$mysoc->town,$form); $form = str_replace('__DONATOR_NAME__',$don->nom,$form); $form = str_replace('__DONATOR_ADDRESS__',$don->address,$form); - $form = str_replace('__DONATOR_ZIP__',$don->cp,$form); + $form = str_replace('__DONATOR_ZIP__',$don->zip,$form); $form = str_replace('__DONATOR_TOWN__',$don->town,$form); $form = str_replace('__PAYMENTMODE_LIB__ ', $paymentmode,$form); $form = str_replace('__NOW__',dol_print_date($now,'',false,$outputlangs),$form); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 17cb7422f4a..0b9530a9fae 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='MembersAndSubscriptions'; $this->export_permission[$r]=array(array("adherent","export")); - $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); - $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); - $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); + $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); + $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); + $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields'); $this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); + $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules // End add extra fields $this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); + $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.zip'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index a9c8b032af8..ed3955cc373 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -109,9 +109,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->fournisseur->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("fournisseur","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text"); - $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text"); + $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.zip'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_fournisseur as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; $this->export_sql_end[$r] .=' WHERE u.rowid = cf.fk_categorie AND cf.fk_societe = s.rowid'; @@ -124,9 +124,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->societe->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("societe","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code'); - $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code'); + $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.zip'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_societe as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; $this->export_sql_end[$r] .=' WHERE u.rowid = cf.fk_categorie AND cf.fk_societe = s.rowid'; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index fbf3242dfec..07b2e03c4b9 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -173,10 +173,10 @@ class modCommande extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("commande","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 1bf908b7738..9b1b471b621 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -200,10 +200,10 @@ class modExpedition extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Shipments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("expedition","shipment","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('shipment_line'=>'ed.rowid','product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index bdef1b5e6b9..b9c2aa27c53 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -174,10 +174,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -194,10 +194,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index a46347ee895..6ccbea4592c 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -138,10 +138,10 @@ class modFicheinter extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("ficheinter","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); $this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index b6f0866d996..a2af9646ee1 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -242,10 +242,10 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et lignes de facture'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -261,10 +261,10 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et reglements'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -281,9 +281,9 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Commandes fournisseurs et lignes de commandes'; $this->export_icon[$r]='order'; $this->export_permission[$r]=array(array("fournisseur","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); //$this->export_TypeFields_array[$r]=array(); // TODO add fields type - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index b1582c632f0..bbce310b028 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -265,9 +265,9 @@ class modHoliday extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); - // $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.zip'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 01747274e66..c2b49e6d181 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -164,8 +164,8 @@ class modPayBox extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index a62034f3a50..d4bc9298539 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -156,8 +156,8 @@ class modPaypal extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index b4644c9b1c0..b1c9326e539 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -147,18 +147,18 @@ class modProjet extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("projet","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country', + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country', 's.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode', 'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote", 'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.duration_planned'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc"); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', 's.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', 'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text", 'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.duration_planned'=>"Duree",'pt.progress'=>"Number",'pt.description'=>"Text"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company', + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company', 's.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', 'f.rowid'=>"project",'f.ref'=>"project",'f.datec'=>"project",'f.duree'=>"project",'f.fk_statut'=>"project",'f.description'=>"project", 'pt.rowid'=>'task','pt.dateo'=>"task",'pt.datee'=>"task",'pt.duration_effective'=>"task",'pt.duration_planned'=>"task",'pt.progress'=>"task",'pt.description'=>"task"); diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 82966ac8b18..7455a74de90 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -167,10 +167,10 @@ class modPropale extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("propale","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 1f4af151555..dd6520f0214 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -248,10 +248,10 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_1'; $this->export_icon[$r]='company'; $this->export_permission[$r]=array(array("societe","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); + $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid'); - $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'Text'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid'); + $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'Text'); $this->export_entities_array[$r]=array(); // We define here only fields that use another picto // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; @@ -283,7 +283,7 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_2'; $this->export_icon[$r]='contact'; $this->export_permission[$r]=array(array("societe","contact","export")); - $this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.town'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); + $this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company"); // We define here only fields that use another picto if (empty($conf->fournisseur->enabled)) { @@ -322,7 +322,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; $resql=$this->db->query($sql); @@ -348,7 +348,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); + $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.zip'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); // Import list of contact and attributes $r++; @@ -357,7 +357,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='contact'; $this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact'"; $resql=$this->db->query($sql); @@ -378,7 +378,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); + $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.zip'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); // Import Bank Accounts $r++; diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 8b18e5d0c1c..c30e1438795 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -122,9 +122,9 @@ class modStock extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]="WarehousesAndProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("stock","lire")); - $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LocationSummary','e.description'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.town'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock'); - $this->export_TypeFields_array[$r]=array('e.rowid'=>'List:entrepot:LabelWareHouse','e.label'=>'Text','e.label'=>'Text','e.lieu'=>'Text','e.address'=>'Text','e.cp'=>'Text','e.town'=>'Text','p.rowid'=>"List:produit:label",'p.ref'=>"Text",'p.fk_product_type'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.note'=>"Text",'p.price'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date','ps.reel'=>'Number'); - $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.description'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.town'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.tosell'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock'); + $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LocationSummary','e.description'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.zip'=>'Zip','e.town'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock'); + $this->export_TypeFields_array[$r]=array('e.rowid'=>'List:entrepot:LabelWareHouse','e.label'=>'Text','e.label'=>'Text','e.lieu'=>'Text','e.address'=>'Text','e.zip'=>'Text','e.town'=>'Text','p.rowid'=>"List:produit:label",'p.ref'=>"Text",'p.fk_product_type'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.note'=>"Text",'p.price'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date','ps.reel'=>'Number'); + $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.description'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.zip'=>'warehouse','e.town'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.tosell'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock'); $this->export_aggregate_array[$r]=array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r]=array('stock'=>array('p.rowid','e.rowid')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them @@ -149,7 +149,7 @@ class modStock extends DolibarrModules $this->import_tables_creator_array[$r]=array('e'=>'fk_user_author'); $this->import_fields_array[$r]=array('e.label'=>"LocationSummary*", 'e.description'=>"DescWareHouse",'e.lieu'=>"LieuWareHouse", - 'e.address'=>"Address",'e.cp'=>'Zip','e.fk_pays'=>'CountryCode', + 'e.address'=>"Address",'e.zip'=>'Zip','e.fk_pays'=>'CountryCode', 'e.statut'=>'Status' ); @@ -159,7 +159,7 @@ class modStock extends DolibarrModules $this->import_regex_array[$r]=array('e.statut'=>'^[0|1]'); $this->import_examplevalues_array[$r]=array('e.label'=>"ALM001", 'e.description'=>"Central Warehouse",'e.lieu'=>"Central", - 'e.address'=>"Route 66",'e.cp'=>'28080','e.fk_pays'=>'US', + 'e.address'=>"Route 66",'e.zip'=>'28080','e.fk_pays'=>'US', 'e.statut'=>'1'); // Import stocks diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index 74913f4e548..16406eeb279 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -77,7 +77,7 @@ $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); -$sql = "SELECT s.rowid as socid, s.nom, s.cp as zip, s.town, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, "; +$sql = "SELECT s.rowid as socid, s.nom, s.zip, s.town, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, "; $sql.= "code_fournisseur, code_compta_fournisseur"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -95,7 +95,7 @@ if ($socname) $sortorder = "ASC"; } if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; -if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'"; +if ($search_zipcode) $sql .= " AND s.zip LIKE '".$db->escape($search_zipcode)."%'"; if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_code_fournisseur) $sql .= " AND s.code_fournisseur LIKE '%".$db->escape($search_code_fournisseur)."%'"; if ($search_compta_fournisseur) $sql .= " AND s.code_compta_fournisseur LIKE '%".$db->escape($search_compta_fournisseur)."%'"; @@ -146,7 +146,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,'valign="middle"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'align="left"',$sortfield,$sortorder); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 1664a0065dc..9fde755b832 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -32,6 +32,7 @@ UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_backoff UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_frontoffice.php'; UPDATE llx_const set value='MAIN_INFO_SOCIETE_ADDRESS' where value='MAIN_INFO_SOCIETE_ADRESSE'; UPDATE llx_const set value='MAIN_INFO_SOCIETE_TOWN' where value='MAIN_INFO_SOCIETE_VILLE'; +UPDATE llx_const set value='MAIN_INFO_SOCIETE_ZIP' where value='MAIN_INFO_SOCIETE_CP'; ALTER TABLE llx_user add COLUMN fk_user integer; @@ -49,6 +50,7 @@ alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_don CHANGE COLUMN prenom firstname varchar(50); alter table llx_don CHANGE COLUMN nom lastname varchar(50); +alter table llx_don CHANGE COLUMN cp zip varchar(10); alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN nom lastname varchar(50); alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50); @@ -58,11 +60,16 @@ alter table llx_mailing_cibles CHANGE COLUMN nom lastname varchar(50); alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50); alter table llx_user CHANGE COLUMN name lastname varchar(50); alter table llx_entrepot CHANGE COLUMN ville town text; +alter table llx_entrepot CHANGE COLUMN cp zip varchar(10); alter table llx_societe CHANGE COLUMN ville town text; +alter table llx_societe CHANGE COLUMN cp zip varchar(10); alter table llx_socpeople CHANGE COLUMN name lastname varchar(50); alter table llx_socpeople CHANGE COLUMN ville town text; +alter table llx_socpeople CHANGE COLUMN cp zip varchar(10); alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text; +alter table llx_societe_address CHANGE COLUMN ville town text; +alter table llx_societe_address CHANGE COLUMN cp zip varchar(10); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'UPS','UPS','United Parcel Service',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'KIALA','KIALA','Relais Kiala',0); diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 3f597aae505..e78fddff4cf 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -43,7 +43,6 @@ class Entrepot extends CommonObject var $lieu; var $address; //! Code Postal - var $cp; // deprecated var $zip; var $town; @@ -143,8 +142,8 @@ class Entrepot extends CommonObject $this->lieu=$this->db->escape(trim($this->lieu)); $this->address=$this->db->escape(trim($this->address)); - $this->zip=$this->zip?trim($this->zip):trim($this->cp); - $this->town=$this->town?trim($this->town):trim($this->ville); + $this->zip=$this->zip?trim($this->zip):trim($this->zip); + $this->town=$this->town?trim($this->town):trim($this->town); $this->country_id=($this->country_id > 0 ? $this->country_id : $this->pays_id); $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; @@ -153,7 +152,7 @@ class Entrepot extends CommonObject $sql .= ", statut = " . $this->statut; $sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'"; $sql .= ", address = '" . $this->db->escape($this->address) ."'"; - $sql .= ", cp = '" . $this->db->escape($this->zip) ."'"; + $sql .= ", zip = '" . $this->db->escape($this->zip) ."'"; $sql .= ", town = '" . $this->db->escape($this->town) ."'"; $sql .= ", fk_pays = " . $this->country_id; $sql .= " WHERE rowid = " . $id; @@ -246,7 +245,7 @@ class Entrepot extends CommonObject { global $conf; - $sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, town, fk_pays as country_id"; + $sql = "SELECT rowid, label, description, statut, lieu, address, zip, town, fk_pays as country_id"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot"; if ($id) @@ -275,7 +274,6 @@ class Entrepot extends CommonObject $this->statut = $obj->statut; $this->lieu = $obj->lieu; $this->address = $obj->address; - $this->cp = $obj->zip; // deprecated $this->pays_id = $obj->country_id; // deprecated $this->zip = $obj->zip; $this->town = $obj->town; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 07b01bb7d34..3a73bd339e3 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -64,7 +64,6 @@ if ($action == 'add' && $user->rights->stock->creer) $object->statut = $_POST["statut"]; $object->lieu = $_POST["lieu"]; $object->address = $_POST["address"]; - $object->cp = $_POST["zipcode"]; $object->pays_id = $_POST["country_id"]; $object->zip = $_POST["zipcode"]; $object->town = $_POST["town"]; @@ -116,7 +115,6 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->statut = $_POST["statut"]; $object->lieu = $_POST["lieu"]; $object->address = $_POST["address"]; - $object->cp = $_POST["zipcode"]; $object->pays_id = $_POST["country_id"]; $object->zip = $_POST["zipcode"]; $object->town = $_POST["town"]; diff --git a/htdocs/product/stock/liste.php b/htdocs/product/stock/liste.php index e9ab3819d33..bde0c3e1858 100644 --- a/htdocs/product/stock/liste.php +++ b/htdocs/product/stock/liste.php @@ -45,7 +45,7 @@ $limit = $conf->liste_limit; $offset = $limit * $page; -$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.cp, e.town, e.fk_pays"; +$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays"; $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql.= " WHERE e.entity = ".$conf->entity; if ($sref) diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 00d09e67112..6f32d9e4715 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -101,14 +101,14 @@ if (! $sortfield) { $sortfield="nom"; } llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers")); -$sql = "SELECT rowid, firstname, lastname, societe, cp as zip, town, email, naiss, photo"; +$sql = "SELECT rowid, firstname, lastname, societe, zip, town, email, naiss, photo"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent"; $sql.= " WHERE entity = ".$entity; $sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; +//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, zip, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); @@ -129,7 +129,7 @@ if ($result) print ' / '.$langs->trans("Company").''."\n"; //print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","naiss",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),"public_list.php","cp","",$param,$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Zip"),"public_list.php","zip","",$param,$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),"public_list.php","town","",$param,$sortfield,$sortorder); print "".$langs->trans("Photo")."\n"; print "\n"; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index abe85206fca..fc275858e94 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -119,7 +119,7 @@ if ($socid) print ""; // Zip / Town - print ''.$langs->trans('Zip').''.$soc->cp.""; + print ''.$langs->trans('Zip').''.$soc->zip.""; print ''.$langs->trans('Town').''.$soc->town.""; // Country diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index 96371b66092..ee93f5c940b 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -120,7 +120,7 @@ trans('Zip'); ?> - control->tpl['autofilltownfromzip']; ?> + control->tpl['autofilltownfromzip']; ?> trans('Town'); ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 30794b2a604..7c99adc360b 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -82,7 +82,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); trans('Zip'); ?> - control->tpl['cp']; ?> + control->tpl['zip']; ?> trans('Town'); ?> control->tpl['town']; ?> diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 7a8ba22dd41..08a5314b86e 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -38,7 +38,6 @@ class Address var $socid; var $name; var $address; - var $cp; // deprecated var $zip; var $town; var $pays_id; // deprecated @@ -194,8 +193,8 @@ class Address $sql.= " SET label = '" . $this->db->escape($this->label) ."'"; // Champ obligatoire $sql.= ", name = '" . $this->db->escape($this->name) ."'"; // Champ obligatoire $sql.= ", address = ".($this->address?"'".$this->db->escape($this->address)."'":"null"); - $sql.= ", cp = ".($this->zip?"'".$this->db->escape($this->zip)."'":"null"); - $sql.= ", ville = ".($this->town?"'".$this->db->escape($this->town)."'":"null"); + $sql.= ", zip = ".($this->zip?"'".$this->db->escape($this->zip)."'":"null"); + $sql.= ", town = ".($this->town?"'".$this->db->escape($this->town)."'":"null"); $sql.= ", fk_pays = '" . ($this->country_id?$this->country_id:'0') ."'"; $sql.= ", note = ".($this->note?"'".$this->db->escape($this->note)."'":"null"); $sql.= ", tel = ".($this->phone?"'".$this->db->escape($this->phone)."'":"null"); @@ -270,7 +269,7 @@ class Address { $sql = 'SELECT a.rowid as id, a.label, a.name, a.address, a.datec as dc'; $sql .= ', a.tms as date_update, a.fk_soc'; - $sql .= ', a.cp as zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; + $sql .= ', a.zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; $sql .= ', p.code as country_code, p.libelle as country'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; @@ -303,7 +302,6 @@ class Address $line->note = $objp->note; // deprecated - $line->cp = $line->zip; $line->pays_id = $line->country_id; $line->pays_code = $line->country_code; $line->pays = $line->country; @@ -348,7 +346,7 @@ class Address $sql = 'SELECT a.rowid, a.fk_soc, a.label, a.name, a.address, a.datec as date_creation'; $sql .= ', a.tms as date_update'; - $sql .= ', a.cp as zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; + $sql .= ', a.zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; $sql .= ', p.code as country_code, p.libelle as country'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; @@ -381,7 +379,6 @@ class Address $this->note = $obj->note; // deprecated - $this->cp = $this->zip; $this->pays_id = $this->country_id; $this->pays_code = $this->country_code; $this->pays = $this->country; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9125b950995..744e9e33fb8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -49,7 +49,6 @@ class Societe extends CommonObject var $particulier; var $civility_id; var $address; - var $cp; // TODO obsolete var $zip; var $town; var $status; // 0=activity ceased, 1= in activity @@ -394,8 +393,7 @@ class Societe extends CommonObject $this->nom = trim($this->nom); // TODO obsolete $this->ref_ext = trim($this->ref_ext); $this->address = $this->address?trim($this->address):trim($this->address); - $this->zip = $this->zip?trim($this->zip):trim($this->cp); - $this->cp = $this->zip; // TODO obsolete + $this->zip = $this->zip?trim($this->zip):trim($this->zip); $this->town = $this->town?trim($this->town):trim($this->town); $this->state_id = trim($this->state_id); $this->country_id = ($this->country_id > 0)?$this->country_id:$this->pays_id; @@ -497,7 +495,7 @@ class Societe extends CommonObject $sql .= ",datea = '".$this->db->idate($now)."'"; $sql .= ",address = '" . $this->db->escape($this->address) ."'"; - $sql .= ",cp = ".(! empty($this->zip)?"'".$this->zip."'":"null"); + $sql .= ",zip = ".(! empty($this->zip)?"'".$this->zip."'":"null"); $sql .= ",town = ".(! empty($this->town)?"'".$this->db->escape($this->town)."'":"null"); $sql .= ",fk_departement = '" . (! empty($this->state_id)?$this->state_id:'0') ."'"; @@ -696,7 +694,7 @@ class Societe extends CommonObject $sql .= ', s.status'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_update'; - $sql .= ', s.tel as phone, s.fax, s.email, s.url, s.cp as zip, s.town, s.note, s.client, s.fournisseur'; + $sql .= ', s.tel as phone, s.fax, s.email, s.url, s.zip, s.town, s.note, s.client, s.fournisseur'; $sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; @@ -758,7 +756,6 @@ class Societe extends CommonObject $this->address = $obj->address; $this->zip = $obj->zip; - $this->cp = $obj->zip; // TODO obsolete $this->town = $obj->town; $this->pays_id = $obj->country_id; // TODO obsolete @@ -2438,8 +2435,7 @@ class Societe extends CommonObject $this->nom=$name; // TODO obsolete $this->name=$name; $this->address=$member->address; - $this->cp=$member->cp; // TODO obsolete - $this->zip=$member->cp; + $this->zip=$member->zip; $this->town=$member->town; $this->pays_code=$member->country_code; // TODO obsolete $this->country_code=$member->country_code; @@ -2502,13 +2498,12 @@ class Societe extends CommonObject $this->id=0; $this->name=empty($conf->global->MAIN_INFO_SOCIETE_NOM)?'':$conf->global->MAIN_INFO_SOCIETE_NOM; $this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS; - $this->zip=empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP; + $this->zip=empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP; $this->town=empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN; $this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT; $this->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE; $this->nom=$this->name; // deprecated - $this->cp=$this->zip; // deprecated // We define country_id, country_code and country $country_id=$country_code=$country_label=''; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 7156d7e8cd9..ca21354e8e3 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -125,7 +125,7 @@ if ($_GET["socid"]) print "".$langs->trans('Address')."".nl2br($soc->address).""; - print ''.$langs->trans('Zip').''.$soc->cp.""; + print ''.$langs->trans('Zip').''.$soc->zip.""; print ''.$langs->trans('Town').''.$soc->town.""; print ''.$langs->trans('Country').''.$soc->pays.''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 6140ccf4261..ed46bde9ba6 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -583,7 +583,7 @@ else if (! empty($conf->fournisseur->enabled) && (GETPOST("type")=='f' || GETPOST("type")=='')) { $object->fournisseur=1; } $object->name = GETPOST('nom'); - $object->firstname = GETPOST('prenom'); + $object->firstname = GETPOST('firstname'); $object->particulier = $private; $object->prefix_comm = GETPOST('prefix_comm'); $object->client = GETPOST('client')?GETPOST('client'):$object->client; diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index 4434777be74..282fed25f2e 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -485,8 +485,8 @@ function getContactsForThirdParty($authentication,$idthirdparty) { $linesinvoice=array(); - $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.name as lastname, c.firstname,"; - $sql.= " c.address, c.cp as zip, c.ville as town,"; + $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname,"; + $sql.= " c.address, c.zip, c.town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; $sql.= " c.birthday,"; @@ -495,7 +495,7 @@ function getContactsForThirdParty($authentication,$idthirdparty) $sql.= " p.libelle as country, p.code as country_code,"; $sql.= " d.nom as state, d.code_departement as state_code,"; $sql.= " u.rowid as user_id, u.login as user_login,"; - $sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.ville as soccity, s.default_lang as socdefault_lang"; + $sql.= " s.nom as socname, s.address as socaddress, s.zip as soccp, s.town as soccity, s.default_lang as socdefault_lang"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON c.fk_pays = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d ON c.fk_departement = d.rowid"; From cb28300d7e8e573f2c8eb0fefc4534c8c87c371c Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 17:17:25 +0100 Subject: [PATCH 63/76] fix error commit --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 5 ----- 1 file changed, 5 deletions(-) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 9a431e78146..90ec1908a7d 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -73,8 +73,3 @@ alter table llx_societe_address CHANGE COLUMN cp zip varchar(10); ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL AFTER description; ALTER TABLE llx_c_shipment_mode MODIFY COLUMN rowid INT(11) NOT NULL AUTO_INCREMENT; - -INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('UPS','UPS','United Parcel Service','http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1={TRACKID}',0); -INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}',0); -INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('GLS','GLS','General Logistics Systems','http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo={TRACKID}',0); -INSERT INTO llx_c_shipment_mode (code,libelle,description,tracking,active) VALUES ('CHRONO','Chronopost','Chronopost','http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros={TRACKID}',0); From a6378ab0bb430f146434b1ea564e7e8d67da6a28 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 18:08:27 +0100 Subject: [PATCH 64/76] Cleaner HTML code --- htdocs/core/lib/ajax.lib.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 4f7beb5356b..64b1339a944 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -364,7 +364,8 @@ function ajax_constantonoff($code, $input=array(), $entity=false) $entity = ((isset($entity) && is_numeric($entity) && $entity >= 0) ? $entity : $conf->entity); - $out= ''; + '."\n"; $out.= ''; $out.= ''.img_picto($langs->trans("Disabled"),'switch_off').''; $out.= ''.img_picto($langs->trans("Enabled"),'switch_on').''; + $out.="\n"; return $out; } From fe4ef693609f23f932644ad21b11fb213b369785 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 18:08:52 +0100 Subject: [PATCH 65/76] Fix: Duplicate form --- htdocs/admin/security_other.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 9cda778b98c..c082183a046 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -200,7 +200,6 @@ if (function_exists("imagecreatefrompng")) } else { - $form = new Form($db); $desc = $form->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); print $desc; } From 234e171e9decf61e73611a17ef1625712b02a2bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 18:16:26 +0100 Subject: [PATCH 66/76] New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page. --- ChangeLog | 3 ++- htdocs/core/lib/security2.lib.php | 7 ++++++- htdocs/core/tpl/login.tpl.php | 4 ++-- htdocs/theme/eldy/style.css.php | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28c424736d0..f546d48a75e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,7 +28,8 @@ For developers: - Renamed some database fields, code variables and parameters from french to english. - First change to manage margins on contracts. - Add hook getFormMail. - +- New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page. + For translators: - Update language files. diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 0d39fff1d47..2cecbd606ca 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -292,13 +292,18 @@ function dol_loginfunction($langs,$conf,$mysoc) // Google AD $main_google_ad_client = ((! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))?1:0); + // Set jquery theme $dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:''); $favicon=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico'; $jquerytheme = 'smoothness'; if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; + // Set dol_hide_topmenu and dol_hide_leftmenu + $dol_hide_topmenu=GETPOST('dol_hide_topmenu'); + $dol_hide_leftmenu=GETPOST('dol_hide_leftmenu'); - include $template_dir.'login.tpl.php'; // To use native PHP + // Include login page template + include $template_dir.'login.tpl.php'; $_SESSION["dol_loginmesg"] = ''; diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 9bdd8369f70..5e727ba7f15 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -89,8 +89,8 @@ $(document).ready(function () { - - + + diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a3c1837548e..84d9f147d05 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -188,7 +188,7 @@ print '*/'."\n"; /* ============================================================================== */ body { - +browser->phone)) { ?> background-color: #FFFFFF; background: ; From 24eab5b8fd33ef0a9fa5bd7dd732f965c3aea6ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 18:22:28 +0100 Subject: [PATCH 67/76] New: Add page with seach only boxes. --- htdocs/core/search_jmobile.php | 110 +++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 htdocs/core/search_jmobile.php diff --git a/htdocs/core/search_jmobile.php b/htdocs/core/search_jmobile.php new file mode 100644 index 00000000000..9a86fb8619a --- /dev/null +++ b/htdocs/core/search_jmobile.php @@ -0,0 +1,110 @@ + + * + * This file is a modified version of datepicker.php from phpBSM to fix some + * bugs, to add new features and to dramatically increase speed. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/search_jmobile.php + * \brief File to return search box + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); +//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); + +require_once '../main.inc.php'; + +if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php +$langs->load("main"); +$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); +$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); + +//var_dump($langs->defaultlang); +//var_dump($conf->format_date_short_java); +//var_dump($langs->trans("FormatDateShortJava")); + + + +/* + * View + */ + +// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests +top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); + + + +print ''."\n"; +print '
'; + +// Define $searchform +if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) +{ + $langs->load("companies"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname'); +} + +if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire) +{ + $langs->load("companies"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname'); +} + +if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) + && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) +{ + $langs->load("products"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/liste.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall'); +} + +if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) + && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) +{ + $langs->load("products"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/liste.php', DOL_URL_ROOT.'/fourn/product/liste.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier'); +} + +if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) +{ + $langs->load("members"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall'); +} + +// Execute hook printSearchForm +$parameters=array(); +$searchform.=$hookmanager->executeHooks('printSearchForm',$parameters); // Note that $action and $object may have been modified by some hooks + + +print "\n"; +print "\n"; +print '
'."\n"; +print $searchform; +print '
'."\n"; +print "\n"; + +print '
'; +print ''."\n"; + +$db->close(); +?> From 7238c5156e24d9e7e10baba6035d8777e511a1e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Feb 2013 19:33:06 +0100 Subject: [PATCH 68/76] New: Update jquery mobile lib --- COPYRIGHT | 2 +- .../mobile/jquery.mobile-latest.min.js | 177 +----------------- 2 files changed, 3 insertions(+), 176 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 62a925d436f..e06586aa7c2 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -36,7 +36,7 @@ jQuery blockUI 2.43 GPL and MIT Licence Yes JS libra jQuery jPicker 1.1.00 GPL and MIT Licence Yes JS library for color picker with not defined list of colors jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15) jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows) -jQuery Mobile 1.0rc2 GPL and MIT Licence Yes JS library for smartphone (not used) +jQuery Mobile 1.3 GPL and MIT Licence Yes JS library for smartphone (not used) jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports) diff --git a/htdocs/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js b/htdocs/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js index a99df190355..8d12031a373 100644 --- a/htdocs/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js +++ b/htdocs/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js @@ -1,175 +1,2 @@ -/*! - * jQuery Mobile v1.0rc2 - * http://jquerymobile.com/ - * - * Copyright 2010, jQuery Project - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - */ -(function(a,d){if(a.cleanData){var b=a.cleanData;a.cleanData=function(c){for(var e=0,d;(d=c[e])!=null;e++)a(d).triggerHandler("remove");b(c)}}else{var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){e||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return c.call(a(this),b,e)})}}a.widget=function(c,b,d){var h=c.split(".")[0],i,c=c.split(".")[1];i=h+"-"+c;if(!d)d=b,b=a.Widget;a.expr[":"][i]=function(b){return!!a.data(b, -c)};a[h]=a[h]||{};a[h][c]=function(a,c){arguments.length&&this._createWidget(a,c)};b=new b;b.options=a.extend(true,{},b.options);a[h][c].prototype=a.extend(true,b,{namespace:h,widgetName:c,widgetEventPrefix:a[h][c].prototype.widgetEventPrefix||c,widgetBaseClass:i},d);a.widget.bridge(c,a[h][c])};a.widget.bridge=function(c,b){a.fn[c]=function(g){var h=typeof g==="string",i=Array.prototype.slice.call(arguments,1),k=this,g=!h&&i.length?a.extend.apply(null,[true,g].concat(i)):g;if(h&&g.charAt(0)==="_")return k; -h?this.each(function(){var b=a.data(this,c);if(!b)throw"cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'";if(!a.isFunction(b[g]))throw"no such method '"+g+"' for "+c+" widget instance";var e=b[g].apply(b,i);if(e!==b&&e!==d)return k=e,false}):this.each(function(){var d=a.data(this,c);d?d.option(g||{})._init():a.data(this,c,new b(g,this))});return k}};a.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"", -options:{disabled:false},_createWidget:function(c,b){a.data(b,this.widgetName,this);this.element=a(b);this.options=a.extend(true,{},this.options,this._getCreateOptions(),c);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var c={};a.metadata&&(c=a.metadata.get(element)[this.widgetName]);return c},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName); -this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,b){var g=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c==="string"){if(b===d)return this.options[c];g={};g[c]=b}this._setOptions(g);return this},_setOptions:function(c){var b=this;a.each(c,function(a,c){b._setOption(a,c)});return this},_setOption:function(a,c){this.options[a]=c;a==="disabled"&& -this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(c,b,d){var h=this.options[c],b=a.Event(b);b.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();d=d||{};if(b.originalEvent)for(var c=a.event.props.length,i;c;)i=a.event.props[--c],b[i]=b.originalEvent[i];this.element.trigger(b, -d);return!(a.isFunction(h)&&h.call(this.element[0],b,d)===false||b.isDefaultPrevented())}}})(jQuery); -(function(a,d){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_getCreateOptions:function(){var b=this.element,c={};a.each(this.options,function(a){var e=b.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));e!==d&&(c[a]=e)});return c},enhanceWithin:function(b){var c=a(b).data("page"),c=c&&c.keepNativeSelector();a(this.options.initSelector,b).not(c||"")[this.widgetName]()}})})(jQuery); -(function(a){a(window);var d=a("html");a.mobile.media=function(){var b={},c=a("
"),f=a("").append(c);return function(a){if(!(a in b)){var g=document.createElement("style"),h="@media "+a+" { #jquery-mediatest { position:absolute; } }";g.type="text/css";g.styleSheet?g.styleSheet.cssText=h:g.appendChild(document.createTextNode(h));d.prepend(f).prepend(g);b[a]=c.css("position")==="absolute";f.add(g).remove()}return b[a]}}()})(jQuery); -(function(a,d){function b(a){var c=a.charAt(0).toUpperCase()+a.substr(1),a=(a+" "+e.join(c+" ")+c).split(" "),b;for(b in a)if(f[a[b]]!==d)return true}var c=a("").prependTo("html"),f=c[0].style,e=["Webkit","Moz","O"],g="palmGetResource"in window,h=window.blackberry;a.mobile.browser={};a.mobile.browser.ie=function(){for(var a=3,c=document.createElement("div"),b=c.all||[];c.innerHTML="<\!--[if gt IE "+ ++a+"]>
",b[0];);return a>4?a:!a}();a.extend(a.support,{orientation:"orientation"in -window&&"onorientationchange"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:"pushState"in history&&"replaceState"in history,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!b("content"),touchOverflow:!!b("overflowScrolling"),boxShadow:!!b("boxShadow")&&!h,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in c[0])&&!g,dynamicBaseTag:function(){var b=location.protocol+"//"+location.host+location.pathname+ -"ui-dir/",f=a("head base"),e=null,d="",g;f.length?d=f.attr("href"):f=e=a("",{href:b}).appendTo("head");g=a("").prependTo(c)[0].href;f[0].href=d||location.pathname;e&&e.remove();return g.indexOf(b)===0}()});c.remove();g=function(){var a=window.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();a.mobile.ajaxBlacklist=window.blackberry&&!window.WebKitPoint|| -window.operamini&&Object.prototype.toString.call(window.operamini)==="[object OperaMini]"||g;g&&a(function(){a("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")});a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery); -(function(a,d,b,c){function f(a){for(;a&&typeof a.originalEvent!=="undefined";)a=a.originalEvent;return a}function e(c){for(var b={},f,u;c;){f=a.data(c,l);for(u in f)if(f[u])b[u]=b.hasVirtualBinding=true;c=c.parentNode}return b}function g(){s&&(clearTimeout(s),s=0);s=setTimeout(function(){E=s=0;v.length=0;D=false;y=true},a.vmouse.resetTimerDuration)}function h(b,u,e){var d,g;if(!(g=e&&e[b])){if(e=!e)a:{for(e=u.target;e;){if((g=a.data(e,l))&&(!b||g[b]))break a;e=e.parentNode}e=null}g=e}if(g){d=u;var e= -d.type,j,h;d=a.Event(d);d.type=b;g=d.originalEvent;j=a.event.props;if(g)for(h=j.length;h;)b=j[--h],d[b]=g[b];if(e.search(/mouse(down|up)|click/)>-1&&!d.which)d.which=1;if(e.search(/^touch/)!==-1&&(b=f(g),e=b.touches,b=b.changedTouches,e=e&&e.length?e[0]:b&&b.length?b[0]:c))for(g=0,len=z.length;gu||Math.abs(b.pageY- -t)>u;flags=e(c.target);x&&!d&&h("vmousecancel",c,flags);h("vmousemove",c,flags);g()}}function q(a){if(!y){y=true;var c=e(a.target),b;h("vmouseup",a,c);if(!x&&(b=h("vclick",a,c))&&b.isDefaultPrevented())b=f(a).changedTouches[0],v.push({touchID:E,x:b.clientX,y:b.clientY}),D=true;h("vmouseout",a,c);x=false;g()}}function m(c){var c=a.data(c,l),b;if(c)for(b in c)if(c[b])return true;return false}function j(){}function p(c){var b=c.substr(1);return{setup:function(){m(this)||a.data(this,l,{});a.data(this, -l)[c]=true;r[c]=(r[c]||0)+1;r[c]===1&&B.bind(b,i);a(this).bind(b,j);if(C)r.touchstart=(r.touchstart||0)+1,r.touchstart===1&&B.bind("touchstart",k).bind("touchend",q).bind("touchmove",o).bind("scroll",n)},teardown:function(){--r[c];r[c]||B.unbind(b,i);C&&(--r.touchstart,r.touchstart||B.unbind("touchstart",k).unbind("touchmove",o).unbind("touchend",q).unbind("scroll",n));var f=a(this),e=a.data(this,l);e&&(e[c]=false);f.unbind(b,j);m(this)||f.removeData(l)}}}var l="virtualMouseBindings",A="virtualTouchID", -d="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),z="clientX clientY pageX pageY screenX screenY".split(" "),r={},s=0,w=0,t=0,x=false,v=[],D=false,y=false,C="addEventListener"in b,B=a(b),u=1,E=0;a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var F=0;Fa.event.special.swipe.scrollSupressionThreshold&& -c.preventDefault()}}var d=f.originalEvent.touches?f.originalEvent.touches[0]:f,q={time:(new Date).getTime(),coords:[d.pageX,d.pageY],origin:a(f.target)},m;c.bind(h,e).one(g,function(){c.unbind(h,e);q&&m&&m.time-q.timea.event.special.swipe.horizontalDistanceThreshold&&Math.abs(q.coords[1]-m.coords[1])m.coords[0]?"swipeleft":"swiperight"); -q=m=b})})}};(function(a,c){function b(){var a=e();a!==d&&(d=a,f.trigger("orientationchange"))}var f=a(c),e,d;a.event.special.orientationchange={setup:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled)return false;d=e();f.bind("throttledresize",b)},teardown:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled)return false;f.unbind("throttledresize",b)},add:function(a){var c=a.handler;a.handler=function(a){a.orientation=e();return c.apply(this,arguments)}}};a.event.special.orientationchange.orientation= -e=function(){var b=true,b=document.documentElement;return(b=a.support.orientation?c.orientation%180==0:b&&b.clientWidth/b.clientHeight<1.1)?"portrait":"landscape"}})(jQuery,d);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",c)},teardown:function(){a(this).unbind("resize",c)}};var c=function(){e=(new Date).getTime();d=e-b;d>=250?(b=e,a(this).trigger("throttledresize")):(f&&clearTimeout(f),f=setTimeout(c,250-d))},b=0,f,e,d})();a.each({scrollstop:"scrollstart",taphold:"tap", -swipeleft:"swipe",swiperight:"swipe"},function(c,b){a.event.special[c]={setup:function(){a(this).bind(b,a.noop)}}})})(jQuery,this); -(function(a,d,b){function c(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var f="hashchange",e=document,g,h=a.event.special,i=e.documentMode,k="on"+f in d&&(i===b||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)};a.fn[f].delay=50;h[f]=a.extend(h[f],{setup:function(){if(k)return false;a(g.start)},teardown:function(){if(k)return false;a(g.stop)}});g=function(){function g(){var b=c(),e=l(m);if(b!==m)p(m=b,e),a(d).trigger(f);else if(e!==m)location.href=location.href.replace(/#.*/, -"")+e;i=setTimeout(g,a.fn[f].delay)}var h={},i,m=c(),j=function(a){return a},p=j,l=j;h.start=function(){i||g()};h.stop=function(){i&&clearTimeout(i);i=b};a.browser.msie&&!k&&function(){var b,d;h.start=function(){if(!b)d=(d=a.fn[f].src)&&d+c(),b=a('