Skip to content

Commit

Permalink
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
  • Loading branch information
eldy committed Nov 11, 2019
2 parents 8976bd7 + 5ae5b87 commit 2ccef4e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion build/makepack-dolibarr.pl
Expand Up @@ -461,15 +461,18 @@
print "Clean $BUILDROOT\n";
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.editorconfig`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.codeclimate`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.git*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.pydevproject`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.scrutinizer.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.stickler.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;

$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
Expand Down
10 changes: 9 additions & 1 deletion htdocs/accountancy/customer/list.php
Expand Up @@ -297,6 +297,11 @@
$sql .= $db->plimit($limit + 1, $offset);

dol_syslog("accountancy/customer/list.php", LOG_DEBUG);
// MAX_JOIN_SIZE can be very low (ex: 300000) on some limited configurations (ex: https://www.online.net/fr/hosting/online-perso)
// This big SELECT command may exceed the MAX_JOIN_SIZE limit => Therefore we use SQL_BIG_SELECTS=1 to disable the MAX_JOIN_SIZE security
if ($db->type == 'mysqli') {
$db->query("SET SQL_BIG_SELECTS=1");
}
$result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
Expand Down Expand Up @@ -404,7 +409,7 @@
$facture_static = new Facture($db);
$product_static = new Product($db);

$isSellerInEEC = isInEEC($mysoc);
$isSellerInEEC = isInEEC($mysoc);

$accountingaccount_codetotid_cache = array();

Expand Down Expand Up @@ -590,6 +595,9 @@
} else {
print $db->error();
}
if ($db->type == 'mysqli') {
$db->query("SET SQL_BIG_SELECTS=0"); // Enable MAX_JOIN_SIZE limitation
}

// Add code to auto check the box when we select an account
print '<script type="text/javascript" language="javascript">
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/bank/class/paymentvarious.class.php
Expand Up @@ -378,7 +378,7 @@ public function create($user)
$sql.= "'".$this->db->idate($this->datep)."'";
$sql.= ", '".$this->db->idate($this->datev)."'";
$sql.= ", '".$this->db->escape($this->sens)."'";
$sql.= ", ".$this->amount;
$sql.= ", ".price2num($this->amount);
$sql.= ", '".$this->db->escape($this->type_payment)."'";
$sql.= ", '".$this->db->escape($this->num_payment)."'";
if ($this->note) $sql.= ", '".$this->db->escape($this->note)."'";
Expand Down
3 changes: 1 addition & 2 deletions htdocs/compta/bank/various_payment/card.php
Expand Up @@ -48,12 +48,11 @@
$accountid = GETPOST("accountid") > 0 ? GETPOST("accountid", "int") : 0;
$label = GETPOST("label", "alpha");
$sens = GETPOST("sens", "int");
$amount = GETPOST("amount", "alpha");
$amount = price2num(GETPOST("amount", "alpha"));
$paymenttype = GETPOST("paymenttype", "int");
$accountancy_code = GETPOST("accountancy_code", "alpha");
$subledger_account = GETPOST("subledger_account", "alpha");
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
$category_transaction = GETPOST("category_transaction", 'alpha');

// Security check
$socid = GETPOST("socid", "int");
Expand Down
5 changes: 5 additions & 0 deletions htdocs/core/modules/product/mod_codeproduct_elephant.php
Expand Up @@ -217,6 +217,11 @@ public function getNextValue($objproduct = 0, $type = -1)

$now=dol_now();

if (! empty($conf->global->PRODUCT_ELEPHANT_ADD_WHERE))
{
$where = ' AND ('.dol_string_nospecial(dol_string_unaccent($conf->global->PRODUCT_ELEPHANT_ADD_WHERE), '_', array(',', '@', '"', "|", ";", ":")).')';
}

$numFinal=get_next_value($db, $mask, 'product', $field, $where, '', $now);

return $numFinal;
Expand Down

0 comments on commit 2ccef4e

Please sign in to comment.