* NEW: adding tms and datec to email templates
* Escaping a timestamp string I just generated myself
* switching single and double quotes in escape line for tms and datec to make the build system happy?
* Add an id to the table
* showing better names than tms and datec
* Changing code to label to fix#29116
* using hregis advice to use idate not escape the string with date
* requested changes
* forgot to add my name to editors
* had to make class changes for API to work
* setting datec back to int|string
* removing unused code lines and using idate in the api file
* no tms in create or update, but select. No datec in update
* expanding hurl tests to prevent post with id or tms, put with id or datec
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* FIX member photo with web portal don't need login
* FIX member photo not deleted
* FIX pre-commit
* FIX phan error and uniformize code
* FIX pfffffff pre-commit
* FIX uniformize code
* FIX remove TODO
* FIX change const name
* FIX missing add in ECM during creation
* FIX add user photo in ecm
* FIX phan error
there are a problem on many extrafields list : we can't sort list by decrease and sort from a specific fields since we have add an sql prevention on filter based on : separator (who is used to separate parameters)
@eldy i propose to remplace on extrafields parameters the : in the sql injection prevention by another caracters, by exemple the ; or the § , and replace it after having explode all the parameters
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIX#35017 add locattaxes accounts to accounting defaults
* corr. libellés localtax pour afficher le bon pourcentage
* assurer la cohérence de la structure def_tva
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Make $fields covariant
* Qual: Update BankAccounts class phpDoc ($FIELDS)
# Qual: Update BankAccounts class phpDoc ($FIELDS)
Updated the documentation for the $FIELDS property.
* NEW Parent project column in list of projects
* you can now search on both ref and on label
* adding 2 warning icons when access is denied
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* common delete also files
* common delete also files
* common delete also files
* common delete also files
* common delete also files
* common delete also files
* demande d'ajout timespent
* feat(api): add timespent endpoints for projects and tasks
* add contact to product
* correction prettier
* revert
* feat(api): update timespent endpoints in api_projects and api_tasks
* Update api_projects.class.php
* Remove blank line before docblock in api_tasks.class.php
Removed unnecessary blank line before the docblock for the get contacts method.
* Update api_tasks.class.php
* Clarify return type in api_projects.class.php
Updated return type annotation for contact information array.
* Refine return type in get timespent method
Updated return type annotation for timespent method.
* Return raw contacts instead of cleaned data
* Update api_projects.class.php
* Return contacts array instead of cleaned data
Modified the return value to return the contacts array directly instead of cleaned data.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix#35428 retained_warranty_date_limit not recorded
* Fix#35428 retained_warranty_date_limit not recorded
---------
Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
* Enable create menu for standalone reception
* Enable create menu for standalone reception
* Add Reception date
* Add option to create standalone reception
* fix pre-commit
* NEW Add option to create simple shipment of non origin
* Enable create menu for shipment
* Enable create menu for shipment
* Update sendings.lang
* fix phpstan
* fix syntax
* fix missing line
* Add validation for socid and update note display
* fix project
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW add api List VAT
Enhance getListOfVAT method with SQL filters and pagination.
* Update parameter type for fk_country in docblock
* Ensure integer casting for SQL parameters
Cast variables to integers for SQL query safety.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Implement listTimespent method in api_projects.class.php
Added a new method to retrieve all timespent data with filtering options (with filter, sort, ...)
* Fix comment formatting and improve listTimespent method
* Fix comment formatting and adjust function definition
* Refactor response structure for pagination data
* Initialize obj_ret as an empty array
* Add contact tabs on product
* add contact type for product
* Implement contact management in contact.php
Add contact management functionality for products
* Insert product and service contact types
Added new contact types for products and services.
* Add help URL for product notes
phpstan alert
* Show cron last result and output in info
From now, last output and last result of a cron are only displayed in cron's list, and output isn't very convenient to read
This PR adds last output and last result in cron's info page
* Use dolPrintHTML to output the messages
* QUAL: API contract: RestException update, check if thirdparty exists before creating contract
* using the entity of this contract
* Safer usage of getEntity
* using global ->entity
* testing if create with socid=0 should fail
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* test phpstan
* clean baseline
* test
* test
* Qual: Fix phpstan - type casting in treasuryjournal.php
Added explicit type casting to float calculations.
* Qual: Fix phpstan by testing possibly undefined $def_tva in VAT label generation
* Qual: Add null initialization for static analysis
Initialize $save_link_by_element and $save_element_by_link with null values to satisfy static analysis requirements (phpstan) and avoid possibly undefined notices.
* Qual:(accountingjournal): Ignore line for phpstan
phpstan can not see that $pre_data_info['error'] might be set.
* Qual: Removed redundant tests
Removed some redundant tests (detected by phpstan)
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix incorrect float approximation and string/float mix on equality test
* Replace price function with price2num for comparisons
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Create llx_categorie_project_task table
* Add primary key and indexes to llx_categorie_project_task
* Add project_task type to category class
* Implement setCategories method in task class
Added setCategories method to manage task categories.
* Add llx_categorie_project_task table with constraints
Create llx_categorie_project_task table and add constraints
* Update copyright and remove setCategories method
Updated copyright year for Charlene Benke and removed the setCategories method.
* Remove project_task constant and related mappings
* Modify primary key for llx_categorie_project_task
Updated primary key constraint for llx_categorie_project_task table.
* Rename llx_categorie_project_task.key.sql to llx_categorie_project_task-project.key.sql
* Rename llx_categorie_project_task.sql to llx_categorie_project_task-project.sql
* New prepare for standalone reception
* New prepare for standalone reception
* fix line indentation
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* add conditional supplier price display
conditional display of supplier price information based on advanced user permissions.
* Remove unnecessary blank lines in card.php
# Qual: Fix PhanTypeComparisonFromArray in pertype.php and peruser.php
- Update pertype.php and peruser.php to resolve PhanTypeComparisonFromArray notices.
When an array value is set, it's already an array so comparing to '' is
useless and invalid.
- Update baseline.txt to reflect reduced occurrences of phan issues.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW add possibility to not synchronize thirdparty <--> member
* FIX more simple
* Change getDolGlobalString to getDolGlobalInt
* Change getDolGlobalString to getDolGlobalInt
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix: SQL compatibility, increase size for incoterms/code
- Modify llx_c_incoterms table to increase code field length
- Use `INSERT IGNORE` or `ON CONFLICT` depending on db type
* Simple sql INSERTs instead of INSERT IGNORE
* Qual: Update Incoterms code field in table definition
Updated the llx_c_incoterms table to modify the code field length, and removed modification in the data file.
- Changed reference from 'tva_intra' to 'company_tva_intra' in multiple locations
- Updated baseline.txt to reflect reduced occurrences of PhanTypeArraySuspiciousNull and PhanPluginUndeclaredVariableIsset
* Qual: Fix missing abstract isEnabled for ModeleDon
# Qual: Fix missing abstract isEnabled for ModeleDon
* Qual: Fix donation list fields
# Qual: Fix donation list fields
Fixes PhanTypeMismatchProperty issues in don/list.php by typecasting and
adding d.ref field to query & using it.
* Fix: Fix call to ModeleDon::write_file
- Refactored write_file method in don.class.php to extraneous parameters
- Removed PhanParamTooMany warning from baseline.txt
* Qual: Remove duplicate assignment in list.php
Removed redundant assignment of projectstatic.id.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Fix: Uniform `assign_values` method signatures
`Canvas` is calling `assign_values` with three arguments, so all methods
must have three arguments.
- Modified `actions_adherentcard_common.class.php` and `actions_contactcard_common.class.php` to add object reference parameter
- Updated `actions_adherentcard_default.class.php` and `actions_contactcard_default.class.php` to pass reference parameter to parent class
- Updated Phan baseline to reflect changes in canvas classes
* QUAL: API contract: RestException update, check if thirdparty exists before creating contract
* also checking if socid exists during put
* using the entity of this contract
* also fixing entity during post
* some hurl tests of contract api
* check if contract id is 0, because that is not possible
* check (un)activate permissions and getEntity()
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# FIX: Define keyCodeForEnter before first use (takepos)
Move the code to get the keyCodeForEnter from the bottom of the file closer to the top.
This ensure that the variable is defined before first use.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Fix phan notice with copy of attribute
* Qual: Fix phan notices with cast and updated param definition
* Qual: Fix phan notice with cast
* Qual: Update parameter type hint in utf8_check function
The parameter type hint for the $str parameter in the utf8_check function has been updated to include nullable types (string or int).
* Qual: Update User parameter type to nullable in call_trigger methods
The User parameter in call_trigger methods has been updated to be nullable to accommodate cases where the user object might not be available. This change ensures better flexibility and robustness in the codebase.
* Qual: Update phan baseline
* Qual: phpstan compatible type
* Qual: Add missing type hints for phan
- Add missing type hints for phan
- Fix indentation issues
- Improved consistency in code structure
* Qual: Update field configuration for backward compatibility
Enhanced the field configuration for backward compatibility by adding expected properties to the 'ref' field array.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW Accountancy - Add reconcile on general accounting account - SQL part
* Copyright
* Change term lettering for matching
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix assignment of public property in task class
* Rename 'public' to 'project_public' in task class
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* New module part webportallogin to allow login method definition by external modules in Dolibarr webportal
* Update webportal.main.inc.php
add WEBPORTAL_LOGIN_BY_MODULE to enable disable login by modules
* Fix condition check for web portal login module
---------
Co-authored-by: abb <contact@ab1consult.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW : add global search for resource object
* Update comment for quick search resource field
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Manage STOCK_MUST_BE_ENOUGH_FOR_(PROPAL|ORDER|INVOICE) with new attribute stockable_product
* Use static properties for product types. Controle product type service.
* simpler condition for STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL
leads to fatal errors with admin that is blocked.
Only the "Landing page" feature seems stable, so we keep it and use
another constant for the unstable "Home page" option.
* Add hook manager support for appending custom filter clauses across various SQL queries.
* Add hook manager support for custom SQL filters across multiple modules.
* Remove obsolete test code from api_proposals.class.php
* Remove unnecessary blank lines in card.php
* Remove unnecessary blank lines in card.php
* Remove unused object initialization and 'boxcode' parameter in product class
* Update api_proposals.class.php
* Initialize hooks for order API access
---------
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
* Add accounting export mode for ISTEA
* Add accounting export mode for ISTEA
* add english translation
* Add accounting export mode for ISTEA
* Add accounting export mode for ISTEA
* Add accounting export mode for ISTEA
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix incorrect total discount (missing loop after GROUP BY query)
* Make phpcs happy
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW Accountancy - Add accounting for discounts - Update menu
* NEW Accountancy - Add accounting for discounts - Setup
* NEW Accountancy - Add accounting for discounts - Language
* NEW Accountancy - Add accounting for discounts - Setup
* NEW Accountancy - Add accounting for discounts - Language
* NEW Accountancy - Add accounting for discounts - Function
* FIX CI
* FIX CI
* Fix CI
* FIX CI
* mostly updating fetch with all the fields and adding 2 missing variables
* adding throw RestException numbers, @url and a test for if you try with id=0
* Adding hurl file that do some testing og warehouses API endpoints
* Class for API prevented ever seeing model_pdf in API json
* Check for auth before doing other tests on the request
* New function list Products in warehouse. Work done by defrance, revived by JonB
* API PUT/update now allows for more database fields
* hurl tests for the new list products in warehouse endpoint
* also rejecting warehouse_id in a post
* pre-commit fix api warehouses
* copy paste error from api_usergroup
* Just return the lines, no cleaning needed
* PHAN fixes
* trying to fix PHAN error
* fix api update so it returns error when error, and fix object->update with import_key
* this->db not global db
* Advice from hregis
* Typo this d not dB
* Array of strings
* Changed listProducts in warehouse, uses api_product->get with variables from that
* hurl tests for API warehouses, and the new function get products in warehouse
* some STAN fixes
* more phan fixes
* changes revealed necessary by hurl testing
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* Add color column to llx_usergroup table
* Add color column to llx_usergroup table
* Add color property to user group class
* Add color attribute to user group card
* Add ColorGroup translation to users.lang
* Add ColorGroup translation in French language file
* Fix SQL syntax for adding color column in llx_usergroup
* Fix SQL syntax for adding color column in llx_usergroup
* Fix color column addition in llx_usergroup table
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* donation use captcha setup
* donation use captcha setup
* member use captcha setup
* member use captcha setup
* member use captcha setup
* member use captcha setup
* member use captcha setup
* ticket use captcha setup
* ticket use captcha setup
* clean
* clean
* add fetchAll in abstract class commondict
* add fetchAll in abstract class commondict
* add fetchAll in abstract class commondict
* add fetchAll in abstract class commondict
* add fetchAll in abstract class commondict
* add fetchAll in abstract class commondict
* add fetchAll in abstract class commondict
* clean code
* add hook on printColDescContent
Allow to add more informations on pdf description with hook management.
sample hook use :
public function printColDescContent($parameters, &$object, &$action)
{
$pdf = $parameters['pdf'];
if ($object->name == 'sponge mydiscount') {
//var_dump($parameters, $object, $action); exit;
$pdf->MultiCell(0, 3, "xxxxx", 0, 'L', 0, 1, '', '', true);
return 1;
}
}
* Add hook support to printColDescContent method
* Sécurisation du jeton CSRF pour la suppression de transfert de stock
* Sécuriser les actions de suppression de transfert de stock
* Corriger l'indentation du lien de suppression de ligne
* Supprimer les commentaires français des protections CSRF
* Remove CSRF token check for delete actions
Removed CSRF token validation for delete actions.
* clean phpstan baseline of supplier order class
* clean phpstan baseline of supplier order class
* clean phpstan baseline of supplier order class
* clean phpstan baseline of supplier order class
* clean phpstan baseline of supplier order class
* clean phpstan baseline of supplier order class
This patch fixes task events so that they are correctly displayed in the
task event list and that in the event the Linked Object referes back to
the task.
The issue was that the elementtype value in the database was being
referenced as both 'project_task' and 'task' by different parts of code
Co-authored-by: brad <brad@endurotags.com.au>
* NEW API user/groups/ POST, PUT, DELETE + some hurl tests
* indent fix
* saving note_private (Ryan) during create and detect if we call ourselves?
* fix call with wrong arguments
* Reshow array's in the json output
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* NEW API for getting, adding, deleting and/or modifying email templates
* removing duplicate class formmail which has been moved to a separate file
* hurl file for testing the emailtemplates api
* more comprehensive tests of posting a new email template, all required fields and making sure that ID is rejected
* first GUI test of email templates
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW Accountancy - Add data-centralized in select_account()
* NEW Accountancy - Add script to greyed out subledger_account if general ledger is not centralized
* Fix phan
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* fix
* fix
* fix
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* move sql in stats class
* move sql in stats class
* move sql in stats class
* move sql in stats class
* move sql in stats class
* move sql in stats class
* PHPStan > Update baseline (#35844)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
* move sql in stats class
* move sql in stats class
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
# Qual: Fix misuse of Mo->error
Phan identified that ++ was performed on Mo->error which is a string.
This fixes that by using a local $error variable (as in another
function).
# 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).
* FIX#35766: Update buying price INT Float
loose Decimals
.
* Fix: keep fk_product_fournisseur_price as int; treat buying price as float (no truncation) [#35766]
* Updated per feedback: keep fk_product_fournisseur_price as ?int (rowid) and as float.
Adjusted FactureRec::updateline PHPDoc to ?int and float|'' (model still normalizes via price2num).
Tested on a recurring line: decimals preserved, FK stored as int, CI green. Minor adjustments before v22 backport
* Delete .hooktest
* Delete dev/tools/pre-commit/README.md
* Delete test/phpunit/phpunit.xml
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix#35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)
* Fix#35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)
* Fix#35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)
* Fix#35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)
* Fix#35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)
* Update commonobject.class.php
* Refactor checkActiveProductInLines method
* Fix comment formatting in commonobject.class.php
* Update commonobject.class.php
---------
Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* New fetch member to redirect to membership payment
* add constant
* fix CI
* Update new.php
* Fix formatting of conditional check for member search
---------
Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Add configuration for default timesheet menu
Using PROJECT_OPEN_ALWAYS_ON_TIMESHEET config, you can use variables "perweek" (default), "perday" or "permonth"
* Update eldy.lib.php
* Fix default value for optionTimesheet variable
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* QUAL Accountancy - Use xxx_prepare_head() on accounting transaction
* Fix phpstan
* Fix phpstan
* Fix according to Frederic
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* New : add public and private note on contract list
* Update list.php
* Update list.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* New: Adding linked project to mass mailing card
* modify project on mailing card
* mailing card load fk_project pre commit fix
* only fetch projects with id>0
* fix PHPstan errors regarding mesg
* projects related to mass mailings does not have a soc or socid
* remove last trace of soc and socid
* checking if mesg is set before using it
* just loading all projects, because maybe you have a mailing list with workers for a thirdparty? think company party
* showing the project during edit
* given that action is already something else, it will never not be classify
* making PHPstan happy
* Adding project column to list of mass mailings. Search, order and click able
* pasted the wrong place
* no need to check for filtermail
* x now also clears project search
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Modify getListOfContactTypes for expedition type
Adjust the contact type based on shipping settings.
* Update api_setup.class.php
* Update api_setup.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* clean code
* no element line
* no element line
* no element line
* no element line
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Mass mailing list: make title a clickable link
* Update list.php
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix: 3 modules where list.php redirected to /mymodule/myobject_card.php
* remove an commented segment of the code which did the same kind of dolbuildpath to /mymodule/myobject_card.php which is obviously wrong, since it was a comment anyway, no risk
* remove an commented line of the code which did the same kind of dolbuildpath to /mymodule/myobject_card.php which is obviously wrong, since it was a comment anyway, no risk
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* Reviving some old PR with API get, activate and disable modules
* expanding hurl test for setup wih some module tests
* return array, not object
* fix PHPStan on getmodules
* typecasting module functions to string
* instiating class DolibarrModule into an object so we can call functions on it
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* Fix: prevent "Cannot access offset of type string on string" in param_ihm.php
- Added validation to handle cases where $tmparray items are strings instead of arrays
- Normalized entries to ensure each item has a 'label' and 'picto' key
- Defaulted 'picto' to "generic" when missing
- Prevents fatal error under PHP 8 when accessing $val['label'] or $val['picto']
* fix codesniffer issue
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Add missing translation
* fix translation for non latin languages and add space
* Add missing translation
* Add translations
DebitShort and CreditShort
* fix space
* fix translation for non latin languages
* fix translation for non latin languages
* fix trans
* fix missing separator line
* Add missing separator line
* fix translation for non latin languages
* Add missing translation
* Update pdf_balance.modules.php
* check if translation for AccountancyGroupXXX exists
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW API for handling mailing targets
* fix PHP Codesniffer
* adding return values to make phpstan happy
* Update function actually updates
* defining mailing_target public function create
* using a different language translation
* mailing_target - phpstan fixes
* mailing target - no check properties body
* mailing target int typecast fk_mailing
* mailing target - just 1 parameter
* mailing_target phpstan fixes
* mailing_target setting labelStatus
* mailing target class public function delete
* reveal the list of status name for the Mass mailing object in the API
* set tms to now when it is set to draft
* functions to set the mailing target status
* hurl testing api mailings
* hurl test - exit run script at first error
* hurl test mailings - should cover all endpoints
* using self:: in front of the CONST
* Trying to find out which line evaluates to noting
* API mailings can now get the targets of a mailing
* Protected method name "Mailings::_cleanTargetDatas" must not be prefixed with an underscore
* give me fk_project
* API endpoints for: Get all targets of a mass mailing + Get information about a specific target id
* API endpoint to update a mailing target
* telling pre-commit check to ignore, just like done in the function I copied
* be more explicit about for GUI tests we need username and password
* Prevent updating fk_mailing value
* API endpoint deleteTarget
* post to create a mailing target does work, but need slight more testing after work
* correct indent
* fixing some build errors
* More comprehensive hurl test of creation of a target
* adding status_dest to mailing targets json
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
# Qual: Update baseline, fix new notice.
Fix small new notice and update baseline with regards to other fixes.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Add support for 'societe' modules on api upload document
* Add ticket module handling in API documents class
* Update api_documents.class.php
* Update api_documents.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* add getContacts method on invoice api
Add the getContacts method to fetch both external and internal contacts for a given invoice.
* Change return type from Object to array in API docs
Updated return type in the documentation for the get contacts method.
* Update api_invoices.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* API get documents dont support "projects_tasks"
Fixes#35650
* fix: add missing whitespace formatting in api_documents class
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 🐛 Use reception email templates for receptions
* ✨ LEFT JOIN reception with element_elemnt to allow filtering by supplier_order
* 📝 Document supplier order filter for receptions endpoint
* 🐛 Check for presence of el filter using regex to avoid duplicate lines
* Update api_receptions.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* fix mo production with dlc dluo
* fix mo production with dlc dluo
* fix mo production with dlc dluo
* fix mo production with dlc dluo
* fix mo production with dlc dluo
* fix mo production with dlc dluo
* add dol_buildurl with examples of use
* add dol_buildurl with examples of use
* add dol_buildurl with examples of use
* add dol_buildurl with examples of use
* wip
* wip
* add more example
* add more example
* add more example
* add more example
* add more example
* add more example
* add more example
* add example
* add example
* add example
* add example
* add example
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* stay in the same area even we are on other area in other tab
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* add example
* add example
* add example
* add example
* add example
* add example
add example
add example
add example
add example
* add example
* add example
add example
add example
add example
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* clean code
* fix
* wip
* wip
* clean code
Fixed URL issue: a duplicated '?' character caused incorrect query parameters when creating a new discount.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Adding hurl tests to Dolibarr
* modifying run.sh to get it past commit checks
* change the APIHEADER to be read from the environment
* spell fix
* test to see if build system will accept this file
* deleting script method that doesn't work
* beginning to make hurl tests accept environment variables for the location
* Add GUI login to hurl tests
* Fix CI
* clean code (#35640)
* 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
* Fix warning
* Clean code
* PHPStan > Update baseline (#35644)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
* NEW Can drag and drop in BOM card
* WIP Upload files
* WIP Upload files
* Adding hurl tests to Dolibarr
* using hostnport variable for all remaining tests
* Add some asserts and gui login tests
* double quotes around shell variables
* adding -r to read
* expand mass mail gui test with all 6 columns in the table
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: ldestailleur <eldy@destailleur.fr>
Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
* Adding hurl tests to Dolibarr
* modifying run.sh to get it past commit checks
* change the APIHEADER to be read from the environment
* spell fix
* test to see if build system will accept this file
* deleting script method that doesn't work
* beginning to make hurl tests accept environment variables for the location
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 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
# Go on Dolibarr Organization - Settings - Developer settings - GitHub App (https://github.com/organizations/Dolibarr/settings/apps)
# Create an App: Enter a name + In Home page URL use https://github.com/Dolibarr/dolibarr + Disable webhook
# Set Permissions (see other app for list of permissions)
# Click on generate the private keys
# Click on Install application - choose the repository of the bot
# Go on Organisation - Secret and variables and create a secret PR_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
# Go on Organisation - Secret and variables and create a variable PR_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
#
name: Set the tag with devcamp label during the session of a devcamp
* 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.
* Function img_pdf() has been removed. Replace it with img_picto('', 'pdf.png') if you were using it.
* The method run_trigger() was deprecated 10+ years ago in favor of runTrigger(). It has been removed. Change your trigger file if you still use it.
* Property ->picto of module descriptors must contains the image extension if it is not a font awesome tag. Example: $this->picto="mymoduleimg.png";
* Stock movement API GET method output variable names have been harmonized with POST input parameter names
***** ChangeLog for 22.0.2 compared to 22.0.1 *****
@@ -63,6 +96,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 +216,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 +243,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 +291,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"Failed to get the last commit ID. Are you on the branch for the release (branch name '.$branchname.') ?\n";
print"Failed to get the last commit ID (are you on the branch for the release branch name ".$branchname." ?). We will use an empty value for gitcommit.\n";
if($MINOReq''){die"Error can't detect version into ".$SOURCE."/htdocs/filefunc.inc.php";}
if($MINOReq''){die"Error can't detect version into ".$SOURCE."/htdocs/version.inc.php";}
# Set vars for packaging
$FILENAME="$PROJECT";
@@ -446,6 +446,15 @@ if ($nboftargetok) {
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,18 +108,18 @@ 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.
- Update version/info in ChangeLog, for this:
To generate a changelog of a **major new version** x.0.0 (from a repo on branch develop), you can do
To generate a changelog of a **major new version** x.0.0 (from a repo on branch develop or x.y):
```
cd ~/git/dolibarr
git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/changelogtocopy
```
To generate a changelog of a **intermediate new version** x.y.0 (from a repo on branch x.y), you can do
To generate a changelog of a **intermediate new version** x.y.0 (from a repo on branch x.y);
$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
$object->next_prev_filter='1=0';// Add a test always false to disable navigation into the dol_banner_tab. In tmp mode, we just want to create/edit lines of bank transaction.
$object->next_prev_filter='1=0';// Add a test always false to disable navigation into the dol_banner_tab. In tmp mode, we just want to create/edit lines of bank transaction.
$tab[]=array_key_exists($line->piece_num,$tiers)?$tiers[$line->piece_num]:'';// colonne 4 : nom tiers ISTEA
$tab[]=length_accountg(($line->subledger_account&&(substr($line->subledger_account,0,2)==substr($line->numero_compte,0,2)))?$line->subledger_account:$line->numero_compte);// colonne 5 : numero de compte ISTEA
$tab[]=length_accountg($line->subledger_account?$line->subledger_account:$line->numero_compte);// colonne 6 : numero de compte
$tab[]=length_accountg($line->subledger_account?$line->numero_compte:'');// G // colonne 7 : numero de compte principal (divers paiement ou 40100000 ou 41100000)
$tab[]=($line->doc_type=='bank')?$label_operation:($line->subledger_account?$line->subledger_label:$line->label_compte);// colonne 8 : label de l'operation ISTEA
$tab[]=$label_operation;// colonne 9 : label de l'operation (semble non prise en compte par ISTEA)
@@ -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
$sql.=" WHERE f.entity IN (".getEntity('invoice',0).')';// We don't share object for accountancy, we use source object sharing
$sql.=" AND f.fk_statut > 0";
if(getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')){// Non common setup
$sql.=" AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
}else{
$sql.=" AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
}
$sql.=" AND f.close_code = 'discount_vat'";
if($date_start&&$date_end){
$sql.=" AND f.datef >= '".$this->db->idate($date_start)."' AND f.datef <= '".$this->db->idate($date_end)."'";
$sql.=" AND ff.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")";
}else{
$sql.=" AND ff.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")";
}
$sql.=" AND ff.close_code = 'discount_vat'";
if($date_start&&$date_end){
$sql.=" AND ff.datef >= '".$this->db->idate($date_start)."' AND ff.datef <= '".$this->db->idate($date_end)."'";
// 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
* Copyright (C) 2025 Vincent de Grandporé <vincent@de-grandpre.quebec>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -139,7 +140,7 @@ if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))
}
$sql="SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle as label, f.ref_supplier, f.date_lim_reglement as dlr, f.close_code, f.vat_reverse_charge,";
$sql.=" fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code, fd.info_bits,";
$sql.=" fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.localtax1_tx, fd.localtax2_tx, fd.total_ttc, fd.vat_src_code, fd.info_bits,";
$sql.=" p.default_vat_code AS product_buy_default_vat_code, p.tva_tx as product_buy_vat, p.localtax1_tx as product_buy_localvat1, p.localtax2_tx as product_buy_localvat2,";
$sql.=" co.code as country_code, co.label as country_label,";
$sql.=" s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.fk_pays,";
$noTaxDispatchingKeepWithLines=getDolGlobalInt('ACCOUNTING_PURCHASES_DO_NOT_DISPATCH_TAXES');//If enabled, Tax will NOT get split off from the base entry and credited to a separate tax account (good for non-VAT countries like USA)
$country_code_in_EEC=getCountriesInEEC();// This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
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.