Skip to content

Commit

Permalink
Merge branch 'develop' into patch-noncounting-stock
Browse files Browse the repository at this point in the history
  • Loading branch information
DaBootO authored Jul 1, 2024
2 parents bf265c5 + 5f27830 commit 36189b1
Show file tree
Hide file tree
Showing 596 changed files with 1,543 additions and 1,396 deletions.
21 changes: 21 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@ English Dolibarr ChangeLog
--------------------------------------------------------------


***** ChangeLog for 21.0.0 compared to 20.0 *****

For users:
----------



For developers:
---------------



WARNING:
--------

The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Prepare your module for deprecation of triggers code XXX_INSERT to support also XXX_CREATE.
* More class properties (with old name in french) are now deprecated in favor of the property name in english.



***** ChangeLog for 20.0.0 compared to 19.0 *****

For users:
Expand Down
16 changes: 15 additions & 1 deletion dev/tools/codespell/codespell-ignore.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# List of words codespell will ignore
# one per line, case-sensitive (when not lowercase)

# PROVid
provid

# PostgreSQL
postgresql

# Name of contributores
noe
udo
tim

# Inside email
ba
blacklist
Expand Down Expand Up @@ -32,28 +39,35 @@ thead
ue
whitelist
ws

# Thirdparty should be Third party or Third-party but ignoring it because it's omnipresent
thirdparty

# Code string
ect
tempdate
sav
files'

# Used as array key
seeked
tweek

# Used as key
marge

# moral (var name)
mor

# Strings used as keys for translation
uptodate
reenable

# Function - rename to devalidate ?
unvalidate

# Some french strings
somme
caracteres
cas
sur
Datas
Expand Down
15 changes: 0 additions & 15 deletions dev/tools/codespell/codespell-lines-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,21 +282,6 @@
* @param string[] $TWeek array of week numbers
* @param string[] $TWeek array of week numbers (week 1 must be '01')
* @param array $TWeek Array of week numbers
* Copyright (C) 2019 Tim Otte <[email protected]>
* Copyright (C) 2019 Tim Otte <[email protected]>
* Copyright (C) 2019 Tim Otte <[email protected]>
* Copyright (C) 2020 Thibault FOUCART <[email protected]>
* Copyright (C) 2020-2021 Udo Tamm <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2022 Udo Tamm <[email protected]>
* Copyright (C) 2022 Udo Tamm <[email protected]>
* Copyright (C) 2022-2023 Udo Tamm <[email protected]>
* Copyright (C) 2023 Udo Tamm <[email protected]>
* Copyright (C) 2024 Noé Cendrier <[email protected]>
* add german links 2020 Udo Tamm <[email protected]>
$TFirstDays = getFirstDayOfEachWeek($TWeek, $year);
$TFirstDays[reset($TWeek)] = '01'; //first day of month
$TLastDays = getLastDayOfEachWeek($TWeek, $year);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

$accounting = new AccountingAccount($db);

// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('accountancyadminaccount'));


Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/accountmodel.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
}


// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('admin'));

// This page is a generic page to edit dictionaries
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/categories_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

$search_country_id = GETPOST('search_country_id', 'int');

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('admin'));

// This page is a generic page to edit dictionaries
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/fiscalyear.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
'1' => 'CloseFiscalYear'
);

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$object = new Fiscalyear($db);
$hookmanager->initHooks(array('fiscalyearlist'));

Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/admin/fiscalyear_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@

$error = 0;

// Initialize technical objects
// Initialize a technical objects
$object = new Fiscalyear($db);
$extrafields = new ExtraFields($db);

// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.

// List of status
static $tmpstatus2label = array(
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/journals_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

$search_country_id = GETPOST('search_country_id', 'int');

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('admin'));

// This page is a generic page to edit dictionaries
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$sortfield = "t.numero_compte";
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$object = new BookKeeping($db);
$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array

Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
$sortfield = "t.piece_num,t.rowid";
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$object = new BookKeeping($db);
$hookmanager->initHooks(array('bookkeepingexport'));

Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/bookkeeping/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
$sortfield = "t.piece_num,t.rowid";
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$object = new BookKeeping($db);
$hookmanager->initHooks(array('bookkeepinglist'));

Expand Down Expand Up @@ -996,7 +996,7 @@
print $form->selectDate($search_date_modification_start, 'search_date_modification_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
print '</div>';
print '<div class="nowrapfordate">';
print $form->selectDate($search_date_modification_end, 'search_date_modification_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
print $form->selectDate($search_date_modification_end, 'search_date_modification_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
print '</div>';
print '</td>';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/listbyaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
$sortfield = "t.doc_date,t.rowid";
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$object = new BookKeeping($db);
$formfile = new FormFile($db);
$hookmanager->initHooks(array($context_default));
Expand Down
20 changes: 0 additions & 20 deletions htdocs/accountancy/class/bookkeeping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ class BookKeeping extends CommonObject
*/
public $linesexport = array();

/**
* @var integer|string date of movement validated & lock
*/
public $date_validation;

/**
* @var integer|string date of movement who are noticed like exported
*/
Expand Down Expand Up @@ -3164,26 +3159,11 @@ class BookKeepingLine extends CommonObjectLine
*/
public $piece_num;

/**
* @var integer|string date_creation
*/
public $date_creation;

/**
* @var integer|string $date_modification;
*/
public $date_modification;

/**
* @var integer|string $date_export;
*/
public $date_export;

/**
* @var integer|string $date_validation;
*/
public $date_validation;

/**
* @var integer|string $date_lim_reglement;
*/
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/closure/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
accessforbidden();
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('accountancyclosure'));

$object = new BookKeeping($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/customer/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('accountancycustomerlist'));

$formaccounting = new FormAccounting($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/expensereport/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
}
}

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('accountancyexpensereportlist'));

$formaccounting = new FormAccounting($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Load translation files required by the page
$langs->loadLangs(array("compta", "bills", "other", "accountancy", "loans", "banks", "admin", "dict"));

// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
$hookmanager->initHooks(array('accountancyindex'));

// Security check
Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/journal/expensereportsjournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

$accountingaccount = new AccountingAccount($db);

// Get information of journal
// Get information of a journal
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);
$journal = $accountingjournalstatic->code;
Expand Down Expand Up @@ -178,7 +178,7 @@
$compta_localtax1 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax2 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);

// Define array to display all VAT rates that use this accounting account $compta_tva
// Define an array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || !empty($obj->vat_src_code)) {
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '')] = (vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
}
Expand Down
12 changes: 6 additions & 6 deletions htdocs/accountancy/journal/purchasesjournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

$accountingaccount = new AccountingAccount($db);

// Get information of journal
// Get information of a journal
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);
$journal = $accountingjournalstatic->code;
Expand Down Expand Up @@ -230,7 +230,7 @@
$compta_localtax2 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_counterpart_tva_npr = getDolGlobalString('ACCOUNTING_COUNTERPART_VAT_NPR', 'NotDefined');

// Define array to display all VAT rates that use this accounting account $compta_tva
// Define an array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || !empty($obj->vat_src_code)) {
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '')] = (vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
}
Expand Down Expand Up @@ -408,7 +408,7 @@
$totalcredit = 0;
$totaldebit = 0;

$db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error
$db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error

$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
Expand All @@ -425,7 +425,7 @@

$date = dol_print_date($val["date"], 'day');

// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
// Is it a replaced invoice? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED) {
$replacedinvoice = 1;
Expand Down Expand Up @@ -796,7 +796,7 @@

$date = dol_print_date($val["date"], 'day');

// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
// Is it a replaced invoice? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED) {
$replacedinvoice = 1;
Expand Down Expand Up @@ -1049,7 +1049,7 @@ function writebookkeeping() {

$date = dol_print_date($val["date"], 'day');

// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
// Is it a replaced invoice? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED) {
$replacedinvoice = 1;
Expand Down
Loading

0 comments on commit 36189b1

Please sign in to comment.