Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Nov 28, 2019
2 parents c906d04 + d58bb5f commit 616623c
Show file tree
Hide file tree
Showing 81 changed files with 47 additions and 133,269 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
5,272 changes: 0 additions & 5,272 deletions dev/initdemo/mysqldump_dolibarr_3.0.0.sql

This file was deleted.

5,944 changes: 0 additions & 5,944 deletions dev/initdemo/mysqldump_dolibarr_3.1.0.sql

This file was deleted.

5,854 changes: 0 additions & 5,854 deletions dev/initdemo/mysqldump_dolibarr_3.2.0.sql

This file was deleted.

6,056 changes: 0 additions & 6,056 deletions dev/initdemo/mysqldump_dolibarr_3.3.0.sql

This file was deleted.

6,817 changes: 0 additions & 6,817 deletions dev/initdemo/mysqldump_dolibarr_3.4.0.sql

This file was deleted.

7,066 changes: 0 additions & 7,066 deletions dev/initdemo/mysqldump_dolibarr_3.5.0.sql

This file was deleted.

7,205 changes: 0 additions & 7,205 deletions dev/initdemo/mysqldump_dolibarr_3.6.0.sql

This file was deleted.

7,687 changes: 0 additions & 7,687 deletions dev/initdemo/mysqldump_dolibarr_3.7.0.sql

This file was deleted.

7,823 changes: 0 additions & 7,823 deletions dev/initdemo/mysqldump_dolibarr_3.8.0.sql

This file was deleted.

8,217 changes: 0 additions & 8,217 deletions dev/initdemo/mysqldump_dolibarr_3.9.0.sql

This file was deleted.

8,576 changes: 0 additions & 8,576 deletions dev/initdemo/mysqldump_dolibarr_4.0.0.sql

This file was deleted.

9,056 changes: 0 additions & 9,056 deletions dev/initdemo/mysqldump_dolibarr_5.0.0.sql

This file was deleted.

9,423 changes: 0 additions & 9,423 deletions dev/initdemo/mysqldump_dolibarr_6.0.0.sql

This file was deleted.

10,135 changes: 0 additions & 10,135 deletions dev/initdemo/mysqldump_dolibarr_7.0.0.sql

This file was deleted.

14,172 changes: 0 additions & 14,172 deletions dev/initdemo/mysqldump_dolibarr_8.0.0.sql

This file was deleted.

13,954 changes: 0 additions & 13,954 deletions dev/initdemo/mysqldump_dolibarr_9.0.0.sql

This file was deleted.

5 changes: 4 additions & 1 deletion htdocs/admin/index.php
Expand Up @@ -67,9 +67,12 @@
}
}

print '<span class="opacitymedium">';
print $langs->trans("SetupDescription1");
print $langs->trans("AreaForAdminOnly").' ';
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"))."<br><br>";
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"));
print '</span>';
print "<br><br>";

print '<br>';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/bom/bom_card.php
Expand Up @@ -693,7 +693,7 @@ function init_myfunc()
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang);
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);

// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('bom'));
Expand Down
2 changes: 2 additions & 0 deletions htdocs/categories/class/categorie.class.php
Expand Up @@ -1146,11 +1146,13 @@ public function get_full_arbo($type, $markafterid = 0, $include = 0)
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
* It is called by get_full_arbo()
* This function is a memory scan only from $this->cats and $this->motherof, no database access must be done here.
*
* @param int $id_categ id_categ entry to update
* @param int $protection Deep counter to avoid infinite loop
* @return void
* @see get_full_arbo()
*/
public function build_path_from_id_categ($id_categ, $protection = 1000)
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/commonobject.class.php
Expand Up @@ -7546,7 +7546,7 @@ public function createCommon(User $user, $notrigger = false)
{
if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)')
{
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE ref = '(PROV)' AND rowid = ".$this->id;
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id;
$resqlupdate = $this->db->query($sql);

if ($resqlupdate === false)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/modBom.class.php
Expand Up @@ -121,7 +121,7 @@ public function __construct($db)
// 1=>array('BILLOFMATERIALS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
// );
$this->const = array(
1=>array('BOM_ADDON_PDF', 'chaine', 'alpha', 'Name of PDF model of BOM', 0),
1=>array('BOM_ADDON_PDF', 'chaine', 'generic_bom_odt', 'Name of PDF model of BOM', 0),
2=>array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0),
3=>array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0)
);
Expand Down
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions htdocs/langs/en_US/admin.lang
Expand Up @@ -1960,3 +1960,4 @@ BaseOnSabeDavVersion=Based on the library SabreDAV version
NotAPublicIp=Not a public IP
MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation.
FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled
EmailTemplate=Template for email
2 changes: 1 addition & 1 deletion htdocs/modulebuilder/template/myobject_card.php
Expand Up @@ -541,7 +541,7 @@ function init_myfunc()
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->mymodule->myobject->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->mymodule->myobject->create; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('mymodule', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
print $formfile->showdocuments('mymodule', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
*/

// Show links to link elements
Expand Down
3 changes: 2 additions & 1 deletion htdocs/product/document.php
Expand Up @@ -82,6 +82,8 @@
}
$modulepart = 'produit';

$permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));


/*
* Actions
Expand Down Expand Up @@ -233,7 +235,6 @@

dol_fiche_end();

$permission = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';

Expand Down
13 changes: 10 additions & 3 deletions htdocs/product/price.php
Expand Up @@ -1580,7 +1580,13 @@ function on_change() {
print '</td>';

// User
print '<td class="right"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objp->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$objp->login.'</a></td>';
print '<td class="right">';
if ($objp->user_id > 0) {
$userstatic = new User($db);
$userstatic->fetch($objp->user_id);
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
}
print '</td>';

// Action
if ($user->rights->produit->supprimer)
Expand Down Expand Up @@ -1944,7 +1950,8 @@ function on_change() {
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
print '<td class="right">';
print $userstatic->getLoginUrl(1);
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
//print $userstatic->getLoginUrl(1);
print '</td>';
print '</tr>';
}
Expand Down Expand Up @@ -2153,7 +2160,7 @@ function on_change() {
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
print '<td class="right">';
print $userstatic->getLoginUrl(1);
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
print '</td>';

// Todo Edit or delete button
Expand Down
19 changes: 18 additions & 1 deletion htdocs/takepos/ajax/ajax.php
Expand Up @@ -66,7 +66,24 @@
}
}
elseif ($action == "search" && $term != '') {
$sql = 'SELECT rowid, ref, label, tosell, tobuy FROM '.MAIN_DB_PREFIX.'product';
// Define $filteroncategids, the filter on category ID if there is a Root category defined.
$filteroncategids = '';
if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) { // A root category is defined, we must filter on products inside this category tree
$object = new Categorie($db);
//$result = $object->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID);
$arrayofcateg = $object->get_full_arbo('product', $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 1);
if (is_array($arrayofcateg) && count($arrayofcateg) > 0) {
foreach($arrayofcateg as $val)
{
$filteroncategids .= ($filteroncategids ? ', ' : '').$val['id'];
}
}
}

$sql = 'SELECT rowid, ref, label, tosell, tobuy FROM '.MAIN_DB_PREFIX.'product as p';
if ($filteroncategids) {
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid AND cp.fk_categorie IN ('.$filteroncategids.')';
}
$sql .= ' WHERE entity IN ('.getEntity('product').')';
$sql .= ' AND tosell = 1';
$sql .= natural_search(array('ref', 'label', 'barcode'), $term);
Expand Down
4 changes: 4 additions & 0 deletions htdocs/takepos/css/pos.css
Expand Up @@ -93,6 +93,10 @@ div.wrapper2{
background-color:#fff;
}

img.imgwrapper {
max-width: 100%;
}

button:active{
background:black;
color: white;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/user/class/user.class.php
Expand Up @@ -2461,8 +2461,8 @@ public function getLoginUrl($withpicto = 0, $option = '')
$linkstart = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
$linkend = '</a>';

//Check user's rights to see an other user
if ((!$user->rights->user->user->lire && $this->id != $user->id)) $option = 'nolink';
//Check user's rights to see an other user
if ((!$user->rights->user->user->lire && $this->id != $user->id)) $option = 'nolink';

if ($option == 'xxx')
{
Expand Down

0 comments on commit 616623c

Please sign in to comment.