Merge branch 'develop' of github.com:Dolibarr/dolibarr into 12.0_add_class_unitstools
This commit is contained in:
commit
bf592489c0
25
.github/CONTRIBUTING.md
vendored
25
.github/CONTRIBUTING.md
vendored
@ -4,7 +4,7 @@ How to contribute to Dolibarr
|
|||||||
Bug reports and feature requests
|
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).
|
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
|
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...
|
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.
|
* 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.
|
||||||
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.
|
||||||
|
|
||||||
|
* 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:
|
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).
|
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 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.
|
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.
|
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
|
### Resources
|
||||||
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
[Developer documentation](https://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||||
|
|
||||||
Translations
|
Translations
|
||||||
------------
|
------------
|
||||||
@ -144,11 +145,11 @@ to retreive all old translation of a source text, and restore the translation in
|
|||||||
|
|
||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
|
[Translator documentation](https://wiki.dolibarr.org/index.php/Translator_documentation)
|
||||||
|
|
||||||
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.
|
*Note*: to help prevent spam, you need to create an account before being able to edit. Everybody is welcome to contribute to its content.
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Ace 1.4.8 BSD Yes
|
|||||||
ChartJS 2.9.3 MIT License Yes JS library for graph
|
ChartJS 2.9.3 MIT License Yes JS library for graph
|
||||||
jQuery 3.4.1 MIT License Yes JS library
|
jQuery 3.4.1 MIT License Yes JS library
|
||||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
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 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 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)
|
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ For Developers or integrators:
|
|||||||
- replace $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
- 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.'">';'
|
- remove input field in form '<input type="hidden" name="page" value="'.$page.'">';'
|
||||||
- add parameter $pagenavastextinput to value 1 when calling print_barre_liste
|
- 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:
|
WARNING:
|
||||||
|
|
||||||
|
|||||||
20
README.md
20
README.md
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
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.
|
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:
|
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
|
- DoliDeb for Debian or Ubuntu
|
||||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
- 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.
|
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
|
## UPGRADING
|
||||||
|
|
||||||
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
|
- 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)
|
### 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
|
- Products and/or Services catalog
|
||||||
- Commercial proposals management
|
- Commercial proposals management
|
||||||
- Customer and Supplier Orders management
|
- Customer & Supplier Orders management
|
||||||
|
- Shipping management
|
||||||
|
- Warehouse/Stock management
|
||||||
- Invoices and payment management
|
- Invoices and payment management
|
||||||
- Standing orders management (European SEPA)
|
- Standing orders management (European SEPA)
|
||||||
- Bank accounts management
|
- Bank accounts management
|
||||||
- Accounting management
|
- Accounting management
|
||||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||||
- Opportunities and/or project management
|
- Opportunities and/or project management
|
||||||
- Projects management
|
- Projects & Tasks management
|
||||||
- Contracts management
|
- Contracts management
|
||||||
- Warehouse/Stock management
|
|
||||||
- Shipping management
|
|
||||||
- Interventions management
|
- Interventions management
|
||||||
- Employee's leave requests management
|
- Employee's leave requests management
|
||||||
- Expense reports
|
- Expense reports
|
||||||
- Timesheets
|
- Timesheets
|
||||||
- Electronic Document Management (EDM)
|
- Electronic Document Management (EDM)
|
||||||
- Foundations members management
|
- Foundations members management
|
||||||
- Mass emailing
|
|
||||||
- Surveys
|
|
||||||
- Point of Sale (POS)
|
- Point of Sale (POS)
|
||||||
- …
|
- …
|
||||||
|
|
||||||
@ -115,11 +115,13 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||||||
- Bookmarks management
|
- Bookmarks management
|
||||||
- Donations management
|
- Donations management
|
||||||
- Reporting
|
- Reporting
|
||||||
|
- Surveys
|
||||||
- Data export/import
|
- Data export/import
|
||||||
- Barcodes support
|
- Barcodes support
|
||||||
- Margin calculations
|
- Margin calculations
|
||||||
- LDAP connectivity
|
- LDAP connectivity
|
||||||
- ClickToDial integration
|
- ClickToDial integration
|
||||||
|
- Mass emailing
|
||||||
- RSS integration
|
- RSS integration
|
||||||
- Skype integration
|
- Skype integration
|
||||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||||
|
|||||||
@ -1,45 +1,47 @@
|
|||||||
|
|
||||||
[CustomMessages]
|
[CustomMessages]
|
||||||
|
|
||||||
NameAndVersion=%1 versió %2
|
NameAndVersion=%1 versió %2
|
||||||
AdditionalIcons=Icones addicionals:
|
AdditionalIcons=Icones addicionals:
|
||||||
CreateDesktopIcon=Crea una icona a l'&Escriptori
|
CreateDesktopIcon=Crea una icona a l'&Escriptori
|
||||||
CreateQuickLaunchIcon=Crea una icona a la &Barra de tasques
|
CreateQuickLaunchIcon=Crea una icona a la &Barra de tasques
|
||||||
ProgramOnTheWeb=%1 a Internet
|
ProgramOnTheWeb=%1 a Internet
|
||||||
UninstallProgram=Desinstal·la %1
|
UninstallProgram=Desinstal·la %1
|
||||||
LaunchProgram=Obre %1
|
LaunchProgram=Obre %1
|
||||||
AssocFileExtension=&Associa %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...
|
AssocingFileExtension=Associant %1 amb l'extensió de fitxer %2...
|
||||||
|
|
||||||
YouWillInstallDoliWamp=Va a instal·lar o actualitzar (Apache + Mysql + PHP + Dolibarr) al seu ordinador.
|
YouWillInstallDoliWamp=Instal·laràs DoliWamp (Dolibarr i altres programaris com Apache, Mysql i PHP) al teu 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.
|
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 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.
|
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 busca una instal·lació automàtica, es troba en el bon camí...
|
ButIfYouLook=Però si busques una instal·lació automàtica en el teu propi ordinador, et trobes en el bon camí...
|
||||||
DoYouWantToStart=Vol iniciar el procés d'instal·lació/actualització?
|
DoYouWantToStart=Vols iniciar el procés d'instal·lació?
|
||||||
|
|
||||||
TechnicalParameters=Paràmetres tècnics
|
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.
|
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
|
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
|
||||||
SMTPServer=Servidor SMTP (El seu o el del seu ISP, únicament primera instal.lació) :
|
SMTPServer=Servidor SMTP (propi o ISP, només primera instal·lació) :
|
||||||
ApachePort=Puerto Apache (únicament primera instal.lació, normalment és el 80) :
|
ApachePort=Port Apache (només primera instal·lació, normalment el 80) :
|
||||||
MySqlPort=Puerto Mysql (únicament primera instal.lació, normalment és el 3306) :
|
MySqlPort=Port MySql (només primera instal·lació, normalment el 3306) :
|
||||||
MySqlPassword=Contrasenya del servidor i la base de dades MySQL de root (únicament primera instal.lació):
|
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?
|
FirefoxDetected=S'ha detectat Firefox al teu ordinador. El vols utilitzar com a navegador per defecte per Dolibarr?
|
||||||
ChromeDetected=S'ha detectat Chrome al seu ordinador. Voleu activar per defecte com a navegador per Dolibarr?
|
ChromeDetected=S'ha detectat Chrome al teu ordinador. El vols utilitzar com a navegador per defecte per Dolibarr?
|
||||||
ChooseDefaultBrowser=Esculli el seu navegador per defecte. Si no està segur, simplement feu clic a Obrir:
|
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
|
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
|
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)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
[CustomMessages]
|
[CustomMessages]
|
||||||
|
|
||||||
NameAndVersion=%1 Version %2
|
NameAndVersion=%1 Version %2
|
||||||
AdditionalIcons=Zusätzliche Symbole:
|
AdditionalIcons=Zusätzliche Symbole:
|
||||||
CreateDesktopIcon=&Desktop-Symbol erstellen
|
CreateDesktopIcon=&Desktop-Symbol erstellen
|
||||||
CreateQuickLaunchIcon=Symbol in der Schnellstartleiste erstellen
|
CreateQuickLaunchIcon=Symbol in der Schnellstartleiste erstellen
|
||||||
ProgramOnTheWeb=%1 im Internet
|
ProgramOnTheWeb=%1 im Internet
|
||||||
@ -10,3 +10,38 @@ UninstallProgram=%1 entfernen
|
|||||||
LaunchProgram=%1 starten
|
LaunchProgram=%1 starten
|
||||||
AssocFileExtension=&Registriere %1 mit der %2-Dateierweiterung
|
AssocFileExtension=&Registriere %1 mit der %2-Dateierweiterung
|
||||||
AssocingFileExtension=%1 wird mit der %2-Dateierweiterung registriert...
|
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).
|
||||||
|
|||||||
@ -1,45 +1,47 @@
|
|||||||
|
|
||||||
[CustomMessages]
|
[CustomMessages]
|
||||||
|
|
||||||
NameAndVersion=%1 versión %2
|
NameAndVersion=%1 versión %2
|
||||||
AdditionalIcons=Iconos adicionales:
|
AdditionalIcons=Iconos adicionales:
|
||||||
CreateDesktopIcon=Crear un icono en el &escritorio
|
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
|
ProgramOnTheWeb=%1 en la Web
|
||||||
UninstallProgram=Desinstalar %1
|
UninstallProgram=Desinstalar %1
|
||||||
LaunchProgram=Ejecutar %1
|
LaunchProgram=Ejecutar %1
|
||||||
AssocFileExtension=&Asociar %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...
|
AssocingFileExtension=Asociando %1 con la extensión de archivo %2...
|
||||||
|
|
||||||
YouWillInstallDoliWamp=Va a instalar o actualizar (Apache+Mysql+PHP+Dolibarr) en su ordenador.
|
YouWillInstallDoliWamp=Va a instalar DoliWamp (Dolibarr y otro software como Apache, Mysql y PHP) 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.
|
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.
|
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...
|
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/actualización?
|
DoYouWantToStart=¿Quiere iniciar el proceso de instalación?
|
||||||
|
|
||||||
TechnicalParameters=Parámetros técnicos
|
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.
|
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
|
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
|
||||||
SMTPServer=Servidor SMTP (El suyo o el de su ISP, únicamente primera instalación) :
|
SMTPServer=Servidor SMTP (propio o su ISP, sólo primera instalación) :
|
||||||
ApachePort=Puerto Apache (únicamente primera instalación, normalmente es el 80) :
|
ApachePort=Puerto Apache (sólo primera instalación, normalmente el 80) :
|
||||||
MySqlPort=Puerto Mysql (únicamente primera instalación, normalmente es el 3306) :
|
MySqlPort=Puerto Mysql (sólo primera instalación, normalmente el 3306) :
|
||||||
MySqlPassword=Contraseña del servidor y la base de datos MySQL de root (únicamente primera instalación):
|
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 ?
|
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 ?
|
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
|
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
|
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
|
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)
|
||||||
|
|||||||
@ -298,3 +298,15 @@ JEDITABLE.JS
|
|||||||
* <button type="submit" /> => <button class="button" type="submit" />
|
* <button type="submit" /> => <button class="button" type="submit" />
|
||||||
* <button type="cancel" /> => <button class="button" type="cancel" />
|
* <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 */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1006,7 +1006,7 @@ while ($i < min($num, $limit))
|
|||||||
// Amount debit
|
// Amount debit
|
||||||
if (!empty($arrayfields['t.debit']['checked']))
|
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['nbfield']++;
|
||||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
|
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
|
||||||
$totalarray['val']['totaldebit'] += $line->debit;
|
$totalarray['val']['totaldebit'] += $line->debit;
|
||||||
@ -1015,7 +1015,7 @@ while ($i < min($num, $limit))
|
|||||||
// Amount credit
|
// Amount credit
|
||||||
if (!empty($arrayfields['t.credit']['checked']))
|
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['nbfield']++;
|
||||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
|
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
|
||||||
$totalarray['val']['totalcredit'] += $line->credit;
|
$totalarray['val']['totalcredit'] += $line->credit;
|
||||||
|
|||||||
@ -45,11 +45,12 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
$result = restrictedArea($user, 'adherent', $id);
|
$result = restrictedArea($user, 'adherent', $id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -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="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
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 '<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";
|
$topicmail = "Information";
|
||||||
$modelmail = "subscription";
|
$modelmail = "subscription";
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
* 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
|
* 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
|
* 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;
|
$i = 0;
|
||||||
|
|
||||||
$param = '';
|
$param = '';
|
||||||
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if ($user->rights->adherent->configurer)
|
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="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
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 '<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 = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
@ -375,13 +377,8 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters = array();
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
|
||||||
$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 '<tbody>';
|
print '<tbody>';
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
@ -822,15 +819,6 @@ if ($rowid > 0)
|
|||||||
// Other attributes
|
// Other attributes
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
|
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>';
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -128,7 +128,7 @@ print '<input name="town" class="minwidth100" id="town" value="'.($conf->global-
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
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');
|
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|||||||
@ -429,7 +429,7 @@ print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth100" id="MAIN_INFO_SO
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
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');
|
print $form->select_country($mysoc->country_id, 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|||||||
@ -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('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";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,26 @@ print "</tr>\n";
|
|||||||
|
|
||||||
_printOnOff('INVOICE_USE_SITUATION', $langs->trans('UseSituationInvoices'));
|
_printOnOff('INVOICE_USE_SITUATION', $langs->trans('UseSituationInvoices'));
|
||||||
_printOnOff('INVOICE_USE_SITUATION_CREDIT_NOTE', $langs->trans('UseSituationInvoicesCreditNote'));
|
_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(
|
$metas = array(
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
@ -227,8 +246,12 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra
|
|||||||
print '<input type="hidden" name="action" value="setModuleOptions">';
|
print '<input type="hidden" name="action" value="setModuleOptions">';
|
||||||
if ($type=='textarea') {
|
if ($type=='textarea') {
|
||||||
print '<textarea '.$metascompil.' >'.dol_htmlentities($conf->global->{$confkey}).'</textarea>';
|
print '<textarea '.$metascompil.' >'.dol_htmlentities($conf->global->{$confkey}).'</textarea>';
|
||||||
} else {
|
}elseif($type=='input'){
|
||||||
print '<input '.$metascompil.' />';
|
print '<input '.$metascompil.' />';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// custom
|
||||||
|
print $type;
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -209,6 +209,8 @@ else
|
|||||||
// Show examples
|
// Show examples
|
||||||
print load_fiche_titre($langs->trans("ExamplesWithCurrentSetup"), '', '');
|
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
|
// Always show vat rates with vat 0
|
||||||
$s = 2 / 7; $qty = 1; $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);
|
$tmparray = calcul_price_total(1, $qty * price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
|
||||||
|
|||||||
@ -754,9 +754,9 @@ if ($resql)
|
|||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
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 '<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>';
|
print '</td>';
|
||||||
|
|
||||||
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
||||||
@ -902,10 +902,10 @@ if ($resql)
|
|||||||
|
|
||||||
// Modify link / Delete link
|
// Modify link / Delete link
|
||||||
print '<td class="center nowraponall" width="64">';
|
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)
|
if ($iserasable)
|
||||||
{
|
{
|
||||||
print ' <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
|
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -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>'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize", $urlforapilayer)).'</td>'."\n";
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '<textarea id="response" class="hideobject" name="response"></textarea>';
|
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" name="modify_apilayer" class="button buttongen" 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" id="bt_sync" name="bt_sync_apilayer" class="button buttongen" value="'.$langs->trans('Synchronize').'" />';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -41,11 +41,12 @@ if ($user->socid > 0)
|
|||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "DESC";
|
if (!$sortorder) $sortorder = "DESC";
|
||||||
|
|||||||
@ -45,11 +45,12 @@ $ref = GETPOST('ref', 'alpha');
|
|||||||
//$result = restrictedArea($user, 'asset', $id);
|
//$result = restrictedArea($user, 'asset', $id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -46,11 +46,12 @@ $ref = GETPOST('ref', 'alpha');
|
|||||||
//$result = restrictedArea($user, 'bom', $id);
|
//$result = restrictedArea($user, 'bom', $id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -128,12 +128,16 @@ $coldisplay++;
|
|||||||
print '<td class="nobottom nowrap linecollost right">';
|
print '<td class="nobottom nowrap linecollost right">';
|
||||||
print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>';
|
print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>';
|
||||||
|
|
||||||
|
$coldisplay++;
|
||||||
|
print '<td class="nobottom nowrap linecolcostprice right">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
$coldisplay += $colspan;
|
$coldisplay += $colspan;
|
||||||
print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
|
print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
|
||||||
$coldisplay += $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 '<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 '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -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>';
|
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
|
||||||
|
|
||||||
// Qty
|
// 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)
|
if ($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -172,7 +172,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Owner
|
// Owner
|
||||||
print '<tr><td>'.$langs->trans("Owner").'</td><td>';
|
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"> </td></tr>';
|
print '</td><td class="hideonsmartphone"> </td></tr>';
|
||||||
|
|
||||||
// Position
|
// Position
|
||||||
@ -276,11 +276,11 @@ if ($id > 0 && !preg_match('/^add/i', $action))
|
|||||||
print '<tr><td>'.$langs->trans("Owner").'</td><td>';
|
print '<tr><td>'.$langs->trans("Owner").'</td><td>';
|
||||||
if ($action == 'edit' && $user->admin)
|
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
|
else
|
||||||
{
|
{
|
||||||
if ($object->fk_user)
|
if ($object->fk_user > 0)
|
||||||
{
|
{
|
||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
$fuser->fetch($object->fk_user);
|
$fuser->fetch($object->fk_user);
|
||||||
|
|||||||
@ -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="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
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 '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
|
$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 '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
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_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$cacheOfUsers = array();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
@ -222,9 +223,13 @@ while ($i < min($num, $limit))
|
|||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($obj->fk_user)
|
if ($obj->fk_user)
|
||||||
{
|
{
|
||||||
$userstatic->id = $obj->fk_user;
|
if (empty($cacheOfUsers[$obj->fk_user])) {
|
||||||
$userstatic->lastname = $obj->login;
|
$tmpuser = new User($db);
|
||||||
print $userstatic->getNomUrl(1);
|
$tmpuser->fetch($obj->fk_user);
|
||||||
|
$cacheOfUsers[$obj->fk_user] = $tmpuser;
|
||||||
|
}
|
||||||
|
$tmpuser = $cacheOfUsers[$obj->fk_user];
|
||||||
|
print $tmpuser->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -242,11 +247,11 @@ while ($i < min($num, $limit))
|
|||||||
print '<td class="nowrap right">';
|
print '<td class="nowrap right">';
|
||||||
if ($user->rights->bookmark->creer)
|
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)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -197,7 +197,7 @@ print '<table class="liste nohover" width="100%">';
|
|||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Categories").'</td><td></td><td class="right">';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Categories").'</td><td></td><td class="right">';
|
||||||
if (!empty($conf->use_javascript_ajax))
|
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>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -317,9 +317,9 @@ print '<td class="right">';
|
|||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print '<div id="iddivjstreecontrol">';
|
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 " | ";
|
||||||
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>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,11 +62,12 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -65,11 +65,12 @@ $result = restrictedArea($user, 'societe', $id, '&societe');
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$mode = GETPOST("mode");
|
$mode = GETPOST("mode");
|
||||||
|
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -3658,7 +3658,7 @@ class Propal extends CommonObject
|
|||||||
|
|
||||||
if ($user->rights->propal->lire)
|
if ($user->rights->propal->lire)
|
||||||
{
|
{
|
||||||
$label = '<u>'.$langs->trans("ShowPropal").'</u>';
|
$label = '<u>'.$langs->trans("Proposal").'</u>';
|
||||||
if (!empty($this->ref))
|
if (!empty($this->ref))
|
||||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
if (!empty($this->ref_client))
|
if (!empty($this->ref_client))
|
||||||
@ -3669,6 +3669,11 @@ class Propal extends CommonObject
|
|||||||
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
||||||
if (!empty($this->total_ttc))
|
if (!empty($this->total_ttc))
|
||||||
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
$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 == '') {
|
if ($option == '') {
|
||||||
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id.$get_params;
|
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id.$get_params;
|
||||||
}
|
}
|
||||||
@ -3696,7 +3701,7 @@ class Propal extends CommonObject
|
|||||||
{
|
{
|
||||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
$label = $langs->trans("ShowPropal");
|
$label = $langs->trans("Proposal");
|
||||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
}
|
}
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
|||||||
@ -53,11 +53,12 @@ if (!empty($user->socid))
|
|||||||
$result = restrictedArea($user, 'propal', $id);
|
$result = restrictedArea($user, 'propal', $id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|||||||
@ -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 .= " typent.code as typent_code,";
|
||||||
$sql .= " ava.rowid as availability,";
|
$sql .= " ava.rowid as availability,";
|
||||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
$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.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.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
|
||||||
$sql .= ' p.note_public, p.note_private,';
|
$sql .= ' p.note_public, p.note_private,';
|
||||||
@ -572,40 +572,40 @@ if ($resql)
|
|||||||
if (!empty($arrayfields['p.ref']['checked']))
|
if (!empty($arrayfields['p.ref']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.ref_client']['checked']))
|
if (!empty($arrayfields['p.ref_client']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
|
print '<input class="flat maxwidth50" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['pr.ref']['checked']))
|
if (!empty($arrayfields['pr.ref']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_refproject" value="'.dol_escape_htmltag($search_refproject).'">';
|
print '<input class="flat maxwidth50" type="text" name="search_refproject" value="'.dol_escape_htmltag($search_refproject).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['pr.title']['checked']))
|
if (!empty($arrayfields['pr.title']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_project" value="'.dol_escape_htmltag($search_project).'">';
|
print '<input class="flat maxwidth50" type="text" name="search_project" value="'.dol_escape_htmltag($search_project).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['s.nom']['checked']))
|
if (!empty($arrayfields['s.nom']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
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 '<input class="flat maxwidth100" type="text" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
|
||||||
print '</td>';
|
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.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" type="text" size="4" name="search_zip" value="'.$search_zip.'"></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
|
// State
|
||||||
if (!empty($arrayfields['state.nom']['checked']))
|
if (!empty($arrayfields['state.nom']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
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>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Country
|
// Country
|
||||||
@ -618,7 +618,7 @@ if ($resql)
|
|||||||
// Company type
|
// Company type
|
||||||
if (!empty($arrayfields['typent.code']['checked']))
|
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 $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 ajax_combobox('search_type_thirdparty');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -668,7 +668,7 @@ if ($resql)
|
|||||||
// Availability
|
// Availability
|
||||||
if (!empty($arrayfields['ava.rowid']['checked']))
|
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);
|
$form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1);
|
||||||
print ajax_combobox('search_availability');
|
print ajax_combobox('search_availability');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -862,6 +862,8 @@ if ($resql)
|
|||||||
$objectstatic->ref_client = $obj->ref_client;
|
$objectstatic->ref_client = $obj->ref_client;
|
||||||
$objectstatic->note_public = $obj->note_public;
|
$objectstatic->note_public = $obj->note_public;
|
||||||
$objectstatic->note_private = $obj->note_private;
|
$objectstatic->note_private = $obj->note_private;
|
||||||
|
$objectstatic->statut = $obj->status;
|
||||||
|
$objectstatic->status = $obj->status;
|
||||||
|
|
||||||
$companystatic->id = $obj->socid;
|
$companystatic->id = $obj->socid;
|
||||||
$companystatic->name = $obj->name;
|
$companystatic->name = $obj->name;
|
||||||
@ -904,12 +906,12 @@ if ($resql)
|
|||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
// Picto + Ref
|
// 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 $objectstatic->getNomUrl(1, '', '', 0, 1, (isset($conf->global->PROPAL_LIST_SHOW_NOTES) ? $conf->global->PROPAL_LIST_SHOW_NOTES : 1));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Warning
|
// Warning
|
||||||
$warnornote = '';
|
$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)
|
if ($warnornote)
|
||||||
{
|
{
|
||||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||||
@ -1232,7 +1234,7 @@ if ($resql)
|
|||||||
// Status
|
// Status
|
||||||
if (!empty($arrayfields['p.fk_statut']['checked']))
|
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']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
|
|||||||
@ -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
|
$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
|
$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)) $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;
|
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
|
||||||
}
|
}
|
||||||
@ -1506,6 +1506,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
if (!empty($origin) && !empty($originid)) {
|
if (!empty($origin) && !empty($originid)) {
|
||||||
// Parse element/subelement (ex: project_task)
|
// Parse element/subelement (ex: project_task)
|
||||||
$element = $subelement = $origin;
|
$element = $subelement = $origin;
|
||||||
|
$regs = array();
|
||||||
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
|
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
|
||||||
$element = $regs[1];
|
$element = $regs[1];
|
||||||
$subelement = $regs[2];
|
$subelement = $regs[2];
|
||||||
|
|||||||
@ -3697,7 +3697,7 @@ class Commande extends CommonOrder
|
|||||||
$label = '';
|
$label = '';
|
||||||
|
|
||||||
if ($user->rights->commande->lire) {
|
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('Ref').':</b> '.$this->ref;
|
||||||
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
|
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
|
||||||
if (!empty($this->total_ht)) {
|
if (!empty($this->total_ht)) {
|
||||||
@ -3709,6 +3709,9 @@ class Commande extends CommonOrder
|
|||||||
if (!empty($this->total_ttc)) {
|
if (!empty($this->total_ttc)) {
|
||||||
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
$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 = '';
|
$linkclose = '';
|
||||||
@ -3716,7 +3719,7 @@ class Commande extends CommonOrder
|
|||||||
{
|
{
|
||||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
$label = $langs->trans("ShowOrder");
|
$label = $langs->trans("Order");
|
||||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
}
|
}
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
|||||||
@ -52,11 +52,12 @@ if ($user->socid)
|
|||||||
$result = restrictedArea($user, 'commande', $id, '');
|
$result = restrictedArea($user, 'commande', $id, '');
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|||||||
@ -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_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_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_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_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_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);
|
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('c.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
|
||||||
@ -603,7 +603,7 @@ if ($resql)
|
|||||||
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
|
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
|
||||||
$moreforfilter .= '</div>';
|
$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';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
@ -901,6 +901,7 @@ if ($resql)
|
|||||||
$generic_commande->id = $obj->rowid;
|
$generic_commande->id = $obj->rowid;
|
||||||
$generic_commande->ref = $obj->ref;
|
$generic_commande->ref = $obj->ref;
|
||||||
$generic_commande->statut = $obj->fk_statut;
|
$generic_commande->statut = $obj->fk_statut;
|
||||||
|
$generic_commande->billed = $obj->billed;
|
||||||
$generic_commande->date = $db->jdate($obj->date_commande);
|
$generic_commande->date = $db->jdate($obj->date_commande);
|
||||||
$generic_commande->date_livraison = $db->jdate($obj->date_delivery);
|
$generic_commande->date_livraison = $db->jdate($obj->date_delivery);
|
||||||
$generic_commande->ref_client = $obj->ref_client;
|
$generic_commande->ref_client = $obj->ref_client;
|
||||||
@ -919,7 +920,7 @@ if ($resql)
|
|||||||
// Ref
|
// Ref
|
||||||
if (!empty($arrayfields['c.ref']['checked']))
|
if (!empty($arrayfields['c.ref']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowraponall">';
|
||||||
|
|
||||||
$generic_commande->getLinesArray(); // This set ->lines
|
$generic_commande->getLinesArray(); // This set ->lines
|
||||||
|
|
||||||
|
|||||||
@ -57,11 +57,12 @@ if ($user->socid)
|
|||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; }
|
if (empty($page) || $page == -1) { $page = 0; }
|
||||||
$offset = $conf->liste_limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder)
|
if (!$sortorder)
|
||||||
|
|||||||
@ -108,14 +108,6 @@ $pagenext = $page + 1;
|
|||||||
if (!$sortorder) $sortorder = 'desc,desc,desc';
|
if (!$sortorder) $sortorder = 'desc,desc,desc';
|
||||||
if (!$sortfield) $sortfield = 'b.datev,b.dateo,b.rowid';
|
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);
|
$object = new Account($db);
|
||||||
if ($id > 0 || !empty($ref))
|
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
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
|
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
|
||||||
@ -574,6 +573,7 @@ if ($page >= $nbtotalofpages)
|
|||||||
if ($page < 0) $page = 0;
|
if ($page < 0) $page = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If not account defined $mode_balance_ok=false
|
// If not account defined $mode_balance_ok=false
|
||||||
if (empty($search_account)) $mode_balance_ok = false;
|
if (empty($search_account)) $mode_balance_ok = false;
|
||||||
// If a search is done $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_debit)) $mode_balance_ok = false;
|
||||||
if (!empty($search_credit)) $mode_balance_ok = false;
|
if (!empty($search_credit)) $mode_balance_ok = false;
|
||||||
if (!empty($search_thirdparty)) $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;
|
if (!empty($search_num_releve)) $mode_balance_ok = false;
|
||||||
|
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class BankAccounts extends DolibarrApi
|
|||||||
$sql .= ' WHERE t.entity IN ('.getEntity('bank_account').')';
|
$sql .= ' WHERE t.entity IN ('.getEntity('bank_account').')';
|
||||||
// Select accounts of given category
|
// Select accounts of given category
|
||||||
if ($category > 0) {
|
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
|
// Add sql filters
|
||||||
if ($sqlfilters)
|
if ($sqlfilters)
|
||||||
|
|||||||
@ -54,11 +54,12 @@ if ($user->socid)
|
|||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; }
|
if (empty($page) || $page == -1) { $page = 0; }
|
||||||
$offset = $conf->liste_limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder)
|
if (!$sortorder)
|
||||||
|
|||||||
@ -538,7 +538,11 @@ foreach ($accounts as $key=>$type)
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
print '<span class="badge badge-info classfortooltip" title="'.dol_htmlentities($langs->trans("TransactionsToConciliate")).'">'.$result->nbtodo.'</span>';
|
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$objecttmp->id.'&search_conciliated=0">';
|
||||||
|
print '<span class="badge badge-info classfortooltip" title="'.dol_htmlentities($langs->trans("TransactionsToConciliate")).'">';
|
||||||
|
print $result->nbtodo;
|
||||||
|
print '</span>';
|
||||||
|
print '</a>';
|
||||||
if ($result->nbtodolate) {
|
if ($result->nbtodolate) {
|
||||||
print '<span title="'.dol_htmlentities($langs->trans("Late")).'" class="classfortooltip badge badge-danger marginleftonlyshort">';
|
print '<span title="'.dol_htmlentities($langs->trans("Late")).'" class="classfortooltip badge badge-danger marginleftonlyshort">';
|
||||||
print '<i class="fa fa-exclamation-triangle"></i> '.$result->nbtodolate;
|
print '<i class="fa fa-exclamation-triangle"></i> '.$result->nbtodolate;
|
||||||
|
|||||||
@ -51,8 +51,8 @@ if ($action == 'add')
|
|||||||
|
|
||||||
$dateo = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
$dateo = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$amount = GETPOST('amount', 'alpha');
|
$amount = price2num(GETPOST('amount', 'alpha'), 'MT');
|
||||||
$amountto = GETPOST('amountto', 'alpha');
|
$amountto = price2num(GETPOST('amountto', 'alpha'), 'MT');
|
||||||
|
|
||||||
if (!$label)
|
if (!$label)
|
||||||
{
|
{
|
||||||
@ -115,9 +115,9 @@ if ($action == 'add')
|
|||||||
$typeto = 'LIQ';
|
$typeto = 'LIQ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, -1 * price2num($amount), '', '', $user);
|
if (!$error) $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, price2num(-1 * $amount), '', '', $user);
|
||||||
if (!($bank_line_id_from > 0)) $error++;
|
if (!($bank_line_id_from > 0)) $error++;
|
||||||
if (!$error) $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, price2num($amountto), '', '', $user);
|
if (!$error) $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, $amountto, '', '', $user);
|
||||||
if (!($bank_line_id_to > 0)) $error++;
|
if (!($bank_line_id_to > 0)) $error++;
|
||||||
|
|
||||||
if (!$error) $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert');
|
if (!$error) $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert');
|
||||||
@ -246,7 +246,6 @@ print '<td>'.$langs->trans("TransferFrom").'</td><td>'.$langs->trans("TransferTo
|
|||||||
print '<td style="display:none" class="multicurrency">'.$langs->trans("AmountToOthercurrency").'</td>';
|
print '<td style="display:none" class="multicurrency">'.$langs->trans("AmountToOthercurrency").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var = false;
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
$form->select_comptes($account_from, 'account_from', 0, '', 1, '', empty($conf->multicurrency->enabled) ? 0 : 1);
|
$form->select_comptes($account_from, 'account_from', 0, '', 1, '', empty($conf->multicurrency->enabled) ? 0 : 1);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
@ -277,7 +277,7 @@ if ($action == 'create')
|
|||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'invoicing');
|
print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'object_payment');
|
||||||
|
|
||||||
dol_fiche_head('', '');
|
dol_fiche_head('', '');
|
||||||
|
|
||||||
|
|||||||
@ -43,11 +43,12 @@ if ($user->socid) $socid = $user->socid;
|
|||||||
$result = restrictedArea($user, 'banque', '', '', '');
|
$result = restrictedArea($user, 'banque', '', '', '');
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -58,7 +58,7 @@ $sortfield = GETPOST("sortfield", 'alpha');
|
|||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortfield) $sortfield = "v.datep,v.rowid";
|
if (!$sortfield) $sortfield = "v.datep,v.rowid";
|
||||||
@ -95,6 +95,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||||||
$typeid = "";
|
$typeid = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -178,9 +179,8 @@ if ($result)
|
|||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
|
print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|||||||
@ -102,11 +102,11 @@ print '<input type="hidden" name="mode" value="'.$mode.'">';
|
|||||||
if ($mode != 'sconly')
|
if ($mode != 'sconly')
|
||||||
{
|
{
|
||||||
$center = ($year ? '<a href="index.php?year='.($year - 1).$param.'">'.img_previous($langs->trans("Previous"), 'class="valignbottom"')."</a> ".$langs->trans("Year").' '.$year.' <a href="index.php?year='.($year + 1).$param.'">'.img_next($langs->trans("Next"), 'class="valignbottom"')."</a>" : "");
|
$center = ($year ? '<a href="index.php?year='.($year - 1).$param.'">'.img_previous($langs->trans("Previous"), 'class="valignbottom"')."</a> ".$langs->trans("Year").' '.$year.' <a href="index.php?year='.($year + 1).$param.'">'.img_next($langs->trans("Next"), 'class="valignbottom"')."</a>" : "");
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'object_payment', 0, '', '', $limit, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'object_payment', 0, '', '', $limit, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($year) $param .= '&year='.$year;
|
if ($year) $param .= '&year='.$year;
|
||||||
|
|||||||
@ -44,11 +44,12 @@ $langs->load("companies");
|
|||||||
|
|
||||||
$mode = GETPOST("mode");
|
$mode = GETPOST("mode");
|
||||||
|
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -48,11 +48,12 @@ $result = restrictedArea($user, 'deplacement', $id, '');
|
|||||||
|
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -35,11 +35,12 @@ $socid = GETPOST('socid', 'int');
|
|||||||
if ($user->socid) $socid = $user->socid;
|
if ($user->socid) $socid = $user->socid;
|
||||||
$result = restrictedArea($user, 'deplacement', '', '');
|
$result = restrictedArea($user, 'deplacement', '', '');
|
||||||
|
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "DESC";
|
if (!$sortorder) $sortorder = "DESC";
|
||||||
|
|||||||
@ -139,6 +139,11 @@ if ($user->socid) $socid = $user->socid;
|
|||||||
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
|
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
|
||||||
|
|
||||||
|
// retained warranty invoice available type
|
||||||
|
$retainedWarrantyInvoiceAvailableType=array();
|
||||||
|
if(!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
|
||||||
|
$retainedWarrantyInvoiceAvailableType = explode('+', $conf->global->INVOICE_USE_RETAINED_WARRANTY);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1355,17 +1360,22 @@ if (empty($reshook))
|
|||||||
$object->situation_counter = 1;
|
$object->situation_counter = 1;
|
||||||
$object->situation_final = 0;
|
$object->situation_final = 0;
|
||||||
$object->situation_cycle_ref = $object->newCycle();
|
$object->situation_cycle_ref = $object->newCycle();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(in_array($object->type, $retainedWarrantyInvoiceAvailableType)){
|
||||||
$object->retained_warranty = GETPOST('retained_warranty', 'int');
|
$object->retained_warranty = GETPOST('retained_warranty', 'int');
|
||||||
$object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
$object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$object->retained_warranty = 0;
|
||||||
|
$object->retained_warranty_fk_cond_reglement = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
|
$retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
|
||||||
if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
|
if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
|
||||||
$object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
|
$object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
|
||||||
}
|
}
|
||||||
$object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
|
$object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
|
||||||
}
|
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
@ -1756,20 +1766,31 @@ if (empty($reshook))
|
|||||||
$object->fk_facture_source = $_POST['situations'];
|
$object->fk_facture_source = $_POST['situations'];
|
||||||
$object->type = Facture::TYPE_SITUATION;
|
$object->type = Facture::TYPE_SITUATION;
|
||||||
|
|
||||||
|
if (!empty($origin) && !empty($originid))
|
||||||
|
{
|
||||||
|
$object->origin = $origin;
|
||||||
|
$object->origin_id = $originid;
|
||||||
|
|
||||||
$object->retained_warranty = GETPOST('retained_warranty', 'int');
|
// retained warranty
|
||||||
|
if(!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY))
|
||||||
|
{
|
||||||
|
$retained_warranty = GETPOST('retained_warranty', 'int');
|
||||||
|
if(price2num($retained_warranty) > 0)
|
||||||
|
{
|
||||||
|
$object->retained_warranty = price2num($retained_warranty);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GETPOST('retained_warranty_fk_cond_reglement', 'int') > 0)
|
||||||
|
{
|
||||||
$object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
$object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
||||||
|
}
|
||||||
|
|
||||||
$retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
|
$retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
|
||||||
if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
|
if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
|
||||||
$object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
|
$object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
|
||||||
}
|
}
|
||||||
$object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
|
$object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
|
||||||
|
}
|
||||||
if (!empty($origin) && !empty($originid))
|
|
||||||
{
|
|
||||||
$object->origin = $origin;
|
|
||||||
$object->origin_id = $originid;
|
|
||||||
|
|
||||||
foreach ($object->lines as $i => &$line)
|
foreach ($object->lines as $i => &$line)
|
||||||
{
|
{
|
||||||
@ -3371,11 +3392,10 @@ if ($action == 'create')
|
|||||||
$form->select_conditions_paiements(GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $cond_reglement_id, 'cond_reglement_id');
|
$form->select_conditions_paiements(GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $cond_reglement_id, 'cond_reglement_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->global->INVOICE_USE_SITUATION))
|
|
||||||
{
|
if($conf->global->INVOICE_USE_RETAINED_WARRANTY){
|
||||||
if ($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY) {
|
|
||||||
$rwStyle = 'display:none;';
|
$rwStyle = 'display:none;';
|
||||||
if (GETPOST('type', 'int') == Facture::TYPE_SITUATION) {
|
if(in_array(GETPOST('type', 'int'), $retainedWarrantyInvoiceAvailableType)){
|
||||||
$rwStyle = '';
|
$rwStyle = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3383,10 +3403,9 @@ if ($action == 'create')
|
|||||||
if(empty($retained_warranty)){
|
if(empty($retained_warranty)){
|
||||||
if(!empty($objectsrc->retained_warranty)){ // use previous situation value
|
if(!empty($objectsrc->retained_warranty)){ // use previous situation value
|
||||||
$retained_warranty = $objectsrc->retained_warranty;
|
$retained_warranty = $objectsrc->retained_warranty;
|
||||||
} else {
|
|
||||||
$retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$retained_warranty_js_default = !empty($retained_warranty)?$retained_warranty:$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
|
||||||
|
|
||||||
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
|
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
|
||||||
print '<input id="new-situation-invoice-retained-warranty" name="retained_warranty" type="number" value="'.$retained_warranty.'" step="0.01" min="0" max="100" />%';
|
print '<input id="new-situation-invoice-retained-warranty" name="retained_warranty" type="number" value="'.$retained_warranty.'" step="0.01" min="0" max="100" />%';
|
||||||
@ -3407,19 +3426,22 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<script type="text/javascript" language="javascript">
|
print '<script type="text/javascript" language="javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("[name=\'type\'").change(function() {
|
$("[name=\'type\']").change(function() {
|
||||||
if($( this ).prop("checked") && $( this ).val() == '.Facture::TYPE_SITUATION.')
|
if($( this ).prop("checked") && $.inArray($( this ).val(), '.json_encode($retainedWarrantyInvoiceAvailableType).' ) !== -1)
|
||||||
{
|
{
|
||||||
$(".retained-warranty-line").show();
|
$(".retained-warranty-line").show();
|
||||||
|
$("#new-situation-invoice-retained-warranty").val("'.doubleval($retained_warranty_js_default).'");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$(".retained-warranty-line").hide();
|
$(".retained-warranty-line").hide();
|
||||||
|
$("#new-situation-invoice-retained-warranty").val("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("[name=\'type\']").trigger("change");
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
|
||||||
@ -4333,22 +4355,15 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayWarranty = false;
|
|
||||||
if (($object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY))))
|
|
||||||
{
|
if (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
|
||||||
// Check if this situation invoice is 100% for real
|
|
||||||
if (!empty($object->situation_final) && !empty($object->lines)) {
|
|
||||||
$displayWarranty = true;
|
$displayWarranty = true;
|
||||||
foreach ($object->lines as $i => $line) {
|
if (!in_array($object->type, $retainedWarrantyInvoiceAvailableType) && empty($object->retained_warranty)) {
|
||||||
if ($line->product_type < 2 && $line->situation_percent < 100) {
|
|
||||||
$displayWarranty = false;
|
$displayWarranty = false;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($displayWarranty) {
|
||||||
|
|
||||||
// Retained Warranty
|
// Retained Warranty
|
||||||
print '<tr class="retained-warranty-lines" ><td>';
|
print '<tr class="retained-warranty-lines" ><td>';
|
||||||
print '<table id="retained-warranty-table" class="nobordernopadding" width="100%"><tr><td>';
|
print '<table id="retained-warranty-table" class="nobordernopadding" width="100%"><tr><td>';
|
||||||
@ -4413,9 +4428,6 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
if ($displayWarranty)
|
|
||||||
{
|
|
||||||
// Retained Warranty payment date limit
|
// Retained Warranty payment date limit
|
||||||
print '<tr class="retained-warranty-lines" ><td>';
|
print '<tr class="retained-warranty-lines" ><td>';
|
||||||
print '<table id="retained-warranty-date-limit-table" class="nobordernopadding" width="100%"><tr><td>';
|
print '<table id="retained-warranty-date-limit-table" class="nobordernopadding" width="100%"><tr><td>';
|
||||||
@ -5034,8 +5046,9 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||||
|
|
||||||
// Show object lines
|
// Show object lines
|
||||||
if (!empty($object->lines))
|
if (!empty($object->lines)) {
|
||||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// Form to add new line
|
// Form to add new line
|
||||||
if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline')
|
if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline')
|
||||||
|
|||||||
@ -502,8 +502,7 @@ class Invoices extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->invoice->delete_contact($rowid);
|
$result = $this->invoice->delete_contact($rowid);
|
||||||
|
if ($result < 0) {
|
||||||
if (!$result) {
|
|
||||||
throw new RestException(500, 'Error when deleted the contact');
|
throw new RestException(500, 'Error when deleted the contact');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -617,7 +616,8 @@ class Invoices extends DolibarrApi
|
|||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->invoice->delete($id) < 0)
|
$result = $this->invoice->delete(DolibarrApiAccess::$user);
|
||||||
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
throw new RestException(500);
|
throw new RestException(500);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -302,9 +302,9 @@ class Facture extends CommonInvoice
|
|||||||
'situation_cycle_ref' =>array('type'=>'smallint(6)', 'label'=>'Situation cycle ref', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION', 'visible'=>-1, 'position'=>230),
|
'situation_cycle_ref' =>array('type'=>'smallint(6)', 'label'=>'Situation cycle ref', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION', 'visible'=>-1, 'position'=>230),
|
||||||
'situation_counter' =>array('type'=>'smallint(6)', 'label'=>'Situation counter', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION', 'visible'=>-1, 'position'=>235),
|
'situation_counter' =>array('type'=>'smallint(6)', 'label'=>'Situation counter', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION', 'visible'=>-1, 'position'=>235),
|
||||||
'situation_final' =>array('type'=>'smallint(6)', 'label'=>'Situation final', 'enabled'=>'empty($conf->global->INVOICE_USE_SITUATION) ? 0 : 1', 'visible'=>-1, 'position'=>240),
|
'situation_final' =>array('type'=>'smallint(6)', 'label'=>'Situation final', 'enabled'=>'empty($conf->global->INVOICE_USE_SITUATION) ? 0 : 1', 'visible'=>-1, 'position'=>240),
|
||||||
'retained_warranty' =>array('type'=>'double', 'label'=>'Retained warranty', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>245),
|
'retained_warranty' =>array('type'=>'double', 'label'=>'Retained warranty', 'enabled'=>'$conf->global->INVOICE_USE_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>245),
|
||||||
'retained_warranty_date_limit' =>array('type'=>'date', 'label'=>'Retained warranty date limit', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>250),
|
'retained_warranty_date_limit' =>array('type'=>'date', 'label'=>'Retained warranty date limit', 'enabled'=>'$conf->global->INVOICE_USE_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>250),
|
||||||
'retained_warranty_fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Retained warranty fk cond reglement', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>255),
|
'retained_warranty_fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Retained warranty fk cond reglement', 'enabled'=>'$conf->global->INVOICE_USE_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>255),
|
||||||
'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>260),
|
'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>260),
|
||||||
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLabel', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>265),
|
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLabel', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>265),
|
||||||
'date_pointoftax' =>array('type'=>'date', 'label'=>'DatePointOfTax', 'enabled'=>'$conf->global->INVOICE_POINTOFTAX_DATE', 'visible'=>-1, 'position'=>270),
|
'date_pointoftax' =>array('type'=>'date', 'label'=>'DatePointOfTax', 'enabled'=>'$conf->global->INVOICE_POINTOFTAX_DATE', 'visible'=>-1, 'position'=>270),
|
||||||
@ -4742,6 +4742,43 @@ class Facture extends CommonInvoice
|
|||||||
return $hasDelay;
|
return $hasDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Currently used for documents generation : to know if retained warranty need to be displayed
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function displayRetainedWarranty()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
// TODO : add a flag on invoices to store this conf : INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION
|
||||||
|
|
||||||
|
// note : we dont need to test INVOICE_USE_RETAINED_WARRANTY because if $this->retained_warranty is not empty it's because it was set when this conf was active
|
||||||
|
|
||||||
|
$displayWarranty = false;
|
||||||
|
if(!empty($this->retained_warranty)) {
|
||||||
|
$displayWarranty = true;
|
||||||
|
|
||||||
|
if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) {
|
||||||
|
// Check if this situation invoice is 100% for real
|
||||||
|
$displayWarranty = false;
|
||||||
|
if (!empty($this->situation_final)) {
|
||||||
|
$displayWarranty = true;
|
||||||
|
} elseif (!empty($this->lines) && $this->status == Facture::STATUS_DRAFT) {
|
||||||
|
// $object->situation_final need validation to be done so this test is need for draft
|
||||||
|
$displayWarranty = true;
|
||||||
|
|
||||||
|
foreach ($this->lines as $i => $line) {
|
||||||
|
if ($line->product_type < 2 && $line->situation_percent < 100) {
|
||||||
|
$displayWarranty = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $displayWarranty;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
|
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
|
||||||
@ -4757,7 +4794,7 @@ class Facture extends CommonInvoice
|
|||||||
$retainedWarrantyAmount = 0;
|
$retainedWarrantyAmount = 0;
|
||||||
|
|
||||||
// Billed - retained warranty
|
// Billed - retained warranty
|
||||||
if ($this->type == Facture::TYPE_SITUATION)
|
if($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION))
|
||||||
{
|
{
|
||||||
$displayWarranty = true;
|
$displayWarranty = true;
|
||||||
// Check if this situation invoice is 100% for real
|
// Check if this situation invoice is 100% for real
|
||||||
@ -4795,7 +4832,10 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
if ($rounding < 0) {
|
if ($rounding < 0) {
|
||||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
return round($retainedWarrantyAmount, 2);
|
}
|
||||||
|
|
||||||
|
if($rounding>0){
|
||||||
|
return round($retainedWarrantyAmount, $rounding);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $retainedWarrantyAmount;
|
return $retainedWarrantyAmount;
|
||||||
|
|||||||
@ -56,11 +56,12 @@ if ($user->socid)
|
|||||||
$result = restrictedArea($user, 'facture', $id, '');
|
$result = restrictedArea($user, 'facture', $id, '');
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -328,13 +328,12 @@ if ($resql)
|
|||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
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 '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||||
|
|
||||||
$title = $langs->trans("RepeatableInvoices");
|
$title = $langs->trans("RepeatableInvoices");
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'</span><br><br>';
|
print '<span class="opacitymedium">'.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'</span><br><br>';
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,7 @@ $arrayfields = array(
|
|||||||
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
|
if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_RETAINED_WARRANTY)
|
||||||
{
|
{
|
||||||
$arrayfields['f.retained_warranty'] = array('label'=>$langs->trans("RetainedWarranty"), 'checked'=>0, 'position'=>86);
|
$arrayfields['f.retained_warranty'] = array('label'=>$langs->trans("RetainedWarranty"), 'checked'=>0, 'position'=>86);
|
||||||
}
|
}
|
||||||
@ -1137,7 +1137,7 @@ if ($resql)
|
|||||||
|
|
||||||
$facturestatic->note_public = $obj->note_public;
|
$facturestatic->note_public = $obj->note_public;
|
||||||
$facturestatic->note_private = $obj->note_private;
|
$facturestatic->note_private = $obj->note_private;
|
||||||
if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
|
if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_RETAINED_WARRANTY)
|
||||||
{
|
{
|
||||||
$facturestatic->retained_warranty = $obj->retained_warranty;
|
$facturestatic->retained_warranty = $obj->retained_warranty;
|
||||||
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
|
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
|
||||||
|
|||||||
@ -215,10 +215,9 @@ if ($resql)
|
|||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
|
||||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
|
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|||||||
@ -43,9 +43,22 @@ $action = GETPOST('action', 'alpha');
|
|||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
|
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
if ($page == -1 || $page == null) { $page = 0; }
|
||||||
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
if ($sortorder == "") $sortorder = "DESC";
|
||||||
|
if ($sortfield == "") $sortfield = "pl.fk_soc";
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if ($action == 'confirm_rejet')
|
if ($action == 'confirm_rejet')
|
||||||
{
|
{
|
||||||
@ -246,17 +259,6 @@ if ($id)
|
|||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($page == -1 || $page == null) { $page = 0; }
|
|
||||||
|
|
||||||
$offset = $conf->liste_limit * $page;
|
|
||||||
$pageprev = $page - 1;
|
|
||||||
$pagenext = $page + 1;
|
|
||||||
|
|
||||||
if ($sortorder == "") $sortorder = "DESC";
|
|
||||||
if ($sortfield == "") $sortfield = "pl.fk_soc";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List of invoices
|
* List of invoices
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -39,20 +39,19 @@ if ($user->socid) $socid = $user->socid;
|
|||||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('', $langs->trans("WithdrawsRefused"));
|
llxHeader('', $langs->trans("WithdrawsRefused"));
|
||||||
|
|
||||||
$offset = $conf->liste_limit * $page;
|
|
||||||
$pageprev = $page - 1;
|
|
||||||
$pagenext = $page + 1;
|
|
||||||
|
|
||||||
if ($sortorder == "") $sortorder = "DESC";
|
if ($sortorder == "") $sortorder = "DESC";
|
||||||
if ($sortfield == "") $sortfield = "p.datec";
|
if ($sortfield == "") $sortfield = "p.datec";
|
||||||
|
|
||||||
|
|||||||
@ -52,13 +52,14 @@ $result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges');
|
|||||||
|
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) {
|
if (empty($page) || $page == -1) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
}
|
}
|
||||||
$offset = $conf->liste_limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -191,19 +191,16 @@ if ($resql)
|
|||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
|
||||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||||
|
|
||||||
|
$center = '';
|
||||||
if ($year)
|
if ($year)
|
||||||
{
|
{
|
||||||
$center = ($year ? "<a href='list.php?year=".($year - 1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='list.php?year=".($year + 1)."'>".img_next()."</a>" : "");
|
$center = ($year ? "<a href='list.php?year=".($year - 1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='list.php?year=".($year + 1)."'>".img_next()."</a>" : "");
|
||||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
if (empty($mysoc->country_id) && empty($mysoc->country_code))
|
if (empty($mysoc->country_id) && empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<div class="error">';
|
print '<div class="error">';
|
||||||
|
|||||||
@ -53,14 +53,14 @@ $result = restrictedArea($user, 'tax', '', 'vat', 'charges');
|
|||||||
|
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) {
|
if (empty($page) || $page == -1) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
}
|
}
|
||||||
|
$offset = $limit * $page;
|
||||||
$offset = $conf->liste_limit * $page;
|
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
@ -160,9 +160,8 @@ if ($result)
|
|||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("VATPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
print_barre_liste($langs->trans("VATPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|||||||
@ -691,6 +691,7 @@ else
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
print '<tr><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||||
|
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
||||||
print $form->select_country((GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id), 'country_id');
|
print $form->select_country((GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id), 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -722,24 +723,34 @@ else
|
|||||||
if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party
|
if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).'</td>';
|
||||||
print '<td><input type="text" name="phone_pro" id="phone_pro" class="maxwidth200" value="'.(GETPOSTISSET('phone_pro') ? GETPOST('phone_pro', 'alpha') : $object->phone_pro).'"></td>';
|
print '<td>';
|
||||||
|
print img_picto('', 'object_phoning');
|
||||||
|
print '<input type="text" name="phone_pro" id="phone_pro" class="maxwidth200" value="'.(GETPOSTISSET('phone_pro') ? GETPOST('phone_pro', 'alpha') : $object->phone_pro).'"></td>';
|
||||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).'</td>';
|
print '<td>'.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).'</td>';
|
||||||
print '<td><input type="text" name="phone_perso" id="phone_perso" class="maxwidth200" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
print '<td>';
|
||||||
|
print img_picto('', 'object_phoning');
|
||||||
|
print '<input type="text" name="phone_perso" id="phone_perso" class="maxwidth200" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).'</td>';
|
||||||
print '<td><input type="text" name="phone_mobile" id="phone_mobile" class="maxwidth200" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td>';
|
print '<td>';
|
||||||
|
print img_picto('', 'object_phoning_mobile');
|
||||||
|
print '<input type="text" name="phone_mobile" id="phone_mobile" class="maxwidth200" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td>';
|
||||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_fax').' '.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>';
|
print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>';
|
||||||
print '<td><input type="text" name="fax" id="fax" class="maxwidth200" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>';
|
print '<td>';
|
||||||
|
print img_picto('', 'object_phoning_fax');
|
||||||
|
print '<input type="text" name="fax" id="fax" class="maxwidth200" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party
|
if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party
|
||||||
|
|
||||||
// Email
|
// Email
|
||||||
print '<tr><td>'.img_picto('', 'object_email').' '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').'</td>';
|
print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').'</td>';
|
||||||
print '<td><input type="text" name="email" id="email" value="'.(GETPOSTISSET('email') ? GETPOST('email', 'alpha') : $object->email).'"></td>';
|
print '<td>';
|
||||||
|
print img_picto('', 'object_email');
|
||||||
|
print '<input type="text" name="email" id="email" value="'.(GETPOSTISSET('email') ? GETPOST('email', 'alpha') : $object->email).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (!empty($conf->mailing->enabled))
|
if (!empty($conf->mailing->enabled))
|
||||||
@ -964,12 +975,12 @@ else
|
|||||||
|
|
||||||
// Lastname
|
// Lastname
|
||||||
print '<tr><td class="titlefieldcreate fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
|
print '<tr><td class="titlefieldcreate fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
|
||||||
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="minwidth200" maxlength="80" value="'.(isset($_POST["lastname"]) ?GETPOST("lastname") : $object->lastname).'" autofocus="autofocus"></td>';
|
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="minwidth200" maxlength="80" value="'.(GETPOSTISSET("lastname") ? GETPOST("lastname") : $object->lastname).'" autofocus="autofocus"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
// Firstname
|
// Firstname
|
||||||
print '<td><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
|
print '<td><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
|
||||||
print '<td colspan="3"><input name="firstname" id="firstname" type="text" class="minwidth200" maxlength="80" value="'.(isset($_POST["firstname"]) ?GETPOST("firstname") : $object->firstname).'"></td>';
|
print '<td colspan="3"><input name="firstname" id="firstname" type="text" class="minwidth200" maxlength="80" value="'.(GETPOSTISSET("firstname") ? GETPOST("firstname") : $object->firstname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
@ -988,13 +999,13 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td><label for="title">'.$langs->trans("PostOrFunction").'</label></td>';
|
print '<tr><td><label for="title">'.$langs->trans("PostOrFunction").'</label></td>';
|
||||||
print '<td colspan="3"><input name="poste" id="title" type="text" class="minwidth100" maxlength="80" value="'.(isset($_POST["poste"]) ?GETPOST("poste") : $object->poste).'"></td></tr>';
|
print '<td colspan="3"><input name="poste" id="title" type="text" class="minwidth100" maxlength="80" value="'.(GETPOSTISSET("poste") ? GETPOST("poste") : $object->poste).'"></td></tr>';
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td><label for="address">'.$langs->trans("Address").'</label></td>';
|
print '<tr><td><label for="address">'.$langs->trans("Address").'</label></td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print '<div class="paddingrightonly valignmiddle inline-block">';
|
print '<div class="paddingrightonly valignmiddle inline-block quatrevingtpercent">';
|
||||||
print '<textarea class="flat minwidth200" name="address" id="address">'.(isset($_POST["address"]) ?GETPOST("address") : $object->address).'</textarea>';
|
print '<textarea class="flat minwidth200 centpercent" name="address" id="address">'.(GETPOSTISSET("address") ? GETPOST("address", 'nohtml') : $object->address).'</textarea>';
|
||||||
print '</div><div class="paddingrightonly valignmiddle inline-block">';
|
print '</div><div class="paddingrightonly valignmiddle inline-block">';
|
||||||
if ($conf->use_javascript_ajax) print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a><br>';
|
if ($conf->use_javascript_ajax) print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a><br>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -1002,13 +1013,14 @@ else
|
|||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td><label for="zipcode">'.$langs->trans("Zip").'</label> / <label for="town">'.$langs->trans("Town").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td><label for="zipcode">'.$langs->trans("Zip").'</label> / <label for="town">'.$langs->trans("Town").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print $formcompany->select_ziptown((isset($_POST["zipcode"]) ?GETPOST("zipcode") : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' ';
|
print $formcompany->select_ziptown((GETPOSTISSET("zipcode") ? GETPOST("zipcode") : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' ';
|
||||||
print $formcompany->select_ziptown((isset($_POST["town"]) ?GETPOST("town") : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
print $formcompany->select_ziptown((GETPOSTISSET("town") ? GETPOST("town") : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print $form->select_country(isset($_POST["country_id"]) ?GETPOST("country_id") : $object->country_id, 'country_id');
|
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
||||||
|
print $form->select_country(GETPOSTISSET("country_id") ? GETPOST("country_id") : $object->country_id, 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1029,19 +1041,29 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Phone
|
// Phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePro', 'phone_pro', GETPOST('phone_pro', 'alpha'), $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('PhonePro', 'phone_pro', GETPOST('phone_pro', 'alpha'), $object, 0).'</td>';
|
||||||
print '<td><input type="text" name="phone_pro" id="phone_pro" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_pro') ?GETPOST('phone_pro', 'alpha') : $object->phone_pro).'"></td>';
|
print '<td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePerso', 'fax', GETPOST('phone_perso', 'alpha'), $object, 0).'</td>';
|
print img_picto('', 'object_phoning');
|
||||||
print '<td><input type="text" name="phone_perso" id="phone_perso" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_perso') ?GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
print '<input type="text" name="phone_pro" id="phone_pro" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_pro') ?GETPOST('phone_pro', 'alpha') : $object->phone_pro).'"></td>';
|
||||||
|
print '<td>'.$form->editfieldkey('PhonePerso', 'fax', GETPOST('phone_perso', 'alpha'), $object, 0).'</td>';
|
||||||
|
print '<td>';
|
||||||
|
print img_picto('', 'object_phoning');
|
||||||
|
print '<input type="text" name="phone_perso" id="phone_perso" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_perso') ?GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$form->editfieldkey('PhoneMobile', 'phone_mobile', GETPOST('phone_mobile', 'alpha'), $object, 0, 'string', '').'</td>';
|
print '<tr><td>'.$form->editfieldkey('PhoneMobile', 'phone_mobile', GETPOST('phone_mobile', 'alpha'), $object, 0, 'string', '').'</td>';
|
||||||
print '<td><input type="text" name="phone_mobile" id="phone_mobile" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_mobile') ?GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td>';
|
print '<td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_fax').' '.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>';
|
print img_picto('', 'object_phoning_mobile');
|
||||||
print '<td><input type="text" name="fax" id="fax" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_fax') ?GETPOST('phone_fax', 'alpha') : $object->fax).'"></td></tr>';
|
print '<input type="text" name="phone_mobile" id="phone_mobile" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_mobile') ?GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td>';
|
||||||
|
print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>';
|
||||||
|
print '<td>';
|
||||||
|
print img_picto('', 'object_phoning_fax');
|
||||||
|
print '<input type="text" name="fax" id="fax" class="maxwidth200" maxlength="80" value="'.(GETPOSTISSET('phone_fax') ?GETPOST('phone_fax', 'alpha') : $object->fax).'"></td></tr>';
|
||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print '<tr><td>'.img_picto('', 'object_email').' '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>';
|
print '<tr><td>'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>';
|
||||||
print '<td><input type="text" name="email" id="email" class="maxwidth100onsmartphone quatrevingtpercent" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td>';
|
print '<td>';
|
||||||
|
print img_picto('', 'object_email');
|
||||||
|
print '<input type="text" name="email" id="email" class="maxwidth100onsmartphone quatrevingtpercent" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td>';
|
||||||
if (!empty($conf->mailing->enabled))
|
if (!empty($conf->mailing->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|||||||
@ -55,11 +55,12 @@ if ($user->socid) $socid = $user->socid;
|
|||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if ($company->id)
|
|||||||
if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
||||||
if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
||||||
if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
||||||
if ($company->email != $contact->email) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
|
if (empty($contact->email)) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
|
||||||
// Si contact lie a un tiers non de type "particulier"
|
// Si contact lie a un tiers non de type "particulier"
|
||||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,11 +55,12 @@ if ($user->socid > 0)
|
|||||||
$result = restrictedArea($user, 'contrat', $id);
|
$result = restrictedArea($user, 'contrat', $id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -46,11 +46,12 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call
|
|||||||
$urlsource = GETPOST("urlsource", 'alpha');
|
$urlsource = GETPOST("urlsource", 'alpha');
|
||||||
$search_doc_ref = GETPOST('search_doc_ref', 'alpha');
|
$search_doc_ref = GETPOST('search_doc_ref', 'alpha');
|
||||||
|
|
||||||
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
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;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class box_birthdays extends ModeleBoxes
|
|||||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
||||||
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
|
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||||
$sql .= " ORDER BY u.birth ASC";
|
$sql .= " ORDER BY u.birth ASC";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class box_birthdays_members extends ModeleBoxes
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as u";
|
||||||
$sql .= " WHERE u.entity IN (".getEntity('adherent').")";
|
$sql .= " WHERE u.entity IN (".getEntity('adherent').")";
|
||||||
$sql .= " AND u.statut = 1";
|
$sql .= " AND u.statut = 1";
|
||||||
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
|
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||||
$sql .= " ORDER BY u.birth ASC";
|
$sql .= " ORDER BY u.birth ASC";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -1466,6 +1466,7 @@ abstract class CommonDocGenerator
|
|||||||
// save curent cell padding
|
// save curent cell padding
|
||||||
$curentCellPaddinds = $pdf->getCellPaddings();
|
$curentCellPaddinds = $pdf->getCellPaddings();
|
||||||
|
|
||||||
|
// Add space for lines (more if we need to show a second alternative language)
|
||||||
global $outputlangsbis;
|
global $outputlangsbis;
|
||||||
if (is_object($outputlangsbis)) {
|
if (is_object($outputlangsbis)) {
|
||||||
// set cell padding with column title definition
|
// set cell padding with column title definition
|
||||||
@ -1480,8 +1481,8 @@ abstract class CommonDocGenerator
|
|||||||
$textWidth = $colDef['width'];
|
$textWidth = $colDef['width'];
|
||||||
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
|
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
|
||||||
|
|
||||||
|
// Add variant of translation if $outputlangsbis is an object
|
||||||
if (is_object($outputlangsbis)) {
|
if (is_object($outputlangsbis) && trim($colDef['title']['label'])) {
|
||||||
$pdf->setCellPaddings($colDef['title']['padding'][3], 0, $colDef['title']['padding'][1], $colDef['title']['padding'][2]);
|
$pdf->setCellPaddings($colDef['title']['padding'][3], 0, $colDef['title']['padding'][1], $colDef['title']['padding'][2]);
|
||||||
$pdf->SetXY($colDef['xStartPos'], $pdf->GetY());
|
$pdf->SetXY($colDef['xStartPos'], $pdf->GetY());
|
||||||
$textbis = $outputlangsbis->transnoentities($colDef['title']['textkey']);
|
$textbis = $outputlangsbis->transnoentities($colDef['title']['textkey']);
|
||||||
@ -1495,6 +1496,7 @@ abstract class CommonDocGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->tabTitleHeight;
|
return $this->tabTitleHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -575,7 +575,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
$return = '<div class="box-flex-item">';
|
$return = '<div class="box-flex-item">';
|
||||||
$return .= '<div class="info-box info-box-sm">';
|
$return .= '<div class="info-box info-box-sm">';
|
||||||
$return .= '<span class="info-box-icon bg-infoxbox-action">';
|
$return .= '<span class="info-box-icon bg-infobox-action">';
|
||||||
$return .= '<i class="fa fa-dol-action"></i>'; // Can be image
|
$return .= '<i class="fa fa-dol-action"></i>'; // Can be image
|
||||||
$return .= '</span>';
|
$return .= '</span>';
|
||||||
$return .= '<div class="info-box-content">';
|
$return .= '<div class="info-box-content">';
|
||||||
@ -667,7 +667,7 @@ abstract class CommonObject
|
|||||||
$namecoords .= $this->getFullName($langs, 1).'<br>'.$coords;
|
$namecoords .= $this->getFullName($langs, 1).'<br>'.$coords;
|
||||||
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||||
$out .= '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
$out .= '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||||
$out .= img_picto($langs->trans("Address"), 'object_address.png');
|
$out .= img_picto($langs->trans("Address"), 'map-marker-alt');
|
||||||
$out .= '</a> ';
|
$out .= '</a> ';
|
||||||
}
|
}
|
||||||
$out .= dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); $outdone++;
|
$out .= dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); $outdone++;
|
||||||
@ -7117,6 +7117,13 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)) : $this->array_options['options_'.$key];
|
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)) : $this->array_options['options_'.$key];
|
||||||
}
|
}
|
||||||
|
// HTML, select, integer and text add default value
|
||||||
|
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'select', 'int')))
|
||||||
|
{
|
||||||
|
if($action=='create') $value = $extrafields->attributes[$this->table_element]['default'][$key];
|
||||||
|
else $value = $this->array_options['options_'.$key];
|
||||||
|
}
|
||||||
|
|
||||||
$labeltoshow = $langs->trans($label);
|
$labeltoshow = $langs->trans($label);
|
||||||
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
|
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
|
||||||
|
|
||||||
@ -7876,6 +7883,7 @@ abstract class CommonObject
|
|||||||
public function createCommon(User $user, $notrigger = false)
|
public function createCommon(User $user, $notrigger = false)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
dol_syslog(get_class($this)."::createCommon create", LOG_DEBUG);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -8114,6 +8122,7 @@ abstract class CommonObject
|
|||||||
public function updateCommon(User $user, $notrigger = false)
|
public function updateCommon(User $user, $notrigger = false)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
dol_syslog(get_class($this)."::updateCommon update", LOG_DEBUG);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -8203,6 +8212,8 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0)
|
public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0)
|
||||||
{
|
{
|
||||||
|
dol_syslog(get_class($this)."::deleteCommon delete", LOG_DEBUG);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -8262,15 +8273,8 @@ abstract class CommonObject
|
|||||||
|
|
||||||
if (!$error && !empty($this->isextrafieldmanaged))
|
if (!$error && !empty($this->isextrafieldmanaged))
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields";
|
$result = $this->deleteExtraFields();
|
||||||
$sql .= " WHERE fk_object=".$this->id;
|
if ($result < 0) { $error++; }
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if (!$resql)
|
|
||||||
{
|
|
||||||
$this->errors[] = $this->db->lasterror();
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
|
|||||||
@ -100,9 +100,9 @@ class Events // extends CommonObject
|
|||||||
array('id'=>'USER_NEW_PASSWORD', 'test'=>1),
|
array('id'=>'USER_NEW_PASSWORD', 'test'=>1),
|
||||||
array('id'=>'USER_ENABLEDISABLE', 'test'=>1),
|
array('id'=>'USER_ENABLEDISABLE', 'test'=>1),
|
||||||
array('id'=>'USER_DELETE', 'test'=>1),
|
array('id'=>'USER_DELETE', 'test'=>1),
|
||||||
array('id'=>'GROUP_CREATE', 'test'=>1),
|
array('id'=>'USERGROUP_CREATE', 'test'=>1),
|
||||||
array('id'=>'GROUP_MODIFY', 'test'=>1),
|
array('id'=>'USERGROUP_MODIFY', 'test'=>1),
|
||||||
array('id'=>'GROUP_DELETE', 'test'=>1),
|
array('id'=>'USERGROUP_DELETE', 'test'=>1),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -348,6 +348,7 @@ class Form
|
|||||||
return ''; // No extralang field to show
|
return ''; // No extralang field to show
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result .= '<!-- Widget for translation -->'."\n";
|
||||||
$result .= '<div class="inline-block paddingleft image-'.$object->element.'-'.$fieldname.'">';
|
$result .= '<div class="inline-block paddingleft image-'.$object->element.'-'.$fieldname.'">';
|
||||||
$s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', false, 0, 0, '', 'fa-15 editfieldlang');
|
$s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', false, 0, 0, '', 'fa-15 editfieldlang');
|
||||||
$result .= $s;
|
$result .= $s;
|
||||||
@ -7408,9 +7409,14 @@ class Form
|
|||||||
$htmltext = '';
|
$htmltext = '';
|
||||||
// If there is extra languages
|
// If there is extra languages
|
||||||
foreach ($arrayoflangcode as $extralangcode) {
|
foreach ($arrayoflangcode as $extralangcode) {
|
||||||
$s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
|
$htmltext .= picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
|
||||||
$htmltext .= $s.$object->array_languages['name'][$extralangcode];
|
if ($object->array_languages['name'][$extralangcode]) {
|
||||||
|
$htmltext .= $object->array_languages['name'][$extralangcode];
|
||||||
|
} else {
|
||||||
|
$htmltext .= '<span class="opacitymedium">'.$langs->trans("SwitchInEditModeToAddTranslation").'</span>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
$ret .= '<!-- Show translations of name -->'."\n";
|
||||||
$ret .= $this->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
|
$ret .= $this->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -203,7 +203,7 @@ class FormActions
|
|||||||
if ($typeelement == 'project') $projectid = $object->id;
|
if ($typeelement == 'project') $projectid = $object->id;
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if (!empty($conf->agenda->enabled))
|
if (!empty($conf->agenda->enabled) && ! empty($user->rights->agenda->myactions->create))
|
||||||
{
|
{
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage));
|
$newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -733,7 +733,9 @@ class FormFile
|
|||||||
$arraykeys = array_keys($modellist);
|
$arraykeys = array_keys($modellist);
|
||||||
$modelselected = $arraykeys[0];
|
$modelselected = $arraykeys[0];
|
||||||
}
|
}
|
||||||
$out .= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth100');
|
$morecss = 'maxwidth200';
|
||||||
|
if ($conf->browser->layout == 'phone') $morecss = 'maxwidth100';
|
||||||
|
$out .= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss);
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$out .= ajax_combobox('model');
|
$out .= ajax_combobox('model');
|
||||||
@ -871,7 +873,7 @@ class FormFile
|
|||||||
if ($printer)
|
if ($printer)
|
||||||
{
|
{
|
||||||
//$out.= '<td class="right">';
|
//$out.= '<td class="right">';
|
||||||
$out .= '<a class="paddingleft" href="'.$urlsource.(strpos($urlsource, '?') ? '&' : '?').'action=print_file&printer='.$modulepart.'&file='.urlencode($relativepath);
|
$out .= '<a class="marginleftonly" href="'.$urlsource.(strpos($urlsource, '?') ? '&' : '?').'action=print_file&printer='.$modulepart.'&file='.urlencode($relativepath);
|
||||||
$out .= ($param ? '&'.$param : '');
|
$out .= ($param ? '&'.$param : '');
|
||||||
$out .= '">'.img_picto($langs->trans("PrintFile", $relativepath), 'printer.png').'</a>';
|
$out .= '">'.img_picto($langs->trans("PrintFile", $relativepath), 'printer.png').'</a>';
|
||||||
}
|
}
|
||||||
@ -992,7 +994,7 @@ class FormFile
|
|||||||
{
|
{
|
||||||
$out = '<dl class="dropdown inline-block">
|
$out = '<dl class="dropdown inline-block">
|
||||||
<dt><a data-ajax="false" href="#" onClick="return false;">'.img_picto('', 'listlight', '', 0, 0, 0, '', 'valignmiddle').'</a></dt>
|
<dt><a data-ajax="false" href="#" onClick="return false;">'.img_picto('', 'listlight', '', 0, 0, 0, '', 'valignmiddle').'</a></dt>
|
||||||
<dd><div class="multichoicedoc" style="position:absolute;left:100px;" ><ul class="ulselectedfields" style="display: none;">';
|
<dd><div class="multichoicedoc" style="position:absolute;left:100px;" ><ul class="ulselectedfields">';
|
||||||
$tmpout = '';
|
$tmpout = '';
|
||||||
|
|
||||||
// Loop on each file found
|
// Loop on each file found
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class FormOther
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."export_model";
|
$sql .= " FROM ".MAIN_DB_PREFIX."export_model";
|
||||||
$sql .= " WHERE type = '".$this->db->escape($type)."'";
|
$sql .= " WHERE type = '".$this->db->escape($type)."'";
|
||||||
if (!empty($fk_user)) $sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model
|
if (!empty($fk_user)) $sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model
|
||||||
$sql .= " ORDER BY rowid";
|
$sql .= " ORDER BY label";
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@ -613,8 +613,6 @@ class FormOther
|
|||||||
$numlines = count($lines);
|
$numlines = count($lines);
|
||||||
for ($i = 0; $i < $numlines; $i++) {
|
for ($i = 0; $i < $numlines; $i++) {
|
||||||
if ($lines[$i]->fk_parent == $parent) {
|
if ($lines[$i]->fk_parent == $parent) {
|
||||||
$var = !$var;
|
|
||||||
|
|
||||||
//var_dump($selectedproject."--".$selectedtask."--".$lines[$i]->fk_project."_".$lines[$i]->id); // $lines[$i]->id may be empty if project has no lines
|
//var_dump($selectedproject."--".$selectedtask."--".$lines[$i]->fk_project."_".$lines[$i]->id); // $lines[$i]->id may be empty if project has no lines
|
||||||
|
|
||||||
// Break on a new project
|
// Break on a new project
|
||||||
|
|||||||
@ -1380,7 +1380,8 @@ class SMTPs
|
|||||||
if ($strType == 'html')
|
if ($strType == 'html')
|
||||||
{
|
{
|
||||||
// Similar code to forge a text from html is also in CMailFile.class.php
|
// Similar code to forge a text from html is also in CMailFile.class.php
|
||||||
$strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContent);
|
$strContentAltText = preg_replace('/<head><title>.*<\/style><\/head>/', '', $strContent);
|
||||||
|
$strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContentAltText);
|
||||||
$strContentAltText = html_entity_decode(strip_tags($strContentAltText));
|
$strContentAltText = html_entity_decode(strip_tags($strContentAltText));
|
||||||
$strContentAltText = trim(wordwrap($strContentAltText, 75, "\r\n"));
|
$strContentAltText = trim(wordwrap($strContentAltText, 75, "\r\n"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -301,7 +301,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $exclu
|
|||||||
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date));
|
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date));
|
||||||
$sqldate .= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'";
|
$sqldate .= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'";
|
||||||
} else
|
} else
|
||||||
$sqldate .= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%m') = '".$db->escape($month_date)."'";
|
$sqldate .= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%c') = '".$db->escape($month_date)."'";
|
||||||
} elseif ($year_date > 0) {
|
} elseif ($year_date > 0) {
|
||||||
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false));
|
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false));
|
||||||
$sqldate .= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'";
|
$sqldate .= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'";
|
||||||
|
|||||||
@ -3142,20 +3142,24 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||||
'address', 'bank_account', 'barcode', 'bank', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes',
|
'address', 'bank_account', 'barcode', 'bank', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes',
|
||||||
'delete', 'dolly', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt',
|
'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt',
|
||||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'grip', 'grip_title', 'help', 'language', 'list', 'listlight', 'lot', 'mrp', 'note', 'stock',
|
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'language', 'list', 'listlight', 'lot',
|
||||||
|
'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'stock',
|
||||||
'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom',
|
'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom',
|
||||||
'object_category', 'object_bookmark', 'object_bug', 'object_generic', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||||
|
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_dynamicprice',
|
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_dynamicprice',
|
||||||
'object_holiday', 'object_hrm', 'object_multicurrency', 'object_payment',
|
'object_holiday', 'object_hrm', 'object_intervention', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
|
||||||
'object_lot', 'object_mrp', 'object_product', 'object_service', 'object_stock',
|
'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_supplier_proposal', 'object_service', 'object_stock',
|
||||||
'object_paragraph', 'object_printer', 'object_resource', 'object_rss', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other',
|
'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
|
||||||
'object_phoning', 'object_phoning_fax', 'object_email',
|
'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other',
|
||||||
'off', 'on', 'paiment', 'play', 'playdisabled', 'printer', 'product', 'resize', 'service', 'stats', 'trip',
|
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email',
|
||||||
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'globe',
|
'off', 'on',
|
||||||
|
'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'resize', 'service', 'stats', 'trip',
|
||||||
|
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench',
|
||||||
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top',
|
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top',
|
||||||
'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'preview', 'project', 'hrm', 'members', 'ticket', 'generic',
|
'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'preview', 'project', 'projectpub', 'hrm', 'members', 'ticket', 'generic',
|
||||||
'error', 'warning',
|
'error', 'warning',
|
||||||
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda'
|
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda'
|
||||||
)
|
)
|
||||||
@ -3176,22 +3180,25 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes',
|
'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes',
|
||||||
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'dynamicprice'=>'hand-holding-usd',
|
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'dynamicprice'=>'hand-holding-usd',
|
||||||
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt',
|
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt',
|
||||||
'accounting'=>'chart-line', 'category'=>'tag',
|
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
|
||||||
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
||||||
'email'=>'at',
|
'email'=>'at',
|
||||||
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle',
|
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle',
|
||||||
'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users',
|
'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users',
|
||||||
'sign-out'=>'sign-out-alt',
|
'sign-out'=>'sign-out-alt',
|
||||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar',
|
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
|
||||||
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter', 'split'=>'code-branch',
|
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter',
|
||||||
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
|
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
|
||||||
'multicurrency'=>'dollar-sign', 'other'=>'square', 'resource'=>'laptop-house',
|
'intervention'=>'ambulance', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice',
|
||||||
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
||||||
'payment'=>'money-bill-alt', 'phoning'=>'phone', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
'other'=>'square',
|
||||||
'stock'=>'box-open', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature',
|
||||||
|
'resize'=>'crop', 'supplier_proposal'=>'file-signature',
|
||||||
|
'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
||||||
|
'resource'=>'laptop-house',
|
||||||
|
'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||||
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||||
'title_agenda'=>'calendar-alt',
|
'title_agenda'=>'calendar-alt',
|
||||||
'playdisabled'=>'play', 'preview'=>'binoculars', 'project'=>'sitemap', 'resize'=>'crop',
|
|
||||||
'uparrow'=>'mail-forward',
|
'uparrow'=>'mail-forward',
|
||||||
'jabber'=>'comment-o'
|
'jabber'=>'comment-o'
|
||||||
);
|
);
|
||||||
@ -3241,15 +3248,18 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
|
|
||||||
// Add CSS
|
// Add CSS
|
||||||
$arrayconvpictotomorcess = array(
|
$arrayconvpictotomorcess = array(
|
||||||
'action'=>'bg-infoxbox-action', 'account'=>'bg-infoxbox-bank_account', 'bank_account'=>'bg-infoxbox-bank_account', 'cash-register'=>'bg-infoxbox-bank_account',
|
'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'cash-register'=>'bg-infobox-bank_account',
|
||||||
'contract'=>'bg-infoxbox-contrat',
|
'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action',
|
||||||
'multicurrency'=>'bg-infoxbox-bank_account',
|
'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat',
|
||||||
'check'=>'font-status4',
|
'multicurrency'=>'bg-infobox-bank_account',
|
||||||
'hrm'=>'bg-infoxbox-adherent', 'group'=>'bg-infoxbox-adherent',
|
'members'=>'bg-infobox-adherent', 'member'=>'bg-infobox-adherent', 'money-bill-alt'=>'bg-infobox-bank_account',
|
||||||
'members'=>'bg-infoxbox-adherent', 'member'=>'bg-infoxbox-adherent', 'user'=>'bg-infoxbox-adherent', 'users'=>'bg-infoxbox-adherent',
|
'order'=>'bg-infobox-commande',
|
||||||
|
'user'=>'bg-infobox-adherent', 'users'=>'bg-infobox-adherent',
|
||||||
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
|
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
|
||||||
'holiday'=>'bg-infoxbox-holiday', 'payment'=>'bg-infoxbox-bank_account', 'project'=>'bg-infoxbox-project', 'resource'=>'bg-infoxbox-action',
|
'holiday'=>'bg-infobox-holiday',
|
||||||
'ticket'=>'bg-infoxbox-contrat', 'title_hrm'=>'bg-infoxbox-holiday', 'trip'=>'bg-infoxbox-expensereport', 'title_agenda'=>'bg-infoxbox-action',
|
'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal',
|
||||||
|
'resource'=>'bg-infobox-action', 'supplier_proposal'=>'bg-infobox-supplier_proposal',
|
||||||
|
'ticket'=>'bg-infobox-contrat', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action',
|
||||||
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
|
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
|
||||||
);
|
);
|
||||||
if (!empty($arrayconvpictotomorcess[$pictowithouttext])) {
|
if (!empty($arrayconvpictotomorcess[$pictowithouttext])) {
|
||||||
@ -3261,10 +3271,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#a69944',
|
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#a69944',
|
||||||
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#a69944',
|
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#a69944',
|
||||||
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999',
|
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999',
|
||||||
'lot'=>'#a69944', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944',
|
'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944',
|
||||||
|
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944',
|
||||||
'other'=>'#ddd',
|
'other'=>'#ddd',
|
||||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'resize'=>'#444', 'rss'=>'#cba',
|
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
|
||||||
'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'warning'=>''
|
'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa'
|
||||||
);
|
);
|
||||||
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
||||||
$facolor = $arrayconvpictotocolor[$pictowithouttext];
|
$facolor = $arrayconvpictotocolor[$pictowithouttext];
|
||||||
@ -3349,11 +3360,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
* @param int $srconly Return only content of the src attribute of img.
|
* @param int $srconly Return only content of the src attribute of img.
|
||||||
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
||||||
* @return string Return img tag
|
* @return string Return img tag
|
||||||
* @see #img_picto, #img_picto_common
|
* @see img_picto(), img_picto_common()
|
||||||
*/
|
*/
|
||||||
function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0)
|
function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0)
|
||||||
{
|
{
|
||||||
return img_picto($titlealt, 'object_'.$picto, $moreatt, $pictoisfullpath, $srconly, $notitle);
|
if (strpos($picto, '^') === 0) return img_picto($titlealt, str_replace('^', '', $picto), $moreatt, $pictoisfullpath, $srconly, $notitle);
|
||||||
|
else return img_picto($titlealt, 'object_'.$picto, $moreatt, $pictoisfullpath, $srconly, $notitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3365,7 +3377,7 @@ function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false,
|
|||||||
* @param int $pictoisfullpath If 1, image path is a full path
|
* @param int $pictoisfullpath If 1, image path is a full path
|
||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @return string Return img tag
|
* @return string Return img tag
|
||||||
* @see #img_object, #img_picto
|
* @see img_object(), img_picto()
|
||||||
*/
|
*/
|
||||||
function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $morecss = '')
|
function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $morecss = '')
|
||||||
{
|
{
|
||||||
@ -3392,7 +3404,7 @@ function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $mo
|
|||||||
* @param string $moreatt Add more attribute on img tag
|
* @param string $moreatt Add more attribute on img tag
|
||||||
* @param int $pictoisfullpath If 1, image path is a full path
|
* @param int $pictoisfullpath If 1, image path is a full path
|
||||||
* @return string Return img tag
|
* @return string Return img tag
|
||||||
* @see #img_object, #img_picto
|
* @see img_object(), img_picto()
|
||||||
*/
|
*/
|
||||||
function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0)
|
function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0)
|
||||||
{
|
{
|
||||||
@ -4632,7 +4644,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
|||||||
{
|
{
|
||||||
if ($currency_code == 'auto') $currency_code = $conf->currency;
|
if ($currency_code == 'auto') $currency_code = $conf->currency;
|
||||||
|
|
||||||
$listofcurrenciesbefore = array('USD', 'GBP', 'AUD', 'HKD', 'MXN', 'PEN', 'CNY', 'CAD');
|
$listofcurrenciesbefore = array('AUD', 'CAD', 'CNY', 'COP', 'CLP', 'GBP', 'HKD', 'MXN', 'PEN', 'USD');
|
||||||
$listoflanguagesbefore = array('nl_NL');
|
$listoflanguagesbefore = array('nl_NL');
|
||||||
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
|
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
|
||||||
{
|
{
|
||||||
@ -4652,9 +4664,9 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
|||||||
/**
|
/**
|
||||||
* Function that return a number with universal decimal format (decimal separator is '.') from an amount typed by a user.
|
* Function that return a number with universal decimal format (decimal separator is '.') from an amount typed by a user.
|
||||||
* Function to use on each input amount before any numeric test or database insert. A better name for this function
|
* Function to use on each input amount before any numeric test or database insert. A better name for this function
|
||||||
* should be text2num().
|
* should be roundtext2num().
|
||||||
*
|
*
|
||||||
* @param float $amount Amount to convert/clean
|
* @param float $amount Amount to convert/clean or round
|
||||||
* @param string $rounding ''=No rounding
|
* @param string $rounding ''=No rounding
|
||||||
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
||||||
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
||||||
|
|||||||
@ -331,7 +331,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
if ($foruserprofile) $colspan = 4;
|
if ($foruserprofile) $colspan = 4;
|
||||||
|
|
||||||
$thumbsbyrow = 6;
|
$thumbsbyrow = 6;
|
||||||
print '<table class="noborder centpercent'.($edit ? ' editmode' : '').'">';
|
print '<table class="noborder centpercent'.($edit ? ' editmode' : '').' tableforfield">';
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
if ($foruserprofile)
|
if ($foruserprofile)
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -372,6 +372,12 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
|
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Extrafields in note
|
||||||
|
$extranote = $this->getExtrafieldsInHtml($object, $outputlangs);
|
||||||
|
if (!empty($extranote)) {
|
||||||
|
$notetoshow = dol_concatdesc($notetoshow, $extranote);
|
||||||
|
}
|
||||||
|
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
$tab_top -= 2;
|
$tab_top -= 2;
|
||||||
|
|||||||
@ -746,7 +746,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
$pdf->SetXY($posx, $posy);
|
$pdf->SetXY($posx, $posy);
|
||||||
$pdf->SetFont('', 'B', $default_font_size + 2);
|
$pdf->SetFont('', 'B', $default_font_size + 2);
|
||||||
$pdf->SetTextColor(111, 81, 124);
|
$pdf->SetTextColor(111, 81, 124);
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $object->getLibStatut(0), '', 'R');
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R');
|
||||||
|
|
||||||
if ($showaddress) {
|
if ($showaddress) {
|
||||||
// Sender properties
|
// Sender properties
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -456,6 +456,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
|
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Extrafields in note
|
||||||
|
$extranote = $this->getExtrafieldsInHtml($object, $outputlangs);
|
||||||
|
if (!empty($extranote)) {
|
||||||
|
$notetoshow = dol_concatdesc($notetoshow, $extranote);
|
||||||
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
$tab_top -= 2;
|
$tab_top -= 2;
|
||||||
@ -1393,26 +1398,12 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
|
||||||
|
|
||||||
// Retained warranty
|
// Retained warranty
|
||||||
if (!empty($object->situation_final) && ($object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty))))
|
if ($object->displayRetainedWarranty())
|
||||||
{
|
{
|
||||||
$displayWarranty = false;
|
|
||||||
|
|
||||||
// Check if this situation invoice is 100% for real
|
|
||||||
if (!empty($object->lines)) {
|
|
||||||
$displayWarranty = true;
|
|
||||||
foreach ($object->lines as $i => $line) {
|
|
||||||
if ($line->product_type < 2 && $line->situation_percent < 100) {
|
|
||||||
$displayWarranty = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($displayWarranty) {
|
|
||||||
$pdf->SetTextColor(40, 40, 40);
|
$pdf->SetTextColor(40, 40, 40);
|
||||||
$pdf->SetFillColor(255, 255, 255);
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
|
||||||
$retainedWarranty = $object->total_ttc * $object->retained_warranty / 100;
|
$retainedWarranty = $object->getRetainedWarrantyAmount();
|
||||||
$billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty;
|
$billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty;
|
||||||
|
|
||||||
// Billed - retained warranty
|
// Billed - retained warranty
|
||||||
@ -1436,7 +1427,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
$creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
||||||
|
|||||||
@ -1272,6 +1272,14 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
|
$outputlangsbis = null;
|
||||||
|
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
|
||||||
|
$outputlangsbis = new Translate('', $conf);
|
||||||
|
$outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
||||||
|
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||||
|
$default_font_size--;
|
||||||
|
}
|
||||||
|
|
||||||
$tab2_top = $posy;
|
$tab2_top = $posy;
|
||||||
$tab2_hl = 4;
|
$tab2_hl = 4;
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
@ -1287,13 +1295,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$useborder = 0;
|
$useborder = 0;
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
|
||||||
$outputlangsbis = null;
|
|
||||||
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
|
|
||||||
$outputlangsbis = new Translate('', $conf);
|
|
||||||
$outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
|
||||||
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add trigger to allow to edit $object
|
// Add trigger to allow to edit $object
|
||||||
$parameters = array(
|
$parameters = array(
|
||||||
'object' => &$object,
|
'object' => &$object,
|
||||||
@ -1685,51 +1686,21 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
|
||||||
|
|
||||||
|
|
||||||
/*if($object->type == Facture::TYPE_SITUATION)
|
|
||||||
{
|
|
||||||
// reste à payer total
|
|
||||||
$index++;
|
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
|
||||||
$pdf->SetFillColor(255,255,255);
|
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities('SituationTotalRayToRest'), 0, 'L', 1);
|
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_a_payer_ttc-$deja_regle, 0, $outputlangs), 0, 'R', 1);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
// Retained warranty
|
// Retained warranty
|
||||||
if (!empty($object->situation_final) && ($object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty))))
|
if ($object->displayRetainedWarranty())
|
||||||
{
|
{
|
||||||
$displayWarranty = false;
|
|
||||||
|
|
||||||
// Check if this situation invoice is 100% for real
|
|
||||||
if (!empty($object->situation_final)) {
|
|
||||||
$displayWarranty = true;
|
|
||||||
}
|
|
||||||
elseif (!empty($object->lines) && $object->status == Facture::STATUS_DRAFT) {
|
|
||||||
// $object->situation_final need validation to be done so this test is need for draft
|
|
||||||
$displayWarranty = true;
|
|
||||||
foreach ($object->lines as $i => $line) {
|
|
||||||
if ($line->product_type < 2 && $line->situation_percent < 100) {
|
|
||||||
$displayWarranty = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($displayWarranty) {
|
|
||||||
$pdf->SetTextColor(40, 40, 40);
|
$pdf->SetTextColor(40, 40, 40);
|
||||||
$pdf->SetFillColor(255, 255, 255);
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
|
||||||
$retainedWarranty = $total_a_payer_ttc * $object->retained_warranty / 100;
|
$retainedWarranty = $object->getRetainedWarrantyAmount();
|
||||||
$billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty;
|
$billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty;
|
||||||
|
|
||||||
// Billed - retained warranty
|
// Billed - retained warranty
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("PDFEVOLToPayOn", dol_print_date($object->date_lim_reglement, 'day')), $useborder, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("ToPayOn", dol_print_date($object->date_lim_reglement, 'day')), $useborder, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($billedWithRetainedWarranty), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($billedWithRetainedWarranty), $useborder, 'R', 1);
|
||||||
@ -1738,8 +1709,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$retainedWarrantyToPayOn = $outputlangs->transnoentities("PDFEVOLRetainedWarranty").' ('.$object->retained_warranty.'%)';
|
$retainedWarrantyToPayOn = $outputlangs->transnoentities("RetainedWarranty").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("RetainedWarranty") : '').' ('.$object->retained_warranty.'%)';
|
||||||
$retainedWarrantyToPayOn .= !empty($object->retained_warranty_date_limit) ? ' '.$outputlangs->transnoentities("PDFEVOLtoPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')) : '';
|
$retainedWarrantyToPayOn .= !empty($object->retained_warranty_date_limit) ? ' '.$outputlangs->transnoentities("toPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')) : '';
|
||||||
|
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $retainedWarrantyToPayOn, $useborder, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $retainedWarrantyToPayOn, $useborder, 'L', 1);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
@ -1747,7 +1718,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
|
|
||||||
@ -2059,7 +2029,12 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$posy += 4;
|
$posy += 4;
|
||||||
$pdf->SetXY($posx, $posy);
|
$pdf->SetXY($posx, $posy);
|
||||||
$pdf->SetTextColor(0, 0, 60);
|
$pdf->SetTextColor(0, 0, 60);
|
||||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateInvoice")." : ".dol_print_date($object->date, "day", false, $outputlangs), '', 'R');
|
|
||||||
|
$title = $outputlangs->transnoentities("DateInvoice");
|
||||||
|
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||||
|
$title .= ' - '.$outputlangsbis->transnoentities("DateInvoice");
|
||||||
|
}
|
||||||
|
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date, "day", false, $outputlangs), '', 'R');
|
||||||
|
|
||||||
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE))
|
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE))
|
||||||
{
|
{
|
||||||
@ -2074,7 +2049,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$posy += 3;
|
$posy += 3;
|
||||||
$pdf->SetXY($posx, $posy);
|
$pdf->SetXY($posx, $posy);
|
||||||
$pdf->SetTextColor(0, 0, 60);
|
$pdf->SetTextColor(0, 0, 60);
|
||||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateDue")." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
|
$title = $outputlangs->transnoentities("DateDue");
|
||||||
|
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||||
|
$title .= ' - '.$outputlangsbis->transnoentities("DateDue");
|
||||||
|
}
|
||||||
|
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->thirdparty->code_client)
|
if ($object->thirdparty->code_client)
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class modECM extends DolibarrModules
|
|||||||
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
|
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
|
||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
// Name of png file (without png) used for this module
|
// Name of png file (without png) used for this module
|
||||||
$this->picto = 'dir';
|
$this->picto = 'folder';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/ecm/temp");
|
$this->dirs = array("/ecm/temp");
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class modExpedition extends DolibarrModules
|
|||||||
$this->version = 'dolibarr';
|
$this->version = 'dolibarr';
|
||||||
|
|
||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
$this->picto = "sending";
|
$this->picto = "dolly";
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/expedition/temp",
|
$this->dirs = array("/expedition/temp",
|
||||||
|
|||||||
@ -420,7 +420,7 @@ class modFournisseur extends DolibarrModules
|
|||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_supplier'=>"RefSupplier", 'f.datec'=>"InvoiceDateCreation",
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_supplier'=>"RefSupplier", 'f.datec'=>"InvoiceDateCreation",
|
||||||
'f.datef'=>"DateInvoice", 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.paye'=>"InvoicePaid",
|
'f.datef'=>"DateInvoice", 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.paye'=>"InvoicePaid",
|
||||||
'f.fk_statut'=>'InvoiceStatus', 'f.note_public'=>"InvoiceNote", 'p.rowid'=>'PaymentId', 'pf.amount'=>'AmountPayment',
|
'f.fk_statut'=>'InvoiceStatus', 'f.note_public'=>"InvoiceNote", 'p.rowid'=>'PaymentId', 'pf.amount'=>'AmountPayment',
|
||||||
'p.datep'=>'DatePayment', 'p.num_paiement'=>'PaymentNumber', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel'
|
'p.datep'=>'DatePayment', 'p.num_paiement'=>'PaymentNumber', 'p.fk_bank'=>'IdTransaction', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel'
|
||||||
);
|
);
|
||||||
//$this->export_TypeFields_array[$r]=array(
|
//$this->export_TypeFields_array[$r]=array(
|
||||||
// 's.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text',
|
// 's.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text',
|
||||||
@ -432,7 +432,7 @@ class modFournisseur extends DolibarrModules
|
|||||||
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text',
|
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text',
|
||||||
's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.total_ht'=>"Numeric",
|
's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.total_ht'=>"Numeric",
|
||||||
'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.note_public'=>"Text", 'pf.amount'=>'Numeric',
|
'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.note_public'=>"Text", 'pf.amount'=>'Numeric',
|
||||||
'p.datep'=>'Date', 'p.num_paiement'=>'Numeric', 'project.ref'=>'Text', 'project.title'=>'Text'
|
'p.datep'=>'Date', 'p.num_paiement'=>'Numeric', 'p.fk_bank'=>'Numeric', 'project.ref'=>'Text', 'project.title'=>'Text'
|
||||||
);
|
);
|
||||||
$this->export_entities_array[$r] = array(
|
$this->export_entities_array[$r] = array(
|
||||||
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company',
|
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company',
|
||||||
@ -440,7 +440,7 @@ class modFournisseur extends DolibarrModules
|
|||||||
's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company',
|
's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company',
|
||||||
'f.rowid'=>"invoice", 'f.ref'=>"invoice", 'f.ref_supplier'=>"invoice", 'f.datec'=>"invoice", 'f.datef'=>"invoice", 'f.total_ht'=>"invoice",
|
'f.rowid'=>"invoice", 'f.ref'=>"invoice", 'f.ref_supplier'=>"invoice", 'f.datec'=>"invoice", 'f.datef'=>"invoice", 'f.total_ht'=>"invoice",
|
||||||
'f.total_ttc'=>"invoice", 'f.total_tva'=>"invoice", 'f.paye'=>"invoice", 'f.fk_statut'=>'invoice', 'f.note_public'=>"invoice", 'p.rowid'=>'payment', 'pf.amount'=>'payment',
|
'f.total_ttc'=>"invoice", 'f.total_tva'=>"invoice", 'f.paye'=>"invoice", 'f.fk_statut'=>'invoice', 'f.note_public'=>"invoice", 'p.rowid'=>'payment', 'pf.amount'=>'payment',
|
||||||
'p.datep'=>'payment', 'p.num_paiement'=>'payment', 'project.rowid'=>'project', 'project.ref'=>'project', 'project.title'=>'project');
|
'p.datep'=>'payment', 'p.num_paiement'=>'payment', 'p.fk_bank'=>'account', 'project.rowid'=>'project', 'project.ref'=>'project', 'project.title'=>'project');
|
||||||
$this->export_dependencies_array[$r] = array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
$this->export_dependencies_array[$r] = array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||||
// Add extra fields object
|
// Add extra fields object
|
||||||
$sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
|
$sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class modGeoIPMaxmind extends DolibarrModules
|
|||||||
// Name of image file used for this module.
|
// Name of image file used for this module.
|
||||||
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
||||||
// If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'
|
// If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'
|
||||||
$this->picto = 'globe';
|
$this->picto = 'geoip';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/geoipmaxmind");
|
$this->dirs = array("/geoipmaxmind");
|
||||||
|
|||||||
@ -54,7 +54,7 @@ class modLoan extends DolibarrModules
|
|||||||
$this->version = 'dolibarr';
|
$this->version = 'dolibarr';
|
||||||
|
|
||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
$this->picto = 'bill';
|
$this->picto = 'money-bill-alt';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/loan/temp");
|
$this->dirs = array("/loan/temp");
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
// Name of image file used for this module.
|
// Name of image file used for this module.
|
||||||
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
||||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||||
$this->picto = 'opensurvey.png@opensurvey';
|
$this->picto = '^date@opensurvey';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array();
|
$this->dirs = array();
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class modReception extends DolibarrModules
|
|||||||
$this->version = 'experimental';
|
$this->version = 'experimental';
|
||||||
|
|
||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
$this->picto = "sending";
|
$this->picto = "dollyrevert";
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/reception/receipt",
|
$this->dirs = array("/reception/receipt",
|
||||||
|
|||||||
@ -589,7 +589,7 @@ class modService extends DolibarrModules
|
|||||||
'sp.remise_percent'=>'DiscountQtyMin'
|
'sp.remise_percent'=>'DiscountQtyMin'
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled)
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array(
|
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array(
|
||||||
'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line
|
'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line
|
||||||
@ -626,7 +626,7 @@ class modService extends DolibarrModules
|
|||||||
// TODO Make this field not required and calculate it from price and qty
|
// TODO Make this field not required and calculate it from price and qty
|
||||||
'sp.remise_percent' => '20'
|
'sp.remise_percent' => '20'
|
||||||
));
|
));
|
||||||
if ($conf->multicurrency->enabled)
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
$this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array(
|
$this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array(
|
||||||
'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency',
|
'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency',
|
||||||
|
|||||||
@ -579,6 +579,7 @@ class modSociete extends DolibarrModules
|
|||||||
'extra' => MAIN_DB_PREFIX.'socpeople_extrafields'
|
'extra' => MAIN_DB_PREFIX.'socpeople_extrafields'
|
||||||
); // List of tables to insert into (insert done in same order)
|
); // List of tables to insert into (insert done in same order)
|
||||||
$this->import_fields_array[$r] = array(//field order as per structure of table llx_socpeople
|
$this->import_fields_array[$r] = array(//field order as per structure of table llx_socpeople
|
||||||
|
's.rowid' => 'Id',
|
||||||
's.datec' => "DateCreation",
|
's.datec' => "DateCreation",
|
||||||
's.fk_soc' => 'ThirdPartyName',
|
's.fk_soc' => 'ThirdPartyName',
|
||||||
's.civility' => 'UserTitle',
|
's.civility' => 'UserTitle',
|
||||||
@ -645,6 +646,7 @@ class modSociete extends DolibarrModules
|
|||||||
's.datec' => '^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$'
|
's.datec' => '^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$'
|
||||||
);
|
);
|
||||||
$this->import_examplevalues_array[$r] = array(//field order as per structure of table llx_socpeople
|
$this->import_examplevalues_array[$r] = array(//field order as per structure of table llx_socpeople
|
||||||
|
's.rowid' => '1',
|
||||||
's.datec' => 'formatted as '.dol_print_date(dol_now(), '%Y-%m-%d'),
|
's.datec' => 'formatted as '.dol_print_date(dol_now(), '%Y-%m-%d'),
|
||||||
's.fk_soc' => 'Third Party name eg. TPBigCompany',
|
's.fk_soc' => 'Third Party name eg. TPBigCompany',
|
||||||
's.civility' => 'Title of civility eg: MR...matches field "code" in table "'.MAIN_DB_PREFIX.'c_civility"',
|
's.civility' => 'Title of civility eg: MR...matches field "code" in table "'.MAIN_DB_PREFIX.'c_civility"',
|
||||||
@ -666,6 +668,9 @@ class modSociete extends DolibarrModules
|
|||||||
's.note_private' => "My private note",
|
's.note_private' => "My private note",
|
||||||
's.note_public' => "My public note"
|
's.note_public' => "My public note"
|
||||||
);
|
);
|
||||||
|
$this->import_updatekeys_array[$r] = array(
|
||||||
|
's.rowid' => 'Id'
|
||||||
|
);
|
||||||
|
|
||||||
// Import Bank Accounts
|
// Import Bank Accounts
|
||||||
$r++;
|
$r++;
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
|
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -439,6 +439,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
|
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Extrafields in note
|
||||||
|
$extranote = $this->getExtrafieldsInHtml($object, $outputlangs);
|
||||||
|
if (!empty($extranote)) {
|
||||||
|
$notetoshow = dol_concatdesc($notetoshow, $extranote);
|
||||||
|
}
|
||||||
if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0)
|
if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0)
|
||||||
{
|
{
|
||||||
$tmpuser = new User($this->db);
|
$tmpuser = new User($this->db);
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
print '<!-- extrafields_list_search_input.tpl.php -->'."\n";
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($conf) || !is_object($conf))
|
if (empty($conf) || !is_object($conf))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,7 +45,7 @@ if (empty($object) || !is_object($object))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
global $mysoc;
|
||||||
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
|
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
|
||||||
|
|
||||||
$usemargins = 0;
|
$usemargins = 0;
|
||||||
@ -282,13 +282,21 @@ if ($line->special_code == 3) { ?>
|
|||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
print '<span class="classfortooltip" title="';
|
$tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht);
|
||||||
print $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht);
|
$tooltiponprice .= '<br>'.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva);
|
||||||
print '<br>'.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva);
|
if (! $senderissupplier && is_object($object->thirdparty)) {
|
||||||
if (price2num($line->total_localtax1)) print '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1);
|
if ($object->thirdparty->useLocalTax(1)) {
|
||||||
if (price2num($line->total_localtax2)) print '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2);
|
if (price2num($line->total_localtax1)) $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1);
|
||||||
print '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc);
|
else $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>';
|
||||||
print '">';
|
}
|
||||||
|
if ($object->thirdparty->useLocalTax(1)) {
|
||||||
|
if (price2num($line->total_localtax2)) $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2);
|
||||||
|
else $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$tooltiponprice .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc);
|
||||||
|
|
||||||
|
print '<span class="classfortooltip" title="'.dol_escape_htmltag($tooltiponprice).'">';
|
||||||
}
|
}
|
||||||
print price($line->total_ht);
|
print price($line->total_ht);
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
|
|||||||
@ -151,7 +151,7 @@ class InterfaceLogevents extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Groupes
|
// Groupes
|
||||||
elseif ($action == 'GROUP_CREATE')
|
elseif ($action == 'USERGROUP_CREATE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
@ -159,7 +159,7 @@ class InterfaceLogevents extends DolibarrTriggers
|
|||||||
$text = $langs->transnoentities("NewGroupCreated", $object->name);
|
$text = $langs->transnoentities("NewGroupCreated", $object->name);
|
||||||
$desc = $langs->transnoentities("NewGroupCreated", $object->name);
|
$desc = $langs->transnoentities("NewGroupCreated", $object->name);
|
||||||
}
|
}
|
||||||
elseif ($action == 'GROUP_MODIFY')
|
elseif ($action == 'USERGROUP_MODIFY')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
@ -167,7 +167,7 @@ class InterfaceLogevents extends DolibarrTriggers
|
|||||||
$text = $langs->transnoentities("GroupModified", $object->name);
|
$text = $langs->transnoentities("GroupModified", $object->name);
|
||||||
$desc = $langs->transnoentities("GroupModified", $object->name);
|
$desc = $langs->transnoentities("GroupModified", $object->name);
|
||||||
}
|
}
|
||||||
elseif ($action == 'GROUP_DELETE')
|
elseif ($action == 'USERGROUP_DELETE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|||||||
@ -269,7 +269,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Groupes
|
// Groupes
|
||||||
elseif ($action == 'GROUP_CREATE')
|
elseif ($action == 'USERGROUP_CREATE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap')
|
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap')
|
||||||
@ -293,7 +293,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
if ($result < 0) $this->error = "ErrorLDAP ".$ldap->error;
|
if ($result < 0) $this->error = "ErrorLDAP ".$ldap->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($action == 'GROUP_MODIFY')
|
elseif ($action == 'USERGROUP_MODIFY')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap')
|
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap')
|
||||||
@ -330,7 +330,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
if ($result < 0) $this->error = "ErrorLDAP ".$ldap->error;
|
if ($result < 0) $this->error = "ErrorLDAP ".$ldap->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($action == 'GROUP_DELETE')
|
elseif ($action == 'USERGROUP_DELETE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap')
|
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap')
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class InterfaceStripe
|
|||||||
$this->family = 'stripe';
|
$this->family = 'stripe';
|
||||||
$this->description = "Triggers of the module Stripe";
|
$this->description = "Triggers of the module Stripe";
|
||||||
$this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version
|
$this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version
|
||||||
$this->picto = 'stripe@stripe';
|
$this->picto = 'stripe';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,29 +77,6 @@ class InterfaceStripe
|
|||||||
return $this->description;
|
return $this->description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Trigger version
|
|
||||||
*
|
|
||||||
* @return string Version of trigger file
|
|
||||||
*/
|
|
||||||
public function getVersion()
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
$langs->load("admin");
|
|
||||||
|
|
||||||
if ($this->version == 'development') {
|
|
||||||
return $langs->trans("Development");
|
|
||||||
} elseif ($this->version == 'experimental') {
|
|
||||||
return $langs->trans("Experimental");
|
|
||||||
} elseif ($this->version == 'dolibarr') {
|
|
||||||
return DOL_VERSION;
|
|
||||||
} elseif ($this->version) {
|
|
||||||
return $this->version;
|
|
||||||
} else {
|
|
||||||
return $langs->trans("Unknown");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "runTrigger" are triggered if file
|
* All functions "runTrigger" are triggered if file
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user