Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_stockstransfers
This commit is contained in:
commit
641002ae96
118
ChangeLog
118
ChangeLog
@ -11,6 +11,7 @@ For users:
|
||||
NEW: Online proposal signature
|
||||
NEW: Can define some max limit on expense report (per period, per type or expense, ...)
|
||||
NEW: Allow the use of __NEWREF__ to get for example the new reference a draft order will get after validation.
|
||||
NEW: Add option to disable globaly some notifications emails.
|
||||
NEW: #18326 Workflow: Close order on shipment closing.
|
||||
NEW: #18401 Add __NEWREF__ subtitute to get new object reference.
|
||||
NEW: #18403 Add __URL_SHIPMENT__ substitute to get the URL of a shipment
|
||||
@ -142,6 +143,123 @@ Following changes may create regressions for some external modules, but were nec
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 14.0.4 compared to 14.0.3 *****
|
||||
|
||||
FIX: $totalarray is overwritten, totals were lost
|
||||
FIX: 13.0 - due to a typo in the 'mode' parameter, the "first name" column of the list of members displays the full name
|
||||
FIX: 13.0: end date required to edit a ticket message
|
||||
FIX: 13.0 feedback of PR #18993: make ticket messages punctual events with attr percentage = -1
|
||||
FIX: 13.0 PR #18993: add comment on modified part
|
||||
FIX: 13.0: sometimes firstname was mistyped as fistname
|
||||
FIX: 14.0 - civility field of private third party creation form has inadequate width
|
||||
FIX: 14.0 - civility field width inadequate due to select2 calculating the width while the field has no width (display: none)
|
||||
FIX: 14.0 - due to a typo in the 'mode' parameter, the "first name" co…
|
||||
FIX: #18634 : Problem of virtual stock with reception module enabled
|
||||
FIX: #18695 Added ref_ext to supplier invoice
|
||||
FIX: #18698 Supplier invoice list - "alert" checkbox not working
|
||||
FIX: #18735
|
||||
FIX: #18767 : Adherent delete
|
||||
FIX: #18797
|
||||
FIX: #18854
|
||||
FIX: #18875 in v14
|
||||
FIX: #18910
|
||||
FIX: #18910 : MRP List SQL query syntax error with more than one extrafileds.
|
||||
FIX: #18912 Accountancy - SQL error when custom group is added without country defined
|
||||
FIX: #18934 on-registration in the extrafieldsline database for deliveries
|
||||
FIX: #18968
|
||||
FIX: #19008
|
||||
FIX: #19014 - the properties of some fields are not updated when you submit the form
|
||||
FIX: #19210
|
||||
FIX: #19214 : PostgreSQL error on admin/limits.php
|
||||
FIX: #19241 Project - Fix display salary in overview
|
||||
FIX: #19305
|
||||
FIX: 2 columns for total labels
|
||||
FIX: Accountancy - Format Quadra export - Missing line type C to create automaticly a subledger account with label
|
||||
FIX: Accountancy - If deposit invoice is used, force binding in deposit accounting account to solve transaction
|
||||
FIX: Accountancy - Missing specific filename for export on format FEC2, Ciel & repare it
|
||||
FIX: Accountancy - Option of export popup are inverted
|
||||
FIX: Accountancy - PHP8
|
||||
FIX: Accountancy - Product admin - SQL error when we affect accounting account with product_perentity activated
|
||||
FIX: Accountancy simplified - Salaries are not present in report
|
||||
FIX: Accountancy - Some correction on export name
|
||||
FIX: Accountancy - Trunc code_journal to 2 in format XIMPORT (Ciel, Sage50)
|
||||
FIX: add warehouse in projects' overview count
|
||||
FIX: also on customer index for automatic binding
|
||||
FIX: Attachment of pdf into shipment when sending email
|
||||
FIX: autocalculation of the supplier price in main currency.
|
||||
FIX: avoid warning if $categories is an id
|
||||
FIX: bad sign of amount stored for multicurrency columns on credit notes
|
||||
FIX: Bad use of a forced contact of another company on PDF/ODT documents
|
||||
FIX: Bad use of dol_concatdesc()
|
||||
FIX: Button text on proposal card for create a invoice
|
||||
FIX: calculateCosts of BOM must not be included into fetch
|
||||
FIX: calculation of balance in conciliation page on desc sorting.
|
||||
FIX: card.php
|
||||
FIX: Change date format of the inventorycode to be equal as mass stock transfert
|
||||
FIX: check if greater 0
|
||||
FIX: close cash with some terminals in TakePOS
|
||||
FIX: compatibility with Multicompany
|
||||
FIX: consistent UX when calling a tab from the invoice card with empty ref/id
|
||||
FIX: default language defined for IN country
|
||||
FIX: Expense report - In edit mode, field qty doesn't accept decimal unlike the create mode
|
||||
FIX: fetch of product with modulebuilder load too much data
|
||||
FIX: filter for export of accounting documents
|
||||
FIX: Filter on categories
|
||||
FIX: generate documents with PDF options
|
||||
FIX: indentation
|
||||
FIX: init hookmanager after loading $conf values
|
||||
FIX: invoice: inpossible to create an invoice because of very bad check + warnings when trying to print tabs for invoice with no ID
|
||||
FIX: legal issue on expense report pdf (must also show price without tax)
|
||||
FIX: list of categories in stats of supplier invoices
|
||||
FIX: load tranlate array after setting lang
|
||||
FIX: lost superadmin grade after edit user card
|
||||
FIX: missing filter status=1 on rss feeds
|
||||
FIX: missing permission check reported by me@lainwir3d.net on product api
|
||||
FIX: missing return status
|
||||
FIX: missing sql filter by entity
|
||||
FIX: move fetch_optionnal into $ac_static->fetch()
|
||||
FIX: only a superadmin can modify entity
|
||||
FIX: only ones value is return for dictionaries
|
||||
FIX: optional visibility on create card
|
||||
FIX: payment style and html5 tags
|
||||
FIX: payment using wrong type in takepos when too many payment mode
|
||||
FIX: PR#18931 Remove useless explicit call to dol_shutdown
|
||||
FIX: Product accountancy affectation with product_perentity activated (PR #18620)
|
||||
FIX: products/services card: hidden extrafields were overridden
|
||||
FIX: project task list: extrafields could not be displayed
|
||||
FIX: Propal list - Problem of pagination on date
|
||||
FIX: reload user lang
|
||||
FIX: Remove not complete order from the virtual stock
|
||||
FIX: Replenish: SQL error when no warehouse has been created + Warning when there are no warehouses
|
||||
FIX: resource list : Use standard code to handle list filters
|
||||
FIX: restrictedArea for payment delete
|
||||
FIX: Ret PR
|
||||
FIX: second approval back in stable feature as is the setting for minimum amount (last part from PR#14286)
|
||||
FIX: selected lines on supplier invoice create
|
||||
FIX: Selection of type "people" for membership must hide the company
|
||||
FIX: select list of orders not complete when field type of company is on
|
||||
FIX: show end hours in events linked to objects
|
||||
FIX: support of localtax on expense report
|
||||
FIX: task time: can't filter by user with pgsql + show error message
|
||||
FIX: task time: keep on using natural_search
|
||||
FIX: tcpdf vulnerability to roman numeral bomb, cf. tecnickom/TCPDF issue #315
|
||||
FIX: Test when date of invoie is in future (pb with TZ and offset)
|
||||
FIX: Ticket - Card - Wrong font awesome library
|
||||
FIX: Ticket - Duplicate field project when we create ticket from project
|
||||
FIX: translation into email for member at membership validation.
|
||||
FIX: Travis Sanitize SQL
|
||||
FIX: unprivileged user can see task associated with a not allowed project
|
||||
FIX: URGENT: impossible to create an invoice
|
||||
FIX: Use of accent into filename of GED
|
||||
FIX: user date timezone offset
|
||||
FIX: User salary card - translation problem
|
||||
FIX: user without permission can set ticket subject
|
||||
FIX: We need a default price base type in variant creation case with multiprices when parent has been created with only one level price
|
||||
FIX: wrong array key value
|
||||
FIX: wrong check
|
||||
FIX: wrong position of error message
|
||||
Sync transifex.
|
||||
|
||||
***** ChangeLog for 14.0.3 compared to 14.0.2 *****
|
||||
|
||||
FIX: #18698 Supplier invoice list - "alert" checkbox not working
|
||||
|
||||
16
README-FR.md
16
README-FR.md
@ -8,12 +8,10 @@ Il est simple d'utilisation et modulaire, vous permettant de n'activez que les f
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENCE
|
||||
|
||||
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
|
||||
|
||||
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
### Configuration simple
|
||||
@ -54,7 +52,6 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
|
||||
|
||||
- Suivez les instructions de l'installateur
|
||||
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
@ -65,14 +62,12 @@ Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
|
||||
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
*Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
|
||||
Note: *Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
### Modules principaux (tous optionnels)
|
||||
@ -122,7 +117,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur [https://wiki.dolibarr.org/index.php/Prérequis](https://wiki.dolibarr.org/index.php/Prérequis)).
|
||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
@ -142,7 +137,6 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
@ -152,18 +146,15 @@ Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUER
|
||||
|
||||
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
## CREDITS
|
||||
|
||||
@ -171,7 +162,6 @@ Dolibarr est le résultat du travail de nombreux contributeurs depuis des année
|
||||
|
||||
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
|
||||
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
123
README.md
123
README.md
@ -43,7 +43,7 @@ You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL)
|
||||
|
||||
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
#### Generic install steps:
|
||||
#### Generic install steps
|
||||
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
@ -71,86 +71,87 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
|
||||
### Saas/Cloud setup
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See https://saas.dolibarr.org). However, this third solution is not free.
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
|
||||
|
||||
## UPGRADING
|
||||
|
||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
|
||||
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main application/modules (all optional)
|
||||
|
||||
- Third-Parties Management: Customers, Prospects (Leads) and/or Suppliers + Contacts
|
||||
- Members/Membership/Foundation management
|
||||
- Third-Parties Management: Customers, Prospects (Leads) and/or Suppliers + Contacts
|
||||
- Members/Membership/Foundation management
|
||||
|
||||
Product Management
|
||||
- Products and/or Services catalog
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
Product Management
|
||||
|
||||
- Products and/or Services catalog
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders
|
||||
- Manufacturing Orders
|
||||
|
||||
Customer/Sales Management
|
||||
- Customers/Prospects + Contacts management
|
||||
- Opportunities or Leads management
|
||||
- Commercial proposals management
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
Customer/Sales Management
|
||||
|
||||
Supplier/Purchase Management
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Receiption
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
- Customers/Prospects + Contacts management
|
||||
- Opportunities or Leads management
|
||||
- Commercial proposals management
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
|
||||
Finance / Accounting
|
||||
- Invoices / Payments
|
||||
- Bank accounts management
|
||||
- Direct debit orders management (European SEPA)
|
||||
- Accounting management
|
||||
- Donations management
|
||||
- Loan management
|
||||
- Margins
|
||||
- Reports
|
||||
Supplier/Purchase Management
|
||||
|
||||
Collaboration
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Ticket System
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Receiption
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
Finance / Accounting
|
||||
|
||||
- Invoices / Payments
|
||||
- Bank accounts management
|
||||
- Direct debit orders management (European SEPA)
|
||||
- Accounting management
|
||||
- Donations management
|
||||
- Loan management
|
||||
- Margins
|
||||
- Reports
|
||||
|
||||
Collaboration
|
||||
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Ticket System
|
||||
- Surveys
|
||||
|
||||
HR
|
||||
- Employee's leave requests management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Timesheets
|
||||
HR
|
||||
|
||||
- Employee's leave requests management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Timesheets
|
||||
|
||||
### Other application/modules
|
||||
|
||||
@ -171,7 +172,6 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
(around 100 modules available by default, 1000+ on the addon market place)
|
||||
|
||||
|
||||
### Other general features
|
||||
|
||||
- Localization in most major languages
|
||||
@ -190,27 +190,24 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Compatible with [European directives] (https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
|
||||
|
||||
### System Environment / Requirements
|
||||
|
||||
- PHP
|
||||
- MariaDB, MySQL or PostgreSQL
|
||||
- MariaDB, MySQL or PostgreSQL
|
||||
- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
|
||||
|
||||
See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)
|
||||
|
||||
|
||||
### Extending
|
||||
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
@ -220,21 +217,18 @@ These are features that Dolibarr does **not** yet fully support:
|
||||
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A view on Contributors:
|
||||
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
## CREDITS
|
||||
|
||||
@ -242,7 +236,6 @@ Dolibarr is the work of many contributors over the years and uses some fine PHP
|
||||
|
||||
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
@ -253,8 +246,6 @@ Follow Dolibarr project on:
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
|
||||
12
SECURITY.md
12
SECURITY.md
@ -12,8 +12,7 @@ This file contains some policies about the security reports on Dolibarr ERP CRM
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, please use GitHub security advisory at https://github.com/Dolibarr/dolibarr/security/advisories/new (if you have permissions) or alternatively send an email to security@dolibarr.org (for everybody)
|
||||
|
||||
To report a vulnerability, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions) or alternatively send an email to security@dolibarr.org (for everybody)
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
@ -23,7 +22,7 @@ If you believe you've found a security bug in our service, we are happy to work
|
||||
|
||||
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: https://www.dolibarr.org/download) to get access on every side of application.
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
|
||||
### User Agent
|
||||
|
||||
@ -31,8 +30,7 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
|
||||
|
||||
### Account access
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from https://www.dolibarr.org/download
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
@ -46,7 +44,6 @@ You must avoid tests that could cause degradation or interruption of our service
|
||||
|
||||
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
|
||||
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
@ -64,7 +61,6 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us
|
||||
|
||||
Scope is the web application (back office) and the APIs.
|
||||
|
||||
|
||||
## Qualifying vulnerabilities for reporting
|
||||
|
||||
* Remote code execution (RCE)
|
||||
@ -81,7 +77,6 @@ Scope is the web application (back office) and the APIs.
|
||||
* Software version disclosure (for non admin users only)
|
||||
* Stack traces or path disclosure (for non admin users only)
|
||||
|
||||
|
||||
## Non-qualifying vulnerabilities for reporting
|
||||
|
||||
* "Self" XSS
|
||||
@ -99,4 +94,3 @@ Scope is the web application (back office) and the APIs.
|
||||
* Software version or private IP disclosure when logged user is admin
|
||||
* Stack traces or path disclosure when logged user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
|
||||
|
||||
|
||||
@ -168,6 +168,18 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
- protected $default_monospaced_font = 'courier';
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning
|
||||
of the function, replace:
|
||||
|
||||
$roman = '';
|
||||
|
||||
with:
|
||||
|
||||
$roman = '';
|
||||
if ($number >= 4000) {
|
||||
// do not represent numbers above 4000 in Roman numerals
|
||||
return strval($number);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
BIN
dev/resources/iso-normes/14-pourquoi le format PDF A.pdf
Normal file
BIN
dev/resources/iso-normes/14-pourquoi le format PDF A.pdf
Normal file
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@ -495,7 +495,7 @@ if ($id) {
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$class.'">';
|
||||
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
print '<a href="'.$tabhelp[$id][$value].'">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
} elseif (!empty($tabhelp[$id][$value])) {
|
||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||
} else {
|
||||
|
||||
@ -520,7 +520,7 @@ if ($tabname[$id]) {
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$class.'">';
|
||||
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
print '<a href="'.$tabhelp[$id][$value].'">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
} elseif (!empty($tabhelp[$id][$value])) {
|
||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||
} else {
|
||||
|
||||
@ -52,6 +52,7 @@ $list_account_main = array(
|
||||
);
|
||||
|
||||
$list_account = array();
|
||||
|
||||
$list_account[] = '---Product---';
|
||||
$list_account[] = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT';
|
||||
if ($mysoc->isInEEC()) {
|
||||
@ -63,6 +64,7 @@ if ($mysoc->isInEEC()) {
|
||||
$list_account[] = 'ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT';
|
||||
}
|
||||
$list_account[] = 'ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT';
|
||||
|
||||
$list_account[] = '---Service---';
|
||||
$list_account[] = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT';
|
||||
if ($mysoc->isInEEC()) {
|
||||
@ -74,11 +76,11 @@ if ($mysoc->isInEEC()) {
|
||||
$list_account[] = 'ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT';
|
||||
}
|
||||
$list_account[] = 'ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT';
|
||||
|
||||
$list_account[] = '---Others---';
|
||||
$list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT';
|
||||
$list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT';
|
||||
$list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT';
|
||||
$list_account[] = 'ACCOUNTING_ACCOUNT_SUSPENSE';
|
||||
if ($conf->banque->enabled) {
|
||||
$list_account[] = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH';
|
||||
}
|
||||
@ -96,6 +98,7 @@ if ($conf->loan->enabled) {
|
||||
if ($conf->societe->enabled) {
|
||||
$list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT';
|
||||
}
|
||||
$list_account[] = 'ACCOUNTING_ACCOUNT_SUSPENSE';
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -154,6 +157,7 @@ print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
// Define main accounts for thirdparty
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'</td><td></td></tr>';
|
||||
|
||||
@ -164,17 +168,29 @@ foreach ($list_account_main as $key) {
|
||||
$keydesc = $key.'_Desc';
|
||||
|
||||
$htmltext = $langs->trans($keydesc);
|
||||
print '<td class="fieldrequired" width="50%">';
|
||||
print '<td class="fieldrequired">';
|
||||
if ($key == 'ACCOUNTING_ACCOUNT_CUSTOMER') {
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||
} elseif ($key == 'ACCOUNTING_ACCOUNT_SUPPLIER') {
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||
} else {
|
||||
print img_picto('', 'user', 'class="pictofixedwidth"');
|
||||
}
|
||||
print $form->textwithpicto($label, $htmltext);
|
||||
print '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force class=right, or it align also the content of the select box
|
||||
print '<td class="right">'; // Do not force class=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 'accountsmain');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
print "</div>\n";
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
foreach ($list_account as $key) {
|
||||
$reg = array();
|
||||
if (preg_match('/---(.*)---/', $key, $reg)) {
|
||||
@ -183,9 +199,32 @@ foreach ($list_account as $key) {
|
||||
print '<tr class="oddeven value">';
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">'.$label.'</td>';
|
||||
print '<td>';
|
||||
if (preg_match('/^ACCOUNTING_PRODUCT/', $key)) {
|
||||
print img_picto('', 'product', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ACCOUNTING_SERVICE/', $key)) {
|
||||
print img_picto('', 'service', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ACCOUNTING_VAT_PAY_ACCOUNT/', $key)) {
|
||||
print img_picto('', 'payment_vat', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ACCOUNTING_VAT/', $key)) {
|
||||
print img_picto('', 'vat', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ACCOUNTING_ACCOUNT_CUSTOMER/', $key)) {
|
||||
print img_picto('', 'bill', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^LOAN_ACCOUNTING_ACCOUNT/', $key)) {
|
||||
print img_picto('', 'loan', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^DONATION_ACCOUNTING/', $key)) {
|
||||
print img_picto('', 'donation', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ADHERENT_SUBSCRIPTION/', $key)) {
|
||||
print img_picto('', 'member', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ACCOUNTING_ACCOUNT_TRANSFER/', $key)) {
|
||||
print img_picto('', 'bank_account', 'class="pictofixedwidth"');
|
||||
} elseif (preg_match('/^ACCOUNTING_ACCOUNT_SUSPENSE/', $key)) {
|
||||
print img_picto('', 'question', 'class="pictofixedwidth"');
|
||||
}
|
||||
print $label;
|
||||
print '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force class=right, or it align also the content of the select box
|
||||
print '<td class="right">'; // Do not force class=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 'accounts');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -194,7 +233,7 @@ foreach ($list_account as $key) {
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
print '<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
|
||||
|
||||
@ -453,7 +453,7 @@ if ($id) {
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$class.'">';
|
||||
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
print '<a href="'.$tabhelp[$id][$value].'">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
} elseif (!empty($tabhelp[$id][$value])) {
|
||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||
} else {
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
@ -47,9 +48,12 @@ if (empty($user->rights->accounting->bind->write)) {
|
||||
|
||||
// search & action GETPOST
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$codeventil_buy = GETPOST('codeventil_buy', 'array');
|
||||
$codeventil_sell = GETPOST('codeventil_sell', 'array');
|
||||
$chk_prod = GETPOST('chk_prod', 'array');
|
||||
$default_account = GETPOST('default_account', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$account_number_buy = GETPOST('account_number_buy');
|
||||
$account_number_sell = GETPOST('account_number_sell');
|
||||
$changeaccount = GETPOST('changeaccount', 'array');
|
||||
@ -68,7 +72,6 @@ $search_onsell = GETPOST('search_onsell', 'alpha');
|
||||
$search_onpurchase = GETPOST('search_onpurchase', 'alpha');
|
||||
|
||||
$accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
||||
$btn_changeaccount = GETPOST('changeaccount', 'alpha');
|
||||
$btn_changetype = GETPOST('changetype', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
@ -165,7 +168,7 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($btn_changeaccount)) {
|
||||
if (!empty($chk_prod) && $massaction === 'changeaccount') {
|
||||
//$msg = '<div><span class="accountingprocessing">' . $langs->trans("Processing") . '...</span></div>';
|
||||
if (!empty($chk_prod) && in_array($accounting_product_mode, $accounting_product_modes)) {
|
||||
$accounting = new AccountingAccount($db);
|
||||
@ -199,7 +202,7 @@ if ($action == 'update') {
|
||||
$nb_exists = $db->num_rows($resql_exists);
|
||||
if ($nb_exists <= 0) {
|
||||
// insert
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, '" . $db->escape($accountancy_field_name) . "')";
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, " . $db->escape($accountancy_field_name) . ")";
|
||||
$sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')";
|
||||
} else {
|
||||
$obj_exists = $db->fetch_object($resql_exists);
|
||||
@ -436,11 +439,27 @@ if ($result) {
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
if ($massaction !== 'set_default_account') {
|
||||
$arrayofmassactions = array(
|
||||
'changeaccount'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Save")
|
||||
,'set_default_account'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount")
|
||||
);
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions, 1);
|
||||
}
|
||||
|
||||
$buttonsave = '<input type="submit" class="button button-save" id="changeaccount" name="changeaccount" value="'.$langs->trans("Save").'">';
|
||||
//print '<br><div class="center">'.$buttonsave.'</div>';
|
||||
|
||||
$texte = $langs->trans("ListOfProductsServices");
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1);
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1);
|
||||
|
||||
if ($massaction == 'set_default_account') {
|
||||
$formquestion[]=array('type' => 'other',
|
||||
'name' => 'set_default_account',
|
||||
'label' => $langs->trans("AccountancyCode"),
|
||||
'value' => $form->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'));
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmPreselectAccount"), $langs->trans("ConfirmPreselectAccountQuestion", count($chk_prod)), "confirm_set_default_account", $formquestion, 1, 0, 200, 500, 1);
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
|
||||
@ -645,7 +664,7 @@ if ($result) {
|
||||
if (!empty($obj->aaid)) {
|
||||
$defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||
}
|
||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print $form->select_account(($default_account > 0 && $confirm === 'yes' && in_array($product_static->id, $chk_prod)) ? $default_account : $defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print '</td>';
|
||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
|
||||
// Accounting account buy intra (In EEC)
|
||||
@ -659,7 +678,7 @@ if ($result) {
|
||||
if (!empty($obj->aaid)) {
|
||||
$defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||
}
|
||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print $form->select_account(($default_account > 0 && $confirm === 'yes' && in_array($product_static->id, $chk_prod)) ? $default_account : $defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print '</td>';
|
||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
|
||||
// Accounting account buy export (Out of EEC)
|
||||
@ -673,7 +692,7 @@ if ($result) {
|
||||
if (!empty($obj->aaid)) {
|
||||
$defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||
}
|
||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print $form->select_account(($default_account > 0 && $confirm === 'yes' && in_array($product_static->id, $chk_prod)) ? $default_account : $defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print '</td>';
|
||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
|
||||
// Accounting account sell
|
||||
@ -687,7 +706,7 @@ if ($result) {
|
||||
if (!empty($obj->aaid)) {
|
||||
$defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||
}
|
||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print $form->select_account(($default_account > 0 && $confirm === 'yes' && in_array($product_static->id, $chk_prod)) ? $default_account : $defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print '</td>';
|
||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
|
||||
// Accounting account sell intra (In EEC)
|
||||
@ -701,7 +720,7 @@ if ($result) {
|
||||
if (!empty($obj->aaid)) {
|
||||
$defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||
}
|
||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print $form->select_account(($default_account > 0 && $confirm === 'yes' && in_array($product_static->id, $chk_prod)) ? $default_account : $defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print '</td>';
|
||||
} else {
|
||||
// Accounting account sell export (Out of EEC)
|
||||
@ -714,13 +733,20 @@ if ($result) {
|
||||
if (!empty($obj->aaid)) {
|
||||
$defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||
}
|
||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print $form->select_account(($default_account > 0 && $confirm === 'yes' && in_array($product_static->id, $chk_prod)) ? $default_account : $defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if (!empty($chk_prod)) {
|
||||
$ischecked = 0;
|
||||
if (in_array($product_static->id, $chk_prod)) {
|
||||
$ischecked=true;
|
||||
}
|
||||
}
|
||||
|
||||
// Checkbox select
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" class="checkforselect productforselectcodeventil_'.$product_static->id.'" name="chk_prod[]" value="'.$obj->rowid.'"/></td>';
|
||||
print '<input type="checkbox" class="checkforselect productforselectcodeventil_'.$product_static->id.'" name="chk_prod[]" '.($ischecked ? "checked" : "").' value="'.$obj->rowid.'"/></td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -87,11 +87,11 @@ class AccountancyExport
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
public function __construct(DoliDB &$db)
|
||||
public function __construct(DoliDB $db)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = &$db;
|
||||
$this->db = $db;
|
||||
$this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE) ? "\n" : ($conf->global->ACCOUNTING_EXPORT_ENDLINE == 1 ? "\n" : "\r\n");
|
||||
}
|
||||
@ -928,17 +928,18 @@ class AccountancyExport
|
||||
$date_validation = dol_print_date($line->date_validation, '%Y%m%d');
|
||||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||
|
||||
$refInvoice = '';
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Customer invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$invoice = new Facture($db);
|
||||
$invoice = new Facture($this->db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref;
|
||||
} elseif ($line->doc_type == 'supplier_invoice') {
|
||||
// Supplier invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$invoice = new FactureFournisseur($db);
|
||||
$invoice = new FactureFournisseur($this->db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref_supplier;
|
||||
@ -1054,17 +1055,18 @@ class AccountancyExport
|
||||
$date_validation = dol_print_date($line->date_validation, '%Y%m%d');
|
||||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||
|
||||
$refInvoice = '';
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Customer invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$invoice = new Facture($db);
|
||||
$invoice = new Facture($this->db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref;
|
||||
} elseif ($line->doc_type == 'supplier_invoice') {
|
||||
// Supplier invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$invoice = new FactureFournisseur($db);
|
||||
$invoice = new FactureFournisseur($this->db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref_supplier;
|
||||
|
||||
@ -732,17 +732,16 @@ class AccountingAccount extends CommonObject
|
||||
/**
|
||||
* Return Suggest accounting accounts to bind
|
||||
*
|
||||
* @param Societe $buyer Societe Object Buyers
|
||||
* @param $seller Company Object seller
|
||||
* @param Product $product Product object sell or buy
|
||||
* @param Facture $facture Facture
|
||||
* @param FactureLigne $factureDet Facture Det
|
||||
* @param array $accountingAccount array of Account account
|
||||
* @param string $type Customer / Supplier
|
||||
*
|
||||
* @return array Accounting accounts suggested
|
||||
* @param Societe $buyer Object buyer
|
||||
* @param Societe $seller Object seller
|
||||
* @param Product $product Product object sell or buy
|
||||
* @param Facture|FactureFournisseur $facture Facture
|
||||
* @param FactureLigne|SupplierInvoiceLine $factureDet Facture Det
|
||||
* @param array $accountingAccount Array of Account account
|
||||
* @param string $type Customer / Supplier
|
||||
* @return array Accounting accounts suggested
|
||||
*/
|
||||
public function getAccountingCodeToBind(Societe $buyer, $seller, Product $product, Facture $facture, FactureLigne $factureDet, $accountingAccount = array(), $type = '')
|
||||
public function getAccountingCodeToBind(Societe $buyer, Societe $seller, Product $product, $facture, $factureDet, $accountingAccount = array(), $type = '')
|
||||
{
|
||||
global $conf;
|
||||
global $hookmanager;
|
||||
@ -755,21 +754,21 @@ class AccountingAccount extends CommonObject
|
||||
$reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if (empty($reshook)) {
|
||||
if ($type=='customer') {
|
||||
if ($type == 'customer') {
|
||||
$const_name = "SOLD";
|
||||
} elseif ($type=='supplier') {
|
||||
} elseif ($type == 'supplier') {
|
||||
$const_name = "BUY";
|
||||
}
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
$isBuyerInEEC = isInEEC($buyer);
|
||||
$isSellerInEEC = isInEEC($seller);
|
||||
$code_l = '';
|
||||
$code_p = '';
|
||||
$code_t = '';
|
||||
$code_l = ''; // Default value for generic product/service
|
||||
$code_p = ''; // Value for the product/service in parameter ($product)
|
||||
$code_t = ''; // Default value of product account for the thirdparty
|
||||
$suggestedid = '';
|
||||
|
||||
// Level 1: Search suggested default account for product/service
|
||||
// Level 1 (define $code_l): Search suggested default account for product/service
|
||||
$suggestedaccountingaccountbydefaultfor = '';
|
||||
if ($factureDet->product_type == 1) {
|
||||
if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||
@ -814,14 +813,14 @@ class AccountingAccount extends CommonObject
|
||||
$code_l = '';
|
||||
}
|
||||
|
||||
// Level 2: Search suggested account for product/service (similar code exists in page index.php to make automatic binding)
|
||||
// Level 2 (define $code_p): Search suggested account for product/service (similar code exists in page index.php to make automatic binding)
|
||||
$suggestedaccountingaccountfor = '';
|
||||
if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code))) {
|
||||
// If buyer in same country than seller (if not defined, we assume it is same country)
|
||||
if ($type=='customer' && !empty($product->accountancy_code_sell)) {
|
||||
$code_p = $product->accountancy_code_sell;
|
||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) {
|
||||
$code_p = $product->accountancy_code_sell;
|
||||
$code_p = $product->accountancy_code_buy;
|
||||
}
|
||||
$suggestedid = $accountingAccount['dom'];
|
||||
$suggestedaccountingaccountfor = 'prodserv';
|
||||
@ -831,7 +830,7 @@ class AccountingAccount extends CommonObject
|
||||
if ($type=='customer' && !empty($product->accountancy_code_sell)) {
|
||||
$code_p = $product->accountancy_code_sell;
|
||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) {
|
||||
$code_p = $product->accountancy_code_sell;
|
||||
$code_p = $product->accountancy_code_buy;
|
||||
}
|
||||
$suggestedid = $accountingAccount['dom'];
|
||||
$suggestedaccountingaccountfor = 'eecwithvat';
|
||||
@ -840,7 +839,7 @@ class AccountingAccount extends CommonObject
|
||||
if ($type=='customer' && !empty($product->accountancy_code_sell)) {
|
||||
$code_p = $product->accountancy_code_sell;
|
||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) {
|
||||
$code_p = $product->accountancy_code_sell;
|
||||
$code_p = $product->accountancy_code_buy;
|
||||
}
|
||||
$suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ?
|
||||
$suggestedaccountingaccountfor = 'eecwithoutvatnumber';
|
||||
@ -855,18 +854,17 @@ class AccountingAccount extends CommonObject
|
||||
$suggestedaccountingaccountfor = 'eec';
|
||||
} else {
|
||||
// Foreign sale
|
||||
// European intravat sale
|
||||
if ($type=='customer' && !empty($product->accountancy_code_sell_export)) {
|
||||
$code_p = $product->accountancy_code_sell_export;
|
||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_sell_export)) {
|
||||
$code_p = $product->accountancy_code_sell_export;
|
||||
} elseif ($type=='supplier' && !empty($product->accountancy_code_buy_export)) {
|
||||
$code_p = $product->accountancy_code_buy_export;
|
||||
}
|
||||
$suggestedid = $accountingAccount['export'];
|
||||
$suggestedaccountingaccountfor = 'export';
|
||||
}
|
||||
}
|
||||
|
||||
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||
// Level 3 (define $code_t): Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
if (!empty($buyer->code_compta)) {
|
||||
$code_t = $buyer->code_compta;
|
||||
@ -876,7 +874,7 @@ class AccountingAccount extends CommonObject
|
||||
}
|
||||
|
||||
// Manage Deposit
|
||||
if ($factureDet->desc == "(DEPOSIT)") {
|
||||
if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) {
|
||||
$accountdeposittoventilated = new self($this->db);
|
||||
$result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1);
|
||||
if ($result < 0) {
|
||||
@ -888,6 +886,7 @@ class AccountingAccount extends CommonObject
|
||||
$suggestedaccountingaccountfor = 'deposit';
|
||||
}
|
||||
|
||||
// If $suggestedid could not be guessed yet, we set it from the generic default accounting code $code_l
|
||||
if (empty($suggestedid) && empty($code_p) && !empty($code_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) {
|
||||
if (empty($this->accountingaccount_codetotid_cache[$code_l])) {
|
||||
$tmpaccount = new self($this->db);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@ -36,6 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta", "bills", "other", "accountancy"));
|
||||
|
||||
$validatemonth = GETPOST('validatemonth', 'int');
|
||||
$validateyear = GETPOST('validateyear', 'int');
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
accessforbidden();
|
||||
@ -174,6 +177,9 @@ if ($action == 'validatehistory') {
|
||||
if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) {
|
||||
$sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'";
|
||||
}
|
||||
if ($validatemonth && $validateyear) {
|
||||
$sql .= dolSqlDateFilter('f.datef', 0, $validatemonth, $validateyear);
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
|
||||
@ -184,6 +190,8 @@ if ($action == 'validatehistory') {
|
||||
} else {
|
||||
$num_lines = $db->num_rows($result);
|
||||
|
||||
$facture_static = new Facture($db);
|
||||
|
||||
$isSellerInEEC = isInEEC($mysoc);
|
||||
|
||||
$thirdpartystatic = new Societe($db);
|
||||
@ -243,30 +251,23 @@ if ($action == 'validatehistory') {
|
||||
$code_sell_p_notset = '';
|
||||
$code_sell_t_notset = '';
|
||||
|
||||
$suggestedid = 0;
|
||||
|
||||
$return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer');
|
||||
if (!is_array($return) && $return<0) {
|
||||
setEventMessage($accountingAccount->error, 'errors');
|
||||
} else {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||
$suggestedid = $return['suggestedid'];
|
||||
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
|
||||
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$suggestedid = $return['suggestedid'];
|
||||
} else {
|
||||
$suggestedid=0;
|
||||
$suggestedid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||
if (!empty($objp->company_code_sell)) {
|
||||
$objp->code_sell_t = $objp->company_code_sell;
|
||||
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
||||
$suggestedaccountingaccountfor = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($objp->aarowid_suggest > 0) {
|
||||
if ($suggestedid > 0) {
|
||||
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facturedet";
|
||||
$sqlupdate .= " SET fk_code_ventilation = ".((int) $suggestedid);
|
||||
$sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $facture_static_det->id);
|
||||
@ -311,7 +312,7 @@ print '</span><br>';
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'">'.$langs->trans("ValidateHistory").'</a>';
|
||||
|
||||
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||
@ -325,7 +326,24 @@ for ($i = 1; $i <= 12; $i++) {
|
||||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
print '<td width="60" class="right">'.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).'</td>';
|
||||
$cursormonth = $j;
|
||||
if ($cursormonth > 12) {
|
||||
$cursormonth -= 12;
|
||||
}
|
||||
$cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td width="60" class="right">';
|
||||
if (!empty($tmp['mday'])) {
|
||||
$param = 'search_date_startday=1&search_date_startmonth='.$cursormonth.'&search_date_startyear='.$cursoryear;
|
||||
$param .= '&search_date_endday='.$tmp['mday'].'&search_date_endmonth='.$tmp['mon'].'&search_date_endyear='.$tmp['year'];
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/customer/list.php?'.$param.'">';
|
||||
}
|
||||
print $langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT));
|
||||
if (!empty($tmp['mday'])) {
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
||||
|
||||
@ -365,7 +383,8 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||
} else {
|
||||
@ -374,19 +393,33 @@ if ($resql) {
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
for ($i = 2; $i <= 12; $i++) {
|
||||
print '<td class="right nowraponall amount">'.price($row[$i]).'</td>';
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
$cursormonth = (($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) + $i - 2);
|
||||
if ($cursormonth > 12) {
|
||||
$cursormonth -= 12;
|
||||
}
|
||||
$cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount">'.price($row[13]).'</td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
if ($num == 0) {
|
||||
print '<tr class="oddeven"><td colspan="16">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
@ -409,7 +442,24 @@ for ($i = 1; $i <= 12; $i++) {
|
||||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
print '<td width="60" class="right">'.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).'</td>';
|
||||
$cursormonth = $j;
|
||||
if ($cursormonth > 12) {
|
||||
$cursormonth -= 12;
|
||||
}
|
||||
$cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td width="60" class="right">';
|
||||
if (!empty($tmp['mday'])) {
|
||||
$param = 'search_date_startday=1&search_date_startmonth='.$cursormonth.'&search_date_startyear='.$cursoryear;
|
||||
$param .= '&search_date_endday='.$tmp['mday'].'&search_date_endmonth='.$tmp['mon'].'&search_date_endyear='.$tmp['year'];
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/customer/lines.php?'.$param.'">';
|
||||
}
|
||||
print $langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT));
|
||||
if (!empty($tmp['mday'])) {
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
||||
|
||||
@ -449,7 +499,8 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("Unknown");
|
||||
} else {
|
||||
@ -459,20 +510,34 @@ if ($resql) {
|
||||
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
for ($i = 2; $i <= 12; $i++) {
|
||||
print '<td class="right nowraponall amount">'.price($row[$i]).'</td>';
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
$cursormonth = (($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) + $i - 2);
|
||||
if ($cursormonth > 12) {
|
||||
$cursormonth -= 12;
|
||||
}
|
||||
$cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount">'.price($row[13]).'</td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
if ($num == 0) {
|
||||
print '<tr class="oddeven"><td colspan="16">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
|
||||
@ -413,6 +413,9 @@ if ($result) {
|
||||
if ($search_ref) {
|
||||
$param .= '&search_ref='.urlencode($search_ref);
|
||||
}
|
||||
if ($search_label) {
|
||||
$param .= '&search_label='.urlencode($search_label);
|
||||
}
|
||||
if ($search_desc) {
|
||||
$param .= '&search_desc='.urlencode($search_desc);
|
||||
}
|
||||
@ -475,7 +478,6 @@ if ($result) {
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
|
||||
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_desc" value="'.dol_escape_htmltag($search_desc).'"></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" name="search_vat" placeholder="%" size="1" value="'.dol_escape_htmltag($search_vat).'"></td>';
|
||||
@ -491,7 +493,7 @@ if ($result) {
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
@ -525,8 +527,12 @@ if ($result) {
|
||||
while ($i < min($num_lines, $limit)) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
// product_type: 0 = service, 1 = product
|
||||
// if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
|
||||
// issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB !
|
||||
$code_sell_l = '';
|
||||
$code_sell_p = '';
|
||||
$code_sell_t = '';
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
@ -539,7 +545,7 @@ if ($result) {
|
||||
$thirdpartystatic->email = $objp->email;
|
||||
$thirdpartystatic->country_code = $objp->country_code;
|
||||
$thirdpartystatic->tva_intra = $objp->tva_intra;
|
||||
$thirdpartystatic->code_compta = $objp->company_code_sell;
|
||||
$thirdpartystatic->code_compta_company = $objp->company_code_sell;
|
||||
|
||||
$product_static->ref = $objp->product_ref;
|
||||
$product_static->id = $objp->product_id;
|
||||
@ -558,7 +564,7 @@ if ($result) {
|
||||
$facture_static->ref = $objp->ref;
|
||||
$facture_static->id = $objp->facid;
|
||||
$facture_static->type = $objp->ftype;
|
||||
$facture_static->date = $objp->datef;
|
||||
$facture_static->date = $db->jdate($objp->datef);
|
||||
|
||||
$facture_static_det->id = $objp->rowid;
|
||||
$facture_static_det->total_ht = $objp->total_ht;
|
||||
@ -576,6 +582,8 @@ if ($result) {
|
||||
$code_sell_p_notset = '';
|
||||
$code_sell_t_notset = '';
|
||||
|
||||
$suggestedid = 0;
|
||||
|
||||
$return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer');
|
||||
if (!is_array($return) && $return<0) {
|
||||
setEventMessage($accountingAccount->error, 'errors');
|
||||
@ -583,9 +591,9 @@ if ($result) {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||
$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
|
||||
$code_sell_l=$return['code_sell_l'];
|
||||
$code_sell_p=$return['code_sell_p'];
|
||||
$code_sell_t=$return['code_sell_t'];
|
||||
$code_sell_l=$return['code_l'];
|
||||
$code_sell_p=$return['code_p'];
|
||||
$code_sell_t=$return['code_t'];
|
||||
}
|
||||
//var_dump($return);
|
||||
|
||||
@ -604,6 +612,7 @@ if ($result) {
|
||||
// $code_sell_l is now default code of product/service
|
||||
// $code_sell_p is now code of product/service
|
||||
// $code_sell_t is now code of thirdparty
|
||||
//var_dump($code_sell_l.' - '.$code_sell_p.' - '.$code_sell_t.' -> '.$suggestedid.' ('.$suggestedaccountingaccountbydefaultfor.' '.$suggestedaccountingaccountfor.')');
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -613,7 +622,7 @@ if ($result) {
|
||||
// Ref Invoice
|
||||
print '<td class="nowraponall">'.$facture_static->getNomUrl(1).'</td>';
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($facture_static->date), 'day').'</td>';
|
||||
print '<td class="center">'.dol_print_date($facture_static->date, 'day').'</td>';
|
||||
|
||||
// Ref Product
|
||||
print '<td class="tdoverflowmax150">';
|
||||
@ -637,11 +646,11 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Vat rate
|
||||
$code_vat_differ='';
|
||||
if ($product_static->tva_tx !== $facture_static_det->tva_tx && ! empty($facture_static_det->tva_tx)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
|
||||
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
||||
$code_vat_differ = '';
|
||||
if ($product_static->tva_tx !== $facture_static_det->tva_tx && price2num($product_static->tva_tx) && price2num($facture_static_det->tva_tx)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
|
||||
$code_vat_differ = 'warning bold';
|
||||
}
|
||||
print '<td style="'.$code_vat_differ.'" class="right">';
|
||||
print '<td class="right'.($code_vat_differ?' '.$code_vat_differ:'').'">';
|
||||
print vatrate($facture_static_det->tva_tx.($facture_static_det->vat_src_code ? ' ('.$facture_static_det->vat_src_code.')' : ''));
|
||||
print '</td>';
|
||||
|
||||
@ -707,12 +716,11 @@ if ($result) {
|
||||
|
||||
// Column with checkbox
|
||||
print '<td class="center">';
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||
$ischecked=1;
|
||||
} elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
||||
$ischecked = 0;
|
||||
$ischecked = 0;
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$ischecked = 1;
|
||||
}
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facture_static_det->id.'" name="toselect[]" value="'.$facture_static_det->id."_".$i.'"'.($ischecked ? "checked" : "").'/>';
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facture_static_det->id.'" name="toselect[]" value="'.$facture_static_det->id."_".$i.'"'.($ischecked ? " checked" : "").'/>';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
@ -32,6 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta", "bills", "other", "accountancy"));
|
||||
|
||||
$validatemonth = GETPOST('validatemonth', 'int');
|
||||
$validateyear = GETPOST('validateyear', 'int');
|
||||
|
||||
$month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||
if (GETPOST("year", 'int')) {
|
||||
$year_start = GETPOST("year", 'int');
|
||||
@ -106,12 +109,18 @@ if ($action == 'validatehistory') {
|
||||
$sql1 .= " WHERE ".MAIN_DB_PREFIX."expensereport_det.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid = ".((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity);
|
||||
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code = accnt.account_number";
|
||||
$sql1 .= " AND ".MAIN_DB_PREFIX."expensereport_det.fk_code_ventilation = 0";
|
||||
if ($validatemonth && $validateyear) {
|
||||
$sql1 .= dolSqlDateFilter('date', 0, $validatemonth, $validateyear);
|
||||
}
|
||||
} else {
|
||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det as erd, ".MAIN_DB_PREFIX."c_type_fees as t, ".MAIN_DB_PREFIX."accounting_account as accnt , ".MAIN_DB_PREFIX."accounting_system as syst";
|
||||
$sql1 .= " SET erd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " WHERE erd.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid = ".((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity);
|
||||
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code=accnt.account_number";
|
||||
$sql1 .= " AND erd.fk_code_ventilation = 0";
|
||||
if ($validatemonth && $validateyear) {
|
||||
$sql1 .= dolSqlDateFilter('erd.date', 0, $validatemonth, $validateyear);
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/expensereport/index.php');
|
||||
@ -146,7 +155,7 @@ print '</span><br>';
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'">'.$langs->trans("ValidateHistory").'</a>';
|
||||
|
||||
|
||||
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||
@ -195,7 +204,8 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||
} else {
|
||||
@ -204,15 +214,16 @@ if ($resql) {
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
for ($i = 2; $i <= 12; $i++) {
|
||||
print '<td class="right nowraponall amount">'.price($row[$i]).'</td>';
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount">'.price($row[13]).'</td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -274,7 +285,8 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||
} else {
|
||||
@ -284,15 +296,16 @@ if ($resql) {
|
||||
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
for ($i = 2; $i <= 12; $i++) {
|
||||
print '<td class="right nowraponall amount">'.price($row[$i]).'</td>';
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount">'.price($row[13]).'</td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -34,6 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta", "bills", "other", "accountancy"));
|
||||
|
||||
$validatemonth = GETPOST('validatemonth', 'int');
|
||||
$validateyear = GETPOST('validateyear', 'int');
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
accessforbidden();
|
||||
@ -172,6 +175,9 @@ if ($action == 'validatehistory') {
|
||||
if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) {
|
||||
$sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'";
|
||||
}
|
||||
if ($validatemonth && $validateyear) {
|
||||
$sql .= dolSqlDateFilter('f.datef', 0, $validatemonth, $validateyear);
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/supplier/index.php');
|
||||
|
||||
@ -241,30 +247,23 @@ if ($action == 'validatehistory') {
|
||||
$code_buy_p_notset = '';
|
||||
$code_buy_t_notset = '';
|
||||
|
||||
$suggestedid = 0;
|
||||
|
||||
$return = $accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'supplier');
|
||||
if (!is_array($return) && $return<0) {
|
||||
setEventMessage($accountingAccount->error, 'errors');
|
||||
} else {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||
$suggestedid = $return['suggestedid'];
|
||||
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
|
||||
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$suggestedid = $return['suggestedid'];
|
||||
} else {
|
||||
$suggestedid=0;
|
||||
$suggestedid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||
if (!empty($objp->company_code_buy)) {
|
||||
$objp->code_buy_t = $objp->company_code_buy;
|
||||
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
||||
$suggestedaccountingaccountfor = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($objp->aarowid_suggest > 0) {
|
||||
if ($suggestedid > 0) {
|
||||
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
|
||||
$sqlupdate .= " SET fk_code_ventilation = ".((int) $suggestedid);
|
||||
$sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $facture_static_det->id);
|
||||
@ -307,7 +306,7 @@ print '</span><br>';
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'">'.$langs->trans("ValidateHistory").'</a>';
|
||||
|
||||
|
||||
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||
@ -322,7 +321,24 @@ for ($i = 1; $i <= 12; $i++) {
|
||||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
print '<td width="60" class="right">'.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).'</td>';
|
||||
$cursormonth = $j;
|
||||
if ($cursormonth > 12) {
|
||||
$cursormonth -= 12;
|
||||
}
|
||||
$cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td width="60" class="right">';
|
||||
if (!empty($tmp['mday'])) {
|
||||
$param = 'search_date_startday=1&search_date_startmonth='.$cursormonth.'&search_date_startyear='.$cursoryear;
|
||||
$param .= '&search_date_endday='.$tmp['mday'].'&search_date_endmonth='.$tmp['mon'].'&search_date_endyear='.$tmp['year'];
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/list.php?'.$param.'">';
|
||||
}
|
||||
print $langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT));
|
||||
if (!empty($tmp['mday'])) {
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
||||
|
||||
@ -357,7 +373,8 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||
} else {
|
||||
@ -366,19 +383,26 @@ if ($resql) {
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
for ($i = 2; $i <= 12; $i++) {
|
||||
print '<td class="right nowraponall amount">'.price($row[$i]).'</td>';
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount">'.price($row[13]).'</td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
if ($num == 0) {
|
||||
print '<tr class="oddeven"><td colspan="16">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
@ -401,7 +425,24 @@ for ($i = 1; $i <= 12; $i++) {
|
||||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
print '<td width="60" class="right">'.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).'</td>';
|
||||
$cursormonth = $j;
|
||||
if ($cursormonth > 12) {
|
||||
$cursormonth -= 12;
|
||||
}
|
||||
$cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td width="60" class="right">';
|
||||
if (!empty($tmp['mday'])) {
|
||||
$param = 'search_date_startday=1&search_date_startmonth='.$cursormonth.'&search_date_startyear='.$cursoryear;
|
||||
$param .= '&search_date_endday='.$tmp['mday'].'&search_date_endmonth='.$tmp['mon'].'&search_date_endyear='.$tmp['year'];
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/lines.php?'.$param.'">';
|
||||
}
|
||||
print $langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT));
|
||||
if (!empty($tmp['mday'])) {
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
||||
|
||||
@ -436,7 +477,8 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("Unknown");
|
||||
} else {
|
||||
@ -445,19 +487,26 @@ if ($resql) {
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
for ($i = 2; $i <= 12; $i++) {
|
||||
print '<td class="right nowraponall amount">'.price($row[$i]).'</td>';
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount">'.price($row[13]).'</td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
if ($num == 0) {
|
||||
print '<tr class="oddeven"><td colspan="16">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ if (strlen(trim($search_ref))) {
|
||||
$sql .= natural_search("p.ref", $search_ref);
|
||||
}
|
||||
if (strlen(trim($search_label))) {
|
||||
$sql .= natural_search("f.libelle", $search_label);
|
||||
$sql .= natural_search(array("p.label", "f.libelle"), $search_label);
|
||||
}
|
||||
if (strlen(trim($search_desc))) {
|
||||
$sql .= natural_search("l.description", $search_desc);
|
||||
@ -529,11 +529,12 @@ if ($result) {
|
||||
while ($i < min($num_lines, $limit)) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
// product_type: 0 = service ? 1 = product
|
||||
// product_type: 0 = service, 1 = product
|
||||
// if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
|
||||
// issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB !
|
||||
$objp->code_buy_l = '';
|
||||
$objp->code_buy_p = '';
|
||||
$code_buy_l = '';
|
||||
$code_buy_p = '';
|
||||
$code_buy_t = '';
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
@ -546,7 +547,7 @@ if ($result) {
|
||||
$thirdpartystatic->email = $objp->email;
|
||||
$thirdpartystatic->country_code = $objp->country_code;
|
||||
$thirdpartystatic->tva_intra = $objp->tva_intra;
|
||||
$thirdpartystatic->code_compta_fournisseur = $objp->company_code_buy;
|
||||
$thirdpartystatic->code_compta_company = $objp->company_code_buy;
|
||||
|
||||
$product_static->ref = $objp->product_ref;
|
||||
$product_static->id = $objp->product_id;
|
||||
@ -566,18 +567,15 @@ if ($result) {
|
||||
$facturefourn_static->id = $objp->facid;
|
||||
$facturefourn_static->type = $objp->ftype;
|
||||
$facturefourn_static->label = $objp->invoice_label;
|
||||
$facturefourn_static->date = $db->jdate($objp->datef);
|
||||
|
||||
$facturefourn_static_det->id = $objp->rowid;
|
||||
$facturefourn_static_det->total_ht = $objp->total_ht;
|
||||
$facturefourn_static_det->tva_tx_line = $objp->tva_tx_line;
|
||||
$facturefourn_static_det->tva_tx = $objp->tva_tx_line;
|
||||
$facturefourn_static_det->vat_src_code = $objp->vat_src_code;
|
||||
$facturefourn_static_det->product_type = $objp->type_l;
|
||||
$facturefourn_static_det->desc = $objp->description;
|
||||
|
||||
$code_buy_p_notset = '';
|
||||
$code_buy_t_notset = '';
|
||||
$objp->aarowid_suggest = ''; // Will be set later
|
||||
|
||||
$accountingAccountArray = array(
|
||||
'dom'=>$objp->aarowid,
|
||||
'intra'=>$objp->aarowid_intra,
|
||||
@ -587,6 +585,8 @@ if ($result) {
|
||||
$code_buy_p_notset = '';
|
||||
$code_buy_t_notset = '';
|
||||
|
||||
$suggestedid = 0;
|
||||
|
||||
$return=$accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier');
|
||||
if (!is_array($return) && $return<0) {
|
||||
setEventMessage($accountingAccount->error, 'errors');
|
||||
@ -594,9 +594,9 @@ if ($result) {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||
$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
|
||||
$code_buy_l=$return['code_buy_l'];
|
||||
$code_buy_p=$return['code_buy_p'];
|
||||
$code_buy_t=$return['code_buy_t'];
|
||||
$code_buy_l=$return['code_l'];
|
||||
$code_buy_p=$return['code_p'];
|
||||
$code_buy_t=$return['code_t'];
|
||||
}
|
||||
//var_dump($return);
|
||||
|
||||
@ -608,10 +608,14 @@ if ($result) {
|
||||
if (empty($code_buy_l) && empty($code_buy_p)) {
|
||||
$code_buy_p_notset = 'color:red';
|
||||
}
|
||||
/*if ($suggestedaccountingaccountfor == 'eecwithoutvatnumber' && empty($code_sell_p_notset)) {
|
||||
$code_sell_p_notset = 'color:orange';
|
||||
}*/
|
||||
|
||||
// $code_buy_l is now default code of product/service
|
||||
// $code_buy_p is now code of product/service
|
||||
// $code_buy_t is now code of thirdparty
|
||||
//var_dump($code_buy_l.' - '.$code_buy_p.' - '.$code_buy_t.' -> '.$suggestedid.' ('.$suggestedaccountingaccountbydefaultfor.' '.$suggestedaccountingaccountfor.')');
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -626,15 +630,15 @@ if ($result) {
|
||||
print '</td>';
|
||||
*/
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($facturefourn_static_det->datef), 'day').'</td>';
|
||||
print '<td class="center">'.dol_print_date($facturefourn_static->date, 'day').'</td>';
|
||||
|
||||
// Ref Product
|
||||
print '<td class="tdoverflowmax150">';
|
||||
if ($product_static->id > 0) {
|
||||
print $product_static->getNomUrl(1);
|
||||
}
|
||||
if ($product_static->product_label) {
|
||||
print '<br><span class="opacitymedium small">'.$product_static->product_label.'</span>';
|
||||
if ($product_static->label) {
|
||||
print '<br><span class="opacitymedium small">'.$product_static->label.'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@ -650,11 +654,12 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Vat rate
|
||||
if ($objp->vat_tx_l != $objp->vat_tx_p && ! empty($objp->vat_tx_l)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
|
||||
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
||||
$code_vat_differ = '';
|
||||
if ($objp->vat_tx_l != $objp->vat_tx_p && price2num($objp->vat_tx_p) && price2num($objp->vat_tx_l)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
|
||||
$code_vat_differ = 'warning bold';
|
||||
}
|
||||
print '<td style="'.$code_vat_differ.'" class="right">';
|
||||
print vatrate($facturefourn_static_det->tva_tx_line.($facturefourn_static_det->vat_src_code ? ' ('.$facturefourn_static_det->vat_src_code.')' : ''));
|
||||
print '<td class="right'.($code_vat_differ?' '.$code_vat_differ:'').'">';
|
||||
print vatrate($facturefourn_static_det->tva_tx.($facturefourn_static_det->vat_src_code ? ' ('.$facturefourn_static_det->vat_src_code.')' : ''));
|
||||
print '</td>';
|
||||
|
||||
// Thirdparty
|
||||
@ -671,7 +676,7 @@ if ($result) {
|
||||
|
||||
// Found accounts
|
||||
print '<td class="small">';
|
||||
$s = '1. '.(($facturefourn_static_det->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
|
||||
$s = '1. '.(($facturefourn_static_det->product_type == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
|
||||
$shelp = '';
|
||||
if ($suggestedaccountingaccountbydefaultfor == 'eec') {
|
||||
$shelp .= $langs->trans("SaleEEC");
|
||||
@ -686,6 +691,11 @@ if ($result) {
|
||||
$shelp = ''; $ttype = 'help';
|
||||
if ($suggestedaccountingaccountfor == 'eec') {
|
||||
$shelp = $langs->trans("SaleEEC");
|
||||
} elseif ($suggestedaccountingaccountfor == 'eecwithvat') {
|
||||
$shelp = $langs->trans("SaleEECWithVAT");
|
||||
} elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
||||
$shelp = $langs->trans("SaleEECWithoutVATNumber");
|
||||
$ttype = 'warning';
|
||||
} elseif ($suggestedaccountingaccountfor == 'export') {
|
||||
$shelp = $langs->trans("SaleExport");
|
||||
}
|
||||
@ -714,12 +724,11 @@ if ($result) {
|
||||
|
||||
// Column with checkbox
|
||||
print '<td class="center">';
|
||||
if (!empty($suggestedid)) {
|
||||
$ischecked = 0;
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$ischecked = 1;
|
||||
} else {
|
||||
$ischecked = 0;
|
||||
}
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facturefourn_static_det->id.'" name="toselect[]" value="'.$facturefourn_static_det->id."_".$i.'"'.($ischecked ? "checked" : "").'/>';
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facturefourn_static_det->id.'" name="toselect[]" value="'.$facturefourn_static_det->id."_".$i.'"'.($ischecked ? " checked" : "").'/>';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
@ -265,7 +265,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||
|
||||
print '<div class="urllink">';
|
||||
print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">';
|
||||
print '<a target="_blank" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.img_picto('', 'globe', 'class="paddingleft"').'</a>';
|
||||
print '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.img_picto('', 'globe', 'class="paddingleft"').'</a>';
|
||||
print '</div>';
|
||||
print ajax_autoselect('publicurlmember');
|
||||
}
|
||||
|
||||
@ -1788,13 +1788,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
print '<table class="border tableforfield tableforfield centpercent">';
|
||||
|
||||
// Birth Date
|
||||
print '<tr><td class="titlefield">'.$langs->trans("DateOfBirth").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
// Categories
|
||||
// Tags / Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="2">';
|
||||
@ -1802,6 +1796,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Birth Date
|
||||
print '<tr><td class="titlefield">'.$langs->trans("DateOfBirth").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@ -1520,7 +1521,7 @@ class Adherent extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/parntership/class/partnership.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php';
|
||||
|
||||
|
||||
$this->partnerships[] = array();
|
||||
@ -2703,7 +2704,7 @@ class Adherent extends CommonObject
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||
}
|
||||
if (!empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) {
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // Create OpenLDAP MD5 password (TODO add type of encryption)
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 'openldap'); // Create OpenLDAP password (see LDAP_PASSWORD_HASH_TYPE)
|
||||
}
|
||||
} elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') {
|
||||
// Set LDAP password if possible
|
||||
@ -2714,7 +2715,7 @@ class Adherent extends CommonObject
|
||||
if ($this->pass_indatabase_crypted && !empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) {
|
||||
// Create OpenLDAP MD5 password from Dolibarr MD5 password
|
||||
// Note: This suppose that "pass_indatabase_crypted" is a md5 (guaranted by the previous test if "(empty($conf->global->MAIN_SECURITY_HASH_ALGO))"
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = '{md5}'.base64_encode(hex2bin($this->pass_indatabase_crypted));
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dolGetLdapPasswordHash($this->pass_indatabase_crypted, 'md5frommd5');
|
||||
}
|
||||
}
|
||||
} elseif (!empty($this->pass_indatabase)) {
|
||||
@ -2723,7 +2724,7 @@ class Adherent extends CommonObject
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
|
||||
}
|
||||
if (!empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) {
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase, 4); // md5 for OpenLdap TODO add type of encryption
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase, 'openldap'); // Create OpenLDAP password (see LDAP_PASSWORD_HASH_TYPE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ class AdherentType extends CommonObject
|
||||
public $subscription;
|
||||
|
||||
/**
|
||||
* @var float amount for subscription
|
||||
* @var float|string Amount for subscription (null or '' means not defined)
|
||||
*/
|
||||
public $amount;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
*
|
||||
* 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
|
||||
@ -50,14 +50,14 @@ if ($id > 0 || !empty($ref)) {
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
||||
// Define variables to know what current user can do on users
|
||||
$canadduser = ($user->admin || $user->rights->user->user->creer);
|
||||
$canadduser = (!empty($user->admin) || !empty($user->rights->user->user->creer));
|
||||
// Define variables to know what current user can do on properties of user linked to edited member
|
||||
if ($object->user_id) {
|
||||
// $User is the user who edits, $object->user_id is the id of the related user in the edited member
|
||||
$caneditfielduser = ((($user->id == $object->user_id) && $user->rights->user->self->creer)
|
||||
|| (($user->id != $object->user_id) && $user->rights->user->user->creer));
|
||||
$caneditfielduser = ((($user->id == $object->user_id) && !empty($user->rights->user->self->creer))
|
||||
|| (($user->id != $object->user_id) && !empty($user->rights->user->user->creer)));
|
||||
$caneditpassworduser = ((($user->id == $object->user_id) && $user->rights->user->self->password)
|
||||
|| (($user->id != $object->user_id) && $user->rights->user->user->password));
|
||||
|| (($user->id != $object->user_id) && !empty($user->rights->user->user->password)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,17 +135,17 @@ $adht->fetch($object->typeid);
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// LDAP DN
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPMemberDn").'</td><td class="valeur">'.$conf->global->LDAP_MEMBER_DN."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPMemberDn").'</td><td class="valeur">'.getDolGlobalString('LDAP_MEMBER_DN')."</td></tr>\n";
|
||||
|
||||
// LDAP Cle
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPNamingAttribute").'</td><td class="valeur">'.$conf->global->LDAP_KEY_MEMBERS."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPNamingAttribute").'</td><td class="valeur">'.getDolGlobalString('LDAP_KEY_MEMBERS')."</td></tr>\n";
|
||||
|
||||
// LDAP Server
|
||||
print '<tr><td>LDAP '.$langs->trans("Type").'</td><td class="valeur">'.$conf->global->LDAP_SERVER_TYPE."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("Version").'</td><td class="valeur">'.$conf->global->LDAP_SERVER_PROTOCOLVERSION."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPPrimaryServer").'</td><td class="valeur">'.$conf->global->LDAP_SERVER_HOST."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPSecondaryServer").'</td><td class="valeur">'.$conf->global->LDAP_SERVER_HOST_SLAVE."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPServerPort").'</td><td class="valeur">'.$conf->global->LDAP_SERVER_PORT."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("Type").'</td><td class="valeur">'.getDolGlobalString('LDAP_SERVER_TYPE')."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("Version").'</td><td class="valeur">'.getDolGlobalString('LDAP_SERVER_PROTOCOLVERSION')."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPPrimaryServer").'</td><td class="valeur">'.getDolGlobalString('LDAP_SERVER_HOST')."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPSecondaryServer").'</td><td class="valeur">'.getDolGlobalString('LDAP_SERVER_HOST_SLAVE')."</td></tr>\n";
|
||||
print '<tr><td>LDAP '.$langs->trans("LDAPServerPort").'</td><td class="valeur">'.getDolGlobalString('LDAP_SERVER_PORT')."</td></tr>\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -158,13 +158,13 @@ print dol_get_fiche_end();
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (!empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr') {
|
||||
if (!empty($conf->global->LDAP_MEMBER_ACTIVE) && getDolGlobalString('LDAP_MEMBER_ACTIVE') != Ldap::SYNCHRO_LDAP_TO_DOLIBARR) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a></div>';
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
if (!empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr') {
|
||||
if (!empty($conf->global->LDAP_MEMBER_ACTIVE) && getDolGlobalString('LDAP_MEMBER_ACTIVE') != Ldap::SYNCHRO_LDAP_TO_DOLIBARR) {
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
@ -209,7 +209,6 @@ if ($result > 0) {
|
||||
}
|
||||
|
||||
$ldap->unbind();
|
||||
$ldap->close();
|
||||
} else {
|
||||
setEventMessages($ldap->error, $ldap->errors, 'errors');
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ if (!empty($search_categ) || !empty($catid)) {
|
||||
}
|
||||
$sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
|
||||
$sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
|
||||
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
|
||||
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
|
||||
$sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
|
||||
$sql .= " d.note_private, d.note_public,";
|
||||
$sql .= " s.nom,";
|
||||
|
||||
@ -195,9 +195,7 @@ foreach ($data as $val) {
|
||||
}
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td class="center">';
|
||||
//print '<a href="month.php?year='.$year.'">';
|
||||
print $year;
|
||||
//print '</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php?date_select='.((int) $year).'">'.$year.'</a>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td class="right amount nowraponall"><span class="amount">'.price(price2num($val['total'], 'MT'), 1).'</span></td>';
|
||||
|
||||
@ -943,8 +943,10 @@ if ($rowid > 0) {
|
||||
}
|
||||
if (!$datefrom) {
|
||||
$datefrom = $object->datevalid;
|
||||
if ($object->datefin > 0) {
|
||||
if ($object->datefin > 0 && dol_time_plus_duree($object->datefin, $defaultdelay, $defaultdelayunit) > dol_now()) {
|
||||
$datefrom = dol_time_plus_duree($object->datefin, 1, 'd');
|
||||
} else {
|
||||
$datefrom = dol_get_first_day(dol_print_date(time(), "%Y"));
|
||||
}
|
||||
}
|
||||
print $form->selectDate($datefrom, '', '', '', '', "subscription", 1, 1);
|
||||
|
||||
@ -59,7 +59,7 @@ $permissiontoedit = $user->rights->adherent->cotisation->creer; // Used by the i
|
||||
$hookmanager->initHooks(array('subscriptioncard', 'globalcard'));
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'subscription', 0); // TODO Check on object id
|
||||
$result = restrictedArea($user, 'subscription', 0); // TODO Check on object id
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -311,6 +311,7 @@ print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="date_select" value="'.$date_select.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $subscription->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
|
||||
@ -124,13 +124,13 @@ print dol_get_fiche_end();
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == 1) {
|
||||
if (getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE') === Ldap::SYNCHRO_DOLIBARR_TO_LDAP) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a>';
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == 1) {
|
||||
if (getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE') === Ldap::SYNCHRO_DOLIBARR_TO_LDAP) {
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
@ -170,7 +170,6 @@ if ($result > 0) {
|
||||
}
|
||||
|
||||
$ldap->unbind();
|
||||
$ldap->close();
|
||||
} else {
|
||||
setEventMessages($ldap->error, $ldap->errors, 'errors');
|
||||
}
|
||||
|
||||
@ -83,26 +83,26 @@ if ($action == 'set') {
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$defaultValues = new DefaultValues($db);
|
||||
$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
|
||||
if (!is_array($result) && $result<0) {
|
||||
$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
|
||||
if (!is_array($result) && $result < 0) {
|
||||
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
||||
} elseif (count($result)>0) {
|
||||
} elseif (count($result) > 0) {
|
||||
foreach ($result as $defval) {
|
||||
$defaultValues->id=$defval->id;
|
||||
$defaultValues->id = $defval->id;
|
||||
$resultDel = $defaultValues->delete($user);
|
||||
if ($resultDel<0) {
|
||||
if ($resultDel < 0) {
|
||||
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
$defaultValues->type='createform';
|
||||
$defaultValues->entity=$conf->entity;
|
||||
$defaultValues->user_id=0;
|
||||
$defaultValues->page='comm/action/card.php';
|
||||
$defaultValues->param='complete';
|
||||
$defaultValues->value=GETPOST('AGENDA_EVENT_DEFAULT_STATUS');
|
||||
$resultCreat=$defaultValues->create($user);
|
||||
if ($resultCreat<0) {
|
||||
$defaultValues->type = 'createform';
|
||||
$defaultValues->entity = $conf->entity;
|
||||
$defaultValues->user_id = 0;
|
||||
$defaultValues->page = 'comm/action/card.php';
|
||||
$defaultValues->param = 'complete';
|
||||
$defaultValues->value = GETPOST('AGENDA_EVENT_DEFAULT_STATUS');
|
||||
$resultCreat = $defaultValues->create($user);
|
||||
if ($resultCreat < 0) {
|
||||
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'specimen') { // For orders
|
||||
@ -355,13 +355,13 @@ print '<tr class="oddeven">'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_EVENT_DEFAULT_STATUS").'</td>'."\n";
|
||||
print '<td class="center"> </td>'."\n";
|
||||
print '<td class="right nowrap">'."\n";
|
||||
$defval='na';
|
||||
$defval = 'na';
|
||||
$defaultValues = new DefaultValues($db);
|
||||
$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
|
||||
if (!is_array($result) && $result<0) {
|
||||
$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
|
||||
if (!is_array($result) && $result < 0) {
|
||||
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
||||
} elseif (count($result)>0) {
|
||||
$defval=reset($result)->value;
|
||||
} elseif (count($result) > 0) {
|
||||
$defval = reset($result)->value;
|
||||
}
|
||||
$formactions->form_select_status_action('agenda', $defval, 1, "AGENDA_EVENT_DEFAULT_STATUS", 0, 1, 'maxwidth200');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@ -159,7 +159,7 @@ $getentity = ($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||
// Show message
|
||||
$message = '';
|
||||
|
||||
$urlvcal = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank">';
|
||||
$urlvcal = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlvcal .= $urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').'</a>';
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlvcal, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'vcal', '').'</span>');
|
||||
$message .= '<div class="urllink">';
|
||||
@ -168,7 +168,7 @@ $message .= '</div>';
|
||||
$message .= ajax_autoselect('onlinepaymenturl1');
|
||||
$message .= '<br>';
|
||||
|
||||
$urlical = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank">';
|
||||
$urlical = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlical .= $urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').'</a>';
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlical, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', '').'</span>');
|
||||
$message .= '<div class="urllink">';
|
||||
@ -177,7 +177,7 @@ $message .= '</div>';
|
||||
$message .= ajax_autoselect('onlinepaymenturl2');
|
||||
$message .= '<br>';
|
||||
|
||||
$urlrss = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank">';
|
||||
$urlrss = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlrss .= $urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').'</a>';
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlrss, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'rss', '').'</span>');
|
||||
$message .= '<div class="urllink">';
|
||||
|
||||
@ -275,8 +275,7 @@ print '<br><br>';
|
||||
/*
|
||||
* Document templates generators
|
||||
*/
|
||||
//if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
//{
|
||||
|
||||
print load_fiche_titre($langs->trans("BankAccountModelModule"), '', '');
|
||||
|
||||
// Load array def with activated templates
|
||||
@ -466,8 +465,7 @@ print '<br><br>';
|
||||
/*
|
||||
* Document templates generators
|
||||
*/
|
||||
//if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
//{
|
||||
|
||||
print load_fiche_titre($langs->trans("Other"), '', '');
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
|
||||
@ -176,6 +176,71 @@ foreach ($dirbarcode as $reldir) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Select barcode numbering module
|
||||
if ($conf->product->enabled) {
|
||||
print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")", '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="140">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("ShortInfo").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
||||
|
||||
foreach ($dirbarcodenum as $dirroot) {
|
||||
$dir = dol_buildpath($dirroot, 0);
|
||||
|
||||
$handle = @opendir($dir);
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
if (preg_match('/^mod_barcode_product_.*php$/', $file)) {
|
||||
$file = substr($file, 0, dol_strlen($file) - 4);
|
||||
|
||||
try {
|
||||
dol_include_once($dirroot.$file.'.php');
|
||||
} catch (Exception $e) {
|
||||
dol_syslog($e->getMessage(), LOG_ERR);
|
||||
}
|
||||
|
||||
$modBarCode = new $file();
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."</td><td>\n";
|
||||
print $modBarCode->info($langs);
|
||||
print '</td>';
|
||||
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
|
||||
|
||||
if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM) && $conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '<td class="center">';
|
||||
$s = $modBarCode->getToolTip($langs, null, -1);
|
||||
print $form->textwithpicto('', $s, 1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CHOIX ENCODAGE
|
||||
*/
|
||||
@ -189,6 +254,7 @@ if (empty($conf->use_javascript_ajax)) {
|
||||
print '<input type="hidden" name="action" value="updateengine">';
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
@ -211,8 +277,9 @@ if ($resql) {
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print $obj->label;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="100">';
|
||||
print dol_escape_htmltag($obj->label);
|
||||
print "</td><td>\n";
|
||||
print $langs->trans('BarcodeDesc'.$obj->encoding);
|
||||
//print "L'EAN se compose de 8 caracteres, 7 chiffres plus une cle de controle.<br>";
|
||||
@ -270,6 +337,7 @@ if ($resql) {
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
@ -287,6 +355,7 @@ print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
@ -304,7 +373,9 @@ if (!isset($_SERVER['WINDIR'])) {
|
||||
$langs->load("errors");
|
||||
print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", $conf->global->GENBARCODE_LOCATION).'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Module products
|
||||
@ -313,7 +384,9 @@ if (!empty($conf->product->enabled)) {
|
||||
print '<td>'.$langs->trans("SetDefaultBarcodeTypeProducts").'</td>';
|
||||
print '<td width="60" class="right">';
|
||||
print $formbarcode->selectBarcodeType($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE, "PRODUIT_DEFAULT_BARCODE_TYPE", 1);
|
||||
print '</td></tr>';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Module thirdparty
|
||||
@ -322,10 +395,14 @@ if (!empty($conf->societe->enabled)) {
|
||||
print '<td>'.$langs->trans("SetDefaultBarcodeTypeThirdParties").'</td>';
|
||||
print '<td width="60" class="right">';
|
||||
print $formbarcode->selectBarcodeType($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY, "GENBARCODE_BARCODETYPE_THIRDPARTY", 1);
|
||||
print '</td></tr>';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<input type="submit" class="button" name="submit_GENBARCODE_BARCODETYPE_THIRDPARTY" value="'.$langs->trans("Modify").'">';
|
||||
print "</div>";
|
||||
@ -334,71 +411,6 @@ print '</form>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
||||
// Select barcode numbering module
|
||||
if ($conf->product->enabled) {
|
||||
print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")", '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="140">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("ShortInfo").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
||||
|
||||
foreach ($dirbarcodenum as $dirroot) {
|
||||
$dir = dol_buildpath($dirroot, 0);
|
||||
|
||||
$handle = @opendir($dir);
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
if (preg_match('/^mod_barcode_product_.*php$/', $file)) {
|
||||
$file = substr($file, 0, dol_strlen($file) - 4);
|
||||
|
||||
try {
|
||||
dol_include_once($dirroot.$file.'.php');
|
||||
} catch (Exception $e) {
|
||||
dol_syslog($e->getMessage(), LOG_ERR);
|
||||
}
|
||||
|
||||
$modBarCode = new $file();
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."</td><td>\n";
|
||||
print $modBarCode->info($langs);
|
||||
print '</td>';
|
||||
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
|
||||
|
||||
if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM) && $conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '<td class="center">';
|
||||
$s = $modBarCode->getToolTip($langs, null, -1);
|
||||
print $form->textwithpicto('', $s, 1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
//print '</form>';
|
||||
|
||||
print "<br>";
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -175,9 +175,9 @@ if ($action == 'switch') {
|
||||
$newfirst = $objto->box_order;
|
||||
$newsecond = $objfrom->box_order;
|
||||
if ($newfirst == $newsecond) {
|
||||
$newsecondchar = preg_replace('/[0-9]+/', '', $newsecond);
|
||||
$newsecondnum = preg_replace('/[a-zA-Z]+/', '', $newsecond);
|
||||
$newsecond = sprintf("%s%02d", $newsecondchar ? $newsecondchar : 'A', $newsecondnum + 1);
|
||||
$newsecondchar = preg_replace('/[0-9]+/', '', $newsecond);
|
||||
$newsecondnum = preg_replace('/[a-zA-Z]+/', '', $newsecond);
|
||||
$newsecond = sprintf("%s%02d", $newsecondchar ? $newsecondchar : 'A', $newsecondnum + 1);
|
||||
}
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newfirst)."' WHERE rowid=".((int) $objfrom->rowid);
|
||||
@ -300,14 +300,13 @@ $boxtoadd = InfoBox::listBoxes($db, 'available', -1, null, $actives);
|
||||
// Activated boxes
|
||||
$boxactivated = InfoBox::listBoxes($db, 'activated', -1, null);
|
||||
|
||||
print "<br>\n";
|
||||
print "\n\n".'<!-- Boxes Available -->'."\n";
|
||||
print load_fiche_titre($langs->trans("BoxesAvailable"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
|
||||
print '<input type="hidden" name="action" value="add">'."\n";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="tagtable liste centpercent">'."\n";
|
||||
|
||||
@ -315,9 +314,12 @@ print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Box").'</td>';
|
||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||
print '<td></td>';
|
||||
print '<td width="160" class="center">'.$langs->trans("ActivatableOn").'</td>';
|
||||
print "</tr>\n";
|
||||
print '<td class="center" width="160">'.$langs->trans("ActivatableOn").'</td>';
|
||||
print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
print "\n\n".'<!-- Boxes Available -->'."\n";
|
||||
foreach ($boxtoadd as $box) {
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) {
|
||||
$logo = $box->boximg;
|
||||
@ -326,8 +328,8 @@ foreach ($boxtoadd as $box) {
|
||||
}
|
||||
|
||||
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print '<td>'.img_object("", $logo, 'height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
print '<tr class="oddeven" style="height:3em !important;">'."\n";
|
||||
print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv($box->boxlabel)).'">'.img_object("", $logo, 'class="pictofixedwidth" height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (!empty($box->class) && preg_match('/graph_/', $box->class)) {
|
||||
print img_picto('', 'graph', 'class="paddingleft"');
|
||||
}
|
||||
@ -339,7 +341,7 @@ foreach ($boxtoadd as $box) {
|
||||
}
|
||||
}
|
||||
print '</td>'."\n";
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($box->note).'">';
|
||||
if ($box->note == '(WarningUsingThisBoxSlowDown)') {
|
||||
$langs->load("errors");
|
||||
print $langs->trans("WarningUsingThisBoxSlowDown");
|
||||
@ -357,36 +359,21 @@ foreach ($boxtoadd as $box) {
|
||||
print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print '<input type="submit" class="button small smallpaddingimp" value="'.$langs->trans("Activate").'">';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
if (!count($boxtoadd) && count($boxactivated)) {
|
||||
print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("AllWidgetsWereEnabled").'</span></td></tr>';
|
||||
}
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print '<div class="right">';
|
||||
print '<input type="submit" class="button"'.(count($boxtoadd) ? '' : ' disabled').' value="'.$langs->trans("Activate").'">';
|
||||
print '</div>'."\n";
|
||||
print '</form>';
|
||||
print "\n".'<!-- End Boxes Available -->'."\n";
|
||||
|
||||
|
||||
//var_dump($boxactivated);
|
||||
print "<br>\n\n";
|
||||
print load_fiche_titre($langs->trans("BoxesActivated"), '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="tagtable liste">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Box").'</td>';
|
||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||
print '<td class="center" width="160">'.$langs->trans("ActivatableOn").'</td>';
|
||||
print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
$box_order = 1;
|
||||
$foundrupture = 1;
|
||||
foreach ($boxactivated as $key => $box) {
|
||||
@ -397,8 +384,8 @@ foreach ($boxactivated as $key => $box) {
|
||||
}
|
||||
|
||||
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.img_object("", $logo, 'height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
print '<tr class="oddeven" style="height:3em !important;">';
|
||||
print '<td>'.img_object("", $logo, 'class="pictofixedwidth" height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (!empty($box->class) && preg_match('/graph_/', $box->class)) {
|
||||
print img_picto('', 'graph', 'class="paddingleft"');
|
||||
}
|
||||
@ -410,14 +397,17 @@ foreach ($boxactivated as $key => $box) {
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$langs->load("errors");
|
||||
print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($box->note == '(WarningUsingThisBoxSlowDown)' ? $langs->trans("WarningUsingThisBoxSlowDown") : $box->note).'">';
|
||||
if ($box->note == '(WarningUsingThisBoxSlowDown)') {
|
||||
$langs->load("errors");
|
||||
print img_warning('', 0).' '.$langs->trans("WarningUsingThisBoxSlowDown");
|
||||
} else {
|
||||
print ($box->note ? $box->note : ' ');
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $form->textwithpicto('', $langs->trans("SourceFile").' : '.$box->sourcefile);
|
||||
print '</td>'."\n";
|
||||
print '<td class="center">'.(empty($arrayofhomepages[$box->position]) ? '' : $langs->trans($arrayofhomepages[$box->position])).'</td>';
|
||||
$hasnext = ($key < (count($boxactivated) - 1));
|
||||
$hasprevious = ($key != 0);
|
||||
@ -437,6 +427,8 @@ print '</table>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
// Other parameters
|
||||
|
||||
|
||||
@ -108,7 +108,10 @@ print '<input type="hidden" name="action" value="update">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent editmode">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Url").'</td><td>'.$langs->trans("SocialNetworkId").'</td><td></td>';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("SocialNetworksInformation").'</td>';
|
||||
print '<td>'.$langs->trans("SocialNetworkId").'</td>';
|
||||
print '<td>'.$form->textwithpicto($langs->trans("Url"), $langs->trans("KeepEmptyToUseDefault")).'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -119,9 +122,9 @@ foreach ($listofnetworks as $key => $value) {
|
||||
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($key).'_URL';
|
||||
$networkconstid = 'MAIN_INFO_SOCIETE_'.strtoupper($key);
|
||||
print '<td class="nowraponall"><span class="fa paddingright '.($value['icon'] ? $value['icon'] : 'fa-link').'"></span>';
|
||||
print '<input name="'.$key.'url" id="'.$key.'url" class="minwidth300" value="'.(!empty($conf->global->$networkconstname) ? dol_escape_htmltag($conf->global->$networkconstname) : '').'">';
|
||||
print '</td><td>';
|
||||
print '<input name="'.$key.'" id="'.$key.'" class="minwidth300" value="'.(!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : '').'">';
|
||||
print '</td><td>';
|
||||
print '<input name="'.$key.'url" id="'.$key.'url" class="minwidth300" value="'.(!empty($conf->global->$networkconstname) ? dol_escape_htmltag($conf->global->$networkconstname) : '').'">';
|
||||
print '</td>';
|
||||
print '<td class="nowraponall">'.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : ''), 0, 0, $key, $listofnetworks).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -173,11 +173,11 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
|
||||
|
||||
// Show message
|
||||
$message = '';
|
||||
$url = '<a href="'.$urlwithroot.'/dav/fileserver.php" target="_blank">'.$urlwithroot.'/dav/fileserver.php</a>';
|
||||
$url = '<a href="'.$urlwithroot.'/dav/fileserver.php" target="_blank" rel="noopener noreferrer">'.$urlwithroot.'/dav/fileserver.php</a>';
|
||||
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV', ''));
|
||||
$message .= '<div class="urllink"><input type="text" id="webdavpublicurl" class="quatrevingtpercent" value="'.$urlwithroot.'/dav/fileserver.php">';
|
||||
$message .= '<a href="'.$urlwithroot.'/dav/fileserver.php" target="_blank">';
|
||||
$message .= '<a href="'.$urlwithroot.'/dav/fileserver.php" target="_blank" rel="noopener noreferrer">';
|
||||
$message .= ' '.img_picto('', 'globe');
|
||||
$message .= '</a>';
|
||||
$message .= '</div>';
|
||||
@ -186,11 +186,11 @@ $message .= ajax_autoselect('webdavpublicurl');
|
||||
$message .= '<br>';
|
||||
if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) {
|
||||
$urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : '');
|
||||
$url = '<a href="'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'" target="_blank">'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'</a>';
|
||||
$url = '<a href="'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'" target="_blank" rel="noopener noreferrer">'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'</a>';
|
||||
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', ''));
|
||||
$message .= '<div class="urllink"><input type="text" id="webdavurl" class="quatrevingtpercent" value="'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'">';
|
||||
$message .= '<a href="'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'" target="_blank">';
|
||||
$message .= '<a href="'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'" target="_blank" rel="noopener noreferrer">';
|
||||
$message .= ' '.img_picto('', 'globe');
|
||||
$message .= '</a>';
|
||||
$message .= '</div>';
|
||||
|
||||
@ -350,17 +350,15 @@ if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
print '</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
$result=$object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode,'t.entity'=>array($user->entity,$conf->entity)));
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode,'t.entity'=>array($user->entity,$conf->entity)));
|
||||
|
||||
if (!is_array($result) && $result<0) {
|
||||
if (!is_array($result) && $result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} elseif (count($result)>0) {
|
||||
foreach ($result as $key=>$defaultvalue) {
|
||||
print "\n";
|
||||
|
||||
} elseif (is_array($result) && count($result) > 0) {
|
||||
foreach ($result as $key => $defaultvalue) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Page
|
||||
@ -378,11 +376,6 @@ if (!is_array($result) && $result<0) {
|
||||
// Value
|
||||
if ($mode != 'focus' && $mode != 'mandatory') {
|
||||
print '<td>';
|
||||
/*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][lang]" value="'.$obj->lang.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->transkey.'">';
|
||||
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">';
|
||||
*/
|
||||
if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) print dol_escape_htmltag($defaultvalue->value);
|
||||
else print '<input type="text" name="value" value="'.dol_escape_htmltag($defaultvalue->value).'">';
|
||||
print '</td>';
|
||||
@ -405,8 +398,6 @@ if (!is_array($result) && $result<0) {
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
print "\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -509,8 +509,8 @@ $tabcond[30] = !empty($conf->label->enabled);
|
||||
$tabcond[32] = (!empty($conf->holiday->enabled) || !empty($conf->hrm->enabled));
|
||||
$tabcond[33] = !empty($conf->hrm->enabled);
|
||||
$tabcond[34] = !empty($conf->hrm->enabled);
|
||||
$tabcond[35] = !empty($conf->expensereport->enabled);
|
||||
$tabcond[36] = !empty($conf->expensereport->enabled);
|
||||
$tabcond[35] = !empty($conf->expensereport->enabled) && !empty($conf->global->MAIN_USE_EXPENSE_IK);
|
||||
$tabcond[36] = !empty($conf->expensereport->enabled) && !empty($conf->global->MAIN_USE_EXPENSE_IK);
|
||||
$tabcond[37] = !empty($conf->product->enabled);
|
||||
$tabcond[38] = !empty($conf->socialnetworks->enabled);
|
||||
$tabcond[39] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES));
|
||||
@ -2107,7 +2107,7 @@ if ($id) {
|
||||
if ($iserasable) {
|
||||
print '<td class="center">';
|
||||
if ($user->admin) {
|
||||
print '<a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a>';
|
||||
print '<a class="reposition" href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a>';
|
||||
}
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||
print '</td>';
|
||||
|
||||
@ -268,7 +268,7 @@ class Dolistore
|
||||
// add image or default ?
|
||||
if ($product->id_default_image != '') {
|
||||
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.((int) $product->id).'&id_image='.((int) $product->id_default_image);
|
||||
$images = '<a href="'.urlencode($image_url).'" class="documentpreview" target="_blank" mime="image/png" title="'.dol_escape_htmltag($product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version).'">';
|
||||
$images = '<a href="'.urlencode($image_url).'" class="documentpreview" target="_blank" rel="noopener noreferrer" mime="image/png" title="'.dol_escape_htmltag($product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version).'">';
|
||||
$images .= '<img src="'.urlencode($image_url).'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
||||
} else {
|
||||
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
||||
@ -280,8 +280,8 @@ class Dolistore
|
||||
$download_link = '<a target="_blank" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
||||
} else {
|
||||
$price = '<h3>'.$langs->trans('Free').'</h3>';
|
||||
$download_link = '<a target="_blank" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/Download-128.png" /></a>';
|
||||
$download_link .= '<br><br><a target="_blank" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
||||
$download_link = '<a target="_blank" rel="noopener noreferrer" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/Download-128.png" /></a>';
|
||||
$download_link .= '<br><br><a target="_blank" rel="noopener noreferrer" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
||||
}
|
||||
|
||||
//checking versions
|
||||
@ -307,7 +307,7 @@ class Dolistore
|
||||
}
|
||||
} else {
|
||||
//need update
|
||||
$version = '<span class="compatibleafterupdate">'.$langs->trans(
|
||||
$version = '<span class="compatibleafterupdate">'.$langs->trans(
|
||||
'CompatibleAfterUpdate',
|
||||
DOL_VERSION,
|
||||
$product->dolibarr_min,
|
||||
@ -316,8 +316,6 @@ class Dolistore
|
||||
$compatible = 'NotCompatible';
|
||||
}
|
||||
|
||||
//.'<br><a class="inline-block valignmiddle" target="_blank" href="'.$this->shop_url.$product->id.'"><span class="details button">'.$langs->trans("SeeInMarkerPlace").'</span></a>
|
||||
|
||||
//output template
|
||||
$html .= '<tr class="app oddeven '.dol_escape_htmltag($compatible).'">
|
||||
<td class="center" width="210"><div class="newAppParent">'.dol_escape_htmltag($newapp.$images).'</div></td>
|
||||
|
||||
@ -583,6 +583,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$arrayoftypes = array(
|
||||
'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
|
||||
'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
|
||||
'recordjoinpiece'=>$langs->trans('recordjoinpieceonobject'),
|
||||
'recordevent'=>'RecordEvent');
|
||||
if ($conf->projet->enabled) {
|
||||
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
||||
@ -144,12 +144,12 @@ print '<br>';
|
||||
print $langs->trans("NoteOnPathLocation").'<br>';
|
||||
|
||||
$url1 = 'http://www.maxmind.com/en/city?rId=awstats';
|
||||
print $langs->trans("YouCanDownloadFreeDatFileTo", '<a href="'.$url1.'" target="_blank">'.$url1.'</a>');
|
||||
print $langs->trans("YouCanDownloadFreeDatFileTo", '<a href="'.$url1.'" target="_blank" rel="noopener noreferrer external">'.$url1.'</a>');
|
||||
|
||||
print '<br>';
|
||||
|
||||
$url2 = 'http://www.maxmind.com/en/city?rId=awstats';
|
||||
print $langs->trans("YouCanDownloadAdvancedDatFileTo", '<a href="'.$url2.'" target="_blank">'.$url2.'</a>');
|
||||
print $langs->trans("YouCanDownloadAdvancedDatFileTo", '<a href="'.$url2.'" target="_blank" rel="noopener noreferrer external">'.$url2.'</a>');
|
||||
|
||||
if ($geoip) {
|
||||
print '<br><br>';
|
||||
|
||||
@ -79,10 +79,12 @@ if ($action == 'update') {
|
||||
if (!empty($max_rank)) {
|
||||
$static_skill = new Skill($db);
|
||||
$TAllSkills = $static_skill->fetchAll();
|
||||
foreach ($TAllSkills as &$skill) {
|
||||
if (empty($skill->lines)) $skill->fetchLines();
|
||||
if (count($skill->lines) < $conf->global->HRM_MAXRANK) {
|
||||
$skill->createSkills(count($skill->lines) + 1);
|
||||
if (is_array($TAllSkills)) {
|
||||
foreach ($TAllSkills as &$skill) {
|
||||
if (empty($skill->lines)) $skill->fetchLines();
|
||||
if (count($skill->lines) < $conf->global->HRM_MAXRANK) {
|
||||
$skill->createSkills(count($skill->lines) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2005-2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
@ -29,10 +29,11 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formldap.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("admin");
|
||||
$langs->loadLangs(array("admin", "ldap"));
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
@ -99,6 +100,9 @@ if (empty($reshook)) {
|
||||
if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
if (!dolibarr_set_const($db, 'LDAP_PASSWORD_HASH_TYPE', GETPOST("LDAP_PASSWORD_HASH_TYPE", 'aZ09'), 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
@ -129,7 +133,7 @@ if (!function_exists("ldap_connect")) {
|
||||
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$formldap = new FormLdap($db);
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -146,13 +150,9 @@ print "</tr>\n";
|
||||
// Synchro utilisateurs/groupes active
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnSynchroActive").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['0'] = $langs->trans("No");
|
||||
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr");
|
||||
$arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP");
|
||||
print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE);
|
||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_SYNCHRO_ACTIVE'), 'activesynchro');
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnSynchroActiveExample").'</span>';
|
||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) {
|
||||
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && empty($conf->global->LDAP_USER_DN)) {
|
||||
print '<br><span class="error">'.$langs->trans("LDAPSetupNotComplete").'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
@ -160,32 +160,21 @@ print '</td></tr>';
|
||||
// Synchro contact active
|
||||
if (!empty($conf->societe->enabled)) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['0'] = $langs->trans("No");
|
||||
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
||||
print $form->selectarray('activecontact', $arraylist, $conf->global->LDAP_CONTACT_ACTIVE);
|
||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR));
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnContactActiveExample").'</span></td></tr>';
|
||||
}
|
||||
|
||||
// Synchro member active
|
||||
if (!empty($conf->adherent->enabled)) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberActive").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['0'] = $langs->trans("No");
|
||||
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
||||
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
|
||||
print $form->selectarray('activemembers', $arraylist, $conf->global->LDAP_MEMBER_ACTIVE);
|
||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2);
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberActiveExample").'</span></td></tr>';
|
||||
}
|
||||
|
||||
// Synchro member type active
|
||||
if (!empty($conf->adherent->enabled)) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberTypeActive").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['0'] = $langs->trans("No");
|
||||
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
||||
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
|
||||
print $form->selectarray('activememberstypes', $arraylist, $conf->global->LDAP_MEMBER_TYPE_ACTIVE);
|
||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2);
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberTypeActiveExample").'</span></td></tr>';
|
||||
}
|
||||
|
||||
@ -202,55 +191,46 @@ print "</tr>\n";
|
||||
|
||||
// Type
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Type").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['activedirectory'] = 'Active Directory';
|
||||
$arraylist['openldap'] = 'OpenLdap';
|
||||
$arraylist['egroupware'] = 'Egroupware';
|
||||
print $form->selectarray('type', $arraylist, $conf->global->LDAP_SERVER_TYPE);
|
||||
print $formldap->selectLdapServerType(getDolGlobalString('LDAP_SERVER_TYPE'), 'type');
|
||||
print '</td><td> </td></tr>';
|
||||
|
||||
// Version
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Version").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['3'] = 'Version 3';
|
||||
$arraylist['2'] = 'Version 2';
|
||||
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION', $arraylist, $conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
||||
print $formldap->selectLdapServerProtocolVersion(getDolGlobalString('LDAP_SERVER_PROTOCOLVERSION'), 'LDAP_SERVER_PROTOCOLVERSION');
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerProtocolVersion").'</span></td></tr>';
|
||||
|
||||
// Serveur primaire
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("LDAPPrimaryServer").'</td><td>';
|
||||
print '<input class="minwidth200" type="text" name="host" value="'.$conf->global->LDAP_SERVER_HOST.'">';
|
||||
print '<input class="minwidth200" type="text" name="host" value="'.getDolGlobalString('LDAP_SERVER_HOST').'">';
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerExample").'</span></td></tr>';
|
||||
|
||||
// Serveur secondaire
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("LDAPSecondaryServer").'</td><td>';
|
||||
print '<input class="minwidth200" type="text" name="slave" value="'.$conf->global->LDAP_SERVER_HOST_SLAVE.'">';
|
||||
print '<input class="minwidth200" type="text" name="slave" value="'.getDolGlobalString('LDAP_SERVER_HOST_SLAVE').'">';
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerExample").'</span></td></tr>';
|
||||
|
||||
// Port
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerPort").'</td><td>';
|
||||
if (!empty($conf->global->LDAP_SERVER_PORT)) {
|
||||
print '<input class="width75" type="text" name="port" value="'.$conf->global->LDAP_SERVER_PORT.'">';
|
||||
} else {
|
||||
print '<input class="width75" type="text" name="port" value="389">';
|
||||
}
|
||||
print '<input class="width75" type="text" name="port" value="'.getDolGlobalString('LDAP_SERVER_PORT', '389').'">';
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerPortExample").'</span></td></tr>';
|
||||
|
||||
// DNserver
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerDn").'</td><td>';
|
||||
print '<input class="minwidth300" type="text" name="dn" value="'.$conf->global->LDAP_SERVER_DN.'">';
|
||||
print '<input class="minwidth300" type="text" name="dn" value="'.getDolGlobalString('LDAP_SERVER_DN').'">';
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerDnExample").'</span></td></tr>';
|
||||
|
||||
// Utiliser TLS
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerUseTLS").'</td><td>';
|
||||
$arraylist = array();
|
||||
$arraylist['0'] = $langs->trans("No");
|
||||
$arraylist['1'] = $langs->trans("Yes");
|
||||
print $form->selectarray('usetls', $arraylist, $conf->global->LDAP_SERVER_USE_TLS);
|
||||
print $form->selectyesno('usetls', getDolGlobalInt('LDAP_SERVER_USE_TLS'), 1);
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerUseTLSExample").'</span></td></tr>';
|
||||
|
||||
// Password hash type
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPPasswordHashType").'</td><td>';
|
||||
print $formldap->selectLdapPasswordHashType(getDolGlobalString('LDAP_PASSWORD_HASH_TYPE'), 'LDAP_PASSWORD_HASH_TYPE');
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPPasswordHashTypeExample").'</span></td></tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("ForANonAnonymousAccess").'</td>';
|
||||
print "</tr>\n";
|
||||
@ -258,17 +238,13 @@ print "</tr>\n";
|
||||
// DNAdmin
|
||||
print '<!-- LDAP_ADMIN_DN -->';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPAdminDn").'</td><td>';
|
||||
print '<input class="minwidth300" type="text" name="admin" value="'.$conf->global->LDAP_ADMIN_DN.'">';
|
||||
print '<input class="minwidth300" type="text" name="admin" value="'.getDolGlobalString('LDAP_ADMIN_DN').'">';
|
||||
print '</td><td class="maxwidthhalf"><span class="opacitymedium">'.$langs->trans("LDAPAdminDnExample").'</span></td></tr>';
|
||||
|
||||
// Pass
|
||||
print '<!-- LDAP_ADMIN_PASS -->';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPPassword").'</td><td>';
|
||||
if (!empty($conf->global->LDAP_ADMIN_PASS)) {
|
||||
print '<input class="minwidth150" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">'; // je le met en visible pour test
|
||||
} else {
|
||||
print '<input class="minwidth150" type="text" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
||||
}
|
||||
print '<input class="minwidth150" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans('Password').' (ex: secret)</span></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -290,24 +266,24 @@ if (function_exists("ldap_connect")) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test">'.$langs->trans("LDAPTestConnect").'</a><br><br>';
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'test') {
|
||||
if ($action == 'test') {
|
||||
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
|
||||
|
||||
$result = $ldap->connect_bind();
|
||||
if ($result > 0) {
|
||||
// Test ldap connect and bind
|
||||
print img_picto('', 'info').' ';
|
||||
print '<span class="ok">'.$langs->trans("LDAPTCPConnectOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).'</span>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPTCPConnectOK", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT')).'</span>';
|
||||
print '<br>';
|
||||
|
||||
if ($conf->global->LDAP_ADMIN_DN && !empty($conf->global->LDAP_ADMIN_PASS)) {
|
||||
if (!empty($conf->global->LDAP_ADMIN_DN) && !empty($conf->global->LDAP_ADMIN_PASS)) {
|
||||
if ($result == 2) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<span class="ok">'.$langs->trans("LDAPBindOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPBindOK", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<span class="error">'.$langs->trans("LDAPBindKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<span class="error">'.$langs->trans("LDAPBindKO", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<br>';
|
||||
print $langs->trans("Error").' '.$ldap->error;
|
||||
print '<br>';
|
||||
@ -330,10 +306,10 @@ if (function_exists("ldap_connect")) {
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
$unbind = $ldap->unbind();
|
||||
$ldap->unbind();
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<span class="error">'.$langs->trans("LDAPTCPConnectKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).'</span>';
|
||||
print '<span class="error">'.$langs->trans("LDAPTCPConnectKO", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT')).'</span>';
|
||||
print '<br>';
|
||||
print $langs->trans("Error").' '.$ldap->error;
|
||||
print '<br>';
|
||||
|
||||
@ -218,7 +218,7 @@ print '</form>';
|
||||
/*
|
||||
* Test de la connexion
|
||||
*/
|
||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') {
|
||||
if (getDolGlobalInt('LDAP_SYNCHRO_ACTIVE') === Ldap::SYNCHRO_DOLIBARR_TO_LDAP) {
|
||||
$butlabel = $langs->trans("LDAPTestSynchroGroup");
|
||||
$testlabel = 'testgroup';
|
||||
$key = $conf->global->LDAP_KEY_GROUPS;
|
||||
@ -226,7 +226,7 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') {
|
||||
$objectclass = $conf->global->LDAP_GROUP_OBJECT_CLASS;
|
||||
|
||||
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
|
||||
} elseif ($conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') {
|
||||
} elseif (getDolGlobalInt('LDAP_SYNCHRO_ACTIVE') === Ldap::SYNCHRO_LDAP_TO_DOLIBARR) {
|
||||
$butlabel = $langs->trans("LDAPTestSearch");
|
||||
$testlabel = 'testsearchgroup';
|
||||
$key = $conf->global->LDAP_KEY_GROUPS;
|
||||
|
||||
@ -188,7 +188,7 @@ print '</form>';
|
||||
/*
|
||||
* Test de la connexion
|
||||
*/
|
||||
if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') {
|
||||
if (getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE') === Ldap::SYNCHRO_DOLIBARR_TO_LDAP) {
|
||||
$butlabel = $langs->trans("LDAPTestSynchroMemberType");
|
||||
$testlabel = 'testmembertype';
|
||||
$key = $conf->global->LDAP_KEY_MEMBERS_TYPES;
|
||||
|
||||
@ -192,7 +192,7 @@ print "</tr>\n";
|
||||
// DN Pour les utilisateurs
|
||||
print '<!-- LDAP_USER_DN -->';
|
||||
print '<tr class="oddeven"><td><span class="fieldrequired">'.$langs->trans("LDAPUserDn").'</span></td><td>';
|
||||
print '<input size="48" type="text" name="user" value="'.$conf->global->LDAP_USER_DN.'">';
|
||||
print '<input size="48" type="text" name="user" value="'.getDolGlobalString('LDAP_USER_DN').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPUserDnExample").'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
@ -200,7 +200,7 @@ print '</tr>';
|
||||
// List of object class used to define attributes in structure
|
||||
print '<!-- LDAP_USER_OBJECT_CLASS -->';
|
||||
print '<tr class="oddeven"><td><span class="fieldrequired">'.$langs->trans("LDAPUserObjectClassList").'</span></td><td>';
|
||||
print '<input size="48" type="text" name="objectclass" value="'.$conf->global->LDAP_USER_OBJECT_CLASS.'">';
|
||||
print '<input size="48" type="text" name="objectclass" value="'.getDolGlobalString('LDAP_USER_OBJECT_CLASS').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPUserObjectClassListExample").'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
@ -208,7 +208,7 @@ print '</tr>';
|
||||
// Filter, used to filter search
|
||||
print '<!-- LDAP_FILTER_CONNECTION -->';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFilterConnection").'</td><td>';
|
||||
print '<input size="48" type="text" name="filterconnection" value="'.$conf->global->LDAP_FILTER_CONNECTION.'">';
|
||||
print '<input size="48" type="text" name="filterconnection" value="'.getDolGlobalString('LDAP_FILTER_CONNECTION').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFilterConnectionExample").'</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
@ -225,168 +225,168 @@ print "</tr>\n";
|
||||
|
||||
// Common name
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldFullname").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldfullname" value="'.$conf->global->LDAP_FIELD_FULLNAME.'">';
|
||||
print '<input size="25" type="text" name="fieldfullname" value="'.getDolGlobalString('LDAP_FIELD_FULLNAME').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldFullnameExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_FULLNAME"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_FULLNAME) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_FULLNAME"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_FULLNAME') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Name
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldName").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldname" value="'.$conf->global->LDAP_FIELD_NAME.'">';
|
||||
print '<input size="25" type="text" name="fieldname" value="'.getDolGlobalString('LDAP_FIELD_NAME').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldNameExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_NAME"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_NAME) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_NAME"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_NAME') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldFirstName").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldfirstname" value="'.$conf->global->LDAP_FIELD_FIRSTNAME.'">';
|
||||
print '<input size="25" type="text" name="fieldfirstname" value="'.getDolGlobalString('LDAP_FIELD_FIRSTNAME').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldFirstNameExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_FIRSTNAME"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_FIRSTNAME) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_FIRSTNAME"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_FIRSTNAME') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Login unix
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldLoginUnix").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldlogin" value="'.$conf->global->LDAP_FIELD_LOGIN.'">';
|
||||
print '<input size="25" type="text" name="fieldlogin" value="'.getDolGlobalString('LDAP_FIELD_LOGIN').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldLoginExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_LOGIN"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_LOGIN"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_LOGIN') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Login samba
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldLoginSamba").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldloginsamba" value="'.$conf->global->LDAP_FIELD_LOGIN_SAMBA.'">';
|
||||
print '<input size="25" type="text" name="fieldloginsamba" value="'.getDolGlobalString('LDAP_FIELD_LOGIN_SAMBA').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldLoginSambaExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_LOGIN_SAMBA"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN_SAMBA) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_LOGIN_SAMBA"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_LOGIN_SAMBA') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Password not crypted
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldPasswordNotCrypted").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldpassword" value="'.$conf->global->LDAP_FIELD_PASSWORD.'">';
|
||||
print '<input size="25" type="text" name="fieldpassword" value="'.getDolGlobalString('LDAP_FIELD_PASSWORD').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldPasswordExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Password crypted
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldPasswordCrypted").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldpasswordcrypted" value="'.$conf->global->LDAP_FIELD_PASSWORD_CRYPTED.'">';
|
||||
print '<input size="25" type="text" name="fieldpasswordcrypted" value="'.getDolGlobalString('LDAP_FIELD_PASSWORD_CRYPTED').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldPasswordExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Mail
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldMail").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldmail" value="'.$conf->global->LDAP_FIELD_MAIL.'">';
|
||||
print '<input size="25" type="text" name="fieldmail" value="'.getDolGlobalString('LDAP_FIELD_MAIL').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldMailExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_MAIL"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_MAIL) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_MAIL"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_MAIL') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Phone
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldPhone").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldphone" value="'.$conf->global->LDAP_FIELD_PHONE.'">';
|
||||
print '<input size="25" type="text" name="fieldphone" value="'.getDolGlobalString('LDAP_FIELD_PHONE').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldPhoneExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_PHONE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_PHONE) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_PHONE"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_PHONE') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Mobile
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldMobile").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldmobile" value="'.$conf->global->LDAP_FIELD_MOBILE.'">';
|
||||
print '<input size="25" type="text" name="fieldmobile" value="'.getDolGlobalString('LDAP_FIELD_MOBILE').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_MOBILE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_MOBILE) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_MOBILE"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_MOBILE') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_FIELD_SKYPE.'">';
|
||||
print '<input size="25" type="text" name="fieldskype" value="'.getDolGlobalString('LDAP_FIELD_SKYPE').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_SKYPE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SKYPE) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_SKYPE"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_SKYPE') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Fax
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldfax" value="'.$conf->global->LDAP_FIELD_FAX.'">';
|
||||
print '<input size="25" type="text" name="fieldfax" value="'.getDolGlobalString('LDAP_FIELD_FAX').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldFaxExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_FAX"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_FAX) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_FAX"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_FAX') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldCompany").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldcompany" value="'.$conf->global->LDAP_FIELD_COMPANY.'">';
|
||||
print '<input size="25" type="text" name="fieldcompany" value="'.getDolGlobalString('LDAP_FIELD_COMPANY').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldCompanyExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Address
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldAddress").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldaddress" value="'.$conf->global->LDAP_FIELD_ADDRESS.'">';
|
||||
print '<input size="25" type="text" name="fieldaddress" value="'.getDolGlobalString('LDAP_FIELD_ADDRESS').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldAddressExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// ZIP
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldZip").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldzip" value="'.$conf->global->LDAP_FIELD_ZIP.'">';
|
||||
print '<input size="25" type="text" name="fieldzip" value="'.getDolGlobalString('LDAP_FIELD_ZIP').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldZipExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// TOWN
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldTown").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldtown" value="'.$conf->global->LDAP_FIELD_TOWN.'">';
|
||||
print '<input size="25" type="text" name="fieldtown" value="'.getDolGlobalString('LDAP_FIELD_TOWN').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldTownExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// COUNTRY
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldCountry").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldcountry" value="'.$conf->global->LDAP_FIELD_COUNTRY.'">';
|
||||
print '<input size="25" type="text" name="fieldcountry" value="'.getDolGlobalString('LDAP_FIELD_COUNTRY').'">';
|
||||
print '</td><td> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Title
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldTitle").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldtitle" value="'.$conf->global->LDAP_FIELD_TITLE.'">';
|
||||
print '<input size="25" type="text" name="fieldtitle" value="'.getDolGlobalString('LDAP_FIELD_TITLE').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldTitleExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Note
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Note").'</td><td>';
|
||||
print '<input size="25" type="text" name="fielddescription" value="'.$conf->global->LDAP_FIELD_DESCRIPTION.'">';
|
||||
print '<input size="25" type="text" name="fielddescription" value="'.getDolGlobalString('LDAP_FIELD_DESCRIPTION').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldDescriptionExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Sid
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldSid").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldsid" value="'.$conf->global->LDAP_FIELD_SID.'">';
|
||||
print '<input size="25" type="text" name="fieldsid" value="'.getDolGlobalString('LDAP_FIELD_SID').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldSidExample").'</td>';
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_SID"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) ? ' checked' : '')."></td>";
|
||||
print '<td class="right"><input type="radio" name="key" value="LDAP_FIELD_SID"'.(getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_SID') ? ' checked' : '')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Group id
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldGroupid").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldgroupid" value="'.$conf->global->LDAP_FIELD_GROUPID.'">';
|
||||
print '<input size="25" type="text" name="fieldgroupid" value="'.getDolGlobalString('LDAP_FIELD_GROUPID').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldGroupidExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Userid
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldUserid").'</td><td>';
|
||||
print '<input size="25" type="text" name="fielduserid" value="'.$conf->global->LDAP_FIELD_USERID.'">';
|
||||
print '<input size="25" type="text" name="fielduserid" value="'.getDolGlobalString('LDAP_FIELD_USERID').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldUseridExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Home Directory
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldHomedirectory").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldhomedirectory" value="'.$conf->global->LDAP_FIELD_HOMEDIRECTORY.'">';
|
||||
print '<input size="25" type="text" name="fieldhomedirectory" value="'.getDolGlobalString('LDAP_FIELD_HOMEDIRECTORY').'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldHomedirectoryExample").'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Home Directory Prefix
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPFieldHomedirectoryprefix").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldhomedirectoryprefix" value="'.$conf->global->LDAP_FIELD_HOMEDIRECTORYPREFIX.'">';
|
||||
print '<input size="25" type="text" name="fieldhomedirectoryprefix" value="'.getDolGlobalString('LDAP_FIELD_HOMEDIRECTORYPREFIX').'">';
|
||||
print '</td><td></td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '</tr>';
|
||||
@ -405,20 +405,20 @@ print '</form>';
|
||||
/*
|
||||
* Test de la connexion
|
||||
*/
|
||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') {
|
||||
if (getDolGlobalString('LDAP_SYNCHRO_ACTIVE') == Ldap::SYNCHRO_DOLIBARR_TO_LDAP) {
|
||||
$butlabel = $langs->trans("LDAPTestSynchroUser");
|
||||
$testlabel = 'testuser';
|
||||
$key = $conf->global->LDAP_KEY_USERS;
|
||||
$dn = $conf->global->LDAP_USER_DN;
|
||||
$objectclass = $conf->global->LDAP_USER_OBJECT_CLASS;
|
||||
$key = getDolGlobalString('LDAP_KEY_USERS');
|
||||
$dn = getDolGlobalString('LDAP_USER_DN');
|
||||
$objectclass = getDolGlobalString('LDAP_USER_OBJECT_CLASS');
|
||||
|
||||
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
|
||||
} elseif ($conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') {
|
||||
} elseif (getDolGlobalString('LDAP_SYNCHRO_ACTIVE') == Ldap::SYNCHRO_LDAP_TO_DOLIBARR) {
|
||||
$butlabel = $langs->trans("LDAPTestSearch");
|
||||
$testlabel = 'testsearchuser';
|
||||
$key = $conf->global->LDAP_KEY_USERS;
|
||||
$dn = $conf->global->LDAP_USER_DN;
|
||||
$objectclass = $conf->global->LDAP_USER_OBJECT_CLASS;
|
||||
$key = getDolGlobalString('LDAP_KEY_USERS');
|
||||
$dn = getDolGlobalString('LDAP_USER_DN');
|
||||
$objectclass = getDolGlobalString('LDAP_USER_OBJECT_CLASS');
|
||||
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
|
||||
}
|
||||
|
||||
@ -479,29 +479,29 @@ if (function_exists("ldap_connect")) {
|
||||
|
||||
if ($result > 0) {
|
||||
$required_fields = array(
|
||||
$conf->global->LDAP_KEY_USERS,
|
||||
$conf->global->LDAP_FIELD_FULLNAME,
|
||||
$conf->global->LDAP_FIELD_NAME,
|
||||
$conf->global->LDAP_FIELD_FIRSTNAME,
|
||||
$conf->global->LDAP_FIELD_LOGIN,
|
||||
$conf->global->LDAP_FIELD_LOGIN_SAMBA,
|
||||
$conf->global->LDAP_FIELD_PASSWORD,
|
||||
$conf->global->LDAP_FIELD_PASSWORD_CRYPTED,
|
||||
$conf->global->LDAP_FIELD_PHONE,
|
||||
$conf->global->LDAP_FIELD_FAX,
|
||||
$conf->global->LDAP_FIELD_SKYPE,
|
||||
$conf->global->LDAP_FIELD_MOBILE,
|
||||
$conf->global->LDAP_FIELD_MAIL,
|
||||
$conf->global->LDAP_FIELD_TITLE,
|
||||
$conf->global->LDAP_FIELD_DESCRIPTION,
|
||||
$conf->global->LDAP_FIELD_SID
|
||||
getDolGlobalString('LDAP_KEY_USERS'),
|
||||
getDolGlobalString('LDAP_FIELD_FULLNAME'),
|
||||
getDolGlobalString('LDAP_FIELD_NAME'),
|
||||
getDolGlobalString('LDAP_FIELD_FIRSTNAME'),
|
||||
getDolGlobalString('LDAP_FIELD_LOGIN'),
|
||||
getDolGlobalString('LDAP_FIELD_LOGIN_SAMBA'),
|
||||
getDolGlobalString('LDAP_FIELD_PASSWORD'),
|
||||
getDolGlobalString('LDAP_FIELD_PASSWORD_CRYPTED'),
|
||||
getDolGlobalString('LDAP_FIELD_PHONE'),
|
||||
getDolGlobalString('LDAP_FIELD_FAX'),
|
||||
getDolGlobalString('LDAP_FIELD_SKYPE'),
|
||||
getDolGlobalString('LDAP_FIELD_MOBILE'),
|
||||
getDolGlobalString('LDAP_FIELD_MAIL'),
|
||||
getDolGlobalString('LDAP_FIELD_TITLE'),
|
||||
getDolGlobalString('LDAP_FIELD_DESCRIPTION'),
|
||||
getDolGlobalString('LDAP_FIELD_SID')
|
||||
);
|
||||
|
||||
// Remove from required_fields all entries not configured in LDAP (empty) and duplicated
|
||||
$required_fields = array_unique(array_values(array_filter($required_fields, "dol_validElement")));
|
||||
|
||||
// Get from LDAP database an array of results
|
||||
$ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 1);
|
||||
$ldapusers = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 1);
|
||||
//$ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, '', 1);
|
||||
|
||||
if (is_array($ldapusers)) {
|
||||
@ -523,8 +523,8 @@ if (function_exists("ldap_connect")) {
|
||||
print "<br>\n";
|
||||
print "LDAP search for user:<br>\n";
|
||||
print "search: *<br>\n";
|
||||
print "userDN: ".$conf->global->LDAP_USER_DN."<br>\n";
|
||||
print "useridentifier: ".$conf->global->LDAP_KEY_USERS."<br>\n";
|
||||
print "userDN: ".getDolGlobalString('LDAP_USER_DN')."<br>\n";
|
||||
print "useridentifier: ".getDolGlobalString('LDAP_KEY_USERS')."<br>\n";
|
||||
print "required_fields: ".implode(',', $required_fields)."<br>\n";
|
||||
print "=> ".count($liste)." records<br>\n";
|
||||
print "\n<br>";
|
||||
|
||||
@ -237,7 +237,7 @@ if (empty($mysoc->country_code)) {
|
||||
|
||||
$sql = "SELECT taux as vat_rate, t.code as vat_code, t.localtax1 as localtax_rate1, t.localtax2 as localtax_rate2";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
|
||||
$sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($mysoc->country_code)."' AND (t.taux <> 0 OR t.localtax1 <>0 OR t.localtax2 <>0)";
|
||||
$sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($mysoc->country_code)."' AND (t.taux <> 0 OR t.localtax1 <> '0' OR t.localtax2 <> '0')";
|
||||
$sql .= " ORDER BY t.taux ASC";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
|
||||
@ -829,27 +829,41 @@ if ($action == 'edit') {
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') {
|
||||
if (!empty($conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD)) {
|
||||
// List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com'
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD);
|
||||
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD -->'.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD);
|
||||
} else {
|
||||
// MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'.
|
||||
if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS)) {
|
||||
// List of IP show as record to add in SPF if we use the mail method
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
|
||||
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS -->'.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS)) {
|
||||
// List of IP show as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]'
|
||||
// TODO Add a key to allow to show the IP/name of server detected dynamically
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
|
||||
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS -->'.$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
|
||||
}
|
||||
if (!empty($conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD)) { // Should be required only if you have preset the Dolibarr to use your own SMTP and you want to warn users to update their domain name to match your SMTP server.
|
||||
// List of string to add in SPF if we use the smtp method. Example 'include:spf.mydomain.com'
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD);
|
||||
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD -->'.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD);
|
||||
}
|
||||
}
|
||||
$companyemail = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL');
|
||||
$dnsinfo = false;
|
||||
if (!empty($companyemail) && function_exists('dns_get_record')) {
|
||||
$arrayofemailparts = explode('@', $companyemail);
|
||||
if (count($arrayofemailparts) == 2) {
|
||||
$domain = $arrayofemailparts[1];
|
||||
$dnsinfo = dns_get_record($domain, DNS_TXT);
|
||||
}
|
||||
}
|
||||
if (!empty($dnsinfo) && is_array($dnsinfo)) {
|
||||
foreach ($dnsinfo as $info) {
|
||||
if (strpos($info['txt'], 'v=spf') !== false) {
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("ActualMailSPFRecordFound", $info['txt']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($text) {
|
||||
print info_admin($text);
|
||||
}
|
||||
|
||||
@ -654,7 +654,7 @@ if ($action == 'view') {
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$align.'">';
|
||||
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank" rel="noopener noreferrer">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
} elseif (!empty($tabhelp[$id][$value])) {
|
||||
if (in_array($value, array('topic'))) {
|
||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click
|
||||
|
||||
@ -70,6 +70,9 @@ print '<!-- Force style container -->'."\n".'<style>
|
||||
.id-container {
|
||||
width: 100%;
|
||||
}
|
||||
#id-right {
|
||||
padding-left: unset;
|
||||
}
|
||||
</style>';
|
||||
|
||||
$arrayofnatures = array('core'=>$langs->transnoentitiesnoconv("Core"), 'external'=>$langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
|
||||
@ -331,7 +334,7 @@ if ($mode == 'desc') {
|
||||
$editor_url = 'http://'.$editor_url;
|
||||
}
|
||||
if (!empty($objMod->editor_url) && !preg_match('/dolibarr\.org/i', $objMod->editor_url)) {
|
||||
$textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' <a href="'.$editor_url.'" target="_blank">'.$objMod->editor_url.'</a>';
|
||||
$textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' <a href="'.$editor_url.'" target="_blank" rel="noopener noreferrer external">'.$objMod->editor_url.'</a>';
|
||||
}
|
||||
$text .= $textexternal;
|
||||
$text .= '<br>';
|
||||
|
||||
@ -542,7 +542,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||
$moreforfilter .= $form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), $langs->trans('Origin'), 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1);
|
||||
$moreforfilter .= '</div>';
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
$array_version = array('stable'=>$langs->transnoentitiesnoconv("Stable"));
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 0) {
|
||||
$array_version['deprecated'] = $langs->trans("Deprecated");
|
||||
@ -1000,9 +1000,9 @@ if ($mode == 'marketplace') {
|
||||
|
||||
print '<tr class="oddeven">'."\n";
|
||||
$url = 'https://www.dolistore.com';
|
||||
print '<td class="hideonsmartphone"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
||||
print '<td class="hideonsmartphone"><a href="'.$url.'" target="_blank" rel="noopener noreferrer external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
||||
print '<td><span class="opacitymedium">'.$langs->trans("DoliStoreDesc").'</span></td>';
|
||||
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
||||
print '<td><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$url.'</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>\n";
|
||||
@ -1081,7 +1081,7 @@ if ($mode == 'deploy') {
|
||||
$allowonlineinstall = false;
|
||||
}
|
||||
|
||||
$fullurl = '<a href="'.$urldolibarrmodules.'" target="_blank">'.$urldolibarrmodules.'</a>';
|
||||
$fullurl = '<a href="'.$urldolibarrmodules.'" target="_blank" rel="noopener noreferrer">'.$urldolibarrmodules.'</a>';
|
||||
$message = '';
|
||||
if (!empty($allowonlineinstall)) {
|
||||
if (!in_array('/custom', explode(',', $dolibarr_main_url_root_alt))) {
|
||||
@ -1273,10 +1273,10 @@ if ($mode == 'develop') {
|
||||
print '<tr class="oddeven" height="80">'."\n";
|
||||
$url = 'https://partners.dolibarr.org';
|
||||
print '<td class="left">';
|
||||
print'<a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner.png"></a>';
|
||||
print'<a href="'.$url.'" target="_blank" rel="noopener noreferrer external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner.png"></a>';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';
|
||||
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
||||
print '<td><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$url.'</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -169,6 +169,7 @@ $head = multicurrencyAdminPrepareHead();
|
||||
print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "multicurrency");
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
@ -191,7 +192,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX');
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX', null, null, 0, 0, 0, 2, 0, 1);
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MULTICURRENCY_USE_ORIGIN_TX", $arrval, $conf->global->MULTICURRENCY_USE_ORIGIN_TX);
|
||||
@ -242,6 +243,7 @@ print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -264,7 +266,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="fieldrequired"><a target="_blank" href="'.$urlforapilayer.'">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
|
||||
print '<td class="fieldrequired"><a target="_blank" rel="noopener noreferrer external" href="'.$urlforapilayer.'">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="text" name="MULTICURRENCY_APP_ID" value="'.$conf->global->MULTICURRENCY_APP_ID.'" size="28" /> ';
|
||||
print '</td></tr>';
|
||||
@ -290,7 +292,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) {
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<table class="noborder centpercent nomarginbottom">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n";
|
||||
@ -305,7 +307,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>'.$form->selectCurrency('', 'code', 1).'</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="text" name="rate" value="" class="width75 right" placeholder="'.$langs->trans('Rate').'" /> ';
|
||||
print '<input type="submit" class="button button-add" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button button-add small" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -97,6 +97,10 @@ if ($action == 'setvalue' && $user->admin) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE", GETPOST("notif_disable", "alphawithlgt"), 'chaine', 0, '', $conf->entity);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
@ -199,6 +203,29 @@ if (!empty($conf->global->NOTIFICATION_EMAIL_FROM) && !isValidEmail($conf->globa
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("NotificationDisableConfirmMessageUser").'</td>';
|
||||
print '<td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER", $arrval, $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("NotificationDisableConfirmMessageFix").'</td>';
|
||||
print '<td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX", $arrval, $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
@ -196,6 +196,12 @@ $arraydetailsforpdffoot = array(
|
||||
3 => $langs->transnoentitiesnoconv('DisplayCompanyInfoAndManagers')
|
||||
);
|
||||
|
||||
$arraylistofpdfformat = array(
|
||||
0 => $langs->transnoentitiesnoconv('PDF 1.7'),
|
||||
1 => $langs->transnoentitiesnoconv('PDF/A-1b'),
|
||||
3 => $langs->transnoentitiesnoconv('PDF/A-3b'),
|
||||
);
|
||||
|
||||
$s = $langs->trans("LibraryToBuildPDF")."<br>";
|
||||
$i = 0;
|
||||
$pdf = pdf_getInstance('A4');
|
||||
@ -540,11 +546,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_A").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PDF_USE_A');
|
||||
} else {
|
||||
print $form->selectyesno('PDF_USE_A', (empty($conf->global->PDF_USE_A) ? 0 : $conf->global->PDF_USE_A), 1);
|
||||
}
|
||||
print $form->selectarray('PDF_USE_A', $arraylistofpdfformat, (empty($conf->global->PDF_USE_A) ? 0 : $conf->global->PDF_USE_A));
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -102,11 +102,11 @@ if ($action == "set") {
|
||||
}
|
||||
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||
if (! ($res > 0)) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
@ -297,7 +297,7 @@ foreach ($dirmodels as $reldir)
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
if ($modulequalified) {
|
||||
|
||||
@ -100,7 +100,7 @@ if (empty($conf->use_javascript_ajax)) {
|
||||
print $form->selectarray("activate_RESOURCE_USE_SEARCH_TO_SELECT", $arrval, $conf->global->RESOURCE_USE_SEARCH_TO_SELECT);
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button" name="RESOURCE_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button small" name="RESOURCE_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
@ -108,7 +108,7 @@ print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans('DisabledResourceLinkUser').'</td>';
|
||||
print '<td>';
|
||||
print '<td class="right">';
|
||||
echo ajax_constantonoff('RESOURCE_HIDE_ADD_CONTACT_USER');
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
@ -117,7 +117,7 @@ print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans('DisabledResourceLinkContact').'</td>';
|
||||
print '<td>';
|
||||
print '<td class="right">';
|
||||
echo ajax_constantonoff('RESOURCE_HIDE_ADD_CONTACT_THIPARTY');
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
@ -126,7 +126,7 @@ print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans('EnableResourceUsedInEventCheck').'</td>';
|
||||
print '<td>';
|
||||
print '<td class="right">';
|
||||
echo ajax_constantonoff('RESOURCE_USED_IN_EVENT_CHECK');
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
|
||||
@ -683,6 +683,8 @@ if ($conf->use_javascript_ajax) {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("SOCIETE_ASK_FOR_WAREHOUSE", $arrval, $conf->global->SOCIETE_ASK_FOR_WAREHOUSE);
|
||||
}
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("WarehouseAskWarehouseDuringPropal").'</td>';
|
||||
@ -693,6 +695,9 @@ if ($conf->use_javascript_ajax) {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL", $arrval, $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL);
|
||||
}
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("WarehouseAskWarehouseDuringOrder").'</td>';
|
||||
print '<td class="right">';
|
||||
@ -702,10 +707,23 @@ if ($conf->use_javascript_ajax) {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $arrval, $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER);
|
||||
}
|
||||
print "</td>";
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
/*
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("WarehouseAskWarehouseDuringProject").'</td>';
|
||||
print '<td class="right">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_PROJECT');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("WAREHOUSE_ASK_WAREHOUSE_DURING_PROJECT", $arrval, $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROJECT);
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
*/
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc"));
|
||||
|
||||
@ -187,8 +187,6 @@ if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && $user->entity) {
|
||||
}
|
||||
|
||||
|
||||
//print "conf->global->MAIN_FEATURES_LEVEL = ".$conf->global->MAIN_FEATURES_LEVEL."<br><br>\n";
|
||||
|
||||
// Output mode
|
||||
print load_fiche_titre($langs->trans("SyslogOutput"), '', '');
|
||||
|
||||
@ -207,7 +205,7 @@ foreach ($syslogModules as $moduleName) {
|
||||
|
||||
$moduleactive = (int) $module->isActive();
|
||||
//print $moduleName." = ".$moduleactive." - ".$module->getName()." ".($moduleactive == -1)."<br>\n";
|
||||
if (($moduleactive == -1) && empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (($moduleactive == -1) && getDolGlobalInt('MAIN_FEATURES_LEVEL') == 0) {
|
||||
continue; // Some modules are hidden if not activable and not into debug mode (end user must not see them)
|
||||
}
|
||||
|
||||
|
||||
@ -72,8 +72,8 @@ print '</li></ul>';
|
||||
|
||||
print $langs->trans("Developpers").':';
|
||||
print '<ul>';
|
||||
print '<li>'.$langs->trans("SourcesRepository").': <a href="https://www.github.com/Dolibarr/dolibarr" target="_blank" rel="external">https://www.github.com/Dolibarr/dolibarr</a></li>';
|
||||
print '<li>'.$langs->trans("SeeWikiForAllTeam").': <a href="https://wiki.dolibarr.org/index.php/Dolibarr_Project" target="_blank" rel="external">https://wiki.dolibarr.org/index.php/Dolibarr_Project</a></li>';
|
||||
print '<li>'.$langs->trans("SourcesRepository").': <a href="https://www.github.com/Dolibarr/dolibarr" target="_blank" rel="noopener noreferrer external">https://www.github.com/Dolibarr/dolibarr</a></li>';
|
||||
print '<li>'.$langs->trans("SeeWikiForAllTeam").': <a href="https://wiki.dolibarr.org/index.php/Dolibarr_Project" target="_blank" rel="noopener noreferrer external">https://wiki.dolibarr.org/index.php/Dolibarr_Project</a></li>';
|
||||
print '</ul>';
|
||||
|
||||
//print "<br>\n";
|
||||
@ -82,56 +82,56 @@ print $langs->trans("OtherInformations").':';
|
||||
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.org/" rel="external">'.$langs->trans("OfficialWebSite").'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.org/" rel="noopener noreferrer external">'.$langs->trans("OfficialWebSite").'</a>';
|
||||
print '</li>';
|
||||
// Show local site
|
||||
/*
|
||||
if (preg_match('/^fr_/i', $langs->getDefaultLang()))
|
||||
{
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.fr/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("France")).'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.fr/" rel="noopener noreferrer external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("France")).'</a>';
|
||||
print '</li>';
|
||||
}
|
||||
if (preg_match('/^el_/i', $langs->getDefaultLang()))
|
||||
{
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.gr/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Greece")).'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.gr/" rel="noopener noreferrer external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Greece")).'</a>';
|
||||
print '</li>';
|
||||
}
|
||||
if (preg_match('/^es_/i', $langs->getDefaultLang()))
|
||||
{
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.es/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Spain")).'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.es/" rel="noopener noreferrer external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Spain")).'</a>';
|
||||
print '</li>';
|
||||
}
|
||||
if (preg_match('/^it_/i', $langs->getDefaultLang()))
|
||||
{
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.it/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Italy")).'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.it/" rel="noopener noreferrer external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Italy")).'</a>';
|
||||
print '</li>';
|
||||
}
|
||||
if (preg_match('/^de_/i', $langs->getDefaultLang()))
|
||||
{
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.de/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Germany")).'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.de/" rel="noopener noreferrer external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Germany")).'</a>';
|
||||
print '</li>';
|
||||
}*/
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://wiki.dolibarr.org/" rel="external">'.$langs->trans("OfficialWiki").'</a>';
|
||||
print '<a target="_blank" href="https://wiki.dolibarr.org/" rel="noopener noreferrer external">'.$langs->trans("OfficialWiki").'</a>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
|
||||
print $langs->trans("Demo").':';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.org/onlinedemo/" rel="external">'.$langs->trans("OfficialDemo").'</a>';
|
||||
print '<a target="_blank" href="https://www.dolibarr.org/onlinedemo/" rel="noopener noreferrer external">'.$langs->trans("OfficialDemo").'</a>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
|
||||
print $langs->trans("ModulesMarketPlaces").':';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="https://www.dolistore.com" rel="external">'.$langs->trans("OfficialMarketPlace").'</a>';
|
||||
print '<a target="_blank" href="https://www.dolistore.com" rel="noopener noreferrer external">'.$langs->trans("OfficialMarketPlace").'</a>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
|
||||
@ -143,7 +143,7 @@ print $langs->trans("HelpCenter").':';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
//print $langs->trans("SeeWikiPage",'http://wiki.dolibarr.org/index.php/List_of_OpenSource_Software_companies_and_freelancers');
|
||||
print '<a target="_blank" href="'.DOL_URL_ROOT.'/support/index.php" data-ajax="false">'.$langs->trans("HelpCenter").'</a>';
|
||||
print '<a target="_blank" rel="noopener noreferrer external" href="'.DOL_URL_ROOT.'/support/index.php" data-ajax="false">'.$langs->trans("HelpCenter").'</a>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
|
||||
@ -158,15 +158,15 @@ if (preg_match('/^fr_/i', $langs->getDefaultLang())) {
|
||||
if (preg_match('/^es_/i', $langs->getDefaultLang())) {
|
||||
$url = 'https://wiki.dolibarr.org/index.php/Subscribirse';
|
||||
}
|
||||
print '<li><a href="'.$url.'" target="_blank" rel="external">'.$langs->trans("SubscribeToFoundation").'</a></li>';
|
||||
print '<li><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$langs->trans("SubscribeToFoundation").'</a></li>';
|
||||
print '</ul>';
|
||||
|
||||
print $langs->trans("SocialNetworks").':';
|
||||
|
||||
print '<ul>';
|
||||
|
||||
print '<li><a href="https://facebook.com/dolibarr" target="_blank" rel="external">FaceBook</a></li>';
|
||||
print '<li><a href="https://twitter.com/dolibarr" target="_blank" rel="external">Twitter</a></li>';
|
||||
print '<li><a href="https://facebook.com/dolibarr" target="_blank" rel="noopener noreferrer external">FaceBook</a></li>';
|
||||
print '<li><a href="https://twitter.com/dolibarr" target="_blank" rel="noopener noreferrer external">Twitter</a></li>';
|
||||
|
||||
print '</ul>';
|
||||
|
||||
@ -182,11 +182,11 @@ if (preg_match('/^es_/i', $langs->getDefaultLang())) {
|
||||
$url = 'https://wiki.dolibarr.org/index.php/Soluciones_en_la_Nube';
|
||||
}
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="'.$url.'" rel="external">'.$title.'</a>';
|
||||
print '<a target="_blank" rel="noopener noreferrer external" href="'.$url.'">'.$title.'</a>';
|
||||
print '</li>';
|
||||
$url = 'https://partners.dolibarr.org'; $title = $langs->trans("ReferencedPreferredPartners");
|
||||
print '<li>';
|
||||
print '<a target="_blank" href="'.$url.'" rel="external">'.$title.'</a>';
|
||||
print '<a target="_blank" rel="noopener noreferrer external" href="'.$url.'">'.$title.'</a>';
|
||||
print '</li>';
|
||||
|
||||
print '</ul>';
|
||||
|
||||
@ -93,7 +93,7 @@ $version = DOL_VERSION;
|
||||
if (preg_match('/[a-z]+/i', $version)) {
|
||||
$version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log.
|
||||
}
|
||||
print ' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank">'.$langs->trans("SeeChangeLog").'</a>';
|
||||
print ' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank" rel="noopener noreferrer external">'.$langs->trans("SeeChangeLog").'</a>';
|
||||
|
||||
$newversion = '';
|
||||
if (function_exists('curl_init')) {
|
||||
@ -120,7 +120,7 @@ if (function_exists('curl_init')) {
|
||||
// Show version
|
||||
print $langs->trans("LastStableVersion").' : <b>'.(($version != '0.0') ? $version : $langs->trans("Unknown")).'</b>';
|
||||
if ($version != '0.0') {
|
||||
print ' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank">'.$langs->trans("SeeChangeLog").'</a>';
|
||||
print ' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank" rel="noopener noreferrer external">'.$langs->trans("SeeChangeLog").'</a>';
|
||||
}
|
||||
} else {
|
||||
print $langs->trans("LastStableVersion").' : <b>'.$langs->trans("UpdateServerOffline").'</b>';
|
||||
|
||||
@ -270,7 +270,7 @@ print '</form>';
|
||||
echo '<div>';
|
||||
echo '<table class="noborder centpercent">';
|
||||
echo '<thead>';
|
||||
echo '<tr class="liste_titre"><th>' . $langs->trans('Parameter') . '</th><th>' . $langs->trans('Value') . '</th></tr>';
|
||||
echo '<tr class="liste_titre"><th>'.$langs->trans('Parameter').'</th><th>'.$langs->trans('Value').'</th></tr>';
|
||||
echo '</thead>';
|
||||
echo '<tbody>';
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ $head = ticketAdminPrepareHead();
|
||||
|
||||
print dol_get_fiche_head($head, 'public', $langs->trans("Module56000Name"), -1, "ticket");
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a class="wordbreak" href="'.DOL_URL_ROOT.'/public/ticket/index.php" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a class="wordbreak" href="'.DOL_URL_ROOT.'/public/ticket/index.php" target="_blank" rel="noopener noreferrer">'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
@ -207,6 +207,9 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
//if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&radio_dump=postgresql_options">'.$langs->trans("UnHidePassword").'</a>';
|
||||
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '</fieldset>';
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ $_SESSION["commandbackuptorun"] = '';
|
||||
$_SESSION["commandbackupresult"] = '';
|
||||
|
||||
// Increase limit of time. Works only if we are not in safe mode
|
||||
$ExecTimeLimit = 600; // Set it to 0 to not use a forced time limit
|
||||
$ExecTimeLimit = 600; // Set it to 0 to not use a forced time limit
|
||||
if (!empty($ExecTimeLimit)) {
|
||||
$err = error_reporting();
|
||||
error_reporting(0); // Disable all errors
|
||||
|
||||
@ -98,7 +98,9 @@ if (!empty($ExecTimeLimit)) {
|
||||
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
|
||||
error_reporting($err);
|
||||
}
|
||||
$MemoryLimit = 0;
|
||||
|
||||
/* If value has been forced with a php_admin_value, this has no effect. Example of value: '512M' */
|
||||
$MemoryLimit = getDolGlobalString('MAIN_MEMORY_LIMIT_ARCHIVE_DATAROOT');
|
||||
if (!empty($MemoryLimit)) {
|
||||
@ini_set('memory_limit', $MemoryLimit);
|
||||
}
|
||||
|
||||
@ -116,14 +116,14 @@ print $langs->trans("Upgrade").'<br>';
|
||||
print '<hr>';
|
||||
print $langs->trans("ThisIsProcessToFollow").'<br>';
|
||||
print '<b>'.$langs->trans("StepNb", 1).'</b>: ';
|
||||
$fullurl = '<a href="'.$urldolibarr.'" target="_blank">'.$urldolibarr.'</a>';
|
||||
$fullurl = '<a href="'.$urldolibarr.'" target="_blank" rel="noopener noreferrer">'.$urldolibarr.'</a>';
|
||||
print str_replace('{s}', $fullurl, $langs->trans("DownloadPackageFromWebSite", '{s}')).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb", 2).'</b>: ';
|
||||
print str_replace('{s}', $dolibarrroot, $langs->trans("UnpackPackageInDolibarrRoot", '{s}')).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb", 3).'</b>: ';
|
||||
print $langs->trans("RemoveLock", $dolibarrdataroot.'/install.lock').'<br>';
|
||||
print '<b>'.$langs->trans("StepNb", 4).'</b>: ';
|
||||
$fullurl = '<a href="'.DOL_URL_ROOT.'/install/" target="_blank">'.DOL_URL_ROOT.'/install/</a>';
|
||||
$fullurl = '<a href="'.DOL_URL_ROOT.'/install/" target="_blank" rel="noopener noreferrer">'.DOL_URL_ROOT.'/install/</a>';
|
||||
print str_replace('{s}', $fullurl, $langs->trans("CallUpdatePage", '{s}')).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb", 5).'</b>: ';
|
||||
print $langs->trans("RestoreLock", $dolibarrdataroot.'/install.lock').'<br>';
|
||||
|
||||
@ -268,7 +268,7 @@ if ($mode == 'overwrite') {
|
||||
print '<div class="justify"><span class="opacitymedium">';
|
||||
print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
|
||||
$urlwikitranslatordoc = 'https://wiki.dolibarr.org/index.php/Translator_documentation';
|
||||
print ' ('.str_replace('{s1}', '<a href="'.$urlwikitranslatordoc.'" target="_blank">'.$langs->trans("Here").'</a>', $langs->trans("SeeAlso", '{s1}')).')<br>';
|
||||
print ' ('.str_replace('{s1}', '<a href="'.$urlwikitranslatordoc.'" target="_blank" rel="noopener noreferrer external">'.$langs->trans("Here").'</a>', $langs->trans("SeeAlso", '{s1}')).')<br>';
|
||||
print $langs->trans("TranslationOverwriteDesc", $langs->transnoentitiesnoconv("Language"), $langs->transnoentitiesnoconv("Key"), $langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n";
|
||||
print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."<br>\n";
|
||||
print '</span></div>';
|
||||
@ -556,7 +556,7 @@ if ($mode == 'searchkey') {
|
||||
print '<a class="reposition paddingrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=overwrite&langcode='.urlencode($langcode).'&transkey='.urlencode($key).'">'.img_edit_add($langs->trans("TranslationOverwriteKey")).'</a>';
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
$transifexlangfile = '$'; // $ means 'All'
|
||||
//$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key;
|
||||
$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key;
|
||||
|
||||
@ -460,7 +460,7 @@ if ($id) {
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$align.'">';
|
||||
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank" rel="noopener noreferrer">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
} elseif (!empty($tabhelp[$id][$value])) {
|
||||
if ($value == 'virtualhost') {
|
||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltipvirtual');
|
||||
|
||||
@ -123,9 +123,25 @@ $workflowcodes = array(
|
||||
),
|
||||
|
||||
// Automatic classification supplier order
|
||||
'WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION'=>array(
|
||||
'family'=>'classify_supplier_order',
|
||||
'position'=>63,
|
||||
'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (!empty($conf->reception->enabled)) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
|
||||
'picto'=>'supplier_order',
|
||||
'warning'=>''
|
||||
),
|
||||
|
||||
'WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION_CLOSED'=>array(
|
||||
'family'=>'classify_supplier_order',
|
||||
'position'=>64,
|
||||
'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (!empty($conf->reception->enabled)) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
|
||||
'picto'=>'supplier_order',
|
||||
'warning'=>''
|
||||
),
|
||||
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array(
|
||||
'family'=>'classify_supplier_order',
|
||||
'position'=>62,
|
||||
'position'=>65,
|
||||
'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
||||
'picto'=>'supplier_order',
|
||||
'warning'=>''
|
||||
@ -134,7 +150,7 @@ $workflowcodes = array(
|
||||
// Automatic classification reception
|
||||
'WORKFLOW_BILL_ON_RECEPTION'=>array(
|
||||
'family'=>'classify_reception',
|
||||
'position'=>64,
|
||||
'position'=>80,
|
||||
'enabled'=>(!empty($conf->reception->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))),
|
||||
'picto'=>'reception'
|
||||
),
|
||||
@ -142,7 +158,7 @@ $workflowcodes = array(
|
||||
// Automatic classification shipping
|
||||
'WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE' => array(
|
||||
'family' => 'classify_shipping',
|
||||
'position' => 66,
|
||||
'position' => 90,
|
||||
'enabled' => ! empty($conf->expedition->enabled) && ! empty($conf->facture->enabled),
|
||||
'picto' => 'shipment'
|
||||
)
|
||||
|
||||
@ -26,8 +26,8 @@
|
||||
require "../main.inc.php";
|
||||
|
||||
// Libraries
|
||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT . '/workstation/lib/workstation.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation.lib.php';
|
||||
//require_once "../class/myclass.class.php";
|
||||
|
||||
// Translations
|
||||
|
||||
@ -152,11 +152,11 @@ print '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("ApiExporerIs").':</span><br>';
|
||||
if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/explorer')) {
|
||||
$url = DOL_MAIN_URL_ROOT.'/api/index.php/explorer';
|
||||
print '<div class="urllink soixantepercent">'.img_picto('', 'globe').' <a href="'.$url.'" target="_blank">'.$url."</a></div><br>\n";
|
||||
print '<div class="urllink soixantepercent">'.img_picto('', 'globe').' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.$url."</a></div><br>\n";
|
||||
print '<div class="opacitymediumxxx"><br><span class="opacitymedium">'.$langs->trans("SwaggerDescriptionFile").':</span><br>';
|
||||
$urlswagger = DOL_MAIN_URL_ROOT.'/api/index.php/explorer/swagger.json?DOLAPIKEY=youruserapikey';
|
||||
//$urlswaggerreal = DOL_MAIN_URL_ROOT.'/api/index.php/explorer/swagger.json?DOLAPIKEY='.$user->api_key;
|
||||
print '<div class="urllink soixantepercent">'.img_picto('', 'globe').' <a href="'.$urlswagger.'" target="_blank">'.$urlswagger."</a></div><br>\n";
|
||||
print '<div class="urllink soixantepercent">'.img_picto('', 'globe').' <a href="'.$urlswagger.'" target="_blank" rel="noopener noreferrer">'.$urlswagger."</a></div><br>\n";
|
||||
print '</div>';
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
|
||||
@ -497,11 +497,11 @@ class Documents extends DolibarrApi
|
||||
throw new RestException(404, 'Search for modulepart '.$modulepart.' with Id '.$object->id.(!empty($object->ref) ? ' or Ref '.$object->ref : '').' does not return any document.');
|
||||
} else {
|
||||
if (($object->id) > 0 && !empty($modulepart)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/ecm/class/ecmfiles.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
||||
$ecmfile = new EcmFiles($this->db);
|
||||
$result = $ecmfile->fetchAll('', '', 0, 0, array('t.src_object_type' => $modulepart, 't.src_object_id' => $object->id));
|
||||
if ($result < 0) {
|
||||
throw new RestException(503, 'Error when retrieve ecm list : ' . $this->db->lasterror());
|
||||
throw new RestException(503, 'Error when retrieve ecm list : '.$this->db->lasterror());
|
||||
} elseif (is_array($ecmfile->lines) && count($ecmfile->lines) > 0) {
|
||||
$filearray['ecmfiles_infos'] = $ecmfile->lines;
|
||||
}
|
||||
|
||||
@ -316,8 +316,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->asset->write; // If you can create/edit, you can remove a file on card
|
||||
$genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->asset->write; // If you can create/edit, you can remove a file on card
|
||||
|
||||
print $formfile->showdocuments('asset', $filename, $filedir, $urlsource, 0, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
if (!empty($_POST['mode']) && $_POST['mode'] === 'label') { // Page is called to build a PDF and output, we must ne renew the token.
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
|
||||
define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
|
||||
}
|
||||
}
|
||||
|
||||
@ -277,10 +277,10 @@ dol_htmloutput_errors($mesg);
|
||||
//print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'<br>';
|
||||
//print '<br>';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; // The target is for brothers that open the file instead of downloading it
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; // The target is for brothers that open the file instead of downloading it
|
||||
print '<input type="hidden" name="mode" value="label">';
|
||||
print '<input type="hidden" name="action" value="builddoc">';
|
||||
print '<input type="hidden" name="token" value="'.currentToken().'">'; // The page will not renew the token but force download of a file, so we must use here currentToken
|
||||
print '<input type="hidden" name="token" value="'.currentToken().'">'; // The page will not renew the token but force download of a file, so we must use here currentToken
|
||||
|
||||
print '<div class="tagtable">';
|
||||
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
require '../../main.inc.php';
|
||||
|
||||
$action = GETPOST('action', 'alphanohtml');
|
||||
$select_product_val = GETPOST('select_product_val', 'int');
|
||||
$current_bom_id = GETPOST('current_bom_id', 'int');
|
||||
|
||||
global $db;
|
||||
|
||||
switch ($action) {
|
||||
case 'select_BOM':
|
||||
//Selection of nomenclatures corresponding to the selected product
|
||||
$sql = 'SELECT b.rowid, b.ref, b.label, b.fk_product, p.label AS product_label FROM '.MAIN_DB_PREFIX.'bom_bom AS b ';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'product AS p ON b.fk_product=p.rowid';
|
||||
$sql.= ' WHERE fk_product='.(int) $select_product_val.' AND b.rowid<>'. (int) $current_bom_id;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql && $db->num_rows($resql) > 0) {
|
||||
$options = array();
|
||||
$cpt=0;
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
$options[$obj->rowid] = $obj->ref.' - '.$obj->label;
|
||||
$cpt++;
|
||||
}
|
||||
print json_encode($options);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -243,6 +243,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -573,38 +574,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
|
||||
print '</table>';
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
let select_product_val;
|
||||
let current_bom_id = <?php echo $object->id?>;
|
||||
//On change on the bom select
|
||||
$('#idprod').on('change', function () {
|
||||
select_product_val = $('#idprod').select2().val();
|
||||
|
||||
//Ajax to set all options without reloading the page
|
||||
$.ajax({
|
||||
url: 'script/interface.php'
|
||||
, method: 'POST'
|
||||
, dataType: 'text'
|
||||
, data: {
|
||||
action: 'select_BOM'
|
||||
, select_product_val: select_product_val
|
||||
, current_bom_id: current_bom_id
|
||||
}
|
||||
}).done(function (data) {
|
||||
//To remove all options of the bom select on change
|
||||
$('#bom_select').get(0).length = 0;
|
||||
|
||||
//To set options for the bom select on change
|
||||
let options = JSON.parse(data)
|
||||
for (let key in options) {
|
||||
let opt = new Option(options[key], key);
|
||||
$('#bom_select').append(opt)
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<?php
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
@ -612,9 +581,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
// When clicking on collapse
|
||||
$(".collapse_bom").click(function() {
|
||||
|
||||
console.log("We click on collapse");
|
||||
var id_bom_line = $(this).attr('id').replace('collapse-', '');
|
||||
if($(this).text().indexOf('+') > 0) {
|
||||
$('[parentid="'+ id_bom_line +'"]').show();
|
||||
@ -628,14 +597,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
return false;
|
||||
});
|
||||
|
||||
//To Show all the sub bom lines
|
||||
// To Show all the sub bom lines
|
||||
$("#show_all").click(function() {
|
||||
console.log("We click on show all");
|
||||
$("[class^=sub_bom_lines]").show();
|
||||
$("[class^=collapse_bom]").html('(-) ');
|
||||
return false;
|
||||
});
|
||||
//To Hide all the sub bom lines
|
||||
|
||||
// To Hide all the sub bom lines
|
||||
$("#hide_all").click(function() {
|
||||
console.log("We click on hide all");
|
||||
$("[class^=sub_bom_lines]").hide();
|
||||
$("[class^=collapse_bom]").html('(+) ');
|
||||
return false;
|
||||
@ -765,14 +737,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
$MAXEVENT = 10;
|
||||
|
||||
$morehtmlright = '<a href="'.DOL_URL_ROOT.'/bom/bom_agenda.php?id='.$object->id.'">';
|
||||
$morehtmlright .= $langs->trans("SeeAll");
|
||||
$morehtmlright .= '</a>';
|
||||
$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/bom/bom_agenda.php?id='.$object->id);
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, '', $MAXEVENT, '', $morehtmlright);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlcenter);
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
|
||||
@ -61,8 +61,6 @@ if ($nolinesbefore) {
|
||||
print '<td class="linecoldescription minwidth500imp">';
|
||||
print '<div id="add"></div><span class="hideonsmartphone">'.$langs->trans('AddNewLine').'</span>';
|
||||
print '</td>';
|
||||
// Linked BOM
|
||||
print '<td class="linecolBOM">'.$langs->trans('BOM').'</td>';
|
||||
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
print '<td class="linecoluseunit left">';
|
||||
@ -90,15 +88,14 @@ print '<td class="bordertop nobottom linecoldescription minwidth500imp">';
|
||||
|
||||
// Predefined product/service
|
||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
||||
if ($forceall >= 0 && $freelines) {
|
||||
echo '<br>';
|
||||
if (!empty($conf->global->BOM_SUB_BOM)) {
|
||||
print $langs->trans("Product");
|
||||
}
|
||||
echo '<span class="prod_entry_mode_predef">';
|
||||
$filtertype = '';
|
||||
if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) {
|
||||
$filtertype = '1';
|
||||
$filtertype = 0;
|
||||
if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->STOCK_SUPPORT_SERVICES)) {
|
||||
$filtertype = -1;
|
||||
}
|
||||
|
||||
$statustoshow = -1;
|
||||
if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
|
||||
// hide products in closed warehouse, but show products for internal transfer
|
||||
@ -109,11 +106,14 @@ if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
||||
|
||||
echo '</span>';
|
||||
}
|
||||
$coldisplay++;
|
||||
print '<td class="bordertop nobottom linecolbom">';
|
||||
print '<select id="bom_select" name="bom_select"><options value="-1"></options></select>';
|
||||
if (!empty($conf->global->BOM_SUB_BOM)) {
|
||||
print '<br>'.$langs->trans("or").' '.$langs->trans("BOM");
|
||||
// TODO Add component to select a BOM
|
||||
print '<select id="bom_select" name="bom_select"><options value="-1"></options></select>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="bordertop nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="'.(GETPOSTISSET("qty") ? GETPOST("qty", 'alpha', 2) : 1).'">';
|
||||
print '</td>';
|
||||
@ -134,7 +134,7 @@ print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="bordertop nobottom nowrap linecollost right">';
|
||||
print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.(GETPOSTISSET("efficiency") ?GETPOST("efficiency", 'alpha') : 1).'">';
|
||||
print '<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="'.((GETPOSTISSET("efficiency") && $action == 'addline') ?GETPOST("efficiency", 'alpha') : 1).'">';
|
||||
print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
|
||||
@ -97,8 +97,6 @@ print '</td>';
|
||||
*/
|
||||
|
||||
$coldisplay++;
|
||||
// For BOM
|
||||
print '<td></td>';
|
||||
|
||||
print '<td class="nobottom linecolqty right">';
|
||||
if (($line->info_bits & 2) != 2) {
|
||||
@ -126,7 +124,7 @@ print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom nowrap linecollost right">';
|
||||
print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>';
|
||||
print '<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom nowrap linecolcostprice right">';
|
||||
@ -135,9 +133,8 @@ print '</td>';
|
||||
$coldisplay += $colspan;
|
||||
print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
|
||||
$coldisplay += $colspan;
|
||||
print '<input type="submit" class="button buttongen marginbottomonly button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<br>';
|
||||
print '<input type="submit" class="button buttongen marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<input type="submit" class="button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<input type="submit" class="button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -39,23 +39,25 @@ if (empty($object) || !is_object($object)) {
|
||||
exit;
|
||||
}
|
||||
print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||
|
||||
|
||||
// Title line
|
||||
print "<thead>\n";
|
||||
|
||||
print '<tr class="liste_titre nodrag nodrop">';
|
||||
print '<a id="show_all" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a> ';
|
||||
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> ';
|
||||
|
||||
// Adds a line numbering column
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
print '<td class="linecolnum center"> </td>';
|
||||
}
|
||||
|
||||
// Description
|
||||
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
|
||||
|
||||
// Linked BOM
|
||||
print '<td class="linecolBOM">'.$langs->trans('BOM').'</td>';
|
||||
// Product or sub-bom
|
||||
print '<td class="linecoldescription">'.$langs->trans('Description');
|
||||
if (!empty($conf->global->BOM_SUB_BOM)) {
|
||||
print ' <a id="show_all" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a> ';
|
||||
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Qty
|
||||
print '<td class="linecolqty right">'.$form->textwithpicto($langs->trans('Qty'), $langs->trans("QtyRequiredIfNoLoss")).'</td>';
|
||||
|
||||
@ -82,19 +82,14 @@ $tmpproduct = new Product($object->db);
|
||||
$tmpproduct->fetch($line->fk_product);
|
||||
$tmpbom = new BOM($object->db);
|
||||
$res = $tmpbom->fetch($line->fk_bom_child);
|
||||
if (!empty($tmpbom->id)) {
|
||||
if ($tmpbom->id > 0) {
|
||||
print $tmpbom->getNomUrl(1);
|
||||
print '<a class="collapse_bom" id="collapse-'.$line->id.'" href="#">' . (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT) ? '(+)' : '(-)') . ' </a>';
|
||||
}
|
||||
print $tmpproduct->getNomUrl(1);
|
||||
print ' - '.$tmpproduct->label;
|
||||
print '</td>';
|
||||
|
||||
// To show BOM links in the list
|
||||
if ($res > 0) {
|
||||
print '<td id="bom_id">'.$tmpbom->getNomUrl(1).'</td>';
|
||||
} else {
|
||||
print '<td id="bom_id"> </td>';
|
||||
print $tmpproduct->getNomUrl(1);
|
||||
print ' - '.$tmpproduct->label;
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td class="linecolqty nowrap right">';
|
||||
$coldisplay++;
|
||||
|
||||
@ -90,7 +90,7 @@ function printDropdownBookmarksList()
|
||||
$bookmarkList = '<div id="dropdown-bookmarks-list" >';
|
||||
$i = 0;
|
||||
while ((empty($conf->global->BOOKMARKS_SHOW_IN_MENU) || $i < $conf->global->BOOKMARKS_SHOW_IN_MENU) && $obj = $db->fetch_object($resql)) {
|
||||
$bookmarkList .= '<a class="dropdown-item bookmark-item'.(strpos($obj->url, 'http') === 0 ? ' bookmark-item-external' : '').'" id="bookmark-item-'.$obj->rowid.'" data-id="'.$obj->rowid.'" '.($obj->target == 1 ? ' target="_blank"' : '').' href="'.dol_escape_htmltag($obj->url).'" >';
|
||||
$bookmarkList .= '<a class="dropdown-item bookmark-item'.(strpos($obj->url, 'http') === 0 ? ' bookmark-item-external' : '').'" id="bookmark-item-'.$obj->rowid.'" data-id="'.$obj->rowid.'" '.($obj->target == 1 ? ' target="_blank" rel="noopener noreferrer"' : '').' href="'.dol_escape_htmltag($obj->url).'" >';
|
||||
$bookmarkList .= dol_escape_htmltag($obj->title);
|
||||
$bookmarkList .= '</a>';
|
||||
$i++;
|
||||
@ -115,7 +115,7 @@ function printDropdownBookmarksList()
|
||||
}
|
||||
$i = 0;
|
||||
while ((empty($conf->global->BOOKMARKS_SHOW_IN_MENU) || $i < $conf->global->BOOKMARKS_SHOW_IN_MENU) && $obj = $db->fetch_object($resql)) {
|
||||
$searchForm .= '<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1 ? ' target="_blank"' : '').' rel="'.dol_escape_htmltag($obj->url).'" >';
|
||||
$searchForm .= '<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1 ? ' target="_blank" rel="noopener noreferrer"' : '').' rel="'.dol_escape_htmltag($obj->url).'" >';
|
||||
$searchForm .= dol_escape_htmltag($obj->title);
|
||||
$searchForm .= '</option>';
|
||||
$i++;
|
||||
|
||||
@ -169,7 +169,11 @@ if ($action == 'create') {
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>';
|
||||
$liste = array(0=>$langs->trans("ReplaceWindow"), 1=>$langs->trans("OpenANewWindow"));
|
||||
print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : 1, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||
$defaulttarget = 1;
|
||||
if ($url && !preg_match('/^http/i', $url)) {
|
||||
$defaulttarget = 0;
|
||||
}
|
||||
print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : $defaulttarget, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||
print '</td><td class="hideonsmartphone"><span class="opacitymedium">'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</span></td></tr>';
|
||||
|
||||
// Owner
|
||||
@ -244,7 +248,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) {
|
||||
if ($action == 'edit') {
|
||||
print '<input class="flat minwidth500 quatrevingtpercent" name="url" value="'.(GETPOSTISSET("url") ? GETPOST("url") : $object->url).'">';
|
||||
} else {
|
||||
print '<a href="'.(preg_match('/^http/i', $object->url) ? $object->url : DOL_URL_ROOT.$object->url).'"'.($object->target ? ' target="_blank"' : '').'>';
|
||||
print '<a href="'.(preg_match('/^http/i', $object->url) ? $object->url : DOL_URL_ROOT.$object->url).'"'.($object->target ? ' target="_blank" rel="noopener noreferrer"' : '').'>';
|
||||
print img_picto('', 'globe', 'class="paddingright"');
|
||||
print $object->url;
|
||||
print '</a>';
|
||||
|
||||
@ -62,9 +62,9 @@ $id = GETPOST("id", 'int');
|
||||
|
||||
$object = new Bookmark($db);
|
||||
|
||||
$permissiontoread = $user->rights->bookmark->lire;
|
||||
$permissiontoadd = $user->rights->bookmark->write;
|
||||
$permissiontodelete = $user->rights->bookmark->delete;
|
||||
$permissiontoread = !empty($user->rights->bookmark->lire);
|
||||
$permissiontoadd = !empty($user->rights->bookmark->creer);
|
||||
$permissiontodelete = !empty($user->rights->bookmark->supprimer);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -244,7 +244,6 @@ class Categorie extends CommonObject
|
||||
* @see Categorie::TYPE_ACTIONCOMM
|
||||
* @see Categorie::TYPE_WEBSITE_PAGE
|
||||
* @see Categorie::TYPE_TICKET
|
||||
|
||||
*/
|
||||
public $type;
|
||||
|
||||
@ -385,8 +384,8 @@ class Categorie extends CommonObject
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
$this->error=$this->db->lasterror;
|
||||
$this->errors[]=$this->db->lasterror;
|
||||
$this->error = $this->db->lasterror;
|
||||
$this->errors[] = $this->db->lasterror;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -759,8 +758,6 @@ class Categorie extends CommonObject
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
@ -816,8 +813,6 @@ class Categorie extends CommonObject
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1981,6 +1976,12 @@ class Categorie extends CommonObject
|
||||
if ($type == 'bank_account') {
|
||||
$type = 'account';
|
||||
}
|
||||
if ($type == 'customer') {
|
||||
$type = 'societe';
|
||||
}
|
||||
if ($type == 'supplier') {
|
||||
$type = 'fournisseur';
|
||||
}
|
||||
|
||||
if (empty($searchList) && !is_array($searchList)) {
|
||||
return "";
|
||||
|
||||
@ -194,19 +194,19 @@ if ($object->id) {
|
||||
|
||||
if (is_array($listofphoto) && count($listofphoto)) {
|
||||
print '<br>';
|
||||
print '<table width="100%" valign="top" align="center">';
|
||||
print '<table width="100%" valign="top" class="center centpercent">';
|
||||
|
||||
foreach ($listofphoto as $key => $obj) {
|
||||
$nbphoto++;
|
||||
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) {
|
||||
print '<tr align=center valign=middle border=1>';
|
||||
print '<tr class"center valignmiddle" border="1">';
|
||||
}
|
||||
if ($nbbyrow) {
|
||||
print '<td width="'.ceil(100 / $nbbyrow).'%" class="photo">';
|
||||
}
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$obj['photo']).'" alt="Taille origine" target="_blank">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$obj['photo']).'" alt="Original size" target="_blank" rel="noopener noreferrer">';
|
||||
|
||||
// Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
|
||||
if ($obj['photo_vignette']) {
|
||||
|
||||
@ -795,7 +795,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
||||
$permission = $user->rights->societe->creer;
|
||||
|
||||
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
if ($contacts < 0) {
|
||||
if (is_numeric($contacts) && $contacts < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
// Form to add record into a category
|
||||
@ -1048,7 +1048,7 @@ if ($type == Categorie::TYPE_USER) {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print $langs->trans("AddProjectIntoCategory").' ';
|
||||
$form->select_users('', 'elemid');
|
||||
print $form->select_dolusers('', 'elemid');
|
||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -972,7 +972,7 @@ if ($action == 'create') {
|
||||
print '<input type="hidden" name="donotclearsession" value="1">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
if ($backtopage) {
|
||||
print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : htmlentities($_SERVER["HTTP_REFERER"])).'">';
|
||||
print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : dol_htmlentities($_SERVER["HTTP_REFERER"])).'">';
|
||||
}
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
|
||||
print '<input type="hidden" name="actioncode" value="'.dol_getIdFromCode($db, 'AC_OTH', 'c_actioncomm').'">';
|
||||
@ -1247,7 +1247,9 @@ if ($action == 'create') {
|
||||
if (!empty($projectid)) {
|
||||
$projectsListId = $projectid;
|
||||
}
|
||||
|
||||
$tid = GETPOSTISSET("projecttaskid") ? GETPOST("projecttaskid", 'int') : (GETPOSTISSET("taskid") ? GETPOST("taskid", 'int') : '');
|
||||
|
||||
$formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 24, 0, '1', 1, 0, 0, 'maxwidth500', $projectsListId);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1474,7 +1476,7 @@ if ($id > 0) {
|
||||
print '<input type="hidden" name="ref_ext" value="'.$object->ref_ext.'">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
if ($backtopage) {
|
||||
print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : htmlentities($_SERVER["HTTP_REFERER"])).'">';
|
||||
print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : dol_htmlentities($_SERVER["HTTP_REFERER"])).'">';
|
||||
}
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
|
||||
print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
|
||||
@ -1909,9 +1911,7 @@ if ($id > 0) {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">';
|
||||
$morehtmlref .= $proj->ref;
|
||||
$morehtmlref .= '</a>';
|
||||
$morehtmlref .= ' : '.$proj->getNomUrl(1);
|
||||
if ($proj->title) {
|
||||
$morehtmlref .= ' - '.$proj->title;
|
||||
}
|
||||
@ -2212,7 +2212,7 @@ if ($id > 0) {
|
||||
$delallowed = $user->rights->agenda->myactions->create;
|
||||
|
||||
|
||||
print $formfile->showdocuments('actions', $object->id, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 0, 0, '', '', '', $object->default_lang);
|
||||
print $formfile->showdocuments('actions', $object->id, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 0, 0, '', '', '', $langs->getDefaultLang());
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
|
||||
@ -166,9 +166,7 @@ if ($object->id > 0) {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">';
|
||||
$morehtmlref .= $proj->ref;
|
||||
$morehtmlref .= '</a>';
|
||||
$morehtmlref .= ' : '.$proj->getNomUrl(1);
|
||||
if ($proj->title) {
|
||||
$morehtmlref .= ' - '.$proj->title;
|
||||
}
|
||||
@ -201,9 +199,9 @@ if ($object->id > 0) {
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (!$object->fulldayevent) {
|
||||
print dol_print_date($object->datep, 'dayhour');
|
||||
print dol_print_date($object->datep, 'dayhour', 'tzuser');
|
||||
} else {
|
||||
print dol_print_date($object->datep, 'day');
|
||||
print dol_print_date($object->datep, 'day', 'tzuser');
|
||||
}
|
||||
if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
@ -214,9 +212,9 @@ if ($object->id > 0) {
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
|
||||
if (!$object->fulldayevent) {
|
||||
print dol_print_date($object->datef, 'dayhour');
|
||||
print dol_print_date($object->datef, 'dayhour', 'tzuser');
|
||||
} else {
|
||||
print dol_print_date($object->datef, 'day');
|
||||
print dol_print_date($object->datef, 'day', 'tzuser');
|
||||
}
|
||||
if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now - $delay_warning)) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
|
||||
@ -93,9 +93,7 @@ if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">';
|
||||
$morehtmlref .= $proj->ref;
|
||||
$morehtmlref .= '</a>';
|
||||
$morehtmlref .= ' : '.$proj->getNomUrl(1);
|
||||
if ($proj->title) {
|
||||
$morehtmlref .= ' - '.$proj->title;
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2017 Open-DSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -629,14 +629,17 @@ print $nav;
|
||||
$s = $newtitle;
|
||||
|
||||
// Calendars from hooks
|
||||
$parameters = array(); $object = null;
|
||||
$parameters = array();
|
||||
$object = null;
|
||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
$s .= $hookmanager->resPrint;
|
||||
} elseif ($reshook > 1) {
|
||||
$s = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
$viewyear = is_object($object) ? dol_print_date($object->datep, '%Y') : '';
|
||||
$viewmonth = is_object($object) ? dol_print_date($object->datep, '%m') : '';
|
||||
$viewday = is_object($object) ? dol_print_date($object->datep, '%d') : '';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
@ -644,25 +647,25 @@ $viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewm
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.$viewyear.'&month='.$viewmonth.'&day='.$viewday.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.$viewyear.'&month='.$viewmonth.'&day='.$viewday.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.$viewyear.'&month='.$viewmonth.'&day='.$viewday.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.$viewyear.'&month='.$viewmonth.'&day='.$viewday.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
@ -671,7 +674,8 @@ $viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsm
|
||||
$viewmode .= '<span class="marginrightonly"></span>';
|
||||
|
||||
// Add more views from hooks
|
||||
$parameters = array(); $object = null;
|
||||
$parameters = array();
|
||||
$object = null;
|
||||
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
$viewmode .= $hookmanager->resPrint;
|
||||
@ -681,7 +685,7 @@ if (empty($reshook)) {
|
||||
|
||||
$tmpforcreatebutton = dol_getdate(dol_now(), true);
|
||||
|
||||
$newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
|
||||
$newparam = '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec = '100000';
|
||||
|
||||
@ -377,7 +377,6 @@ if ($conf->use_javascript_ajax) {
|
||||
$s .= 'jQuery(".family_birthday").toggle();'."\n";
|
||||
if ($action == "show_week" || $action == "show_month" || empty($action)) {
|
||||
$s .= 'jQuery( "td.sortable" ).sortable({connectWith: ".sortable",placeholder: "ui-state-highlight",items: "div:not(.unsortable)", receive: function( event, ui ) {';
|
||||
$s .= 'var frm=jQuery("#move_event");frm.attr("action",ui.item.find("a.cal_event").attr("href")).children("#newdate").val(jQuery(event.target).closest("div").attr("id"));frm.submit();}});'."\n";
|
||||
}
|
||||
$s .= '});'."\n";
|
||||
$s .= '</script>'."\n";
|
||||
@ -965,8 +964,8 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
|
||||
// We are in a particular day for $username, now we scan all events
|
||||
foreach ($eventarray as $daykey => $notused) {
|
||||
$annee = dol_print_date($daykey, '%Y');
|
||||
$mois = dol_print_date($daykey, '%m');
|
||||
$jour = dol_print_date($daykey, '%d');
|
||||
$mois = dol_print_date($daykey, '%m');
|
||||
$jour = dol_print_date($daykey, '%d');
|
||||
|
||||
if ($day == $jour && $month == $mois && $year == $annee) { // Is it the day we are looking for when calling function ?
|
||||
// Scan all event for this date
|
||||
|
||||
@ -387,7 +387,6 @@ if ($conf->use_javascript_ajax) {
|
||||
$s .= 'jQuery(".family_birthday").toggle();'."\n";
|
||||
if ($action == "show_week" || $action == "show_month" || empty($action)) {
|
||||
$s .= 'jQuery( "td.sortable" ).sortable({connectWith: ".sortable",placeholder: "ui-state-highlight",items: "div:not(.unsortable)", receive: function( event, ui ) {';
|
||||
$s .= 'var frm=jQuery("#move_event");frm.attr("action",ui.item.find("a.cal_event").attr("href")).children("#newdate").val(jQuery(event.target).closest("div").attr("id"));frm.submit();}});'."\n";
|
||||
}
|
||||
$s .= '});'."\n";
|
||||
$s .= '</script>'."\n";
|
||||
@ -802,7 +801,7 @@ $currentdaytoshow = $firstdaytoshow;
|
||||
echo '<div class="div-table-responsive">';
|
||||
|
||||
while ($currentdaytoshow < $lastdaytoshow) {
|
||||
echo '<table width="100%" class="noborder nocellnopadd cal_month">';
|
||||
echo '<table class="centpercent noborder nocellnopadd cal_month">';
|
||||
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<td class="nopaddingtopimp nopaddingbottomimp nowraponsmartphone">';
|
||||
@ -829,7 +828,7 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
||||
// Filter on days
|
||||
print img_picto('', 'clock', 'class="fawidth30 inline-block paddingleft"');
|
||||
print '<span class="hideonsmartphone" title="'.$langs->trans("VisibleDaysRange").'">'.$langs->trans("DaysOfWeek").'</span>';
|
||||
print "\n".'<div class="ui-grid-a inline-block"><div class="ui-block-a">';
|
||||
print "\n".'<div class="ui-grid-a inline-block"><div class="ui-block-a nowraponall">';
|
||||
print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">';
|
||||
if (empty($conf->dol_use_jmobile)) {
|
||||
print ' - ';
|
||||
|
||||
@ -185,10 +185,7 @@ if ($resql) {
|
||||
// Show file name with link to download
|
||||
$out .= '<a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
|
||||
$mime = dol_mimetype($relativepath, '', 0);
|
||||
if (preg_match('/text/', $mime)) {
|
||||
$out .= ' target="_blank"';
|
||||
}
|
||||
$out .= ' target="_blank">';
|
||||
$out .= ' target="_blank" rel="noopener noreferrer">';
|
||||
$out .= img_mime($filearray["name"], $langs->trans("File").': '.$filearray["name"]);
|
||||
$out .= $filearray["name"];
|
||||
$out .= '</a>'."\n";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user