2
0
forked from Wavyzz/dolibarr

Compare commits

...

34 Commits
22.0.2 ... 19.0

Author SHA1 Message Date
Frédéric FRANCE
a692c73071 fix select nature member in adherent/admin/website.php (#35641) 2025-10-05 16:59:16 +02:00
Laurent Destailleur
def8495513 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-02 15:52:20 +02:00
Laurent Destailleur
b2fce5052f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-02 15:52:05 +02:00
Regis Houssin
b1d57a6bd1 FIX sql syntax error (#35588) 2025-10-02 15:45:30 +02:00
ldestailleur
16904d12f8 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-02 03:18:10 +02:00
ldestailleur
1525b9c85e Rename label 2025-10-02 03:17:57 +02:00
Marc de Lima Lucio
ffe07999cf FIX: pgsql: error when calculating depreciations (#34213)
* FIX: pgsql: error when calculating depreciations

* FIX: asset deprectiation: optimize sql

* FIX: travis
2025-10-02 02:39:29 +02:00
Regis Houssin
24146d89c5 FIX #35568 (#35569)
* FIX #35568

* FIX clear "thirdparty" object before or during the fetch

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 19:54:50 +02:00
ldestailleur
1dd2cc36e4 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-01 19:51:11 +02:00
ldestailleur
477d755bbc Clean CI files 2025-10-01 19:32:40 +02:00
ldestailleur
f85b53a4ca Test CI 2025-10-01 19:29:30 +02:00
ldestailleur
a6e01fe7b7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 19:28:46 +02:00
ldestailleur
43c2336683 Log 2025-10-01 19:28:36 +02:00
Thomas C.
e1b919366e FIX : To have only the sender's entity when sending mail (#31053)
* fix

* Update html.formmail.class.php

* Update html.formmail.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
2025-10-01 19:18:31 +02:00
ldestailleur
40e4a6959f Fix CI 2025-10-01 19:17:22 +02:00
ldestailleur
e9869bb5da Fix yml 2025-10-01 17:19:57 +02:00
ldestailleur
22995dae99 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-01 17:16:24 +02:00
ldestailleur
52ae202aff Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:59:49 +02:00
ldestailleur
2ca2fe7f28 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:55:23 +02:00
ldestailleur
140310c508 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:55:05 +02:00
ldestailleur
64cf2513bd Clean CI 2025-10-01 16:54:52 +02:00
Frédéric FRANCE
6c207f78d8 fix llx_actioncomm.sql (#35583) 2025-10-01 16:24:54 +02:00
Marc de Lima Lucio
a3969c1d2c FIX: php 8+ warnings when creating deposits (#35582) 2025-10-01 16:21:05 +02:00
Regis Houssin
d9563ac0ed Update pr-18.yaml (#35577)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 14:49:29 +02:00
ldestailleur
bea2f674f0 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 14:34:04 +02:00
ldestailleur
80494870c0 Try to fix CI 18 2025-10-01 14:33:56 +02:00
Eric - CAP-REL
d25847602b missing fk_user_creat value (#35576) 2025-10-01 13:59:27 +02:00
ldestailleur
283efbbffe Test CI 2025-10-01 13:57:10 +02:00
ldestailleur
2e430a71a3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 13:54:19 +02:00
ldestailleur
faf2971ff7 Try to fix Ci 18 2025-10-01 13:54:11 +02:00
Regis Houssin
acf5e30b30 FIX missing entity filter (#35517) 2025-09-27 12:07:43 +02:00
ldestailleur
76b5540124 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-27 12:06:49 +02:00
ldestailleur
8bb63c5963 Test on autoassign 2025-09-27 12:06:40 +02:00
HENRY Florian
f532f85d8c fix: remove space in global conf test (#35484) 2025-09-26 20:54:21 +02:00
13 changed files with 29 additions and 48 deletions

View File

@@ -1,3 +0,0 @@
# Add this tag for any changes for more than 1 line
"Pending analysis of PR (maintenance team)":
min: 1

View File

@@ -6,8 +6,7 @@ on:
schedule:
- cron: "0 20 1 * *"
workflow_dispatch:
branches:
- develop
permissions:
contents: read
@@ -22,7 +21,7 @@ jobs:
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
file_extensions: php
project_reports: Perfile
file_extensions: php
project_reports: Perfile

View File

@@ -1,28 +0,0 @@
name: Test github actions
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
push:
env:
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
ENVGHU: ${{ github.token }}
TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }}
TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }}
ENVLOCAL: "varenvlocal"
jobs:
testjob:
runs-on: ubuntu-latest
steps:
- name: Log
run: |
echo "Run action by ${{ github.actor }}"
echo "github.token=${{ github.token }}"
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
echo "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}"
echo "variable repository : ${{vars.TEST_VAR_REPO}}"
echo "ENVLOCAL: ${{env.ENVLOCAL}}"

View File

@@ -225,7 +225,7 @@ if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) {
print '<tr class="oddeven drag" id="trforcenature"><td>';
print $langs->trans("ForceMemberNature");
print '</td><td>';
$forcenature = getDolGlobalInt('MEMBER_NEWFORM_FORCEMORPHY', 0);
$forcenature = getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY'); // 'phy' or 'mor'
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
print "</td></tr>\n";

View File

@@ -939,13 +939,12 @@ class Asset extends CommonObject
}
// Delete old lines
$sql = "DELETE " . MAIN_DB_PREFIX . "asset_depreciation FROM " . MAIN_DB_PREFIX . "asset_depreciation";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab ON ab.doc_type = 'asset' AND ab.fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid";
$sql .= " WHERE " . MAIN_DB_PREFIX . "asset_depreciation.fk_asset = " . (int) $this->id;
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.depreciation_mode = '" . $this->db->escape($mode_key) . "'";
$sql .= " AND ab.fk_docdet IS NULL";
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "asset_depreciation";
$sql .= " WHERE fk_asset = " . (int) $this->id;
$sql .= " AND depreciation_mode = '" . $this->db->escape($mode_key) . "'";
$sql .= " AND NOT EXISTS (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset' AND fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid)";
if ($last_depreciation_date !== "") {
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.ref != ''";
$sql .= " AND ref <> ''";
}
$resql = $this->db->query($sql);
if (!$resql) {

View File

@@ -196,6 +196,7 @@ class CashControl extends CommonObject
$sql .= ", cash";
$sql .= ", cheque";
$sql .= ", card";
$sql .= ", fk_user_creat";
$sql .= ") VALUES (";
//$sql .= "'(PROV)', ";
$sql .= ((int) $conf->entity);
@@ -210,6 +211,7 @@ class CashControl extends CommonObject
$sql .= ", ".price2num($this->cash, 'MT');
$sql .= ", ".price2num($this->cheque, 'MT');
$sql .= ", ".price2num($this->card, 'MT');
$sql .= ", ".((int) $user->id);
$sql .= ")";
$this->db->begin();

View File

@@ -1537,6 +1537,9 @@ if (empty($reshook)) {
}
foreach ($TTotalByTva as $tva => &$total) {
if (empty($amountdeposit[$tva])) {
$amountdeposit[$tva] = 0;
}
$coef = $total / $srcobject->total_ttc; // Calc coef
$am = $amount * $coef;
$amount_ttc_diff += $am;
@@ -1561,6 +1564,9 @@ if (empty($reshook)) {
if ($qualified) {
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
$tva_tx = $lines[$i]->tva_tx;
if (empty($amountdeposit[$tva_tx])) {
$amountdeposit[$tva_tx] = 0;
}
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
}
}

View File

@@ -1147,6 +1147,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
$objecttmp = new $objectclass($db);
$nbok = 0;
foreach ($toselect as $toselectid) {
$objecttmp->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
$result = $objecttmp->fetch($toselectid);
if ($result > 0) {
$outputlangs = $langs;
@@ -1161,7 +1162,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($objecttmp->default_lang)) {
$newlang = $objecttmp->default_lang; // for thirdparty
}
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
$objecttmp->fetch_thirdparty();
$newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ...
}

View File

@@ -641,7 +641,7 @@ class FormMail extends Form
// Add also email aliases from the c_email_senderprofile table
$sql = "SELECT rowid, label, email FROM ".$this->db->prefix()."c_email_senderprofile";
$sql .= " WHERE active = 1 AND (private = 0 OR private = ".((int) $user->id).")";
$sql .= " WHERE active = 1 AND (private = 0 OR private = ".((int) $user->id).") AND entity IN (".getEntity('c_email_senderprofile').")";
$sql .= " ORDER BY position";
$resql = $this->db->query($sql);
if ($resql) {

View File

@@ -424,7 +424,10 @@ class CommandeFournisseur extends CommonOrder
$this->ref = $obj->ref;
$this->ref_supplier = $obj->ref_supplier;
$this->socid = $obj->fk_soc;
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
$this->fourn_id = $obj->fk_soc;
$this->statut = $obj->status; // deprecated
$this->status = $obj->status;

View File

@@ -990,6 +990,8 @@ class FactureFournisseur extends CommonInvoice
$this->socid = $obj->socid;
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
// Retrieve all extrafield
// fetch optionals attributes and labels
$this->fetch_optionals();

View File

@@ -157,7 +157,7 @@ $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month);
$sql = "SELECT cp.rowid, cp.ref, cp.fk_user, cp.date_debut, cp.date_fin, cp.fk_type, cp.description, cp.halfday, cp.statut as status";
$sql .= " FROM ".MAIN_DB_PREFIX."holiday cp";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid";
$sql .= " WHERE cp.rowid > 0";
$sql .= " WHERE cp.entity IN (".getEntity('holiday').") AND cp.rowid > 0";
$sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
$sql .= " AND (";
$sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";

View File

@@ -80,9 +80,9 @@ create table llx_actioncomm
fk_element integer DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
elementtype varchar(255) DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
ip varchar(250), --ip used to create record (for public submission page)
ip varchar(250), -- ip used to create record (for public submission page)
fk_bookcal_calendar integer DEFAULT NULL, --fk_bookcal_calendar used to link booking to bookcal calendar
fk_bookcal_calendar integer DEFAULT NULL, -- fk_bookcal_calendar used to link booking to bookcal calendar
import_key varchar(14),
extraparams varchar(255) -- for other parameters with json format