fix phan (#29560)
* fix phan * fix excludes * clean code * css picto * clean code
This commit is contained in:
parent
ee3578afa1
commit
028554c8fc
4 changed files with 50 additions and 48 deletions
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2023 Charlene Benke <charlene@patas_monkey.com>
|
||||
* Copyright (C) 2023 Christian Foellmann <christian@foellmann.de>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -770,7 +771,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
if (getDolGlobalString('PROJECT_FILTER_FOR_THIRDPARTY_LIST')) {
|
||||
$filter = getDolGlobalString('PROJECT_FILTER_FOR_THIRDPARTY_LIST');
|
||||
}
|
||||
$text = img_picto('', 'company').$form->select_company(GETPOSTINT('socid'), 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
|
||||
$text = img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company(GETPOSTINT('socid'), 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
|
||||
if (!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') && empty($conf->dol_use_jmobile)) {
|
||||
$texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty");
|
||||
print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2014-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Maxime Nicolas <maxime@oarces.com>
|
||||
* Copyright (C) 2023 Benjamin GREMBI <benjamin@oarces.com>
|
||||
|
|
@ -569,7 +569,7 @@ if ($action == 'create' && $permissiontoadd) {
|
|||
print '<tr><td class="titlefieldcreate">';
|
||||
print $form->editfieldkey('Employee', 'fk_user', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$noactive = 0; // We keep active and unactive users
|
||||
print img_picto('', 'user', 'class="paddingrighonly"').$form->select_dolusers(GETPOSTINT('fk_user'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, 'AND employee=1', 0, '', 'maxwidth300', $noactive);
|
||||
print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers(GETPOSTINT('fk_user'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, 'AND employee=1', 0, '', 'maxwidth300', $noactive);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
|
@ -626,7 +626,7 @@ if ($action == 'create' && $permissiontoadd) {
|
|||
if (isModEnabled("bank")) {
|
||||
print '<tr><td id="label_fk_account">';
|
||||
print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print img_picto('', 'bank_account', 'class="paddingrighonly"');
|
||||
print img_picto('', 'bank_account', 'class="pictofixedwidth"');
|
||||
$form->select_comptes($accountid, "accountid", 0, '', 1); // Affiche liste des comptes courant
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2021-2022 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -525,12 +526,13 @@ if (getDolGlobalString('TAKEPOS_CUSTOMER_DISPLAY')) {
|
|||
|
||||
<?php
|
||||
$showothercurrency = 0;
|
||||
if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
|
||||
$sessioncurrency = $_SESSION["takeposcustomercurrency"] ?? '';
|
||||
if (isModEnabled('multicurrency') && $sessioncurrency != "" && $conf->currency != $sessioncurrency) {
|
||||
// Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
|
||||
$showothercurrency = 1;
|
||||
include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php';
|
||||
$multicurrency = new MultiCurrency($db);
|
||||
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
|
||||
$multicurrency->fetch(0, $sessioncurrency);
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -539,7 +541,7 @@ if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]
|
|||
<span class="takepospay colorwhite"><?php echo $langs->trans('TotalTTC'); ?>: <span id="totaldisplay" class="colorwhite"><?php
|
||||
echo price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency);
|
||||
if ($showothercurrency) {
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $sessioncurrency . ')</span>';
|
||||
}
|
||||
?></span></span>
|
||||
</div>
|
||||
|
|
@ -548,7 +550,7 @@ if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]
|
|||
<span class="takepospay colorwhite"><?php echo $langs->trans('RemainToPay'); ?>: <span id="remaintopaydisplay" class="colorwhite"><?php
|
||||
echo price($remaintopay, 1, '', 1, -1, -1, $invoice->multicurrency_code);
|
||||
if ($showothercurrency) {
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($remaintopay * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($remaintopay * $multicurrency->rate->rate) . ' ' . $sessioncurrency . ')</span>';
|
||||
}
|
||||
?></span></span>
|
||||
</div>
|
||||
|
|
@ -557,7 +559,7 @@ if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]
|
|||
<span class="takepospay colorwhite"><?php echo $langs->trans("Received"); ?>: <span class="change1 colorred"><?php
|
||||
echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code);
|
||||
if ($showothercurrency) {
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $sessioncurrency . ')</span>';
|
||||
}
|
||||
?></span><input type="hidden" id="change1" class="change1" value="0"></span>
|
||||
</div>
|
||||
|
|
@ -565,7 +567,7 @@ if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]
|
|||
<span class="takepospay colorwhite"><?php echo $langs->trans("Change"); ?>: <span class="change2 colorwhite"><?php
|
||||
echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code);
|
||||
if ($showothercurrency) {
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
|
||||
print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $sessioncurrency . ')</span>';
|
||||
}
|
||||
?></span><input type="hidden" id="change2" class="change2" value="0"></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Frédéric FRANCE <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
require '../../main.inc.php';
|
||||
|
||||
// Libraries
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/zapier/lib/zapier.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/zapier/lib/zapier.lib.php';
|
||||
|
||||
// Translations
|
||||
$langs->loadLangs(array('admin', 'zapier'));
|
||||
|
|
@ -42,8 +42,8 @@ $action = GETPOST('action', 'aZ09');
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$arrayofparameters = array(
|
||||
// 'ZAPIERFORDOLIBARR_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1),
|
||||
// 'ZAPIERFORDOLIBARR_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1)
|
||||
// 'ZAPIERFORDOLIBARR_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1),
|
||||
// 'ZAPIERFORDOLIBARR_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1)
|
||||
);
|
||||
|
||||
if (!isModEnabled('zapier')) {
|
||||
|
|
@ -58,7 +58,7 @@ if (empty($user->admin)) {
|
|||
* Actions
|
||||
*/
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
/*
|
||||
* View
|
||||
|
|
@ -69,7 +69,7 @@ $help_url = 'EN:Module_Zapier';
|
|||
llxHeader('', $langs->trans($page_name), $help_url);
|
||||
|
||||
// Subheader
|
||||
$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier');
|
||||
|
||||
|
|
@ -77,49 +77,48 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier');
|
|||
$head = zapierAdminPrepareHead();
|
||||
print dol_get_fiche_head($head, 'settings', '', -1, "zapier");
|
||||
|
||||
if (!empty($arrayofparameters)) {
|
||||
if ($action == 'edit') {
|
||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
if ($action == 'edit') {
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
foreach ($arrayofparameters as $key => $val) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
|
||||
print '</td><td><input name="'.$key.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.getDolGlobalString($key).'"></td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
} else {
|
||||
if (!empty($arrayofparameters)) {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td class="titlefield">' . $langs->trans("Parameter") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
|
||||
|
||||
foreach ($arrayofparameters as $key => $val) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
|
||||
print '</td><td>'.getDolGlobalString($key).'</td></tr>';
|
||||
print $form->textwithpicto($langs->trans($key), $langs->trans($key . 'Tooltip'));
|
||||
print '</td><td><input name="' . $key . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . getDolGlobalString($key) . '"></td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button button-save" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
} else {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">' . $langs->trans("Parameter") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
|
||||
|
||||
foreach ($arrayofparameters as $key => $val) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans($key), $langs->trans($key . 'Tooltip'));
|
||||
print '</td><td>' . getDolGlobalString($key) . '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&token=' . newToken() . '">' . $langs->trans("Modify") . '</a>';
|
||||
print '</div>';
|
||||
} else {
|
||||
// Setup page goes here
|
||||
echo '<br><br><span class="opacitymediumdisabled">'.$langs->trans("ZapierSetupPage").'</span><br><br>';
|
||||
//print '<br>'.$langs->trans("NothingToSetup");
|
||||
}
|
||||
} else {
|
||||
// Setup page goes here
|
||||
echo '<br><br><span class="opacitymediumdisabled">' . $langs->trans("ZapierSetupPage") . '</span><br><br>';
|
||||
//print '<br>'.$langs->trans("NothingToSetup");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue