forked from Wavyzz/dolibarr
Fix bad property
This commit is contained in:
@@ -103,10 +103,10 @@ class box_shipments extends ModeleBoxes
|
|||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping' AND el.sourcetype IN ('commande')";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping' AND el.sourcetype IN ('commande')";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid AND el.sourcetype IN ('commande') AND el.targettype = 'shipping'";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid AND el.sourcetype IN ('commande') AND el.targettype = 'shipping'";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
|
||||||
$sql .= " WHERE e.entity = ".$conf->entity;
|
$sql .= " WHERE e.entity = ".$conf->entity;
|
||||||
if (!empty($conf->global->ORDER_BOX_LAST_SHIPMENTS_VALIDATED_ONLY)) $sql .= " AND e.fk_statut = 1";
|
if (!empty($conf->global->ORDER_BOX_LAST_SHIPMENTS_VALIDATED_ONLY)) $sql .= " AND e.fk_statut = 1";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= " AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND sc.fk_user = ".$user->id;
|
||||||
else $sql .= " ORDER BY e.date_delivery, e.ref DESC ";
|
else $sql .= " ORDER BY e.date_delivery, e.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '')
|
|||||||
'datec' => dol_print_date($user->datec, 'dayhourrfc'),
|
'datec' => dol_print_date($user->datec, 'dayhourrfc'),
|
||||||
'datem' => dol_print_date($user->datem, 'dayhourrfc'),
|
'datem' => dol_print_date($user->datem, 'dayhourrfc'),
|
||||||
'fk_thirdparty' => $user->socid,
|
'fk_thirdparty' => $user->socid,
|
||||||
'fk_contact' => $user->contact_id,
|
'fk_contact' => $user->contactid,
|
||||||
'fk_member' => $user->fk_member,
|
'fk_member' => $user->fk_member,
|
||||||
'datelastlogin' => dol_print_date($user->datelastlogin, 'dayhourrfc'),
|
'datelastlogin' => dol_print_date($user->datelastlogin, 'dayhourrfc'),
|
||||||
'datepreviouslogin' => dol_print_date($user->datepreviouslogin, 'dayhourrfc'),
|
'datepreviouslogin' => dol_print_date($user->datepreviouslogin, 'dayhourrfc'),
|
||||||
|
|||||||
Reference in New Issue
Block a user