Merge branch 'Dolibarr:16.0' into 16.0

This commit is contained in:
Hasanuzzaman Sattar 2022-12-01 11:29:29 +05:30 committed by GitHub
commit 669eaa2828
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 57 additions and 15 deletions

View file

@ -3,6 +3,33 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 16.0.3 compared to 16.0.2 *****
FIX: $sign is useless
FIX: #18304 Member subscription confirmation email sent even if mandatory fields are missing
FIX: #19828
FIX: #19877
FIX: #22509 default value on integer fields don't retrieve by setSaveQuery
FIX: #22786
FIX: #22813
FIX: #22824 Accountancy - Journal - Search on subledger when list of subledger is disabled
FIX: Backup using the low memory mode
FIX: Bankaccounts API fetch with 'id' and 'socid'
FIX: base64_decode should be forbiden in dol_eval
FIX: Broken Permissions check, $object is null.
FIX: compute next value when year is on one digit for reset counter
FIX: copy same behaviour in other accountancy files
FIX: Fix the position of the verification condition of the test field in case of multi entities
FIX: for #22882
FIX: for #22952
FIX: merge errors on mailing card
FIX: PaymentBankTransfer Type page management with Select and Input on create.php
FIX: remove not initialized variable
FIX: SQL request parenthesis
FIX: Use the Hook addMoreActionsButtons resPrint
FIX: Wrong Extrafields Element For Assets
***** ChangeLog for 16.0.2 compared to 16.0.1 *****
FIX: 16.0 - computed extrafields are not displayed if the object has no other extrafields

View file

@ -1,3 +1,3 @@
# Use bzip2 instead of gzip
compression = "bzip2"
compression-level = 9
# Force use of gzip compression by dpkg-buildpackage
compression = "gzip"
#compression-level = 9

View file

@ -678,7 +678,7 @@ if ($nboftargetok) {
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
print "Remove target $FILENAMETGZ.tgz...\n";
unlink("$NEWDESTI/$FILENAMETGZ.tgz");
@ -1064,7 +1064,8 @@ if ($nboftargetok) {
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`;
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next;
}
@ -1146,7 +1147,8 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',

View file

@ -1965,7 +1965,7 @@ if ($id > 0) {
$valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country);
}
} elseif ($value == 'recuperableonly' || $value == 'deductible' || $value == 'category_type') {
$valuetoshow = yn($valuetoshow);
$valuetoshow = yn($valuetoshow ? 1 : 0);
$class = "center";
} elseif ($value == 'type_cdr') {
if (empty($valuetoshow)) {

View file

@ -550,7 +550,9 @@ if (empty($reshook) && $action == 'update') {
}
} else {
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm');
$object->type_code = GETPOST("actioncode", 'aZ09');
}
$object->label = GETPOST("label", "alphanohtml");
$object->datep = $datep;
$object->datef = $datef;

View file

@ -1150,12 +1150,8 @@ class ActionComm extends CommonObject
$userownerid = ($this->userownerid ? $this->userownerid : 0);
$userdoneid = ($this->userdoneid ? $this->userdoneid : 0);
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
$sql .= " SET percent = '".$this->db->escape($this->percentage)."'";
// If a type_id is set, we must also have the type_code set
if ($this->type_id > 0) {
$sql .= ", fk_action = ".(int) $this->type_id;
if (empty($this->type_code)) {
$cactioncomm = new CActionComm($this->db);
$result = $cactioncomm->fetch($this->type_id);
@ -1164,7 +1160,18 @@ class ActionComm extends CommonObject
}
}
}
$sql .= ", code = " . (isset($this->type_code)? "'".$this->db->escape($this->type_code) . "'":"null");
$code = $this->code;
if (empty($code) || (!empty($this->oldcopy) && $this->oldcopy->type_code != $this->type_code)) { // If code unknown or if change the type, we reset $code too
$code = $this->type_code;
}
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
$sql .= " SET percent = '".$this->db->escape($this->percentage)."'";
$sql .= ", fk_action = ".(int) $this->type_id;
$sql .= ", code = " . ($code ? "'".$this->db->escape($code)."'" : "null");
$sql .= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'" : "null");
$sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null');
$sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null');

View file

@ -8829,7 +8829,11 @@ abstract class CommonObject
// $this->{$field} may be null, '', 0, '0', 123, '123'
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
if (!isset($this->{$field})) {
$queryarray[$field] = 0;
if (!empty($info['default'])) {
$queryarray[$field] = $info['default'];
} else {
$queryarray[$field] = 0;
}
} else {
$queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
}

View file

@ -3505,7 +3505,7 @@ if ($action == 'create') {
}
print '</span>';
print '</td>';
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).'</td><td>&nbsp;</td></tr>';
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($multicurrency_resteapayer, 'MT')).'</td><td>&nbsp;</td></tr>';
}
} else // Credit note
{