diff --git a/ChangeLog b/ChangeLog
index 69005b0c492..1235a85e097 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,9 +11,10 @@ NEW: complete_head_from_modules() in ldap_prepare_head()
WARNING:
-Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
+Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The methode "cloture" on contact were renamed into "closeAll".
-
+* The substitution key for reference of object is now __REF__ whatever is the object (it replaces __ORDERREF__,
+ __PROPALREF__, ...)
***** ChangeLog for 6.0.0 compared to 5.0.* *****
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 80cc9b0856c..e0fa89d924d 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -366,7 +366,9 @@ if ($nboftargetok) {
}
else # For a maintenance release
{
- print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
+ #print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
+ print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
+
}
print "\n";
if (! $ret)
diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php
index f745032f575..20173eb914a 100755
--- a/dev/examples/code/create_user.php
+++ b/dev/examples/code/create_user.php
@@ -60,14 +60,14 @@ $db->begin();
require_once(DOL_DOCUMENT_ROOT."/user/class/user.class.php");
-// Create invoice object
+// Create user object
$obj = new User($db);
//$obj->initAsSpecimen();
$obj->login = 'ABCDEF';
$obj->nom = 'ABCDEF';
-// Create invoice
+// Create user
$idobject=$obj->create($user);
if ($idobject > 0)
{
diff --git a/dev/examples/code/get_contracts.php b/dev/examples/code/get_contracts.php
index 1262fe3eebd..fbe512300e8 100755
--- a/dev/examples/code/get_contracts.php
+++ b/dev/examples/code/get_contracts.php
@@ -67,7 +67,7 @@ $db->begin();
require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
-// Create invoice object
+// Create contract object
$obj = new Contrat($db);
$obj->socid=$argv[1];
diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index 9df72687da8..5c17f07183e 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -289,7 +289,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
{
$ok = 0;
- $msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'
';
+ $msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'
';
}*/
}
if (isset($_POST["country"]) && ($_POST["country"]=='0') && ($id != 2))
@@ -740,15 +740,6 @@ if ($id)
print '';
print "";
- if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates')
- {
- print '
| '.$langs->trans("Inventory").' | '."\n"; print ''; print ' | '."\n"; - + // Example with a yes / no select print ' |
| '.$langs->trans("INVENTORY_DISABLE_VIRTUAL").' | '; @@ -454,7 +454,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print ''; print ''; print '
| '.$langs->trans("INVENTORY_USE_MIN_PA_IF_NO_LAST_PA").' | '; @@ -467,7 +467,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print ''; print ''; print '
| '.$langs->trans("INVENTORY_USE_INVENTORY_DATE_FROM_DATEMVT").' | '; @@ -480,7 +480,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print ''; print ''; print '
| '; + } // Thirpdarty if (! empty($arrayfields['s.nom']['checked'])) { @@ -1016,6 +946,7 @@ if ($resql) print ' | |
| '; - $generic_commande->id=$obj->rowid; - $generic_commande->ref=$obj->ref; - $generic_commande->statut = $obj->fk_statut; - $generic_commande->date_commande = $db->jdate($obj->date_commande); - $generic_commande->date_livraison = $db->jdate($obj->date_delivery); - $generic_commande->ref_client = $obj->ref_client; - $generic_commande->total_ht = $obj->total_ht; - $generic_commande->total_tva = $obj->total_tva; - $generic_commande->total_ttc = $obj->total_ttc; + $generic_commande->lines=array(); $generic_commande->getLinesArray(); @@ -1230,10 +1169,16 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - $companystatic->id=$obj->socid; - $companystatic->code_client = $obj->code_client; - $companystatic->name=$obj->name; - $companystatic->client=$obj->client; + // Project + if (! empty($arrayfields['p.project_ref']['checked'])) + { + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + print ' | '; + if ($obj->project_id > 0) print $projectstatic->getNomUrl(1); + print ' | '; + if (! $i) $totalarray['nbfield']++; + } // Third party if (! empty($arrayfields['s.nom']['checked'])) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 7c94e03e339..b32d4ea938e 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -145,7 +145,7 @@ if ($action == 'add') if ($id > 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $object->setCategories($categories); $_GET["id"]=$id; // Force chargement page en mode visu @@ -239,7 +239,7 @@ if ($action == 'update') if ($result >= 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $object->setCategories($categories); $_GET["id"]=$_POST["id"]; // Force chargement page en mode visu diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index a25447da224..b575180feed 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1255,6 +1255,7 @@ class Account extends CommonObject $label = '' . $langs->trans("ShowAccount") . ''; $label .= '
@@ -267,18 +268,17 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$message=preg_replace('/(| '; - if (! empty($action->author->id)) + if (! empty($action->userownerid)) { - $userstatic->id = $action->author->id; - $userstatic->firstname = $action->author->firstname; - $userstatic->lastname = $action->author->lastname; - print $userstatic->getNomUrl(1, '', 0, 0, 16, 0, '', ''); + $userstatic->fetch($action->userownerid); // TODO Introduce a cache on users fetched + print $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, '', ''); } print ' | '; print ''; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 932cc211d12..366247560ac 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -63,6 +63,7 @@ class FormMail extends Form var $withtoccc; var $withtopic; var $withfile; // 0=No attaches files, 1=Show attached files, 2=Can add new attached files + var $withmaindocfile; // 1=Add a checkbox "Attach also main document" for mass actions (checked by default), -1=Add checkbox (not checked by default) var $withbody; var $withfromreadonly; @@ -103,7 +104,8 @@ class FormMail extends Form $this->withtoccc=0; $this->witherrorsto=0; $this->withtopic=1; - $this->withfile=0; + $this->withfile=0; // 1=Add section "Attached files". 2=Can add files. + $this->withmaindocfile=0; // 1=Add a checkbox "Attach also main document" for mass actions (checked by default), -1=Add checkbox (not checked by default) $this->withbody=1; $this->withfromreadonly=1; @@ -220,6 +222,7 @@ class FormMail extends Form /** * Show the form to input an email * this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files + * this->withmaindocfile * * @param string $addfileaction Name of action when posting file attachments * @param string $removefileaction Name of action when removing file attachments @@ -233,6 +236,7 @@ class FormMail extends Form /** * Get the form to input an email * this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files + * this->withfile * this->param: Contains more parameteres like email templates info * * @param string $addfileaction Name of action when posting file attachments @@ -296,16 +300,25 @@ class FormMail extends Form } $arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id); //var_dump($this->param["models"]); + //var_dump($model_id); //var_dump($arraydefaultmessage); - $out.= "\n".''."\n"; + $out.= "\n".''."\n"; if ($this->withform == 1) { $out.= ' |