diff --git a/ChangeLog b/ChangeLog
index 2e60a9f4f76..60e7c871cf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -144,37 +144,6 @@ For users:
- Fix: [ bug #972 ] Auto completion contact field do not take account the min caract number before search
- Fix : [ bug #971 ] html.form.class.php select_contact with autocomplete do not exclude id from exclude array
-For translators:
-- Update language files.
-
-For developers:
-- System of menu managers has been rewritten to reduce code to do same things.
-- An external module can force its theme.
-- Add function dol_set_focus('#xxx').
-- A mymodule can bring its own core/modules/mymodule/modules_mymodule.php file.
-- Removed some not used libraries.
-- More web services.
-- Renamed some database fields, code variables and parameters from french to english.
-- First change to manage margins on contracts.
-- Add hook getFormMail.
-- Function plimit of databases drivers accept -1 as value (it means default value set
- into conf->liste_limit).
-- New: Add option dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen,
- dol_no_mouse_hover and dol_use_jmobile onto login page (to support different terminal).
-- New: dol_syslog method accept a suffix to use different log files for log.
-- New: Type of fields are received by export format handlers.
-- New: when adding an action, we can define a free code to tag it for a specific need.
-- New: Enhance Dolibarr migration process to include migration script of external
- modules.
-- New: [ task #811 ] Uniformanize note field.
-
-
-WARNING: If you used external modules, some of them may need to be upgraded due to:
-- Fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse, tel
- were renamed into lastname, firstname, zip, town, address, phone).
- This may also be true for some fields into web services.
-- If module use hook pdf_writelinedesc, module may have to add return 1 at end of
- function to keep same behaviour.
***** ChangeLog for 3.3.4 compared to 3.3.3 *****
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index fd11266b74f..d0d21e43e64 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -64,7 +64,7 @@ if ($action == 'updateMask')
if (isset($res))
{
- if ($res < 0)
+ if ($res > 0)
setEventMessage($langs->trans("SetupSaved"));
else
setEventMessage($langs->trans("Error"), 'errors');
@@ -536,4 +536,4 @@ print '';
llxFooter();
$db->close();
-?>
\ No newline at end of file
+?>
diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php
index bece4ebdf3c..3140834b626 100644
--- a/htdocs/contrat/liste.php
+++ b/htdocs/contrat/liste.php
@@ -80,7 +80,7 @@ $sql.= " AND c.entity = ".$conf->entity;
if ($socid) $sql.= " AND s.rowid = ".$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
-if ($search_contract) $sql.= " AND (".(is_numeric($search_contract)?"c.rowid = '".$db->escape($search_contract)."' OR ":'')." c.ref = '".$db->escape($search_contract)."')";
+if ($search_contract) $sql.= " AND (".(is_numeric($search_contract)?"c.rowid = ".$db->escape($search_contract)." OR ":'')." c.ref LIKE '%".$db->escape($search_contract)."%')";
if ($sall) $sql.= " AND (s.nom LIKE '%".$db->escape($sall)."%' OR cd.label LIKE '%".$db->escape($sall)."%' OR cd.description LIKE '%".$db->escape($sall)."%')";
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut,";
$sql.= " s.nom, s.rowid";
diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
index 8f37976f3b1..245632d55f2 100644
--- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
@@ -538,7 +538,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
- global $conf;
+ global $conf,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs);
$pdf->SetFont('','', $default_font_size);
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index 5f4e7c601bf..ce64f9e660d 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -321,17 +321,37 @@ class modSociete extends DolibarrModules
unset($this->export_entities_array[$r]['s.code_fournisseur']);
}
// Add extra fields
- $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact'";
+ $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople'";
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
- {
- $fieldname='extra.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_entities_array[$r][$fieldname]='contact';
- }
+ while ($obj=$this->db->fetch_object($resql))
+ {
+ $fieldname='extra.'.$obj->name;
+ $fieldlabel=ucfirst($obj->label);
+ $typeFilter="Text";
+ switch($obj->type)
+ {
+ case 'int':
+ case 'double':
+ case 'price':
+ $typeFilter="Numeric";
+ break;
+ case 'date':
+ case 'datetime':
+ $typeFilter="Date";
+ break;
+ case 'boolean':
+ $typeFilter="Boolean";
+ break;
+ case 'sellist':
+ $typeFilter="List:".$obj->param;
+ break;
+ }
+ $this->export_fields_array[$r][$fieldname]=$fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
+ $this->export_entities_array[$r][$fieldname]='contact';
+ }
}
// End add axtra fields
$this->export_sql_start[$r]='SELECT DISTINCT ';
@@ -355,7 +375,7 @@ class modSociete extends DolibarrModules
$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.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.phone'=>"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_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'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' AND entity = ".$conf->entity;
+ $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
@@ -390,7 +410,7 @@ class modSociete extends DolibarrModules
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // 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.lastname'=>"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_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation");
// Add extra fields
- $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact' AND entity = ".$conf->entity;
+ $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php
index 855cf4c74ae..db600493478 100644
--- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php
+++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php
@@ -56,7 +56,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
$texte = $langs->trans('GenericNumRefModelDesc')."
\n";
$texte.= '