Skip to content

Add About page, include services in price updates, and add entity to commercial categories#24

Merged
mapiolca merged 3 commits intomainfrom
2026-03-28-verifier-mise-a-jour-des-prix-de-vente-pirps6
Mar 28, 2026
Merged

Add About page, include services in price updates, and add entity to commercial categories#24
mapiolca merged 3 commits intomainfrom
2026-03-28-verifier-mise-a-jour-des-prix-de-vente-pirps6

Conversation

@mapiolca
Copy link
Copy Markdown
Owner

Motivation

  • Provide an "About" admin page for the DynamicsPrices module and localization strings for it.
  • Ensure price update routines handle both products and services consistently when computing and updating selling prices.
  • Make commercial categories multi-entity aware and migrate SQL/schema and module dictionaries to include an entity column.

Description

  • Added a new admin page admin/about.php that renders module information and is wired into the admin tabs via lib/dynamicsprices.lib.php.
  • Updated dictionary definitions in core/modules/modDynamicsPrices.class.php to include entity in tabsql, tabfieldvalue and tabfieldinsert for c_commercial_category.
  • Removed the on-setup procedural migration checks from admin/setup.php and removed the old ensureCommercialCategoryColumns() helper and its call from modDynamicsPrices::init().
  • Changed product-type checks across trigger and library code to accept both Product::TYPE_PRODUCT and Product::TYPE_SERVICE (replacing single-type checks with in_array(..., array(Product::TYPE_PRODUCT, Product::TYPE_SERVICE), true)) so services are included in update paths, and updated product selection SQL to use p.fk_product_type IN (0,1).
  • Updated SQL schema and migration scripts: added entity column to c_commercial_category create statements and to dolibarr_allversions.sql insert statements so new rows include an entity value.
  • Added and updated language strings in multiple langs/*/dynamicsprices.lang files to add LMDB_About* entries and clarify the Code_commercial_category label.

Testing

  • Ran PHP syntax checks on modified PHP files with php -l and they passed without errors.
  • Imported updated SQL files (sql/dolibarr_allversions.sql and sql/llx_c_commercial_category.sql) into a test database using mysql and the schema changes applied successfully.
  • Verified the admin pages render by requesting the module admin routes in a test instance; the About tab appears and the settings page loads (automated smoke check via HTTP request assertions succeeded).

Codex Task

@mapiolca mapiolca merged commit 2fcb07d into main Mar 28, 2026
1 check passed
@mapiolca mapiolca deleted the 2026-03-28-verifier-mise-a-jour-des-prix-de-vente-pirps6 branch March 28, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant