Commit Graph

171 Commits

Author SHA1 Message Date
ldestailleur
ee52d31f18 NEW On invoice, show also nb of credit notes notyet converted for
consumption
2025-08-15 18:43:58 +02:00
Sébastien NASSIET
f4c6e2495c Hook for getAvailableDiscounts (#34799)
* Update discount.class.php

Add a hook to change the sql request in function getAvailableDiscounts

* Update discount.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-29 13:25:07 +02:00
apsolauv
88e78d1667 Fix return type and error type getSumCreditNotesUsed (#34527)
Co-authored-by: Alex SOLAUV <test@test.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-21 16:16:47 +02:00
Laurent Destailleur (aka Eldy)
09ba5162e7 Clean code 2025-02-10 13:03:37 +01:00
Regis Houssin
f3e7e69107 FIX travis error 2025-02-07 16:26:26 +01:00
Laurent Destailleur
a02b7e0549 Merge branch 'develop' into 20.0-discount 2025-02-05 00:16:14 +01:00
Pratush Raj
7260476397 Bug Fix: #32206 2025-01-30 15:14:07 +05:30
atm-florian
11602243f7 Add class constants: DiscountAbsolute::TYPE_CUSTOMER and DiscountAbsolute::TYPE_SUPPLIER 2024-12-10 13:38:50 +01:00
Frédéric FRANCE
24e7285539 fix CI (#31692)
* Update commonobjectline.class.php

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-05 15:33:09 +01:00
MDW
67e9eaff46 Qual: Fix phan/phpstan notices in class files (part 2) (#31523)
* Qual: Fix phan notices in class files (part 2)

* Qual: Fix phan notices doleditor...events.class

* Qual: Fix phan notices defaultvalues...formprojet.class

* Qual: Fix notices formsetup...formwebsite.class

* Qual: Fix phan notices in class files (part 2)

* Qual: Fix phan notices doleditor...events.class

* Qual: Fix phan notices defaultvalues...formprojet.class

* Qual: Fix notices formsetup...formwebsite.class
2024-10-26 18:24:40 +02:00
Laurent Destailleur
5ef4d40d4b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-01 01:22:54 +02:00
Noé Cendrier
4e15085d79 NEW: add trigger for linking and unlinking invoices (#30182)
* NEW: add trigger for linking and unlinking invoices

* Update discount.class.php

* Update discount.class.php

* Update discount.class.php

* trailing spaces

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-01 00:21:14 +02:00
Laurent Destailleur
0d4452bad2 Clean code 2024-06-30 15:40:19 +02:00
MDW
32cb705419 Fix phpdoc int return ranges 2024-03-29 18:26:44 +01:00
MDW
274a6d0528 Improve phpdoc typing 2024-03-27 19:26:26 +01:00
MDW
975243f1b5 Fix: Ensure DiscountAbsolute->fk_soc deprecation is possible
# Fix: Ensure DiscountAbsolute->fk_soc deprecation is possible

Assign socid whenever fk_soc is assigned so that socid can be accessed
instead of fk_soc.
2024-03-27 18:07:51 +01:00
Frédéric FRANCE
fba15178eb all initAsSpecimen return int (#28577)
* all initAsSpecimen return int

* all initAsSpecimen return int

* all initAsSpecimen return int
2024-03-02 16:38:35 +01:00
MDW
89004f7e03 Qual: Spelling htdocs/core (#27491)
Highlights:
- initialY in pdf_standard.modules.php was unused
  - remove (otherwise -> initially) (+same in other file)
2024-01-13 19:48:20 +01:00
Laurent Destailleur
2a4578ef68 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-01-11 13:48:15 +01:00
Laurent Destailleur
34f5c1e293 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-01-11 13:47:14 +01:00
Laurent Destailleur
64fb9d0db7 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-01-11 13:45:16 +01:00
MDW
72210dc19b Fix: discount - add missing db parameter to dol_print_error (#27337)
# Fix: discount - add missing db parameter to dol_print_error

dol_print_error requires the db instance to be the first parameter
2024-01-10 16:57:10 +01:00
Alexandre Janniaux
e3e2dd348d discount: remove now duplicated fields
Now that DiscountAbsolute is a CommonObject, some fields are duplicated
in the definition of the class and already defined in the CommonObject
class.
2024-01-05 14:55:00 +01:00
Alexandre Janniaux
8cfb183152 discount: add errorsToString()
$localobject->errorsToString() is available in most objects using $db or
other systems generating errors because they inherit from CommonObject.
However, DiscountAbsolute didn't inherit from it.

Extending CommonObject allows to implement the usual behaviour for core
objects like referencing the user doing the action.
2024-01-05 14:54:55 +01:00
Laurent Destailleur
b28ae5d8d3 Clean code 2023-12-27 12:12:20 +01:00
Hystepik
d08f91e4cb Fix some phpstan warnings 2023-12-21 13:43:19 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Frédéric FRANCE
53c8a3acf8 clean phpdoc for phpstan (#26905) 2023-12-01 19:51:32 +01:00
Laurent Destailleur
ef6b4adaf6 Fix warning 2023-11-26 17:27:14 +01:00
HENRY Florian
5a23bb27b0 fix: bad sql on delete discount (#26517) 2023-11-09 14:51:42 +01:00
Mohamed DAOUD
00cbaa094c fix-warnings (#26500) 2023-11-08 17:26:00 +01:00
AmazingBeu
bc528fed67 fix SQL syntax error introduced in 9861b50 (#26289) 2023-10-20 12:52:36 +02:00
Laurent Destailleur
9255341d31 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2023-08-10 10:59:10 +02:00
Laurent Destailleur
2761f993e9 FIX creation of invoice from contract with discount lines 2023-08-10 02:09:17 +02:00
Florian HENRY
9861b50ede fix: use CONST of TYPE of CommonInvoice rather than hard coded value 2023-06-01 11:49:56 +02:00
Laurent Destailleur
f8abd0b7f6 Debug bad params 2023-01-03 14:53:55 +01:00
Laurent Destailleur
6df4795ded Debug bad params 2023-01-03 14:47:00 +01:00
Laurent Destailleur
77898ab456 Fix f... option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS (do not use this!) 2022-10-12 11:52:33 +02:00
Laurent Destailleur
0e36097eba Save result of some methods into cached properties. 2022-04-07 19:16:50 +02:00
Laurent Destailleur
8603d493ad Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/contrat/list.php
	htdocs/install/mysql/tables/llx_partnership.key.sql
2022-03-19 17:34:26 +01:00
Laurent Destailleur
167df9593b Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
Conflicts:
	htdocs/comm/action/card.php
	htdocs/fourn/class/fournisseur.commande.class.php
	htdocs/langs/en_US/products.lang
	htdocs/reception/class/reception.class.php
2022-03-17 19:08:51 +01:00
Laurent Destailleur
4aa93b363a FIX #20387 2022-03-17 11:24:23 +01:00
Regis Houssin
a1dc6e7e9b FIX travis error - use double quote instead simple quote 2022-01-27 12:52:13 +01:00
Regis Houssin
399fffa81e FIX convert core class 2022-01-27 10:19:35 +01:00
Laurent Destailleur
51a4d7630f Clean code 2021-08-28 00:56:37 +02:00
Laurent Destailleur
2f225ee7e5 Clean code by adding cast int. 2021-08-27 16:33:03 +02:00
Laurent Destailleur
23829ae637 Cast numeric into on sql request 2021-08-23 18:56:46 +02:00
Laurent Destailleur
d4b5ee6c85 Fix cast into variable into sql request. 2021-08-23 17:41:11 +02:00
Laurent Destailleur
5cc86d2319 Fix #yogosha6370 2021-06-14 13:51:09 +02:00
Laurent Destailleur
756786f717 Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture/card.php
	htdocs/compta/facture/list.php
	htdocs/core/class/discount.class.php
	htdocs/core/lib/functions.lib.php
	htdocs/core/lib/pdf.lib.php
	htdocs/core/modules/modFournisseur.class.php
	htdocs/fourn/facture/card.php
	htdocs/holiday/list.php
	htdocs/paybox/admin/paybox.php
	htdocs/paypal/admin/paypal.php
	htdocs/product/price.php
	htdocs/projet/activity/perday.php
	htdocs/projet/activity/permonth.php
	htdocs/projet/activity/perweek.php
	htdocs/stripe/admin/stripe.php
2021-06-11 19:05:05 +02:00