Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2022-11-23 17:07:36 +01:00
commit fb2b4ea388
3 changed files with 3 additions and 7 deletions

View File

@ -740,7 +740,7 @@ class Adherent extends CommonObject
$sql .= ", state_id = ".($this->state_id > 0 ? $this->db->escape($this->state_id) : "null");
$sql .= ", email = '".$this->db->escape($this->email)."'";
$sql .= ", url = ".(!empty($this->url) ? "'".$this->db->escape($this->url)."'" : "null");
$sql .= ", socialnetworks = '".$this->db->escape(json_encode($this->socialnetworks))."'";
$sql .= ", socialnetworks = ".($this->socialnetworks ? "'".$this->db->escape(json_encode($this->socialnetworks))."'" : "null");
$sql .= ", phone = ".($this->phone ? "'".$this->db->escape($this->phone)."'" : "null");
$sql .= ", phone_perso = ".($this->phone_perso ? "'".$this->db->escape($this->phone_perso)."'" : "null");
$sql .= ", phone_mobile = ".($this->phone_mobile ? "'".$this->db->escape($this->phone_mobile)."'" : "null");

View File

@ -72,13 +72,9 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="linkedcol-amount right nowraponall">';
if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) {
$sign = 1;
if ($objectlink->type == Facture::TYPE_CREDIT_NOTE) {
$sign = -1;
}
if ($objectlink->statut != 3) {
// If not abandonned
$total = $total + $sign * $objectlink->total_ht;
$total += $objectlink->total_ht;
echo price($objectlink->total_ht);
} else {
echo '<strike>'.price($objectlink->total_ht).'</strike>';

View File

@ -302,7 +302,7 @@ if ($modecompta == 'BOOKKEEPING') {
if (!empty($date_start) && !empty($date_end)) {
$sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'";
}
$sql .= " GROUP BY pcg_type DESC";
$sql .= " GROUP BY pcg_type";
if ($showaccountdetail == 'no') {
$sql .= ", name, socid"; // group by "accounting group" (INCOME/EXPENSE), then "customer".
}