Merge remote-tracking branch 'upstream/develop' into nospaceaftercomma
This commit is contained in:
commit
b10558bacd
@ -11,9 +11,9 @@ LaunchProgram=Launch %1
|
|||||||
AssocFileExtension=&Associate %1 with the %2 file extension
|
AssocFileExtension=&Associate %1 with the %2 file extension
|
||||||
AssocingFileExtension=Associating %1 with the %2 file extension...
|
AssocingFileExtension=Associating %1 with the %2 file extension...
|
||||||
|
|
||||||
YouWillInstallDoliWamp=You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer.
|
YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party softwares like Apache, Mysql and PHP) on your computer.
|
||||||
ThisAssistantInstallOrUpgrade=This assistant installs or upgrades Dolibarr ERP-CRM and all required third party softwares (Apache, Mysql and PHP) optimized for a Dolibarr usage.
|
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org).
|
||||||
IfYouHaveTechnicalKnowledge=If you are looking for a hosted version in the Cloud, you should look at https://saas.dolibarr.org. If you have technical knowledge and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing Apache, Mysql and PHP installation.
|
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP.
|
||||||
ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...
|
ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...
|
||||||
DoYouWantToStart=Do you want to start installation/upgrade process ?
|
DoYouWantToStart=Do you want to start installation/upgrade process ?
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go bac
|
|||||||
|
|
||||||
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||||
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||||
ChooseDefaultBrowser=Please choose your default browser. If you are not sure, just click Open :
|
ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open :
|
||||||
|
|
||||||
LaunchNow=Launch Dolibarr now
|
LaunchNow=Launch Dolibarr now
|
||||||
|
|
||||||
|
|||||||
@ -2,47 +2,47 @@
|
|||||||
[CustomMessages]
|
[CustomMessages]
|
||||||
|
|
||||||
NameAndVersion=%1 version %2
|
NameAndVersion=%1 version %2
|
||||||
Additionalcons=Ic<49>nes suppl<70>mentaires :
|
AdditionalIcons=Icônes supplémentaires :
|
||||||
CreateDesktopIcon=Cr<EFBFBD>er une ic<69>ne sur le &Bureau
|
CreateDesktopIcon=Créer une icône sur le &Bureau
|
||||||
CreateQuickLaunchIcon=Cr<EFBFBD>er une ic<69>ne dans la barre de &Lancement rapide
|
CreateQuickLaunchIcon=Créer une icône dans la barre de &Lancement rapide
|
||||||
ProgramOnTheWeb=Page d'accueil de %1
|
ProgramOnTheWeb=Page d'accueil de %1
|
||||||
UninstallProgram=D<EFBFBD>sinstaller %1
|
UninstallProgram=Désinstaller %1
|
||||||
LaunchProgram=Ex<EFBFBD>cuter %1
|
LaunchProgram=Exécuter %1
|
||||||
AssocFileExtension=&Associer %1 avec l'extension de fichier %2
|
AssocFileExtension=&Associer %1 avec l'extension de fichier %2
|
||||||
AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
|
AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
|
||||||
|
|
||||||
YouWillInstallDoliWamp=Vous allez installer ou mettre <EFBFBD> jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur.
|
YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp sur votre ordinateur (donc Dolibarr + tous ses composants prérequis comme Apache, Mysql et PHP).
|
||||||
ThisAssistantInstallOrUpgrade=Cet assistant installe ou met <20> jour Dolibarr ERP-CRM et tous ses composants pr<70>requis (Apache, Mysql et PHP) optimis<69>s pour une utilisation de Dolibarr.
|
ThisAssistantInstallOrUpgrade=AVERTISSEMENT: L'utilisation d'un ERP CRM installé sur un ordinateur local peut être dangereuse: si votre ordinateur tombe en panne, vous pouvez perdre toutes vos données. Faites-le si vous êtes prêt à gérer les sauvegardes vous-même sérieusement. Sinon, utilisez plutôt une installation en Saas (voir https://saas.dolibarr.org).
|
||||||
IfYouHaveTechnicalKnowledge=Si vous cherchez un h<>bergement dans le Cloud, aller voir sur https://saas.dolibarr.org. Si vous avez des comp<6D>tences techniques et voulez g<>rer vous m<>me Apache, Mysql et PHP, vous ne devriez pas utiliser cet assistant mais faire plut<75>t une installation manuelle de Dolibarr sur votre socle Apache, Mysql et PHP existant.
|
IfYouHaveTechnicalKnowledge=De plus, si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d''autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un serveur existant équipé de Apache, Mysql et PHP.
|
||||||
ButIfYouLook=Mais si vous recherchez une installation automatis<EFBFBD>e locale sur votre ordinateur, cl<63> en main, vous <20>tes sur la bonne voie...
|
ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée sur une poste local, vous êtes sur la bonne voie...
|
||||||
DoYouWantToStart=Voulez-vous d<EFBFBD>marrer le processus d'installation/mise <20> jour ?
|
DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ?
|
||||||
|
|
||||||
TechnicalParameters=Param<EFBFBD>tres techniques
|
TechnicalParameters=Paramètres techniques
|
||||||
IfFirstInstall=S'il s'agit de la premi<EFBFBD>re installation, merci de sp<73>cifier ces quelques param<61>tres techniques. Si vous ne les comprennez pas, <20>tes non s<>r, ou proc<6F>dez <20> une mise <20> jour, laissez les champs avec les valeurs propos<6F>es par d<>faut.
|
IfFirstInstall=S'il s'agit de la première installation, merci de spécifier ces quelques paramètres techniques. Si vous ne les comprennez pas, êtes non sûr, ou procédez à une mise à jour, laissez les champs avec les valeurs proposées par défaut.
|
||||||
|
|
||||||
|
|
||||||
; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 70 CHARACTERS
|
; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 70 CHARACTERS
|
||||||
SMTPServer=Serveur SMTP (le votre ou de votre FAI, premi<EFBFBD>re installation uniquement):
|
SMTPServer=Serveur SMTP (le votre ou de votre FAI, première installation uniquement):
|
||||||
ApachePort=Port Apache (premi<EFBFBD>re installation uniquement, le choix standard est 80):
|
ApachePort=Port Apache (première installation uniquement, le choix standard est 80):
|
||||||
MySqlPort=Port Mysql (premi<EFBFBD>re installation uniquement, le choix standard est 3306):
|
MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306):
|
||||||
MySqlPassword=Mot de passe serveur+base MySql de root (premi<EFBFBD>re installation uniquement):
|
MySqlPassword=Mot de passe serveur+base MySql de root (première installation uniquement):
|
||||||
|
|
||||||
FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signal<EFBFBD>. Cliquez sur OK pour continuer...
|
FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signalé. Cliquez sur OK pour continuer...
|
||||||
|
|
||||||
PortAlreadyInUse=Le port %1 semble d<EFBFBD>j<EFBFBD> utilis<69>. Il est recommand<6E> d'annuler pour revenir en arri<72>re et sp<73>cifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ?
|
PortAlreadyInUse=Le port %1 semble déjà utilisé. Il est recommandé d'annuler pour revenir en arrière et spécifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ?
|
||||||
|
|
||||||
FirefoxDetected=Firefox a <EFBFBD>t<EFBFBD> d<>tect<63> sur votre ordinateur. Voulez-vous en faire votre navigateur par d<>faut pour Dolibarr ?
|
FirefoxDetected=Firefox a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
|
||||||
ChromeDetected=Chrome a <EFBFBD>t<EFBFBD> d<>tect<63> sur votre ordinateur. Voulez-vous en faire votre navigateur par d<>faut pour Dolibarr ?
|
ChromeDetected=Chrome a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
|
||||||
ChooseDefaultBrowser=Merci de choisir votre navigateur par d<EFBFBD>faut. Si vous n'<27>tes pas s<>r, cliquez simplement sur Ouvrir :
|
ChooseDefaultBrowser=Merci de choisir votre navigateur par défaut (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). Si vous n'êtes pas sûr, cliquez simplement sur Ouvrir :
|
||||||
|
|
||||||
LaunchNow=Lancer Dolibarr maintenant
|
LaunchNow=Lancer Dolibarr maintenant
|
||||||
|
|
||||||
ProgramHasBeenRemoved=Les fichiers du programme Dolibarr ont <EFBFBD>t<EFBFBD> supprim<69>s. Toutefois, tous vos fichiers de donn<6E>es sont toujours dans le r<>pertoire %1. Vous devez supprimer ce r<>pertoire manuellement pour avoir une d<>sinstallation compl<70>te.
|
ProgramHasBeenRemoved=Les fichiers du programme Dolibarr ont été supprimés. Toutefois, tous vos fichiers de données sont toujours dans le répertoire %1. Vous devez supprimer ce répertoire manuellement pour avoir une désinstallation complète.
|
||||||
|
|
||||||
DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d<EFBFBD>marrer ou red<65>marrer Apache et Mysql, ceci peut durer de quelques secondes <20> une minute apr<70>s cette confirmation. D<>marrer l'installation ou mise <20> jour du serveur web et base de donn<6E>es requis par Dolibarr ?
|
DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant démarrer ou redémarrer Apache et Mysql, ceci peut durer de quelques secondes à une minute après cette confirmation. Démarrer l'installation ou mise à jour du serveur web et base de données requis par Dolibarr ?
|
||||||
|
|
||||||
OldVersionFoundAndMoveInNew=Une ancienne version de base a <EFBFBD>t<EFBFBD> trouv<75>e et d<>plac<61>e pour fonctionner avec la nouvelle version de Dolibarr.
|
OldVersionFoundAndMoveInNew=Une ancienne version de base a été trouvée et déplacée pour fonctionner avec la nouvelle version de Dolibarr.
|
||||||
OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a <EFBFBD>t<EFBFBD> trouv<75>e mais ne peut <20>tre d<>plac<61>e pour <20>tre utilis<69>e avec la nouvelle version de Dolibarr.
|
OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a été trouvée mais ne peut être déplacée pour être utilisée avec la nouvelle version de Dolibarr.
|
||||||
|
|
||||||
DLLMissing=L'installation de votre Windows est incompl<EFBFBD>te. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit version (vcredist_x86.exe) d'abord (vous pourrez le trouver <EFBFBD> https://www.microsoft.com/en-us/download/) puis relancer l'installation de DoliWamp après.
|
DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après.
|
||||||
ContinueAnyway=Continuer malgr<EFBFBD> tout (le process d'installaton échouera)
|
ContinueAnyway=Continuer malgré tout (le process d'installaton échouera)
|
||||||
|
|||||||
@ -3,4 +3,4 @@ REM Launch Dolibarr Admin center
|
|||||||
REM ----------------------------
|
REM ----------------------------
|
||||||
|
|
||||||
REM Go to admin center page
|
REM Go to admin center page
|
||||||
start "DoliWamp admin" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/
|
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/
|
||||||
|
|||||||
@ -4,4 +4,4 @@ REM ---------------------------
|
|||||||
|
|
||||||
REM Go to help center page
|
REM Go to help center page
|
||||||
echo Please wait...
|
echo Please wait...
|
||||||
start "Dolibarr Help center" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/
|
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/
|
||||||
|
|||||||
@ -3,7 +3,7 @@ REM Launch Dolibarr
|
|||||||
REM ---------------
|
REM ---------------
|
||||||
|
|
||||||
REM If no lock file, we call install process
|
REM If no lock file, we call install process
|
||||||
IF NOT EXIST dolibarr_documents\install.lock start "Dolibarr" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/
|
IF NOT EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/
|
||||||
|
|
||||||
REM If lock file exists, we call home page
|
REM If lock file exists, we call home page
|
||||||
IF EXIST dolibarr_documents\install.lock start "Dolibarr" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/
|
IF EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/
|
||||||
|
|||||||
@ -188,6 +188,15 @@
|
|||||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
||||||
|
|
||||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||||
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||||
|
<properties>
|
||||||
|
<property name="equalsSpacing" value="1"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
<!-- Rules from PEAR Standard -->
|
<!-- Rules from PEAR Standard -->
|
||||||
|
|
||||||
@ -389,6 +398,7 @@
|
|||||||
|
|
||||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||||
|
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
|
||||||
|
|
||||||
<!-- This is not in PSR2 -->
|
<!-- This is not in PSR2 -->
|
||||||
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||||
|
|||||||
@ -220,11 +220,13 @@ class autoTranslator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($key == 'CHARSET') $val=$this->_outputpagecode;
|
if ($key == 'CHARSET') {
|
||||||
else if (preg_match('/^Format/', $key)) $val=$value;
|
$val=$this->_outputpagecode;
|
||||||
else if ($value=='-') $val=$value;
|
} elseif (preg_match('/^Format/', $key)) {
|
||||||
else
|
$val=$value;
|
||||||
{
|
} elseif ($value=='-') {
|
||||||
|
$val=$value;
|
||||||
|
} else {
|
||||||
// If not translated then translate
|
// If not translated then translate
|
||||||
if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
|
if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
|
||||||
else $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
|
else $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
|
||||||
|
|||||||
@ -531,12 +531,15 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
if ($fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||||
|
|
||||||
if ($valuetoshow != '')
|
if ($valuetoshow != '') {
|
||||||
{
|
|
||||||
print '<td align="'.$align.'">';
|
print '<td align="'.$align.'">';
|
||||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||||
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||||
else print $valuetoshow;
|
} elseif (! empty($tabhelp[$id][$value])) {
|
||||||
|
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||||
|
} else {
|
||||||
|
print $valuetoshow;
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
||||||
|
|||||||
@ -627,11 +627,17 @@ if ($id)
|
|||||||
|
|
||||||
// Can an entry be erased or disabled ?
|
// Can an entry be erased or disabled ?
|
||||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
||||||
if (isset($obj->code) && $id != 10)
|
if (isset($obj->code) && $id != 10) {
|
||||||
{
|
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) {
|
||||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
$iserasable = 0;
|
||||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
$canbedisabled = 0;
|
||||||
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
} elseif ($obj->code == 'RECEP') {
|
||||||
|
$iserasable = 0;
|
||||||
|
$canbedisabled = 0;
|
||||||
|
} elseif ($obj->code == 'EF0') {
|
||||||
|
$iserasable = 0;
|
||||||
|
$canbedisabled = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$canbemodified=$iserasable;
|
$canbemodified=$iserasable;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -212,7 +212,8 @@ if (empty($chartaccountcode))
|
|||||||
$sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,";
|
$sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,";
|
||||||
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
|
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
|
||||||
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
|
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
|
||||||
$sql.= " aa.rowid as aarowid,";
|
$sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,";
|
||||||
|
$sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,";
|
||||||
$sql.= " co.code as country_code, co.label as country,";
|
$sql.= " co.code as country_code, co.label as country,";
|
||||||
$sql.= " s.tva_intra";
|
$sql.= " s.tva_intra";
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
@ -437,6 +438,8 @@ if ($result) {
|
|||||||
$code_sell_p_notset = '';
|
$code_sell_p_notset = '';
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
$objp->aarowid_suggest = $objp->aarowid;
|
||||||
|
|
||||||
|
$isinEEC = isInEEC($objp->country_code);
|
||||||
|
|
||||||
if ($objp->type_l == 1) {
|
if ($objp->type_l == 1) {
|
||||||
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
||||||
if ($objp->aarowid == '') {
|
if ($objp->aarowid == '') {
|
||||||
@ -450,8 +453,19 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
if ($objp->code_sell_l == -1) $objp->code_sell_l='';
|
if ($objp->code_sell_l == -1) $objp->code_sell_l='';
|
||||||
|
|
||||||
|
if ($objp->country_sell == '1') {
|
||||||
|
$objp->code_sell_p = $objp->code_sell;
|
||||||
|
$objp->aarowid_suggest = $objp->aarowid;
|
||||||
|
} elseif ($isinEEC == true) {
|
||||||
|
$objp->code_sell_p = $objp->code_sell_intra;
|
||||||
|
$objp->aarowid_suggest = $objp->aarowid_intra;
|
||||||
|
} else {
|
||||||
|
$objp->code_sell_p = $objp->code_sell_export;
|
||||||
|
$objp->aarowid_suggest = $objp->aarowid_export;
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($objp->code_sell)) {
|
if (! empty($objp->code_sell)) {
|
||||||
$objp->code_sell_p = $objp->code_sell; // Code on product
|
//$objp->code_sell_p = $objp->code_sell; // Code on product
|
||||||
} else {
|
} else {
|
||||||
$code_sell_p_notset = 'color:orange';
|
$code_sell_p_notset = 'color:orange';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,18 +95,16 @@ if ($cancel) {
|
|||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
|
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage)) {
|
||||||
{
|
|
||||||
header("Location: ".$backtopage);
|
header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $user->rights->adherent->configurer)
|
if ($action == 'add' && $user->rights->adherent->configurer) {
|
||||||
{
|
|
||||||
$object->label = trim($label);
|
$object->label = trim($label);
|
||||||
$object->statut = trim($statut);
|
$object->statut = (int) $statut;
|
||||||
$object->subscription = (int) trim($subscription);
|
$object->subscription = (int) $subscription;
|
||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
$object->mail_valid = trim($mail_valid);
|
$object->mail_valid = trim($mail_valid);
|
||||||
$object->vote = (boolean) trim($vote);
|
$object->vote = (boolean) trim($vote);
|
||||||
@ -159,8 +157,8 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
|||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$object->label = trim($label);
|
$object->label = trim($label);
|
||||||
$object->statut = trim($statut);
|
$object->statut = (int) $statut;
|
||||||
$object->subscription = (int) trim($subscription);
|
$object->subscription = (int) $subscription;
|
||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
$object->mail_valid = trim($mail_valid);
|
$object->mail_valid = trim($mail_valid);
|
||||||
$object->vote = (boolean) trim($vote);
|
$object->vote = (boolean) trim($vote);
|
||||||
@ -266,8 +264,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
$membertype = new AdherentType($db);
|
$membertype = new AdherentType($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$membertype->id = $objp->rowid;
|
$membertype->id = $objp->rowid;
|
||||||
@ -283,8 +280,11 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
print '<td align="center">'.yn($objp->subscription).'</td>';
|
print '<td align="center">'.yn($objp->subscription).'</td>';
|
||||||
print '<td align="center">'.yn($objp->vote).'</td>';
|
print '<td align="center">'.yn($objp->vote).'</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ( !empty($objp->statut) ) print img_picto($langs->trans("InActivity"), 'statut4');
|
if ( !empty($objp->statut) ) {
|
||||||
else print img_picto($langs->trans("ActivityCeased"), 'statut5');
|
print img_picto($langs->trans("InActivity"), 'statut4');
|
||||||
|
} else {
|
||||||
|
print img_picto($langs->trans("ActivityCeased"), 'statut5');
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($user->rights->adherent->configurer)
|
if ($user->rights->adherent->configurer)
|
||||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||||
@ -350,8 +350,13 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
|
<<<<<<< HEAD
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
=======
|
||||||
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
>>>>>>> upstream/develop
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
print $object->showOptionals($extrafields, 'edit');
|
print $object->showOptionals($extrafields, 'edit');
|
||||||
@ -405,8 +410,16 @@ if ($rowid > 0)
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Status").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Status").'</td><td>';
|
||||||
|
<<<<<<< HEAD
|
||||||
if ( !empty($object->statut) ) print img_picto($langs->trans('TypeStatusActive'), 'statut4').' '.$langs->trans("InActivity");
|
if ( !empty($object->statut) ) print img_picto($langs->trans('TypeStatusActive'), 'statut4').' '.$langs->trans("InActivity");
|
||||||
else print img_picto($langs->trans('TypeStatusInactive'), 'statut5').' '.$langs->trans("ActivityCeased");
|
else print img_picto($langs->trans('TypeStatusInactive'), 'statut5').' '.$langs->trans("ActivityCeased");
|
||||||
|
=======
|
||||||
|
if ( !empty($object->statut) ) {
|
||||||
|
print img_picto($langs->trans('TypeStatusActive'),'statut4').' '.$langs->trans("InActivity");
|
||||||
|
} else {
|
||||||
|
print img_picto($langs->trans('TypeStatusInactive'),'statut5').' '.$langs->trans("ActivityCeased");
|
||||||
|
}
|
||||||
|
>>>>>>> upstream/develop
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
@ -749,8 +762,13 @@ if ($rowid > 0)
|
|||||||
print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut);
|
print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
print $form->selectyesno("subscription", $object->subscription, 1);
|
print $form->selectyesno("subscription", $object->subscription, 1);
|
||||||
|
=======
|
||||||
|
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
|
print $form->selectyesno("subscription",$object->subscription,1);
|
||||||
|
>>>>>>> upstream/develop
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||||
|
|||||||
@ -192,10 +192,8 @@ else if ($action == 'set_ORDER_FREE_TEXT')
|
|||||||
{
|
{
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action=="setshippableiconinlist") {
|
||||||
|
|
||||||
// Activate Set Shippable Icon In List
|
// Activate Set Shippable Icon In List
|
||||||
else if ($action=="setshippableiconinlist") {
|
|
||||||
$setshippableiconinlist = GETPOST('value', 'int');
|
$setshippableiconinlist = GETPOST('value', 'int');
|
||||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|||||||
@ -136,9 +136,7 @@ if ( ($action == 'update' && ! GETPOST("cancel", 'alpha'))
|
|||||||
else dol_syslog($imgThumbMini);
|
else dol_syslog($imgThumbMini);
|
||||||
}
|
}
|
||||||
else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING);
|
else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING);
|
||||||
}
|
} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
|
||||||
else if (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result))
|
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$tmparray=explode(':', $result);
|
$tmparray=explode(':', $result);
|
||||||
|
|||||||
@ -1436,8 +1436,7 @@ if ($id)
|
|||||||
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
||||||
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
} elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i', $fieldlist[$field])) {
|
||||||
else if ($fieldlist[$field]=='price' || preg_match('/^amount/i', $fieldlist[$field])) {
|
|
||||||
$valuetoshow=price($valuetoshow);
|
$valuetoshow=price($valuetoshow);
|
||||||
}
|
}
|
||||||
if ($value == 'private')
|
if ($value == 'private')
|
||||||
@ -1558,9 +1557,7 @@ if ($id)
|
|||||||
elseif ($fieldlist[$field]=='taux') {
|
elseif ($fieldlist[$field]=='taux') {
|
||||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
} elseif (in_array($fieldlist[$field], array('recuperableonly'))) {
|
||||||
else if (in_array($fieldlist[$field], array('recuperableonly')))
|
|
||||||
{
|
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
||||||
@ -1600,7 +1597,10 @@ if ($id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Can an entry be erased or disabled ?
|
// Can an entry be erased or disabled ?
|
||||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
// all true by default
|
||||||
|
$iserasable=1;
|
||||||
|
$canbedisabled=1;
|
||||||
|
$canbemodified=1;
|
||||||
if (isset($obj->code) && $id != 10)
|
if (isset($obj->code) && $id != 10)
|
||||||
{
|
{
|
||||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||||
|
|||||||
@ -142,6 +142,12 @@ if ($action=='install')
|
|||||||
setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules", $original_file, 'module_*-x.y*.zip'), null, 'errors');
|
setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules", $original_file, 'module_*-x.y*.zip'), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
if (empty($_FILES['fileinstall']['tmp_name']))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -152,7 +158,7 @@ if ($action=='install')
|
|||||||
dol_mkdir($conf->admin->dir_temp.'/'.$original_file);
|
dol_mkdir($conf->admin->dir_temp.'/'.$original_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmpdir=preg_replace('/\.zip$/', '', $original_file).'.dir';
|
$tmpdir=preg_replace('/\.zip$/i', '', $original_file).'.dir';
|
||||||
if ($tmpdir)
|
if ($tmpdir)
|
||||||
{
|
{
|
||||||
@dol_delete_dir_recursive($conf->admin->dir_temp.'/'.$tmpdir);
|
@dol_delete_dir_recursive($conf->admin->dir_temp.'/'.$tmpdir);
|
||||||
@ -207,6 +213,7 @@ if ($action=='install')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
setEventMessages($langs->trans("ErrorFailToRenameFile", $_FILES['fileinstall']['tmp_name'], $newfile), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1012,6 +1019,7 @@ if ($mode == 'deploy')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="install">';
|
print '<input type="hidden" name="action" value="install">';
|
||||||
print '<input type="hidden" name="mode" value="deploy">';
|
print '<input type="hidden" name="mode" value="deploy">';
|
||||||
|
|
||||||
@ -1047,6 +1055,20 @@ if ($mode == 'deploy')
|
|||||||
|
|
||||||
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
||||||
|
|
||||||
|
if (! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
|
{
|
||||||
|
if ($user->admin)
|
||||||
|
{
|
||||||
|
$langs->load('other');
|
||||||
|
print ' ';
|
||||||
|
print info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print ' ('.$langs->trans("UploadDisabled").')';
|
||||||
|
}
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -96,9 +96,7 @@ if ($action == "set")
|
|||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
} else
|
} elseif (! $error)
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
|||||||
@ -55,10 +55,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
} elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||||
|
|
||||||
else if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
|
|
||||||
{
|
|
||||||
$code=$reg[1];
|
$code=$reg[1];
|
||||||
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -104,9 +104,7 @@ if ($action === 'downloadblockchain') {
|
|||||||
echo $bc;
|
echo $bc;
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
} elseif (GETPOST('downloadcsv', 'alpha')) {
|
||||||
else if (GETPOST('downloadcsv', 'alpha'))
|
|
||||||
{
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$previoushash='';
|
$previoushash='';
|
||||||
|
|||||||
@ -1428,9 +1428,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
elseif ($event->type_code == 'ICALEVENT')
|
elseif ($event->type_code == 'ICALEVENT')
|
||||||
{
|
{
|
||||||
$cssclass.= " unmovable";
|
$cssclass.= " unmovable";
|
||||||
}
|
} elseif ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar)) {
|
||||||
else if ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar))
|
|
||||||
{
|
|
||||||
$tmpyearend = date('Y', $event->date_end_in_calendar);
|
$tmpyearend = date('Y', $event->date_end_in_calendar);
|
||||||
$tmpmonthend = date('m', $event->date_end_in_calendar);
|
$tmpmonthend = date('m', $event->date_end_in_calendar);
|
||||||
$tmpdayend = date('d', $event->date_end_in_calendar);
|
$tmpdayend = date('d', $event->date_end_in_calendar);
|
||||||
|
|||||||
@ -527,11 +527,11 @@ if (empty($reshook))
|
|||||||
if ($action == 'settitre') $object->titre = trim(GETPOST('titre', 'alpha'));
|
if ($action == 'settitre') $object->titre = trim(GETPOST('titre', 'alpha'));
|
||||||
elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from', 'alpha'));
|
elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from', 'alpha'));
|
||||||
elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto', 'alpha'));
|
elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto', 'alpha'));
|
||||||
else if ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto', 'alpha'));
|
elseif ($action == 'setemail_errorsto') {
|
||||||
else if ($action == 'settitre' && empty($object->titre)) {
|
$object->email_errorsto = trim(GETPOST('email_errorsto', 'alpha'));
|
||||||
|
} elseif ($action == 'settitre' && empty($object->titre)) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle"));
|
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle"));
|
||||||
}
|
} elseif ($action == 'setfrom' && empty($object->email_from)) {
|
||||||
else if ($action == 'setfrom' && empty($object->email_from)) {
|
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom"));
|
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -641,8 +641,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Close proposal
|
// Close proposal
|
||||||
else if ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel', 'alpha'))
|
elseif ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel', 'alpha')) {
|
||||||
{
|
|
||||||
if (! (GETPOST('statut', 'int') > 0)) {
|
if (! (GETPOST('statut', 'int') > 0)) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
||||||
$action = 'statut';
|
$action = 'statut';
|
||||||
@ -672,8 +671,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reopen proposal
|
// Reopen proposal
|
||||||
else if ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel', 'alpha'))
|
elseif ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel', 'alpha')) {
|
||||||
{
|
|
||||||
// prevent browser refresh from reopening proposal several times
|
// prevent browser refresh from reopening proposal several times
|
||||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
||||||
{
|
{
|
||||||
@ -1318,16 +1316,13 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) {
|
||||||
|
|
||||||
else if ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha'))
|
|
||||||
{
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set project
|
|
||||||
elseif ($action == 'classin' && $usercancreate) {
|
elseif ($action == 'classin' && $usercancreate) {
|
||||||
|
// Set project
|
||||||
$object->setProject(GETPOST('projectid', 'int'));
|
$object->setProject(GETPOST('projectid', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1132,9 +1132,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
||||||
|
|
||||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -733,20 +733,31 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
// If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT
|
// If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT
|
||||||
|
|
||||||
|
// Total payments
|
||||||
$sql = 'SELECT SUM(pf.amount) as total_paiements';
|
$sql = 'SELECT SUM(pf.amount) as total_paiements';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id';
|
||||||
$sql.= ' WHERE pf.fk_facture = '.$object->id;
|
$sql.= ' WHERE pf.fk_facture = '.$object->id;
|
||||||
$sql.= ' AND pf.fk_paiement = p.rowid';
|
$sql.= ' AND pf.fk_paiement = p.rowid';
|
||||||
$sql.= ' AND p.entity IN ('.getEntity('invoice').')';
|
$sql.= ' AND p.entity IN ('.getEntity('invoice').')';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql) dol_print_error($db);
|
if (! $resql) dol_print_error($db);
|
||||||
|
|
||||||
$res = $db->fetch_object($resql);
|
$res = $db->fetch_object($resql);
|
||||||
$total_paiements = $res->total_paiements;
|
$total_paiements = $res->total_paiements;
|
||||||
|
|
||||||
$discount->amount_ht = $discount->amount_ttc = $total_paiements - $object->total_ttc;
|
// Total credit note and deposit
|
||||||
|
$total_creditnote_and_deposit = 0;
|
||||||
|
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
|
||||||
|
$sql .= " re.description, re.fk_facture_source";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re";
|
||||||
|
$sql .= " WHERE fk_facture = " . $object->id;
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if (!empty($resql)) {
|
||||||
|
while ($obj = $db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc;
|
||||||
|
} else dol_print_error($db);
|
||||||
|
|
||||||
|
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
||||||
$discount->amount_tva = 0;
|
$discount->amount_tva = 0;
|
||||||
$discount->tva_tx = 0;
|
$discount->tva_tx = 0;
|
||||||
|
|
||||||
|
|||||||
@ -653,8 +653,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel', 'alpha'))
|
elseif ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel', 'alpha')) {
|
||||||
{
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update)
|
if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update)
|
||||||
|
|||||||
@ -58,7 +58,8 @@ if ($action == 'builddoc' && $permissioncreate)
|
|||||||
// Special case to force bank account
|
// Special case to force bank account
|
||||||
//if (property_exists($object, 'fk_bank'))
|
//if (property_exists($object, 'fk_bank'))
|
||||||
//{
|
//{
|
||||||
if (GETPOST('fk_bank', 'int')) { // this field may come from an external module
|
if (GETPOST('fk_bank', 'int')) {
|
||||||
|
// this field may come from an external module
|
||||||
$object->fk_bank = GETPOST('fk_bank', 'int');
|
$object->fk_bank = GETPOST('fk_bank', 'int');
|
||||||
} elseif (! empty($object->fk_account)) {
|
} elseif (! empty($object->fk_account)) {
|
||||||
$object->fk_bank = $object->fk_account;
|
$object->fk_bank = $object->fk_account;
|
||||||
|
|||||||
@ -59,10 +59,8 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel
|
|||||||
if ($result < 0) dol_print_error($db, $result);
|
if ($result < 0) dol_print_error($db, $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel', 'alpha')) {
|
||||||
// Set public note
|
// Set public note
|
||||||
else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel', 'alpha'))
|
|
||||||
{
|
|
||||||
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||||
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private', 'none'), ENT_QUOTES), '_private');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private', 'none'), ENT_QUOTES), '_private');
|
||||||
|
|||||||
@ -2020,14 +2020,22 @@ class ExtraFields
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
$value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]);
|
$value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]);
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
else if (in_array($key_type, array('checkbox', 'chkbxlst')))
|
else if (in_array($key_type, array('checkbox', 'chkbxlst')))
|
||||||
|
=======
|
||||||
|
elseif (in_array($key_type,array('checkbox', 'chkbxlst')))
|
||||||
|
>>>>>>> upstream/develop
|
||||||
{
|
{
|
||||||
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
||||||
// Make sure we get an array even if there's only one checkbox
|
// Make sure we get an array even if there's only one checkbox
|
||||||
$value_arr=(array) $value_arr;
|
$value_arr=(array) $value_arr;
|
||||||
$value_key=implode(',', $value_arr);
|
$value_key=implode(',', $value_arr);
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
else if (in_array($key_type, array('price','double')))
|
else if (in_array($key_type, array('price','double')))
|
||||||
|
=======
|
||||||
|
elseif (in_array($key_type,array('price','double')))
|
||||||
|
>>>>>>> upstream/develop
|
||||||
{
|
{
|
||||||
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
||||||
$value_key=price2num($value_arr);
|
$value_key=price2num($value_arr);
|
||||||
|
|||||||
@ -634,8 +634,9 @@ class Menubase
|
|||||||
$tab_titre = explode("/", $menu['titre']);
|
$tab_titre = explode("/", $menu['titre']);
|
||||||
$title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]);
|
$title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]);
|
||||||
}
|
}
|
||||||
else if (preg_match('/\|\|/', $menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle)
|
elseif (preg_match('/\|\|/', $menu['titre']))
|
||||||
{
|
{
|
||||||
|
// To manage different translation (Title||AltTitle@ConditionForAltTitle)
|
||||||
$tab_title = explode("||", $menu['titre']);
|
$tab_title = explode("||", $menu['titre']);
|
||||||
$alt_title = explode("@", $tab_title[1]);
|
$alt_title = explode("@", $tab_title[1]);
|
||||||
$title_enabled = verifCond($alt_title[1]);
|
$title_enabled = verifCond($alt_title[1]);
|
||||||
|
|||||||
@ -833,7 +833,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200);
|
$newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200);
|
||||||
$newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201);
|
$newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201);
|
||||||
$newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202);
|
$newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202);
|
||||||
$newmenu->add("/fichinter/card-red.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203);
|
$newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203);
|
||||||
$newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire);
|
$newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.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
|
||||||
@ -44,7 +44,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active generation models
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
@ -56,12 +56,12 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$type='shipping';
|
$type='shipping';
|
||||||
$liste=array();
|
$list=array();
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
$liste=getListOfModels($db, $type, $maxfilenamelength);
|
$list = getListOfModels($db, $type, $maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ abstract class ModelNumRefExpedition
|
|||||||
/**
|
/**
|
||||||
* Test if existing numbers make problems with numbering
|
* Test if existing numbers make problems with numbering
|
||||||
*
|
*
|
||||||
* @return boolean false if conflit, true if ok
|
* @return boolean false if conflict, true if ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
function canBeActivated()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/core/modules/expensereport/mod_expensereport_jade.php
|
* \file htdocs/core/modules/expensereport/mod_expensereport_jade.php
|
||||||
* \ingroup expensereport
|
* \ingroup expensereport
|
||||||
* \brief File of class to manage customer order numbering rules Jade
|
* \brief File of class to manage expensereport numbering rules Jade
|
||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expensereport.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expensereport.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage customer order numbering rules Jade
|
* Class to manage expensereport numbering rules Jade
|
||||||
*/
|
*/
|
||||||
class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return description of numbering module
|
* Return description of numbering model
|
||||||
*
|
*
|
||||||
* @return string Text with description
|
* @return string Text with description
|
||||||
*/
|
*/
|
||||||
@ -67,7 +67,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi un exemple de numerotation
|
* Returns an example of numbering
|
||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
@ -78,8 +78,8 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
|
* Test whether the numbers already in force in the base do not cause conflicts
|
||||||
* de conflits qui empechera cette numerotation de fonctionner.
|
* that would prevent this numbering from working.
|
||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false si conflit, true si ok
|
||||||
*/
|
*/
|
||||||
@ -174,7 +174,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
return $newref;
|
return $newref;
|
||||||
}
|
}
|
||||||
|
|
||||||
// D'abord on recupere la valeur max
|
// First we get the max value
|
||||||
$posindice=8;
|
$posindice=8;
|
||||||
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
|
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport";
|
||||||
|
|||||||
@ -31,7 +31,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active models generation
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
@ -43,12 +43,12 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$type='expensereport';
|
$type='expensereport';
|
||||||
$liste=array();
|
$list=array();
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
$liste=getListOfModels($db, $type, $maxfilenamelength);
|
$list = getListOfModels($db, $type, $maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
|||||||
* expensereport_pdf_create
|
* expensereport_pdf_create
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param ExpenseReport $object Object order
|
* @param ExpenseReport $object Object ExpenseReport
|
||||||
* @param string $message Message
|
* @param string $message Message
|
||||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
* @param string $modele Force the model to use ('' to not force)
|
||||||
* @param Translate $outputlangs objet lang a utiliser pour traduction
|
* @param Translate $outputlangs lang object to use for translation
|
||||||
* @param int $hidedetails Hide details of lines
|
* @param int $hidedetails Hide details of lines
|
||||||
* @param int $hidedesc Hide description
|
* @param int $hidedesc Hide description
|
||||||
* @param int $hideref Hide ref
|
* @param int $hideref Hide ref
|
||||||
@ -85,9 +85,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a module can be used or not
|
* Return if a model can be used or not
|
||||||
*
|
*
|
||||||
* @return boolean true if module can be used
|
* @return boolean true if model can be used
|
||||||
*/
|
*/
|
||||||
function isEnabled()
|
function isEnabled()
|
||||||
{
|
{
|
||||||
@ -95,9 +95,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie la description par defaut du modele de numerotation
|
* Returns the default description of the numbering model
|
||||||
*
|
*
|
||||||
* @return string Texte descripif
|
* @return string Descriptive text
|
||||||
*/
|
*/
|
||||||
function info()
|
function info()
|
||||||
{
|
{
|
||||||
@ -107,7 +107,7 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie un exemple de numerotation
|
* Returns an example of numbering
|
||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
@ -119,9 +119,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner.
|
* Test whether the numbers already in force in the base do not cause conflicts that would prevent this numbering from working.
|
||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false if conflict, true if ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
function canBeActivated()
|
||||||
{
|
{
|
||||||
@ -129,10 +129,10 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie prochaine valeur attribuee
|
* Returns next assigned value
|
||||||
*
|
*
|
||||||
* @param Object $object Object we need next value for
|
* @param Object $object Object we need next value for
|
||||||
* @return string Valeur
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getNextValue($object)
|
function getNextValue($object)
|
||||||
{
|
{
|
||||||
@ -141,9 +141,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie version du module numerotation
|
* Returns the version of the numbering module
|
||||||
*
|
*
|
||||||
* @return string Valeur
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
function getVersion()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -577,8 +577,7 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If test is just a static regex
|
// If test is just a static regex
|
||||||
else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval))
|
elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) {
|
||||||
{
|
|
||||||
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
||||||
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
||||||
$this->errors[$error]['type']='REGEX';
|
$this->errors[$error]['type']='REGEX';
|
||||||
|
|||||||
@ -602,10 +602,8 @@ class ImportXlsx extends ModeleImports
|
|||||||
$errorforthistable++;
|
$errorforthistable++;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
} elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) {
|
||||||
// If test is just a static regex
|
// If test is just a static regex
|
||||||
else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval))
|
|
||||||
{
|
|
||||||
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
||||||
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
||||||
$this->errors[$error]['type']='REGEX';
|
$this->errors[$error]['type']='REGEX';
|
||||||
|
|||||||
@ -208,7 +208,7 @@ if ($permission) {
|
|||||||
if ($tab[$i]['source']=='external')
|
if ($tab[$i]['source']=='external')
|
||||||
{
|
{
|
||||||
$contactstatic->fetch($tab[$i]['id']);
|
$contactstatic->fetch($tab[$i]['id']);
|
||||||
echo $contactstatic->getNomUrl(1, '', 0, 0, 0, 0, '', 'valignmiddle');
|
echo $contactstatic->getNomUrl(1, '', 0, '', 0, 0, '', 'valignmiddle');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 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
|
||||||
@ -154,6 +154,7 @@ if ($action == 'add')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
$object->fk_soc = GETPOST("fk_soc", 'int');
|
||||||
$object->firstname = GETPOST("firstname", 'alpha');
|
$object->firstname = GETPOST("firstname", 'alpha');
|
||||||
$object->lastname = GETPOST("lastname", 'alpha');
|
$object->lastname = GETPOST("lastname", 'alpha');
|
||||||
$object->societe = GETPOST("societe", 'alpha');
|
$object->societe = GETPOST("societe", 'alpha');
|
||||||
@ -162,7 +163,7 @@ if ($action == 'add')
|
|||||||
$object->zip = GETPOST("zipcode", 'alpha');
|
$object->zip = GETPOST("zipcode", 'alpha');
|
||||||
$object->town = GETPOST("town", 'alpha');
|
$object->town = GETPOST("town", 'alpha');
|
||||||
$object->country_id = GETPOST('country_id', 'int');
|
$object->country_id = GETPOST('country_id', 'int');
|
||||||
$object->email = GETPOST("email", 'alpha');
|
$object->email = GETPOST('email', 'alpha');
|
||||||
$object->date = $donation_date;
|
$object->date = $donation_date;
|
||||||
$object->note_private = GETPOST("note_private", 'none');
|
$object->note_private = GETPOST("note_private", 'none');
|
||||||
$object->note_public = GETPOST("note_public", 'none');
|
$object->note_public = GETPOST("note_public", 'none');
|
||||||
@ -516,7 +517,7 @@ if (! empty($id) && $action == 'edit')
|
|||||||
// Amount
|
// Amount
|
||||||
if ($object->statut == 0)
|
if ($object->statut == 0)
|
||||||
{
|
{
|
||||||
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.dol_escape_htmltag($object->amount).'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.price($object->amount).'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -530,6 +531,14 @@ if (! empty($id) && $action == 'edit')
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) {
|
||||||
|
|
||||||
|
$company=new Societe($db);
|
||||||
|
$result=$company->fetch($object->fk_soc);
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>';
|
||||||
|
} else {
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="maxwidth200" value="'.dol_escape_htmltag($object->societe).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="maxwidth200" value="'.dol_escape_htmltag($object->societe).'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="maxwidth200" value="'.dol_escape_htmltag($object->lastname).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="maxwidth200" value="'.dol_escape_htmltag($object->lastname).'"></td></tr>';
|
||||||
@ -551,7 +560,7 @@ if (! empty($id) && $action == 'edit')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" class="maxwidth200" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" class="maxwidth200" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
|
||||||
|
}
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||||
if ($object->modepaymentid) $selected = $object->modepaymentid;
|
if ($object->modepaymentid) $selected = $object->modepaymentid;
|
||||||
@ -684,9 +693,18 @@ if (! empty($id) && $action != 'edit')
|
|||||||
print yn($object->public);
|
print yn($object->public);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if ($object->fk_soc) {
|
||||||
|
|
||||||
|
$company=new Societe($db);
|
||||||
|
$result=$company->fetch($object->fk_soc);
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>';
|
||||||
|
} else {
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2">'.$object->societe.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2">'.$object->societe.'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td colspan="2">'.$object->lastname.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Lastname").'</td><td colspan="2">'.$object->lastname.'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="2">'.$object->firstname.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="2">'.$object->firstname.'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -366,6 +367,7 @@ class Don extends CommonObject
|
|||||||
$sql.= ", entity";
|
$sql.= ", entity";
|
||||||
$sql.= ", amount";
|
$sql.= ", amount";
|
||||||
$sql.= ", fk_payment";
|
$sql.= ", fk_payment";
|
||||||
|
$sql.= ", fk_soc";
|
||||||
$sql.= ", firstname";
|
$sql.= ", firstname";
|
||||||
$sql.= ", lastname";
|
$sql.= ", lastname";
|
||||||
$sql.= ", societe";
|
$sql.= ", societe";
|
||||||
@ -388,6 +390,7 @@ class Don extends CommonObject
|
|||||||
$sql.= ", ".$conf->entity;
|
$sql.= ", ".$conf->entity;
|
||||||
$sql.= ", ".price2num($this->amount);
|
$sql.= ", ".price2num($this->amount);
|
||||||
$sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null");
|
$sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null");
|
||||||
|
$sql.= ", '".$this->db->escape($this->fk_soc)."'";
|
||||||
$sql.= ", '".$this->db->escape($this->firstname)."'";
|
$sql.= ", '".$this->db->escape($this->firstname)."'";
|
||||||
$sql.= ", '".$this->db->escape($this->lastname)."'";
|
$sql.= ", '".$this->db->escape($this->lastname)."'";
|
||||||
$sql.= ", '".$this->db->escape($this->societe)."'";
|
$sql.= ", '".$this->db->escape($this->societe)."'";
|
||||||
@ -489,7 +492,7 @@ class Don extends CommonObject
|
|||||||
$sql .= ",address='".$this->db->escape($this->address)."'";
|
$sql .= ",address='".$this->db->escape($this->address)."'";
|
||||||
$sql .= ",zip='".$this->db->escape($this->zip)."'";
|
$sql .= ",zip='".$this->db->escape($this->zip)."'";
|
||||||
$sql .= ",town='".$this->db->escape($this->town)."'";
|
$sql .= ",town='".$this->db->escape($this->town)."'";
|
||||||
$sql .= ",fk_country = ".$this->country_id;
|
$sql .= ",fk_country = ".($this->country_id > 0 ? $this->country_id : '0');
|
||||||
$sql .= ",public=".$this->public;
|
$sql .= ",public=".$this->public;
|
||||||
$sql .= ",fk_projet=".($this->fk_project>0?$this->fk_project:'null');
|
$sql .= ",fk_projet=".($this->fk_project>0?$this->fk_project:'null');
|
||||||
$sql .= ",note_private=".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
|
$sql .= ",note_private=".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
|
||||||
@ -636,7 +639,7 @@ class Don extends CommonObject
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.datec, d.date_valid, d.tms as datem, d.datedon,";
|
$sql = "SELECT d.rowid, d.datec, d.date_valid, d.tms as datem, d.datedon,";
|
||||||
$sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, ";
|
$sql.= " d.fk_soc,d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, ";
|
||||||
$sql.= " d.fk_country, d.country as country_olddata, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, ";
|
$sql.= " d.fk_country, d.country as country_olddata, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, ";
|
||||||
$sql.= " d.phone_mobile, d.fk_projet as fk_project, d.model_pdf,";
|
$sql.= " d.phone_mobile, d.fk_projet as fk_project, d.model_pdf,";
|
||||||
$sql.= " p.ref as project_ref,";
|
$sql.= " p.ref as project_ref,";
|
||||||
@ -670,6 +673,7 @@ class Don extends CommonObject
|
|||||||
$this->date_valid = $this->db->jdate($obj->date_valid);
|
$this->date_valid = $this->db->jdate($obj->date_valid);
|
||||||
$this->datem = $this->db->jdate($obj->datem);
|
$this->datem = $this->db->jdate($obj->datem);
|
||||||
$this->date = $this->db->jdate($obj->datedon);
|
$this->date = $this->db->jdate($obj->datedon);
|
||||||
|
$this->fk_soc = $obj->fk_soc;
|
||||||
$this->firstname = $obj->firstname;
|
$this->firstname = $obj->firstname;
|
||||||
$this->lastname = $obj->lastname;
|
$this->lastname = $obj->lastname;
|
||||||
$this->societe = $obj->societe;
|
$this->societe = $obj->societe;
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -85,7 +86,7 @@ llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES
|
|||||||
$donationstatic=new Don($db);
|
$donationstatic=new Don($db);
|
||||||
|
|
||||||
// Genere requete de liste des dons
|
// Genere requete de liste des dons
|
||||||
$sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,";
|
$sql = "SELECT d.rowid, d.datedon, d.fk_soc, d.firstname, d.lastname, d.societe,";
|
||||||
$sql.= " d.amount, d.fk_statut as statut, ";
|
$sql.= " d.amount, d.fk_statut as statut, ";
|
||||||
$sql.= " p.rowid as pid, p.ref, p.title, p.public";
|
$sql.= " p.rowid as pid, p.ref, p.title, p.public";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
|
||||||
|
|||||||
@ -117,9 +117,8 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if ($resupload < 0) // Unknown error
|
if ($resupload < 0) // Unknown error
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
||||||
}
|
} elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) {
|
||||||
else if (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) // Files infected by a virus
|
// Files infected by a virus
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
||||||
}
|
}
|
||||||
else // Known error
|
else // Known error
|
||||||
|
|||||||
@ -842,9 +842,7 @@ if (empty($reshook))
|
|||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
||||||
|
|
||||||
else if ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -594,8 +594,7 @@ if (empty($reshook))
|
|||||||
/*
|
/*
|
||||||
* Mise a jour d'une ligne d'intervention
|
* Mise a jour d'une ligne d'intervention
|
||||||
*/
|
*/
|
||||||
else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save', 'alpha') == $langs->trans("Save"))
|
elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save', 'alpha') == $langs->trans("Save")) {
|
||||||
{
|
|
||||||
$objectline = new FichinterLigne($db);
|
$objectline = new FichinterLigne($db);
|
||||||
if ($objectline->fetch($lineid) <= 0)
|
if ($objectline->fetch($lineid) <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -333,7 +333,7 @@ class ProductFournisseur extends Product
|
|||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
|
if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
|
||||||
$result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrenc, $multicurrency_code);
|
$result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrency, $multicurrency_code);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1239,9 +1239,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors');
|
setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors');
|
||||||
} elseif (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) {
|
} elseif (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) {
|
||||||
setEventMessages($langs->trans("ErrorFieldsRequired"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldsRequired"), null, 'errors');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//Create SOAP client and connect it to order
|
//Create SOAP client and connect it to order
|
||||||
$soapclient_order = new nusoap_client($ws_url."/webservices/server_order.php");
|
$soapclient_order = new nusoap_client($ws_url."/webservices/server_order.php");
|
||||||
$soapclient_order->soap_defencoding='UTF-8';
|
$soapclient_order->soap_defencoding='UTF-8';
|
||||||
|
|||||||
@ -770,8 +770,7 @@ if (empty($action))
|
|||||||
if (!$user->rights->societe->client->voir) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid;
|
if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid;
|
||||||
// Search criteria
|
// Search criteria
|
||||||
if ($month > 0)
|
if ($month > 0) {
|
||||||
{
|
|
||||||
if ($year > 0 && empty($day))
|
if ($year > 0 && empty($day))
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year, $month, false))."' AND '".$db->idate(dol_get_last_day($year, $month, false))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year, $month, false))."' AND '".$db->idate(dol_get_last_day($year, $month, false))."'";
|
||||||
elseif ($year > 0 && ! empty($day))
|
elseif ($year > 0 && ! empty($day))
|
||||||
|
|||||||
@ -106,9 +106,8 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if ($resupload < 0) // Unknown error
|
if ($resupload < 0) // Unknown error
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
||||||
}
|
} elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) {
|
||||||
else if (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) // Files infected by a virus
|
// Files infected by a virus
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
||||||
}
|
}
|
||||||
else // Known error
|
else // Known error
|
||||||
|
|||||||
@ -90,3 +90,7 @@ ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type);
|
|||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer;
|
ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_don ADD COLUMN fk_soc integer NULL;
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ create table llx_don
|
|||||||
amount double(24,8) DEFAULT 0,
|
amount double(24,8) DEFAULT 0,
|
||||||
fk_payment integer, -- Id of payment mode
|
fk_payment integer, -- Id of payment mode
|
||||||
paid smallint default 0 NOT NULL,
|
paid smallint default 0 NOT NULL,
|
||||||
|
fk_soc integer NULL,
|
||||||
firstname varchar(50),
|
firstname varchar(50),
|
||||||
lastname varchar(50),
|
lastname varchar(50),
|
||||||
societe varchar(50),
|
societe varchar(50),
|
||||||
|
|||||||
@ -53,3 +53,4 @@ NbOfInvoices=Nb of invoices
|
|||||||
Paymentnumpad=Payment Num Pad
|
Paymentnumpad=Payment Num Pad
|
||||||
Numberspad=Numbers Pad
|
Numberspad=Numbers Pad
|
||||||
BillsCoinsPad=Bills and Coins Pad
|
BillsCoinsPad=Bills and Coins Pad
|
||||||
|
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||||
@ -133,8 +133,7 @@ unset($conf->db->pass); // This is to avoid password to be shown in memory/sw
|
|||||||
/*
|
/*
|
||||||
* Object $user
|
* Object $user
|
||||||
*/
|
*/
|
||||||
if (! defined('NOREQUIREUSER'))
|
if (! defined('NOREQUIREUSER')) {
|
||||||
{
|
|
||||||
$user = new User($db);
|
$user = new User($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
@ -1179,8 +1179,6 @@ else
|
|||||||
print $formaccounting->select_account(GETPOST('accountancy_code_sell'), 'accountancy_code_sell', 1, null, 1, 1, '');
|
print $formaccounting->select_account(GETPOST('accountancy_code_sell'), 'accountancy_code_sell', 1, null, 1, 1, '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL)
|
|
||||||
{
|
|
||||||
// Accountancy_code_sell_intra
|
// Accountancy_code_sell_intra
|
||||||
if ($mysoc->isInEEC())
|
if ($mysoc->isInEEC())
|
||||||
{
|
{
|
||||||
@ -1195,7 +1193,6 @@ else
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account(GETPOST('accountancy_code_sell_export'), 'accountancy_code_sell_export', 1, null, 1, 1, '');
|
print $formaccounting->select_account(GETPOST('accountancy_code_sell_export'), 'accountancy_code_sell_export', 1, null, 1, 1, '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
|
||||||
|
|
||||||
// Accountancy_code_buy
|
// Accountancy_code_buy
|
||||||
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
|
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
|
||||||
|
|||||||
@ -78,12 +78,12 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
|
|||||||
|
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||||
{
|
{
|
||||||
$permissiontoadd = $user->rights->stock->write;
|
$permissiontoadd = $user->rights->stock->creer;
|
||||||
$permissiontodelete = $user->rights->stock->write;
|
$permissiontodelete = $user->rights->stock->supprimer;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$permissiontoadd = $user->rights->stock->inventory_advance->create;
|
$permissiontoadd = $user->rights->stock->inventory_advance->write;
|
||||||
$permissiontodelete = $user->rights->stock->inventory_advance->write;
|
$permissiontodelete = $user->rights->stock->inventory_advance->write;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -969,9 +969,9 @@ foreach ($listofreferent as $key => $value)
|
|||||||
|
|
||||||
// Third party or user
|
// Third party or user
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
if (is_object($element->thirdparty)) print $element->thirdparty->getNomUrl(1, '', 48);
|
if (is_object($element->thirdparty)) {
|
||||||
else if ($tablename == 'expensereport_det')
|
print $element->thirdparty->getNomUrl(1, '', 48);
|
||||||
{
|
} elseif ($tablename == 'expensereport_det') {
|
||||||
$tmpuser=new User($db);
|
$tmpuser=new User($db);
|
||||||
$tmpuser->fetch($expensereport->fk_user_author);
|
$tmpuser->fetch($expensereport->fk_user_author);
|
||||||
print $tmpuser->getNomUrl(1, '', 48);
|
print $tmpuser->getNomUrl(1, '', 48);
|
||||||
|
|||||||
@ -687,9 +687,7 @@ if (empty($reshook))
|
|||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
||||||
|
|
||||||
else if ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -273,14 +273,14 @@ print '<br><br>';
|
|||||||
// Marketplace
|
// Marketplace
|
||||||
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print '<td colspan="2">TakePOS Marketplace</td>';
|
print '<td colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
|
||||||
print '<td>'.$langs->trans("URL").'</td>';
|
print '<td>'.$langs->trans("URL").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "<tr class=\"oddeven\">\n";
|
print "<tr class=\"oddeven\">\n";
|
||||||
$url='https://www.dolistore.com/en/modules/980-TakePOS-7-mobile.html';
|
$url='https://www.dolistore.com/45-pos';
|
||||||
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/marketplace/takeposmobile.jpg"></a></td>';
|
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
||||||
print '<td>TakePOS for mobile devices</td>';
|
print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
|
||||||
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,6 @@ html,body {
|
|||||||
padding:0;
|
padding:0;
|
||||||
margin:0;
|
margin:0;
|
||||||
height:100%;
|
height:100%;
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +87,7 @@ div.wrapper{
|
|||||||
div.wrapper2{
|
div.wrapper2{
|
||||||
float:left; /* important */
|
float:left; /* important */
|
||||||
position:relative; /* important(so we can absolutely position the description div */
|
position:relative; /* important(so we can absolutely position the description div */
|
||||||
width:10.2%;
|
width:10.9%;
|
||||||
height:23%;
|
height:23%;
|
||||||
margin-top:0.5%;
|
margin-top:0.5%;
|
||||||
margin-bottom:0.5%;
|
margin-bottom:0.5%;
|
||||||
@ -126,6 +123,68 @@ div.description{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container{
|
||||||
|
width: 98%;
|
||||||
|
height: 98%;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: visible;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row1{
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 34%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row2{
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 66%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div1{
|
||||||
|
height:100%;
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div2{
|
||||||
|
height: 100%;
|
||||||
|
width: 33%;
|
||||||
|
font-size: 0;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
padding-left: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div3{
|
||||||
|
height: 100%;
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div4{
|
||||||
|
height: 100%;
|
||||||
|
width: 34%;
|
||||||
|
float: left;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div5{
|
||||||
|
height: 100%;
|
||||||
|
width: 66%;
|
||||||
|
float: left;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
p.description_content{
|
p.description_content{
|
||||||
padding:10px;
|
padding:10px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB |
@ -125,8 +125,7 @@ if ($action == "deleteline") {
|
|||||||
$invoice->deleteline($idline);
|
$invoice->deleteline($idline);
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
}
|
}
|
||||||
else
|
elseif ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line
|
||||||
if ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line
|
|
||||||
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture='$placeid' order by rowid DESC";
|
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture='$placeid' order by rowid DESC";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$row = $db->fetch_array($resql);
|
$row = $db->fetch_array($resql);
|
||||||
@ -325,7 +324,7 @@ if ($placeid > 0) {
|
|||||||
if ($line->special_code == "3") { print ' order';
|
if ($line->special_code == "3") { print ' order';
|
||||||
}
|
}
|
||||||
print '" id="' . $line->rowid . '">';
|
print '" id="' . $line->rowid . '">';
|
||||||
print '<td>' . $line->product_label . $line->desc . '</td>';
|
print '<td align="left">' . $line->product_label . $line->desc . '</td>';
|
||||||
print '<td align="right">' . $line->qty . '</td>';
|
print '<td align="right">' . $line->qty . '</td>';
|
||||||
print '<td align="right">' . price($line->total_ttc) . '</td>';
|
print '<td align="right">' . price($line->total_ttc) . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -55,7 +55,7 @@ $head='<meta name="apple-mobile-web-app-title" content="TakePOS"/>
|
|||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" href="css/pos.css?a=xxx">
|
<link rel="stylesheet" href="css/pos.css">
|
||||||
<script type="text/javascript" src="js/takepos.js" ></script>
|
<script type="text/javascript" src="js/takepos.js" ></script>
|
||||||
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
|
||||||
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
|
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
|
||||||
@ -64,7 +64,7 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
|||||||
$categorie = new Categorie($db);
|
$categorie = new Categorie($db);
|
||||||
$categories = $categorie->get_full_arbo('product');
|
$categories = $categorie->get_full_arbo('product');
|
||||||
?>
|
?>
|
||||||
var categories = JSON.parse( '<?php echo json_encode($categories);?>' );
|
var categories = <?php echo json_encode($categories); ?>;
|
||||||
var currentcat;
|
var currentcat;
|
||||||
var pageproducts=0;
|
var pageproducts=0;
|
||||||
var pagecategories=0;
|
var pagecategories=0;
|
||||||
@ -353,10 +353,13 @@ $( document ).ready(function() {
|
|||||||
|
|
||||||
<body style="overflow: hidden; background-color:#E8E8E8;">
|
<body style="overflow: hidden; background-color:#E8E8E8;">
|
||||||
|
|
||||||
<div id="poslines" style="position:absolute; top:2%; left:0.5%; height:36%; width:31%; overflow: auto;">
|
<div class="container">
|
||||||
|
<div class="row1">
|
||||||
|
|
||||||
|
<div id="poslines" class="div1" style="overflow: auto;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position:absolute; top:1%; left:32.5%; height:37%; width:32.5%; font-size: 0;">
|
<div class="div2">
|
||||||
<button type="button" class="calcbutton" onclick="Edit(7);">7</button>
|
<button type="button" class="calcbutton" onclick="Edit(7);">7</button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit(8);">8</button>
|
<button type="button" class="calcbutton" onclick="Edit(8);">8</button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit(9);">9</button>
|
<button type="button" class="calcbutton" onclick="Edit(9);">9</button>
|
||||||
@ -420,7 +423,7 @@ if (!empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div style="position:absolute; top:1%; left:65.5%; height:37%; width:32.5%;">
|
<div class="div3">
|
||||||
<?php
|
<?php
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($menus as $menu) {
|
foreach($menus as $menu) {
|
||||||
@ -435,8 +438,9 @@ foreach($menus as $menu) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div style="position:absolute; top:39%; left:0.3%; height:59%; width:32%;">
|
<div class="row2">
|
||||||
|
<div class="div4">
|
||||||
<?php
|
<?php
|
||||||
$count=0;
|
$count=0;
|
||||||
while ($count<16)
|
while ($count<16)
|
||||||
@ -454,7 +458,7 @@ foreach($menus as $menu) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position:absolute; top:39%; left:32%; height:58%; width:72%;">
|
<div class="div5">
|
||||||
<?php
|
<?php
|
||||||
$count=0;
|
$count=0;
|
||||||
while ($count<32)
|
while ($count<32)
|
||||||
@ -471,7 +475,8 @@ while ($count<32)
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
use Luracast\Restler\RestException;
|
use Luracast\Restler\RestException;
|
||||||
|
|
||||||
//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API class for users
|
* API class for users
|
||||||
@ -218,10 +219,21 @@ class Users extends DolibarrApi
|
|||||||
foreach ($request_data as $field => $value)
|
foreach ($request_data as $field => $value)
|
||||||
{
|
{
|
||||||
if ($field == 'id') continue;
|
if ($field == 'id') continue;
|
||||||
|
// The status must be updated using setstatus() because it
|
||||||
|
// is not handled by the update() method.
|
||||||
|
if ($field == 'statut') {
|
||||||
|
$result = $this->useraccount->setstatus($value);
|
||||||
|
if ($result < 0) {
|
||||||
|
throw new RestException(500, 'Error when updating status of user: '.$this->useraccount->error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$this->useraccount->$field = $value;
|
$this->useraccount->$field = $value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->useraccount->update(DolibarrApiAccess::$user) > 0)
|
// If there is no error, update() returns the number of affected
|
||||||
|
// rows so if the update is a no op, the return value is zezo.
|
||||||
|
if ($this->useraccount->update(DolibarrApiAccess::$user) >= 0)
|
||||||
{
|
{
|
||||||
return $this->get($id);
|
return $this->get($id);
|
||||||
}
|
}
|
||||||
@ -231,6 +243,41 @@ class Users extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the groups of a user
|
||||||
|
*
|
||||||
|
* @param int $id Id of user
|
||||||
|
* @return array Array of group objects
|
||||||
|
*
|
||||||
|
* @throws RestException
|
||||||
|
*
|
||||||
|
* @url GET {id}/groups
|
||||||
|
*/
|
||||||
|
function getGroups($id)
|
||||||
|
{
|
||||||
|
$obj_ret = array();
|
||||||
|
|
||||||
|
if (! DolibarrApiAccess::$user->rights->user->user->lire) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = new User($this->db);
|
||||||
|
$result = $user->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'user not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
$usergroup = new UserGroup($this->db);
|
||||||
|
$groups = $usergroup->listGroupsForUser($id, false);
|
||||||
|
$obj_ret = array();
|
||||||
|
foreach ($groups as $group) {
|
||||||
|
$obj_ret[] = $this->_cleanObjectDatas($group);
|
||||||
|
}
|
||||||
|
return $obj_ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a user into a group
|
* Add a user into a group
|
||||||
*
|
*
|
||||||
|
|||||||
@ -472,15 +472,17 @@ else
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login');
|
print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login');
|
||||||
if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"), 'redstar');
|
if ($useringroup->admin && ! $useringroup->entity) {
|
||||||
else if ($useringroup->admin) print img_picto($langs->trans("Administrator"), 'star');
|
print img_picto($langs->trans("SuperAdministrator"), 'redstar');
|
||||||
|
} elseif ($useringroup->admin) {
|
||||||
|
print img_picto($langs->trans("Administrator"), 'star');
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$useringroup->lastname.'</td>';
|
print '<td>'.$useringroup->lastname.'</td>';
|
||||||
print '<td>'.$useringroup->firstname.'</td>';
|
print '<td>'.$useringroup->firstname.'</td>';
|
||||||
print '<td align="center">'.$useringroup->getLibStatut(3).'</td>';
|
print '<td align="center">'.$useringroup->getLibStatut(3).'</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (! empty($user->admin))
|
if (! empty($user->admin)) {
|
||||||
{
|
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=removeuser&user='.$useringroup->id.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=removeuser&user='.$useringroup->id.'">';
|
||||||
print img_picto($langs->trans("RemoveFromGroup"), 'unlink');
|
print img_picto($langs->trans("RemoveFromGroup"), 'unlink');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user