Merge remote-tracking branch 'upstream/develop' into 12.0_a26

This commit is contained in:
Alexandre SPANGARO 2020-04-28 04:45:24 +02:00
commit b3efa4f793
1434 changed files with 13137 additions and 6774 deletions

View File

@ -4,7 +4,7 @@ How to contribute to Dolibarr
Bug reports and feature requests
--------------------------------
<a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
<a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](https://www.dolibarr.org/forum).
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
@ -104,31 +104,32 @@ Long description (Can span accross multiple lines).
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
a process to follow to optimize the chance to have PRs merged efficiently...
When submitting a pull request, use same rule as [Commits](#commits) for the message.
If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you.
Otherwise, please be a bit verbose about what you're providing.
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic.
* Your Pull Request (PR) must pass the Continuous Integration checks and code quality checks.
* When submitting a pull request, use same rule as [Commits](#commits) for the message. If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing.
Your Pull Request (PR) must pass the Continuous Integration checks and code quality checks.
Also, some code changes need a prior approbation:
* if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted.
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-yoda in your issue) to see if such a library can be accepted.
* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Then ask the project manager (@eldy) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest.
* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Then ask the project manager (@dolibarr-yoda) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest.
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
If the label of PR start with "WIP" (Work In Progress), it will not be analyzed (until you change the label of PR).
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of PR (but it can be analyzed for discussion).
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
Statistics on Dolibarr project shows that around 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source project (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
### Resources
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
[Developer documentation](https://wiki.dolibarr.org/index.php/Developer_documentation)
Translations
------------
@ -144,11 +145,11 @@ to retreive all old translation of a source text, and restore the translation in
### Resources
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
[Translator documentation](https://wiki.dolibarr.org/index.php/Translator_documentation)
Documentation
-------------
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
The project's documentation is maintained on the [Wiki](https://wiki.dolibarr.org/index.php).
*Note*: to help prevent spam, you need to create an account before being able to edit. Everybody is welcome to contribute to its content.

View File

@ -41,7 +41,7 @@ Ace 1.4.8 BSD Yes
ChartJS 2.9.3 MIT License Yes JS library for graph
jQuery 3.4.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)

View File

@ -13,7 +13,7 @@ For Developers or integrators:
- replace $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
- remove input field in form '<input type="hidden" name="page" value="'.$page.'">';'
- add parameter $pagenavastextinput to value 1 when calling print_barre_liste
* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE
WARNING:

View File

@ -5,7 +5,7 @@
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelances.
It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelancers.
You can freely use, study, modify or distribute it according to its Free Software licence.
@ -27,7 +27,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
- DoliWamp for Windows
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp)
- DoliDeb for Debian or Ubuntu
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
@ -67,6 +67,7 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
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.
## UPGRADING
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
@ -85,28 +86,27 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Main application/modules (all optional)
- Customers, Prospects (Leads) and/or Suppliers directory
- Customers, Prospects (Leads) and/or Suppliers directory + Contacts
- Members management
- Products and/or Services catalog
- Commercial proposals management
- Customer and Supplier Orders management
- Customer & Supplier Orders management
- Shipping management
- Warehouse/Stock management
- Invoices and payment management
- Standing orders management (European SEPA)
- Bank accounts management
- Accounting management
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
- Opportunities and/or project management
- Projects management
- Projects & Tasks management
- Contracts management
- Warehouse/Stock management
- Shipping management
- Interventions management
- Employee's leave requests management
- Expense reports
- Timesheets
- Electronic Document Management (EDM)
- Foundations members management
- Mass emailing
- Surveys
- Point of Sale (POS)
- …
@ -115,11 +115,13 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Bookmarks management
- Donations management
- Reporting
- Surveys
- Data export/import
- Barcodes support
- Margin calculations
- LDAP connectivity
- ClickToDial integration
- Mass emailing
- RSS integration
- Skype integration
- Payment platforms integration (PayPal, Stripe, Paybox...)

View File

@ -1,45 +1,47 @@
[CustomMessages]
NameAndVersion=%1 versió %2
NameAndVersion=%1 versió %2
AdditionalIcons=Icones addicionals:
CreateDesktopIcon=Crea una icona a l'&Escriptori
CreateQuickLaunchIcon=Crea una icona a la &Barra de tasques
ProgramOnTheWeb=%1 a Internet
UninstallProgram=Desinstal·la %1
UninstallProgram=Desinstal·la %1
LaunchProgram=Obre %1
AssocFileExtension=&Associa %1 amb l'extensió de fitxer %2
AssocingFileExtension=Associant %1 amb l'extensió de fitxer %2...
AssocFileExtension=&Associa %1 amb l'extensió de fitxer %2
AssocingFileExtension=Associant %1 amb l'extensió de fitxer %2...
YouWillInstallDoliWamp=Va a instal·lar o actualitzar (Apache + Mysql + PHP + Dolibarr) al seu ordinador.
ThisAssistantInstallOrUpgrade=Aquest assistent instal·la o actualitza Dolibarr ERP-CRM i tots els seus requisits (Apache, Mysql i PHP) optimitzats per a l'ús de Dolibarr.
IfYouHaveTechnicalKnowledge=Si teniu coneixements tècnics i necessita usar la seva Apache, Mysql i PHP amb altres aplicacions a part de Dolibarr, no utilitzeu aquest assistent, hauria lació manual d'Dolibarr sobre un Apache, Mysql i PHP existent.
ButIfYouLook=Però si busca una instal·lació automàtica, es troba en el bon camí...
DoYouWantToStart=Vol iniciar el procés d'instal·lació/actualització?
YouWillInstallDoliWamp=Instal·laràs DoliWamp (Dolibarr i altres programaris com Apache, Mysql i PHP) al teu ordinador.
ThisAssistantInstallOrUpgrade=ALERTA: Utilitzar un ERP CRM instal·lat en un ordinador en local pot ser perillós: si l'ordinador s'espatlla, pots perdre totes les teves dades. Fes-ho si estàs preparat per autogestionar-te còpies de seguretat. Si no, pots utilitzar una instal·lació Saas (pots veure https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Si tens coneixements tècnics i vols autogestionar el teu Apache, Mysql i PHP, no utilitzis aquest assistent i fes una instal·lació manual de Dolibarr sobre un servidor existent d'Apache, Mysql i PHP.
ButIfYouLook=Però si busques una instal·lació automàtica en el teu propi ordinador, et trobes en el bon camí...
DoYouWantToStart=Vols iniciar el procés d'instal·lació?
TechnicalParameters=Paràmetres tècnics
IfFirstInstall=Si es tracta de la primera instal lació, haurà d'especificar alguns paràmetres tècnics. Si no els entén, no sabeu o va a procedir a una actualització, deixi els camps amb els valors proposats per defecte.
TechnicalParameters=Paràmetres tècnics
IfFirstInstall=Si es tracta de la primera instal·lació, hauràs d'especificar alguns paràmetres tècnics. Si no els entens, no n'estàs segur, o estàs fent una actualització, pots deixar els valors per defecte.
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 70 CHARACTERS
SMTPServer=Servidor SMTP (El seu o el del seu ISP, únicament primera instal.lació) :
ApachePort=Puerto Apache (únicament primera instal.lació, normalment és el 80) :
MySqlPort=Puerto Mysql (únicament primera instal.lació, normalment és el 3306) :
MySqlPassword=Contrasenya del servidor i la base de dades MySQL de root (únicament primera instal.lació):
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=Servidor SMTP (propi o ISP, només primera instal·lació) :
ApachePort=Port Apache (només primera instal·lació, normalment el 80) :
MySqlPort=Port MySql (només primera instal·lació, normalment el 3306) :
MySqlPassword=Contrasenya del servidor i base de dades MySql de root (només primera instal·lació):
FailedToDeleteLock=FailedToDeleteLock=Error en l'eliminació del fitxer %1/www/dolibarr/install.lock. Pot ignorar l'avís però és possible que hagi de eliminar-lo manualment més tard. En aquest cas, serà informat. Feu clic a OK per continuar...
FailedToDeleteLock=FailedToDeleteLock=Error en l'eliminació del fitxer %1/www/dolibarr/install.lock. Pots ignorar l'avís però és possible que hagis d'eliminar-lo manualment més tard. En aquest cas, serà informat. Fes clic a OK per continuar...
PortAlreadyInUse=Sembla que el port %1 ja està sent utilitzat. Es recomana cancel·lar, tornar enrere i especificar un altre valor per al port% 2. Cancel·lar i escollir un altre valor?
PortAlreadyInUse=Sembla que el port %1 ja està sent utilitzat. Es recomana cancel·lar, tornar enrere i especificar un altre valor per al port% 2. Vols cancel·lar i escollir un altre valor?
FirefoxDetected=S'ha detectat Firefox al seu ordinador. Voleu activar per defecte com a navegador per Dolibarr?
ChromeDetected=S'ha detectat Chrome al seu ordinador. Voleu activar per defecte com a navegador per Dolibarr?
ChooseDefaultBrowser=Esculli el seu navegador per defecte. Si no està segur, simplement feu clic a Obrir:
FirefoxDetected=S'ha detectat Firefox al teu ordinador. El vols utilitzar com a navegador per defecte per Dolibarr?
ChromeDetected=S'ha detectat Chrome al teu ordinador. El vols utilitzar com a navegador per defecte per Dolibarr?
ChooseDefaultBrowser=Escull el teu navegador per defecte (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...).. Si no estàs segur, simplement fes clic a Obre:
LaunchNow=Llançar ara Dolibarr
LaunchNow=Obre ara el Dolibarr
ProgramHasBeenRemoved=Els arxius del programa Dolibarr han estat eliminats. No obstant això tots els seus arxius de dades es troben encara al directori %1. Haurà eliminar aquest directori manualment per a una desinstal completa.
ProgramHasBeenRemoved=Els arxius del programa Dolibarr han estat eliminats. No obstant això tots els seus arxius de dades es troben encara al directori %1. Hauràs d'eliminar aquest directori manualment per a una desinstal·lació completa.
DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reiniciar Apache i MySQL, això pot durar des de diversos segons a un minut després de la confirmació. Iniciar la instal·lació o actualització dels servidors web i bases de dades requerides per Dolibarr?
DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reiniciar Apache i MySQL, això pot durar des de diversos segons a un minut després de la confirmació. Vols iniciar la instal·lació o actualització dels servidors web i de base de dades requerides per Dolibarr?
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit)

View File

@ -2,7 +2,7 @@
[CustomMessages]
NameAndVersion=%1 Version %2
AdditionalIcons=Zusätzliche Symbole:
AdditionalIcons=Zusätzliche Symbole:
CreateDesktopIcon=&Desktop-Symbol erstellen
CreateQuickLaunchIcon=Symbol in der Schnellstartleiste erstellen
ProgramOnTheWeb=%1 im Internet
@ -10,3 +10,38 @@ UninstallProgram=%1 entfernen
LaunchProgram=%1 starten
AssocFileExtension=&Registriere %1 mit der %2-Dateierweiterung
AssocingFileExtension=%1 wird mit der %2-Dateierweiterung registriert...
YouWillInstallDoliWamp=Sie installieren DoliWamp (also Dolibarr + alle erforderliche Software von Drittanbietern wie Apache, MySQL und PHP) auf Ihrem Computer.
ThisAssistantInstallOrUpgrade=WARNUNG: Die Verwendung eines auf einem lokalen Computer installierten ERP-CRM kann gefährlich sein: Wenn Ihr Computer ausfällt, können Sie alle Ihre Daten verlieren. Tun Sie dies, wenn Sie bereit sind, das Backup selbst ernsthaft zu verwalten. Wenn nicht, verwenden Sie stattdessen eine Installation in Saas (siehe https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Wenn Sie über technische Kenntnisse verfügen und Apache, MySQL und PHP selbst verwalten möchten, sollten Sie diesen Assistenten nicht verwenden und eine manuelle Installation von Dolibarr auf Ihrem vorhandenen Server mit Apache, MySQL und PHP durchführen.
ButIfYouLook=Aber wenn Sie auf Ihrem lokalen Computer nach einer automatischen Einrichtung suchen, sind Sie auf dem besten Weg ...
DoYouWantToStart=Möchten Sie den Installationsprozess starten?
TechnicalParameters=technische Parameter
IfFirstInstall=Geben Sie bei der Erstinstallation einige technische Parameter an. Wenn Sie nicht verstehen, sich nicht sicher sind oder ein Upgrade durchführen, belassen Sie einfach die Standardwerte.
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=SMTP Server (your own or ISP SMTP server, first install only) :
ApachePort=Apache Port (first install only, Standard ist 80) :
MySqlPort=MySQL Port (first install only, Standard ist 3306) :
MySqlPassword=MySQL Server und Datenbank Passwort für root (first install only):
FailedToDeleteLock=Fehler beim Löschen der Datei %1/www/dolibarr/install.lock. Sie können die Warnung ignorieren, müssen sie jedoch möglicherweise später manuell entfernen, wenn Sie dazu aufgefordert werden. Klicken Sie auf OK, um fortzufahren ...
PortAlreadyInUse=Port %1 scheint bereits verwendet zu werden. Sie sollten zurückgehen und einen anderen Wert für %2 Port wählen. Auswahl abbrechen und einen anderen Wert wählen ?
FirefoxDetected=Firefox wurde auf Ihrem Computer erkannt. Möchten Sie ihn als Standardbrowser für Dolibarr verwenden?
ChromeDetected=Chrome wurde auf Ihrem Computer erkannt. Möchten Sie ihn als Standardbrowser für Dolibarr verwenden?
ChooseDefaultBrowser=Bitte wählen Sie Ihren Standardbrowser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). Wenn Sie sich nicht sicher sind, klicken Sie einfach auf Öffnen:
LaunchNow=Starten Sie jetzt Dolibarr
ProgramHasBeenRemoved=Die Dolibarr-Programmdateien wurden entfernt. Alle Ihre Daten befinden sich jedoch noch im Verzeichnis %1. Für eine vollständige Deinstallation, müssen Sie dieses Verzeichnis manuell entfernen.
DoliWampWillStartApacheMysql=Die DoliWamp-Installation wird nun starten oder Apache und MySQL neu starten. Dies kann nach dieser Bestätigung einige Sekunden bis eine Minute dauern. Wollen Sie mit der Installation oder Aktualisierung des von Dolibarr benötigten Web- und Datenbankservers starten ?
OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden.
OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden.
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen).

View File

@ -1,45 +1,47 @@
[CustomMessages]
NameAndVersion=%1 versión %2
NameAndVersion=%1 versión %2
AdditionalIcons=Iconos adicionales:
CreateDesktopIcon=Crear un icono en el &escritorio
CreateQuickLaunchIcon=Crear un icono de Inicio Rápido
CreateQuickLaunchIcon=Crear un icono de Inicio Rápido
ProgramOnTheWeb=%1 en la Web
UninstallProgram=Desinstalar %1
LaunchProgram=Ejecutar %1
AssocFileExtension=&Asociar %1 con la extensión de archivo %2
AssocingFileExtension=Asociando %1 con la extensión de archivo %2...
AssocFileExtension=&Asociar %1 con la extensión de archivo %2
AssocingFileExtension=Asociando %1 con la extensión de archivo %2...
YouWillInstallDoliWamp=Va a instalar o actualizar (Apache+Mysql+PHP+Dolibarr) en su ordenador.
ThisAssistantInstallOrUpgrade=Este asistente instala o actualiza Dolibarr ERP-CRM y todos sus requisitos (Apache, Mysql y PHP) optimizados para el uso de Dolibarr.
IfYouHaveTechnicalKnowledge=Si tiene conocimientos técnicos y necesita usar su Apache, Mysql y PHP con otras aplicaciones aparte de Dolibarr, no debería usar este asistente, debería realizar una instalación manual de Dolibarr sobre un Apache, Mysql y PHP existente.
ButIfYouLook=Pero si busca una instalación automática, se encuentra en el buen camino...
DoYouWantToStart=¿Quiere iniciar el proceso de instalación/actualización?
YouWillInstallDoliWamp=Va a instalar DoliWamp (Dolibarr y otro software como Apache, Mysql y PHP) en su ordenador.
ThisAssistantInstallOrUpgrade=ALERTA: Utilizar un ERP CRM instalado en un ordenador en local puede ser peligroso: si el ordenador se estropea, puede perder todos sus datos. Hágalo si está preparado para autogestionar sus copias de seguridad. Si no, puede utilizar una instalacion Saas (puede ver https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Si tiene conocimientos técnicos y necesita usar su Apache, Mysql y PHP con otras aplicaciones aparte de Dolibarr, no debería usar este asistente, debería realizar una instalación manual de Dolibarr sobre un Apache, Mysql y PHP existente.
ButIfYouLook=Pero si busca una instalación automática en tu propio ordenador, se encuentra en el buen camino...
DoYouWantToStart=¿Quiere iniciar el proceso de instalación?
TechnicalParameters=Parámetros técnicos
IfFirstInstall=Si se trata de la primera instalación, deberá especificar algunos parámetros técnicos. Si no los entiende, no está seguro o va a proceder a una actualización, deje los campos con los valores propuestos por defecto.
TechnicalParameters=Parámetros técnicos
IfFirstInstall=Si se trata de la primera instalación, deberá especificar algunos parámetros técnicos. Si no los entiende, no está seguro o va a proceder a una actualización, deje los campos con los valores propuestos por defecto.
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 70 CHARACTERS
SMTPServer=Servidor SMTP (El suyo o el de su ISP, únicamente primera instalación) :
ApachePort=Puerto Apache (únicamente primera instalación, normalmente es el 80) :
MySqlPort=Puerto Mysql (únicamente primera instalación, normalmente es el 3306) :
MySqlPassword=Contraseña del servidor y la base de datos MySQL de root (únicamente primera instalación):
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=Servidor SMTP (propio o su ISP, sólo primera instalación) :
ApachePort=Puerto Apache (sólo primera instalación, normalmente el 80) :
MySqlPort=Puerto Mysql (sólo primera instalación, normalmente el 3306) :
MySqlPassword=Contraseña del servidor y la base de datos MySQL de root (sólo primera instalación):
FailedToDeleteLock=Error en la eliminación del archivo %1/www/dolibarr/install.lock. Puede ignorar el aviso pero es posible que deba eliminarlo manualmente más tarde. En este caso, será informado. Haga clic en OK para continuar...
FailedToDeleteLock=Error en la eliminación del archivo %1/www/dolibarr/install.lock. Puede ignorar el aviso pero es posible que deba eliminarlo manualmente más tarde. En este caso, será informado. Haga clic en OK para continuar...
PortAlreadyInUse=Parece que el puerto %1 ya esta siendo usado. Se recomienda cancelar, volver atras y especificar otro valor para el puerto %2. ¿Cancelar y escojer otro valor?
PortAlreadyInUse=Parece que el puerto %1 ya esta siendo usado. Se recomienda cancelar, volver atras y especificar otro valor para el puerto %2. ¿Cancelar y escojer otro valor?
FirefoxDetected=Se ha detectado Firefox en su ordenador. Desea activarlo por defecto como navegador para Dolibarr ?
ChromeDetected=Se ha detectado Chrome en su ordenador. Desea activarlo por defecto como navegador para Dolibarr ?
ChooseDefaultBrowser=Escoja su navegador por defecto. Si no está seguro, simplementa haga clic en Abrir :
ChooseDefaultBrowser=Escoja su navegador por defecto (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). Si no está seguro, simplementa haga clic en Abrir :
LaunchNow=Lanzar ahora Dolibarr
ProgramHasBeenRemoved=Los archivos del programa Dolibarr han sido eliminados. Sin embargo todos sus archivos de datos se encuentran todavía en el directorio %1. Deberá eliminar este directorio manualmente para una desinstalación completa.
ProgramHasBeenRemoved=Los archivos del programa Dolibarr han sido eliminados. Sin embargo todos sus archivos de datos se encuentran todavía en el directorio %1. Deberá eliminar este directorio manualmente para una desinstalación completa.
DoliWampWillStartApacheMysql=El instalador DoliWamp intentará iniciar o reiniciar Apache y MySQL, esto puede durar desde varios segundos a un minuto después de la confirmación. ¿Iniciar la instalación o actualización de los servidores Web y bases de datos requeridas por Dolibarr?
DoliWampWillStartApacheMysql=El instalador DoliWamp intentará iniciar o reiniciar Apache y MySQL, esto puede durar desde varios segundos a un minuto después de la confirmación. ¿Iniciar la instalación o actualización de los servidores Web y bases de datos requeridas por Dolibarr?
OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr
OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr
OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr
OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
ContinueAnyway=Continua igualmente (el proceso de instalación podría fallar sin este prerequisito)

View File

@ -298,3 +298,15 @@ JEDITABLE.JS
* <button type="submit" /> => <button class="button" type="submit" />
* <button type="cancel" /> => <button class="button" type="cancel" />
SELECT2
-------
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
.select2-hidden-accessible {
margin: -1px !important; /* line to restore */
}

View File

@ -6,6 +6,10 @@ This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
To install/upgrade phpcs:
> sudo pear upgrade PHP_CodeSniffer
To run phpcs:
> cd dolibarrgitrepo
> phpcs --standard=dev/setup/codesniffer/ruleset.xml --extensions=php --parallel=8 .
Note with Eclipse: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
* tab value to 4
* path of code sniffer standard to dev/codesniffer

View File

@ -36,8 +36,6 @@
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedForeach"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowed"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"/>
</rule>
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
@ -70,9 +68,6 @@
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod">
<severity>0</severity>
</rule>
<!--
<rule ref="Generic.Commenting.Todo" />
@ -125,13 +120,6 @@
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
<severity>0</severity>
</rule>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
<severity>0</severity>
</rule>
<!-- Disallow several spaces after comma -->
<!-- We want to allow this because we want to be able to align params on several similare functions on different lines -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">
@ -141,7 +129,7 @@
<!-- Tweaks to metrics -->
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="120" />
<property name="complexity" value="150" />
<property name="absoluteComplexity" value="300" />
</properties>
</rule>
@ -179,7 +167,6 @@
<rule ref="Generic.Strings.UnnecessaryStringConcat" />
<rule ref="Generic.Strings.UnnecessaryStringConcat.Found">
<severity>0</severity>
</rule>
<!-- Disallow usage of tab -->

View File

@ -488,11 +488,11 @@ if ($resql)
// Action
print '<td class="center">';
if ($user->rights->accounting->chartofaccount) {
print '<a href="./card.php?action=update&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
print '<a class="editfielda" href="./card.php?action=update&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
print img_edit();
print '</a>';
print '&nbsp;';
print '<a href="./card.php?action=delete&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
print '<a class="marginleftonly" href="./card.php?action=delete&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
print img_delete();
print '</a>';
}

View File

@ -696,7 +696,7 @@ if ($id)
print "</td>";
// Modify link
if ($canbemodified) print '<td class="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link

View File

@ -408,7 +408,7 @@ llxHeader('', $langs->trans('DictionaryAccountancyCategory'));
$titre = $langs->trans($tablib[$id]);
$linkback = '';
$titlepicto = 'title_setup';
$titlepicto = 'title_accountancy';
print load_fiche_titre($titre, $linkback, $titlepicto);
@ -806,7 +806,7 @@ if ($id)
print "</td>";
// Modify link
if ($canbemodified) print '<td class="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link

View File

@ -236,6 +236,7 @@ if (!empty($user->admin))
}
print '</tr>';
/* Set this option as a hidden option but keep it for some needs.
print '<tr>';
print '<td>'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").'</td>';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
@ -248,6 +249,7 @@ if (!empty($user->admin))
print '</a></td>';
}
print '</tr>';
*/
print '<tr>';
print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td>';

View File

@ -657,7 +657,7 @@ if ($id)
print "</td>";
// Modify link
if ($canbemodified) print '<td class="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link

View File

@ -362,7 +362,6 @@ if ($result)
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy');
print '<br>';
@ -412,7 +411,7 @@ if ($result)
//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);
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1);
print '<div class="div-table-responsive">';
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';

View File

@ -1006,7 +1006,7 @@ while ($i < min($num, $limit))
// Amount debit
if (!empty($arrayfields['t.debit']['checked']))
{
print '<td class="nowrap right">'.($line->debit ? price($line->debit) : '').'</td>';
print '<td class="nowrap right">'.($line->debit != 0 ? price($line->debit) : '').'</td>';
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
$totalarray['val']['totaldebit'] += $line->debit;
@ -1015,7 +1015,7 @@ while ($i < min($num, $limit))
// Amount credit
if (!empty($arrayfields['t.credit']['checked']))
{
print '<td class="nowrap right">'.($line->credit ? price($line->credit) : '').'</td>';
print '<td class="nowrap right">'.($line->credit != 0 ? price($line->credit) : '').'</td>';
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
$totalarray['val']['totalcredit'] += $line->credit;

View File

@ -704,7 +704,7 @@ class BookKeeping extends CommonObject
$sql .= ' WHERE 1 = 1';
$sql .= " AND entity IN (".getEntity('accountancy').")";
if (null !== $ref) {
$sql .= ' AND t.ref = '.'\''.$ref.'\'';
$sql .= " AND t.ref = '".$this->db->escape($ref)."'";
} else {
$sql .= ' AND t.rowid = '.$id;
}

View File

@ -567,12 +567,12 @@ if ($result) {
print '<td>'.$objp->tva_intra.'</td>';
// Found accounts
print '<td style="'.$code_sell_p_notset.'">';
print '<td>';
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
$shelp = '';
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport");
$s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : $langs->trans("NotDefined"));
$s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>');
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
if ($objp->product_id > 0)
{
@ -583,7 +583,7 @@ if ($result) {
elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT");
elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') $shelp = $langs->trans("SaleEECWithoutVATNumber");
elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport");
$s .= (empty($objp->code_sell_p) ? $langs->trans("NotDefined") : length_accountg($objp->code_sell_p));
$s .= (empty($objp->code_sell_p) ? '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>' : length_accountg($objp->code_sell_p));
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
}
print '</td>';

View File

@ -88,7 +88,7 @@ if ($conf->accounting->enabled)
}
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'title_accountancy', 0, '', '', $showtutorial);
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
print "<br>\n";
@ -101,13 +101,13 @@ if ($conf->accounting->enabled)
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong>'.'</a>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong>'.'</a>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>'.'</a>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
print "<br>\n";
print "<br>\n";
@ -116,20 +116,20 @@ if ($conf->accounting->enabled)
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>'.'</a>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong>'.'</a>')."\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
print "<br>\n";
$step++;
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>'.'</a>';
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (!empty($conf->tax->enabled))
{
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>'.'</a>';
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
@ -145,7 +145,7 @@ if ($conf->accounting->enabled)
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>'.'</a>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
print "<br>\n";
}
/*
@ -169,7 +169,7 @@ if ($conf->accounting->enabled)
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong>'.'</a>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
print "<br>\n";
@ -186,17 +186,17 @@ if ($conf->accounting->enabled)
$langs->loadLangs(array('bills', 'trips'));
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), '<a href="'.DOL_URL_ROOT.'/accountancy/customer/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>'.'</a>')."\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), '<a href="'.DOL_URL_ROOT.'/accountancy/customer/index.php"><strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'</strong></a>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>'.'</a>')."\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/index.php"><strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong></a>')."\n";
print "<br>\n";
if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), '<a href="'.DOL_URL_ROOT.'/accountancy/expensereport/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>'.'</a>')."\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), '<a href="'.DOL_URL_ROOT.'/accountancy/expensereport/index.php"><strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong></a>')."\n";
print "<br>\n";
}

View File

@ -994,7 +994,7 @@ if (empty($action) || $action == 'view') {
print '<div class="tabsAction tabsActionNoBottom">';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|| ($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {

View File

@ -508,7 +508,7 @@ if (empty($action) || $action == 'view') {
}
print '<div class="tabsAction tabsActionNoBottom">';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="'.$langs->trans("WriteBookKeeping").'" />';
}

View File

@ -740,7 +740,7 @@ if (empty($action) || $action == 'view') {
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="'.$langs->trans("WriteBookKeeping").'" />';
}
@ -936,7 +936,7 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accountg($k);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Purchase").')'.'</span>';
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Purchase").')</span>';
}
else print $accountoshow;
print "</td>";
@ -959,15 +959,15 @@ if (empty($action) || $action == 'view') {
foreach ($tabother[$key] as $k => $mt) {
if ($mt) {
print '<tr class="oddeven">';
print "<!-- VAT counterpart NPR -->";
print '<!-- VAT counterpart NPR -->';
print "<td>".$date."</td>";
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
// Account
print "<td>";
print '<td>';
$accountoshow = length_accountg($k);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
if ($accountoshow == '' || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account'.'</span>';
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account</span>';
}
else print $accountoshow;
print '</td>';

View File

@ -677,7 +677,7 @@ if (empty($action) || $action == 'view') {
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="'.$langs->trans("WriteBookKeeping").'" />';
}
@ -874,7 +874,7 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accountg($k);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Sale").')'.'</span>';
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Sale").')</span>';
}
else print $accountoshow;
print "</td>";

View File

@ -398,7 +398,7 @@ if ($result) {
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day').'</td>';
// Ref product
print '<td>';
print '<td class="tdoverflowmax100">';
if ($product_static->id > 0) print $product_static->getNomUrl(1);
if ($product_static->id > 0 && $objp->product_label) print '<br>';
if ($objp->product_label) print $objp->product_label;

View File

@ -577,12 +577,12 @@ if ($result) {
print '<td>'.$objp->tva_intra.'</td>';
// Found accounts
print '<td style="'.$code_buy_p_notset.'">';
print '<td>';
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
$shelp = '';
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport");
$s .= ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : $langs->trans("NotDefined"));
$s .= ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : '<span style="'.$code_buy_p_notset.'">'.$langs->trans("NotDefined").'</span>');
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
if ($objp->product_id > 0)
{
@ -591,7 +591,7 @@ if ($result) {
$shelp = '';
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport");
$s .= (empty($objp->code_buy_p) ? $langs->trans("NotDefined") : length_accountg($objp->code_buy_p));
$s .= (empty($objp->code_buy_p) ? '<span style="'.$code_buy_p_notset.'">'.$langs->trans("NotDefined").'</span>' : length_accountg($objp->code_buy_p));
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
}
print '</td>';

View File

@ -60,6 +60,9 @@ class Adherent extends CommonObject
*/
public $ismultientitymanaged = 1;
public $picto = 'member';
public $mesgs;
/**
@ -657,7 +660,7 @@ class Adherent extends CommonObject
$action = 'update';
// Actions on extra fields
if (!$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0) {
@ -927,14 +930,11 @@ class Adherent extends CommonObject
// Removed extrafields
if (!$error) {
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result = $this->deleteExtraFields();
if ($result < 0) {
$error++;
$errorflag = -4;
dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR);
}
$result = $this->deleteExtraFields();
if ($result < 0) {
$error++;
$errorflag = -4;
dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR);
}
}

View File

@ -183,20 +183,14 @@ class AdherentType extends CommonObject
$sql2 .= " SET ";
$sql2 .= " label='".$this->db->escape($this->label)."',";
$sql2 .= " description='".$this->db->escape($this->description)."'";
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email='".$this->db->escape($this->other)."'";
}
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
}
else
{
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email";
}
$sql2 .= ")";
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',";
$sql2 .= " '".$this->db->escape($this->description)."'";
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", '".$this->db->escape($this->other)."'";
}
$sql2 .= ")";
}
dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key);
@ -219,20 +213,14 @@ class AdherentType extends CommonObject
$sql2 .= " SET ";
$sql2 .= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
$sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'";
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email='".$this->db->escape($this->multilangs["$key"]["other"])."'";
}
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
}
else
{
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email";
}
$sql2 .= ")";
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->multilangs["$key"]["label"])."',";
$sql2 .= " '".$this->db->escape($this->multilangs["$key"]["description"])."'";
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'";
}
$sql2 .= ")";
}
@ -409,7 +397,7 @@ class AdherentType extends CommonObject
$action = 'update';
// Actions on extra fields
if (!$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)

View File

@ -45,11 +45,12 @@ $confirm = GETPOST('confirm', 'alpha');
$result = restrictedArea($user, 'adherent', $id);
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";

View File

@ -259,10 +259,9 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
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="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "Information";
$modelmail = "subscription";

View File

@ -6,6 +6,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
*
* 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
@ -239,6 +240,8 @@ if (!$rowid && $action != 'create' && $action != 'edit')
$i = 0;
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
$newcardbutton = '';
if ($user->rights->adherent->configurer)
@ -252,10 +255,9 @@ if (!$rowid && $action != 'create' && $action != 'edit')
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);
print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
$moreforfilter = '';
@ -375,13 +377,8 @@ if ($action == 'create')
print '</td></tr>';
// Other attributes
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit', $parameters);
}
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
print '<tbody>';
print "</table>\n";
@ -822,15 +819,6 @@ if ($rowid > 0)
// Other attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
// Other attributes
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print '</table>';
dol_fiche_end();

View File

@ -128,7 +128,7 @@ print '<input name="town" class="minwidth100" id="town" value="'.($conf->global-
// Country
print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'."\n";

View File

@ -429,7 +429,7 @@ print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth100" id="MAIN_INFO_SO
// Country
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
print $form->select_country($mysoc->country_id, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'."\n";

View File

@ -208,7 +208,7 @@ if (!empty($conf->multicompany->enabled) && !$user->entity)
{
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
}
print getTitleFieldOfList("Action", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
print "</tr>\n";

View File

@ -1718,7 +1718,7 @@ if ($id)
print "</td>";
// Modify link
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
if ($canbemodified) print '<td align="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link

View File

@ -213,19 +213,17 @@ class Dolistore
{
$cat = $this->categories[$i];
if ($cat->is_root_category == 1 && $parent == 0) {
$html .= '<li class="root"><h3 class="nomargesupinf"><a class="nomargesupinf link2cat" href="?mode=marketplace&categorie='.$cat->id.'" '
.'title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'"'
.'>'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a></h3>';
$html .= self::get_categories($cat->id);
$html .= "</li>\n";
$html .= '<li class="root"><h3 class="nomargesupinf"><a class="nomargesupinf link2cat" href="?mode=marketplace&categorie='.$cat->id.'" ';
$html .= 'title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'">'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a></h3>';
$html .= self::get_categories($cat->id);
$html .= "</li>\n";
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
$select = ($cat->id == $this->categorie) ? ' selected' : '';
$html .= '<li><a class="link2cat'.$select.'" href="?mode=marketplace&categorie='.$cat->id.'"'
.' title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'" '
.'>'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a>';
$html .= self::get_categories($cat->id);
$html .= "</li>\n";
} else {
$html .= '<li><a class="link2cat'.$select.'" href="?mode=marketplace&categorie='.$cat->id.'"';
$html .= ' title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'" ';
$html .= '>'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a>';
$html .= self::get_categories($cat->id);
$html .= "</li>\n";
}
}
@ -269,8 +267,8 @@ class Dolistore
// add image or default ?
if ($product->id_default_image != '') {
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">'.
'<img src="'.$image_url.'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">';
$images .= '<img src="'.$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" />';
}

View File

@ -368,20 +368,20 @@ foreach ($dirmodels as $reldir)
{
if (file_exists($dir.'/'.$file))
{
$name = substr($file, 4, dol_strlen($file) -16);
$classname = substr($file, 0, dol_strlen($file) -12);
$name = substr($file, 4, dol_strlen($file) - 16);
$classname = substr($file, 0, dol_strlen($file) - 12);
require_once $dir.'/'.$file;
$module = new $classname($db);
$modulequalified=1;
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
$modulequalified = 1;
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)
{
print '<tr class="oddeven"><td width="100">';
print (empty($module->name)?$name:$module->name);
print (empty($module->name) ? $name : $module->name);
print "</td><td>\n";
if (method_exists($module, 'info')) print $module->info($langs);
else print $module->description;

View File

@ -240,9 +240,9 @@ dol_syslog("select rss boxes", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
$boxlist = InfoBox::listBoxes($db, 'activated', -1, null);
$num = $db->num_rows($resql);
$i = 0;
$boxlist = InfoBox::listBoxes($db, 'activated', -1, null);
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
@ -271,19 +271,19 @@ if ($resql)
print '<input type="submit" class="button buttongen" name="delete" value="'.$langs->trans("Delete").'">';
print '<input type="hidden" name="norss" value="'.$idrss.'">';
print '</td>';
print "</tr>"."\n";
print '</tr>'."\n";
print '<tr class="oddeven">';
print "<td width=\"100px\">".$langs->trans("Title")."</td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_".$idrss."\" value=\"".dol_escape_htmltag($conf->global->$keyrsstitle)."\"></td>";
print "</tr>"."\n";
print '</tr>'."\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("URL")."</td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_".$idrss."\" value=\"".dol_escape_htmltag($conf->global->$keyrssurl)."\"></td>";
print "</tr>"."\n";
print '</tr>'."\n";
print '<tr class="oddeven">';
@ -301,7 +301,7 @@ if ($resql)
print '</div>';
}
print "</td>";
print "</tr>"."\n";
print '</tr>'."\n";
// Logo
if ($result > 0 && empty($rss->error))
@ -315,7 +315,7 @@ if ($resql)
if ($imageurl) print '<img height="32" src="'.$imageurl.'">';
else print $langs->trans("None");
print '</td>';
print "</tr>"."\n";
print '</tr>'."\n";
}
// Active
@ -323,11 +323,11 @@ if ($resql)
print '<tr class="oddeven">';
print '<td>'.$langs->trans('WidgetEnabled').'</td>';
print '<td>'.yn($active).'</td>';
print "</tr>"."\n";
print '</tr>'."\n";
print '</table>'."\n";
print "</form>"."\n";
print "</form>\n";
$i++;
}
@ -350,9 +350,9 @@ $db->close();
*/
function _isInBoxList($idrss, array $boxlist)
{
foreach($boxlist as $box)
foreach ($boxlist as $box)
{
if($box->boxcode === "lastrssinfos" && strpos($box->note, $idrss) !== false)
if ($box->boxcode === "lastrssinfos" && strpos($box->note, $idrss) !== false)
{
return true;
}

View File

@ -96,7 +96,26 @@ print "</tr>\n";
_printOnOff('INVOICE_USE_SITUATION', $langs->trans('UseSituationInvoices'));
_printOnOff('INVOICE_USE_SITUATION_CREDIT_NOTE', $langs->trans('UseSituationInvoicesCreditNote'));
_printOnOff('INVOICE_USE_SITUATION_RETAINED_WARRANTY', $langs->trans('Retainedwarranty'));
//_printOnOff('INVOICE_USE_RETAINED_WARRANTY', $langs->trans('Retainedwarranty'));
$confkey = 'INVOICE_USE_RETAINED_WARRANTY';
$arrayAvailableType = array(
Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation"),
Facture::TYPE_STANDARD.'+'.Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation").' + '.$langs->trans("InvoiceStandard"),
);
$selected = array();
$implodeglue = '+';
if (!empty($conf->global->{$confkey}) && !is_array($conf->global->{$confkey})) {
$selected = explode('+', $conf->global->{$confkey});
}
$curentInput = (empty($inputCount) ? 1 : ($inputCount + 1));
$formSelectInvoiceType = $form->selectarray('value'.$curentInput, $arrayAvailableType, $selected, 1);
_printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType);
//_printOnOff('INVOICE_RETAINED_WARRANTY_LIMITED_TO_SITUATION', $langs->trans('RetainedwarrantyOnlyForSituation'));
_printOnOff('INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION', $langs->trans('RetainedwarrantyOnlyForSituationFinal'));
$metas = array(
'type' => 'number',
@ -227,8 +246,12 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra
print '<input type="hidden" name="action" value="setModuleOptions">';
if ($type == 'textarea') {
print '<textarea '.$metascompil.' >'.dol_htmlentities($conf->global->{$confkey}).'</textarea>';
} else {
}elseif ($type == 'input') {
print '<input '.$metascompil.' />';
}
else {
// custom
print $type;
}
print '</td></tr>';
}

View File

@ -160,7 +160,6 @@ if ($action == 'update')
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'none')), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'none')), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
@ -278,8 +277,10 @@ print '</tr>';
// Disable javascript and ajax
print '<tr class="oddeven"><td>'.$langs->trans("DisableJavascript").'</td><td>';
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
print ' <span class="opacitymedium"> &nbsp; &nbsp; '.$langs->trans("DisableJavascriptNote").'</span>';
print '</td>';
print '<td>';
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Max size of lists
@ -392,6 +393,13 @@ print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans("LoginPage
print '<th width="20">&nbsp;</th>';
print '</tr>';
// Hide helpcenter link on login page
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Message on login page
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user'));
complete_substitutions_array($substitutionarray, $langs);
@ -407,13 +415,6 @@ $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf
$doleditor->Create();
print '</td></tr>'."\n";
// Hide helpcenter link on login page
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK) ? $conf->global->MAIN_HELPCENTER_DISABLELINK : 0, 1);
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Background
print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td colspan="2">';
print '<div class="centpercent inline-block">';

View File

@ -209,6 +209,8 @@ else
// Show examples
print load_fiche_titre($langs->trans("ExamplesWithCurrentSetup"), '', '');
print '<span class="opacitymedium">'.$langs->trans("Format").':</span> '.price(price2num(1234.56789, 'MT'), 0, $langs, 1, -1, -1, $currencycode)."<br>\n";
// Always show vat rates with vat 0
$s = 2 / 7; $qty = 1; $vat = 0;
$tmparray = calcul_price_total(1, $qty * price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);

View File

@ -536,7 +536,7 @@ $errors = $hookmanager->errors;
// Line to enter new values (input fields)
print "<tr ".$bcnd[$var].">";
print '<tr class="oddeven">';
if (empty($reshook))
{
@ -754,9 +754,9 @@ if ($resql)
print '<td class="center">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button buttongen" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '<input type="submit" class="button buttongen" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '</td>';
$fieldsforcontent = array('topic', 'joinfiles', 'content');
@ -902,10 +902,10 @@ if ($resql)
// Modify link / Delete link
print '<td class="center nowraponall" width="64">';
if ($canbemodified) print '<a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a>';
if ($canbemodified) print '<a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a>';
if ($iserasable)
{
print ' &nbsp; <a href="'.$url.'action=delete">'.img_delete().'</a>';
print '<a class="marginleftonly" href="'.$url.'action=delete">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
}
print '</td>';
@ -976,12 +976,9 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf, $langs, $user, $db;
global $form;
global $region_id;
global $elementList, $sourceList, $localtax_typeList;
global $bc;
global $elementList, $sourceList;
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
foreach ($fieldlist as $field => $value)
{

View File

@ -325,6 +325,22 @@ if ($conf->use_javascript_ajax)
if (!empty($menu['langs'])) $langs->load($menu['langs']);
$titre = $langs->trans($menu['titre']);
$entry = '<table class="nobordernopadding centpercent"><tr><td>';
$entry .= '<strong> &nbsp; <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>';
$entry .= '</td><td class="right">';
$entry .= '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> ';
$entry .= '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> ';
$entry .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> ';
$entry .= '&nbsp; &nbsp; &nbsp;';
$entry .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>';
$entry .= '</td></tr></table>';
$buttons = '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> ';
$buttons .= '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> ';
$buttons .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> ';
$buttons .= '&nbsp; &nbsp; &nbsp;';
$buttons .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>';
$data[] = array(
'rowid'=>$menu['rowid'],
'module'=>$menu['module'],
@ -335,20 +351,8 @@ if ($conf->use_javascript_ajax)
'fk_mainmenu'=>$menu['fk_mainmenu'],
'fk_leftmenu'=>$menu['fk_leftmenu'],
'position'=>$menu['position'],
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.
'<strong> &nbsp; <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
'</td><td class="right">'.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
'&nbsp; &nbsp; &nbsp;'.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>'.
'</td></tr></table>',
'buttons'=>'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
'&nbsp; &nbsp; &nbsp;'.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>'
'entry'=>$entry,
'buttons'=>$buttons
);
$i++;
}

View File

@ -387,7 +387,7 @@ if ($mode == 'feature')
$filedata = dol_buildpath($moduledir.'/sql/data.sql');
if (dol_is_file($filedata))
{
$text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql'.')';
$text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql)';
}
else $text .= $langs->trans("No");

View File

@ -281,8 +281,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
print '<td>'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize", $urlforapilayer)).'</td>'."\n";
print '<td class="right">';
print '<textarea id="response" class="hideobject" name="response"></textarea>';
print '<input type="submit" name="modify_apilayer" class="button" value="'.$langs->trans("Modify").'">';
print '<input type="submit" id="bt_sync" name="bt_sync_apilayer" class="button" value="'.$langs->trans('Synchronize').'" />';
print '<input type="submit" name="modify_apilayer" class="button buttongen" value="'.$langs->trans("Modify").'">';
print '<input type="submit" id="bt_sync" name="bt_sync_apilayer" class="button buttongen" value="'.$langs->trans('Synchronize').'" />';
print '</td></tr>';
print '<tr class="oddeven">';

View File

@ -48,19 +48,19 @@ $action = GETPOST('action', 'aZ09');
if ($action == 'update' || $action == 'add')
{
$constlineid = GETPOST('rowid', 'int');
$constname=GETPOST('constname', 'alpha');
$constname = GETPOST('constname', 'alpha');
$constvalue=(GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue'));
$consttype=(GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype'));
$constnote=(GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote'));
$constvalue = (GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue'));
$consttype = (GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype'));
$constnote = (GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote'));
$typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype];
$res=dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
$res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
if (! $res > 0) $error++;
if (!$res > 0) $error++;
if (! $error)
if (!$error)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
@ -183,7 +183,7 @@ $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
// Editing global variables not related to a specific theme
$constantes=array();
$constantes = array();
foreach ($listofnotifiedevents as $notifiedevent)
{
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
@ -210,7 +210,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
$constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
}
$helptext='';
$helptext = '';
form_constantes($constantes, 0, $helptext);
} else {
print '<table class="noborder centpercent">';
@ -265,7 +265,7 @@ print '<td>'.$langs->trans("Code").'</td>';
print '<td>'.$langs->trans("Label").'</td>';
print '<td>'.$langs->trans("FixedEmailTarget").'</td>';
print '<td>'.$langs->trans("Threshold").'</td>';
print '<td>'.'</td>';
print '<td></td>';
print "</tr>\n";
foreach ($listofnotifiedevents as $notifiedevent)

View File

@ -66,7 +66,7 @@ if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
else
{
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php">XDebug admin page</a>';
}
print '<br>';
@ -123,7 +123,7 @@ if (!$foundcache && $test)
{
$foundcache++;
print img_picto('', 'tick.png').' '.$langs->trans("PHPModuleLoaded", "XCache");
print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xcache.php'.'">Xcache admin page</a>';
print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xcache.php">Xcache admin page</a>';
}
$test = function_exists('eaccelerator_info');
if (!$foundcache && $test)

View File

@ -303,7 +303,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<br>';
print '<fieldset><legend>'.$langs->trans('ExportStructure').'</legend>';
print '<input type="checkbox" name="nobin_drop"'.((!isset($_GET["nobin_drop"]) && !isset($_POST["nobin_drop"])) || GETPOST('nobin_drop')) ? ' checked' : ''.' id="checkbox_dump_drop" />';
print '<input type="checkbox" name="nobin_drop"'.((! GETPOSTISSET("nobin_drop") || GETPOST('nobin_drop')) ? ' checked' : '').' id="checkbox_dump_drop" />';
print '<label for="checkbox_dump_drop">'.$langs->trans("AddDropTable").'</label>';
print '<br>';
print '</fieldset>';

View File

@ -41,11 +41,12 @@ if ($user->socid > 0)
$socid = $user->socid;
}
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "DESC";

View File

@ -85,11 +85,11 @@ $workflowcodes = array(
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array('family'=>'classify_order', 'position'=>41, 'enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order', 'warning'=>''), // For this option, if module invoice is disabled, it does not exists, so "Classify billed" for order must be done manually from order card.
'separator2'=>array('family'=>'separator', 'position'=>50),
// Automatic classification supplier proposal
'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array('family'=>'classify_supplier_proposal', 'position'=>60, 'enabled'=>'! empty($conf->supplier_proposal->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'propal', 'warning'=>''),
'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array('family'=>'classify_supplier_proposal', 'position'=>60, 'enabled'=>'! empty($conf->supplier_proposal->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 'picto'=>'propal', 'warning'=>''),
// Automatic classification supplier order
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'! empty($conf->fournisseur->enabled)', 'picto'=>'order', 'warning'=>''),
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)', 'picto'=>'order', 'warning'=>''),
//Automatic classification reception
'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, 'enabled'=>'! empty($conf->reception->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'bill'),
'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, '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'=>'bill'),
);
if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow']))

View File

@ -153,7 +153,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
// Show message
$message = '';
$url = $urlwithroot.'/api/index.php/login?login=<strong>auserlogin</strong>&password=<strong>thepassword</strong>[&reset=1]';
$message .= $langs->trans("UrlToGetKeyToUseAPIs").':<br>';
$message .= '<span class="opacitymedium">'.$langs->trans("UrlToGetKeyToUseAPIs").':</span><br>';
$message .= img_picto('', 'globe').' '.$url;
print $message;
print '<br>';

View File

@ -137,6 +137,15 @@ class DolibarrApi
unset($object->labelStatus);
unset($object->labelStatusShort);
unset($object->stats_propale);
unset($object->stats_commande);
unset($object->stats_contrat);
unset($object->stats_facture);
unset($object->stats_commande_fournisseur);
unset($object->stats_reception);
unset($object->stats_mrptoconsume);
unset($object->stats_mrptoproduce);
unset($object->element);
unset($object->fk_element);
unset($object->table_element);

View File

@ -1409,15 +1409,15 @@ class Setup extends DolibarrApi
*
* Note that conf variables that stores security key or password hashes can't be loaded with API.
*
* @url GET /conf
*
* @param string $confname Name of conf variable to get
* @param string $constantname Name of conf variable to get
* @return array|mixed Data without useless information
*
* @url GET conf/{constantname}
*
* @throws RestException 403 Forbidden
* @throws RestException 500 Error Bad or unknown value for constname
* @throws RestException 500 Error Bad or unknown value for constantname
*/
public function getConf($confname)
public function getConf($constantname)
{
global $conf;
@ -1426,14 +1426,14 @@ class Setup extends DolibarrApi
throw new RestException(403, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_ADMIN_CHECK');
}
if (!preg_match('/^[a-zA-Z0-9_]+$/', $confname) || !isset($conf->global->$confname)) {
throw new RestException(500, 'Error Bad or unknown value for constname');
if (!preg_match('/^[a-zA-Z0-9_]+$/', $constantname) || !isset($conf->global->$constantname)) {
throw new RestException(500, 'Error Bad or unknown value for constantname');
}
if (preg_match('/(_pass|password|secret|_key|key$)/i', $confname)) {
if (preg_match('/(_pass|password|secret|_key|key$)/i', $constantname)) {
throw new RestException(403, 'Forbidden');
}
return $conf->global->$confname;
return $conf->global->$constantname;
}
/**

View File

@ -34,15 +34,18 @@ $langs->loadLangs(array("asset"));
// Get parameters
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'alpha');
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
// Initialize technical objects
$object = new Asset($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id;
$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('assetcard', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@ -59,23 +62,20 @@ foreach ($object->fields as $key => $val)
if (empty($action) && empty($id) && empty($ref)) $action = 'view';
// Security check - Protection if external user
//if ($user->socid > 0) accessforbidden();
//if ($user->socid > 0) $socid = $user->socid;
//$result = restrictedArea($user, 'asset', $id);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
$permissiontoread = $user->rights->asset->read;
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->asset->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1];
/*
* Actions
*
* Put here all code to do according to value of "action" parameter
*/
$parameters = array();
@ -86,16 +86,35 @@ if (empty($reshook))
{
$error = 0;
$permissiontoadd = $user->rights->asset->create;
$permissiontodelete = $user->rights->asset->delete;
$backurlforlist = dol_buildpath('/asset/list.php', 1);
// Actions cancel, add, update or delete
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// Actions when linking object each other
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
// Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Action to move up and down lines of object
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
// Action to build doc
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
if ($action == 'set_thirdparty' && $permissiontoadd)
{
$object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY');
}
if ($action == 'classin' && $permissiontoadd)
{
$object->setProject(GETPOST('projectid', 'int'));
}
// Actions to send emails
$triggersendname = 'ASSET_SENTBYMAIL';
$autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO';
@ -143,11 +162,12 @@ if ($action == 'create')
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
dol_fiche_head(array(), '');
print '<table class="border centpercent">'."\n";
print '<table class="border centpercent tableforfieldcreate">'."\n";
// Common attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
@ -166,6 +186,8 @@ if ($action == 'create')
print '</div>';
print '</form>';
//dol_set_focus('input[name="ref"]');
}
// Part to edit record
@ -178,10 +200,12 @@ if (($id || $ref) && $action == 'edit')
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
dol_fiche_head();
print '<table class="border centpercent">'."\n";
print '<table class="border centpercent tableforfieldedit">'."\n";
// Common attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
@ -206,7 +230,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$res = $object->fetch_optionals();
$head = asset_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("Asset"), -1, 'generic');
dol_fiche_head($head, 'card', $langs->trans("Asset"), -1, $object->picto);
$formconfirm = '';
@ -255,10 +279,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<table class="border centpercent">'."\n";
// Common attributes
//$keyforbreak='fieldkeytoswithonsecondcolumn';
//$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just after this field
//unset($object->fields['fk_project']); // Hide field already shown in banner
//unset($object->fields['fk_soc']); // Hide field already shown in banner
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
// Other attributes
// Other attributes. Fields from hook formObjectOptions and Extrafields.
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
print '</table>';
@ -266,7 +292,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</div>';
print '</div>';
print '<div class="clearboth"></div><br>';
print '<div class="clearboth"></div>';
dol_fiche_end();
@ -349,14 +375,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
//Select mail models is same action as presend
/*
if (GETPOST('modelselected')) $action = 'presend';
// Presend form
$modelmail='inventory';
/*
$modelmail='asset';
$defaulttopic='InformationMessage';
$diroutput = $conf->product->dir_output.'/inventory';
$trackid = 'stockinv'.$object->id;
$diroutput = $conf->asset->dir_output.'/asset';
$trackid = 'asset'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
*/

View File

@ -77,12 +77,12 @@ class Asset extends CommonObject
*/
public $fields = array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object",),
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text",),
'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>1),
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1),
'amount_ht' => array('type'=>'double(24,8)', 'label'=>'AmountHTShort', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",),
'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",),
'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty",),
'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty",),
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>90, 'notnull'=>-1,),
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>-1,),
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>-1,),

View File

@ -202,7 +202,7 @@ class AssetType extends CommonObject
$action = 'update';
// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)

View File

@ -45,11 +45,12 @@ $ref = GETPOST('ref', 'alpha');
//$result = restrictedArea($user, 'asset', $id);
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";

View File

@ -223,20 +223,20 @@ if ($action === 'downloadblockchain') {
{
$statusofrecordnote = $langs->trans("PreviousFingerprint").': '.$previoushash.($statusofrecordnote ? ' - '.$statusofrecordnote : '');
}
print $obj->rowid
.';'.$obj->date_creation
.';"'.$obj->user_fullname.'"'
.';'.$obj->action
.';'.$obj->element
.';'.$obj->amounts
.';'.$obj->fk_object
.';'.$obj->date_object
.';"'.$obj->ref_object.'"'
.';'.$obj->signature
.';'.$statusofrecord
.';'.$statusofrecordnote
.';"'.str_replace('"', '""', $obj->object_data).'"'
."\n";
print $obj->rowid;
print ';'.$obj->date_creation;
print ';"'.str_replace('"', '""', $obj->user_fullname).'"';
print ';'.$obj->action;
print ';'.$obj->element;
print ';'.$obj->amounts;
print ';'.$obj->fk_object;
print ';'.$obj->date_object;
print ';"'.str_replace('"', '""', $obj->ref_object).'"';
print ';'.$obj->signature;
print ';'.$statusofrecord;
print ';'.$statusofrecordnote;
print ';"'.str_replace('"', '""', $obj->object_data).'"';
print "\n";
// Set new previous hash for next fetch
$previoushash = $obj->signature;

View File

@ -44,26 +44,26 @@ $signature = GETPOST('s');
$newblock = GETPOST('b');
$hash = GETPOST('h');
if($auth->fetch(0, $signature)<=0) {
if ($auth->fetch(0, $signature) <= 0) {
$auth->signature = $signature;
$auth->create($user);
}
if(!empty($hash)) {
if (!empty($hash)) {
echo $auth->checkBlockchain($hash) ? 'hashisok' : 'hashisjunk';
}
elseif(!empty($newblock)){
if($auth->checkBlock($newblock)) {
elseif (!empty($newblock)) {
if ($auth->checkBlock($newblock)) {
$auth->addBlock($newblock);
$auth->update($user);
echo 'blockadded';
}
else{
else {
echo 'blockalreadyadded';
}
}
else{
else {
echo 'idontunderstandwhatihavetodo';
}

View File

@ -46,11 +46,12 @@ $ref = GETPOST('ref', 'alpha');
//$result = restrictedArea($user, 'bom', $id);
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";

View File

@ -42,7 +42,7 @@ $ilink = 0;
foreach ($linkedObjectBlock as $key => $objectlink)
{
$ilink++;
$product_static= new Product($db);
$product_static = new Product($db);
$trclass = 'oddeven';
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total';
echo '<tr class="'.$trclass.'" >';

View File

@ -74,7 +74,7 @@ if ($nolinesbefore) {
print '<td class="linecoledit" colspan="'.$colspan.'">&nbsp;</td>';
print '</tr>';
}
print '<tr class="pair nodrag nodrop nohoverpair'.($nolinesbefore || $object->element == 'contrat') ? '' : ' liste_titre_create'.'">';
print '<tr class="pair nodrag nodrop nohoverpair'.(($nolinesbefore || $object->element == 'contrat') ? '' : ' liste_titre_create').'">';
$coldisplay = 0;
// Adds a line numbering column

View File

@ -128,12 +128,16 @@ $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>';
$coldisplay++;
print '<td class="nobottom nowrap linecolcostprice right">';
print '</td>';
$coldisplay += $colspan;
print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
$coldisplay += $colspan;
print '<input type="submit" class="button" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'">';
print '<input type="submit" class="button buttongen marginbottomonly" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'">';
print '<br>';
print '<input type="submit" class="button" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">';
print '<input type="submit" class="button buttongen marginbottomonly" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td>';
print '</tr>';

View File

@ -52,7 +52,7 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td class="linecolnum c
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
// Qty
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
print '<td class="linecolqty right">'.$form->textwithpicto($langs->trans('Qty'), $langs->trans("QtyRequiredIfNoLoss")).'</td>';
if ($conf->global->PRODUCT_USE_UNITS)
{

View File

@ -172,7 +172,7 @@ if ($action == 'create')
// Owner
print '<tr><td>'.$langs->trans("Owner").'</td><td>';
print $form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '</td><td class="hideonsmartphone">&nbsp;</td></tr>';
// Position
@ -276,11 +276,11 @@ if ($id > 0 && !preg_match('/^add/i', $action))
print '<tr><td>'.$langs->trans("Owner").'</td><td>';
if ($action == 'edit' && $user->admin)
{
print $form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
}
else
{
if ($object->fk_user)
if ($object->fk_user > 0)
{
$fuser = new User($db);
$fuser->fetch($object->fk_user);

View File

@ -155,13 +155,12 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
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="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
@ -178,6 +177,8 @@ print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $par
print_liste_field_titre('');
print "</tr>\n";
$cacheOfUsers = array();
$i = 0;
while ($i < min($num, $limit))
{
@ -222,9 +223,13 @@ while ($i < min($num, $limit))
print '<td class="center">';
if ($obj->fk_user)
{
$userstatic->id = $obj->fk_user;
$userstatic->lastname = $obj->login;
print $userstatic->getNomUrl(1);
if (empty($cacheOfUsers[$obj->fk_user])) {
$tmpuser = new User($db);
$tmpuser->fetch($obj->fk_user);
$cacheOfUsers[$obj->fk_user] = $tmpuser;
}
$tmpuser = $cacheOfUsers[$obj->fk_user];
print $tmpuser->getNomUrl(1);
}
else
{
@ -242,11 +247,11 @@ while ($i < min($num, $limit))
print '<td class="nowrap right">';
if ($user->rights->bookmark->creer)
{
print '<a href="'.DOL_URL_ROOT."/bookmarks/card.php?action=edit&id=".$obj->rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()."</a>";
print '<a class="editfielda" href="'.DOL_URL_ROOT."/bookmarks/card.php?action=edit&id=".$obj->rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()."</a>";
}
if ($user->rights->bookmark->supprimer)
{
print "<a href=\"".$_SERVER["PHP_SELF"]."?action=delete&id=$obj->rowid\">".img_delete()."</a>";
print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$obj->rowid.'">'.img_delete().'</a>';
}
else
{

View File

@ -32,23 +32,23 @@
* View
*/
$form=new Form($db);
$form = new Form($db);
// Get list of articles (in warehouse '$conf_fkentrepot' if defined and stock module enabled)
if ( GETPOST('filtre', 'alpha') ) {
if (GETPOST('filtre', 'alpha')) {
// Avec filtre
$ret=array(); $i=0;
$ret = array(); $i = 0;
$sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx, p.fk_product_type";
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
$sql.= " WHERE p.entity IN (".getEntity('product').")";
$sql.= " AND p.tosell = 1";
if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
$sql.= " AND (";
$sql.= "p.ref LIKE '%".$db->escape(GETPOST('filtre'))."%' OR p.label LIKE '%".$db->escape(GETPOST('filtre'))."%'";
if (! empty($conf->barcode->enabled))
if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= ", ps.reel";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
$sql .= " WHERE p.entity IN (".getEntity('product').")";
$sql .= " AND p.tosell = 1";
if (!$conf->global->CASHDESK_SERVICES) $sql .= " AND p.fk_product_type = 0";
$sql .= " AND (";
$sql .= "p.ref LIKE '%".$db->escape(GETPOST('filtre'))."%' OR p.label LIKE '%".$db->escape(GETPOST('filtre'))."%'";
if (!empty($conf->barcode->enabled))
{
$filtre = GETPOST('filtre', 'alpha');
@ -85,23 +85,23 @@ if ( GETPOST('filtre', 'alpha') ) {
{
dol_print_error($db);
}
$tab_designations=$ret;
$tab_designations = $ret;
} else {
// Sans filtre
$ret=array();
$i=0;
$ret = array();
$i = 0;
$sql = "SELECT p.rowid, ref, label, tva_tx, p.fk_product_type";
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
$sql.= " WHERE p.entity IN (".getEntity('product').")";
$sql.= " AND p.tosell = 1";
if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
$sql.= " ORDER BY p.label";
if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= ", ps.reel";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
$sql .= " WHERE p.entity IN (".getEntity('product').")";
$sql .= " AND p.tosell = 1";
if (!$conf->global->CASHDESK_SERVICES) $sql .= " AND p.fk_product_type = 0";
$sql .= " ORDER BY p.label";
dol_syslog($sql);
$resql=$db->query($sql);
$resql = $db->query($sql);
if ($resql)
{
$nbr_enreg = $db->num_rows($resql);

View File

@ -461,7 +461,7 @@ class Categorie extends CommonObject
$action = 'create';
// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)
@ -553,7 +553,7 @@ class Categorie extends CommonObject
$action = 'update';
// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)
@ -646,7 +646,7 @@ class Categorie extends CommonObject
}
// Removed extrafields
if (!$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->deleteExtraFields();
if ($result < 0)

View File

@ -184,9 +184,7 @@ foreach ($fulltree as $key => $val)
'rowid'=>$val['rowid'],
'fk_menu'=>$val['fk_parent'],
'entry'=>'<table class="nobordernopadding centpercent"><tr><td><span class="noborderoncategories" '.($categstatic->color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'.$li.'</span></td>'.$counter.
//'<td width="50%">'.dolGetFirstLineOfText($desc).'</td>'.
'<td class="right" width="20px;"><a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.'">'.img_view().'</a></td>'.
'</tr></table>'
'<td class="right" width="20px;"><a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.'">'.img_view().'</a></td></tr></table>'
);
}
@ -197,7 +195,7 @@ print '<table class="liste nohover" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Categories").'</td><td></td><td class="right">';
if (!empty($conf->use_javascript_ajax))
{
print '<div id="iddivjstreecontrol"><a class="notasortlink" href="#">'.img_picto('', 'folder').' '.$langs->trans("UndoExpandAll").'</a> | <a class="notasortlink" href="#">'.img_picto('', 'folder-open').' '.$langs->trans("ExpandAll").'</a></div>';
print '<div id="iddivjstreecontrol"><a class="notasortlink" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> | <a class="notasortlink" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a></div>';
}
print '</td></tr>';

View File

@ -317,9 +317,9 @@ print '<td class="right">';
if (!empty($conf->use_javascript_ajax))
{
print '<div id="iddivjstreecontrol">';
print '<a class="notasortlink" href="#">'.img_picto('', 'object_category').' '.$langs->trans("UndoExpandAll").'</a>';
print '<a class="notasortlink" href="#">'.img_picto('', 'folder').' '.$langs->trans("UndoExpandAll").'</a>';
print " | ";
print '<a class="notasortlink" href="#">'.img_picto('', 'object_category-expanded').' '.$langs->trans("ExpandAll").'</a>';
print '<a class="notasortlink" href="#">'.img_picto('', 'folder-open').' '.$langs->trans("ExpandAll").'</a>';
print '</div>';
}

View File

@ -317,7 +317,7 @@ if (empty($reshook) && $action == 'add')
if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby", "int");
}
$object->note = trim(GETPOST("note"));
$object->note_private = trim(GETPOST("note"));
if (isset($_POST["contactid"])) $object->contact = $contact;
@ -465,7 +465,6 @@ if (empty($reshook) && $action == 'update')
$object->contactid = key($object->socpeopleassigned);
}
$object->fk_project = GETPOST("projectid", 'int');
$object->note = GETPOST("note", "none"); // deprecated
$object->note_private = GETPOST("note", "none");
$object->fk_element = GETPOST("fk_element", "int");
$object->elementtype = GETPOST("elementtype", "alphanohtml");
@ -1122,7 +1121,7 @@ if ($action == 'create')
// Description
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor('note', (GETPOST('note', 'none') ?GETPOST('note', 'none') : $object->note), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%');
$doleditor = new DolEditor('note', (GETPOST('note', 'none') ?GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%');
$doleditor->Create();
print '</td></tr>';
@ -1188,7 +1187,7 @@ if ($id > 0)
$object->contactid = GETPOST("contactid", 'int');
$object->fk_project = GETPOST("projectid", 'int');
$object->note = GETPOST("note", 'none');
$object_private = GETPOST("note", 'none');
}
if ($result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0)
@ -1540,7 +1539,7 @@ if ($id > 0)
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor('note', $object->note, '', 200, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_5, '90%');
$doleditor = new DolEditor('note', $object->note_private, '', 200, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_5, '90%');
$doleditor->Create();
print '</td></tr>';

View File

@ -380,7 +380,7 @@ class ActionComm extends CommonObject
// Clean parameters
$this->label = dol_trunc(trim($this->label), 128);
$this->location = dol_trunc(trim($this->location), 128);
$this->note = dol_htmlcleanlastbr(trim($this->note));
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
@ -488,7 +488,7 @@ class ActionComm extends CommonObject
$sql .= ($this->ref_ext ? ("'".$this->db->idate($this->ref_ext)."'") : "null").", ";
$sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", ";
$sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", ";
$sql .= " '".$this->db->escape($this->note_private ? $this->note_private : $this->note)."', ";
$sql .= " '".$this->db->escape($this->note_private)."', ";
$sql .= ((isset($this->contactid) && $this->contactid > 0) ? $this->contactid : "null").", ";
$sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", ";
$sql .= ($userownerid > 0 ? $userownerid : "null").", ";
@ -567,14 +567,11 @@ class ActionComm extends CommonObject
if (!$error)
{
// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result = $this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}
$result = $this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}
if (!$error && !$notrigger)
@ -733,14 +730,14 @@ class ActionComm extends CommonObject
$this->type_short = (($transcode != "Action".$obj->type_code.'Short') ? $transcode : '');
$this->code = $obj->code;
$this->label = $obj->label;
$this->datep = $this->db->jdate($obj->datep);
$this->datef = $this->db->jdate($obj->datep2);
$this->label = $obj->label;
$this->datep = $this->db->jdate($obj->datep);
$this->datef = $this->db->jdate($obj->datep2);
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);
$this->note = $obj->note;
$this->note = $obj->note; // deprecated
$this->note_private = $obj->note;
$this->percentage = $obj->percentage;
@ -993,7 +990,7 @@ class ActionComm extends CommonObject
// Clean parameters
$this->label = trim($this->label);
$this->note = trim($this->note);
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
if (empty($this->transparency)) $this->transparency = 0;
@ -1027,7 +1024,7 @@ class ActionComm extends CommonObject
$sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null');
$sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null');
$sql .= ", durationp = ".(isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '' ? "'".$this->db->escape($this->durationp)."'" : "null"); // deprecated
$sql .= ", note = '".$this->db->escape($this->note_private ? $this->note_private : $this->note)."'";
$sql .= ", note = '".$this->db->escape($this->note_private)."'";
$sql .= ", fk_project =".($this->fk_project > 0 ? $this->fk_project : "null");
$sql .= ", fk_soc =".($socid > 0 ? $socid : "null");
$sql .= ", fk_contact =".($contactid > 0 ? $contactid : "null");
@ -1048,7 +1045,7 @@ class ActionComm extends CommonObject
$action = 'update';
// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)
@ -1406,8 +1403,8 @@ class ActionComm extends CommonObject
$tooltip .= '<br><b>'.$langs->trans('Type').':</b> '.$labeltype;
if (!empty($this->location))
$tooltip .= '<br><b>'.$langs->trans('Location').':</b> '.$this->location;
if (!empty($this->note))
$tooltip .= '<br><b>'.$langs->trans('Note').':</b> '.(dol_textishtml($this->note) ? str_replace(array("\r", "\n"), "", $this->note) : str_replace(array("\r", "\n"), '<br>', $this->note));
if (!empty($this->note_private))
$tooltip .= '<br><b>'.$langs->trans('Note').':</b> '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '<br>', $this->note_private));
$linkclose = '';
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
$linkclose = ' style="background-color:#'.$this->type_color.'"';
@ -1940,8 +1937,7 @@ class ActionComm extends CommonObject
$this->location = 'Location';
$this->transparency = 1; // 1 means opaque
$this->priority = 1;
$this->note = "This is a 'public' note";
$this->note_public = "This is a 'public' note.";
//$this->note_public = "This is a 'public' note.";
$this->note_private = "This is a 'private' note.";
$this->userownerid = $user->id;

View File

@ -166,12 +166,12 @@ class CActionComm
if ($qualified && $obj->module)
{
if ($obj->module == 'invoice' && !$conf->facture->enabled) $qualified = 0;
if ($obj->module == 'order' && !$conf->commande->enabled) $qualified = 0;
if ($obj->module == 'propal' && !$conf->propal->enabled) $qualified = 0;
if ($obj->module == 'invoice_supplier' && !$conf->fournisseur->enabled) $qualified = 0;
if ($obj->module == 'order_supplier' && !$conf->fournisseur->enabled) $qualified = 0;
if ($obj->module == 'shipping' && !$conf->expedition->enabled) $qualified = 0;
if ($obj->module == 'invoice' && !$conf->facture->enabled) $qualified=0;
if ($obj->module == 'order' && !$conf->commande->enabled) $qualified=0;
if ($obj->module == 'propal' && !$conf->propal->enabled) $qualified=0;
if ($obj->module == 'invoice_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ! $conf->supplier_invoice->enabled)) $qualified=0;
if ($obj->module == 'order_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ! $conf->supplier_order->enabled)) $qualified=0;
if ($obj->module == 'shipping' && !$conf->expedition->enabled) $qualified=0;
}
if ($qualified)

View File

@ -62,11 +62,12 @@ if ($id > 0)
}
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";

View File

@ -553,8 +553,7 @@ if ($resql)
$actionstatic->type_picto = $obj->type_picto;
$actionstatic->label = $obj->label;
$actionstatic->location = $obj->location;
$actionstatic->note = dol_htmlentitiesbr($obj->note); // deprecated
$actionstatic->note_public = dol_htmlentitiesbr($obj->note);
$actionstatic->note_private = dol_htmlentitiesbr($obj->note);
$actionstatic->fetchResources();
@ -613,8 +612,8 @@ if ($resql)
// Description
if (!empty($arrayfields['a.note']['checked'])) {
print '<td class="tdoverflowonsmartphone">';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note, 0));
print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note);
$text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 0));
print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note_private);
print '</td>';
}

View File

@ -65,11 +65,12 @@ $result = restrictedArea($user, 'societe', $id, '&societe');
$action = GETPOST('action', 'aZ09');
$mode = GETPOST("mode");
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";

View File

@ -35,7 +35,7 @@ if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/cl
if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
if (!empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
if (!$user->rights->societe->lire) accessforbidden();
@ -76,7 +76,7 @@ $companystatic = new Societe($db);
if (!empty($conf->propal->enabled)) $propalstatic = new Propal($db);
if (!empty($conf->supplier_proposal->enabled)) $supplierproposalstatic = new SupplierProposal($db);
if (!empty($conf->commande->enabled)) $orderstatic = new Commande($db);
if (!empty($conf->fournisseur->enabled)) $supplierorderstatic = new CommandeFournisseur($db);
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) $supplierorderstatic = new CommandeFournisseur($db);
llxHeader("", $langs->trans("CommercialArea"));
@ -102,7 +102,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
$listofsearchfields['search_supplier_proposal'] = array('text'=>'SupplierProposalShort');
}
// Search supplier order
if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire)
{
$listofsearchfields['search_supplier_order'] = array('text'=>'SupplierOrder');
}
@ -414,7 +414,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
/*
* Draft suppliers orders
*/
if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire)
{
$langs->load("orders");
@ -581,7 +581,7 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
}
// Last suppliers
if (!empty($conf->fournisseur->enabled) && $user->rights->societe->lire)
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->societe->lire)
{
$langs->load("boxes");

View File

@ -147,15 +147,15 @@ if ($action == 'add') {
if (preg_match("/st_dt/", $key)) {
$dtarr = array();
$dtarr = explode('_', $key);
if (!array_key_exists('options_'.$dtarr[1].'_st_dt'.'_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_st_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear'.'_cnct', 'int'));
if (!array_key_exists('options_'.$dtarr[1].'_st_dt_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear_cnct', 'int'));
}
} elseif (preg_match("/end_dt/", $key)) {
// Special case for end date come with 3 inputs day, month, year
$dtarr = array();
$dtarr = explode('_', $key);
if (!array_key_exists('options_'.$dtarr[1].'_end_dt'.'_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_end_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear'.'_cnct', 'int'));
if (!array_key_exists('options_'.$dtarr[1].'_end_dt_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear_cnct', 'int'));
}
} else {
$array_query[$key] = GETPOST($key);
@ -299,15 +299,15 @@ if ($action == 'savefilter' || $action == 'createfilter') {
if (preg_match("/st_dt/", $key)) {
$dtarr = array();
$dtarr = explode('_', $key);
if (!array_key_exists('options_'.$dtarr[1].'_st_dt'.'_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_st_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear'.'_cnct', 'int'));
if (!array_key_exists('options_'.$dtarr[1].'_st_dt_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear_cnct', 'int'));
}
} elseif (preg_match("/end_dt/", $key)) {
// Special case for end date come with 3 inputs day, month, year
$dtarr = array();
$dtarr = explode('_', $key);
if (!array_key_exists('options_'.$dtarr[1].'_end_dt'.'_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_end_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear'.'_cnct', 'int'));
if (!array_key_exists('options_'.$dtarr[1].'_end_dt_cnct', $array_query)) {
$array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear_cnct', 'int'));
// print $array_query['cnct_options_'.$dtarr[1].'_end_dt'];
// 01/02/1013=1361228400
}

View File

@ -724,13 +724,13 @@ class AdvanceTargetingMailing extends CommonObject
}
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') ||
($extrafields->attributes[$elementtype]['type'][$key] == 'double')) {
if (!empty($arrayquery['options_'.$key.'_max'.'_cnct'])) {
$sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'.'_cnct'].")";
if (!empty($arrayquery['options_'.$key.'_max_cnct'])) {
$sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min_cnct'].")";
}
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') ||
($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) {
if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])) {
$sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')";
if (!empty($arrayquery['options_'.$key.'_end_dt_cnct'])) {
$sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt_cnct'])."')";
}
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') {
if ($arrayquery['options_'.$key.'_cnct'] != '') {

View File

@ -511,7 +511,7 @@ if (empty($reshook))
}
// Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
if (method_exists($lines[$i], 'fetch_optionals')) {
$lines[$i]->fetch_optionals();
$array_options = $lines[$i]->array_options;
}
@ -1448,8 +1448,6 @@ if (empty($reshook))
* View
*/
llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
@ -1458,6 +1456,9 @@ $formmargin = new FormMargin($db);
$companystatic = new Societe($db);
if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
llxHeader('', $langs->trans('Proposal'), $help_url);
$now = dol_now();
// Add new proposal
@ -1465,7 +1466,7 @@ if ($action == 'create')
{
$currency_code = $conf->currency;
print load_fiche_titre($langs->trans("NewProp"));
print load_fiche_titre($langs->trans("NewProp"), '', 'propal');
$soc = new Societe($db);
if ($socid > 0)

View File

@ -1253,13 +1253,10 @@ class Propal extends CommonObject
// Actions on extra fields
if (!$error)
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
$result = $this->insertExtraFields();
if ($result < 0)
{
$result = $this->insertExtraFields();
if ($result < 0)
{
$error++;
}
$error++;
}
}
@ -1683,7 +1680,7 @@ class Propal extends CommonObject
$error++; $this->errors[] = "Error ".$this->db->lasterror();
}
if (!$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options) > 0)
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)
@ -3002,8 +2999,11 @@ class Propal extends CommonObject
if (!$error)
{
$main = MAIN_DB_PREFIX . 'propaldet';
$ef = $main . "_extrafields";
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = " . $this->id . ")";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id;
if ($this->db->query($sql))
if ($this->db->query($sqlef) && $this->db->query($sql))
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE rowid = ".$this->id;
if ($this->db->query($sql))
@ -3053,15 +3053,12 @@ class Propal extends CommonObject
// Removed extrafields
if (!$error)
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
$result = $this->deleteExtraFields();
if ($result < 0)
{
$result = $this->deleteExtraFields();
if ($result < 0)
{
$error++;
$errorflag = -4;
dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR);
}
$error++;
$errorflag = -4;
dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR);
}
}
@ -3658,7 +3655,7 @@ class Propal extends CommonObject
if ($user->rights->propal->lire)
{
$label = '<u>'.$langs->trans("ShowPropal").'</u>';
$label = '<u>'.$langs->trans("Proposal").'</u>';
if (!empty($this->ref))
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
if (!empty($this->ref_client))
@ -3669,6 +3666,11 @@ class Propal extends CommonObject
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (!empty($this->total_ttc))
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
if (isset($this->statut)) {
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
}
if ($option == '') {
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id.$get_params;
}
@ -3696,7 +3698,7 @@ class Propal extends CommonObject
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label = $langs->trans("ShowPropal");
$label = $langs->trans("Proposal");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
@ -4147,7 +4149,7 @@ class PropaleLigne extends CommonObjectLine
{
$this->rowid = $this->db->last_insert_id(MAIN_DB_PREFIX.'propaldet');
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$this->id = $this->rowid;
$result = $this->insertExtraFields();
@ -4199,7 +4201,7 @@ class PropaleLigne extends CommonObjectLine
if ($this->db->query($sql))
{
// Remove extrafields
if ((!$error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
if (!$error)
{
$this->id = $this->rowid;
$result = $this->deleteExtraFields();
@ -4329,7 +4331,7 @@ class PropaleLigne extends CommonObjectLine
$resql = $this->db->query($sql);
if ($resql)
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$this->id = $this->rowid;
$result = $this->insertExtraFields();

View File

@ -53,11 +53,12 @@ if (!empty($user->socid))
$result = restrictedArea($user, 'propal', $id);
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;

View File

@ -58,7 +58,7 @@ $help_url = "EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|
llxHeader("", $langs->trans("ProspectionArea"), $help_url);
print load_fiche_titre($langs->trans("ProspectionArea"), '', 'commercial');
print load_fiche_titre($langs->trans("ProspectionArea"), '', 'propal');
//print '<table width="100%" class="notopnoleftnoright">';
//print '<tr><td valign="top" width="30%" class="notopnoleft">';

View File

@ -155,8 +155,8 @@ $arrayfields = array(
'p.ref'=>array('label'=>"Ref", 'checked'=>1),
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1),
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
's.town'=>array('label'=>"Town", 'checked'=>1),
's.zip'=>array('label'=>"Zip", 'checked'=>1),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
@ -287,7 +287,7 @@ $sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.
$sql .= " typent.code as typent_code,";
$sql .= " ava.rowid as availability,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva as multicurrency_total_vat, p.multicurrency_total_ttc,';
$sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
$sql .= ' p.note_public, p.note_private,';
@ -408,7 +408,7 @@ if ($resql)
$objectstatic = new Propal($db);
$userstatic = new User($db);
if ($socid > 0)
if ($socid > 0)
{
$soc = new Societe($db);
$soc->fetch($socid);
@ -473,7 +473,7 @@ if ($resql)
$arrayofmassactions = array(
'generate_doc'=>$langs->trans("ReGeneratePDF"),
'builddoc'=>$langs->trans("PDFMerge"),
'presend'=>$langs->trans("SendByMail"),
'presend'=>$langs->trans("SendByMail"),
);
if ($user->rights->propal->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if ($user->rights->propal->cloturer) $arrayofmassactions['closed'] = $langs->trans("Close");
@ -483,8 +483,8 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->propal->creer)
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
}
$newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
}
// Fields title search
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
@ -496,7 +496,7 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'propal', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendPropalRef";
$modelmail = "proposal_send";
@ -514,19 +514,19 @@ if ($resql)
$moreforfilter = '';
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
$moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter .= '<div class="divsearchfield">';
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
$moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('LinkedToSpecificUsers').': ';
$moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '</div>';
@ -545,9 +545,9 @@ if ($resql)
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
$moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
$moreforfilter .= '</div>';
$moreforfilter .= '</div>';
}
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
@ -572,40 +572,40 @@ if ($resql)
if (!empty($arrayfields['p.ref']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>';
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>';
}
if (!empty($arrayfields['p.ref_client']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
print '</td>';
print '<input class="flat maxwidth50" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
print '</td>';
}
if (!empty($arrayfields['pr.ref']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="6" type="text" name="search_refproject" value="'.dol_escape_htmltag($search_refproject).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input class="flat maxwidth50" type="text" name="search_refproject" value="'.dol_escape_htmltag($search_refproject).'">';
print '</td>';
}
if (!empty($arrayfields['pr.title']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="6" type="text" name="search_project" value="'.dol_escape_htmltag($search_project).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input class="flat maxwidth50" type="text" name="search_project" value="'.dol_escape_htmltag($search_project).'">';
print '</td>';
}
if (!empty($arrayfields['s.nom']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="10" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
print '</td>';
print '<input class="flat maxwidth100" type="text" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
print '</td>';
}
if (!empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
if (!empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.$search_zip.'"></td>';
if (!empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>';
if (!empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_zip" value="'.$search_zip.'"></td>';
// State
if (!empty($arrayfields['state.nom']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
print '<input class="flat maxwidth50" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
print '</td>';
}
// Country
@ -618,7 +618,7 @@ if ($resql)
// Company type
if (!empty($arrayfields['typent.code']['checked']))
{
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
print '<td class="liste_titre maxwidth100onsmartphone" align="center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
print ajax_combobox('search_type_thirdparty');
print '</td>';
@ -668,7 +668,7 @@ if ($resql)
// Availability
if (!empty($arrayfields['ava.rowid']['checked']))
{
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
print '<td class="liste_titre maxwidth100onsmartphone center">';
$form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1);
print ajax_combobox('search_availability');
print '</td>';
@ -783,7 +783,7 @@ if ($resql)
print '<td class="liste_titre">';
print '</td>';
}
// Date cloture
// Date cloture
if (!empty($arrayfields['p.date_cloture']['checked']))
{
print '<td class="liste_titre">';
@ -862,6 +862,8 @@ if ($resql)
$objectstatic->ref_client = $obj->ref_client;
$objectstatic->note_public = $obj->note_public;
$objectstatic->note_private = $obj->note_private;
$objectstatic->statut = $obj->status;
$objectstatic->status = $obj->status;
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
@ -900,16 +902,16 @@ if ($resql)
if (!empty($arrayfields['p.ref']['checked']))
{
print '<td class="nowrap">';
print '<td class="nowraponall">';
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
// Picto + Ref
print '<td class="nobordernopadding nowrap">';
print '<td class="nobordernopadding nowraponall">';
print $objectstatic->getNomUrl(1, '', '', 0, 1, (isset($conf->global->PROPAL_LIST_SHOW_NOTES) ? $conf->global->PROPAL_LIST_SHOW_NOTES : 1));
print '</td>';
// Warning
$warnornote = '';
if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote .= img_warning($langs->trans("Late"));
if ($obj->status == Propal::STATUS_VALIDATED && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote .= img_warning($langs->trans("Late"));
if ($warnornote)
{
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
@ -939,24 +941,24 @@ if ($resql)
if (!empty($arrayfields['pr.ref']['checked']))
{
// Project ref
print '<td class="nowrap">';
if ($obj->project_id > 0) {
// Project ref
print '<td class="nowrap">';
if ($obj->project_id > 0) {
print $projectstatic->getNomUrl(1);
}
print '</td>';
if (!$i) $totalarray['nbfield']++;
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
if (!empty($arrayfields['pr.title']['checked']))
{
// Project label
print '<td class="nowrap">';
if ($obj->project_id > 0) {
print $projectstatic->title;
}
print '</td>';
if (!$i) $totalarray['nbfield']++;
// Project label
print '<td class="nowrap">';
if ($obj->project_id > 0) {
print $projectstatic->title;
}
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
// Thirdparty
@ -1059,10 +1061,10 @@ if ($resql)
// Amount HT
if (!empty($arrayfields['p.total_ht']['checked']))
{
print '<td class="nowrap right">'.price($obj->total_ht)."</td>\n";
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
$totalarray['val']['p.total_ht'] += $obj->total_ht;
print '<td class="nowrap right">'.price($obj->total_ht)."</td>\n";
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
$totalarray['val']['p.total_ht'] += $obj->total_ht;
}
// Amount VAT
if (!empty($arrayfields['p.total_vat']['checked']))
@ -1081,42 +1083,42 @@ if ($resql)
$totalarray['val']['p.total_ttc'] += $obj->total_ttc;
}
// Amount invoiced
if (!empty($arrayfields['p.total_ht_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($totalInvoicedHT)."</td>\n";
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
$totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
}
// Amount invoiced
if (!empty($arrayfields['p.total_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($totalInvoicedTTC)."</td>\n";
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
$totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
}
if (!empty($arrayfields['p.total_ht_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($totalInvoicedHT)."</td>\n";
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
$totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
}
// Amount invoiced
if (!empty($arrayfields['p.total_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($totalInvoicedTTC)."</td>\n";
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
$totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
}
// Currency
if (!empty($arrayfields['p.multicurrency_code']['checked']))
{
print '<td class="nowrap">'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."</td>\n";
if (!$i) $totalarray['nbfield']++;
print '<td class="nowrap">'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Currency rate
if (!empty($arrayfields['p.multicurrency_tx']['checked']))
{
print '<td class="nowrap">';
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
print '<td class="nowrap">';
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Amount HT
if (!empty($arrayfields['p.multicurrency_total_ht']['checked']))
{
print '<td class="right nowrap">'.price($obj->multicurrency_total_ht)."</td>\n";
if (!$i) $totalarray['nbfield']++;
print '<td class="right nowrap">'.price($obj->multicurrency_total_ht)."</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Amount VAT
if (!empty($arrayfields['p.multicurrency_total_vat']['checked']))
@ -1131,17 +1133,17 @@ if ($resql)
if (!$i) $totalarray['nbfield']++;
}
// Amount invoiced
if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($multicurrency_totalInvoicedHT)."</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Amount invoiced
if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($multicurrency_totalInvoicedTTC)."</td>\n";
if (!$i) $totalarray['nbfield']++;
}
if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($multicurrency_totalInvoicedHT)."</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Amount invoiced
if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked']))
{
print '<td class="nowrap right">'.price($multicurrency_totalInvoicedTTC)."</td>\n";
if (!$i) $totalarray['nbfield']++;
}
$userstatic->id = $obj->fk_user_author;
$userstatic->login = $obj->login;
@ -1221,7 +1223,7 @@ if ($resql)
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
// Date cloture
// Date cloture
if (!empty($arrayfields['p.date_cloture']['checked']))
{
print '<td align="center" class="nowrap">';
@ -1232,7 +1234,7 @@ if ($resql)
// Status
if (!empty($arrayfields['p.fk_statut']['checked']))
{
print '<td class="nowrap right">'.$objectstatic->LibStatut($obj->fk_statut, 5).'</td>';
print '<td class="nowrap right">'.$objectstatic->getLibStatut(5).'</td>';
if (!$i) $totalarray['nbfield']++;
}
// Action column

View File

@ -67,20 +67,19 @@ $formpropal = new FormPropal($db);
$langs->loadLangs(array('propal', 'other', 'companies'));
if ($mode == 'customer')
{
$title = $langs->trans("ProposalsStatistics");
$dir = $conf->propale->dir_temp;
}
$picto = 'propal';
$title = $langs->trans("ProposalsStatistics");
$dir = $conf->propale->dir_temp;
if ($mode == 'supplier')
{
$picto = 'supplier_proposal';
$title = $langs->trans("ProposalsStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")";
$dir = $conf->supplier_proposal->dir_temp;
}
llxHeader('', $title);
print load_fiche_titre($title, '', 'commercial');
print load_fiche_titre($title, '', $picto);
dol_mkdir($dir);

View File

@ -113,7 +113,7 @@ $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
if (!empty($conf->expedition->enabled) && $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER = 1) {
if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $object->warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
}
@ -384,7 +384,7 @@ if (empty($reshook))
}
// Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if trigger used
if (method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if trigger used
{
$lines[$i]->fetch_optionals();
$array_options = $lines[$i]->array_options;
@ -1493,7 +1493,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
// Mode creation
if ($action == 'create' && $usercancreate)
{
print load_fiche_titre($langs->trans('CreateOrder'), '', 'commercial');
print load_fiche_titre($langs->trans('CreateOrder'), '', 'order');
$soc = new Societe($db);
if ($socid > 0)
@ -1506,9 +1506,10 @@ if ($action == 'create' && $usercancreate)
if (!empty($origin) && !empty($originid)) {
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
$regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs [1];
$subelement = $regs [2];
$element = $regs[1];
$subelement = $regs[2];
}
if ($element == 'project') {

View File

@ -33,7 +33,8 @@ class Orders extends DolibarrApi
* @var array $FIELDS Mandatory fields, checked when create and update object
*/
static $FIELDS = array(
'socid'
'socid',
'date'
);
/**
@ -233,7 +234,9 @@ class Orders extends DolibarrApi
}
/**
* Create order object
* Create a sale order
*
* Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] }
*
* @param array $request_data Request data
* @return int ID of order

View File

@ -3342,7 +3342,7 @@ class Commande extends CommonOrder
$error++; $this->errors[] = "Error ".$this->db->lasterror();
}
if (!$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options) > 0)
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)
@ -3409,6 +3409,19 @@ class Commande extends CommonOrder
$error++;
}
if (!$error)
{
// Delete extrafields of order details
$main = MAIN_DB_PREFIX . 'commandedet';
$ef = $main . "_extrafields";
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = " . $this->id . ")";
if (!$this->db->query($sql))
{
$error++;
$this->errors[] = $this->db->lasterror();
}
}
if (!$error)
{
// Delete order details
@ -3437,14 +3450,11 @@ class Commande extends CommonOrder
if (!$error)
{
// Remove extrafields
if ((!$error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
$result = $this->deleteExtraFields();
if ($result < 0)
{
$result = $this->deleteExtraFields();
if ($result < 0)
{
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
@ -3697,7 +3707,7 @@ class Commande extends CommonOrder
$label = '';
if ($user->rights->commande->lire) {
$label = '<u>'.$langs->trans("ShowOrder").'</u>';
$label = '<u>'.$langs->trans("Order").'</u>';
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
if (!empty($this->total_ht)) {
@ -3709,6 +3719,9 @@ class Commande extends CommonOrder
if (!empty($this->total_ttc)) {
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
}
if (isset($this->statut)) {
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
}
}
$linkclose = '';
@ -3716,7 +3729,7 @@ class Commande extends CommonOrder
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label = $langs->trans("ShowOrder");
$label = $langs->trans("Order");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
@ -4252,7 +4265,7 @@ class OrderLine extends CommonOrderLine
if ($resql)
{
// Remove extrafields
if ((!$error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
if (!$error)
{
$this->id = $this->rowid;
$result = $this->deleteExtraFields();
@ -4398,7 +4411,7 @@ class OrderLine extends CommonOrderLine
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'commandedet');
$this->rowid = $this->id;
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0)
@ -4531,7 +4544,7 @@ class OrderLine extends CommonOrderLine
$resql = $this->db->query($sql);
if ($resql)
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
$this->id = $this->rowid;
$result = $this->insertExtraFields();

View File

@ -52,11 +52,12 @@ if ($user->socid)
$result = restrictedArea($user, 'commande', $id, '');
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;

View File

@ -64,7 +64,7 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P
llxHeader("", $langs->trans("Orders"), $help_url);
print load_fiche_titre($langs->trans("OrdersArea"), '', 'commercial');
print load_fiche_titre($langs->trans("OrdersArea"), '', 'order');
print '<div class="fichecenter"><div class="fichethirdleft">';
@ -106,6 +106,7 @@ if ($resql)
$total = 0;
$totalinprocess = 0;
$dataseries = array();
$colorseries = array();
$vals = array();
// -1=Canceled, 0=Draft, 1=Validated, 2=Accepted/On process, 3=Closed (Sent/Received, billed or not)
while ($i < $num)

View File

@ -348,7 +348,7 @@ if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact
if ($search_total_ht != '') $sql .= natural_search('c.total_ht', $search_total_ht, 1);
if ($search_total_vat != '') $sql .= natural_search('c.tva', $search_total_vat, 1);
if ($search_total_ttc != '') $sql .= natural_search('c.total_ttc', $search_total_ttc, 1);
if ($search_warehouse != '') $sql .= natural_search('c.fk_warehouse', $search_warehouse, 1);
if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('c.fk_warehouse', $search_warehouse, 1);
if ($search_multicurrency_code != '') $sql .= ' AND c.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"';
if ($search_multicurrency_tx != '') $sql .= natural_search('c.multicurrency_tx', $search_multicurrency_tx, 1);
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('c.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
@ -502,7 +502,7 @@ if ($resql)
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'order', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendOrderRef";
$modelmail = "order_send";
@ -603,7 +603,7 @@ if ($resql)
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
$moreforfilter .= '</div>';
}
if (!empty($conf->expedition->enabled) && $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER = 1) {
if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
$moreforfilter .= '<div class="divsearchfield">';
@ -901,6 +901,7 @@ if ($resql)
$generic_commande->id = $obj->rowid;
$generic_commande->ref = $obj->ref;
$generic_commande->statut = $obj->fk_statut;
$generic_commande->billed = $obj->billed;
$generic_commande->date = $db->jdate($obj->date_commande);
$generic_commande->date_livraison = $db->jdate($obj->date_delivery);
$generic_commande->ref_client = $obj->ref_client;
@ -919,7 +920,7 @@ if ($resql)
// Ref
if (!empty($arrayfields['c.ref']['checked']))
{
print '<td class="nowrap">';
print '<td class="nowraponall">';
$generic_commande->getLinesArray(); // This set ->lines

View File

@ -285,7 +285,7 @@ if (($action == 'create' || $action == 'add') && !$error)
}
// Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
if (method_exists($lines[$i], 'fetch_optionals')) {
$lines[$i]->fetch_optionals();
$array_options = $lines[$i]->array_options;
}

View File

@ -66,20 +66,20 @@ $langs->loadLangs(array('orders', 'companies', 'other', 'suppliers'));
$form = new Form($db);
$formorder = new FormOrder($db);
if ($mode == 'customer')
{
$title = $langs->trans("OrdersStatistics");
$dir = $conf->commande->dir_temp;
}
$picto = 'order';
$title = $langs->trans("OrdersStatistics");
$dir = $conf->commande->dir_temp;
if ($mode == 'supplier')
{
$picto = 'supplier_order';
$title = $langs->trans("OrdersStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")";
$dir = $conf->fournisseur->commande->dir_temp;
}
llxHeader('', $title);
print load_fiche_titre($title, '', 'commercial');
print load_fiche_titre($title, '', $picto);
dol_mkdir($dir);

View File

@ -23,8 +23,8 @@
* \brief Page to show portoflio and files of a thirdparty and download it
*/
if ($_GET['action'] == 'dl' || $_POST['action'] == 'dl') { // To not replace token when downloading file
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
}
require '../main.inc.php';

View File

@ -57,11 +57,12 @@ if ($user->socid)
$socid = $user->socid;
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder)

View File

@ -108,14 +108,6 @@ $pagenext = $page + 1;
if (!$sortorder) $sortorder = 'desc,desc,desc';
if (!$sortfield) $sortfield = 'b.datev,b.dateo,b.rowid';
$mode_balance_ok = false;
//if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected
if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid'))
{
$sortfield = 'b.datev,b.dateo,b.rowid';
if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true;
}
$object = new Account($db);
if ($id > 0 || !empty($ref))
{
@ -130,6 +122,13 @@ if ($id > 0 || !empty($ref))
}
}
$mode_balance_ok = false;
//if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected
if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid'))
{
$sortfield = 'b.datev,b.dateo,b.rowid';
if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true;
}
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
@ -574,6 +573,7 @@ if ($page >= $nbtotalofpages)
if ($page < 0) $page = 0;
}
// If not account defined $mode_balance_ok=false
if (empty($search_account)) $mode_balance_ok = false;
// If a search is done $mode_balance_ok=false
@ -583,7 +583,7 @@ if (!empty($search_type)) $mode_balance_ok = false;
if (!empty($search_debit)) $mode_balance_ok = false;
if (!empty($search_credit)) $mode_balance_ok = false;
if (!empty($search_thirdparty)) $mode_balance_ok = false;
if ($search_conciliated != '') $mode_balance_ok = false;
if ($search_conciliated != '' && $search_conciliated != '-1') $mode_balance_ok = false;
if (!empty($search_num_releve)) $mode_balance_ok = false;
$sql .= $db->plimit($limit + 1, $offset);
@ -751,8 +751,8 @@ if ($resql)
print '</td>';
}*/
print '<td class="center">';
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Add").'"><br>';
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
print '<input type="submit" name="save" class="button buttongen marginbottomonly" value="'.$langs->trans("Add").'"><br>';
print '<input type="submit" name="cancel" class="button buttongen marginbottomonly" value="'.$langs->trans("Cancel").'">';
print '</td></tr>';
print '</table>';
@ -815,7 +815,7 @@ if ($resql)
$morehtml .= $buttonreconcile;
}
$morehtml .= $newcardbutton;
$morehtml .= '<!-- Add New button -->'.$newcardbutton;
$picto = 'bank_account';
if ($id > 0 || !empty($ref)) $picto = '';

View File

@ -823,13 +823,10 @@ class Account extends CommonObject
if ($result)
{
// Actions on extra fields (by external module or standard code)
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (!$error)
{
if (!$error)
{
$result = $this->insertExtraFields();
if ($result < 0) $error++;
}
$result = $this->insertExtraFields();
if ($result < 0) $error++;
}
if (!$error && !$notrigger)
@ -1107,7 +1104,7 @@ class Account extends CommonObject
if ($result)
{
// Remove extrafields
if ((empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
if (!$error)
{
$result = $this->deleteExtraFields();
if ($result < 0)
@ -1390,8 +1387,8 @@ class Account extends CommonObject
global $conf, $langs, $user;
$result = '';
$label = '<u>'.$langs->trans("ShowAccount").'</u>';
$label .= '<br><b>'.$langs->trans('BankAccount').':</b> '.$this->label;
$label = '<u>'.$langs->trans("BankAccount").'</u>';
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
$label .= '<br><b>'.$langs->trans('AccountNumber').':</b> '.$this->number;
$label .= '<br><b>'.$langs->trans("AccountCurrency").':</b> '.$this->currency_code;

View File

@ -73,12 +73,12 @@ class BankAccounts extends DolibarrApi
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."bank_account as t";
if ($category > 0) {
$sql .= ", ".MAIN_DB_PREFIX."categorie_account as c";
$sql .= ", ".MAIN_DB_PREFIX."categorie_account as c";
}
$sql .= ' WHERE t.entity IN ('.getEntity('bank_account').')';
// Select accounts of given category
if ($category > 0) {
$sql .= " AND c.fk_categorie = ".$db->escape($category)." AND c.fk_account = t.rowid ";
$sql .= " AND c.fk_categorie = ".$this->db->escape($category)." AND c.fk_account = t.rowid ";
}
// Add sql filters
if ($sqlfilters)

View File

@ -54,11 +54,12 @@ if ($user->socid)
$socid = $user->socid;
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder)

View File

@ -346,7 +346,7 @@ if ($result)
$paymenttmp->fetch($links[$key]['url_id']);
$paymenttmp->ref = $langs->trans("Payment").' '.$paymenttmp->ref;
/*print '<a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowPayment'),'payment').' ';
print img_object($langs->trans('Payment'),'payment').' ';
print $langs->trans("Payment");
print '</a>';*/
print $paymenttmp->getNomUrl(1);
@ -357,7 +357,7 @@ if ($result)
$paymenttmp->fetch($links[$key]['url_id']);
$paymenttmp->ref = $langs->trans("Payment").' '.$paymenttmp->ref;
/*print '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowPayment'),'payment').' ';
print img_object($langs->trans('Payment'),'payment').' ';
print $langs->trans("Payment");
print '</a>';*/
print $paymenttmp->getNomUrl(1);
@ -369,67 +369,67 @@ if ($result)
}
elseif ($links[$key]['type'] == 'sc') {
print '<a href="'.DOL_URL_ROOT.'/compta/sociales/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowSocialContribution'), 'bill').' ';
print img_object($langs->trans('SocialContribution'), 'bill').' ';
print $langs->trans("SocialContribution").($links[$key]['label'] ? ' - '.$links[$key]['label'] : '');
print '</a>';
}
elseif ($links[$key]['type'] == 'payment_sc') {
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowPayment'), 'payment').' ';
print img_object($langs->trans('Payment'), 'payment').' ';
print $langs->trans("SocialContributionPayment");
print '</a>';
}
elseif ($links[$key]['type'] == 'payment_vat') {
print '<a href="'.DOL_URL_ROOT.'/compta/tva/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowVAT'), 'payment').' ';
print img_object($langs->trans('VAT'), 'payment').' ';
print $langs->trans("VATPayment");
print '</a>';
}
elseif ($links[$key]['type'] == 'payment_salary') {
print '<a href="'.DOL_URL_ROOT.'/salaries/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowPaymentSalary'), 'payment').' ';
print img_object($langs->trans('PaymentSalary'), 'payment').' ';
print $langs->trans("SalaryPayment");
print '</a>';
}
elseif ($links[$key]['type'] == 'payment_loan') {
print '<a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowLoanPayment'), 'payment').' ';
print img_object($langs->trans('LoanPayment'), 'payment').' ';
print $langs->trans("PaymentLoan");
print '</a>';
}
elseif ($links[$key]['type'] == 'loan') {
print '<a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowLoan'), 'bill').' ';
print img_object($langs->trans('Loan'), 'bill').' ';
print $langs->trans("Loan");
print '</a>';
}
elseif ($links[$key]['type'] == 'member') {
print '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowMember'), 'user').' ';
print img_object($langs->trans('Member'), 'user').' ';
print $links[$key]['label'];
print '</a>';
}
elseif ($links[$key]['type'] == 'payment_donation') {
print '<a href="'.DOL_URL_ROOT.'/don/payment/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowDonation'), 'payment').' ';
print img_object($langs->trans('Donation'), 'payment').' ';
print $langs->trans("DonationPayment");
print '</a>';
}
elseif ($links[$key]['type'] == 'banktransfert') {
print '<a href="'.DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowTransaction'), 'payment').' ';
print img_object($langs->trans('Transaction'), 'payment').' ';
print $langs->trans("TransactionOnTheOtherAccount");
print '</a>';
}
elseif ($links[$key]['type'] == 'user') {
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowUser'), 'user').' ';
print img_object($langs->trans('User'), 'user').' ';
print $langs->trans("User");
print '</a>';
}
elseif ($links[$key]['type'] == 'payment_various') {
print '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowVariousPayment'), 'payment').' ';
print img_object($langs->trans('VariousPayment'), 'payment').' ';
print $langs->trans("VariousPayment");
print '</a>';
}

Some files were not shown because too many files have changed in this diff Show More