Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Feb 3, 2024
2 parents 55281d3 + 45718a2 commit 0dad676
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 99 deletions.
125 changes: 63 additions & 62 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ For users:
----------
NEW: Compatibility with PHP 8.2
NEW: Module Workstation (used to enhance the module BOM and Manufacturing Order) is now stable
NEW: Add a CLI tool to regenerate all documents
NEW: Add a confirmation popup when deleting extrafields
NEW: Add type 'icon' type for extrafields
NEW: Close #20930 Use ajax for state loading after country change
NEW: #20930 Use ajax for state loading after country change
NEW: #23331 Add support for parent projects (#24856)
NEW: #22531 Expense report - Add two fields into export : Qty & Unit price (excl.) (#26309)
NEW: #22626 date filter thirdparties contracts projects (#22707)
Expand All @@ -42,54 +43,51 @@ 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: Chart of accounts ES PCG08-PYME-CAT in catalan language
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
NEW: Add a goto url from smartphone search page
NEW: Add all id prof checker on thirdparty for code compta customer and supplier
NEW: Add a protection on purgeFiles
NEW: Add chart of accounts PCG08-PYME-CAT for ES in catalan language
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 Text on footer total (#26334)
NEW: Add different picto for each type of extrafields (date, string, ...)
NEW: Added of a popup on validation instead of a database fielld to know if the user wants to include subwarehouse
NEW: Added of the field "include_sub_warehouse" in the table "llx_inventory"
NEW: Added VAT free & VAT amounts on payment input
NEW: Add ext payment system ID in the payment page with link to Stripe
NEW: Add field TechnicalID in list of users
NEW: Add filter on status of line of a dictionary
NEW: Add get_substitutionarray_other() on shipping odt (#25080)
NEW: add IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
NEW: Add index on prelevement_demande
NEW: Add invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
NEW: Add label to price level when changing price (#26240)
NEW: Add modifications of template invoices into agenda
NEW: Add more company information (ProfId7 to 10) (#25266)
NEW: Add more information to holiday mailings (#25461)
NEW: Add more param on fetch() to prepare perf optimization
NEW: Add more tables activated by module activation only
NEW: Add new field into $fields array + Creation of the function getChildWarehouse()
NEW: Add option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
NEW: Add option in PDF for purchase order and quotation to hide prices
NEW: Add option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
NEW: add order supplier submit notif
NEW: add parent product column on list
NEW: Add picto in product/service list in object lines (#25511)
NEW: Add possibility to choose separator #21426
NEW: Add preselected update keys attribute to import class and select it by default if filled
NEW: Add recurring behaviour
NEW: add recursive deletion option for child m os (#26102)
NEW: Add refactoring user permission (#26162)
NEW: add sorting of product price list by customer (#26483)
NEW: Add tab Events/Agenda on recurring invoices
NEW: Add the formEditObjectLine hook on commande card and invoice card
NEW: Add the picto phone of thirdparty on the kanban view of projects
NEW: Add the status of partnership to select partnership for emailing
NEW: add Ticket tab on contract
NEW: added a button to create a product or a service from an order or an invoice (#26173)
NEW: added a button to re-encrypt data of a dolcrypt extrafield password
NEW: added a goto url from smartphone search page
NEW: added all id prof checker on thirdparty for code compta customer and supplier
NEW: added protection on purgeFiles
NEW: added a constant to check if qty shipped not greater than qty ordered
NEW: added context for the movement stock (role toconsume/toproduce) on mrp
NEW: added contract link on ticket
NEW: added column 'Technical ID' in list of details lines of an order (#26164)
NEW: added custom compute for exports
NEW: added custom text on footer total (#26334)
NEW: added different picto for each type of extrafields (date, string, ...)
NEW: added a popup on validation instead of a database field to know if the user wants to include subwarehouse
NEW: added the field "include_sub_warehouse" in the table "llx_inventory"
NEW: added VAT free & VAT amounts on payment input
NEW: added ext payment system ID in the payment page with link to Stripe
NEW: added field Technical ID in list of users
NEW: added filter on status of line of a dictionary
NEW: added get_substitutionarray_other() on shipping odt (#25080)
NEW: added IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
NEW: added index on prelevement_demande
NEW: added invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
NEW: added a label to price level when changing price (#26240)
NEW: added modifications of template invoices into agenda
NEW: added more company information (ProfId7 to 10) (#25266)
NEW: added more information to holiday mailings (#25461)
NEW: added more param on fetch() to prepare perf optimization
NEW: added more tables activated by module activation only
NEW: added new field into $fields array + Creation of the function getChildWarehouse()
NEW: added option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
NEW: added option in PDF for purchase order and quotation to hide prices
NEW: added order supplier submit notif
NEW: added parent product column on list
NEW: added picto in product/service list in object lines (#25511)
NEW: added possibility to choose separator #21426
NEW: added preselected update keys attribute to import class and select it by default if filled
NEW: added recurring behaviour
NEW: added recursive deletion option for child MOs (#26102)
NEW: added refactoring user permission (#26162)
NEW: added sorting of product price list by customer (#26483)
NEW: added tab Events/Agenda on recurring invoices
NEW: added the formEditObjectLine hook on commande card and invoice card
NEW: added the picto phone of thirdparty on the kanban view of projects
NEW: added the status of partnership to select partnership for emailing
NEW: added Ticket tab on contract
NEW: Agenda: agenda per user use quarter hour split instead of half hour split
NEW: Allow generation of delivery note through REST-API (#26226)
NEW: Allow sync of currency rates with currency layer by default.
Expand All @@ -108,6 +106,7 @@ NEW: clone skill object (#26526)
NEW: column in table prelevement_lignes for fk_user (#26196)
NEW: CONF allow modify ticket classification even if closed
NEW: conf to display date entry stock exped and sort in date order (#22625)
NEW: Contract: Merge the "Create ..." buttons on contract into one.
NEW: create a product from a free line in a document (#22324)
NEW: customize position in complete_head_from_modules (#26406)
NEW: Date d'entree en stock sur les exped au moment de la création -> Stock date on exped at time of creation
Expand All @@ -118,19 +117,20 @@ NEW: Donations: Generic doc template for donations (#26338)
NEW: drop down for action button show a simple button if only 1 action
NEW: Enhance github_commits_perversion to get more stats on git commits
NEW: Enhance IPN to support payment_intent.succeeded for both card/ban
NEW: Exports: add product barcode on stock exports
NEW: Exports: added product barcode on stock exports
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: Can generate SEPA files for salaries (#26541)
NEW: FontAwesome - added possibility to select another version
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: HR: PDF Generation for each Human Resource Evaluations
NEW: improved resource data structure
NEW: Intervention: close notification for interventions
NEW: Interventions: close notification for interventions
NEW: Inventory: include sub warehouse in inventory
NEW: Inventory: inventory without virtual products (kits)
NEW: Invoices: subtypes for customers and vendors (#26233)
NEW: Invoices: start and end date for due date filter on invoice list
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)
Expand All @@ -140,7 +140,6 @@ NEW: Manage rate indirect. (#26449)
NEW: Manufacturing Order: add edit line on MO (#26122)
NEW: memorize model name for PDF hooks
NEW: Menu editor is responsive
NEW: Merge the "Create ..." buttons on contract into one.
NEW: ModuleBuilder: Can modify the picto into ModuleBuilder
NEW: ModuleBuilder: Form for add object's property on ModuleBuilder
NEW: More accurate tooltip on what admin permissions are
Expand All @@ -151,7 +150,7 @@ NEW: no need to create invoice supplier object on supplier card for standalone c
NEW: Open-Surveys: Add a public page to list all open surveys
NEW: Option to show label, ref+label or only ref of product in TakePOS
NEW: payment full amount detail tooltip
NEW: Payment: Can edit both the Test and Live stripe customer account on payment
NEW: Payments: Can edit both the Test and Live stripe customer account on payment
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
NEW: Projects: List - use select2 multiselect for status
NEW: Projects: massactions to delete projects
Expand All @@ -162,18 +161,19 @@ NEW: Retrieve VAT details from the Greek Ministry of Finance GSIS SOAP web servi
NEW: Right for stats orders (#24607)
NEW: rights and check access to create portal accounts
NEW: Row in list higher height (#26177)
NEW: Salaries: Can generate SEPA files for salaries (#26541)
NEW: Save date of RUM creation when creating a Stripe SEPA mandate
NEW: Shipment: can include service (for information and invoicing) (#26407)
NEW: Shipments: 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: 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: TakePOS: use default customer, category and product when enable TakePOS (#25031)
NEW: TakePOS: added option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
NEW: Tickets: add and list external contributors on ticket public interface
NEW: Third-Parties: add total line to third-parties list (#26148)
NEW: Tooltips are using ajax by default
Expand All @@ -187,12 +187,7 @@ NEW: use account address in sepa mandate (#23642)
NEW: VAT rate - Add entity
NEW: Website: Support of js into the Dolibarr server preview
NEW: When an user unset the batch management of products, transformation of each batch stock movement in global stock movement
NEW: PDF Generation for each Human Resource Evaluations.

SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
SEC: Add action confirm_... as sensitive to need a CSRF token
SEC: Disable not used PHP streams
SEC: Add option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY


For developers or integrators:
Expand All @@ -201,6 +196,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

SECURITY
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
SEC: added action confirm_... as sensitive to need a CSRF token
SEC: Disable not used PHP streams
SEC: added option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY

PERFORMANCE
PERF: Removed a useless fetch_thirdparty
PERF: Perf avoid 2 useless fetch into the triggers of agenda.
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/class/subscription.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Subscription extends CommonObject
public $table_element = 'subscription';

/**
* @var int Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by fk_soc, 'field@table'=Test with link by field@table
* @var string Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by fk_soc, 'field@table'=Test with link by field@table
*/
public $ismultientitymanaged = 'fk_adherent@adherent';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/api/class/api_access.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class DolibarrApiAccess implements iAuthenticate
/**
* @var User $user Loggued user
*/
public static $user = '';
public static $user = null;


/**
Expand Down
8 changes: 4 additions & 4 deletions htdocs/bom/class/bom.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ public function calculateCosts()
$this->error = $tmpproduct->error;
return -1;
}
$line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : (float) $tmpproduct->pmp);
$line->unit_cost = (float) price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : (float) $tmpproduct->pmp);
if (empty($line->unit_cost)) {
if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) {
if ($productFournisseur->fourn_remise_percent != "0") {
Expand Down Expand Up @@ -1826,17 +1826,17 @@ class BOMLine extends CommonObjectLine
// END MODULEBUILDER PROPERTIES

/**
* @var int Calculated cost for the BOM line
* @var float Calculated cost for the BOM line
*/
public $total_cost = 0;

/**
* @var int Line unit cost based on product cost price or pmp
* @var float Line unit cost based on product cost price or pmp
*/
public $unit_cost = 0;

/**
* @var Bom array of Bom in line
* @var array array of Bom in line
*/
public $childBom = array();

Expand Down
2 changes: 1 addition & 1 deletion htdocs/bom/tpl/objectline_view.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
$workstation = new Workstation($this->db);
$res = $workstation->fetch($sub_bom_product->fk_default_workstation);
if ($res > 0) {
$sub_bom_line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
$sub_bom_line->total_cost = (float) price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
}

print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom_line->total_cost, 'MT')).'</span></td>';
Expand Down
6 changes: 3 additions & 3 deletions htdocs/bookmarks/class/bookmark.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class Bookmark extends CommonObject
public $ismultientitymanaged = 1;

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'bookmark';

/**
* @var string Last error number. For example: 'DB_ERROR_RECORD_ALREADY_EXISTS', '12345', ...
* @var string Last error number. For example: 'DB_ERROR_RECORD_ALREADY_EXISTS', '12345', ...
*/
public $errno;

Expand All @@ -60,7 +60,7 @@ class Bookmark extends CommonObject
public $id;

/**
* @var int User ID. If > 0, bookmark of one user. If == 0, bookmark public (for everybody)
* @var int User ID. If > 0, bookmark of one user. If == 0, bookmark public (for everybody)
*/
public $fk_user;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/action/class/actioncommreminder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ActionCommReminder extends CommonObject
public $table_element = 'actioncomm_reminder';

/**
* @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
* @var int Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
*/
public $ismultientitymanaged = 0;

Expand Down
7 changes: 3 additions & 4 deletions htdocs/compta/paiement/class/cpaiement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function create(User $user, $notrigger = 0)
$this->type = trim($this->type);
}
if (isset($this->active)) {
$this->active = trim($this->active);
$this->active = (int) $this->active;
}
if (isset($this->accountancy_code)) {
$this->accountancy_code = trim($this->accountancy_code);
Expand Down Expand Up @@ -250,7 +250,7 @@ public function update(User $user, $notrigger = 0)
$this->type = trim($this->type);
}
if (isset($this->active)) {
$this->active = trim($this->active);
$this->active = (int) $this->active;
}
if (isset($this->accountancy_code)) {
$this->accountancy_code = trim($this->accountancy_code);
Expand Down Expand Up @@ -365,12 +365,11 @@ public function delete(User $user, $notrigger = 0)
public function initAsSpecimen()
{
$this->id = 0;

$this->code = '';
$this->libelle = '';
$this->label = '';
$this->type = '';
$this->active = '';
$this->active = 0;
$this->accountancy_code = '';
$this->module = '';
}
Expand Down
9 changes: 3 additions & 6 deletions htdocs/core/class/cunits.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function create($user, $notrigger = 0)
$this->libelle = trim($this->short_label);
}
if (isset($this->unit_type)) {
$this->active = trim($this->unit_type);
$this->active = (int) $this->unit_type;
}
if (isset($this->active)) {
$this->active = (int) $this->active;
Expand Down Expand Up @@ -406,12 +406,9 @@ public function delete($user, $notrigger = 0)
*/
public function getUnitFromCode($code, $mode = 'code', $unit_type = '')
{
if ($mode == 'short_label') {
return dol_getIdFromCode($this->db, $code, 'c_units', 'short_label', 'rowid', 0, " AND unit_type = '".$this->db->escape($unit_type)."'");
} elseif ($mode == 'code') {
return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid', 0, " AND unit_type = '". $this->db->escape($unit_type) ."'");
if ($mode == 'short_label' || $mode == 'code') {
return dol_getIdFromCode($this->db, $code, 'c_units', $mode, 'rowid', 0, " AND unit_type = '".$this->db->escape($unit_type)."'");
}

return $code;
}

Expand Down
Loading

0 comments on commit 0dad676

Please sign in to comment.