Merge develop

This commit is contained in:
Francis Appels 2019-02-01 11:47:03 +01:00
commit c4915c679a
1166 changed files with 8188 additions and 7228 deletions

View File

@ -21,9 +21,9 @@ Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry.mail@gmail.
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro>
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro>
Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> aspangaro <aspangaro.dolibarr@gmail.com>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Spangaro Alexandre <aspangaro.dolibarr@gmail.com>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Alexandre SPANGARO <aspangaro.dolibarr@gmail.com>
Alexandre Spangaro <aspangaro@open-dsi.fr> aspangaro <aspangaro@open-dsi.fr>
Alexandre Spangaro <aspangaro@open-dsi.fr> Spangaro Alexandre <aspangaro@open-dsi.fr>
Alexandre Spangaro <aspangaro@open-dsi.fr> Alexandre SPANGARO <aspangaro@open-dsi.fr>
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr>
Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com>
Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com>

View File

@ -11,9 +11,9 @@ LaunchProgram=Launch %1
AssocFileExtension=&Associate %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.
ThisAssistantInstallOrUpgrade=This assistant installs or upgrades Dolibarr ERP-CRM and all required third party softwares (Apache, Mysql and PHP) optimized for a Dolibarr usage.
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.
YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party softwares like Apache, Mysql and PHP) on your computer.
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=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...
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 ?
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
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version
DLLMissing=The "Visual C++ Redistributable for Visual Studio 2012" component is missing. Please install the 32-bit version (vcredit_x86.exe) first from https://www.microsoft.com/en-us/download/details.aspx?id=30679 and restart DoliWamp installation/upgrade.
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
ContinueAnyway=Continue anyway (install process may fails without this prerequisite)

View File

@ -11,10 +11,10 @@ LaunchProgram=Ex
AssocFileExtension=&Associer %1 avec l'extension de fichier %2
AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur.
ThisAssistantInstallOrUpgrade=Cet assistant installe ou met à jour Dolibarr ERP-CRM et tous ses composants prérequis (Apache, Mysql et PHP) optimisés pour une utilisation de Dolibarr.
IfYouHaveTechnicalKnowledge=Si vous cherchez un hébergement dans le Cloud, aller voir sur https://saas.dolibarr.org. Si vous avez des compétences techniques et voulez gérer vous même Apache, Mysql et PHP, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur votre socle Apache, Mysql et PHP existant.
ButIfYouLook=Mais si vous recherchez une installation automatisée locale sur votre ordinateur, clé en main, vous êtes sur la bonne voie...
YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp sur votre ordinateur (donc Dolibarr + tous ses composants prérequis comme Apache, Mysql et PHP).
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=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 clé en main automatisée sur une poste local, vous êtes sur la bonne voie...
DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ?
TechnicalParameters=Paramètres techniques
@ -33,7 +33,7 @@ PortAlreadyInUse=Le port %1 semble d
FirefoxDetected=Firefox a été détecté 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éfaut. Si vous n'ê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
@ -44,3 +44,5 @@ DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d
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 é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è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é tout (le process d'installaton échouera)

View File

@ -3,4 +3,4 @@ REM Launch Dolibarr Admin center
REM ----------------------------
REM Go to admin center page
start "DoliWamp admin" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/

View File

@ -4,4 +4,4 @@ REM ---------------------------
REM Go to help center page
echo Please wait...
start "Dolibarr Help center" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/

View File

@ -3,7 +3,7 @@ REM Launch Dolibarr
REM ---------------
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
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/

View File

@ -80,7 +80,7 @@ if ($idobject > 0)
dol_print_error($db,$obj->error);
}
}
else if ($obj->error == 'ErrorLoginAlreadyExists')
elseif ($obj->error == 'ErrorLoginAlreadyExists')
{
print "User with login ".$obj->login." already exists\n";
}

View File

@ -220,4 +220,3 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
dol_print_error($db,$object->error);
}
}

View File

@ -96,5 +96,3 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
if ($ret < 0) print "Error $ret - ".$produit->error."\n";
else print " OK with ref ".$produit->ref."\n";
}

View File

@ -127,5 +127,3 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
print "Error: ".$soc->error."\n";
}
}

View File

@ -275,4 +275,3 @@ else
}
$db->close();

View File

@ -65,7 +65,7 @@
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
<!--
@ -191,6 +191,15 @@
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
<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 -->
@ -392,6 +401,7 @@
<rule ref="PSR2.Classes.ClassDeclaration" />
<rule ref="PSR2.Methods.FunctionClosingBrace" />
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
<!-- This is not in PSR2 -->
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
@ -419,4 +429,8 @@
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
<rule ref="Zend.Files.ClosingTag"/>
<rule ref="PSR2.Classes.ClassDeclaration" />
<rule ref="PSR2.Methods.FunctionClosingBrace" />
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
</ruleset>

View File

@ -50,7 +50,7 @@ class autoTranslator
* @param string $_apikey Api key
* @return void
*/
function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey)
{
// Set enviorment variables
@ -156,7 +156,7 @@ class autoTranslator
* @param string $my_destlang Target language code
* @return void
*/
private function updateTranslationFile($destPath,$file,$my_destlang)
private function updateTranslationFile($destPath, $file, $my_destlang)
{
$this->_time_end = date('Y-m-d H:i:s');
@ -183,7 +183,7 @@ class autoTranslator
* @param string $my_destlang Target language code
* @return void
*/
private function createTranslationFile($path,$my_destlang)
private function createTranslationFile($path, $my_destlang)
{
$fp = fopen($path, 'w+');
fwrite($fp, "/*\n");
@ -205,7 +205,7 @@ class autoTranslator
* @param string $my_destlang Language code (ie: fr_FR)
* @return int 0=Nothing translated, 1=Record translated
*/
private function translateFileLine($content,$file,$key,$value,$my_destlang)
private function translateFileLine($content, $file, $key, $value, $my_destlang)
{
//print "key =".$key."\n";
@ -221,8 +221,8 @@ class autoTranslator
}
if ($key == 'CHARSET') $val=$this->_outputpagecode;
else if (preg_match('/^Format/',$key)) $val=$value;
else if ($value=='-') $val=$value;
elseif (preg_match('/^Format/',$key)) $val=$value;
elseif ($value=='-') $val=$value;
else
{
// If not translated then translate

View File

@ -215,8 +215,8 @@ foreach ($dups as $string => $pages)
$s.="\n";
if ($duplicateinsamefile) $sduplicateinsamefile .= $s;
else if ($inmain) $sinmainandother .= $s;
else if ($inadmin) $sininstallandadmin .= $s;
elseif ($inmain) $sinmainandother .= $s;
elseif ($inadmin) $sininstallandadmin .= $s;
else $sother .= $s;
}
@ -388,4 +388,3 @@ if ($web)
}
exit;

View File

@ -310,7 +310,7 @@ foreach($filesToProcess as $fileToProcess)
{
//print "Key $key is a key we always want to see into secondary file (line: $cnt).\n";
}
else if ( ! array_key_exists($key, $aSecondary))
elseif ( ! array_key_exists($key, $aSecondary))
{
//print "Key $key does NOT exist in secondary language (line: $cnt).\n";
continue;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
@ -162,7 +162,7 @@ if (empty($reshook))
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
}
} else if ($action == 'enable') {
} elseif ($action == 'enable') {
if ($accounting->fetch($id)) {
$result = $accounting->account_activate($id);
}
@ -298,7 +298,7 @@ if ($resql)
if (! empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
if (! empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre">&nbsp;</td>';
print '<td align="right" class="liste_titre">';
print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print '</td>';

View File

@ -8,7 +8,7 @@
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
@ -221,10 +221,10 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
}
}
if ($id == 3 && ! is_numeric($_POST["code"]))
if (! is_numeric($_POST["code"]))
{
$ok=0;
setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric",$langs->transnoentities("Code")), null, 'errors');
setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric", $langs->transnoentities("Code")), null, 'errors');
}
// Clean some parameters
@ -270,7 +270,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($value == 'entity') {
elseif ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
@ -318,7 +318,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
@ -462,11 +462,6 @@ $linkback='';
print load_fiche_titre($titre,$linkback,'title_accountancy');
if (empty($id))
{
print $langs->trans("DictionaryDesc");
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
}
print "<br>\n";
@ -522,7 +517,7 @@ if ($id)
// dans les dictionnaires de donnees
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
$class="left";
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
@ -540,7 +535,7 @@ if ($id)
{
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>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
@ -578,7 +573,7 @@ if ($id)
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
}
print '<td colspan="3" align="right">';
print '<td colspan="3" class="right">';
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
@ -611,7 +606,7 @@ if ($id)
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print '<tr class="none"><td class="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
@ -639,7 +634,7 @@ if ($id)
}
}
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" colspan="2" align="right">';
print '<td class="liste_titre right" colspan="2">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
@ -652,7 +647,7 @@ if ($id)
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$class="left";
$sortable=1;
$valuetoshow='';
/*
@ -707,7 +702,7 @@ if ($id)
if (empty($reshook)) fieldListAccountModel($fieldlist,$obj,$tabname[$id],'edit');
print '<td colspan="3" align="right"><a name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<td colspan="3" class="right"><a name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '&nbsp;<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
}
else
@ -724,7 +719,7 @@ if ($id)
{
$showfield=1;
$align="left";
$class="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($value == 'type_template')
{
@ -734,14 +729,14 @@ if ($id)
{
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;
}
else if ($value == 'source')
elseif ($value == 'source')
{
$valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow;
}
else if ($valuetoshow=='all') {
elseif ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='country') {
elseif ($fieldlist[$field]=='country') {
if (empty($obj->country_code))
{
$valuetoshow='-';
@ -752,7 +747,7 @@ if ($id)
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
}
}
else if ($fieldlist[$field]=='country_id') {
elseif ($fieldlist[$field]=='country_id') {
$showfield=0;
}
@ -816,7 +811,7 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form;
@ -879,4 +874,3 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
}
}
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
@ -124,7 +124,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
exit;
}
}
} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) {
} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) {
if (! $cancel) {
$result = $object->fetch($id);
@ -177,7 +177,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
header("Location: " . $urltogo);
exit();
}
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) {
$result = $object->fetch($id);
if (! empty($object->id)) {
@ -272,7 +272,7 @@ if ($action == 'create') {
print '</form>';
}
else if ($id > 0 || $ref) {
elseif ($id > 0 || $ref) {
$result = $object->fetch($id, $ref, 1);

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -268,7 +268,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
if ($field == 'fk_country' && $_POST['country'] > 0) {
$_POST[$listfieldvalue[$i]] = $_POST['country'];
}
else if ($field == 'entity') {
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
@ -467,7 +467,7 @@ if ($id)
// dans les dictionnaires de donnees
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
$class="left";
if ($fieldlist[$field]=='type') {
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,''));
else $valuetoshow=$langs->trans("Type");
@ -492,7 +492,7 @@ if ($id)
{
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>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
@ -531,7 +531,7 @@ if ($id)
fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'add');
}
print '<td colspan="4" align="right">';
print '<td colspan="4" class="right">';
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
@ -559,7 +559,7 @@ if ($id)
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print '<tr class="none"><td class="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
@ -607,7 +607,7 @@ if ($id)
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$class="left";
$sortable=1;
$valuetoshow='';
@ -693,16 +693,16 @@ if ($id)
{
$showfield=1;
$align="left";
$class="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($value == 'category_type')
{
$valuetoshow = yn($valuetoshow);
}
else if ($valuetoshow=='all') {
elseif ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='country') {
elseif ($fieldlist[$field]=='country') {
if (empty($obj->country_code))
{
$valuetoshow='-';
@ -713,20 +713,20 @@ if ($id)
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
}
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
$key=$langs->trans("Country".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
$langs->loadLangs(array("propal"));
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
$key=$langs->trans("Action".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
$showfield=0;
}
@ -813,7 +813,7 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form, $mysoc;
@ -873,4 +873,3 @@ function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $contex
}
}
}

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -55,6 +55,8 @@ $list_account_main = array (
$list_account = array (
'ACCOUNTING_PRODUCT_BUY_ACCOUNT',
'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',
'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',
'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',
'ACCOUNTING_SERVICE_BUY_ACCOUNT',
'ACCOUNTING_SERVICE_SOLD_ACCOUNT',
'ACCOUNTING_VAT_BUY_ACCOUNT',

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -73,7 +73,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") {
}
}
else if ($action == 'add') {
elseif ($action == 'add') {
if (! GETPOST('cancel', 'alpha')) {
$error = 0;
@ -118,7 +118,7 @@ else if ($action == 'add') {
}
// Update record
else if ($action == 'update') {
elseif ($action == 'update') {
if (! GETPOST('cancel', 'alpha')) {
$result = $object->fetch($id);
@ -198,7 +198,7 @@ if ($action == 'create')
print '</div>';
print '</form>';
} else if ($id) {
} elseif ($id) {
$result = $object->fetch($id);
if ($result > 0) {
$head = fiscalyear_prepare_head($object);

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -270,7 +270,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
@ -429,7 +429,7 @@ if ($id)
// dans les dictionnaires de donnees
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
$class="left";
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
@ -441,7 +441,7 @@ if ($id)
{
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>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
@ -480,7 +480,7 @@ if ($id)
fieldListJournal($fieldlist,$obj,$tabname[$id],'add');
}
print '<td colspan="4" align="right">';
print '<td colspan="4" class="right">';
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
@ -508,7 +508,7 @@ if ($id)
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print '<tr class="none"><td class="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
@ -537,7 +537,7 @@ if ($id)
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$class="left";
$sortable=1;
$valuetoshow='';
/*
@ -606,16 +606,16 @@ if ($id)
{
$showfield=1;
$align="left";
$class="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
elseif ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature))?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
$valuetoshow=$langs->trans($obj->label);
}
@ -630,8 +630,8 @@ if ($id)
if (isset($obj->code) && $id != 10)
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 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;
@ -696,7 +696,7 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldListJournal($fieldlist, $obj='', $tabname='', $context='')
function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form, $mysoc;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -235,7 +235,7 @@ if ($action != 'export_csv')
print $langs->trans('to');
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
print '</td>';
print '<td align="right" class="liste_titre">';
print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
@ -245,9 +245,9 @@ if ($action != 'export_csv')
print '<tr class="liste_titre">';
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
@ -274,7 +274,7 @@ if ($action != 'export_csv')
{
// Affiche un Sous-Total par compte comptable
if ($displayed_account != "") {
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
}
@ -305,11 +305,11 @@ if ($action != 'export_csv')
$sous_total_credit += $line->credit;
}
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($total_credit - $total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap right">' . price($total_debit) . '</td><td class="nowrap right">' . price($total_credit) . '</td><td class="nowrap right">' . price(price2num($total_credit - $total_debit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
@ -117,19 +117,19 @@ if ($resql) {
$row = $db->fetch_row($resql);
print '<tr class="oddeven"><td width="14%">' . length_accountg($row[0]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[1]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[2]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[3]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[4]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[5]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[6]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[7]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[8]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[9]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[10]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[11]) . '</td>';
print '<td align="right" width="6.5%">' . price($row[12]) . '</td>';
print '<td align="right" width="8%"><strong>' . price($row[13]) . '</strong></td>';
print '<td class="right" width="6.5%">' . price($row[1]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[2]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[3]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[4]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[5]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[6]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[7]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[8]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[9]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[10]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[11]) . '</td>';
print '<td class="right" width="6.5%">' . price($row[12]) . '</td>';
print '<td class="right" width="8%"><strong>' . price($row[13]) . '</strong></td>';
print '</tr>';
$i ++;

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
@ -140,7 +140,7 @@ if ($action == "confirm_update") {
}
}
else if ($action == "add") {
elseif ($action == "add") {
$error = 0;
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0))
@ -171,8 +171,8 @@ else if ($action == "add") {
$object->doc_ref = GETPOST('doc_ref','alpha');
$object->code_journal = $journal_code;
$object->journal_label = $journal_label;
$object->fk_doc = GETPOST('fk_doc','alpha');
$object->fk_docdet = GETPOST('fk_docdet','alpha');
$object->fk_doc = GETPOST('fk_doc','int');
$object->fk_docdet = GETPOST('fk_docdet','int');
if (floatval($debit) != 0.0) {
$object->montant = $debit;
@ -201,7 +201,7 @@ else if ($action == "add") {
}
}
else if ($action == "confirm_delete") {
elseif ($action == "confirm_delete") {
$object = new BookKeeping($db);
$result = $object->fetch($id, null, $mode);
@ -218,7 +218,7 @@ else if ($action == "confirm_delete") {
$action = '';
}
else if ($action == "confirm_create") {
elseif ($action == "confirm_create") {
$error = 0;
$object = new BookKeeping($db);

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -142,7 +142,7 @@ class AccountancyCategory // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
function create($user, $notrigger=0)
function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@ -239,7 +239,7 @@ class AccountancyCategory // extends CommonObject
* @param string $label Label
* @return int <0 if KO, >0 if OK
*/
function fetch($id, $code='', $label='')
function fetch($id, $code = '', $label = '')
{
$sql = "SELECT";
$sql.= " t.rowid,";
@ -299,7 +299,7 @@ class AccountancyCategory // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
function update($user=null, $notrigger=0)
function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@ -379,7 +379,7 @@ class AccountancyCategory // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
function delete($user, $notrigger=0)
function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@ -726,7 +726,7 @@ class AccountancyCategory // extends CommonObject
* @param int $year Specifig year - Can be empty
* @return integer <0 if KO, >= 0 if OK
*/
public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code='nofilter', $month=0, $year=0)
public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code = 'nofilter', $month = 0, $year = 0)
{
global $conf;
@ -796,7 +796,7 @@ class AccountancyCategory // extends CommonObject
* @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups
* @return array|int Array of groups or -1 if error
*/
public function getCats($categorytype=-1)
public function getCats($categorytype = -1)
{
global $conf, $mysoc;
@ -853,7 +853,7 @@ class AccountancyCategory // extends CommonObject
* @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts
* @return array|int Array of accounting accounts or -1 if error
*/
public function getCptsCat($cat_id, $predefinedgroupwhere='')
public function getCptsCat($cat_id, $predefinedgroupwhere = '')
{
global $conf, $mysoc;
$sql = '';

View File

@ -5,7 +5,7 @@
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
@ -466,7 +466,7 @@ class AccountingAccount extends CommonObject
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1)
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1)
{
global $langs, $conf, $user;
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
@ -632,7 +632,7 @@ class AccountingAccount extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
function getLibStatut($mode=0)
function getLibStatut($mode = 0)
{
return $this->LibStatut($this->status,$mode);
}
@ -645,7 +645,7 @@ class AccountingAccount extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
function LibStatut($statut,$mode=0)
function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -213,7 +213,7 @@ class AccountingJournal extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
*/
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0)
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0)
{
global $langs, $conf, $user;
@ -270,7 +270,7 @@ class AccountingJournal extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
function getLibType($mode=0)
function getLibType($mode = 0)
{
return $this->LibType($this->nature,$mode);
}
@ -283,7 +283,7 @@ class AccountingJournal extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
function LibType($nature,$mode=0)
function LibType($nature, $mode = 0)
{
// phpcs:enable
global $langs;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2014-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015-2017 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
@ -411,7 +411,7 @@ class BookKeeping extends CommonObject
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{
global $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo;
@ -470,7 +470,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, Id of created object if OK
*/
public function createStd(User $user, $notrigger = false, $mode='')
public function createStd(User $user, $notrigger = false, $mode = '')
{
global $conf;
@ -641,7 +641,7 @@ class BookKeeping extends CommonObject
*
* @return int <0 if KO, 0 if not found, >0 if OK
*/
public function fetch($id, $ref = null, $mode='')
public function fetch($id, $ref = null, $mode = '')
{
global $conf;
@ -1090,7 +1090,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
public function update(User $user, $notrigger = false, $mode='')
public function update(User $user, $notrigger = false, $mode = '')
{
$error = 0;
@ -1225,7 +1225,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return number <0 if KO, >0 if OK
*/
public function updateByMvt($piece_num='', $field='', $value='', $mode='')
public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '')
{
$error=0;
@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
public function delete(User $user, $notrigger = false, $mode='')
public function delete(User $user, $notrigger = false, $mode = '')
{
dol_syslog(__METHOD__, LOG_DEBUG);
@ -1338,7 +1338,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
function deleteByYearAndJournal($delyear='', $journal='', $mode='')
function deleteByYearAndJournal($delyear = '', $journal = '', $mode = '')
{
global $conf;
@ -1500,7 +1500,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
public function fetchPerMvt($piecenum, $mode='')
public function fetchPerMvt($piecenum, $mode = '')
{
global $conf;
@ -1536,7 +1536,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return string Next numero to use
*/
public function getNextNumMvt($mode='')
public function getNextNumMvt($mode = '')
{
global $conf;
@ -1565,7 +1565,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
function fetchAllPerMvt($piecenum, $mode='')
function fetchAllPerMvt($piecenum, $mode = '')
{
global $conf;
@ -1687,7 +1687,7 @@ class BookKeeping extends CommonObject
* @param string $piece_num Piece num
* @return int int <0 if KO, >0 if OK
*/
public function transformTransaction($direction=0,$piece_num='')
public function transformTransaction($direction = 0, $piece_num = '')
{
$error = 0;

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -314,4 +314,3 @@ class Lettering extends BookKeeping
}
}
}

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -219,12 +219,12 @@ if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
elseif ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
elseif ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}

View File

@ -1,6 +1,6 @@
<?php
/* 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) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* 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.= " 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.= " 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.= " s.tva_intra";
$parameters=array();
@ -257,12 +258,12 @@ if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
elseif ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
elseif ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
@ -437,7 +438,9 @@ if ($result) {
$code_sell_p_notset = '';
$objp->aarowid_suggest = $objp->aarowid;
if ($objp->type_l == 1) {
$isinEEC = isInEEC($objp->country_code);
if ($objp->type_l == 1) {
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
if ($objp->aarowid == '') {
$objp->aarowid_suggest = $aarowid_s;
@ -450,8 +453,19 @@ if ($result) {
}
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)) {
$objp->code_sell_p = $objp->code_sell; // Code on product
//$objp->code_sell_p = $objp->code_sell; // Code on product
} else {
$code_sell_p_notset = 'color:orange';
}

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -190,12 +190,12 @@ if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
elseif ($search_year > 0 && ! empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
elseif ($search_year > 0)
{
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
@ -219,12 +219,12 @@ if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
elseif ($search_year > 0 && ! empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
elseif ($search_year > 0)
{
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}

View File

@ -8,7 +8,8 @@
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Eric Seigne <eric.seigne@cap-rel.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -289,18 +290,18 @@ if ($result) {
$paymentstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2, '', ''); // TODO Do not include list of invoice in tooltip, the dol_string_nohtmltag is ko with this
$tabpay[$obj->rowid]["paymentid"] = $paymentstatic->id;
} else if ($links[$key]['type'] == 'payment_supplier') {
} elseif ($links[$key]['type'] == 'payment_supplier') {
$paymentsupplierstatic->id = $links[$key]['url_id'];
$paymentsupplierstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentsupplierid"] = $paymentsupplierstatic->id;
} else if ($links[$key]['type'] == 'company') {
} elseif ($links[$key]['type'] == 'company') {
$societestatic->id = $links[$key]['url_id'];
$societestatic->name = $links[$key]['label'];
$societestatic->email = $tabcompany[$obj->rowid]['email'];
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount;
} else if ($links[$key]['type'] == 'user') {
} elseif ($links[$key]['type'] == 'user') {
$userstatic->id = $links[$key]['url_id'];
$userstatic->name = $links[$key]['label'];
$userstatic->email = $tabuser[$obj->rowid]['email'];
@ -309,7 +310,7 @@ if ($result) {
if ($userstatic->id > 0) $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
else $tabpay[$obj->rowid]["soclib"] = '???'; // Should not happen, but happens with old data when id of user was not saved on expense report payment.
if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount;
} else if ($links[$key]['type'] == 'sc') {
} elseif ($links[$key]['type'] == 'sc') {
$chargestatic->id = $links[$key]['url_id'];
$chargestatic->ref = $links[$key]['url_id'];
@ -338,14 +339,14 @@ if ($result) {
$objmid = $db->fetch_object($resultmid);
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
}
} else if ($links[$key]['type'] == 'payment_donation') {
} elseif ($links[$key]['type'] == 'payment_donation') {
$paymentdonstatic->id = $links[$key]['url_id'];
$paymentdonstatic->ref = $links[$key]['url_id'];
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id;
$tabtp[$obj->rowid][$account_pay_donation] += $obj->amount;
} else if ($links[$key]['type'] == 'member') {
} elseif ($links[$key]['type'] == 'member') {
$paymentsubscriptionstatic->id = $links[$key]['url_id'];
$paymentsubscriptionstatic->ref = $links[$key]['url_id'];
$paymentsubscriptionstatic->label = $links[$key]['label'];
@ -353,24 +354,24 @@ if ($result) {
$tabpay[$obj->rowid]["paymentsubscriptionid"] = $paymentsubscriptionstatic->id;
$paymentsubscriptionstatic->fetch($paymentsubscriptionstatic->id);
$tabtp[$obj->rowid][$account_pay_subscription] += $obj->amount;
} else if ($links[$key]['type'] == 'payment_vat') { // Payment VAT
} elseif ($links[$key]['type'] == 'payment_vat') { // Payment VAT
$paymentvatstatic->id = $links[$key]['url_id'];
$paymentvatstatic->ref = $links[$key]['url_id'];
$paymentvatstatic->label = $links[$key]['label'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentvatid"] = $paymentvatstatic->id;
$tabtp[$obj->rowid][$account_pay_vat] += $obj->amount;
} else if ($links[$key]['type'] == 'payment_salary') {
} elseif ($links[$key]['type'] == 'payment_salary') {
$paymentsalstatic->id = $links[$key]['url_id'];
$paymentsalstatic->ref = $links[$key]['url_id'];
$paymentsalstatic->label = $links[$key]['label'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentsalid"] = $paymentsalstatic->id;
} else if ($links[$key]['type'] == 'payment_expensereport') {
} elseif ($links[$key]['type'] == 'payment_expensereport') {
$paymentexpensereportstatic->id = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= $paymentexpensereportstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentexpensereport"] = $paymentexpensereportstatic->id;
} else if ($links[$key]['type'] == 'payment_various') {
} elseif ($links[$key]['type'] == 'payment_various') {
$paymentvariousstatic->id = $links[$key]['url_id'];
$paymentvariousstatic->ref = $links[$key]['url_id'];
$paymentvariousstatic->label = $links[$key]['label'];
@ -379,7 +380,7 @@ if ($result) {
$paymentvariousstatic->fetch($paymentvariousstatic->id);
$account_various = (! empty($paymentvariousstatic->accountancy_code) ? $paymentvariousstatic->accountancy_code : 'NotDefined'); // NotDefined is a reserved word
$tabtp[$obj->rowid][$account_various] += $obj->amount;
} else if ($links[$key]['type'] == 'payment_loan') {
} elseif ($links[$key]['type'] == 'payment_loan') {
$paymentloanstatic->id = $links[$key]['url_id'];
$paymentloanstatic->ref = $links[$key]['url_id'];
$paymentloanstatic->fk_loan = $links[$key]['url_id'];
@ -398,7 +399,7 @@ if ($result) {
$tabtp[$obj->rowid][$objmid->accountancy_account_insurance] -= $objmid->amount_insurance;
$tabtp[$obj->rowid][$objmid->accountancy_account_interest] -= $objmid->amount_interest;
}
} else if ($links[$key]['type'] == 'banktransfert') {
} elseif ($links[$key]['type'] == 'banktransfert') {
$accountLinestatic->fetch($links[$key]['url_id']);
$tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1);
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
@ -566,68 +567,68 @@ if (! $error && $action == 'writebookkeeping') {
$accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
} elseif ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
$accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'payment_expensereport') {
} elseif ($tabtype[$key] == 'payment_expensereport') {
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
$bookkeeping->subledger_label = $tabuser[$key]['name'];
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'payment_salary') {
} elseif ($tabtype[$key] == 'payment_salary') {
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
$bookkeeping->subledger_label = $tabuser[$key]['name'];
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
} elseif (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = $objmid->labelc;
} else if ($tabtype[$key] == 'payment_vat') {
} elseif ($tabtype[$key] == 'payment_vat') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$accountingaccount->fetch(null, $k, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'payment_donation') {
} elseif ($tabtype[$key] == 'payment_donation') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$accountingaccount->fetch(null, $k, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'member') {
} elseif ($tabtype[$key] == 'member') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$accountingaccount->fetch(null, $k, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'payment_loan') {
} elseif ($tabtype[$key] == 'payment_loan') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$accountingaccount->fetch(null, $k, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'payment_various') {
} elseif ($tabtype[$key] == 'payment_various') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$accountingaccount->fetch(null, $k, true);
$bookkeeping->label_compte = $accountingaccount->label;
} else if ($tabtype[$key] == 'banktransfert') {
} elseif ($tabtype[$key] == 'banktransfert') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
@ -785,17 +786,17 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
// CSV header line
print '"' . $langs->trans("BankId").'"' . $sep;
print '"' . $langs->trans("Date") . '"' . $sep;
print '"' . $langs->trans("PaymentMode") . '"' . $sep;
print '"' . $langs->trans("AccountAccounting") . '"' . $sep;
print '"' . $langs->trans("LedgerAccount") . '"' . $sep;
print '"' . $langs->trans("SubledgerAccount") . '"' . $sep;
print '"' . $langs->trans("Label"). '"' . $sep;
print '"' . $langs->trans("Debit") . '"' . $sep;
print '"' . $langs->trans("Credit") . '"' . $sep;
print '"' . $langs->trans("Journal") . '"' . $sep;
print '"' . $langs->trans("Note") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("BankId").'"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Date") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("PaymentMode") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("AccountAccounting") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("LedgerAccount") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("SubledgerAccount") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Label"). '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Debit") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Journal") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Note") . '"' . $sep;
print "\n";
@ -844,11 +845,11 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
if ($tabtype[$key] == 'payment_supplier') {
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
} else if($tabtype[$key] == 'payment') {
} elseif($tabtype[$key] == 'payment') {
print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep;
} else if($tabtype[$key] == 'payment_expensereport') {
} elseif($tabtype[$key] == 'payment_expensereport') {
print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep;
} else if($tabtype[$key] == 'payment_salary') {
} elseif($tabtype[$key] == 'payment_salary') {
print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep;
} else {
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;

View File

@ -3,10 +3,11 @@
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Eric Seigne <eric.seigne@cap-rel.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -425,115 +426,67 @@ $form = new Form($db);
$userstatic = new User($db);
// Export
/*if ($action == 'exportcsv') { // ISO and not UTF8 !
if ($action == 'exportcsv') { // ISO and not UTF8 !
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$filename = 'journal';
$type_export = 'journal';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
// Model Cegid Expert Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
$sep = ";";
// CSV header line
print '"' . $langs->transnoentitiesnoconv("Date") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Piece") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("AccountAccounting") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("LabelOperation") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Debit") . '"' . $sep;
print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep;
print "\n";
foreach ( $taber as $key => $val ) {
$date = dol_print_date($val["date"], '%d%m%Y');
// Fees
foreach ( $tabht[$key] as $k => $mt ) {
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
$userstatic->client = $tabuser[$key]['code_client'];
if ($mt) {
print $date . $sep;
print $journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'C' : 'D') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($val["comments"], 32) . $sep;
print $val["ref"];
print "\n";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print $date . $sep;
print $journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'C' : 'D') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print $langs->trans("VAT") . $sep;
print $val["ref"];
print "\n";
}
}
foreach ( $tabttc[$key] as $k => $mt ) {
print $date . $sep;
print $journal . $sep;
print length_accountg($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) . $sep;
print length_accounta(html_entity_decode($k)) . $sep;
print ($mt < 0 ? 'D' : 'C') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print $userstatic->name . $sep;
print $val["ref"];
print "\n";
}
}
} elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) {
// Model Classic Export
foreach ( $taber as $key => $val ) {
$date = dol_print_date($val["date"], 'day');
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
// Fees
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print "\n";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($langs->trans("VAT")) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print "\n";
}
}
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($userstatic->name) . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
}
print "\n";
}
foreach ( $taber as $key => $val ) {
$date = dol_print_date($val["date"], 'day');
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
// Fees
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print "\n";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($langs->trans("VAT")) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print "\n";
}
}
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($userstatic->name) . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
}
print "\n";
}
}
*/
if (empty($action) || $action == 'view') {
@ -560,6 +513,8 @@ if (empty($action) || $action == 'view') {
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
@ -567,7 +522,6 @@ if (empty($action) || $action == 'view') {
if ($in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
else print '<a href="#" class="butActionRefused classfortooltip" name="writebookkeeping">' . $langs->trans("WriteBookKeeping") . '</a>';
}
//print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
print '</div>';
// TODO Avoid using js. We can use a direct link with $param

View File

@ -3,7 +3,7 @@
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
@ -879,7 +879,7 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForSupplierssNotDefined").'</span>';
print '<span class="error">'.$langs->trans("MainAccountForSuppliersNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -214,12 +214,12 @@ if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
elseif ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
elseif ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
@ -256,12 +256,12 @@ if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
elseif ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
elseif ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -136,7 +136,7 @@ if ($conf->use_javascript_ajax)
}
print $langs->trans("BlankSubscriptionFormDesc").'<br><br>';
print '<span class="opacitymedium">'.$langs->trans("BlankSubscriptionFormDesc").'</span><br><br>';
$enabledisablehtml = $langs->trans("EnablePublicSubscriptionForm").' ';

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -5,7 +5,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@ -246,7 +246,7 @@ class Adherent extends CommonObject
* @param string $moreinheader Add more html headers
* @return int <0 if KO, >0 if OK
*/
function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='', $moreinheader='')
function send_an_email($text, $subject, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = -1, $errors_to = '', $moreinheader = '')
{
// phpcs:enable
global $conf,$langs;
@ -358,7 +358,7 @@ class Adherent extends CommonObject
* @param string $morphy Nature of the adherent (physical or moral)
* @return string Label
*/
function getmorphylib($morphy='')
function getmorphylib($morphy = '')
{
global $langs;
if (! $morphy) { $morphy=$this->morphy; }
@ -374,7 +374,7 @@ class Adherent extends CommonObject
* @param int $notrigger 1 ne declenche pas les triggers, 0 sinon
* @return int <0 if KO, >0 if OK
*/
function create($user,$notrigger=0)
function create($user, $notrigger = 0)
{
global $conf,$langs;
@ -500,7 +500,7 @@ class Adherent extends CommonObject
* @param string $action Current action for hookmanager
* @return int <0 if KO, >0 if OK
*/
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update')
function update($user, $notrigger = 0, $nosyncuser = 0, $nosyncuserpass = 0, $nosyncthirdparty = 0, $action = 'update')
{
global $conf, $langs, $hookmanager;
@ -817,7 +817,7 @@ class Adherent extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, 0=nothing to do, >0 if OK
*/
function delete($rowid, $user, $notrigger=0)
function delete($rowid, $user, $notrigger = 0)
{
global $conf, $langs;
@ -927,7 +927,7 @@ class Adherent extends CommonObject
* @param int $nosyncuser Do not synchronize linked user
* @return string If OK return clear password, 0 if no change, < 0 if error
*/
function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncuser=0)
function setPassword($user, $password = '', $isencrypted = 0, $notrigger = 0, $nosyncuser = 0)
{
global $conf, $langs;
@ -1147,7 +1147,7 @@ class Adherent extends CommonObject
* @param string $lastname Lastname
* @return void
*/
function fetch_name($firstname,$lastname)
function fetch_name($firstname, $lastname)
{
// phpcs:enable
global $conf;
@ -1183,7 +1183,7 @@ class Adherent extends CommonObject
* @param bool $fetch_subscriptions To load member subscriptions
* @return int >0 if OK, 0 if not found, <0 if KO
*/
function fetch($rowid,$ref='',$fk_soc='',$ref_ext='',$fetch_optionals=true,$fetch_subscriptions=true)
function fetch($rowid, $ref = '', $fk_soc = '', $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true)
{
global $langs;
@ -1400,7 +1400,7 @@ class Adherent extends CommonObject
* @param int $datesubend Date end subscription
* @return int rowid of record added, <0 if KO
*/
function subscription($date, $amount, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0)
function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0)
{
global $conf,$langs,$user;
@ -1486,7 +1486,7 @@ class Adherent extends CommonObject
* @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice.
* @return int <0 if KO, >0 if OK
*/
function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0)
function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom = '', $emetteur_banque = '', $autocreatethirdparty = 0)
{
global $conf, $langs, $user, $mysoc;
@ -2018,7 +2018,7 @@ class Adherent extends CommonObject
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string Chaine avec URL
*/
function getNomUrl($withpictoimg=0, $maxlen=0, $option='card', $mode='', $morecss='', $save_lastsearch_value=-1)
function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1)
{
global $conf, $langs;
@ -2109,7 +2109,7 @@ class Adherent extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label
*/
function getLibStatut($mode=0)
function getLibStatut($mode = 0)
{
return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode);
}
@ -2124,7 +2124,7 @@ class Adherent extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label
*/
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0)
{
// phpcs:enable
global $langs;
@ -2307,7 +2307,7 @@ class Adherent extends CommonObject
* @param null|array $moreparams Array to provide more information
* @return int 0 if KO, 1 if OK
*/
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
{
global $conf,$langs;
@ -2400,7 +2400,7 @@ class Adherent extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
function _load_ldap_dn($info,$mode=0)
function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
global $conf;
@ -2487,7 +2487,7 @@ class Adherent extends CommonObject
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // Create OpenLDAP MD5 password (TODO add type of encryption)
}
// Set LDAP password if possible
else if ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password
elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password
{
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
{
@ -2502,7 +2502,7 @@ class Adherent extends CommonObject
}
}
// Use $this->pass_indatabase value if exists
else if (! empty($this->pass_indatabase))
elseif (! empty($this->pass_indatabase))
{
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase, 4); // md5 for OpenLdap TODO add type of encryption
@ -2694,7 +2694,7 @@ class Adherent extends CommonObject
* @param string $daysbeforeendlist Nb of days before end of subscription (negative number = after subscription). Can be a list of delay, separated by a semicolon, for example '10;5;0;-5'
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
*/
public function sendReminderForExpiredSubscription($daysbeforeendlist='10')
public function sendReminderForExpiredSubscription($daysbeforeendlist = '10')
{
global $conf, $langs, $mysoc, $user;

View File

@ -103,7 +103,7 @@ class AdherentType extends CommonObject
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
function create($user,$notrigger=0)
function create($user, $notrigger = 0)
{
global $conf;
@ -170,7 +170,7 @@ class AdherentType extends CommonObject
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
function update($user,$notrigger=0)
function update($user, $notrigger = 0)
{
global $conf, $hookmanager;
@ -356,7 +356,7 @@ class AdherentType extends CommonObject
* 2=Return array of members id only
* @return mixed Array of members or -1 on error
*/
function listMembersForMemberType($excludefilter='', $mode=0)
function listMembersForMemberType($excludefilter = '', $mode = 0)
{
global $conf, $user;
@ -411,7 +411,7 @@ class AdherentType extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
*/
function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0)
{
global $langs;
@ -449,7 +449,7 @@ class AdherentType extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
function _load_ldap_dn($info,$mode=0)
function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
global $conf;

View File

@ -52,7 +52,7 @@ class AdherentStats extends Stats
* @param int $socid Id third party
* @param int $userid Id user for filter
*/
function __construct($db, $socid=0, $userid=0)
function __construct($db, $socid = 0, $userid = 0)
{
global $user, $conf;
@ -85,7 +85,7 @@ class AdherentStats extends Stats
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
* @return array Array of nb each month
*/
function getNbByMonth($year, $format=0)
function getNbByMonth($year, $format = 0)
{
global $user;
@ -126,7 +126,7 @@ class AdherentStats extends Stats
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
* @return array Array of amount each month
*/
function getAmountByMonth($year, $format=0)
function getAmountByMonth($year, $format = 0)
{
global $user;

View File

@ -213,7 +213,7 @@ class Members extends DolibarrApi
if ($result < 0) {
throw new RestException(500, 'Error when resiliating member: '.$member->error);
}
} else if ($value == '1') {
} elseif ($value == '1') {
$result = $member->validate(DolibarrApiAccess::$user);
if ($result < 0) {
throw new RestException(500, 'Error when validating member: '.$member->error);
@ -361,7 +361,7 @@ class Members extends DolibarrApi
*
* @url POST {id}/subscriptions
*/
function createSubscription($id, $start_date, $end_date, $amount, $label='')
function createSubscription($id, $start_date, $end_date, $amount, $label = '')
{
if(! DolibarrApiAccess::$user->rights->adherent->cotisation->creer) {
throw new RestException(401);

View File

@ -207,7 +207,7 @@ $type=$this->fk_type;
* @param int $notrigger 0=Disable triggers
* @return int <0 if KO, >0 if OK
*/
function update($user, $notrigger=0)
function update($user, $notrigger = 0)
{
$error = 0;
@ -263,7 +263,7 @@ $type=$this->fk_type;
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, 0 if not found, >0 if OK
*/
function delete($user, $notrigger=false)
function delete($user, $notrigger = false)
{
$error = 0;
@ -356,7 +356,7 @@ $type=$this->fk_type;
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string Chaine avec URL
*/
function getNomUrl($withpicto=0, $notooltip=0, $option='', $morecss='', $save_lastsearch_value=-1)
function getNomUrl($withpicto = 0, $notooltip = 0, $option = '', $morecss = '', $save_lastsearch_value = -1)
{
global $langs;
@ -395,7 +395,7 @@ $type=$this->fk_type;
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label
*/
function getLibStatut($mode=0)
function getLibStatut($mode = 0)
{
return '';
}

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -210,9 +210,9 @@ if ($mode && ! count($data))
else
{
if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>';
else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
else if ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>';
else if ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'<br>';//+
elseif ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
elseif ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>';
elseif ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'<br>';//+
else
{
print $langs->trans("MembersStatisticsDesc").'<br>';

View File

@ -3,7 +3,7 @@
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -793,8 +793,8 @@ if ($rowid > 0)
else
{
if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $bankviainvoice=1;
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1;
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1;
elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1;
elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1;
}
print "\n\n<!-- Form add subscription -->\n";

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -57,6 +57,7 @@ if (! $sortorder) { $sortorder="DESC"; }
if (! $sortfield) { $sortfield="d.lastname"; }
$label=GETPOST("label","alpha");
$statut=GETPOST("statut","int");
$subscription=GETPOST("subscription","int");
$vote=GETPOST("vote","int");
$comment=GETPOST("comment",'alphanohtml');
@ -104,7 +105,8 @@ if ($cancel) {
if ($action == 'add' && $user->rights->adherent->configurer)
{
$object->label = trim($label);
$object->subscription = (int) trim($subscription);
$object->statut = (int) $statut;
$object->subscription = (int) $subscription;
$object->note = trim($comment);
$object->mail_valid = trim($mail_valid);
$object->vote = (boolean) trim($vote);
@ -157,7 +159,8 @@ if ($action == 'update' && $user->rights->adherent->configurer)
$object->oldcopy = clone $object;
$object->label = trim($label);
$object->subscription = (int) trim($subscription);
$object->statut = (int) $statut;
$object->subscription = (int) $subscription;
$object->note = trim($comment);
$object->mail_valid = trim($mail_valid);
$object->vote = (boolean) trim($vote);
@ -214,7 +217,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
{
//dol_fiche_head('');
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote";
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote, d.statut";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
$sql.= " WHERE d.entity IN (".getEntity('member_type').")";
@ -242,7 +245,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
@ -257,6 +260,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<th>'.$langs->trans("Label").'</th>';
print '<th align="center">'.$langs->trans("SubscriptionRequired").'</th>';
print '<th align="center">'.$langs->trans("VoteAllowed").'</th>';
print '<th align="center">'.$langs->trans("Status").'</th>';
print '<th>&nbsp;</th>';
print "</tr>\n";
@ -278,6 +282,13 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<td>'.dol_escape_htmltag($objp->label).'</td>';
print '<td align="center">'.yn($objp->subscription).'</td>';
print '<td align="center">'.yn($objp->vote).'</td>';
print '<td align="center">';
if ( !empty($objp->statut) ) {
print img_picto($langs->trans("InActivity"),'statut4');
} else {
print img_picto($langs->trans("ActivityCeased"),'statut5');
}
print '</td>';
if ($user->rights->adherent->configurer)
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
else
@ -319,7 +330,11 @@ if ($action == 'create')
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" class="minwidth200" name="label" autofocus="autofocus"></td></tr>';
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
print '<tr><td>'.$langs->trans("Status").'</td><td>';
print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1);
print '</td></tr>';
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
print $form->selectyesno("subscription",1,1);
print '</td></tr>';
@ -392,6 +407,14 @@ if ($rowid > 0)
print '<table class="border" width="100%">';
print '<tr><td class="titlefield">'.$langs->trans("Status").'</td><td>';
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");
}
print '</tr>';
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
print yn($object->subscription);
print '</tr>';
@ -427,7 +450,12 @@ if ($rowid > 0)
}
// Add
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
if ( $user->rights->adherent->configurer && !empty($object->statut) )
{
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
} else {
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>';
}
// Delete
if ($user->rights->adherent->configurer)
@ -516,11 +544,11 @@ if ($rowid > 0)
if ($status != '')
{
if ($status == '-1,1') { $titre=$langs->trans("MembersListQualified"); }
else if ($status == '-1') { $titre=$langs->trans("MembersListToValid"); }
else if ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); }
else if ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); }
else if ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); }
else if ($status == '0') { $titre=$langs->trans("MembersListResiliated"); }
elseif ($status == '-1') { $titre=$langs->trans("MembersListToValid"); }
elseif ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); }
elseif ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); }
elseif ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); }
elseif ($status == '0') { $titre=$langs->trans("MembersListResiliated"); }
}
elseif ($action == 'search')
{
@ -723,7 +751,11 @@ if ($rowid > 0)
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="label" size="40" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
print '<tr><td>'.$langs->trans("Status").'</td><td>';
print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut);
print '</td></tr>';
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
print $form->selectyesno("subscription",$object->subscription,1);
print '</td></tr>';
@ -743,7 +775,7 @@ if ($rowid > 0)
// Other attributes
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields,'edit');

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -196,7 +196,7 @@ print "<td>".$langs->trans("Parameter")."</td>";
print "<td>".$langs->trans("Name")."</td>";
print "<td>".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</td>';
print "<td>".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).'</td>';
print '<td align="right">'.$langs->trans("Color").'</td>';
print '<td class="right">'.$langs->trans("Color").'</td>';
print "</tr>";
$i=1;

View File

@ -35,7 +35,7 @@ if (!$user->admin)
accessforbidden();
// Load translation files required by the page
$langs->loadLangs(array('admin', 'other', 'agenda'));
$langs->loadLangs(array('admin', 'other', 'agenda', 'users'));
$action = GETPOST('action','alpha');
$value = GETPOST('value','alpha');
@ -86,7 +86,7 @@ if ($action == 'set')
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
}
else if ($action == 'specimen') // For orders
elseif ($action == 'specimen') // For orders
{
$modele=GETPOST('module','alpha');
@ -133,13 +133,13 @@ else if ($action == 'specimen') // For orders
}
// Activate a model
else if ($action == 'setmodel')
elseif ($action == 'setmodel')
{
//print "sssd".$value;
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -149,7 +149,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -331,7 +331,7 @@ print '<table class="noborder allwidth">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'.$langs->trans("Value").'</td>'."\n";
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'."\n";
// Manual or automatic
@ -339,7 +339,7 @@ print '</tr>'."\n";
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
print '<td class="right">'."\n";
//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
@ -353,9 +353,10 @@ print '</td></tr>'."\n";
// AGENDA_DEFAULT_VIEW
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_VIEW").'</td>'."\n";
$htmltext=$langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
print '<td class="right">'."\n";
$tmplist=array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
print '</td></tr>'."\n";
@ -367,7 +368,7 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right" class="nowrap">'."\n";
print '<td class="right" class="nowrap">'."\n";
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
print '</td></tr>'."\n";
}
@ -376,7 +377,7 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right" class="nowrap">'."\n";
print '<td class="right" class="nowrap">'."\n";
$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1);
print '</td></tr>'."\n";
@ -385,7 +386,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
print '<td class="right">'."\n";
$formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
print '</td></tr>'."\n";

View File

@ -81,7 +81,7 @@ if ($action == 'set')
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
}
else if ($action == 'specimen') // For orders
elseif ($action == 'specimen') // For orders
{
$modele=GETPOST('module','alpha');
@ -128,13 +128,13 @@ else if ($action == 'specimen') // For orders
}
// Activate a model
else if ($action == 'setmodel')
elseif ($action == 'setmodel')
{
//print "sssd".$value;
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -144,7 +144,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -186,7 +186,7 @@ print '<table class="noborder allwidth">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'.$langs->trans("Value").'</td>'."\n";
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'."\n";
@ -196,7 +196,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
print '<td class="right">'."\n";
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_EMAIL">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';
@ -213,7 +213,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
print '<td class="right">'."\n";
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';
@ -225,7 +225,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
print '<td class="right">'."\n";
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER_SOUND">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';

View File

@ -133,7 +133,7 @@ if ($action == 'specimen') {
if ($action == 'set') {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del') {
elseif ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->BANKADDON_PDF == "$value")
@ -141,7 +141,7 @@ else if ($action == 'del') {
}
}
// Set default model
else if ($action == 'setdoc') {
elseif ($action == 'setdoc') {
if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '',
$conf->entity)) {
// The constant that was read before the new set

View File

@ -289,14 +289,14 @@ if ($resql)
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
$resql = $db->query($sql);
}
else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
{
$box_order = "B0".$record['box_order'];
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
$resql = $db->query($sql);
}
}
else if (dol_strlen($record['box_order']) == 2)
elseif (dol_strlen($record['box_order']) == 2)
{
if (preg_match("/[13579]{1}/",substr($record['box_order'],-1)))
{
@ -304,7 +304,7 @@ if ($resql)
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
$resql = $db->query($sql);
}
else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
{
$box_order = "B".$record['box_order'];
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";

View File

@ -267,7 +267,7 @@ else
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
print $doleditor->Create();
}
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</table>';

View File

@ -73,7 +73,7 @@ if ($action == 'updateMask')
}
}
else if ($action == 'specimen')
elseif ($action == 'specimen')
{
$modele=GETPOST('module','alpha');
@ -119,12 +119,12 @@ else if ($action == 'specimen')
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -134,7 +134,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -151,7 +151,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmod')
elseif ($action == 'setmod')
{
// TODO Check if numbering module chosen can be activated
// by calling method canBeActivated
@ -159,7 +159,7 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity);
}
else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
elseif ($action == 'set_COMMANDE_DRAFT_WATERMARK')
{
$draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
@ -176,7 +176,7 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
}
}
else if ($action == 'set_ORDER_FREE_TEXT')
elseif ($action == 'set_ORDER_FREE_TEXT')
{
$freetext = GETPOST("ORDER_FREE_TEXT",'none'); // No alpha here, we want exact string
@ -195,7 +195,7 @@ else if ($action == 'set_ORDER_FREE_TEXT')
}
// Activate Set Shippable Icon In List
else if ($action=="setshippableiconinlist") {
elseif ($action=="setshippableiconinlist") {
$setshippableiconinlist = GETPOST('value','int');
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity);
if (! $res > 0) $error++;
@ -207,7 +207,7 @@ else if ($action=="setshippableiconinlist") {
}
// Activate ask for payment bank
else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER",$value,'chaine',0,'',$conf->entity);
@ -224,7 +224,7 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
}
// Activate ask for warehouse
else if ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
{
$res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER",$value,'chaine',0,'',$conf->entity);
@ -556,7 +556,7 @@ else
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
print $doleditor->Create();
}
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
@ -570,7 +570,7 @@ print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.$conf->global->COMMANDE_DRAFT_WATERMARK.'">';
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
@ -674,7 +674,7 @@ print "</tr>\n";
print '<tr class="oddeven"><td colspan="2">';
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
print '</td><td align="right">';
print '</td><td class="right">';
print "</td></tr>\n";
print '</table>';

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
*
* This program is free software; you can redistribute it and/or modify
@ -137,7 +137,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
}
else dol_syslog("ErrorImageFormatNotSupported",LOG_WARNING);
}
else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
{
$error++;
$langs->load("errors");
@ -602,7 +602,7 @@ if ($action == 'edit' || $action == 'updateedit')
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="140">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
print '<td align="right">&nbsp;</td>';
print '<td class="right">&nbsp;</td>';
print "</tr>\n";
@ -635,7 +635,7 @@ if ($action == 'edit' || $action == 'updateedit')
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="140">'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
print '<td align="right">&nbsp;</td>';
print '<td class="right">&nbsp;</td>';
print "</tr>\n";
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
@ -678,7 +678,7 @@ if ($action == 'edit' || $action == 'updateedit')
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
print '<td align="right">&nbsp;</td>';
print '<td class="right">&nbsp;</td>';
print "</tr>\n";
@ -821,7 +821,7 @@ else
{
print '<a class="img_logo" href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a>&nbsp;&nbsp;';
}
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{
print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
}
@ -1040,7 +1040,7 @@ else
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
print '<td align="right">&nbsp;</td>';
print '<td class="right">&nbsp;</td>';
print "</tr>\n";
@ -1077,7 +1077,7 @@ else
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
print '<td align="right">&nbsp;</td>';
print '<td class="right">&nbsp;</td>';
print "</tr>\n";
@ -1097,11 +1097,11 @@ else
{
print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
}
else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1)
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==1)
{
print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
}
else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){
print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
}
@ -1131,7 +1131,7 @@ else
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
print '<td align="right">&nbsp;</td>';
print '<td class="right">&nbsp;</td>';
print "</tr>\n";
@ -1151,11 +1151,11 @@ else
{
print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
}
else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1)
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==1)
{
print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
}
else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2)
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==2)
{
print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
}

View File

@ -71,7 +71,7 @@ if ($action == 'activate_delivery')
header("Location: confexped.php");
exit;
}
else if ($action == 'disable_delivery')
elseif ($action == 'disable_delivery')
{
dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity);
header("Location: confexped.php");

View File

@ -233,7 +233,7 @@ $sql.= ", entity";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug
else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
elseif (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name'));
$sql.= " ORDER BY entity, name ASC";

View File

@ -69,7 +69,7 @@ if ($action == 'updateMask')
}
}
else if ($action == 'specimen') // For contract
elseif ($action == 'specimen') // For contract
{
$modele= GETPOST('module','alpha');
@ -115,12 +115,12 @@ else if ($action == 'specimen') // For contract
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -130,7 +130,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -147,7 +147,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmod')
elseif ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
@ -155,7 +155,7 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity);
}
else if ($action == 'set_other')
elseif ($action == 'set_other')
{
$freetext= GETPOST('CONTRACT_FREE_TEXT','none'); // No alpha here, we want exact string
$res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);

View File

@ -8,7 +8,7 @@
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
@ -728,7 +728,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($value == 'entity') {
elseif ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
}
if ($i) $sql.=",";
@ -780,7 +780,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
}
if ($i) $sql.=",";
@ -1125,7 +1125,7 @@ if ($id)
{
print '<td'.($class?' class="'.$class.'"':'').'>';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
@ -1409,14 +1409,14 @@ if ($id)
{
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;
}
else if ($value == 'source')
elseif ($value == 'source')
{
$valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow;
}
else if ($valuetoshow=='all') {
elseif ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='country') {
elseif ($fieldlist[$field]=='country') {
if (empty($obj->country_code))
{
$valuetoshow='-';
@ -1427,143 +1427,143 @@ if ($id)
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
}
}
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
elseif ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
$valuetoshow=yn($valuetoshow);
$align="center";
}
else if ($fieldlist[$field]=='type_cdr') {
elseif ($fieldlist[$field]=='type_cdr') {
if(empty($valuetoshow)) $valuetoshow = $langs->trans('None');
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
$align="center";
}
else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
$valuetoshow=price($valuetoshow);
}
if ($value == 'private')
{
$valuetoshow = yn($elementList[$valuetoshow]);
}
else if ($fieldlist[$field]=='libelle_facture') {
elseif ($fieldlist[$field]=='libelle_facture') {
$langs->load("bills");
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
$valuetoshow=nl2br($valuetoshow);
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
$key=$langs->trans("Country".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
$langs->load("propal");
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
$key=$langs->trans("Action".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
elseif (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
$key=$langs->trans("Currency".strtoupper($obj->code_iso));
$valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
$key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
$key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
$key=$langs->trans("Civility".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
$langs->load('agenda');
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
$langs->load("bills");
$key=$langs->trans("PaymentConditionShort".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
$langs->load("bills");
$key=$langs->trans("PaymentType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
$key=$langs->trans("DemandReasonType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
$langs->load("orders");
$key=$langs->trans($obj->code);
$valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]};
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
$langs->load("sendings");
$key=$langs->trans("SendingMethod".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
elseif ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
{
$key = $langs->trans('PaperFormat'.strtoupper($obj->code));
$valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
{
$langs->load('trips');
$key = $langs->trans(strtoupper($obj->code));
$valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
$showfield=0;
}
else if ($fieldlist[$field]=='unicode') {
elseif ($fieldlist[$field]=='unicode') {
$valuetoshow = $langs->getCurrencySymbol($obj->code,1);
}
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
elseif ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
$langs->load("products");
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
elseif ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
$langs->load("products");
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
}
else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
{
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
elseif ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
$align="center";
}
else if ($fieldlist[$field]=='localtax1_type') {
elseif ($fieldlist[$field]=='localtax1_type') {
if ($obj->localtax1 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='localtax2_type') {
elseif ($fieldlist[$field]=='localtax2_type') {
if ($obj->localtax2 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='taux') {
elseif ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="center";
}
else if (in_array($fieldlist[$field],array('recuperableonly')))
elseif (in_array($fieldlist[$field],array('recuperableonly')))
{
$align="center";
}
else if ($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') {
$valuetoshow = length_accountg($valuetoshow);
}
elseif ($fieldlist[$field] == 'fk_tva')
@ -1604,8 +1604,8 @@ if ($id)
if (isset($obj->code) && $id != 10)
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 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; }
}
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; }
@ -1639,8 +1639,8 @@ if ($id)
else
{
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
elseif (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
else print $langs->trans("AlwaysActive");
}
print "</td>";
@ -1755,7 +1755,7 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return string '' or value of entity into table
*/
function fieldList($fieldlist, $obj='', $tabname='', $context='')
function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db,$mysoc;
global $form;
@ -1990,4 +1990,3 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
return $withentity;
}

View File

@ -53,6 +53,6 @@ try {
// Here we are dealing with errors
$trace = $e->getTrace();
if ($trace[0]['args'][0] == 404) die('Bad ID');
else if ($trace[0]['args'][0] == 401) die('Bad auth key');
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
else die('Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV);
}

View File

@ -54,7 +54,7 @@ class Dolistore
*
* @param boolean $debug Enable debug of request on screen
*/
function __construct($debug=false)
function __construct($debug = false)
{
global $conf, $langs;
@ -154,7 +154,7 @@ class Dolistore
// Here we are dealing with errors
$trace = $e->getTrace();
if ($trace[0]['args'][0] == 404) die('Bad ID');
else if ($trace[0]['args'][0] == 401) die('Bad auth key');
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
else
{
print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'<br>';

View File

@ -100,7 +100,7 @@ else
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Disabled"),'off').'</a>';
}
else if(! empty($conf->global->USER_MAIL_REQUIRED))
elseif(! empty($conf->global->USER_MAIL_REQUIRED))
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Enabled"),'on').'</a>';
}

View File

@ -404,7 +404,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
else
{
//$morehtmlstatus .= imap_num_msg($connection).'</div><div class="statusref">';
$morehtml .= imap_num_msg($connection);
}
@ -449,7 +448,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</td><td>';
print '<input type="text" name="rulevalue">';
print '</td>';
print '<td align="right"><input type="submit" name="addfilter" id="addfilter" class="flat button" value="'.$langs->trans("Add").'"></td>';
print '<td class="right"><input type="submit" name="addfilter" id="addfilter" class="flat button" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
// List filters
foreach($object->filters as $rulefilter)
@ -462,7 +461,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans($arrayoftypes[$rulefilter['type']]);
print '</td>';
print '<td>'.$rulefilter['rulevalue'].'</td>';
print '<td align="right">';
print '<td class="right">';
//print $rulefilterobj->getLibStatut(3);
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletefilter&filterid='.$rulefilter['id'].'">'.img_delete().'</a>';
print '</td>';
@ -492,7 +491,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $form->textwithpicto('', $htmltext);
print '</td>';
print '<td></td>';
print '<td align="right"><input type="submit" name="addoperation" id="addoperation" class="flat button" value="'.$langs->trans("Add").'"></td>';
print '<td class="right"><input type="submit" name="addoperation" id="addoperation" class="flat button" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
// List operations
$nboflines = count($object->actions);
@ -509,7 +508,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans($arrayoftypes[$ruleaction['type']]);
print '</td>';
print '<td>'.$ruleaction['actionparam'].'</td>';
print '<td align="right">';
print '<td class="right">';
//print $ruleactionobj->getLibStatut(3);
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteoperation&operationid='.$ruleaction['id'].'">'.img_delete().'</a>';
print '</td>';

View File

@ -503,7 +503,7 @@ if (isset($totalarray['pos']))
while ($i < $totalarray['nbfield'])
{
$i++;
if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
if (! empty($totalarray['pos'][$i])) print '<td class="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
else
{
if ($i == 1)

View File

@ -74,7 +74,7 @@ if ($action == 'updateMask')
}
}
else if ($action == 'set_param')
elseif ($action == 'set_param')
{
$freetext=GETPOST('SHIPPING_FREE_TEXT','none'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
@ -98,7 +98,7 @@ else if ($action == 'set_param')
}
}
else if ($action == 'specimen')
elseif ($action == 'specimen')
{
$modele=GETPOST('module','alpha');
@ -144,12 +144,12 @@ else if ($action == 'specimen')
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -159,7 +159,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -176,7 +176,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmodel')
elseif ($action == 'setmodel')
{
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
}

View File

@ -70,7 +70,7 @@ if ($action == 'updateMask')
}
}
else if ($action == 'specimen') // For fiche inter
elseif ($action == 'specimen') // For fiche inter
{
$modele= GETPOST('module','alpha');
@ -118,7 +118,7 @@ else if ($action == 'specimen') // For fiche inter
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF))
@ -127,7 +127,7 @@ else if ($action == 'set')
}
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -137,7 +137,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -154,7 +154,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmod')
elseif ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
@ -162,7 +162,7 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "EXPENSEREPORT_ADDON",$value,'chaine',0,'',$conf->entity);
}
else if ($action == 'setoptions')
elseif ($action == 'setoptions')
{
$db->begin();

View File

@ -154,7 +154,7 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab)
echo '<td width="30%">'.$langs->trans('expenseReportPrintExample', price($range->ik->offset + 5 * $range->ik->coef)).'</td>';
// Action
echo '<td align="right">';
echo '<td class="right">';
if ($range->range_active == 1)
{
if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat)

View File

@ -187,7 +187,7 @@ if ($action != 'edit')
echo '<td>'.$form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0).'</td>';
echo '<td><input type="text" value="" name="amount" class="amount" />'.$conf->currency.'</td>';
echo '<td>'.$form->selectyesno('restrictive', 0, 1).'</td>';
echo '<td align="right"><input type="submit" class="button" value="'.$langs->trans('Add').'" /></td>';
echo '<td class="right"><input type="submit" class="button" value="'.$langs->trans('Add').'" /></td>';
echo '</tr>';
echo '</table>';

View File

@ -259,7 +259,7 @@ if ($resql)
print "<tr class=\"liste_titre\">";
print "<td>".$langs->trans("RSS")." ".($i+1)."</td>";
print '<td align="right">';
print '<td class="right">';
print "<input type=\"submit\" class=\"button\" name=\"modify\" value=\"".$langs->trans("Modify")."\">";
print " &nbsp; ";
print "<input type=\"submit\" class=\"button\" name=\"delete\" value=\"".$langs->trans("Delete")."\">";

View File

@ -124,12 +124,12 @@ if ($action == 'specimen')
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -139,7 +139,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "FACTURE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -156,7 +156,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmod')
elseif ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
@ -619,7 +619,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Type").'</td>';
print '<td>'.$langs->trans("Name").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
$listtype=array(
@ -662,7 +662,7 @@ print '<tr class="liste_titre">';
print '<td>';
print '<input type="hidden" name="action" value="setribchq">';
print $langs->trans("PaymentMode").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
print '<tr class="oddeven">';
@ -762,7 +762,7 @@ print '<tr class="oddeven"><td>';
print $langs->trans("ForceInvoiceDate");
print '</td><td width="60" align="center">';
print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1);
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
print "</td></tr>\n";
print '</form>';
@ -789,7 +789,7 @@ else
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
print $doleditor->Create();
}
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
print "</td></tr>\n";
print '</form>';
@ -802,7 +802,7 @@ print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td>';
print '<td><input size="50" class="flat" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.'" />';
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
print "</td></tr>\n";
print '</form>';
@ -842,7 +842,7 @@ print "</tr>\n";
print '<tr class="oddeven"><td colspan="2">';
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
print '</td><td align="right">';
print '</td><td class="right">';
print "</td></tr>\n";
print '</table>';

View File

@ -167,7 +167,7 @@ else
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
}
else if ($value == 1)
elseif ($value == 1)
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
}

View File

@ -70,7 +70,7 @@ if ($action == 'updateMask')
}
}
else if ($action == 'specimen') // For fiche inter
elseif ($action == 'specimen') // For fiche inter
{
$modele= GETPOST('module','alpha');
@ -116,12 +116,12 @@ else if ($action == 'specimen') // For fiche inter
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -131,7 +131,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -148,7 +148,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmod')
elseif ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
@ -156,7 +156,7 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "FICHEINTER_ADDON",$value,'chaine',0,'',$conf->entity);
}
else if ($action == 'set_FICHINTER_FREE_TEXT')
elseif ($action == 'set_FICHINTER_FREE_TEXT')
{
$freetext= GETPOST('FICHINTER_FREE_TEXT','none'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
@ -173,7 +173,7 @@ else if ($action == 'set_FICHINTER_FREE_TEXT')
}
}
else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK')
{
$draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
@ -554,7 +554,7 @@ else
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
print $doleditor->Create();
}
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
@ -567,7 +567,7 @@ print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input size="50" class="flat" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.$conf->global->FICHINTER_DRAFT_WATERMARK.'">';
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
@ -581,7 +581,7 @@ print '<td align="center"><input type="checkbox" name="FICHINTER_PRINT_PRODUCTS"
if ($conf->global->FICHINTER_PRINT_PRODUCTS)
print 'checked ';
print '/>';
print '</td><td align="right">';
print '</td><td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
@ -596,7 +596,7 @@ print '</td>';
print '<td align="center">';
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"' . ($conf->global->FICHINTER_USE_SERVICE_DURATION?' checked':'') . '>';
print '</td>';
print '<td align="right">';
print '<td class="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</td>';
print '</tr>';
@ -612,7 +612,7 @@ print '</td>';
print '<td align="center">';
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"' . ($conf->global->FICHINTER_WITHOUT_DURATION?' checked':'') . '>';
print '</td>';
print '<td align="right">';
print '<td class="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</td>';
print '</tr>';
@ -628,7 +628,7 @@ print '</td>';
print '<td align="center">';
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"' . ($conf->global->FICHINTER_DATE_WITHOUT_HOUR?' checked':'') . '>';
print '</td>';
print '<td align="right">';
print '<td class="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</td>';
print '</tr>';

View File

@ -102,7 +102,7 @@ print '<input type="hidden" name="action" value="set">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
print '<tr class="oddeven"><td width=\"50%\">'.$langs->trans("PathToGeoIPMaxmindCountryDataFile").'</td>';

View File

@ -71,7 +71,7 @@ if ($action == 'updateMask')
}
}
else if ($action == 'specimen') // For contract
elseif ($action == 'specimen') // For contract
{
$modele= GETPOST('module','alpha');
@ -117,12 +117,12 @@ else if ($action == 'specimen') // For contract
}
// Activate a model
else if ($action == 'set')
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
else if ($action == 'del')
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@ -132,7 +132,7 @@ else if ($action == 'del')
}
// Set default model
else if ($action == 'setdoc')
elseif ($action == 'setdoc')
{
if (dolibarr_set_const($db, "HOLIDAY_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@ -149,7 +149,7 @@ else if ($action == 'setdoc')
}
}
else if ($action == 'setmod')
elseif ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
@ -157,7 +157,7 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "HOLIDAY_ADDON",$value,'chaine',0,'',$conf->entity);
}
else if ($action == 'set_other')
elseif ($action == 'set_other')
{
$freetext= GETPOST('HOLIDAY_FREE_TEXT','none'); // No alpha here, we want exact string
$res1 = dolibarr_set_const($db, "HOLIDAY_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);

View File

@ -173,7 +173,7 @@ if ($action == 'update')
{
dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND",$original_file,'chaine',0,'',$conf->entity);
}
else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
{
$error++;
$langs->load("errors");

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