Commit Graph

1256 Commits

Author SHA1 Message Date
Frédéric FRANCE
e00559b242 fix CI after file rename (#36021)
* fix CI after file rename

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 03:12:58 +01:00
Laurent Destailleur
cf18a71a75 WIP LNE 2025-10-28 15:12:45 +01:00
Laurent Destailleur
8e005b19c0 WIP LNE 2025-10-28 15:07:49 +01:00
MDW
66683105f1 Qual: Fix phan notices (#35827)
# Qual: Fix phan notices

Some type hints updates + correction to get week from date (action/pertype.php)
+ check that value is not null (pdf_* classes).
2025-10-18 19:10:43 +02:00
Charlène Benke
e9d1e719e6 warning error if realpath is not empty before use (#35740) 2025-10-14 22:13:43 +02:00
Wilson
e3ad771149 NEW Allow omission of ODT template name when generating ODT and PDF (#35701)
Presently, Invoice PDF/ODT is generated with template name just before file extension.
This creates an issue where Mass Actions is also unable to perform Send By Email, or PDF Merge.
This pull request is inspired by this forum post:

https://www.dolibarr.org/forum/t/how-to-remove-omit-odt-templete-name-from-auto-document-generated/22735

Co-authored-by: Wilson <wilson@Wilsons-MacBook-Air.local>
2025-10-11 14:03:54 +02:00
ldestailleur
8dd55d5a33 FIX Concat of PDF to invoices 2025-10-08 12:28:35 +02:00
ldestailleur
e45fe1f988 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-27 15:57:27 +02:00
ldestailleur
8b58b215b4 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-27 15:48:40 +02:00
ldestailleur
fe28e36638 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-09-27 15:42:44 +02:00
Frédéric FRANCE
0afc7eed80 clean code (#35515)
* clean code

* add doc

* add doc
2025-09-27 12:28:31 +02:00
Joachim Kueter
16c9d4005f Fix #35208 - Multicurrency fix for discount in invoice (Sponge) (#35506)
* Multicurrency fix for discount

* removed empty line
2025-09-27 12:10:15 +02:00
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
Frédéric FRANCE
5c2344cca8 clean code (#35396)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 12:11:36 +02:00
Frédéric FRANCE
d1572fc3ea fix CI (#35409)
* fix CI

* fix
2025-09-20 15:57:39 +02:00
ldestailleur
5ac469634e Clean code for PDF invoices 2025-09-20 02:48:27 +02:00
Charlène Benke
ad4f4fb619 Refactor VAT array handling in PDF generation (#35395)
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] is present on 2 part of the if
2025-09-20 00:01:19 +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
078da229c8 clean code (#35352)
* 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

* Clean code

* Clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-17 14:11:32 +02:00
ldestailleur
af74f2c057 Lang file paybox is too small for deprecated moduel. Moved inside
stripe.
2025-09-11 11:20:13 +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
Frédéric FRANCE
7d04067b4e fix CI (Travis) (#35099)
* fix test

* fix test

* fix test

* fix test

* fix test

* fix

* fix

* fix
2025-08-28 02:15:41 +02:00
ldestailleur
5e7d50a312 Add option PDF_PURCHASE_INVOICE_HIDE_PRICE_EXCL_TAX and
PDF_PURCHASE_INVOICE_SHOW_PRICE_INCL_TAX
2025-08-17 01:56:53 +02:00
ldestailleur
d74fa57b6c NEW Add option PDF_PURCHASE_INVOICE_HIDE_VAT 2025-08-17 01:54:28 +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
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
7c6a307a01 Fix CI 2025-07-28 17:18:38 +02:00
ldestailleur
1c37761545 Debug v22 2025-07-26 13:13:31 +02:00
ldestailleur
935f947c18 Debug v22 2025-07-26 12:43:55 +02:00
ldestailleur
a7e5510245 Debug v22 2025-07-26 12:17:01 +02:00
ldestailleur
e8de1b62d1 Debug v22 2025-07-26 11:38:27 +02:00
ldestailleur
abbb25d6fe Debug v22 - Fix amount before discount in multicurrency mode 2025-07-25 16:47:18 +02:00
ldestailleur
a27ff8b053 Debug v22 2025-07-25 15:41:57 +02:00
ldestailleur
7ed2cddd4b Fix CI 2025-06-20 16:16:04 +02:00
ldestailleur
446efdc432 Clean dead code 2025-06-20 14:00:29 +02:00
ldestailleur
2a85b73fa2 Add MULTICURRENCY_SHOW_ALSO_MAIN_CURRENCY_ON_PDF for legal requirement
that need both currencies on PDF
2025-06-20 14:00:14 +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
Laurent Destailleur
408b42d712 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-04 22:47:41 +02:00
sonikf
89c1a741a7 backport #b0b2442 to v. 21 also apply fix for invoices (#34325)
* backport #b0b2442 to v. 21

* backport #b0b2442 to v. 21

* fix shipment contact same as in #b0b2442

* fix shipment contact same as in #b0b2442

* fix shipment contact same as in #b0b2442
2025-06-04 11:15:44 +02:00
ldestailleur
ae94c71a10 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-05-10 13:25:31 +02:00
ldestailleur
445f089556 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-05-10 12:53:37 +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
Frédéric FRANCE
223f0c2763 fix translation (#34086) 2025-05-09 23:46:07 +02:00
ldestailleur
955a8dab83 Debug v22 2025-04-11 14:20:42 +02:00
ldestailleur
2a082d37a5 Introduce position for sub-modules 2025-04-05 16:34:19 +02:00