Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
83071df214
@ -281,13 +281,16 @@ function getNumberInvoicesPieChart($mode)
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement > '".date_format($datenowadd15, 'Y-m-d')."'", 1, 0).") as nbnotlate15";
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement > '".date_format($datenowadd30, 'Y-m-d')."'", 1, 0).") as nbnotlate30";
|
||||
if ($mode == 'customers') {
|
||||
$element = 'invoice';
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
} elseif ($mode == 'fourn' || $mode == 'suppliers') {
|
||||
$element = 'supplier_invoice';
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
$sql .= " WHERE f.type <> 2";
|
||||
$sql .= " WHERE f.entity IN (".getEntity($element).")";
|
||||
$sql .= " AND f.type <> 2";
|
||||
$sql .= " AND f.fk_statut = 1";
|
||||
if (isset($user->socid) && $user->socid > 0) {
|
||||
$sql .= " AND f.fk_soc = ".((int) $user->socid);
|
||||
|
||||
@ -120,7 +120,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
||||
|
||||
// For multicompany
|
||||
if (!empty($out) && !empty($conf->multicompany->enabled)) {
|
||||
$out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities
|
||||
$out .= "&entity=".$object->entity; // Check the entity because we may have the same reference in several entities
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/multicompany_page.php
|
||||
* \file htdocs/core/multicompany_page.php
|
||||
* \brief File to return a page with the list of all entities user can switch to
|
||||
*/
|
||||
|
||||
@ -41,7 +41,7 @@ if (!defined('NOREQUIREMENU')) {
|
||||
|
||||
require_once '../main.inc.php';
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$action = GETPOST('action', 'aZ');
|
||||
$entityid = GETPOST('entity', 'int');
|
||||
$backtourl = GETPOST('backtourl');
|
||||
if (empty($backtourl)) {
|
||||
@ -63,7 +63,7 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('acction', 'aZ') == 'switchentity') {
|
||||
if ($action == 'switchentity') {
|
||||
if (is_object($mc)) {
|
||||
$mc->switchEntity($entityid);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user