Skip to content

Commit

Permalink
Merge branch 'develop' into dev_phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Jan 23, 2024
2 parents f00f99a + 6fdb36d commit c5796f5
Show file tree
Hide file tree
Showing 36 changed files with 378 additions and 347 deletions.
79 changes: 44 additions & 35 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ NEW: #22626 date filter thirdparties contracts projects (#22707)
NEW: #24085 Add the Project filter
NEW: #25312 Support extrafields in selectForForms
NEW: #26312 Manage intermediate BIC - SQL Part (#26325)
NEW: Accountancy - Add quick navigation with keyboard shortcut on ledger (#26221)
NEW: Accountancy - FEC/FEC2 format export with attachments (#26192)
NEW: Accountancy - Option to choose length of lettering code
NEW: Accountancy: Add quick navigation with keyboard shortcut on ledger (#26221)
NEW: Accountancy: FEC/FEC2 format export with attachments (#26192)
NEW: Accountancy: Option to choose length of lettering code
NEW: Add a button to create a product or a service from an order or an invoice (#26173)
NEW: Add a button to re-encrypt data of a dolcrypt extrafield password
NEW: Add a CLI tool to regenerate all documents
Expand All @@ -55,7 +55,7 @@ NEW: add constant to check if qty shipped not greater than qty ordered
NEW: Add context for the movement stock (role toconsume/toproduce) on mrp
NEW: Add contract link on ticket
NEW: Add culum Technical ID in list of details lines of an order (#26164)
NEW: ADD: custom compute for exports
NEW: Add custom compute for exports
NEW: Add custom Text on footer total (#26334)
NEW: Add different picto for each type of extrafields (date, string, ...)
NEW: Add edit line on MO (#26122)
Expand Down Expand Up @@ -107,12 +107,12 @@ NEW: can edit bomline workstation
NEW: Can edit both the Test and Live stripe customer account on payment
NEW: Can include product variants in list of products
NEW: Can manage ODT documents for groups of users.
NEW: Can modify the picto into modulebuilder
NEW: Can modify the picto into ModuleBuilder
NEW: Can restore product in stock when deleting the supplier invoice
NEW: Can see the favicon file into setup of properties of a website
NEW: Can switch product batch management to no management. (#21691)
NEW: Can upload/delete ODT template for project and tasks
NEW: chart of accounts ES PCG08-PYME-CAT in catalan language
NEW: Chart of accounts ES PCG08-PYME-CAT in catalan language
NEW: clone skill object (#26526)
NEW: close notification for interventions
NEW: column in table prelevement_lignes for fk_user (#26196)
Expand All @@ -132,23 +132,23 @@ NEW: extrafields password accepts 'dolcrypt' algorithm (reversible algo)
NEW: Factorize a lot of code for numbering modules
NEW: filter on from/to period rather than month/year (#26378)
NEW: FontAwesome - Add possibility to select another version
NEW: Form for add object's property on moduleBuilder
NEW: Form for add object's property on ModuleBuilder
NEW: Can generate SEPA files for salaries (#26541)
NEW: massactions to delete projects
NEW: Generic doc template for donations (#26338)
NEW: Get list evaluation with skills details in user fiche (#26510)
NEW: hidden conf to disable use of dns_get_record (which can become unresponsive) (#26339)
NEW: improved resource data structure
NEW: Include sub warehouse in inventory
NEW: inventory without virtual products (kits)
NEW: Inventory without virtual products (kits)
NEW: Invoice subtypes for customers and vendors (#26233)
NEW: Invoice time from task, make task note better display in invoice line
NEW: lazy load to substitute project variables (#26451)
NEW: LDAP Active Directory UserAccountControl (#25507)
NEW: LDAP: Active Directory UserAccountControl (#25507)
NEW: Library including math and financial functions (#25035)
NEW: Loan - Can upload a file with drag and drop
NEW: Loan: can upload a file with drag and drop
NEW: Manage rate indirect. (#26449)
NEW: memorize model name for pdf hooks
NEW: memorize model name for PDF hooks
NEW: Menu editor is responsive
NEW: Merge the "Create ..." buttons on contract into one.
NEW: More accurate tooltip on what admin permissions are
Expand All @@ -159,38 +159,38 @@ NEW: no need to create invoice supplier object on supplier card for standalone c
NEW: Option to show label, ref+label or only ref of product in TakePOS
NEW: payment full amount detail tooltip
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
NEW: Project - List - use select2 multiselect for status
NEW: Projects: List - use select2 multiselect for status
NEW: Propagate invoice extrafields into template invoice (#26529)
NEW: remove include_subwarehouse form llx_inventory database table
NEW: resource improvements - data structure (#26285)
NEW: Retrieve vat details from the Greek Ministry of Finance GSIS SOAP web service and autocomplete third party fields
NEW: Retrieve VAT details from the Greek Ministry of Finance GSIS SOAP web service and autocomplete third party fields
NEW: Right for stats orders (#24607)
NEW: rights and check access to create portal accounts
NEW: Row in list higher height (#26177)
NEW: Save date of RUM creation when creating a Stripe SEPA mandate
NEW: shipment can include service (for information and invoicing) (#26407)
NEW: Shipment: can include service (for information and invoicing) (#26407)
NEW: Show id of module on the tooltip module help page
NEW: show VAT free amount on payment input close #26208 (#26209)
NEW: start and end date for due date filter on invoice list
NEW: Sub total in list (#26165)
NEW: Support html content for combo list of email recipient
NEW: Website: Support of js into the Dolibarr server preview
NEW: TakePOS - add constant to check qty asked is available (#24820)
NEW: TakePOS - add constant to choose contact instead of customer (#24807)
NEW: TakePOS - amount label with or without tax in free product (#24829)
NEW: TakePOS compatibility with lots and serials
NEW: TakePOS compatibility with lots and serials (#26426)
NEW: TakePOS: add constant to check qty asked is available (#24820)
NEW: TakePOS: add constant to choose contact instead of customer (#24807)
NEW: TakePOS: amount label with or without tax in free product (#24829)
NEW: TakePOS: compatibility with lots and serials (#26426)
NEW: Tooltips are using ajax by default
NEW: Top menu support picto of modules that are font awesome picto.
NEW: updating by adding massactions for delete projects in societe tab
NEW: updating by adding tooltip for api section in Modulebuilder
NEW: updating by adjust request Sql for Salary invoice (#26279)
NEW: updating by adjust request SQL for Salary invoice (#26279)
NEW: updating for display Help title when try to delete Don (issue #25314)
NEW: Upgrade in module builder in menu section
NEW: use account address in sepa mandate (#23642)
NEW: VAT rate - Add entity
NEW: webportal site account
NEW: When an user unset the batch management of products, transformation of each batch stock movement in global stock movement

FIX: #25828 wrong odt style naming

SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
Expand All @@ -205,10 +205,12 @@ For developers or integrators:
QUAL Reduce very seriously the technical debt (using PHPStan, Psalm and Rector)
NEW Tool in dev/tools/rector to autofix code using style coding practice rules

PERFORMANCE
PERF: Removed a useless fetch_thirdparty
PERF: Perf avoid 2 useless fetch into the triggers of agenda.
PERF: performance & code quality enhancements template sections

QUALITY
QUAL: Remove hardcoded code for OVH sms. Generic method is ok now.
QUAL: Code fix using rector
QUAL: Force subclass MINVERSION (#26314)
Expand All @@ -222,25 +224,26 @@ QUAL: Use dol_clone with parameter 2 for ->oldcopy
QUAL: use switch case instead of if elseif statements for actions
QUAL: Better respect of REST API RFC.

Hooks:
NEW: [Add hook in user bank page]
NEW: #19501 Add two hooks in dolreceiptprinter.php (#26439)
NEW: Accountancy - Add hooks on PrintFieldList for expensereportsjournal, purchasesjournal, sellsjournal
NEW: add a $notrigger param to Product::updatePrice() method (#26404)
NEW: Add a rule to fix empty($conf->global->...) into !getDolGlobal...
NEW: Add column extraparams on societe_rib
NEW: Add hook on selectLotDataList() function (#25368)
NEW: add hook on selectLotDataList() function (#25368)
NEW: add Hooks and prepare extrafields management for product invoices consumptions (#26280)
NEW: Add hooks on import, step 5 - 6 (#24915)
NEW: add hooks on import, step 5 - 6 (#24915)
NEW: add hook tabContentCreateSupplierOrder (#26418)
NEW: add hook tabContentViewSupplierInvoice (#26431)
NEW: add new hook AfterImportInsert
NEW: add new hook OrderCard (#26380)
NEW: add new hook tabContentCreateOrder (#26408)
NEW: Add phpunit for REST API of contacts
NEW: Add triggers COMPANY_RIB_XXX already present in companybankaccount.class.php
NEW: Add triggers on import success
NEW: Add trigger when deleting a bank account line
NEW: subproduct triggers in product class (#25142)

Triggers:
NEW: Trigger: add trigger COMPANY_RIB_XXX already present in companybankaccount.class.php
NEW: Trigger: add trigger on import success
NEW: Trigger: add trigger when deleting a bank account line
NEW: Trigger: subproduct triggers in product class (#25142)

ModuleBuilder:
NEW: ModuleBuilder: add section changeLog to Doc in MB
NEW: ModuleBuilder: Add api url to documentation in ModuleBuilder
NEW: ModuleBuilder: Checkin comments begin and end before each actions
Expand All @@ -249,7 +252,13 @@ NEW: ModuleBuilder: remove dictionary in ModuleBuilder
NEW: ModuleBuilder: add page for create dictionary
NEW: ModuleBuilder: add badge for each tabs
NEW: ModuleBuilder: for edit name of dictionary and delete it in MB
NEW: add barcode function to check if EAN13 is valid (

NEW: add a $notrigger param to Product::updatePrice() method (#26404)
NEW: add a rule to fix empty($conf->global->...) into !getDolGlobal...
NEW: add column extraparams on societe_rib
NEW: add phpunit for REST API of contacts
NEW: add barcode function to check if EAN13 is valid


WARNING:
--------
Expand Down Expand Up @@ -7093,7 +7102,7 @@ FIX: incoterms do not output into crabe invoice PDF
FIX: in PgSQL no quote "word style" is permitted around column name
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thridparty list
FIX: missing column into SQL on thirdparty list
FIX: only show projects of related third if external user
FIX: PgSQL Module Resource list crash #5637
FIX: php Strict
Expand Down Expand Up @@ -7147,7 +7156,7 @@ FIX: incoterms do not output into crabe invoice PDF
FIX: in PgSQL no quote "word style" is permitted around column name
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thridparty list
FIX: missing column into SQL on thirdparty list
FIX: only show projects of related third if external user
FIX: PgSQL Module Resource list crash #5637
FIX: php Strict
Expand Down Expand Up @@ -7783,7 +7792,7 @@ FIX: avoid SQL error when no sortfield send to method
FIX: bad link into project box
FIX: Bad title line in project view when using jmobile
FIX: Bad translation key for project "Overview"
FIX: Can create Proposal on close thridparty #3526
FIX: Can create Proposal on close thirdparty #3526
FIX: Can't change state on a contact
FIX: Can't change the admin with default setup
FIX: Can't delete thirdparty if there is some discounts
Expand Down Expand Up @@ -8119,7 +8128,7 @@ FIX: [ bug #3383 ] Company name is overlapped with company direction in PDF mode
FIX: [ bug #3426 ] Unable to create an invoice from a contract with extrafields
FIX: [ bug #3431 ] Invoice bank account is not respected
FIX: [ bug #3432 ] Spaces should be removed from IBAN when formatting it
FIX: Can create Proposal on close thridparty #3526
FIX: Can create Proposal on close thirdparty #3526
FIX: change order date on clone (as everywhere else)
FIX: Close #2835 Customer prices of a product shows incorrect history order
FIX: Close #2837 Product list table column header does not match column body
Expand Down
4 changes: 3 additions & 1 deletion dev/tools/codespell/codespell-dict.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Please add in alphabetical order->(`sort -u` like).
EPR->ERP
alpahnohtml->alphanohtml
alpah->alpha
aplha->alpha
choosed->chosen
dolibar->dolibarr
dollibar->dolibarr
dollibarr->dolibarr
mot de passe->password
not de passe->password
tableau de bord->state board
thridparty->thirdparty
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@

// TODO Merge update for each line into one global using rowid IN (list of movement ids)
foreach ($object->lines as $movement) {
// Upate the line to set date_export and/or date_validated (if not already set !)
// Update the line to set date_export and/or date_validated (if not already set !)
$now = dol_now();

$setfields = '';
Expand Down
46 changes: 11 additions & 35 deletions htdocs/accountancy/class/bookkeeping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BookKeeping extends CommonObject
public $id;

/**
* @var string Date of source document, in db date NOT NULL
* @var int Date of source document, in db date NOT NULL
*/
public $doc_date;

Expand Down Expand Up @@ -618,18 +618,6 @@ public function createStd(User $user, $notrigger = 0, $mode = '')
if (isset($this->label_operation)) {
$this->label_operation = trim($this->label_operation);
}
if (isset($this->debit)) {
$this->debit = (float) $this->debit;
}
if (isset($this->credit)) {
$this->credit = (float) $this->credit;
}
if (isset($this->montant)) {
$this->montant = (float) $this->montant;
}
if (isset($this->amount)) {
$this->amount = (float) $this->amount;
}
if (isset($this->sens)) {
$this->sens = trim($this->sens);
}
Expand Down Expand Up @@ -1352,18 +1340,6 @@ public function update(User $user, $notrigger = 0, $mode = '')
if (isset($this->label_operation)) {
$this->label_operation = trim($this->label_operation);
}
if (isset($this->debit)) {
$this->debit = (float) $this->debit;
}
if (isset($this->credit)) {
$this->credit = (float) $this->credit;
}
if (isset($this->montant)) {
$this->montant = (float) $this->montant;
}
if (isset($this->amount)) {
$this->amount = (float) $this->amount;
}
if (isset($this->sens)) {
$this->sens = trim($this->sens);
}
Expand Down Expand Up @@ -1392,8 +1368,8 @@ public function update(User $user, $notrigger = 0, $mode = '')
return -1;
}

$this->debit = price2num($this->debit, 'MT');
$this->credit = price2num($this->credit, 'MT');
$this->debit = (float) price2num($this->debit, 'MT');
$this->credit = (float) price2num($this->credit, 'MT');
$this->montant = price2num($this->montant, 'MT');

// Check parameters
Expand Down Expand Up @@ -1793,7 +1769,7 @@ public function fetchPerMvt($piecenum, $mode = '')
{
global $conf;

$sql = "SELECT piece_num, doc_date,code_journal, journal_label, doc_ref, doc_type,";
$sql = "SELECT piece_num, doc_date, code_journal, journal_label, doc_ref, doc_type,";
$sql .= " date_creation, tms as date_modification, date_validated as date_validation";
// In llx_accounting_bookkeeping_tmp, field date_export doesn't exist
if ($mode != "_tmp") {
Expand Down Expand Up @@ -1858,7 +1834,7 @@ public function getNextNumMvt($mode = '')
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::getNextNumMvt ".$this->error, LOG_ERR);
return -1;
return "-1";
}
}

Expand Down Expand Up @@ -2160,7 +2136,7 @@ public function select_account($selectid, $htmlname = 'account', $showempty = 0,
if (!$resql) {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::select_account ".$this->error, LOG_ERR);
return -1;
return "-1";
}

$out = ajax_combobox($htmlname, $event);
Expand Down Expand Up @@ -2272,7 +2248,7 @@ public function get_compte_desc($account = null)
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(__METHOD__." ".$this->error, LOG_ERR);
return -1;
return "-1";
}
}

Expand Down Expand Up @@ -2789,7 +2765,7 @@ public function closeFiscalPeriod($fiscal_period_id, $new_fiscal_period_id, $sep

$bookkeeping = new BookKeeping($this->db);
$bookkeeping->doc_date = $new_fiscal_period->date_start;
$bookkeeping->date_lim_reglement = '';
$bookkeeping->date_lim_reglement = (string) '';
$bookkeeping->doc_ref = $new_fiscal_period->label;
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'closure';
Expand Down Expand Up @@ -2836,7 +2812,7 @@ public function closeFiscalPeriod($fiscal_period_id, $new_fiscal_period_id, $sep

$bookkeeping = new BookKeeping($this->db);
$bookkeeping->doc_date = $new_fiscal_period->date_start;
$bookkeeping->date_lim_reglement = '';
$bookkeeping->date_lim_reglement = (string) '';
$bookkeeping->doc_ref = $new_fiscal_period->label;
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'closure';
Expand Down Expand Up @@ -3042,7 +3018,7 @@ class BookKeepingLine extends CommonObjectLine
*/
public $id;

public $doc_date = '';
public $doc_date = null;
public $doc_type;
public $doc_ref;

Expand Down Expand Up @@ -3082,7 +3058,7 @@ class BookKeepingLine extends CommonObjectLine
public $multicurrency_amount;

/**
* @var float Multicurrency code
* @var string Multicurrency code
*/
public $multicurrency_code;

Expand Down
Loading

0 comments on commit c5796f5

Please sign in to comment.