2
0
forked from Wavyzz/dolibarr

840 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
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
ldestailleur
92ffba11ca Remove old lang files that are too small (moved into other lang files) 2025-09-11 13:31:34 +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
aca71e1573 Standardize code 2025-08-10 03:22:19 +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
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
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
3bf7cc01fd Code comment 2025-05-09 15:39:07 +02:00
Laurent Destailleur
b0b2442298 Fix #33793 2025-04-14 20:24:21 +02:00
ldestailleur
955a8dab83 Debug v22 2025-04-11 14:20:42 +02:00
ldestailleur
ef95c311a7 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-04-03 21:09:46 +02:00
ldestailleur
174d6497b3 Signed-off-by: ldestailleur <eldy@destailleur.fr> 2025-04-03 21:04:35 +02:00
atm-irvine
87b254e0fd Fix pdf einstein automatic calculation (#33713)
* fix(pdf-einstein): let automatic calculation for pos

* removed ;
2025-04-03 17:12:28 +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
MDW
ef11cdeb45 Qual: Fix phan notices (pdf_* related) (#33445) 2025-03-13 23:05:15 +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
4096d0ee2f Qual: Fix phan notices for commande 2025-03-05 12:15:14 +01:00
Laurent Destailleur
65a194650b Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-02-27 02:28:28 +01:00
Laurent Destailleur
3a79a0b6c2 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-02-27 02:26:29 +01:00
Laurent Destailleur
b21a596cf2 Fix bad constant name PDF_ERATOSTHENE_ADD_POSITION 2025-02-22 20:08:17 +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
Lucas Marcouiller
4b45e7ac64 Merge branch 'develop' into new-duplicate-pdf-configuration-for-order-in-sepcific-page 2025-02-13 11:42:52 +01:00
Laurent Destailleur (aka Eldy)
073a6eeae3 NEW Add options PDF_XXX_SHOW_PRICE_INCL_TAX into PDF setup 2025-02-12 21:02:50 +01:00
Hystepik
64cbc2ca22 fix to be more constant 2025-02-12 10:32:35 +01:00
Hystepik
9675b95fa3 New duplicate order's pdf / terms and condition of sale configuration in order module configuration 2025-02-12 10:02:39 +01:00
Laurent Destailleur (aka Eldy)
d01274ef4c Fix phan 2025-02-07 11:28:13 +01:00
Laurent Destailleur (aka Eldy)
0772222900 QUAL Add get_substitutionarray_each_var_object in phpunit 2025-02-06 12:04:41 +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
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
MDW
c0ad3f22b9 Qual: fix phan notices 2025-01-24 10:55:54 +01:00
MDW
ccc0528dd4 Qual: Fix argument types 2025-01-24 10:55:54 +01:00
MDW
694342484d Qual: Fix phan notices 2025-01-24 10:55:45 +01:00
Laurent Destailleur (aka Eldy)
f6f38aebb4 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-15 13:02:21 +01:00
Laurent Destailleur (aka Eldy)
cf62921762 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-15 13:01:03 +01:00
Frédéric France
1652b5b178 fix phpstan 2025-01-11 09:53:00 +01:00