mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd60fe6ffd | ||
|
|
bb606df5e0 | ||
|
|
067b29c9f8 | ||
|
|
9f27dd41e5 | ||
|
|
d4b02c0552 | ||
|
|
fd46ae13d6 | ||
|
|
2fdc1a9883 | ||
|
|
817920f282 | ||
|
|
79420593f4 | ||
|
|
c3f07dd2e0 | ||
|
|
84605bc59b | ||
|
|
430f833222 | ||
|
|
bd8cf3d81e | ||
|
|
67e7736eb2 | ||
|
|
021f9552dd | ||
|
|
320ca3db67 | ||
|
|
e165dce908 | ||
|
|
a97dafc1f2 | ||
|
|
82651cd920 | ||
|
|
cba4676032 | ||
|
|
68c99d01a7 | ||
|
|
b20dc5678c | ||
|
|
8592b03b49 | ||
|
|
17e4af50ec | ||
|
|
ac86eac508 | ||
|
|
3060647212 | ||
|
|
8690d65479 | ||
|
|
577192554d | ||
|
|
9e397206d3 | ||
|
|
1dd276b046 | ||
|
|
bfaf25ca2a | ||
|
|
58d1ac427e | ||
|
|
c048f51562 | ||
|
|
e95921eb93 | ||
|
|
7f4f27ebfe | ||
|
|
292dab192b | ||
|
|
2acd69033c | ||
|
|
8ee7a48583 | ||
|
|
583ea05567 | ||
|
|
587766b39b | ||
|
|
06fe172669 | ||
|
|
8deb2eaa0c | ||
|
|
6e7fd15e1e | ||
|
|
291d477f65 | ||
|
|
4c8664b297 | ||
|
|
2d88b69cf6 | ||
|
|
bc5b794b1a | ||
|
|
77341470e1 | ||
|
|
46363a7705 | ||
|
|
ff3f1e933a | ||
|
|
af93fc7484 | ||
|
|
1bac3a0ccf | ||
|
|
92a3faeaf7 | ||
|
|
a9f7bdead6 | ||
|
|
d15c52db3b | ||
|
|
fc7c0ce521 | ||
|
|
40bed96a01 | ||
|
|
dbb75e35a1 | ||
|
|
2dbb82fc76 | ||
|
|
12690666e2 | ||
|
|
9ddc1770e8 | ||
|
|
1569770855 | ||
|
|
7b46bedce6 | ||
|
|
a0bc26a923 | ||
|
|
779d7e9689 | ||
|
|
9b190d2cbc | ||
|
|
d62118dca8 | ||
|
|
02617bd799 | ||
|
|
2b67da3f34 | ||
|
|
d6bd0ed73e | ||
|
|
a6996169d6 | ||
|
|
1d43c6bc3a | ||
|
|
cdbb79a26c | ||
|
|
b68523b9c1 | ||
|
|
c94689e9a9 | ||
|
|
ec9eeb5201 | ||
|
|
09dfcc6016 | ||
|
|
4d72573484 | ||
|
|
cbf12b779d | ||
|
|
7406d3c7ee | ||
|
|
bcbbcc1c66 | ||
|
|
e66847d5c3 | ||
|
|
dd8ef47a25 | ||
|
|
2f2b0630e2 | ||
|
|
26e3593c98 | ||
|
|
c88f5c560c | ||
|
|
04466651d6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,6 +12,7 @@ dolibarr_install.log
|
||||
upgrade.log
|
||||
doxygen_warnings.log
|
||||
/.project
|
||||
/.vscode
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
|
||||
88
ChangeLog
88
ChangeLog
@@ -2,6 +2,68 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
***** ChangeLog for 7.0.4 compared to 7.0.3 *****
|
||||
FIX: #8984 button create expense report
|
||||
FIX: #9032
|
||||
FIX: #9161
|
||||
FIX: #9328
|
||||
FIX: According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product
|
||||
FIX: Add calls to fetchComments function
|
||||
FIX: better compatibility with multicompany
|
||||
FIX: case when we valid form with keyboard
|
||||
FIX: character making error on bill list
|
||||
FIX: check !empty exclude select element
|
||||
FIX: combo into popup become crazy with IE10
|
||||
FIX: combo of stock in popup are crazy in IE
|
||||
FIX: Deletion of files in migration
|
||||
FIX: exclude element of the select
|
||||
FIX: extrafieldkey
|
||||
FIX: Fetch function will fetch comments
|
||||
FIX: Fetch task will now fetch comments
|
||||
FIX: filter supplier invoice list by societe name.
|
||||
FIX: $fk_account is always empty, must be $soc->fk_account
|
||||
FIX: Force stripe api version to avoid trouble if we update stripe api
|
||||
FIX: getEntity project and not projet
|
||||
FIX: Get templates in a forced language
|
||||
FIX: global $mysoc missing (to avoid php notice on lines 279, 280 & 281)
|
||||
FIX: Injection
|
||||
FIX: invoice stats: situation invoices were not counted
|
||||
FIX: keep context filter on contact list on change column displayed
|
||||
FIX: Keep same project when creating shipping from order
|
||||
FIX: langs fr
|
||||
FIX: Lose filter on payment type or category after a sort on invoice list
|
||||
FIX: Missing behavior
|
||||
FIX: missing hook to edit sql
|
||||
FIX: multicompany compatibility !
|
||||
FIX: need to filter on current entity on replenish
|
||||
FIX: Option MAIN_DISABLE_NOTES_TAB #9611
|
||||
FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
|
||||
FIX: Pagination on related item pages
|
||||
FIX: Pagination on withdraw request list
|
||||
FIX: PDF address: handle when contact thirdparty different from document thirdparty
|
||||
FIX: PHP warning, undefined index notnull
|
||||
FIX: Product marge tabs on product card
|
||||
FIX: Product margin tab and credit note
|
||||
FIX: propal: correctly preset project when creating with origin/originid
|
||||
FIX: remain to pay for credit note was wrong on invoice list
|
||||
FIX: remove debug
|
||||
FIX: Remove fetchComments from project and task fetch function
|
||||
FIX: remove rowid for multicompany compatibility
|
||||
FIX: Search on Ref project on order list
|
||||
FIX: search on ref project on propal list
|
||||
FIX: showOptionals: column mismatches
|
||||
FIX: SQL Injections reported by mu shcor (ADLab of Venustech)
|
||||
FIX: stock replenish with multientity
|
||||
FIX: table llx_chargessociales doesn't exists
|
||||
FIX: we must see number of all shared projects
|
||||
FIX: when stock is empty for current entity but > 0 in other entity, until this commit product wasn't displaied on replenishment, it must depends on multientity stock sharing
|
||||
FIX: when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup
|
||||
FIX: wrong function name
|
||||
FIX: Wrong position of firstname lastname
|
||||
FIX: wrong value for module part and return access denied
|
||||
FIX: Wrong variable and trigger name
|
||||
|
||||
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
|
||||
FIX: 7.0 task contact card without withproject parameters
|
||||
FIX: #8722
|
||||
@@ -484,6 +546,32 @@ Following changes may create regressions for some external modules, but were nec
|
||||
multicompany module to a version that support Dolibarr v7, everything should work as expected.
|
||||
|
||||
|
||||
***** ChangeLog for 6.0.8 compared to 6.0.7 *****
|
||||
FIX: #8762
|
||||
FIX: #9032
|
||||
FIX: case when we valid form with keyboard
|
||||
FIX: clause must not be there
|
||||
FIX: dol_delete_file must work in a context without db handler loaded
|
||||
FIX: entity test must be on product_fourn_price table and not product table
|
||||
FIX: Fetch shipping will now fetch project id
|
||||
FIX: $fk_account is always empty, must be $soc->fk_account
|
||||
FIX: getEntity project and not projet
|
||||
FIX: If we enable 3 steps for supplier order approbation, we must not delete all fourn rights def.
|
||||
FIX: Keep supplier proposal price for supplier order
|
||||
FIX: langs fr
|
||||
FIX: missing filters during reordering
|
||||
FIX: need to filter on aa.entity for same accounting accounts available in several entities
|
||||
FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
|
||||
FIX: PDF address: handle when contact thirdparty different from document thirdparty
|
||||
FIX: propal: correctly preset project when creating with origin/originid
|
||||
FIX: pu_ht_devise was not converted to numeric so decimals were lost when calculating total_ht_devise
|
||||
FIX: remain to pay for credit note was wrong on invoice list
|
||||
FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
|
||||
FIX: showOptionals: column mismatches
|
||||
FIX: sometimes amounts are identical but php find them different.
|
||||
FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
|
||||
FIX: we must see number of all shared projects
|
||||
FIX: wrong var name
|
||||
|
||||
***** ChangeLog for 6.0.7 compared to 6.0.6 *****
|
||||
FIX: #8023
|
||||
|
||||
@@ -59,11 +59,15 @@ $now = dol_now();
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
$hookmanager->initHooks(array('sellsjournal'));
|
||||
$parameters=array();
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$user,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Get informations of journal
|
||||
$accountingjournalstatic = new AccountingJournal($db);
|
||||
$accountingjournalstatic->fetch($id_journal);
|
||||
|
||||
@@ -1611,7 +1611,7 @@ if ($id > 0)
|
||||
|
||||
$var=true;
|
||||
|
||||
print $formfile->showdocuments('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
|
||||
print $formfile->showdocuments('actions',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
|
||||
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1018,6 +1019,7 @@ class Propal extends CommonObject
|
||||
// Add linked object (deprecated, use ->linkedObjectsIds instead)
|
||||
if (! $error && $this->origin && $this->origin_id)
|
||||
{
|
||||
dol_syslog('Deprecated use of linked object, use ->linkedObjectsIds instead', LOG_WARNING);
|
||||
$ret = $this->add_object_linked();
|
||||
if (! $ret) dol_print_error($this->db);
|
||||
}
|
||||
@@ -1090,13 +1092,6 @@ class Propal extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// Add linked object
|
||||
if (! $error && $this->origin && $this->origin_id)
|
||||
{
|
||||
$ret = $this->add_object_linked();
|
||||
if (! $ret) dol_print_error($this->db);
|
||||
}
|
||||
|
||||
// Set delivery address
|
||||
if (! $error && $this->fk_delivery_address)
|
||||
{
|
||||
|
||||
@@ -1677,10 +1677,11 @@ class Commande extends CommonOrder
|
||||
|
||||
// Retrieve all extrafields for invoice
|
||||
// fetch optionals attributes and labels
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields=new ExtraFields($this->db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||
$this->fetch_optionals($this->id,$extralabels);
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
// $extrafields=new ExtraFields($this->db);
|
||||
// $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||
// $this->fetch_optionals($this->id,$extralabels);
|
||||
$this->fetch_optionals();
|
||||
|
||||
$this->db->free($result);
|
||||
|
||||
@@ -1882,6 +1883,9 @@ class Commande extends CommonOrder
|
||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
|
||||
$line->fetch_optionals();
|
||||
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
|
||||
@@ -1353,10 +1353,12 @@ class Facture extends CommonInvoice
|
||||
|
||||
// Retrieve all extrafield for invoice
|
||||
// fetch optionals attributes and labels
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields=new ExtraFields($this->db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||
$this->fetch_optionals($this->id,$extralabels);
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
// $extrafields=new ExtraFields($this->db);
|
||||
// $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||
// $this->fetch_optionals($this->id,$extralabels);
|
||||
$this->fetch_optionals();
|
||||
|
||||
|
||||
/*
|
||||
* Lines
|
||||
@@ -1477,7 +1479,7 @@ class Facture extends CommonInvoice
|
||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
|
||||
// TODO Fetch optional like done in fetch line of facture_rec ?
|
||||
$line->fetch_optionals();
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ class FactureStats extends Stats
|
||||
$this->where.=" AND f.fk_soc = ".$this->socid;
|
||||
}
|
||||
if ($this->userid > 0) $this->where.=' AND f.fk_user_author = '.$this->userid;
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where.= " AND f.type IN (0,1,2)";
|
||||
else $this->where.= " AND f.type IN (0,1,2,3)";
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where.= " AND f.type IN (0,1,2,5)";
|
||||
else $this->where.= " AND f.type IN (0,1,2,3,5)";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ if ($search_month > 0)
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $serch_year))."'";
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(f.datef, '%m') = '".$month."'";
|
||||
}
|
||||
@@ -876,7 +876,8 @@ if ($resql)
|
||||
print "</tr>\n";
|
||||
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
$discount = new DiscountAbsolute($db);
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$i=0;
|
||||
@@ -890,6 +891,9 @@ if ($resql)
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->type=$obj->type;
|
||||
$facturestatic->statut=$obj->fk_statut;
|
||||
$facturestatic->total_ttc=$obj->total_ttc;
|
||||
$facturestatic->paye=$obj->paye;
|
||||
$facturestatic->fk_soc=$obj->fk_soc;
|
||||
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
|
||||
$facturestatic->note_public=$obj->note_public;
|
||||
$facturestatic->note_private=$obj->note_private;
|
||||
@@ -909,7 +913,12 @@ if ($resql)
|
||||
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
|
||||
$totaldeposits = $facturestatic->getSumDepositsUsed();
|
||||
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
|
||||
$remaintopay = $obj->total_ttc - $totalpay;
|
||||
$remaintopay = $facturestatic->total_ttc - $totalpay;
|
||||
if ($facturestatic->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1) {
|
||||
$remaincreditnote = $discount->getAvailableDiscounts($obj->fk_soc, '', 'rc.fk_facture_source='.$facturestatic->id);
|
||||
$remaintopay = -$remaincreditnote;
|
||||
$totalpay = $facturestatic->total_ttc - $remaintopay;
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
if (! empty($arrayfields['f.facnumber']['checked']))
|
||||
|
||||
@@ -409,18 +409,44 @@ class CMailFile
|
||||
// TODO if (! empty($moreinheader)) ...
|
||||
|
||||
// Give the message a subject
|
||||
$this->message->setSubject($this->encodetorfc2822($subject));
|
||||
try {
|
||||
$this->message->setSubject($subject);
|
||||
} catch (Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
|
||||
// Set the From address with an associative array
|
||||
//$this->message->setFrom(array('john@doe.com' => 'John Doe'));
|
||||
if (! empty($from)) $this->message->setFrom($this->getArrayAddress($from));
|
||||
if (! empty($from)) {
|
||||
try {
|
||||
$result = $this->message->setFrom($this->getArrayAddress($from));
|
||||
} catch (Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
// Set the To addresses with an associative array
|
||||
if (! empty($to)) $this->message->setTo($this->getArrayAddress($to));
|
||||
if (! empty($to)) {
|
||||
try {
|
||||
$result = $this->message->setTo($this->getArrayAddress($to));
|
||||
} catch (Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($from)) $this->message->SetReplyTo($this->getArrayAddress($from));
|
||||
if (! empty($from)) {
|
||||
try {
|
||||
$result = $this->message->SetReplyTo($this->getArrayAddress($from));
|
||||
} catch (Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
$this->message->setCharSet($conf->file->character_set_client);
|
||||
try {
|
||||
$result = $this->message->setCharSet($conf->file->character_set_client);
|
||||
} catch (Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
|
||||
if (! empty($this->html))
|
||||
{
|
||||
|
||||
@@ -749,7 +749,7 @@ function xml2php($xml)
|
||||
}
|
||||
|
||||
//Let see if the new child is not in the array
|
||||
if($tab==false && in_array($key,array_keys($array)))
|
||||
if($tab === false && in_array($key,array_keys($array)))
|
||||
{
|
||||
//If this element is already in the array we will create an indexed array
|
||||
$tmp = $array[$key];
|
||||
@@ -758,7 +758,7 @@ function xml2php($xml)
|
||||
$array[$key][] = $child;
|
||||
$tab = true;
|
||||
}
|
||||
elseif($tab == true)
|
||||
elseif($tab === true)
|
||||
{
|
||||
//Add an element in an existing array
|
||||
$array[$key][] = $child;
|
||||
|
||||
@@ -1213,6 +1213,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
|
||||
global $param;
|
||||
|
||||
dol_include_once('/comm/action/class/actioncomm.class.php');
|
||||
|
||||
// Check parameters
|
||||
if (! is_object($filterobj) && ! is_object($objcon)) dol_print_error('','BadParameter');
|
||||
|
||||
@@ -1261,6 +1263,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'product'";
|
||||
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
|
||||
}
|
||||
//TODO check how ot work with new table actioncomm_resources and multiple contact affectation
|
||||
if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id;
|
||||
// Condition on actioncode
|
||||
if (! empty($actioncode))
|
||||
@@ -1297,6 +1300,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$contactaction = new ActionComm($db);
|
||||
$contactaction->id=$obj->id;
|
||||
$result = $contactaction->fetchResources();
|
||||
if ($result<0) {
|
||||
dol_print_error($db);
|
||||
setEventMessage("company.lib::show_actions_done Error fetch ressource",'errors');
|
||||
}
|
||||
|
||||
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||
//if ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||
$tododone='';
|
||||
@@ -1318,6 +1329,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
'userphoto'=>$obj->user_photo,
|
||||
|
||||
'contact_id'=>$obj->fk_contact,
|
||||
'socpeopleassigned' => $contactaction->socpeopleassigned,
|
||||
'lastname'=>$obj->lastname,
|
||||
'firstname'=>$obj->firstname,
|
||||
'fk_element'=>$obj->fk_element,
|
||||
@@ -1470,7 +1482,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$out.=getTitleFieldOfList($langs->trans("Label"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
$out.=getTitleFieldOfList($langs->trans("Date"), 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
$out.=getTitleFieldOfList('');
|
||||
$out.=getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], 'a.fk_contact', '', $param, '', $sortfield, $sortorder);
|
||||
$out.=getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
$out.=getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
$out.=getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
$out.='</tr>';
|
||||
@@ -1617,10 +1629,28 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$contactstatic->firstname=$histo[$key]['firstname'];
|
||||
$contactstatic->id=$histo[$key]['contact_id'];
|
||||
$out.='<td width="120">'.$contactstatic->getNomUrl(1,'',10).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$out.='<td> </td>';
|
||||
} elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
|
||||
$out .= '<td>';
|
||||
foreach ( $histo[$key]['socpeopleassigned'] as $cid => $Tab ) {
|
||||
$contact = new Contact($db);
|
||||
$result = $contact->fetch($cid);
|
||||
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $contact->error);
|
||||
|
||||
if ($result > 0) {
|
||||
$out .= $contact->getNomUrl(1);
|
||||
if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') {
|
||||
if (! empty($contact->phone_pro))
|
||||
$out .= '(' . dol_print_phone($contact->phone_pro) . ')';
|
||||
}
|
||||
$out .= '<div class="paddingright"></div>';
|
||||
}
|
||||
}
|
||||
$out .= '</td>';
|
||||
}
|
||||
else {
|
||||
$out.='<td> </td>';
|
||||
}
|
||||
|
||||
// Status
|
||||
|
||||
@@ -2806,7 +2806,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
|
||||
if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
|
||||
$enabledisablehtml='';
|
||||
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'">';
|
||||
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'>';
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt;
|
||||
$enabledisablehtml.='</span>';
|
||||
return $enabledisablehtml;
|
||||
@@ -4744,6 +4744,12 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
|
||||
}
|
||||
}
|
||||
|
||||
// Si (vendeur en France et acheteur hors Communaute europeenne et acheteur particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle
|
||||
if (! empty($conf->global->MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC) && empty($buyer_in_cee) && !$thirdparty_buyer->isACompany())
|
||||
{
|
||||
return get_product_vat_for_country($idprod,$thirdparty_seller,$idprodfournprice);
|
||||
}
|
||||
|
||||
// Sinon la TVA proposee par defaut=0. Fin de regle.
|
||||
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
|
||||
//print 'VATRULE 5';
|
||||
|
||||
@@ -437,15 +437,15 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
} else {
|
||||
$companytouseforaddress = $targetcompany;
|
||||
|
||||
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
|
||||
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
|
||||
{
|
||||
$targetcontact->fetch_thirparty();
|
||||
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
|
||||
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
|
||||
{
|
||||
$targetcontact->fetch_thirdparty();
|
||||
$companytouseforaddress = $targetcontact->thirdparty;
|
||||
}
|
||||
|
||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress));
|
||||
}
|
||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress));
|
||||
}
|
||||
// Country
|
||||
if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
|
||||
$stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code));
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -865,7 +866,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
|
||||
|
||||
@@ -1316,7 +1317,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
$top_shift = $pdf->getY() - $current_y;
|
||||
}
|
||||
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
@@ -1430,4 +1431,3 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1064,7 +1065,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1);
|
||||
|
||||
@@ -1799,4 +1800,3 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1012,7 +1013,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
|
||||
|
||||
@@ -1501,7 +1502,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
{
|
||||
$top_shift = $pdf->getY() - $current_y;
|
||||
}
|
||||
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
@@ -1644,4 +1645,3 @@ class pdf_azur extends ModelePDFPropales
|
||||
return ($tab_hl*7);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -600,7 +601,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
@@ -1096,7 +1097,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
|
||||
// Show sender
|
||||
@@ -1194,4 +1195,3 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -772,7 +773,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1);
|
||||
|
||||
@@ -1221,7 +1222,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
|
||||
// Show sender
|
||||
@@ -1319,4 +1320,3 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -42,7 +43,7 @@ print '});'."\n";
|
||||
|
||||
print '$("#show-'.$blocname.'").click(function(){'."\n";
|
||||
print ' setShowHide(1);'."\n";
|
||||
print ' $("#'.$blocname.'").show("blind", {direction: "vertical"}, 300).addClass("nohideobject");'."\n";
|
||||
print ' $("#'.$blocname.'_bloc").show("blind", {direction: "vertical"}, 300).addClass("nohideobject");'."\n";
|
||||
print ' $(this).hide();'."\n";
|
||||
print ' $("#hide-'.$blocname.'").show();'."\n";
|
||||
print '});'."\n";
|
||||
|
||||
@@ -1766,6 +1766,7 @@ MAIN_PDF_MARGIN_TOP=Top margin on PDF
|
||||
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
|
||||
SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups
|
||||
EnterCalculationRuleIfPreviousFieldIsYes=Enter calculcation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2')
|
||||
NothingToSetup=There is no specific setup to do for this module.
|
||||
##### Resource ####
|
||||
ResourceSetup=Configuration du module Resource
|
||||
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
||||
|
||||
@@ -122,7 +122,7 @@ MyAvailability=Ma disponibilité
|
||||
ActionType=Type événement
|
||||
DateActionBegin=Date début événément
|
||||
CloneAction=Cloner l'événement
|
||||
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cette facture <b>%s</b> ?
|
||||
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner l'événement <b>%s</b> ?
|
||||
RepeatEvent=Evénement répétitif
|
||||
EveryWeek=Chaque semaine
|
||||
EveryMonth=Chaque mois
|
||||
|
||||
@@ -138,9 +138,9 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
||||
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.= " sum(d.qty) as qty,";
|
||||
$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.= " IF(f.type = 2, -1, 1) * sum(d.qty) as qty,"; // not always positive in case of Credit note
|
||||
$sql.= " IF(f.type = 2, -1, 1) * sum(d.qty * d.buy_price_ht) as buying_price,"; // not always positive in case of Credit note
|
||||
$sql.= " IF(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.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
||||
|
||||
@@ -338,7 +338,7 @@ if ($resql)
|
||||
// Real stock
|
||||
print '<td align="right">';
|
||||
if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
|
||||
print $objp->stock_physique;
|
||||
print $objp->stock_physique|0;
|
||||
print '</td>';
|
||||
|
||||
// Details per warehouse
|
||||
|
||||
@@ -185,6 +185,7 @@ if ($action == 'order' && isset($_POST['valid']))
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur";
|
||||
$sql.= " WHERE fk_soc = ".$suppliersid[$i];
|
||||
$sql.= " AND source = 42 AND fk_statut = 0";
|
||||
$sql.= " AND entity IN (".getEntity('commande_fournisseur').")";
|
||||
$sql.= " ORDER BY date_creation DESC";
|
||||
$resql = $db->query($sql);
|
||||
if($resql && $db->num_rows($resql) > 0) {
|
||||
|
||||
@@ -291,7 +291,7 @@ $listofreferent=array(
|
||||
'title'=>"ListSupplierProposalsAssociatedProject",
|
||||
'class'=>'SupplierProposal',
|
||||
'table'=>'supplier_proposal',
|
||||
'datefieldname'=>'date',
|
||||
'datefieldname'=>'datec',
|
||||
'urlnew'=>DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$id.'&socid='.$socid,
|
||||
'lang'=>'supplier_proposal',
|
||||
'buttonnew'=>'AddSupplierProposal',
|
||||
@@ -698,6 +698,9 @@ foreach ($listofreferent as $key => $value)
|
||||
$urlnew=$value['urlnew'];
|
||||
$buttonnew=$value['buttonnew'];
|
||||
$testnew=$value['testnew'];
|
||||
$exclude_select_element = array('payment_various');
|
||||
if (!empty($value['exclude_select_element'])) $exclude_select_element[] = $value['exclude_select_element'];
|
||||
|
||||
|
||||
if ($qualified)
|
||||
{
|
||||
@@ -718,7 +721,7 @@ foreach ($listofreferent as $key => $value)
|
||||
if (! empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) $idtofilterthirdparty.=','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS;
|
||||
}
|
||||
|
||||
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, array('payment_various')))
|
||||
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename,$exclude_select_element))
|
||||
{
|
||||
$selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300');
|
||||
if (! $selectList || ($selectList<0))
|
||||
|
||||
@@ -87,7 +87,7 @@ class Societe extends CommonObject
|
||||
* Thirdparty name
|
||||
* @var string
|
||||
* @deprecated Use $name instead
|
||||
* @see name
|
||||
* @see $name
|
||||
*/
|
||||
public $nom;
|
||||
|
||||
@@ -120,21 +120,21 @@ class Societe extends CommonObject
|
||||
* State code
|
||||
* @var string
|
||||
* @deprecated Use state_code instead
|
||||
* @see state_code
|
||||
* @see $state_code
|
||||
*/
|
||||
var $departement_code;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Use state instead
|
||||
* @see state
|
||||
* @see $state
|
||||
*/
|
||||
var $departement;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Use country instead
|
||||
* @see country
|
||||
* @see $country
|
||||
*/
|
||||
var $pays;
|
||||
|
||||
@@ -308,7 +308,7 @@ class Societe extends CommonObject
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Note is split in public and private notes
|
||||
* @see note_public, note_private
|
||||
* @see $note_public, $note_private
|
||||
*/
|
||||
var $note;
|
||||
|
||||
@@ -1882,24 +1882,33 @@ class Societe extends CommonObject
|
||||
|
||||
if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto)))
|
||||
{
|
||||
$code = '';
|
||||
if (($this->client) && (! empty ( $this->code_client ))
|
||||
&& ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1
|
||||
|| $conf->global->SOCIETE_ADD_REF_IN_LIST == 2
|
||||
)
|
||||
)
|
||||
$code = $this->code_client . ' - ';
|
||||
{
|
||||
$code = $this->code_client . ' - ';
|
||||
}
|
||||
|
||||
if (($this->fournisseur) && (! empty ( $this->code_fournisseur ))
|
||||
&& ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1
|
||||
|| $conf->global->SOCIETE_ADD_REF_IN_LIST == 3
|
||||
)
|
||||
)
|
||||
$code .= $this->code_fournisseur . ' - ';
|
||||
{
|
||||
$code .= $this->code_fournisseur . ' - ';
|
||||
}
|
||||
|
||||
if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1)
|
||||
{
|
||||
$name =$code.' '.$name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$name =$code;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($this->name_alias)) $name .= ' ('.$this->name_alias.')';
|
||||
|
||||
@@ -194,7 +194,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u2 ON u.fk_user = u2.rowid";
|
||||
// TODO add hook
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
if (! empty($user->admin) && empty($user->entity)) {
|
||||
if (! empty($user->admin)) {
|
||||
if ($conf->entity == 1) {
|
||||
$sql.= " WHERE u.entity IS NOT NULL";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user