diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index 2c35faea3b1..b896c8962b4 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -894,7 +894,7 @@ if ($resql) {
$valuetoshow = $langs->trans("Content"); $showfield = 0;
}
if ($fieldlist[$field] == 'content_lines') {
- $valuetoshow = $langs->trans("ContentLines"); $showfield = 0;
+ $valuetoshow = $langs->trans("ContentForLines"); $showfield = 0;
}
// Show fields
@@ -973,6 +973,14 @@ if ($resql) {
$doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 500, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%');
print $doleditor->Create(1);
}
+ if ($tmpfieldlist == 'content_lines') {
+ print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
';
+ $okforextended = true;
+ if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
+ $okforextended = false;
+ $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%');
+ print $doleditor->Create(1);
+ }
print '';
print '
| ';
print ' | ';
@@ -1114,35 +1122,6 @@ if ($resql) {
//else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin
}
print '';
-
- /*
- $fieldsforcontent = array('content');
- if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES))
- {
- $fieldsforcontent = array('content', 'content_lines');
- }
- foreach ($fieldsforcontent as $tmpfieldlist)
- {
- $showfield = 1;
- $align = "left";
- $valuetoshow = $obj->{$tmpfieldlist};
-
- $class = 'tddict';
- // Show value for field
- if ($showfield) {
-
- print '| '; // To create an artificial CR for the current tr we are on
- $okforextended = true;
- if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
- $okforextended = false;
- $doleditor = new DolEditor($tmpfieldlist.'-'.$i, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%', 1);
- print $doleditor->Create(1);
- print ' | ';
- print ' | | | ';
-
- }
- }*/
-
print "
\n";
}
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index a23a620359e..d63b0e7acb0 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -2545,7 +2545,7 @@ class Contrat extends CommonObject
if (!$error) {
foreach ($this->lines as $line) {
- $result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
+ $result = $clonedObj->addline($line->description, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
if ($result < 0) {
$error++;
$this->error = $clonedObj->error;
diff --git a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
index 98aed557557..f37bda11104 100644
--- a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
+++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
@@ -65,6 +65,8 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
public function loadBox($max = 5)
{
global $conf, $user, $langs;
+ $dataseries = "";
+ $graphtoshow = "";
$badgeStatus0 = '#cbd3d3'; // draft
$badgeStatus1 = '#bc9526'; // validated
diff --git a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php
index ce8d7ab0078..435cc76451e 100644
--- a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php
+++ b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php
@@ -98,10 +98,10 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes
$num = $this->db->num_rows($resql);
if ($num > 0) {
$objp = $this->db->fetch_object($resql);
- $data[] = array($langs->trans('TicketCreatedToday'), $objp->nb);
+ $data[] = array($langs->transnoentitiesnoconv('TicketCreatedToday'), $objp->nb);
$totalnb += $objp->nb;
} else {
- $data[] = array($langs->trans('TicketCreatedToday'), 0);
+ $data[] = array($langs->transnoentitiesnoconv('TicketCreatedToday'), 0);
}
} else {
dol_print_error($this->db);
@@ -116,10 +116,10 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes
$num = $this->db->num_rows($resql);
if ($num > 0) {
$objp = $this->db->fetch_object($resql);
- $data[] = array($langs->trans('TicketClosedToday'), $objp->nb);
+ $data[] = array($langs->transnoentitiesnoconv('TicketClosedToday'), $objp->nb);
$totalnb += $objp->nb;
} else {
- $data[] = array($langs->trans('TicketClosedToday'), 0);
+ $data[] = array($langs->transnoentitiesnoconv('TicketClosedToday'), 0);
}
} else {
dol_print_error($this->db);
diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php
index 2856b535a3e..d93d0b67ff9 100644
--- a/htdocs/core/class/commonobjectline.class.php
+++ b/htdocs/core/class/commonobjectline.class.php
@@ -111,4 +111,20 @@ abstract class CommonObjectLine extends CommonObject
return -1;
}
}
+
+ /**
+ * Empty function to prevent errors on call of this function must be overload if usefull
+ *
+ * @param string $sortorder Sort Order
+ * @param string $sortfield Sort field
+ * @param int $limit offset limit
+ * @param int $offset offset limit
+ * @param array $filter filter array
+ * @param string $filtermode filter mode (AND or OR)
+ * @return int <0 if KO, >0 if OK
+ */
+ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
+ {
+ return 0;
+ }
}
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index a892c557b34..26701cde6ff 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -1054,6 +1054,7 @@ class DolGraph
}
$showlegend = $this->showlegend;
+ $bordercolor = "";
$legends = array();
$nblot = 0;
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index ca3908fe843..4f9ec52dd8d 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -1526,7 +1526,7 @@ class FormMail extends Form
$product = new Product($this->db);
$product->fetch($line->fk_product, '', '', 1);
$product->fetch_optionals();
- if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) {
+ if (is_array($extrafields->attributes[$product->table_element]['label']) && count($extrafields->attributes[$product->table_element]['label']) > 0) {
foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) {
$substit_line['__PRODUCT_EXTRAFIELD_'.strtoupper($key).'__'] = $product->array_options['options_'.$key];
}
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 89260c35d03..b9f320b7db8 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -753,6 +753,8 @@ class FormTicket
print ajax_combobox('select'.$htmlname);
} elseif ($htmlname!='') {
+ $selectedgroups = array();
+ $groupvalue = "";
$groupticket=GETPOST($htmlname, 'aZ09');
$child_id=GETPOST($htmlname.'_child_id', 'aZ09')?GETPOST($htmlname.'_child_id', 'aZ09'):0;
if (!empty($groupticket)) {
diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php
index 212e766589c..7cc95c81fe0 100644
--- a/htdocs/core/tpl/card_presend.tpl.php
+++ b/htdocs/core/tpl/card_presend.tpl.php
@@ -210,6 +210,9 @@ if ($action == 'presend') {
}
// Make substitution in email content
+ if ($object) {
+ $formmail->setSubstitFromObject($object, $langs);
+ }
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, $arrayoffamiliestoexclude, $object);
$substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '
' : '';
$substitutionarray['__PERSONALIZED__'] = ''; // deprecated
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index c02306ba6be..d72941d2885 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -288,7 +288,7 @@ if ($projectid > 0) {
$morehtmlref .= '';
// Define a complementary filter for search of next/prev ref.
- if (!$user->rights->project->all->lire) {
+ if (empty($user->rights->project->all->lire)) {
$objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
$project->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
}
diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql
index 46f0963c371..9e13c6aaf21 100644
--- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql
+++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql
@@ -378,3 +378,8 @@ ALTER TABLE llx_societe_perentity ADD COLUMN accountancy_code_customer varchar(2
ALTER TABLE llx_societe_perentity ADD COLUMN accountancy_code_supplier varchar(24) AFTER accountancy_code_customer; -- equivalent to code_compta_supplier in llx_societe
ALTER TABLE llx_projet_task ADD COLUMN budget_amount double(24,8) AFTER priority;
+
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_ticket_by_severity.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_ticket_by_severity.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_ticket_last_x_days.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_nb_ticket_last_x_days.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_tickets_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_nb_tickets_type.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_new_vs_close_ticket.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_new_vs_close_ticket.php' AND entity = 1);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 58ec7dd6be0..f75ba12abe5 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -279,6 +279,7 @@ SpaceX=Space X
SpaceY=Space Y
FontSize=Font size
Content=Content
+ContentForLines=Content to display for each product or service (from variable __LINES__ of Content)
NoticePeriod=Notice period
NewByMonth=New by month
Emails=Emails
diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang
index 9298219c73f..016b303e18b 100644
--- a/htdocs/langs/es_ES/admin.lang
+++ b/htdocs/langs/es_ES/admin.lang
@@ -280,6 +280,7 @@ SpaceX=Área X
SpaceY=Área Y
FontSize=Tamaño de fuente
Content=Contenido
+ContentForLines=Contenido a mostrar por cada línea de producto o servicio (de la variable __LINES__ definida en Contenido)
NoticePeriod=Plazo de aviso
NewByMonth=Nuevo por mes
Emails=E-Mails
diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php
index 92351184ebe..86d4758b45f 100644
--- a/htdocs/mrp/class/api_mos.class.php
+++ b/htdocs/mrp/class/api_mos.class.php
@@ -491,7 +491,8 @@ class Mos extends DolibarrApi
if (!$error && $line->fk_warehouse > 0) {
// Record stock movement
$id_product_batch = 0;
- $stockmove->origin = $this->mo;
+ $stockmove->origin_type = 'mo';
+ $stockmove->origin_id = $this->mo->id;
if ($qtytoprocess >= 0) {
$idstockmove = $stockmove->livraison(DolibarrApiAccess::$user, $line->fk_product, $line->fk_warehouse, $qtytoprocess, 0, $labelmovement, dol_now(), '', '', $tmpproduct->status_batch, $id_product_batch, $codemovement);
} else {
@@ -550,7 +551,8 @@ class Mos extends DolibarrApi
if (!$error && $line->fk_warehouse > 0) {
// Record stock movement
$id_product_batch = 0;
- $stockmove->origin = $this->mo;
+ $stockmove->origin_type = 'mo';
+ $stockmove->origin_id = $this->mo->id;
if ($qtytoprocess >= 0) {
$idstockmove = $stockmove->livraison(DolibarrApiAccess::$user, $line->fk_product, $line->fk_warehouse, $qtytoprocess, 0, $labelmovement, dol_now(), '', '', $tmpproduct->status_batch, $id_product_batch, $codemovement);
} else {
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index a7ed52687df..cdad4e71968 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -625,6 +625,7 @@ class Mo extends CommonObject
public function updateProduction(User $user, $notrigger = true)
{
$error = 0;
+ $role = "";
if ($this->status != self::STATUS_DRAFT) {
$this->error = 'BadStatus';
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 83f27c11796..6271f0695fd 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -773,7 +773,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print '
';
}
if (!empty($conf->eventorganization->enabled)) {
- print 'usage_organize_event ? ' checked="checked"' : '')).'"> ';
+ print 'usage_organize_event ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index 1f2816520bf..2566ee81073 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -478,8 +478,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
// Output page
// --------------------------------------------------------------------
-llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs');
-
+llxHeader('', $title, $help_url, '', 0, 0, '', '', '', '');
if ($socid && !$projectid && !$project_ref && $user->rights->societe->lire) {
$socstat = new Societe($db);
diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php
index dbf2f3dd125..554f7e7e996 100644
--- a/htdocs/webservices/server_thirdparty.php
+++ b/htdocs/webservices/server_thirdparty.php
@@ -103,7 +103,7 @@ $thirdparty_fields = array(
'address' => array('name'=>'address', 'type'=>'xsd:string'),
'zip' => array('name'=>'zip', 'type'=>'xsd:string'),
'town' => array('name'=>'town', 'type'=>'xsd:string'),
- 'province_id' => array('name'=>'province_id', 'type'=>'xsd:string'),
+ 'region_code' => array('name'=>'region_code', 'type'=>'xsd:string'),
'country_id' => array('name'=>'country_id', 'type'=>'xsd:string'),
'country_code' => array('name'=>'country_code', 'type'=>'xsd:string'),
'country' => array('name'=>'country', 'type'=>'xsd:string'),
@@ -343,7 +343,7 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '', $bar
'address' => $thirdparty->address,
'zip' => $thirdparty->zip,
'town' => $thirdparty->town,
- 'province_id' => $thirdparty->state_id,
+ 'region_code' => $thirdparty->region_code,
'country_id' => $thirdparty->country_id,
'country_code' => $thirdparty->country_code,
'country' => $thirdparty->country,
@@ -462,7 +462,7 @@ function createThirdParty($authentication, $thirdparty)
if ($thirdparty['country_code']) {
$newobject->country_id = getCountry($thirdparty['country_code'], 3);
}
- $newobject->province_id = $thirdparty['province_id'];
+ $newobject->region_code = $thirdparty['region_code'];
//if ($thirdparty['province_code']) $newobject->province_code=getCountry($thirdparty['province_code'],3);
$newobject->phone = $thirdparty['phone'];
@@ -597,7 +597,7 @@ function updateThirdParty($authentication, $thirdparty)
if ($thirdparty['country_code']) {
$object->country_id = getCountry($thirdparty['country_code'], 3);
}
- $object->province_id = $thirdparty['province_id'];
+ $object->region_code = $thirdparty['region_code'];
//if ($thirdparty['province_code']) $newobject->province_code=getCountry($thirdparty['province_code'],3);
$object->phone = $thirdparty['phone'];