diff --git a/ChangeLog b/ChangeLog index 87e7f4ba18b..d8387c6a0e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -150,11 +150,31 @@ Dolibarr better: - A new paramater sqlfilters was introduced to allow filter on any fields int the REST API. Few old parameters, no more required, were also removed. Use this new one if you were using one of them. - The trigger that activate or close a contract line is run on a contract line, not on contract. +- Method commande->set_availability(user, availability_id) removed from commande class, use method commande->availability(availability_id, notrigger). Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0. +***** ChangeLog for 4.0.4 to 4.0.3 ***** +FIX: #6227 Document models table header "Unit" is shown in 2 lines in Spanish +FIX: #6230 +FIX: #6237 +FIX: #6245 Thirdparty link in supplier invoices list, links to "comm/card" instead of "fourn/card" page +FIX: #6253 Supplier invoice list filter does not respect "thirdparty" filter +FIX: #6277 +FIX: project list and ajax completion return wrong list. +FIX: bug margin calculation by user with multicompany +FIX: Can make a stock transfert on product not on sale/purchase. +FIX: extrafield input for varchar was not working with special char within (ie double quotes) +FIX: javascript error +FIX: link for not found photo when using gravatar. Must use external url. +FIX: Protection so even if link is output for external user, links is disabled. +FIX: repair tool was ko to restore extrafields with type select. +FIX: Security access problem with external users on projects/tasks +FIX: We must not drop extrafield column if there is still record on other entities. +FIX: regression with sedning email when introducing security options to restrict nb of email sending. +t ***** ChangeLog for 4.0.3 to 4.0.2 ***** FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1 FIX: #5958 no discount on supplier command made by replenishment diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index c34d9e2ffda..940f0b59467 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -174,7 +174,7 @@ then echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" else - echo Detection of documents directory $documentdir failed so demo files were not copied. + echo Detection of documents directory from $mydir failed so demo files were not copied. fi diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index ce1c632e85b..8bc62c27ef6 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -86,14 +86,14 @@ $idpays = $p[0]; $sql = "SELECT er.rowid, er.ref, er.date_debut as de,"; $sql .= " erd.rowid as erdid, erd.comments, erd.total_ttc, erd.tva_tx, erd.total_ht, erd.total_tva, erd.fk_code_ventilation,"; -$sql .= " u.rowid as uid, u.firstname, u.lastname, u.accountancy_code as user_accountancy_code,"; +$sql .= " u.rowid as uid, u.firstname, u.lastname, u.accountancy_code as user_accountancy_account,"; $sql .= " f.accountancy_code, ct.accountancy_code_buy as account_tva, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte"; $sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON erd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation"; $sql .= " JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport"; -$sql .= " JOIN " . MAIN_DB_PREFIX . "user as u ON u.rowid = er.fk_user_valid"; +$sql .= " JOIN " . MAIN_DB_PREFIX . "user as u ON u.rowid = er.fk_user_author"; $sql .= " WHERE er.fk_statut > 0 "; $sql .= " AND erd.fk_code_ventilation > 0 "; $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index b89dbf291b7..9f63b1e5489 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -194,7 +194,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) * Fact bookmark mode or visually edition */ $object->fetch($id); - + $hselected = 'card'; $head = array( array( @@ -216,10 +216,10 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); - + $linkback = ''.$langs->trans("BackToList").''; - - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '' , '', 0, '', '', 0); + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0); print '
'; print '| '; if (empty($obj->source_id) || empty($obj->source_type)) { - print $obj->source_url; // For backward compatibility + print empty($obj->source_url)?'':$obj->source_url; // For backward compatibility } else { diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index dc39c2e9399..b0dff81332c 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -601,35 +601,38 @@ class Mailing extends CommonObject if ($mode == 2) { if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut4'); - if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut6'); - if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut8'); + if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6'); + if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut4'); + if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut3'); } if ($mode == 3) { if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut4'); - if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut6'); - if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut8'); + if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6'); + if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut4'); + if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut3'); } if ($mode == 4) { if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut4'); - if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut6'); - if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut8'); + if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6'); + if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut4'); + if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut3'); } if ($mode == 5) { - if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut4'); - if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut6'); - if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut8'); + if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); + if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6'); + if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut4'); + if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut3'); + } + if ($mode == 6) + { + if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); + if ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6'); + if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut4'); + if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut3'); } - - - - } } diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index b0801c817aa..2d6fae37b98 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -174,7 +174,7 @@ if ($result) { print ' | '; $nbemail = $obj->nbemail; - if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) + /*if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); print $form->textwithpicto($nbemail,$text,1,'warning'); @@ -182,7 +182,8 @@ if ($result) else { print $nbemail; - } + }*/ + print $nbemail; print ' | '; } // Last send diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f10d82fdbfa..aabb64d289c 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2764,6 +2764,8 @@ class Propal extends CommonObject */ function availability($availability_id, $notrigger=0) { + global $user; + if ($this->statut >= self::STATUS_DRAFT) { $error=0; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 1f75e6caf74..e1b59f34772 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -242,7 +242,8 @@ class Commande extends CommonOrder } else { - dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + $this->error=$obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; } } diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index 54c77ed6e73..ad3817f28cd 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -5,6 +5,7 @@ * Copyright (C) 2012 Vinícius Nogueira||||||
| ' . $langs->trans('Project') . ' | '; - $numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, $forceaddid=0, $morecss=''); + $numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''); print ' thirdparty->id.(!empty($id)?'&id='.$id:'')).'">' . $langs->trans("AddProject") . ''; print ' | '; print ''; print ' | '; } -if (! empty($arrayfields['p.phone_perso']['checked'])) +if (! empty($arrayfields['p.phone_perso']['checked'])) { print ''; print ''; @@ -607,9 +607,9 @@ if (! empty($arrayfields['p.priv']['checked'])) // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { - foreach($extrafields->attribute_label as $key => $val) + foreach($extrafields->attribute_label as $key => $val) { - if (! empty($arrayfields["ef.".$key]['checked'])) + if (! empty($arrayfields["ef.".$key]['checked'])) { print ' | '; print ' | '; @@ -664,7 +664,7 @@ while ($i < min($num,$limit)) $contactstatic->phone_mobile=$obj->phone_mobile; $contactstatic->zip=$obj->zip; $contactstatic->town=$obj->town; - + // Name if (! empty($arrayfields['p.lastname']['checked'])) { @@ -746,9 +746,9 @@ while ($i < min($num,$limit)) // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { - foreach($extrafields->attribute_label as $key => $val) + foreach($extrafields->attribute_label as $key => $val) { - if (! empty($arrayfields["ef.".$key]['checked'])) + if (! empty($arrayfields["ef.".$key]['checked'])) { print 'getAlignFlag($key);
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 958f14f8911..2cffecfaf96 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -8,7 +8,7 @@
* Copyright (C) 2013 Christophe Battarel | ';
- $out.= '';
diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php
index 0ac6012f271..2cf82424a4e 100644
--- a/htdocs/core/class/html.formmargin.class.php
+++ b/htdocs/core/class/html.formmargin.class.php
@@ -48,6 +48,7 @@ class FormMargin
/**
* get array with margin information from lines of object
+ * TODO Move this in common class.
*
* @param CommonObject $object Object we want to get margin information for
* @param boolean $force_price True of not
@@ -92,19 +93,23 @@ class FormMargin
$line->pa_ht = $line->subprice * (1 - ($line->remise_percent / 100));
}
+ $pv = $line->qty * $line->subprice * (1 - $line->remise_percent / 100);
+ $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;
+
// calcul des marges
if (isset($line->fk_remise_except) && isset($conf->global->MARGIN_METHODE_FOR_DISCOUNT)) { // remise
- $pa = $line->qty * $line->pa_ht;
- $pv = $line->qty * $line->subprice * (1 - $line->remise_percent / 100);
if ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '1') { // remise globale considérée comme produit
$marginInfos['pa_products'] += $pa;
$marginInfos['pv_products'] += $pv;
$marginInfos['pa_total'] += $pa;
$marginInfos['pv_total'] += $pv;
// if credit note, margin = -1 * (abs(selling_price) - buying_price)
- if ($pv < 0)
- $marginInfos['margin_on_products'] += -1 * (abs($pv) - $pa);
- else
+ //if ($pv < 0)
+ //{
+ // $marginInfos['margin_on_products'] += -1 * (abs($pv) - $pa);
+ //}
+ //else
$marginInfos['margin_on_products'] += $pv - $pa;
}
elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '2') { // remise globale considérée comme service
@@ -113,9 +118,9 @@ class FormMargin
$marginInfos['pa_total'] += $pa;
$marginInfos['pv_total'] += $pv;
// if credit note, margin = -1 * (abs(selling_price) - buying_price)
- if ($pv < 0)
- $marginInfos['margin_on_services'] += -1 * (abs($pv) - $pa);
- else
+ //if ($pv < 0)
+ // $marginInfos['margin_on_services'] += -1 * (abs($pv) - $pa);
+ //else
$marginInfos['margin_on_services'] += $pv - $pa;
}
elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '3') { // remise globale prise en compte uniqt sur total
@@ -126,29 +131,29 @@ class FormMargin
else {
$type=$line->product_type?$line->product_type:$line->fk_product_type;
if ($type == 0) { // product
- $pa = $line->qty * $line->pa_ht;
- $pv = $line->qty * $line->subprice * (1 - $line->remise_percent / 100);
$marginInfos['pa_products'] += $pa;
$marginInfos['pv_products'] += $pv;
$marginInfos['pa_total'] += $pa;
$marginInfos['pv_total'] += $pv;
// if credit note, margin = -1 * (abs(selling_price) - buying_price)
- if ($pv < 0)
- $marginInfos['margin_on_products'] += -1 * (abs($pv) - $pa);
- else
- $marginInfos['margin_on_products'] += $pv - $pa;
+ //if ($pv < 0)
+ //{
+ // $marginInfos['margin_on_products'] += -1 * (abs($pv) - $pa);
+ //}
+ //else
+ //{
+ $marginInfos['margin_on_products'] += $pv - $pa;
+ //}
}
elseif ($type == 1) { // service
- $pa = $line->qty * $line->pa_ht;
- $pv = $line->qty * $line->subprice * (1 - $line->remise_percent / 100);
$marginInfos['pa_services'] += $pa;
$marginInfos['pv_services'] += $pv;
$marginInfos['pa_total'] += $pa;
$marginInfos['pv_total'] += $pv;
// if credit note, margin = -1 * (abs(selling_price) - buying_price)
- if ($pv < 0)
- $marginInfos['margin_on_services'] += -1 * (abs($pv) - $pa);
- else
+ //if ($pv < 0)
+ // $marginInfos['margin_on_services'] += -1 * (abs($pv) - $pa);
+ //else
$marginInfos['margin_on_services'] += $pv - $pa;
}
}
@@ -164,9 +169,9 @@ class FormMargin
$marginInfos['mark_rate_services'] = 100 * $marginInfos['margin_on_services'] / $marginInfos['pv_services'];
// if credit note, margin = -1 * (abs(selling_price) - buying_price)
- if ($marginInfos['pv_total'] < 0)
- $marginInfos['total_margin'] = -1 * (abs($marginInfos['pv_total']) - $marginInfos['pa_total']);
- else
+ //if ($marginInfos['pv_total'] < 0)
+ // $marginInfos['total_margin'] = -1 * (abs($marginInfos['pv_total']) - $marginInfos['pa_total']);
+ //else
$marginInfos['total_margin'] = $marginInfos['pv_total'] - $marginInfos['pa_total'];
if ($marginInfos['pa_total'] > 0)
$marginInfos['total_margin_rate'] = 100 * $marginInfos['total_margin'] / $marginInfos['pa_total'];
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 6c2b5600917..ffce8300a0c 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -155,8 +155,10 @@ class FormProjets
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
if ($socid > 0 && empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
if (!empty($filterkey)) {
- $sql .= " AND p.title LIKE '%".$this->db->escape($filterkey)."%'";
- $sql .= " OR p.ref LIKE '%".$this->db->escape($filterkey)."%'";
+ $sql .= ' AND (';
+ $sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
+ $sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
+ $sql .= ')';
}
$sql.= " ORDER BY p.ref ASC";
@@ -564,9 +566,10 @@ class FormProjets
* @param int $useshortlabel Use short label
* @param int $showallnone Add choice "All" and "None"
* @param int $showpercent Show default probability for status
+ * @param string $morecss Add more css
* @return int|string The HTML select list of element or '' if nothing or -1 if KO
*/
- function selectOpportunityStatus($htmlname, $preselected='-1', $showempty=1, $useshortlabel=0, $showallnone=0, $showpercent=0)
+ function selectOpportunityStatus($htmlname, $preselected='-1', $showempty=1, $useshortlabel=0, $showallnone=0, $showpercent=0, $morecss='')
{
global $conf, $langs;
@@ -582,7 +585,7 @@ class FormProjets
$i = 0;
if ($num > 0)
{
- $sellist = ' | ";
if ($object->methode_commande) {
- print '' . $langs->trans("Method") . ' | ' . $commande->getInputMethod() . ' | ' . $langs->trans("Method") . ' | ' . $object->getInputMethod() . ' | rights->fournisseur->facture->lire) {
$sign = 1;
- if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
+ if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1;
if ($objectlink->statut != 3) // If not abandonned
{
$total = $total + $sign * $objectlink->total_ht;
diff --git a/htdocs/index.php b/htdocs/index.php
index f4be0dc9c63..16126975b9f 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -178,8 +178,8 @@ if (empty($user->societe_id))
! empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
! empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
- ! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
- ! empty($conf->projet->enabled) && $user->rights->projet->lire
+ ! empty($conf->projet->enabled) && $user->rights->projet->lire,
+ ! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
);
// Class file containing the method load_state_board for each line
$includes=array(
@@ -199,8 +199,8 @@ if (empty($user->societe_id))
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php",
- DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php",
- DOL_DOCUMENT_ROOT."/projet/class/project.class.php"
+ DOL_DOCUMENT_ROOT."/projet/class/project.class.php",
+ DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php"
);
// Name class containing the method load_state_board for each line
$classes=array('User',
@@ -219,8 +219,8 @@ if (empty($user->societe_id))
'CommandeFournisseur',
'FactureFournisseur',
'SupplierProposal',
- 'ExpenseReport',
- 'Project'
+ 'Project',
+ 'ExpenseReport'
);
// Cle array returned by the method load_state_board for each line
$keys=array('users',
@@ -239,8 +239,8 @@ if (empty($user->societe_id))
'supplier_orders',
'supplier_invoices',
'askprice',
- 'expensereports',
- 'projects'
+ 'projects',
+ 'expensereports'
);
// Dashboard Icon lines
$icons=array('user',
@@ -259,8 +259,8 @@ if (empty($user->societe_id))
'order',
'bill',
'propal',
- 'trip',
- 'project'
+ 'project',
+ 'trip'
);
// Translation keyword
$titres=array("Users",
@@ -279,8 +279,8 @@ if (empty($user->societe_id))
"SuppliersOrders",
"SuppliersInvoices",
"SupplierProposalShort",
- "ExpenseReports",
- "Projects"
+ "Projects",
+ "ExpenseReports"
);
// Dashboard Link lines
$links=array(
@@ -300,8 +300,8 @@ if (empty($user->societe_id))
DOL_URL_ROOT.'/fourn/commande/list.php',
DOL_URL_ROOT.'/fourn/facture/list.php',
DOL_URL_ROOT.'/supplier_proposal/list.php',
- DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm',
- DOL_URL_ROOT.'/projet/list.php?mainmenu=project'
+ DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
+ DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'
);
// Translation lang files
$langfile=array("users",
@@ -318,8 +318,8 @@ if (empty($user->societe_id))
"supplier_proposal",
"contracts",
"interventions",
- "trips",
- "projects"
+ "projects",
+ "trips"
);
diff --git a/htdocs/install/mysql/tables/llx_expensereport.sql b/htdocs/install/mysql/tables/llx_expensereport.sql
index a6b45daddf4..ac1ec890788 100755
--- a/htdocs/install/mysql/tables/llx_expensereport.sql
+++ b/htdocs/install/mysql/tables/llx_expensereport.sql
@@ -35,7 +35,7 @@ CREATE TABLE llx_expensereport (
date_refuse datetime,
date_cancel datetime,
tms timestamp,
- fk_user_author integer NOT NULL,
+ fk_user_author integer NOT NULL, -- not the user author but the user the expense report is for
fk_user_modif integer DEFAULT NULL,
fk_user_valid integer DEFAULT NULL,
fk_user_validator integer DEFAULT NULL,
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5fd1ae065ec..e8c60db1fc9 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -689,7 +689,7 @@ PermissionAdvanced253=Create/modify internal/external users and permissions
Permission254=Create/modify external users only
Permission255=Modify other users password
Permission256=Delete or disable other users
-Permission262=Extend access to all third parties (not only third parties that user is a sale representative). Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc). Not effective for projects (only rules on project permissions, visibility and assignement matters).
+Permission262=Extend access to all third parties (not only third parties that user is a sale representative). | Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc). Not effective for projects (only rules on project permissions, visibility and assignement matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 0c894cc7b19..c337b6e1119 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -74,7 +74,11 @@ ResultOfMailSending=Result of mass EMail sending NbSelected=Nb selected NbIgnored=Nb ignored NbSent=Nb sent -ContactsWithThirdpartyFilter=Contact with customer filters +ConfirmUnvalidateEmailing=Are you sure you want to change email %s to draft status? +MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters +MailingModuleDescContactsByCompanyCategory=Contacts by third party category +MailingModuleDescContactsByCategory=Contacts by categories +MailingModuleDescContactsByFunction=Contacts by position # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 89aa8ff296e..9058f1f825d 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -58,7 +58,7 @@ SellingPrice=Selling price SellingPriceHT=Selling price (net of tax) SellingPriceTTC=Selling price (inc. tax) CostPriceDescription=This price (net of tax) can be used to store the average amount this product cost to your company. It may be any price you calculate yourself, for example from the average buying price plus average production and distribution cost. -CostPriceUsage=In a future version, this value could be used for margin calculation. +CostPriceUsage=This value could be used for margin calculation. SoldAmount=Sold amount PurchasedAmount=Purchased amount NewPrice=New price @@ -256,4 +256,4 @@ VolumeUnits=Volume unit SizeUnits=Size unit DeleteProductBuyPrice=Delete buying price ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price? - +SubProduct=Sub product diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 392e20697aa..8e40307cac6 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -96,6 +96,7 @@ ValidateProject=Validate projet ConfirmValidateProject=Are you sure you want to validate this project? CloseAProject=Close project ConfirmCloseAProject=Are you sure you want to close this project? +AlsoCloseAProject=Also close project (keep it open if you still need to follow production tasks on it) ReOpenAProject=Open project ConfirmReOpenAProject=Are you sure you want to re-open this project? ProjectContact=Project contacts @@ -121,7 +122,7 @@ CloneProjectFiles=Clone project joined files CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) CloneMoveDate=Update project/tasks dates from now? ConfirmCloneProject=Are you sure to clone this project? -ProjectReportDate=Change task date according project start date +ProjectReportDate=Change task dates according to new project start date ErrorShiftTaskDate=Impossible to shift task date according to new project start date ProjectsAndTasksLines=Projects and tasks ProjectCreatedInDolibarr=Project %s created diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8aba2e428f2..7c22308f201 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -993,9 +993,10 @@ function top_httphead() * @param array $arrayofjs Array of complementary js files * @param array $arrayofcss Array of complementary css files * @param int $disablejmobile Disable jmobile + * @param int $disablenofollow Disable no follow tag * @return void */ -function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0) +function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0, $disablenofollow=0) { global $user, $conf, $langs, $db; @@ -1017,13 +1018,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print "\n"; if (GETPOST('dol_basehref')) print ' '; print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num,$num,''); + if ($conf->global->MARGIN_TYPE == "1") + $labelcostprice=$langs->trans('BuyingPrice'); + else // value is 'costprice' or 'pmp' + $labelcostprice=$langs->trans('CostPrice'); + $i = 0; print "
|