mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
This commit is contained in:
@@ -199,6 +199,9 @@ if (empty($reshook)) {
|
||||
$filter['t.reconciled_option'] = $search_not_reconciled;
|
||||
$param .= '&search_not_reconciled='.urlencode($search_not_reconciled);
|
||||
}
|
||||
if (!empty($show_subgroup)) {
|
||||
$param .= '&show_subgroup='.urlencode($show_subgroup);
|
||||
}
|
||||
|
||||
// param with type of list
|
||||
$url_param = substr($param, 1); // remove first "&"
|
||||
|
||||
@@ -2322,7 +2322,7 @@ class BookKeeping extends CommonObject
|
||||
dol_syslog(get_class($this)."::select_account", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = '';
|
||||
$obj = (object) array('label' => '');
|
||||
if ($this->db->num_rows($resql)) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
}
|
||||
|
||||
@@ -3233,7 +3233,7 @@ class Commande extends CommonOrder
|
||||
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
$this->line->remise_percent = $remise_percent;
|
||||
$this->line->subprice = $pu_ht;
|
||||
$this->line->subprice = (float) $pu_ht;
|
||||
$this->line->info_bits = $info_bits;
|
||||
$this->line->special_code = $special_code;
|
||||
$this->line->total_ht = $total_ht;
|
||||
|
||||
@@ -102,7 +102,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$data = array();
|
||||
|
||||
$sql = "SELECT p.fk_statut, SUM(p.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql = "SELECT p.fk_statut, SUM(p.total_ttc) as mnttot, COUNT(*) as nb";
|
||||
$sql .= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -162,7 +162,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'class="nowraponall right amount"',
|
||||
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
|
||||
'text' => price($data[$j]->mnttot, 1, $langs, 0, 0, -1, $conf->currency),
|
||||
);
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
@@ -191,7 +191,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$data = array();
|
||||
|
||||
$sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb";
|
||||
$sql = "SELECT c.fk_statut, sum(c.total_ttc) as mnttot, count(*) as nb";
|
||||
$sql .= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -248,7 +248,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'class="nowraponall right amount"',
|
||||
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
|
||||
'text' => price($data[$j]->mnttot, 1, $langs, 0, 0, -1, $conf->currency),
|
||||
);
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
@@ -276,7 +276,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
// part 1
|
||||
$data = array();
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as mnttot, COUNT(*) as nb";
|
||||
$sql .= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -333,7 +333,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'class="nowraponall right amount"',
|
||||
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency)
|
||||
'text' => price($data[$j]->mnttot, 1, $langs, 0, 0, -1, $conf->currency)
|
||||
);
|
||||
|
||||
// We add only for the current year
|
||||
@@ -357,7 +357,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
// part 2
|
||||
$data = array();
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as mnttot, COUNT(*) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " WHERE f.entity IN (".getEntity('invoice').')';
|
||||
$sql .= " AND f.fk_soc = s.rowid";
|
||||
@@ -406,7 +406,7 @@ class box_activity extends ModeleBoxes
|
||||
$totalnb += $data[$j]->nb;
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'class="nowraponall right amount"',
|
||||
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
|
||||
'text' => price($data[$j]->mnttot, 1, $langs, 0, 0, -1, $conf->currency),
|
||||
);
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
|
||||
@@ -169,7 +169,7 @@ class box_validated_projects extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'class="center"',
|
||||
'text' => $objp->startDate,
|
||||
'text' => $objp->startdate,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2025 William Mead <william@m34d.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -68,13 +69,12 @@ class Interventions extends DolibarrApi
|
||||
}
|
||||
|
||||
/**
|
||||
* Get properties of a Expense Report object
|
||||
* Return an array with Expense Report information
|
||||
* Get properties of an intervention object
|
||||
*
|
||||
* @param int $id ID of Expense Report
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
* @throws RestException
|
||||
* @throws RestException
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
@@ -298,9 +298,9 @@ class Interventions extends DolibarrApi
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete order
|
||||
* Delete intervention
|
||||
*
|
||||
* @param int $id Order ID
|
||||
* @param int $id Intervention ID
|
||||
* @return array
|
||||
*/
|
||||
public function delete($id)
|
||||
|
||||
@@ -59,15 +59,14 @@ abstract class AbstractClient implements ClientInterface
|
||||
/**
|
||||
* @param array $headers
|
||||
*/
|
||||
public function normalizeHeaders(&$headers)
|
||||
public function normalizeHeaders($headers)
|
||||
{
|
||||
// Normalize headers
|
||||
array_walk(
|
||||
$headers,
|
||||
function (&$val, &$key) {
|
||||
$key = ucfirst(strtolower($key));
|
||||
$val = ucfirst(strtolower($key)) . ': ' . $val;
|
||||
}
|
||||
);
|
||||
$normalizeHeaders = [];
|
||||
foreach ($headers as $key => $val) {
|
||||
$val = ucfirst(strtolower($key)) . ': ' . $val;
|
||||
$normalizeHeaders[$key] = $val;
|
||||
}
|
||||
|
||||
return $normalizeHeaders;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class CurlClient extends AbstractClient
|
||||
// Normalize method name
|
||||
$method = strtoupper($method);
|
||||
|
||||
$this->normalizeHeaders($extraHeaders);
|
||||
$extraHeaders = $this->normalizeHeaders($extraHeaders);
|
||||
|
||||
if ($method === 'GET' && !empty($requestBody)) {
|
||||
throw new \InvalidArgumentException('No body expected for "GET" request.');
|
||||
|
||||
@@ -33,7 +33,7 @@ class StreamClient extends AbstractClient
|
||||
// Normalize method name
|
||||
$method = strtoupper($method);
|
||||
|
||||
$this->normalizeHeaders($extraHeaders);
|
||||
$extraHeaders = $this->normalizeHeaders($extraHeaders);
|
||||
|
||||
if ($method === 'GET' && !empty($requestBody)) {
|
||||
throw new \InvalidArgumentException('No body expected for "GET" request.');
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_payment_term ADD PRIMARY KEY(rowid);
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_payment_term CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
|
||||
-- VPGSQL8.2 CREATE SEQUENCE __DATABASE__.llx_c_civility_rowid_seq OWNED BY llx_c_civility.rowid;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_c_civility_rowid_seq OWNED BY llx_c_civility.rowid;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_civility ADD PRIMARY KEY (rowid);
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_civility ALTER COLUMN rowid SET DEFAULT nextval('llx_c_civility_rowid_seq');
|
||||
-- VPGSQL8.2 SELECT setval('llx_c_civility_rowid_seq', MAX(rowid)) FROM llx_c_civility;
|
||||
|
||||
-- VPGSQL8.2 CREATE SEQUENCE __DATABASE__.llx_c_payment_term_rowid_seq OWNED BY llx_c_payment_term.rowid;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_c_payment_term_rowid_seq OWNED BY llx_c_payment_term.rowid;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_payment_term ADD PRIMARY KEY (rowid);
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_payment_term ALTER COLUMN rowid SET DEFAULT nextval('llx_c_payment_term_rowid_seq');
|
||||
-- VPGSQL8.2 SELECT setval('llx_c_payment_term_rowid_seq', MAX(rowid)) FROM llx_c_payment_term;
|
||||
@@ -146,7 +146,7 @@ ALTER TABLE llx_societe_contacts DROP FOREIGN KEY fk_societe_contacts_fk_c_type_
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY(rowid);
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_type_contact CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
|
||||
-- VPGSQL8.2 CREATE SEQUENCE __DATABASE__.llx_c_type_contact_rowid_seq OWNED BY llx_c_type_contact.rowid;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_c_type_contact_rowid_seq OWNED BY llx_c_type_contact.rowid;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY (rowid);
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_type_contact ALTER COLUMN rowid SET DEFAULT nextval('llx_c_type_contact_rowid_seq');
|
||||
-- VPGSQL8.2 SELECT setval('llx_c_type_contact_rowid_seq', MAX(rowid)) FROM llx_c_type_contact;
|
||||
|
||||
@@ -180,7 +180,7 @@ ALTER TABLE llx_c_paiement DROP INDEX uk_c_paiement;
|
||||
ALTER TABLE llx_c_paiement ADD UNIQUE INDEX uk_c_paiement_code(entity, code);
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_paiement CHANGE COLUMN id id INTEGER AUTO_INCREMENT PRIMARY KEY;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE __DATABASE__.llx_c_paiement_id_seq OWNED BY llx_c_paiement.id;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_c_paiement_id_seq OWNED BY llx_c_paiement.id;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_paiement ADD PRIMARY KEY (id);
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_paiement ALTER COLUMN id SET DEFAULT nextval('llx_c_paiement_id_seq');
|
||||
-- VPGSQL8.2 SELECT setval('llx_c_paiement_id_seq', MAX(id)) FROM llx_c_paiement;
|
||||
@@ -190,7 +190,7 @@ ALTER TABLE llx_c_payment_term DROP INDEX uk_c_payment_term;
|
||||
ALTER TABLE llx_c_payment_term ADD UNIQUE INDEX uk_c_payment_term_code(entity, code);
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_payment_term CHANGE COLUMN rowid rowid INTEGER AUTO_INCREMENT PRIMARY KEY;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE __DATABASE__.llx_c_payment_term_rowid_seq OWNED BY llx_c_payment_term.rowid;
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_c_payment_term_rowid_seq OWNED BY llx_c_payment_term.rowid;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_payment_term ADD PRIMARY KEY (rowid);
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_payment_term ALTER COLUMN rowid SET DEFAULT nextval('llx_c_payment_term_rowid_seq');
|
||||
-- VPGSQL8.2 SELECT setval('llx_c_payment_term_rowid_seq', MAX(rowid)) FROM llx_c_payment_term;
|
||||
|
||||
@@ -726,7 +726,7 @@ function activitytrim($product_type)
|
||||
$yearofbegindate = date('Y', dol_time_plus_duree(time(), -3, "y"));
|
||||
$out = '';
|
||||
// breakdown by quarter
|
||||
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot";
|
||||
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as mnttot";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."paiement as p,".MAIN_DB_PREFIX."paiement_facture as pf";
|
||||
$sql .= " WHERE f.entity IN (".getEntity('invoice').")";
|
||||
@@ -788,19 +788,19 @@ function activitytrim($product_type)
|
||||
}
|
||||
|
||||
if ($objp->mois == "01" || $objp->mois == "02" || $objp->mois == "03") {
|
||||
$trim1 += $objp->Mnttot;
|
||||
$trim1 += $objp->mnttot;
|
||||
}
|
||||
|
||||
if ($objp->mois == "04" || $objp->mois == "05" || $objp->mois == "06") {
|
||||
$trim2 += $objp->Mnttot;
|
||||
$trim2 += $objp->mnttot;
|
||||
}
|
||||
|
||||
if ($objp->mois == "07" || $objp->mois == "08" || $objp->mois == "09") {
|
||||
$trim3 += $objp->Mnttot;
|
||||
$trim3 += $objp->mnttot;
|
||||
}
|
||||
|
||||
if ($objp->mois == "10" || $objp->mois == "11" || $objp->mois == "12") {
|
||||
$trim4 += $objp->Mnttot;
|
||||
$trim4 += $objp->mnttot;
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
Reference in New Issue
Block a user