Commit Graph

924 Commits

Author SHA1 Message Date
ldestailleur
4bc5892544 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-24 17:00:53 +02:00
Dylan Bourdere
59ec1a2811 fix ui on multi line subtotal & fix text contrast (#35449)
* fix ui on multi line subtotal & fix text contrast

* extract subtotal pdf logic

* phpcs

* lint

* lint

* refactor

* phpcs

* phpcs

* phpcs

* Update pdf.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-23 23:24:37 +02:00
MDW
b3228aa7ce Qual: Fix phan notices (#35406)
* fix CI

* fix

* Qual: Fix newly appeard phan notices

# Qual: Fix newly appeard phan notices

Fix notices that appearce sin a previous phan report - some of these
notices are masked by the current baseline.

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Frédéric FRANCE <frederic.france@free.fr>
2025-09-20 15:59:05 +02:00
ldestailleur
4a363478ae Clean code with rector 2025-09-18 16:26:38 +02:00
ldestailleur
4e83087e28 Fix complete #35368 2025-09-17 15:04:01 +02:00
Frédéric FRANCE
0e1478206a clean code (#35229)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 01:48:52 +02:00
ldestailleur
62f761ac71 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 12:07:15 +02:00
ldestailleur
6727d0c361 FIX we saw links to object on private not just after a save. 2025-09-02 03:51:08 +02:00
ldestailleur
aca71e1573 Standardize code 2025-08-10 03:22:19 +02:00
sonikf
30b4796385 NEW: PDF Show customer balance on invoice date (#34800)
* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix PhanPluginDuplicateExpressionAssignmentOperation

* fix PhanPluginDuplicateExpressionAssignmentOperation

* fix PhanPluginDuplicateExpressionAssignmentOperation

* fix Travis CI

* fix Travis CI

* fix Travis CI

* fix Travis CI

* fix Travis CI

* fix Travis CI

* remove global $db

* remove global $db

* remove global $db

* fix $multicurrency_tx (array<float>|float) in isset() is not nullable.

* fix $multicurrency_tx (array<float>|float) in isset() is not nullable.
2025-08-04 13:11:57 +02:00
Aurélien BISOTTI
2635c20b53 NEW add shipping address to propal (#34441)
* Update pdf_cyan.modules.php

* Update pdf_other.php

* Update propal.lang

traduction en_us

* Update propal.lang

* Update propal.lang

pb de copié collé

* Update pdf_other.php

* Update pdf_other.php

removed blank space

* Update pdf_cyan.modules.php

remove blank space

* Update propal.lang

ajout PROPOSAL_SHOW_SHIPPING_ADDRESSMore

* Update propal.lang

add PROPOSAL_SHOW_SHIPPING_ADDRESSMore

* Update pdf_cyan.modules.php

test declaration variable shipp_shift

* Update pdf_cyan.modules.php

test declaration variable shipp_shift

* Update pdf_cyan.modules.php

shipp_shift

* Update pdf_cyan.modules.php

shipp_shift

* Update pdf_cyan.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:26:39 +02:00
ldestailleur
b07614414c Fix CI 2025-07-28 18:51:29 +02:00
ldestailleur
6d0277f2b8 Fix CI 2025-07-28 18:38:14 +02:00
ldestailleur
e7eff817e9 Fix bad position of closing brackets. 2025-07-28 17:19:23 +02:00
ldestailleur
7c6a307a01 Fix CI 2025-07-28 17:18:38 +02:00
ldestailleur
1c37761545 Debug v22 2025-07-26 13:13:31 +02:00
ldestailleur
a7e5510245 Debug v22 2025-07-26 12:17:01 +02:00
ldestailleur
abbb25d6fe Debug v22 - Fix amount before discount in multicurrency mode 2025-07-25 16:47:18 +02:00
Maxime Kohlhaas
41878921a7 Fix : better display of titles and subtotals on pdf cyan (#34525)
* Fix : better display of titles and subtotals on pdf cyan

* Fix : better display of titles and subtotals on pdf eratosthene and sponge
2025-06-15 02:55:48 +02:00
ldestailleur
24efd80bbc Debug v22 2025-06-07 14:31:53 +02:00
ldestailleur
11f9f032d9 Debug v22 2025-06-07 14:15:56 +02:00
ldestailleur
23e26d51a9 Debug v22 2025-06-04 19:16:26 +02:00
Frédéric FRANCE
ea6bafde73 clean code (#34196)
* clean code

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-05-27 21:11:10 +02:00
Yannis Hoareau
1301cd36a1 NEW Subtotal module (#33502)
* Changes to follow mvc logic

* Reworked admin page and form to add lines

* Reworked adding line logic

* Adding options when editing subtotal lines

* Fix translations

* Fixed errors/displays and started pdf

* Color for subtotals pdf lines

* FIX display of subtotal totht

* Added pdf azur for propal

* Fix duplicate translation

* Added subtotal support for facture pdf

* Added subtotal support for commande pdf

* Improve UI/translations

* Restored old pdf

* Info to warn user for unsupported pdf

* Added title lines VAT rate and discount support

This is meant for future feature wich is block mass changing vat rate
and discount percentage

* Working on block apply vat and discount

* Added buttons for block actions

* Handle editing vat and discount for subtotal lines

* Editing vat and discount for subtotal lines bloc working

* Added possibility to move by block

* Updated adding and updating a subtotal line

* Improved vat and discount block update

* Improvement for block vat/discount and line edition

Editing a title line edits the corresponding subtotal line

* Improvement for moving by block

* Bad tile or st line placement managing

* Improved bad title or st line placement managing

* Adding subtotal line improved

Adding a subtotal line adds it right under its corresponding title

* Improved deleting subtotal line

Added possibility to choose if you want to delete the corresponding
subtotal line when deleting a title line

* Preventing too high level titles to be created

* Create and update line errors managing

* Improved bad title or st line placement managing

* Improved st line creation

* improve headers

* fix bad block placement managing

* fix adding st line not working if duplicates titles

* fix translations

* Fix block update

* FIX special chars bug

If special char like " ' " was used in title it could be converted to
special char entity.

* Prepare for pdf options

Pdf options like page break befor title should be shown as a picto if activated on a subtotal line on a document

* Added option managing

* Improved subtotal options and PDF integration

* Code refactor

* Action name/Error managment/PDF refreshing

When adding or updating a subtotal line

* Reformat

* Reworked subtotal options database managment

* Changed access to special code

* Remove unecessary call to php trait

* Changed definition of subtotals special code constant

* Reworked align on PDF

* Removed unecessary function and improved error managment

* Typo fix and removed treated todos

* Post typo changed for to better match subtotals names

* Disabled edit if status is not draft

* Changed way subtotals options are stored

* Added view managing when creating a document form an other

* Improved creating document from an other

Can check subtotals lines with table head checkbox and removed highlight
class for better UI.

* Make include of subtotals tpl more clear

* Manage centered or justified case

If user chose to center or justify, we don't change nothing

* Improved pdf

* Removed unecessary code block

* optimisation

* Code sniffer fix

* Code sniffer fix

* Code sniffer fix

* Code sniffer fix

* Code sniffer fix and added missing translation

* Fix php code sniffer

* Reload page when setup saved on subtotals admin page

* Fix php code sniffer

* pjan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* phan fix

* php warning fix

* php warning fix

* php phan fix

* php phan fix

* php phan fix

* Fix bug admin page not loading because of const not defined

* php phan fix

* php phan fix

* FIX subtotals admin page display

* php phan fix

* FIX php phan

* Fix bugs and langs

* Fix bug pdf align

* Replace include by require

* Add headers to avoid refreshing and adding unwanted lines

* Fix phan

* Add GETPOST check for security

* Fix phan

* Fix phan

* Fix phan

* Subtotal option when creating a document from another

* Fix phan

* Add field subtotal options for subtotal lines

* Fix phan

* Fix phan

* Fix phan

* Update to follow mvc

* Fix php phan

* Fix php phan

* Fix phpstan/phan

* Fix phpstan

* Fix phpstan

* Fix phpstan

* Fix phpstan

* Fix phpstan

* Update to switch to extraparams

* Update to switch to extraparams

* Retrieve extraparams from db to objectline

* Modified last things to switch to extraparams

* Cleaning unnecessary code lines

* Fix php-stan

* Section subtotal in extraparams to differentiate if needed for further devs

* Fix phan

* Keep extraparams when creating from another object

* Change default value to false when creating a subtotal line

* Fix clone would not keep extraparams in new object

* Fix dark subtotal line background color

Fix when a subtotal background color is too dark and edit pencil or
delete trash could not be seen

* Fix typo

* Fix typo

* Added subtotals for facturerec

* Fix precommit

* Added extraparams when creating rec from fac and other way

* Fix phan

* Fix objectline null

* Desactivating block vat / discount update for facturerec

* reformating code

* Added expeditions for subtotal

* Save extraparams for shipping lines

* Display of subtotals lines in shipments

* Display when creating facture from shipments

* Improve display of lines and invoice creation from shipments

* Fix error if missing line rang

* Deleted duplicate

* Added deletion of subtotal line in shipping documents

* Not including subtotal lines if there is no product line in between

* Update get subtotal lines in shipment docs to disable

* Delete possibility to edit subtotal lines in shipments

* Handle pdf for shipment

* Handle conf stock or shipment supporting services

* Fix precommit

* Fix duplicate name creating bug

* Fix bug where id could be changed by the line id and would create bug

* Deleted subtotal lines when STOCK_SUPPORTS_SERVICES is enabled and block would only have service lines

* Disable shipments in admin modules

Shimpements subtotals lines are only created from commands

* Fixing phan and stan

* Deleted unused template and phan fix

* Fix phan

* Fix phan

* Fix phan

* FIX: phan

* Fix template bug

If document was not in subtotal scope and would use a template used by
subtotal it would create an error.

* Fix php-stan

* Fix bad display when modules and confs were activated

* Fix php codesniffer

* Excluding subtotal lines when mass updating

* Fix shipments service lines exluded + showing subtotal line with specific configs

* Fix line display with situation invoices + bug block line update

* Added ODT managment

This works with invoices but has not been tested with other documents

* Fix bug when editing VAT/discount by block

* Fix error raised when subtotal line added

Subtotal line had no fk_product and raised the error but we want this
line to have no fk product

* Fix precommit

* Added ODT template for documents that uses subtotals

This template can be usefull to understand how to create an odt template
using subtotals module

* Fix phan

* Fix phan

* fix: buttons showing in bad document status

* clean: unwanted commited files

* add: table examples to use with subtotals on ODT templates

* fix: Unwanted print of value when creating a document from another

* feat: renaming for better understanding

* feat: Improved templates for documents related to subtotals

---------

Co-authored-by: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-05-10 02:44:31 +02:00
ldestailleur
955a8dab83 Debug v22 2025-04-11 14:20:42 +02:00
ldestailleur
c73eec72d5 Disable spellcheck on textarea to define path of dirs 2025-03-25 14:10:53 +01:00
Mathieu Schiffmann
b9946cef4a NEW #33506 Add a constant to apply a ratio to resize images in ODT templates (#33543)
* CLOSE #33506 add a constant holding the ratio to resize images in ODT templates

A new Dolibarr constant 					MAIN_DOC_ODT_IMAGE_RATIO
is taken in consideration for ODT templates.
This constant holds a number that is multiplied when computing the size of images in ODT templates.
All doc_generic_*_odt_modules.php files have been updated to call the setImage Method with a new parameter $ratio
The method setImage in the file odt.php has been modified to have a new parameter $ratio and use it to compute the image size

* FIX #33506 wrong branch

some other files needed to be changed in the develop branch

* FIX #33506 PR errors fixed

* FIX #33506 codesniffer errors fixed

* QUAL #33506 completed method comment
2025-03-24 16:41:00 +01:00
ldestailleur
bb3989c9a7 NEW The signature is on the good page even if another module add pages 2025-03-20 12:01:18 +01:00
MDW
c0f533865f Fix CI: Do not require some fields in the 'title' definition of $cols (#33399)
* Qual: Fix PhanMismatchType

* Finalize rename of $attrV into $value

* Correct getGlobalString into getGlobalInt

* Do not require some fields in the 'title' definition of $cols
2025-03-11 01:42:49 +01:00
MDW
988fc75ca2 Qual: Fix phan notices (emailcollector, bookkeeping) (#33375)
* Qual: Fix phan notices (mostly propal)

* Fix some const arguments to Form::select_dolusers()

* Update phan baseline

* Qual: Fix phan notices (propal)

* Qual: Fix phan notices (emailcollector, bookkeeping)
2025-03-10 15:47:55 +01:00
ldestailleur
f199d3fd61 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-02-21 15:46:33 +01:00
yannis
36a082e543 Fix PDF generation 2025-02-17 17:21:35 +01:00
Hystepik
996109e9be New move pdf configuration in propal module configuration 2025-02-10 15:12:55 +01:00
Laurent Destailleur (aka Eldy)
d01274ef4c Fix phan 2025-02-07 11:28:13 +01:00
MDW
e5b1946bc7 Qual: Fix arguments types on TCPDF/TCPDI calls 2025-02-05 01:43:53 +01:00
MDW
2117c5e550 Qual: Fix setPageOrientation 'autopagebreak' type 2025-02-05 01:43:52 +01:00
MDW
7841b55813 Qual: Fix MultiCell 'fill' argument type 2025-02-05 01:43:50 +01:00
Frédéric France
23270663df fix phpstan 2025-01-28 18:43:05 +01:00
Frédéric France
8ba644340f fix phpstan 2025-01-28 18:33:13 +01:00
Frédéric France
4616a2f636 fix phpstan 2025-01-27 22:00:15 +01:00
MDW
7aa845efd0 Qual: Fix phan notices 2025-01-24 10:55:57 +01:00
Frédéric France
1652b5b178 fix phpstan 2025-01-11 09:53:00 +01:00
Frédéric France
e2a6a94a52 fix phpstan 2025-01-06 21:02:02 +01:00
Frédéric France
57b440677a Merge remote-tracking branch 'upstream/develop' into fix_phpstan_2025_01_05_01 2025-01-05 19:02:46 +01:00
Frédéric France
9eb58c9ce9 fix phpstan 2025-01-05 19:02:28 +01:00
Laurent Destailleur (aka Eldy)
1cfa3b5803 Fix warning 2025-01-05 18:34:01 +01:00
Frédéric France
ee9a5291cd add fix phpstan 2024-12-31 16:25:57 +01:00
Laurent Destailleur (aka Eldy)
778b07dabd Debug v21 Fix tooltip on setup pages 2024-12-13 17:22:48 +01:00
Laurent Destailleur
f86b847a65 Merge branch 'develop' into fix_v20_pdf_space_lost_with_images_eratosthene2 2024-12-08 22:58:03 +01:00
MaximilienR-easya
c72efea880 Fix signature box when rounded param is set (#31882) 2024-11-15 23:48:10 +01:00