diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php
index 3a4949b99a4..408b762358e 100644
--- a/htdocs/admin/facture_situation.php
+++ b/htdocs/admin/facture_situation.php
@@ -74,7 +74,7 @@ $head = invoice_admin_prepare_head();
dol_fiche_head($head, 'situation', $langs->trans("InvoiceSituation"), -1, 'invoice');
-print ''.$langs->trans("SituationInvoiceDesc").' ';
+print ''.$langs->trans("InvoiceFirstSituationDesc").' ';
/*
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index fdc30557ae7..03ca6e977bd 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -82,7 +82,7 @@ $cancel != $langs->trans("Cancel") &&
// check parameters
$forcelangprod = GETPOST('forcelangprod', 'alpha');
$libelle = GETPOST('libelle', 'alpha');
- $desc = GETPOST('desc');
+ $desc = GETPOST('desc', 'none');
if (empty($forcelangprod)) {
$error++;
@@ -345,7 +345,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print $formadmin->select_language(GETPOST('forcelangprod', 'alpha'), 'forcelangprod', 0, $object->multilangs);
print '';
print '
'.$langs->trans('Description').' ';
$doleditor = new DolEditor('desc', GETPOST('desc', 'none'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create();
diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php
index c240495c4a2..0a7e2fa2d17 100644
--- a/htdocs/compta/cashcontrol/cashcontrol_card.php
+++ b/htdocs/compta/cashcontrol/cashcontrol_card.php
@@ -256,7 +256,7 @@ if ($action == "create" || $action == "start")
$sql .= " WHERE fk_account = ".$bankid;
if ($syear && !$smonth) $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, 1))."'";
elseif ($syear && $smonth && !$sday) $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, $smonth))."'";
- elseif ($syear && $smonth && $sday) $sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
+ elseif ($syear && $smonth && $sday) $sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
else dol_print_error('', 'Year not defined');
$resql = $db->query($sql);
@@ -296,7 +296,7 @@ if ($action == "create" || $action == "start")
}
if ($syear && !$smonth) $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'";
elseif ($syear && $smonth && !$sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'";
- elseif ($syear && $smonth && $sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
+ elseif ($syear && $smonth && $sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
else dol_print_error('', 'Year not defined');
$resql = $db->query($sql);
@@ -330,7 +330,7 @@ if ($action == "create" || $action == "start")
print '';
print '';
print ''.$langs->trans("Module").' ';
- print ''.$langs->trans("CashDesk").' ID ';
+ print ''.$langs->trans("Terminal").' ';
print ''.$langs->trans("Year").' ';
print ''.$langs->trans("Month").' ';
print ''.$langs->trans("Day").' ';
@@ -343,7 +343,11 @@ if ($action == "create" || $action == "start")
print ' ';
print ''.$form->selectarray('posmodule', $arrayofposavailable, GETPOST('posmodule', 'alpha'), (count($arrayofposavailable) > 1 ? 1 : 0)).' ';
print '';
- $array = array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9");
+
+ $array = array();
+ for($i = 1; $i <= max(1, $conf->global->TAKEPOS_NUM_TERMINALS); $i++) {
+ $array[$i] = $i;
+ }
$selectedposnumber = 0; $showempty = 1;
if ($conf->global->TAKEPOS_NUM_TERMINALS == '1')
{
@@ -502,92 +506,97 @@ if ($action == "create" || $action == "start")
if (empty($action) || $action == "view")
{
- $object->fetch($id);
+ $result = $object->fetch($id);
llxHeader('', $langs->trans("CashControl"));
- $head = array();
- $head[0][0] = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id;
- $head[0][1] = $langs->trans("Card");
- $head[0][2] = 'cashcontrol';
-
- dol_fiche_head($head, 'cashcontrol', $langs->trans("CashControl"), -1, 'cashcontrol');
-
- $linkback = ''.$langs->trans("BackToList").' ';
-
- $morehtmlref = '';
- $morehtmlref .= '
';
-
-
- dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
-
- print '';
- print '
';
- print '
';
- print '
';
-
- print '';
- print $langs->trans("Ref");
- print ' ';
- print $id;
- print ' ';
-
- print ''.$langs->trans("Module").' ';
- print $object->posmodule;
- print " ";
-
- print ''.$langs->trans("CashDesk").' ID ';
- print $object->posnumber;
- print " ";
-
- print '';
- print $langs->trans("Period");
- print ' ';
- print $object->year_close."-".$object->month_close."-".$object->day_close;
- print ' ';
-
- print '
';
- print '
';
-
- print '
';
- print '
';
- print '
';
-
- print '';
- print $langs->trans("DateCreationShort");
- print ' ';
- print dol_print_date($object->date_creation, 'dayhour');
- print ' ';
-
- print ''.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").' ';
- print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency);
- print " ";
-
- foreach ($arrayofpaymentmode as $key => $val)
- {
- print ''.$langs->trans($val).' ';
- print price($object->$key, 0, $langs, 1, -1, -1, $conf->currency);
- print " ";
+ if ($result <= 0) {
+ print $langs->trans("ErrorRecordNotFound");
}
+ else {
+ $head = array();
+ $head[0][0] = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id;
+ $head[0][1] = $langs->trans("Card");
+ $head[0][2] = 'cashcontrol';
- print "
\n";
- print '
';
- print '
';
- print '
';
+ dol_fiche_head($head, 'cashcontrol', $langs->trans("CashControl"), -1, 'cashcontrol');
- dol_fiche_end();
+ $linkback = ''.$langs->trans("BackToList").' ';
- print '';
- print '
';
- if ($object->status == CashControl::STATUS_DRAFT)
- {
- print '
';
+ $morehtmlref = '
';
+ $morehtmlref .= '
';
- print '
';
- }
- print '
';
- print ' ';
+ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
+
+ print '';
+ print '
';
+ print '
';
+ print '
';
+
+ print '';
+ print $langs->trans("Ref");
+ print ' ';
+ print $id;
+ print ' ';
+
+ print ''.$langs->trans("Module").' ';
+ print $object->posmodule;
+ print " ";
+
+ print ''.$langs->trans("CashDesk").' ID ';
+ print $object->posnumber;
+ print " ";
+
+ print '';
+ print $langs->trans("Period");
+ print ' ';
+ print $object->year_close."-".$object->month_close."-".$object->day_close;
+ print ' ';
+
+ print '
';
+ print '
';
+
+ print '
';
+ print '
';
+ print '
';
+
+ print '';
+ print $langs->trans("DateCreationShort");
+ print ' ';
+ print dol_print_date($object->date_creation, 'dayhour');
+ print ' ';
+
+ print ''.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").' ';
+ print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency);
+ print " ";
+
+ foreach ($arrayofpaymentmode as $key => $val)
+ {
+ print ''.$langs->trans($val).' ';
+ print price($object->$key, 0, $langs, 1, -1, -1, $conf->currency);
+ print " ";
+ }
+
+ print "
\n";
+ print '
';
+ print '
';
+ print '
';
+
+ dol_fiche_end();
+
+ print '';
+ print '
';
+ if ($object->status == CashControl::STATUS_DRAFT)
+ {
+ print '
';
+
+ print '
';
+ }
+ print '
';
+
+ print ' ';
+ }
}
// End of page
diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php
index 6bb57a348da..5bf48189c4a 100644
--- a/htdocs/compta/cashcontrol/cashcontrol_list.php
+++ b/htdocs/compta/cashcontrol/cashcontrol_list.php
@@ -338,7 +338,7 @@ print ' ';
$permforcashfence = 1;
-$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
+$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit);
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 05b7fc88196..58cc8099ff5 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -538,7 +538,6 @@ class Facture extends CommonInvoice
$sql .= ", ".(empty($this->retained_warranty) ? "0" : $this->db->escape($this->retained_warranty));
$sql .= ", ".(!empty($this->retained_warranty_date_limit) ? "'".$this->db->idate($this->retained_warranty_date_limit)."'" : 'NULL');
$sql .= ", ".(int) $this->retained_warranty_fk_cond_reglement;
-
$sql .= ")";
$resql = $this->db->query($sql);
diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php
index 57138424465..370bfe9a8b9 100644
--- a/htdocs/compta/facture/invoicetemplate_list.php
+++ b/htdocs/compta/facture/invoicetemplate_list.php
@@ -328,7 +328,7 @@ if ($resql)
print_barre_liste($langs->trans("RepeatableInvoices"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
- print $langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).' ';
+ print ''.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).' ';
$i = 0;
diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php
index 7f38df2ef39..c623d660aaa 100644
--- a/htdocs/compta/prelevement/bons.php
+++ b/htdocs/compta/prelevement/bons.php
@@ -148,13 +148,23 @@ if ($result)
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
print " \n";
+ $directdebitorder = new BonPrelevement($db);
+
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($result);
- print '';
+ $directdebitorder->id = $obj->rowid;
+ $directdebitorder->ref = $obj->ref;
+ $directdebitorder->datec = $obj->datec;
+ $directdebitorder->amount = $obj->amount;
+ $directdebitorder->statut = $obj->statut;
- print ''.$obj->ref." \n";
+ print '';
+
+ print '';
+ print $directdebitorder->getNomUrl(1);
+ print " \n";
print ''.dol_print_date($db->jdate($obj->datec), 'day')." \n";
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index e09089d455b..c6cdb05f45a 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -1020,7 +1020,7 @@ else
print ' '.$langs->trans('State').' ';
}
- print $formcompany->select_state(GETPOSTISSET('state_id') ?GETPOST('state_id', 'alpha') : $object->state_id, $object->country_code, 'state_id');
+ print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : $object->state_id, $object->country_code, 'state_id');
print ' ';
}
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index aafda1197f6..c4c0aed1756 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -467,7 +467,7 @@ class CMailFile
} else {
$this->message->setBody($msg, 'text/plain');
// And optionally an alternative body
- $this->message->addPart($msg, 'text/html');
+ $this->message->addPart(dol_nl2br($msg), 'text/html');
}
if ($this->atleastonefile)
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 614b17a4967..88e7f9b5b43 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4130,9 +4130,6 @@ class Form
// Now add questions
$more .= ''."\n";
- if (!empty($formquestion['text'])) {
- $more .= '
'.$formquestion['text'].'
'."\n";
- }
foreach ($formquestion as $key => $input)
{
if (is_array($input) && !empty($input))
@@ -4246,8 +4243,11 @@ class Form
}
// Show JQuery confirm box. Note that global var $useglobalvars is used inside this template
$formconfirm .= '
';
+ if (!empty($formquestion['text'])) {
+ $formconfirm .= '
'.$formquestion['text'].'
'."\n";
+ }
if (!empty($more)) {
- $formconfirm .= '
'.$more.'
';
+ $formconfirm .= '
'.$more.'
'."\n";
}
$formconfirm .= ($question ? '
'.img_help('', '').' '.$question.'
' : '');
$formconfirm .= '
'."\n";
@@ -4339,6 +4339,11 @@ class Form
// Line title
$formconfirm .= '
'.img_picto('', 'recent').' '.$title.' '."\n";
+ // Line text
+ if (!empty($formquestion['text'])) {
+ $formconfirm .= '
'.$formquestion['text'].' '."\n";
+ }
+
// Line form fields
if ($more)
{
diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php
index 613992bdd2a..345a94b3a62 100644
--- a/htdocs/core/class/html.formmargin.class.php
+++ b/htdocs/core/class/html.formmargin.class.php
@@ -98,7 +98,11 @@ class FormMargin
$pv = $line->total_ht;
$pa_ht = ($pv < 0 ? - $line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
- $pa = $line->qty * $pa_ht;
+ if ($object->type == Facture::TYPE_SITUATION) {
+ $pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
+ } else {
+ $pa = $line->qty * $pa_ht;
+ }
// calcul des marges
if (isset($line->fk_remise_except) && isset($conf->global->MARGIN_METHODE_FOR_DISCOUNT)) { // remise
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 3d639d0dfcb..c379d1912d1 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -71,7 +71,7 @@ class FormOther
public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null)
{
// phpcs:enable
- global $conf;
+ global $conf, $langs, $user;
$sql = "SELECT rowid, label, fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."export_model";
@@ -81,7 +81,7 @@ class FormOther
$result = $this->db->query($sql);
if ($result)
{
- print '
';
+ print '';
if ($useempty)
{
print ' ';
@@ -92,24 +92,31 @@ class FormOther
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
+
+ $label = $obj->label;
+ if ($obj->fk_user == 0) {
+ $label .= ' ('.$langs->trans("Everybody").') ';
+ }
+ elseif (! empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) {
+ $tmpuser = new User($this->db);
+ $tmpuser->fetch($obj->fk_user);
+ $label .= ' ('.$tmpuser->getFullName($langs).') ';
+ }
+
if ($selected == $obj->rowid)
{
- print '';
+ print ' ';
}
else
{
- print ' ';
- }
- print $obj->label;
- if (! empty($conf->global->EXPORTS_SHARE_MODELS) && $fk_user == $obj->fk_user) {
- $tmpuser = new User($this->db);
- $tmpuser->fetch($fk_user);
- print ' ('.$tmpuser->getFullName().')';
+ print ' ';
}
+ print $label;
print ' ';
$i++;
}
print " ";
+ print ajax_combobox($htmlname);
}
else {
dol_print_error($this->db);
@@ -125,19 +132,23 @@ class FormOther
* @param string $htmlname Nom de la zone select
* @param string $type Type des modeles recherches
* @param int $useempty Affiche valeur vide dans liste
+ * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on)
* @return void
*/
- public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0)
+ public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0, $fk_user = null)
{
// phpcs:enable
- $sql = "SELECT rowid, label";
+ global $conf, $langs, $user;
+
+ $sql = "SELECT rowid, label, fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."import_model";
- $sql .= " WHERE type = '".$type."'";
+ $sql .= " WHERE type = '".$this->db->escape($type)."'";
+ if (!empty($fk_user)) $sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model
$sql .= " ORDER BY rowid";
$result = $this->db->query($sql);
if ($result)
{
- print '';
+ print '';
if ($useempty)
{
print ' ';
@@ -148,19 +159,31 @@ class FormOther
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
+
+ $label = $obj->label;
+ if ($obj->fk_user == 0) {
+ $label .= ' ('.$langs->trans("Everybody").') ';
+ }
+ elseif (! empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) {
+ $tmpuser = new User($this->db);
+ $tmpuser->fetch($obj->fk_user);
+ $label .= ' ('.$tmpuser->getFullName($langs).') ';
+ }
+
if ($selected == $obj->rowid)
{
- print '';
+ print ' ';
}
else
{
- print ' ';
+ print ' ';
}
- print $obj->label;
+ print $label;
print ' ';
$i++;
}
print " ";
+ print ajax_combobox($htmlname);
}
else {
dol_print_error($this->db);
diff --git a/htdocs/core/commonfieldsinexport.inc.php b/htdocs/core/commonfieldsinexport.inc.php
index d68954fc568..034fbcd4679 100644
--- a/htdocs/core/commonfieldsinexport.inc.php
+++ b/htdocs/core/commonfieldsinexport.inc.php
@@ -47,10 +47,12 @@ if (class_exists($keyforclass))
* break;
*/
}
+ $helpfield=preg_replace('/\(.*$/', '', $valuefield['help']);
if ($valuefield['enabled']) {
$this->export_fields_array[$r][$fieldname] = $fieldlabel;
$this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
$this->export_entities_array[$r][$fieldname] = $keyforelement;
+ $this->export_help_array[$r][$fieldname] = $helpfield;
}
}
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 1e6e8d2fc41..4e6a5b6b48a 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3349,7 +3349,7 @@ function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0
*/
function img_action($titlealt, $numaction)
{
- global $conf, $langs;
+ global $langs;
if (empty($titlealt) || $titlealt == 'default')
{
@@ -3374,7 +3374,7 @@ function img_action($titlealt, $numaction)
*/
function img_pdf($titlealt = 'default', $size = 3)
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Show');
@@ -3390,7 +3390,7 @@ function img_pdf($titlealt = 'default', $size = 3)
*/
function img_edit_add($titlealt = 'default', $other = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Add');
@@ -3405,7 +3405,7 @@ function img_edit_add($titlealt = 'default', $other = '')
*/
function img_edit_remove($titlealt = 'default', $other = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Remove');
@@ -3422,7 +3422,7 @@ function img_edit_remove($titlealt = 'default', $other = '')
*/
function img_edit($titlealt = 'default', $float = 0, $other = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Modify');
@@ -3439,7 +3439,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '')
*/
function img_view($titlealt = 'default', $float = 0, $other = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('View');
@@ -3457,7 +3457,7 @@ function img_view($titlealt = 'default', $float = 0, $other = '')
*/
function img_delete($titlealt = 'default', $other = 'class="pictodelete"')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Delete');
@@ -3474,7 +3474,7 @@ function img_delete($titlealt = 'default', $other = 'class="pictodelete"')
*/
function img_printer($titlealt = "default", $other = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == "default") $titlealt = $langs->trans("Print");
return img_picto($titlealt, 'printer.png', $other);
}
@@ -3488,7 +3488,7 @@ function img_printer($titlealt = "default", $other = '')
*/
function img_split($titlealt = 'default', $other = 'class="pictosplit"')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Split');
@@ -3504,7 +3504,7 @@ function img_split($titlealt = 'default', $other = 'class="pictosplit"')
*/
function img_help($usehelpcursor = 1, $usealttitle = 1)
{
- global $conf, $langs;
+ global $langs;
if ($usealttitle)
{
@@ -3523,7 +3523,7 @@ function img_help($usehelpcursor = 1, $usealttitle = 1)
*/
function img_info($titlealt = 'default')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Informations');
@@ -3540,7 +3540,7 @@ function img_info($titlealt = 'default')
*/
function img_warning($titlealt = 'default', $moreatt = '', $morecss = 'pictowarning')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
@@ -3556,11 +3556,11 @@ function img_warning($titlealt = 'default', $moreatt = '', $morecss = 'pictowarn
*/
function img_error($titlealt = 'default')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Error');
- return img_picto($titlealt, 'error.png', 'class="valigntextbottom"');
+ return img_picto($titlealt, 'error.png');
}
/**
@@ -3572,7 +3572,7 @@ function img_error($titlealt = 'default')
*/
function img_next($titlealt = 'default', $moreatt = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Next');
@@ -3589,7 +3589,7 @@ function img_next($titlealt = 'default', $moreatt = '')
*/
function img_previous($titlealt = 'default', $moreatt = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Previous');
@@ -3607,7 +3607,7 @@ function img_previous($titlealt = 'default', $moreatt = '')
*/
function img_down($titlealt = 'default', $selected = 0, $moreclass = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Down');
@@ -3624,7 +3624,7 @@ function img_down($titlealt = 'default', $selected = 0, $moreclass = '')
*/
function img_up($titlealt = 'default', $selected = 0, $moreclass = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Up');
@@ -3641,7 +3641,7 @@ function img_up($titlealt = 'default', $selected = 0, $moreclass = '')
*/
function img_left($titlealt = 'default', $selected = 0, $moreatt = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Left');
@@ -3658,7 +3658,7 @@ function img_left($titlealt = 'default', $selected = 0, $moreatt = '')
*/
function img_right($titlealt = 'default', $selected = 0, $moreatt = '')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Right');
@@ -3674,7 +3674,7 @@ function img_right($titlealt = 'default', $selected = 0, $moreatt = '')
*/
function img_allow($allow, $titlealt = 'default')
{
- global $conf, $langs;
+ global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Active');
diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php
index 01c80265e46..b0f7dd94ae8 100644
--- a/htdocs/core/modules/modFacture.class.php
+++ b/htdocs/core/modules/modFacture.class.php
@@ -216,7 +216,7 @@ class modFacture extends DolibarrModules
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
- 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaid", 'f.fk_statut'=>'InvoiceStatus',
+ 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus',
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT",
@@ -300,12 +300,13 @@ class modFacture extends DolibarrModules
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
- 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaid", 'f.fk_statut'=>'InvoiceStatus',
+ 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus',
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef',
'p.amount'=>'AmountPayment', 'pf.amount'=>'AmountPaymentDistributedOnInvoice', 'p.datep'=>'DatePayment', 'p.num_paiement'=>'PaymentNumber',
'pt.code'=>'CodePaymentMode', 'pt.libelle'=>'LabelPaymentMode', 'p.note'=>'PaymentNote', 'p.fk_bank'=>'IdTransaction', 'ba.ref'=>'AccountRef'
);
+ $this->export_help_array[$r] = array('f.paye'=>'InvoicePaidCompletelyHelp');
if (! empty($conf->multicurrency->enabled))
{
$this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency';
@@ -313,6 +314,7 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT';
$this->export_fields_array[$r]['f.multicurrency_total_tva'] = 'MulticurrencyAmountVAT';
$this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
+ $this->export_examplevalues_array[$r]['f.multicurrency_code'] = 'EUR';
}
if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS))
{
diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php
index db20bf3b2ff..9c094aa122e 100644
--- a/htdocs/core/modules/modProduct.class.php
+++ b/htdocs/core/modules/modProduct.class.php
@@ -182,7 +182,7 @@ class modProduct extends DolibarrModules
'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",
'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic',
- 'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.length_units'=>"SizeUnits",
+ 'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.length_units'=>"LengthUnits", 'p.width'=>"Width", 'p.width_units'=>"WidthUnits", 'p.height'=>"Height", 'p.height_units'=>"HeightUnits",
'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits",
'p.duration'=>"Duration",
'p.finished' => 'Nature',
@@ -389,13 +389,13 @@ class modProduct extends DolibarrModules
'p.weight' => "Weight",
'p.weight_units' => "WeightUnits",
'p.length' => "Length",
- 'p.length_units' => "LengthUnit",
+ 'p.length_units' => "LengthUnits",
'p.width' => "Width",
'p.width_units' => "WidthUnits",
'p.height' => "Height",
- 'p.height_units' => "HeightUnit",
+ 'p.height_units' => "HeightUnits",
'p.surface' => "Surface",
- 'p.surface_units' => "SurfaceUnit",
+ 'p.surface_units' => "SurfaceUnits",
'p.volume' => "Volume",
'p.volume_units' => "VolumeUnits",
'p.duration' => "Duration", //duration of service
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index c09a4425c7d..c859c6f4519 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -71,7 +71,7 @@ class modSociete extends DolibarrModules
$this->requiredby = array("modExpedition", "modFacture", "modFournisseur", "modFicheinter", "modPropale", "modContrat", "modCommande"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module
- $this->langfiles = array("companies", 'bills');
+ $this->langfiles = array("companies", 'bills', "compta", "admin", "banks");
// Constants
$this->const = array();
@@ -412,7 +412,7 @@ class modSociete extends DolibarrModules
's.address' => "Address",
's.zip' => "Zip",
's.town' => "Town",
- 's.fk_departement' => "StateId",
+ 's.fk_departement' => "StateCode",
's.fk_pays' => "CountryCode",
's.phone' => "Phone",
's.fax' => "Fax",
@@ -583,7 +583,7 @@ class modSociete extends DolibarrModules
's.address' => "Address",
's.zip' => "Zip",
's.town' => "Town",
- 's.fk_departement' => "StateId",
+ 's.fk_departement' => "StateCode",
's.fk_pays' => "CountryCode",
's.birthday' => "BirthdayDate",
's.poste' => "Role",
diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php
index 99eab4f72bf..b21ec913220 100644
--- a/htdocs/core/modules/modUser.class.php
+++ b/htdocs/core/modules/modUser.class.php
@@ -69,7 +69,7 @@ class modUser extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
- $this->langfiles = array("main","users","companies","members",'salaries');
+ $this->langfiles = array("main","users","companies","members","salaries","hrm");
$this->always_enabled = true; // Can't be disabled
// Constants
@@ -225,7 +225,7 @@ class modUser extends DolibarrModules
'u.address'=>"Address",'u.zip'=>"Zip",'u.town'=>"Town",
'u.office_phone'=>'Phone','u.user_mobile'=>"Mobile",'u.office_fax'=>'Fax',
'u.email'=>"Email",'u.note'=>"Note",'u.signature'=>'Signature',
- 'u.fk_user'=>'Supervisor','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
+ 'u.fk_user'=>'HierarchicalResponsible','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
'u.dateemployment'=>'DateEmployment','u.salary'=>'Salary','u.color'=>'Color','u.api_key'=>'ApiKey',
'u.birth'=>'BirthdayDate',
'u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",
@@ -281,7 +281,7 @@ class modUser extends DolibarrModules
'u.fk_state'=>"StateId",'u.fk_country'=>"CountryCode",
'u.office_phone'=>"Phone",'u.user_mobile'=>"Mobile",'u.office_fax'=>"Fax",
'u.email'=>"Email",'u.note'=>"Note",'u.signature'=>'Signature',
- 'u.fk_user'=>'Supervisor','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
+ 'u.fk_user'=>'HierarchicalResponsible','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
'u.dateemployment'=>'DateEmployment','u.salary'=>'Salary','u.color'=>'Color','u.api_key'=>'ApiKey',
'u.birth'=>'BirthdayDate',
'u.datec'=>"DateCreation",
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index 87285bcefeb..86cc5c3f599 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1980,6 +1980,12 @@ class Expedition extends CommonObject
$error = 0;
+ // Protection. This avoid to move stock later when we should not
+ if ($this->statut == self::STATUS_CLOSED)
+ {
+ return 0;
+ }
+
$this->db->begin();
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut='.self::STATUS_CLOSED;
diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php
index d6b6a8676ae..0274e493170 100644
--- a/htdocs/exports/class/export.class.php
+++ b/htdocs/exports/class/export.class.php
@@ -43,12 +43,13 @@ class Export
public $array_export_sql_order=array(); // Tableau des "requetes sql"
public $array_export_fields=array(); // Tableau des listes de champ+libelle a exporter
- public $array_export_TypeFields=array(); // Tableau des listes de champ+Type de filtre
- public $array_export_FilterValue=array(); // Tableau des listes de champ+Valeur a filtrer
+ public $array_export_TypeFields=array(); // Tableau des listes de champ+Type de filtre
+ public $array_export_FilterValue=array(); // Tableau des listes de champ+Valeur a filtrer
public $array_export_entities=array(); // Tableau des listes de champ+alias a exporter
public $array_export_dependencies=array(); // array of list of entities that must take care of the DISTINCT if a field is added into export
- public $array_export_special=array(); // Tableau des operations speciales sur champ
- public $array_export_examplevalues=array(); // array with examples
+ public $array_export_special=array(); // array of special operations to do on field
+ public $array_export_examplevalues=array(); // array with examples for fields
+ public $array_export_help=array(); // array with tooltip help for fields
// To store export modules
public $hexa;
@@ -186,6 +187,8 @@ class Export
$this->array_export_special[$i]=(! empty($module->export_special_array[$r])?$module->export_special_array[$r]:'');
// Array of examples
$this->array_export_examplevalues[$i]=$module->export_examplevalues_array[$r];
+ // Array of help tooltips
+ $this->array_export_help[$i]=(! empty($module->export_help_array[$r])?$module->export_help_array[$r]:'');
// Requete sql du dataset
$this->array_export_sql_start[$i]=$module->export_sql_start[$r];
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index 166551fecb8..20ffcf221f3 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -543,8 +543,12 @@ if ($step == 2 && $datatoexport)
print ' ';
print '';
print ''.$langs->trans("SelectExportFields").' ';
- if (empty($conf->global->EXPORTS_SHARE_MODELS))$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
- else $htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1);
+ if (empty($conf->global->EXPORTS_SHARE_MODELS)) {
+ $htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
+ }
+ else {
+ $htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1);
+ }
print ' ';
print ' ';
print '
';
@@ -622,6 +626,10 @@ if ($step == 2 && $datatoexport)
{
$htmltext .= ''.$langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].' ';
}
+ if (!empty($objexport->array_export_help[0][$code]))
+ {
+ $htmltext .= ''.$langs->trans("Help").': '.$langs->trans($objexport->array_export_help[0][$code]).' ';
+ }
if (isset($array_selected[$code]) && $array_selected[$code])
{
@@ -808,11 +816,15 @@ if ($step == 3 && $datatoexport)
}
if (!empty($objexport->array_export_examplevalues[0][$code]))
{
- $htmltext .= $langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].' ';
+ $htmltext .= ''.$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].' ';
}
if (!empty($objexport->array_export_TypeFields[0][$code]))
{
- $htmltext .= $langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].' ';
+ $htmltext .= ''.$langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].' ';
+ }
+ if (!empty($objexport->array_export_help[0][$code]))
+ {
+ $htmltext .= ''.$langs->trans("Help").': '.$langs->trans($objexport->array_export_help[0][$code]).' ';
}
print '';
@@ -999,11 +1011,15 @@ if ($step == 4 && $datatoexport)
}
if (!empty($objexport->array_export_examplevalues[0][$code]))
{
- $htmltext .= $langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].' ';
+ $htmltext .= ''.$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].' ';
}
if (!empty($objexport->array_export_TypeFields[0][$code]))
{
- $htmltext .= $langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].' ';
+ $htmltext .= ''.$langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].' ';
+ }
+ if (!empty($objexport->array_export_help[0][$code]))
+ {
+ $htmltext .= ''.$langs->trans("Help").': '.$langs->trans($objexport->array_export_help[0][$code]).' ';
}
print ' ';
@@ -1047,7 +1063,10 @@ if ($step == 4 && $datatoexport)
if (count($array_selected))
{
print ' ';
- print $langs->trans("SaveExportModel");
+
+ print '';
+ print ''.$langs->trans("SaveExportModel").' ';
+ print '
';
print '
';
print '';
- print ' ';
- print ''.$langs->trans("InformationOnSourceFile").' ';
+ print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
+
print '
';
print '';
print '
';
- //print ''.$langs->trans("InformationOnSourceFile").' ';
// Source file format
print ''.$langs->trans("SourceFileFormat").' ';
diff --git a/htdocs/install/mysql/data/llx_c_units.sql b/htdocs/install/mysql/data/llx_c_units.sql
index 727835a6a9c..3a11453c9f8 100644
--- a/htdocs/install/mysql/data/llx_c_units.sql
+++ b/htdocs/install/mysql/data/llx_c_units.sql
@@ -49,17 +49,13 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('L', '98','VolumeUnitlitre','L', 'volume', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
-INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
-INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
-INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
-
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('P', '0','Piece','p', 'qty', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('SET', '0','Set','set', 'qty', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('S', '0','second','s', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MI', '60','minute','i', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('H', '3600','hour','h', 'time', 1);
-INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D','12960000','day','d', 'time', 1);
+INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D', '86400','day','d', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('W', '604800','week','w', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MO','2629800','month','m', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('Y','31557600','year','y', 'time', 1);
diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
index d2879e5bb3c..ff6a1fe03fb 100644
--- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
+++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
@@ -285,7 +285,7 @@ CREATE TABLE llx_website_account(
date_last_login datetime,
date_previous_login datetime,
date_creation datetime NOT NULL,
- tms timestamp NOT NULL,
+ tms timestamp,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index f7ed7bcade0..902790cc23a 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -334,6 +334,8 @@ InvoiceDateCreation=Invoice creation date
InvoiceStatus=Invoice status
InvoiceNote=Invoice note
InvoicePaid=Invoice paid
+InvoicePaidCompletely=Paid completely
+InvoicePaidCompletelyHelp=Invoice that are paid completely. This excludes invoices that are paid partially. To get list of all 'Closed' or non 'Closed' invoices, prefer to use a filter on the invoice status.
OrderBilled=Order billed
DonationPaid=Donation paid
PaymentNumber=Payment number
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index 0516de208fc..e33d1112deb 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -69,6 +69,8 @@ Terminal=Terminal
NumberOfTerminals=Number of Terminals
TerminalSelect=Select terminal you want to use:
POSTicket=POS Ticket
+POSTerminal=POS Terminal
+POSModule=POS Module
BasicPhoneLayout=Use basic layout for phones
SetupOfTerminalNotComplete=Setup of terminal %s is not complete
DirectPayment=Direct payment
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 31b0634f579..7439972e906 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -57,6 +57,7 @@ NatureOfThirdParty=Nature of Third party
NatureOfContact=Nature of Contact
Address=Address
State=State/Province
+StateCode=State/Province code
StateShort=State
Region=Region
Region-State=Region - State
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 1ca335da637..7c68fd5c821 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -193,13 +193,38 @@ unitSET=Set
unitS=Second
unitH=Hour
unitD=Day
-unitKG=Kilogram
unitG=Gram
unitM=Meter
unitLM=Linear meter
unitM2=Square meter
unitM3=Cubic meter
unitL=Liter
+unitT=ton
+unitKG=kg
+unitG=g
+unitMG=mg
+unitLB=pound
+unitOZ=ounce
+unitM=m
+unitDM=dm
+unitCM=cm
+unitMM=mm
+unitFT=ft
+unitIN=in
+unitM2=m²
+unitDM2=dm²
+unitCM2=cm²
+unitMM2=mm²
+unitFT2=ft²
+unitIN2=in²
+unitM3=m³
+unitDM3=dm³
+unitCM3=cm³
+unitMM3=mm³
+unitFT3=ft³
+unitIN3=in³
+unitOZ3=ounce
+unitgallon=gallon
ProductCodeModel=Product ref template
ServiceCodeModel=Service ref template
CurrentProductPrice=Current price
@@ -292,6 +317,9 @@ ProductWeight=Weight for 1 product
ProductVolume=Volume for 1 product
WeightUnits=Weight unit
VolumeUnits=Volume unit
+WidthUnits=Width unit
+LengthUnits=Length unit
+HeightUnits=Height unit
SurfaceUnits=Surface unit
SizeUnits=Size unit
DeleteProductBuyPrice=Delete buying price
@@ -347,4 +375,4 @@ ErrorDestinationProductNotFound=Destination product not found
ErrorProductCombinationNotFound=Product variant not found
ActionAvailableOnVariantProductOnly=Action only available on the variant of product
ProductsPricePerCustomer=Product prices per customers
-ProductSupplierExtraFields=Additional Attributes (Supplier Prices)
\ No newline at end of file
+ProductSupplierExtraFields=Additional Attributes (Supplier Prices)
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index a4751f98e51..f117dce2509 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -2561,7 +2561,10 @@ if (!function_exists("llxFooter"))
|| (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled'))
|| GETPOST('forceping', 'alpha'))
{
- if (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]))
+ if (strpos('alpha', DOL_VERSION) > 0) {
+ print "\n\n";
+ }
+ elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php
index c2ca9da8bbd..4080822b9ef 100644
--- a/htdocs/margin/agentMargins.php
+++ b/htdocs/margin/agentMargins.php
@@ -139,8 +139,8 @@ $sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
$sql .= " u.rowid as agent, u.login, u.lastname, u.firstname,";
$sql .= " sum(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
-$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1', 'd.qty * d.buy_price_ht').") as buying_price,";
-$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))', 'd.total_ht - (d.buy_price_ht * d.qty)').") as marge";
+$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
+$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE) ?-1 : $conf->global->AGENT_CONTACT_TYPE);
diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php
index d54eee43056..35dde9a2e62 100644
--- a/htdocs/margin/customerMargins.php
+++ b/htdocs/margin/customerMargins.php
@@ -204,8 +204,8 @@ $sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
if ($client) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql .= " sum(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not, your database may be corrupted, you can update this)
-$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1', 'd.qty * d.buy_price_ht').") as buying_price,";
-$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))', 'd.total_ht - (d.buy_price_ht * d.qty)').") as marge";
+$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
+$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";
diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php
index cc6f7fe0ed9..4b9c271cc5c 100644
--- a/htdocs/margin/productMargins.php
+++ b/htdocs/margin/productMargins.php
@@ -180,8 +180,8 @@ if ($id > 0) $sql .= " d.fk_product,";
if ($id > 0) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql .= " SUM(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
-$sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1', 'd.qty * d.buy_price_ht').") as buying_price,";
-$sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))', 'd.total_ht - (d.buy_price_ht * d.qty)').") as marge";
+$sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
+$sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";
diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php
index e911c1816ae..9378d40c109 100644
--- a/htdocs/margin/tabs/productMargins.php
+++ b/htdocs/margin/tabs/productMargins.php
@@ -137,8 +137,8 @@ if ($id > 0 || !empty($ref))
if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,";
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
$sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty) as qty,"; // not always positive in case of Credit note
- $sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty * d.buy_price_ht) as buying_price,"; // not always positive in case of Credit note
- $sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge"; // not always positive in case of Credit note
+ $sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // not always positive in case of Credit note
+ $sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100))) as marge"; // not always positive in case of Credit note
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";
diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php
index 3bf613ca010..9fd0ade4362 100644
--- a/htdocs/margin/tabs/thirdpartyMargins.php
+++ b/htdocs/margin/tabs/thirdpartyMargins.php
@@ -147,8 +147,8 @@ if ($socid > 0)
$sql .= " f.rowid as facid, f.ref, f.total as total_ht,";
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
- $sql .= " sum(d.qty * d.buy_price_ht) as buying_price,"; // always positive
- $sql .= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge"; // always positive
+ $sql .= " sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // always positive
+ $sql .= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100))) as marge"; // always positive
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";
diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php
index 7cabc1415ef..79482128362 100644
--- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php
+++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php
@@ -342,7 +342,10 @@ class modMyModule extends DolibarrModules
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
//$keyforselect='myobjectline'; $keyforaliasextra='extraline'; $keyforelement='myobjectline';
//include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
- //$this->export_dependencies_array[$r]=array('myobjectline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
+ //$this->export_dependencies_array[$r] = array('myobjectline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
+ //$this->export_special_array[$r] = array('t.field'=>'...');
+ //$this->export_examplevalues_array[$r] = array('t.field'=>'Example');
+ //$this->export_help_array[$r] = array('t.field'=>'FieldDescHelp');
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'myobject as t';
//$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'myobject_line as tl ON tl.fk_myobject = t.rowid';
diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php
index 6e7a6826760..e96b6776664 100644
--- a/htdocs/salaries/stats/index.php
+++ b/htdocs/salaries/stats/index.php
@@ -22,7 +22,7 @@
* \brief Page for statistics of module salaries
*/
-require '../../../main.inc.php';
+require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salariesstats.class.php';
diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php
index 0ea892eca8e..fed82019d62 100644
--- a/htdocs/takepos/takepos.php
+++ b/htdocs/takepos/takepos.php
@@ -765,7 +765,7 @@ $menus[$r++]=array('title'=>'<
print ''."\n";
print '';
?>
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 9cd5a8efd3a..55a4f3813e9 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -1408,6 +1408,9 @@ div.nopadding {
/* vertical-align: text-bottom; */
color: ;
}
+.pictoerror {
+ color: ;
+}
.pictomodule {
width: 14px;
}
@@ -1449,7 +1452,7 @@ div.heightref {
min-height: 80px;
}
div.divphotoref {
- padding-: 10px;
+ padding-: 20px;
}
div.paginationref {
padding-bottom: 10px;
diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php
index 575b73c15f1..2f8b7ac08e4 100644
--- a/htdocs/theme/eldy/theme_vars.inc.php
+++ b/htdocs/theme/eldy/theme_vars.inc.php
@@ -67,7 +67,7 @@ $colorbacklinepairhover = '230,237,244'; // line hover
$colorbacklinepairchecked = '230,237,244'; // line checked
$colorbacklinebreak = '233,228,230'; // line break
$colorbackbody = '255,255,255';
-$colortexttitlenotab = '0,103,111'; // 140,80,10 or 10,140,80
+$colortexttitlenotab = '0,113,121'; // 140,80,10 or 10,140,80
$colortexttitle = '0,0,0';
$colortext = '0,0,0';
$colortextlink = '10, 20, 100';
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 2df7fd86042..604bc743f93 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -1613,6 +1613,9 @@ div.nopadding {
/* vertical-align: text-bottom; */
color: ;
}
+.pictoerror {
+ color: ;
+}
.pictomodule {
width: 14px;
}