* Add fk_project to Mass Emailings
* Mass Mailing fk_project SQL definition dispre
* mailing typecasting fk_project
* mailing using correct variable name
* more type casting to fix phpstan errors related to fk_project in mass mailing
* mailing fk_project NULL better default in DB
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* Add getContacts method to retrieve contact information
* Implement getContacts method for proposals
Added a method to retrieve contacts associated with a proposal, including access checks and data cleaning.
* Implement getContacts method for invoices
Added a method to retrieve contacts associated with a specific invoice, including access checks and error handling.
* Update api_proposals.class.php
* Update api_invoices.class.php
* Update api_interventions.class.php
* Update api_interventions.class.php
* Add method to set invoice as draft
* Return contacts directly instead of cleaned data
* Return raw contacts instead of cleaned data
* Combine external and internal contacts in order list
Merge external and internal contacts for orders.
* Change return type from Object to array in API doc
Updated return type in API documentation for contact information.
* Change return type in api_orders.class.php docblock
Updated return type in docblock to reflect array return.
* Change return type from Object to array in API doc
* Update api_orders.class.php
* Update api_interventions.class.php
* Update api_proposals.class.php
* Update api_orders.class.php
* Update api_interventions.class.php
* Update api_interventions.class.php
* Update api_interventions.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW Add option to create simple shipment of non origin
* NEW Add option to create simple shipment of non origin
* avoid 2nd update and revert origin change
* remove 2nd update
* Update admin.lang
Add translate "Permission511=Lire les salaires et leur paiement (les vôtres et ceux de vos subordonnées)" and move old 511->512 and 512->513.
* Update modSalaries.class.php
Add the new permission 'Read employee salaries and payments (yours only)'
* Update list.php
add the new permission filter "read child"
* Update payments.php
Add the new permission "readchild"
* Update index.php
Add support off new permission
* Update index.php
* Update index.php
* Update index.php
* Update list.php
* Update list.php
* Update list.php
* Update payments.php
* adding function to set it to draft mode
* New API endpoint for controlling mass mailings
* report which id we could not find + unset some fields not on this object + write that source was com/propal/class/api_propal.class.php
* extending the fetch function for the mailing object so the API can show all columns in the database
* filling more data into the object and don't unset it later
* adding notrigger to clone creation
* still some cleaning up from when cloning api_proposals.class.php
* do not unset the ID, because we want the ID so we can use it
* adding endpoint to clone a mass mailing
* extending count function with 'all' that just returns all rows, no matter the status
* API endpoints to delete all targets of a mass mailing
* setting which http method to use
* pretty print clone endpoint in API explorer
* endpoint resetTargetsStatus of mass mailing
* Typo receipients fixed
* Update api_mailings.class.php
* Update api_mailings.class.php
* Update api_mailings.class.php
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW: hooks `showInputExtraField` and `showOutputExtraField` to override `ExtraFields::showInputField` and `ExtraFields::showOutputField`
* Fix inter-hook interference with 'showOptionals' because resPrint isn't output right after calling executeHooks
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* add country and custom code in fetch line
* add country and custom code in fetch line
* add country and custom code in fetch line
* add country and custom code in fetch line
* add country and custom code in fetch line
* add country and custom code in fetch line
* add country and custom code in fetch line
* add country and custom code in fetch line
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Add PaidHidden and PaidShown language entries
* Add functionality to show/hide paid lines
* Add copyright notice for Guenter Lukas
* Fix spelling of 'Guenter' to 'Günter' in copyright
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW : Change the path for the mailing files because if you have more than 100 mailing you have the files of the previous mailing show in the newest.
Only activate if the global MAILING_USE_NEW_PATH_FOR_FILES is set to 1.
Add a script for move files to new path.
* Place migration script into repair.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: tnegre <tnegre@open-dsi.fr>
* New : Copy support of the deposit percent of the payment mode found in customer proposal, customer order and customer invoice to supplier proposal, order and invoice
* Correction pre-commit / travis CI
* Correction pre-commit / travis CI
* Correction pre-commit / travis CI
* Correction pre-commit / travis CI
* NEW: extrafields: add field to link a field to a module
* Update 22.0.0-23.0.0.sql
* Update llx_extrafields.sql
* Update 22.0.0-23.0.0.sql
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIX: Error on add contact
Trigger COMMANDE_ADD_CONTACT causing error when adding a contact to and
order, this fix updates the COMMANDE prefix to ORDER
* FIX: delete contact
This fixes the trigger call for delete contact on orders
* FIX: Update patch
Updated to reflect recent PR to add TRIGGER_PREFIX to commande class
* Update commonobject.class.php
Reduce risk of regression
---------
Co-authored-by: brad <brad@endurotags.com.au>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW API User - Remove user from group
* Update api_users.class.php
* Update api_users.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* contact deletion in api_orders class for internal and external
* Update api_orders.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIX - MRP MO Product to Consume
Fixes MO Product to Consume when recursive BOM's are used, the product
to consume only includes the BOM line items instead of BOM product
* fix php-stan errors
* fix phan analysis errors
* fix phan analysis errors take 2
---------
Co-authored-by: brad <brad@endurotags.com.au>
* NEW Add hook initialization for interventions API
the goal is to enhance the search function on the api (by sample add linked contact or user name)
* Clean up whitespace in api_interventions.class.php
* Fix parameter reference in executeHooks call
* Update api_interventions.class.php
* Update action name in API intervention hooks
* Add 'apimethod' to parameters in API hook
* Update api_interventions.class.php
* Update api_interventions.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Update recap-fourn.php
The key improvement is that now the balance calculation works correctly with descending order of movements. The balance will show the most recent transaction with the cumulative total of all transactions, and older transactions will show their respective balances as of that time.
This implementation now matches the behavior of compta\recap-compta.php where the balance is calculated from bottom to top when the movements are displayed in descending order.
* Update recap-fourn.php
The key improvement is that now the balance calculation works correctly with descending order of movements. The balance will show the most recent transaction with the cumulative total of all transactions, and older transactions will show their respective balances as of that time.
This implementation now matches the behavior of compta\recap-compta.php where the balance is calculated from bottom to top when the movements are displayed in descending order.
* Update recap-fourn.php
fix reordering by date column
* Update recap-fourn.php
* Update recap-fourn.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* add getTimespent on api task
* Fix return statement in api_tasks.class.php
* Fix return statement in api_tasks.class.php
* Fix formatting and spacing in getTimespent method
* Fix formatting of if statement in getTimespent method
* Update api_tasks.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 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>
* intervencions api call dont show the objects relations
Fixes#35362
* feat: add loadlinkedobjects parameter to control linked object loading in interventions API
thank you for the recomendarion @eldy !!!!
* FIX: reqursive bom quantities
Correctly handle quantities on BOM recursion. Current behavior is that
sub BOM total quantity is multiplied by parent quantity for that line,
the expected behaviour is that the parent BOM would be including sub BOM
on a per unit base.
* Simplified code
* Update objectline_view.tpl.php
* Update bom.class.php
* Update bom.class.php
* Update bom.class.php
* Update bom.class.php
---------
Co-authored-by: brad <brad@endurotags.com.au>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* add own supplier invoice tag filter and bulk insert
add own supplier invoice tag filter and bulk insert
* Update list.php
change format
* Bulk edit commande tags
Bulk edit commande tags
* Label filter orders and supplier order statistics
Label filter orders and supplier order statistics
* Supplier Order Label Filter and Mass Action for Supplier Order Labels
Supplier Order Label Filter and Mass Action for Supplier Order Labels
* Update index.php
change format
* Update list.php
change format
* Update index.php
change format
* Update index.php
change format
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* `fix(delivery): correct inconsistencies in email triggers and templates`
**Body:**
- Adjusted email trigger names from `RECEPTION_*` to `SHIPPING_*`.
- Updated parameters and placeholders for shipment email tracking.
- Removed redundant `reception_send` entry in mail templates for shipping.
* `fix(delivery): update email triggers and templates for deliveries`
**Body:**
- Replaced email trigger `SHIPPING_SENTBYMAIL` with `DELIVERY_SENTBYMAIL`.
- Updated template references from `shipping_*` to `delivery_*` for consistency.
- Modified tracking ID format from `shi` to `del` in `card.php`.
- Added `MailToSendDelivery` language entry for email labels.
- Adjusted mail templates to include `delivery_send` entries.
* Fix:prevent handling update action by generic include of actions_addupdatedelete.inc.php
Fix:
To prevent handling update action by generic post update action in inventories at /core/actions_addupdatedelete.inc.php, we need to unset $action variable, otherwise $object fileds are filled with with empty values.
* Update inventory.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Error: When creating an invoice for a supplier order with a negative value #30516
Error: When creating an invoice for a supplier order with a negative value #30516
* Update html.form.class.php
Modifications made related to the issue
Search for variants by EAN #34567
* Update html.form.class.php
I change :
if(getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')){
with
if (getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')) {
and
SEARCH_VARIANTS_OF_EAN13
into
PRODUIT_ATTRIBUTES_HIDECHILD_BUT_ALLOW_SEARCH_IN_EAN13
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* added tag mass action
added tag mass action
* Update list.php
* Update pdf_crabe.modules.php
The write_file function as its own documentation describes returns 1 0 a value minus 0 if an error exists. Therefore, if there is an error in the hook more than saving the error, it must return 0 since an error occurred
* Update pdf_crabe.modules.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Error: When creating an invoice for a supplier order with a negative value #30516
Error: When creating an invoice for a supplier order with a negative value #30516
* Update html.form.class.php
Modifications made related to the issue
Search for variants by EAN #34567
* Update html.form.class.php
I change :
if(getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')){
with
if (getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')) {
and
SEARCH_VARIANTS_OF_EAN13
into
PRODUIT_ATTRIBUTES_HIDECHILD_BUT_ALLOW_SEARCH_IN_EAN13
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* added tag mass action
added tag mass action
* Update list.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* New merge members
* fix fields
* add trans
* fix CI
* fix Ci
* fix Ci
* fix CI
* Fix CI
---------
Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* #35271 [SQL] add: mandatory signature fields
Data model for add feature we want add checkbox on for tell who c can sign in contact
Ex: On contract card we want 2/3 signatories
-- Later we add feature for link external signature link with mandatory signautre fields on contact.
* Update llx_element_contact.sql
* Update 22.0.0-23.0.0.sql
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
IF the user has the right to create/modify a product, they have the right to add a product price by customer (if parameter is set).
BUT they don't have the right to edit the product price by customer (the 'edit') button is not displayed.
This commit fixes this.
Fix PHP Error:
Undefined array key "login" (/admin/tools/listsessions.php:161)
The error is triggered when the user name conatins '_' or '.'
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
In Receipt validate, close... we have setOrigin that not set data line_id_object_src & line_id_object_origin, that variable is very important when we working with custom hook. I checked also on shipment it already implemented.
* Update company birth date label to establishment date
* Simplify default bank account description
* Fix wording in discount split labels
* fix grammar
* Fix typo
* fetch greatest tms for user and fix user creation and modification
* fetch greatest tms for user and fix user creation and modification
* fetch greatest tms for user and fix user creation and modification
* fetch greatest tms for user and fix user creation and modification
* fetch greatest tms for user and fix user creation and modification
* fetch greatest tms for user and fix user creation and modification
* try to fix doc
* try to fix doc
* try to fix doc
* try to fix doc
* try to fix doc
* try to fix doc
* try to fix doc
* try to fix doc
* try to fix doc
* add more parameters to hook
* add more parameters to hook
* add more parameters to hook
* add more parameters to hook
* add more parameters to hook
* add more parameters to hook
* add more parameters to hook
* add more parameters to hook
* can set extrafields in project elements
* can set extrafields in project elements
* Update element.php
* test
* test
* test
* test
* test
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* add map_type_title_area on category class hook
need on new categorie feature if we use specific categories on external module
* Update categorie.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* We added a hook to allow us to modify the Prospect Customer drop down list in Third Party
* modification of the hook on third party card and adding hooks on third party list
---------
Co-authored-by: root <root@dolibarr17.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* New main http security headers page
* fix CI
* Fix CI
---------
Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIx virtual stock when stock decrease on invoice validate if product in invoice but not in linked order.
* $this->db->prefix()
* Replace join by exists
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Use new phan output target "github"
Using checkstyle is no longer needed, "github" is now available as an
output printer.
This PR uses that, cs2pr is no longer needed.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
(duplicate of $totaldeposits) and $sumcreditnote (duplicate of
$totalcreditnotes) has been removed (there are replaced with the
property that was a duplication of (same for $sumpayed_multicurrency,
$sumdeposit_multicurrency, $sumcreditnote_multicurrency).
* Error: When creating an invoice for a supplier order with a negative value #30516
Error: When creating an invoice for a supplier order with a negative value #30516
* Update html.form.class.php
Modifications made related to the issue
Search for variants by EAN #34567
* Update html.form.class.php
I change :
if(getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')){
with
if (getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')) {
and
SEARCH_VARIANTS_OF_EAN13
into
PRODUIT_ATTRIBUTES_HIDECHILD_BUT_ALLOW_SEARCH_IN_EAN13
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
* Update html.form.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)
I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755
* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"
This reverts commit 80e67e665a.
* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).
correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755
* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."
This reverts commit 12ccfa60fa.
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)
I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755
(Sorry for the 2 failed pull request: I'm begginer in use of git)
* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"
This reverts commit 6fb35a6d2e.
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)
I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755
(Sorry for the 2 failed pull request: I'm begginer in use of git)
* correction commit for phan
* Correction for Travis CI
* I forgot to correct a line
* Correction for phpcs
* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue
* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on
* spelling correction in comment that don't pass pre-commit check
* trailing whitespace forget
* Add function to split a discount in 2 by API REST
* correction for phan & php-stan
* correction for phan & php-stan
* correction for phan & php-stan
* Update api_thirdparties.class.php
* Update api_thirdparties.class.php
* Update api_thirdparties.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW : add extrafield option "empty on clone"
* NEW : empty extrafield value on clone
* Fix : missing parameter in function call
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW : update country list
* Update llx_00_c_country.sql
* Update 22.0.0-23.0.0.sql
* Update llx_00_c_country.sql
* Update 22.0.0-23.0.0.sql
* Fix : forget to remove eec update after country list update
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW : add company date birth (SQL structure)
* NEW : add company date birth (UI)
* Rename date_birth in birth
* Rename date_birth in birth (UI)
* Update societe.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 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.
* FIX: Too heavy sql query
* FIX: Add index in user table and update SQL for user::fetchall()
* FIX: Add also index on llx_user on migrate
---------
Co-authored-by: Noé <noe@scopen.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay
* Update card.php
update typo
---------
Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
* 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>
* feat: query to import old user token to new implement with perms
* feat: replaced sql migration file by php upgrade2
* feat: leave state field empty
* Update upgrade2.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Discount split more than two parts
* fix spaces
* remove set action split and type variables
* Condition if javascript is disabled
* Update remx.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* refactor(datapolicy): redesign setup and logic for GDPR compliance
- Introduced a data-driven configuration structure for setup.php.
- Added support for a new "recruitment" GDPR datapolicy configuration.
- Streamlined code for managing anonymization and deletion delays.
- Enhanced dropdown generation logic to improve maintainability.
- Simplified data anonymization and deletion methods in cron execution.
This change provides more flexibility and modularity while ensuring compliance with GDPR standards.
* refactor(datapolicy): enhance data cleaning logic and add modular handlers
- Refactored `cleanDataForDataPolicy` method for better readability and efficiency.
- Implemented modular handlers for deletion and anonymization (_handleDelete and _handleAnonymize).
- Added dynamic argument building for method calls based on policy configurations.
- Improved SQL query preparation with placeholders for better database compatibility.
- Enhanced error handling and outcome recording in data processing.
This update simplifies extensibility and ensures robust handling of datapolicies.
* fix precommit
* fix
* fix(datapolicy): resolve uninitialized langs object and improve type hints
- Added a check to ensure `$langs` object is properly initialized, preventing runtime errors.
- Improved type hints in `datapolicycron.class.php` for stronger type checking and clarity.
- Replaced `empty` checks with `isset` for better null safety in setup.php dropdown logic.
- Adjusted SQL placeholders to cast values as strings for compatibility.
These changes enhance code robustness, type safety, and error handling.
* fix(datapolicy): improve type hints and streamline dropdown logic
- Added precise type hints (`string`, `array`) to enhance code clarity and type safety.
- Removed redundant condition in dropdown generation for improved maintainability.
- Added type specification for `$paramName` in `array_map` to strengthen type checking.
- Inserted missing class docblock for `CommonObject` in `datapolicycron.class.php`.
These updates lead to cleaner, safer, and more robust code.
* fix(datapolicy): improve type hints and streamline form submission logic
- Added return type hints (`: int`, `: void`, `: array`) in `datapolicycron.class.php` for better type safety and clarity.
- Simplified loop structures in `setup.php` by removing unnecessary variables.
- Revised `buttonsSaveCancel` method usage to eliminate redundant cancel parameter logic.
- Enhanced maintainability through refactoring `_processPolicyAction`, `_handleDelete`, and `_handleAnonymize` methods.
These refinements improve code readability, maintainability, and robustness.
* refactor(datapolicy): replace custom dropdown generation with `Form::selectarray`
- Removed the custom `$generateSelectHtml` function, simplifying code by using the existing `Form::selectarray` method.
- Updated dropdown generation for 'anonymize' and 'delete' actions to align with Dolibarr's standard practices.
- Enhances maintainability by leveraging built-in utilities and reducing custom logic.
* Update datapolicycron.class.php
* Try to fix CI
* Update datapolicycron.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# qual: Update FTP stub for phan
Phan did not find the FTP/Connection type, so updated the ftp stub for phan
which fixes some notices that were new
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Update contrat.class.php
Fix the function getListOfContracts with a missing LEFT JOIN when using $line_status
* Update contrat.class.php
add the left join in both cases and the inner join only for the product_categorie filter
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay
* FIX- Correct function GetwarningDelay
---------
Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)
I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755
* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"
This reverts commit 80e67e665a.
* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).
correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755
* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."
This reverts commit 12ccfa60fa.
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)
I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755
(Sorry for the 2 failed pull request: I'm begginer in use of git)
* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"
This reverts commit 6fb35a6d2e.
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)
I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755
(Sorry for the 2 failed pull request: I'm begginer in use of git)
* correction commit for phan
* Correction for Travis CI
* I forgot to correct a line
* Correction for phpcs
* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue
* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on
* spelling correction in comment that don't pass pre-commit check
* trailing whitespace forget
* fix(commonobject): ensure `tms` field is updated with current timestamp
- Added logic to automatically update the `tms` field with the current timestamp when it exists in `$fieldvalues`.
- Aligns `tms` behavior with other timestamp fields like `date_modification`.
Improves consistency in timestamp handling across the codebase.
* fix(commonobject): set timezone for `dol_now()` call
- Updated `dol_now()` to use the user's timezone (`tz_user`).
- Ensures timestamps are consistent with user-specific settings.
* fix(commonobject): correct parameter for `dol_now()` function
- Updated `dol_now()` to use 'tzuser' instead of 'tz_user'.
- Fixes incorrect parameter causing potential timezone inconsistencies.
* fix(commonobject): respect `MAIN_DISABLE_AUTO_UPDATE_OF_TMS_FIELDS` setting
- Added a check for `MAIN_DISABLE_AUTO_UPDATE_OF_TMS_FIELDS` in the logic updating the `tms` field.
- Ensures the `tms` field is not auto-updated when this global setting is enabled.
- Retains the update behavior for `date_modification` and `fk_user_modif` fields.
Improves flexibility by honoring user-defined global settings for timestamp management.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Add thirdparty search on api list
this change allow to seach element with filter on thirdparty (ex : list of bill of with name of thidparty)
* Update api_orders.class.php
* Update api_invoices.class.php
* Update api_contracts.class.php
* Update api_shipments.class.php
* Update api_interventions.class.php
* Update api_projects.class.php
* Update api_tickets.class.php
* Update api_tickets.class.php
* Update api_projects.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
The current solutions only uses time() which is a timestamp based on seconds. In some scenarios like automizing mails this is not enough. Even with the mt_rand there could be more likely collisions of the ids which is not allowed as it should be overall unique.
The newly used uniqid used a timestamp based on milliseconds and adds additionally a bit randomness which reduces the collision changes much more.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Make formList public in list controller to allow modify properties by hook.
* WebPortal: Make controller form objects accessable in hookPrintPageView
* Introducing the TRIGGER_PREFIX property to force developers to use unique triggerkey per business object, limit also code to business CRUD events and identity when it is not.
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The deprecated column egroupware_id has been dropped.
* The property $sumpayed (duplicated of $totalpaid), $sumdeposit (duplicate of $totaldeposits) and $sumcreditnote (duplicate of $totalcreditnotes) has
been removed (there are replaced with the property that was a duplication of (same for $sumpayed_multicurrency, $sumdeposit_multicurrency, $sumcreditnote_multicurrency).
* Parameters $maxlen and $notooltip of Contract have been inverted to follow the standard. It was breaking the common use of getNomUrl() but if you were using the parameter
maxlen (rare) by using the old signature, result may be a tooltip that is no more visible on ref printed by you module.
* Removed array $MAP_ID_TO_CODE that was a duplicate of array "array_flip($categ->MAP_ID)"
* The signature of the Sale order ->cancel() method and shipment ->cancel() has been modified to introduce the $user param like for other methods that modify a status.
* Adding new document templates must be done by adding files into the mymodule/core/modules/xxx/doc directory. Adding files into custom directory with the
same path than the core path without using a mymodule directory is now forbidden.
* The directory theme/common/octicons has been removed
* The library timepicker.js has been removed. Was not used by Dolibarr.
* Because of new TRIGGER_PREFIX property triggers SUPPLIER_PRODUCT_BUYPRICE_XXX are renamed to PRODUCT_BUYPRICE_XXX.
***** ChangeLog for 22.0.2 compared to 22.0.1 *****
@@ -63,6 +92,8 @@ FIX: Missing a column on group permissions
FIX: several minor troubles with modulebuilder
FIX: Test on mandatory product or thirdparty barcode
FIX: trigger mailmanspip when un/linking categories
FIX: Security when using Advanced Target page of emailing (feature hidden in v21, default in v22+). Possible
SQL injection by users with permission to make and send mass emailing.
***** ChangeLog for 22.0.0 compared to 21.0 *****
@@ -181,7 +212,7 @@ NEW: Add note public and private on order export
NEW: Finish dev for API_ENABLE_COUNT_CALLS (count of API use is visible on user API key field)
For developers:
----------
---------------
NEW: Add an API endpoint to get properties of a single line of an order (#34045)
NEW: add const to not include default CSS in top_htmlhead with DISABLE_CSS_DEFAULT_THEME
NEW: add const to not include default lib_head.js in top_htmlhead with DISABLE_LIB_HEAD_JS
@@ -208,7 +239,6 @@ NEW: expense report API deny
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The use of GETPOST function is not allowed inside extrafields conditions or any strings that contains dynamic code evaluated with dol_eval().
* The deprecated variable $trigger_name (duplicate of variable $triggersendname) has been removed. You must use $triggersendname everywhere now.
@@ -257,7 +287,6 @@ FIX: trigger mailmanspip when un/linking categories
DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP).
It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also all prerequisites like the web server, and the database in one auto-install process.
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
to be distributed (for Windows).
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:")
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr, or want to use Dolibarr with a different technical layer (PostgreSQL instead of MariaDB for exemple), you should not use this auto-installer assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (the .zip file).
!!! See file ../../makepack-howto.md
This directory contains files used by *makepack-dolibarr.pl* script to build DoliWamp, the all-in-one .EXE package of Dolibarr, ready to be distributed on Windows (See file ../../makepack-howto.md)
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (search line starting with "; Value OK:")
print'Create xml check file with md5 checksum with command php '.$SOURCE.'/dev/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
@@ -24,10 +24,9 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
- Add path to ISCC.exe into the PATH windows var (You can do this by launching wine cmd, then regedit and add entry int `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH`)
- To manually build the .exe from Windows :
- To manually build the .exe from Windows (Note: running from makepack-dolibarr.pl script is however recommended):
Note: running from makepack-dolibarr.pl script is however recommended
open file dev/build/exe/doliwamp.iss and click on button "Compile".
Open the file dev/build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
@@ -58,7 +57,8 @@ Prerequisites to build autoexe DoliWamp package from Windows:
This section describes steps made by Dolibarr packaging team to make a beta version of Dolibarr, step by step.
- Check all files are committed.
- Check that all files on local working repository are committed.
- Update version/info in ChangeLog, for this you can:
To generate a changelog of a **major new version** x.y.0 (from a repo on branch develop), you can do
- Run `makepack-dolibarr.pl` to check the generation of all packages. No need to publish them.
- Post a news message on dolibarr.org about the freeze by cloning a past news + relay the news url on social networks
- Post a news message on dolibarr.org about the freeze by cloning a past news + relay the news url on social networks. Include the content of the previously generated ChangeLog file into the news.
- Create a branch x.y (but only when version seems stable enough).
@@ -108,7 +108,7 @@ We suppose the branch x.y has already been created during the beta (see previous
- Check there is no pending open security issue: List can be found here: https://github.com/Dolibarr/dolibarr/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Priority%20-%20Critical%20or%20Security%22
- Check all files are committed.
- Check that all files on local working repository are committed.
$arrayofalerts[$alreadyfoundcommitid]['commitidbis'][]=$tmpval['commitid'];// Concat the new commitid to the list of commitidbis array of the already found case.
if(empty($arrayofalerts[$alreadyfoundcommitid]['issueid'])&&!empty($tmpval['issueid'])){// If not Github was defined, we set it.
# if you want to exclude something, generate the baseline to do that, add here give only pattern that does not give the opportunity to introduce new errors
# or pattern to avoid false positive of some bugged or allowed phpstan checks
ignoreErrors:
- '#.*phan-var#'
- '#^Expression "''…" on a separate line does not do anything#'
- '#Empty array passed to foreach#'
- '#Unable to resolve the template type T#'
- '#in empty\(\) always exists and is always falsy#'
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters,$obj,$tmpaction);// Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj,$tmpaction);// Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj,$tmpaction);// Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters,$obj,$tmpaction);// Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj,$tmpaction);// Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj,$tmpaction);// Note that $action and $object may have been modified by some hooks
if(!empty($toselect)&&in_array($accounting_product_mode,$accounting_product_modes)){// @phpstan-ignore-line Bug phpstan thinking that empty(array()) is always true
$mode=GETPOST('mode','aZ');// The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingsubaccountlist';// To manage different context of search
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):str_replace('_','',basename(dirname(__FILE__)).basename(__FILE__,'.php'));// To manage different context of search
@@ -737,7 +735,7 @@ class AccountingAccount extends CommonObject
* @param FactureLigne|SupplierInvoiceLine $factureDet Facture Det
* @param array<string,int> $accountingAccount Array of Accounting account
* @param string $type Customer / Supplier
* @return array{suggestedaccountingaccountbydefaultfor:string,suggestedaccountingaccountfor:string,suggestedid:?int,code_l:string,code_p:string,code_t:string}|int<-1,-1> Array of accounting accounts suggested or < 0 if technical error.
* @return array{suggestedaccountingaccountbydefaultfor:''|'eec'|'eecwithoutvatnumber'|'eecwithvat'|'export',suggestedaccountingaccountfor:'deposit'|'eec'|'eecwithoutvatnumber'|'eecwithvat'|'export'|'prodserv'|'thirdparty',suggestedid:?int,code_l:string,code_p:?string,code_t:string}|int<-1,-1> Array of accounting accounts suggested or < 0 if technical error.
* 'suggestedaccountingaccountbydefaultfor'=>Will be used for the label to show on tooltip for account by default on any product
* 'suggestedaccountingaccountfor'=>Is the account suggested for this product
*/
@@ -889,10 +887,10 @@ class AccountingAccount extends CommonObject
// because we are in 2 loop (loop on the line from the sql queries and loop on $links)
// and in case of option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on,
// we will pass here n times for each payment line
// so we have to add $amoutouse only if the line $links[$key] correspond to the payment line we are in used ( socid correspondinf at the payment line $links)
// if FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is off we add $amounttouse
// If no links were found to know the amount on thirdparty, we try to guess it.
// This may happens on bank entries without the links lines to 'company'.
// This may happen on bank entries without the links lines to 'company'.
if(empty($tabtp[$obj->rowid])&&!empty($tabmoreinfo[$obj->rowid]['withdraw'])){// If we don't find 'company' link because it is an old 'withdraw' record
@@ -175,7 +175,7 @@ class Adherent extends CommonObject
public$morphy;
/**
* @var int<0,1> Info can be public
* @var ?int<0,1> Info can be public
*/
public$public;
@@ -283,12 +283,12 @@ class Adherent extends CommonObject
public$last_subscription_date_start;
/**
* @var int|string date
* @var int|string|null date
*/
public$last_subscription_date_end;
/**
* @var int|string date
* @var null|float|string date, null until set
*/
public$last_subscription_amount;
@@ -338,7 +338,7 @@ class Adherent extends CommonObject
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'noteditable' says if field is not editable (1 or 0)
* 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0')
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'default' is a default value for creation (can still be overwritten by the Setup of Default Values if the field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'index' if we want an index in database.
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
@@ -659,7 +659,7 @@ class Adherent extends CommonObject
*/
publicfunctioncreate($user,$notrigger=0)
{
global$conf,$langs,$mysoc;
global$langs,$mysoc;
$error=0;
@@ -824,6 +824,7 @@ class Adherent extends CommonObject
* This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,7 @@ class AdherentType extends CommonObject
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'noteditable' says if field is not editable (1 or 0)
* 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0')
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'default' is a default value for creation (can still be overwritten by the Setup of Default Values if the field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'index' if we want an index in database.
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
@@ -141,7 +141,7 @@ class AdherentType extends CommonObject
public$morphy;
/**
* @var string
* @var ?string
*/
public$duration;
@@ -156,7 +156,7 @@ class AdherentType extends CommonObject
public$duration_unit;
/**
* @var int<0,1> Subscription required (0 or 1)
* @var null|'0'|'1' Subscription required (0 or 1) default '1' in DB, null until value is fetched
*/
public$subscription;
@@ -180,7 +180,7 @@ class AdherentType extends CommonObject
public$note_public;
/**
* @var int<0,1> Can vote
* @var null|int<0,1> Can vote, null until fetched
*/
public$vote;
@@ -516,11 +516,9 @@ class AdherentType extends CommonObject
}
// Actions on extra fields
if(!$error){
$result=$this->insertExtraFields();
if($result<0){
$error++;
}
$result=$this->insertExtraFields();
if($result<0){
$error++;
}
if(!$error&&!$notrigger){
@@ -709,6 +707,81 @@ class AdherentType extends CommonObject
return$amountbytype;
}
/**
* Return the array of morphy per membership type id
*
* @param int $status Filter on status of type
* @return array<int,string> Array of membership type
*/
publicfunctionmorphyByType($status=null)
{
$morphybytype=array();
$sql="SELECT rowid, morphy";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent_type";
$sql.=" WHERE entity IN (".getEntity('member_type').")";
if($status!==null){
$sql.=" AND statut = ".((int)$status);
}
$resql=$this->db->query($sql);
if($resql){
$nump=$this->db->num_rows($resql);
if($nump){
$i=0;
while($i<$nump){
$obj=$this->db->fetch_object($resql);
$morphybytype[$obj->rowid]=$obj->morphy;
$i++;
}
}
}else{
print$this->db->error();
}
return$morphybytype;
}
/**
* Return the array of caneditamount per membership type id
*
* @param int $status Filter on status of type
* @return array<int,string> Array of membership type
*/
publicfunctioncaneditamountByType($status=null)
{
$caneditamountbytype=array();
$sql="SELECT rowid, caneditamount";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent_type";
$sql.=" WHERE entity IN (".getEntity('member_type').")";
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.