Merge remote-tracking branch 'upstream/develop' into trimtrailing
This commit is contained in:
commit
6f74ecceaf
@ -133,7 +133,7 @@ install:
|
|||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Installing PHP CodeSniffer"
|
echo "Installing PHP CodeSniffer"
|
||||||
composer -n require squizlabs/php_codesniffer ^2
|
composer -n require squizlabs/php_codesniffer ^3
|
||||||
echo
|
echo
|
||||||
|
|
||||||
- |
|
- |
|
||||||
@ -384,4 +384,3 @@ after_failure:
|
|||||||
# TODO: PostgreSQL log file
|
# TODO: PostgreSQL log file
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
<description>Dolibarr coding standard.</description>
|
<description>Dolibarr coding standard.</description>
|
||||||
|
|
||||||
<exclude-pattern type="relative">build/html</exclude-pattern>
|
<exclude-pattern type="relative">build/html</exclude-pattern>
|
||||||
|
<exclude-pattern type="relative">build/aps</exclude-pattern>
|
||||||
<exclude-pattern type="relative">documents</exclude-pattern>
|
<exclude-pattern type="relative">documents</exclude-pattern>
|
||||||
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
|
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
|
||||||
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
||||||
@ -24,29 +25,14 @@
|
|||||||
|
|
||||||
<!-- Rules from Generic Standard -->
|
<!-- Rules from Generic Standard -->
|
||||||
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
<rule ref="Generic.CodeAnalysis.EmptyStatement">
|
||||||
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElse"/>
|
||||||
<severity>0</severity>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
|
||||||
</rule>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH">
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedForeach"/>
|
||||||
<severity>0</severity>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowed"/>
|
||||||
</rule>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"/>
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
||||||
@ -376,6 +362,9 @@
|
|||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|||||||
@ -91,7 +91,7 @@ if ($id > 0)
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -366,7 +366,7 @@ if ($action == 'edit')
|
|||||||
{
|
{
|
||||||
|
|
||||||
$mainstmpid=(! empty($conf->global->MAIN_MAIL_SMTPS_ID)?$conf->global->MAIN_MAIL_SMTPS_ID:'');
|
$mainstmpid=(! empty($conf->global->MAIN_MAIL_SMTPS_ID)?$conf->global->MAIN_MAIL_SMTPS_ID:'');
|
||||||
print '<tr '.$bcdd[$var].'><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>';
|
print '<tr class="drag drop oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
||||||
{
|
{
|
||||||
@ -386,7 +386,7 @@ if ($action == 'edit')
|
|||||||
{
|
{
|
||||||
|
|
||||||
$mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW)?$conf->global->MAIN_MAIL_SMTPS_PW:'');
|
$mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW)?$conf->global->MAIN_MAIL_SMTPS_PW:'');
|
||||||
print '<tr '.$bcdd[$var].'><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>';
|
print '<tr class="drag drop oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,14 +19,11 @@
|
|||||||
/**
|
/**
|
||||||
* \file admin/multicurrency.php
|
* \file admin/multicurrency.php
|
||||||
* \ingroup multicurrency
|
* \ingroup multicurrency
|
||||||
* \brief This file is an example module setup page
|
* \brief Page to setup multicurrency module
|
||||||
* Put some comments here
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Dolibarr environment
|
// Dolibarr environment
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
|
|
||||||
// Libraries
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
||||||
@ -42,6 +39,8 @@ if (! $user->admin) {
|
|||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -164,6 +163,8 @@ if ($resql)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form=new Form($db);
|
||||||
|
|
||||||
$page_name = "MultiCurrencySetup";
|
$page_name = "MultiCurrencySetup";
|
||||||
|
|
||||||
llxHeader('', $langs->trans($page_name));
|
llxHeader('', $langs->trans($page_name));
|
||||||
@ -176,21 +177,16 @@ print_fiche_titre($langs->trans($page_name), $linkback);
|
|||||||
$head = multicurrencyAdminPrepareHead();
|
$head = multicurrencyAdminPrepareHead();
|
||||||
dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurrency");
|
dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurrency");
|
||||||
|
|
||||||
// Setup page goes here
|
|
||||||
$form=new Form($db);
|
|
||||||
|
|
||||||
$var=false;
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="center">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").'</td>';
|
print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE">';
|
||||||
@ -200,11 +196,9 @@ print '</form>';
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>';
|
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_ORIGIN_TX">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_ORIGIN_TX">';
|
||||||
@ -217,8 +211,7 @@ print '</td></tr>';
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").'</td>';
|
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_BUY_PRICE_IN_CURRENCY">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_BUY_PRICE_IN_CURRENCY">';
|
||||||
@ -232,8 +225,7 @@ print '</td></tr>';
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").'</td>';
|
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_MODIFY_RATE_APPLICATION">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_MODIFY_RATE_APPLICATION">';
|
||||||
@ -245,16 +237,17 @@ print '</td></tr>';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
||||||
{
|
{
|
||||||
$var=false;
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize")).'</td>'."\n";
|
print '<td>'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize")).'</td>'."\n";
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="100">';
|
|
||||||
print '<form id="form_sync" action="" method="POST">';
|
print '<form id="form_sync" action="" method="POST">';
|
||||||
print '<input type="hidden" name="action" value="synchronize" />';
|
print '<input type="hidden" name="action" value="synchronize" />';
|
||||||
print '<textarea id="response" class="hideobject" name="response"></textarea>';
|
print '<textarea id="response" class="hideobject" name="response"></textarea>';
|
||||||
@ -263,11 +256,9 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td><a target="_blank" href="https://currencylayer.com">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
|
print '<td><a target="_blank" href="https://currencylayer.com">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_ID">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_ID">';
|
||||||
@ -279,8 +270,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").'</td>';
|
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_SOURCE">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_SOURCE">';
|
||||||
@ -291,8 +281,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
|
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_ALTERNATE_SOURCE">';
|
print '<input type="hidden" name="action" value="set_MULTICURRENCY_ALTERNATE_SOURCE">';
|
||||||
@ -302,35 +291,35 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n";
|
print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n";
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="center">'.$langs->trans("Rate").'</td>'."\n";
|
||||||
print '<td align="center" width="100">'.$langs->trans("Rate").'</td>'."\n";
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$form->selectCurrency('', 'code').'</td>';
|
||||||
|
print '<td align="right">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add_currency">';
|
print '<input type="hidden" name="action" value="add_currency">';
|
||||||
print '<td>'.$form->selectCurrency('', 'code').'</td>';
|
|
||||||
print '<td align="center" width="20"> </td>';
|
|
||||||
print '<td align="right" width="300">';
|
|
||||||
print '<input type="text" name="rate" value="" size="13" placeholder="'.$langs->trans('Rate').'" /> ';
|
print '<input type="text" name="rate" value="" size="13" placeholder="'.$langs->trans('Rate').'" /> ';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print '</td></form></tr>';
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).'</td>';
|
print '<td>'.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">1</td>';
|
||||||
print '<td align="right" width="300">1';
|
print '</tr>';
|
||||||
print '</td></form></tr>';
|
|
||||||
|
|
||||||
foreach ($TCurrency as &$currency)
|
foreach ($TCurrency as &$currency)
|
||||||
{
|
{
|
||||||
@ -338,8 +327,7 @@ foreach ($TCurrency as &$currency)
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$currency->code.' - '.$currency->name.'</td>';
|
print '<td>'.$currency->code.' - '.$currency->name.'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="right">';
|
||||||
print '<td align="right" width="400">';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update_currency">';
|
print '<input type="hidden" name="action" value="update_currency">';
|
||||||
@ -349,13 +337,11 @@ foreach ($TCurrency as &$currency)
|
|||||||
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Modify").'"> ';
|
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Modify").'"> ';
|
||||||
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Delete").'">';
|
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Delete").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
print '
|
print '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -65,6 +65,8 @@ class DolibarrApi
|
|||||||
|
|
||||||
$this->r->setBaseUrls($urlwithouturlroot, $urlwithouturlrootautodetect);
|
$this->r->setBaseUrls($urlwithouturlroot, $urlwithouturlrootautodetect);
|
||||||
$this->r->setAPIVersion(1);
|
$this->r->setAPIVersion(1);
|
||||||
|
//$this->r->setSupportedFormats('json');
|
||||||
|
//$this->r->setSupportedFormats('jsonFormat');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -95,8 +95,8 @@ if (empty($reshook))
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||||
|
|
||||||
// Actions to send emails
|
// Actions to send emails
|
||||||
$trigger_name='MYOBJECT_SENTBYMAIL';
|
$trigger_name='ASSET_SENTBYMAIL';
|
||||||
$autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO';
|
$autocopy='MAIN_MAIL_AUTOCOPY_ASSET_TO';
|
||||||
$trackid='asset'.$object->id;
|
$trackid='asset'.$object->id;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'document', $langs->trans("Asset"), -1, 'generic');
|
dol_fiche_head($head, 'document', $langs->trans("Asset"), -1, 'generic');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -239,7 +239,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -303,8 +303,6 @@ if ($object->fetch($id) >= 0)
|
|||||||
// Sort $modulenames
|
// Sort $modulenames
|
||||||
sort($modulenames);
|
sort($modulenames);
|
||||||
|
|
||||||
$var = true;
|
|
||||||
|
|
||||||
// Loop on each submodule
|
// Loop on each submodule
|
||||||
foreach($modulenames as $modulename)
|
foreach($modulenames as $modulename)
|
||||||
{
|
{
|
||||||
@ -330,16 +328,14 @@ if ($object->fetch($id) >= 0)
|
|||||||
// Si le module mailing est qualifie
|
// Si le module mailing est qualifie
|
||||||
if ($qualified)
|
if ($qualified)
|
||||||
{
|
{
|
||||||
$var = ! $var;
|
|
||||||
|
|
||||||
if ($allowaddtarget)
|
if ($allowaddtarget)
|
||||||
{
|
{
|
||||||
print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<div '.$bctag[$var].'>';
|
print '<div class="oddeven tagtr">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="tagtd">';
|
print '<div class="tagtd">';
|
||||||
|
|||||||
@ -94,7 +94,7 @@ if ($object->id > 0)
|
|||||||
$head = propal_prepare_head($object);
|
$head = propal_prepare_head($object);
|
||||||
dol_fiche_head($head, 'document', $langs->trans('Proposal'), -1, 'propal');
|
dol_fiche_head($head, 'document', $langs->trans('Proposal'), -1, 'propal');
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -159,6 +159,7 @@ $arrayfields=array(
|
|||||||
'p.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
'p.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
||||||
'p.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
'p.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
||||||
'u.login'=>array('label'=>$langs->trans("Author"), 'checked'=>1, 'position'=>10),
|
'u.login'=>array('label'=>$langs->trans("Author"), 'checked'=>1, 'position'=>10),
|
||||||
|
'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1),
|
||||||
'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||||
'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||||
@ -667,6 +668,10 @@ if ($resql)
|
|||||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
if (! empty($arrayfields['sale_representative']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
|
|
||||||
@ -721,6 +726,7 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'],$_SERVER["PHP_SELF"],'p.tva','',$param, 'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'],$_SERVER["PHP_SELF"],'p.tva','',$param, 'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'],$_SERVER["PHP_SELF"],'p.total','',$param, 'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'],$_SERVER["PHP_SELF"],'p.total','',$param, 'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'],$_SERVER["PHP_SELF"],'u.login','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'],$_SERVER["PHP_SELF"],'u.login','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
|
if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
@ -943,6 +949,51 @@ if ($resql)
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($arrayfields['sale_representative']['checked']))
|
||||||
|
{
|
||||||
|
// Sales representatives
|
||||||
|
print '<td>';
|
||||||
|
if ($obj->socid > 0)
|
||||||
|
{
|
||||||
|
$listsalesrepresentatives=$companystatic->getSalesRepresentatives($user);
|
||||||
|
if ($listsalesrepresentatives < 0) dol_print_error($db);
|
||||||
|
$nbofsalesrepresentative=count($listsalesrepresentatives);
|
||||||
|
if ($nbofsalesrepresentative > 3) // We print only number
|
||||||
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$companystatic->id.'">';
|
||||||
|
print $nbofsalesrepresentative;
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else if ($nbofsalesrepresentative > 0)
|
||||||
|
{
|
||||||
|
$userstatic=new User($db);
|
||||||
|
$j=0;
|
||||||
|
foreach($listsalesrepresentatives as $val)
|
||||||
|
{
|
||||||
|
$userstatic->id=$val['id'];
|
||||||
|
$userstatic->lastname=$val['lastname'];
|
||||||
|
$userstatic->firstname=$val['firstname'];
|
||||||
|
$userstatic->email=$val['email'];
|
||||||
|
$userstatic->statut=$val['statut'];
|
||||||
|
$userstatic->entity=$val['entity'];
|
||||||
|
$userstatic->photo=$val['photo'];
|
||||||
|
|
||||||
|
//print '<div class="float">':
|
||||||
|
print $userstatic->getNomUrl(-2);
|
||||||
|
$j++;
|
||||||
|
if ($j < $nbofsalesrepresentative) print ' ';
|
||||||
|
//print '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//else print $langs->trans("NoSalesRepresentativeAffected");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
|
|||||||
@ -295,8 +295,7 @@ class Orders extends DolibarrApi
|
|||||||
if ($updateRes > 0) {
|
if ($updateRes > 0) {
|
||||||
return $updateRes;
|
return $updateRes;
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new RestException(400, $this->commande->error);
|
throw new RestException(400, $this->commande->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -391,9 +390,7 @@ class Orders extends DolibarrApi
|
|||||||
$updateRes = $this->commande->deleteline(DolibarrApiAccess::$user,$lineid);
|
$updateRes = $this->commande->deleteline(DolibarrApiAccess::$user,$lineid);
|
||||||
if ($updateRes > 0) {
|
if ($updateRes > 0) {
|
||||||
return $this->get($id);
|
return $this->get($id);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new RestException(405, $this->commande->error);
|
throw new RestException(405, $this->commande->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -785,7 +782,7 @@ class Orders extends DolibarrApi
|
|||||||
$commande = array();
|
$commande = array();
|
||||||
foreach (Orders::$FIELDS as $field) {
|
foreach (Orders::$FIELDS as $field) {
|
||||||
if (!isset($data[$field]))
|
if (!isset($data[$field]))
|
||||||
throw new RestException(400, "$field field missing");
|
throw new RestException(400, $field ." field missing");
|
||||||
$commande[$field] = $data[$field];
|
$commande[$field] = $data[$field];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,7 +97,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$head = commande_prepare_head($object);
|
$head = commande_prepare_head($object);
|
||||||
dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), -1, 'order');
|
dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), -1, 'order');
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -78,6 +78,7 @@ $search_categ_cus=trim(GETPOST("search_categ_cus",'int'));
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
$billed = GETPOST('billed','int');
|
$billed = GETPOST('billed','int');
|
||||||
$viewstatut=GETPOST('viewstatut');
|
$viewstatut=GETPOST('viewstatut');
|
||||||
|
$search_project_ref=GETPOST('search_project_ref','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = (GETPOST('orderid')?GETPOST('orderid','int'):GETPOST('id','int'));
|
$id = (GETPOST('orderid')?GETPOST('orderid','int'):GETPOST('id','int'));
|
||||||
|
|||||||
@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), -1, 'account');
|
dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), -1, 'account');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$',
|
$filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
(strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1);
|
(strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1);
|
||||||
|
|||||||
@ -124,7 +124,7 @@ if ($object->id)
|
|||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -91,7 +91,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
|
dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$totalpaye = $object->getSommePaiement();
|
$totalpaye = $object->getSommePaiement();
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -268,7 +268,6 @@ if ($massaction == 'withdrawrequest')
|
|||||||
$totalcreditnotes = $objecttmp->getSumCreditNotesUsed();
|
$totalcreditnotes = $objecttmp->getSumCreditNotesUsed();
|
||||||
$totaldeposits = $objecttmp->getSumDepositsUsed();
|
$totaldeposits = $objecttmp->getSumDepositsUsed();
|
||||||
$objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT');
|
$objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT');
|
||||||
$listofbills[] = $objecttmp;
|
|
||||||
if($objecttmp->paye || $objecttmp->resteapayer==0){
|
if($objecttmp->paye || $objecttmp->resteapayer==0){
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors');
|
setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors');
|
||||||
@ -300,18 +299,21 @@ if ($massaction == 'withdrawrequest')
|
|||||||
|
|
||||||
if ($numprlv>0){
|
if ($numprlv>0){
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'errors');
|
setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings');
|
||||||
}
|
}
|
||||||
if (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){
|
else if (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors');
|
setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Massive withdraw request
|
//Massive withdraw request for request with no errors
|
||||||
if(!empty($listofbills) && empty($error))
|
if(!empty($listofbills))
|
||||||
{
|
{
|
||||||
$nbwithdrawrequestok=0;
|
$nbwithdrawrequestok=0;
|
||||||
foreach($listofbills as $aBill)
|
foreach($listofbills as $aBill)
|
||||||
|
|||||||
@ -251,8 +251,6 @@ foreach ($tabfac as $key => $val)
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -282,7 +282,6 @@ foreach ($tabfac as $key => $val)
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -299,6 +299,7 @@ if ($id)
|
|||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -325,5 +325,6 @@ if($calc ==0){
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -587,5 +587,6 @@ pt($db, $sql, $langs->trans("Month"));
|
|||||||
|
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -103,5 +103,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -640,5 +640,6 @@ else
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -450,6 +450,6 @@ if ($user->societe_id == 0 && $action == '')
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -806,8 +806,6 @@ if ($action != 'new')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -151,6 +151,6 @@ else
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -250,6 +250,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -31,5 +31,6 @@ llxHeader();
|
|||||||
|
|
||||||
print load_fiche_titre("Payments");
|
print load_fiche_titre("Payments");
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -76,5 +76,6 @@ print '</div>';
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -371,5 +371,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -166,6 +166,6 @@ if ($year)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -139,5 +139,6 @@ if ($resql)
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -323,8 +323,6 @@ if ($action == '')
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -183,7 +183,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -419,6 +419,6 @@ if ($id > 0 || $ref)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -324,5 +324,6 @@ else
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -167,5 +167,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -296,7 +296,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -245,5 +245,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -193,5 +193,6 @@ if ($prev_id > 0 || $ref)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -221,6 +221,6 @@ else
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -334,6 +334,6 @@ if ($id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -213,5 +213,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -120,5 +120,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -225,7 +225,7 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -1210,6 +1210,6 @@ if ($mysoc->tva_assuj != 'franchise') // Assujetti
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1009,5 +1009,6 @@ print "</tr>\n";
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -537,5 +537,6 @@ else if ($modecompta=="BOOKKEEPING")
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -486,8 +486,6 @@ if ($id)
|
|||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -90,7 +90,7 @@ if ($object->id)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'payment');
|
dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'payment');
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
@ -133,6 +133,6 @@ else
|
|||||||
print $langs->trans("ErrorUnknown");
|
print $langs->trans("ErrorUnknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -294,6 +294,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -79,6 +79,6 @@ print '</div>';
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -288,7 +288,6 @@ print '<div style="clear:both"></div>';
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -750,7 +750,6 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -136,7 +136,7 @@ if ($object->id)
|
|||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
@ -168,7 +168,6 @@ else
|
|||||||
print $langs->trans("ErrorUnknown");
|
print $langs->trans("ErrorUnknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -304,5 +304,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -115,6 +115,6 @@ print '</td></tr></table>';
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -480,7 +480,6 @@ if (! empty($conf->salaries->enabled) && $user->rights->salaries->read)
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -414,7 +414,6 @@ print "</table>\n";
|
|||||||
print '<br>'.$langs->trans("TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant") . '<br>';
|
print '<br>'.$langs->trans("TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant") . '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -461,5 +461,6 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
print '<br>'.$langs->trans("TurnoverPerProductInCommitmentAccountingNotRelevant") . '<br>';
|
print '<br>'.$langs->trans("TurnoverPerProductInCommitmentAccountingNotRelevant") . '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -465,7 +465,6 @@ print "</table>";
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -646,6 +646,6 @@ print "</div>";
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -629,6 +629,6 @@ print '</div>';
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -122,7 +122,7 @@ if ($object->id)
|
|||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -97,7 +97,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'documents', $title, -1, 'contact');
|
dol_fiche_head($head, 'documents', $title, -1, 'contact');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -103,7 +103,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans("Contract"), -1, 'contract');
|
dol_fiche_head($head, 'documents', $langs->trans("Contract"), -1, 'contract');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -424,25 +424,25 @@ if (! $error && $massaction == 'confirm_presend')
|
|||||||
if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYEMAIL';
|
if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYEMAIL';
|
||||||
if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYEMAIL';
|
if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYEMAIL';
|
||||||
if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYEMAIL';
|
if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYEMAIL';
|
||||||
if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYEMAIL';
|
if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYMAIL';
|
||||||
if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYEMAIL';
|
if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYEMAIL';
|
||||||
if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL';
|
if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL';
|
||||||
if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYEMAIL';
|
if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYEMAIL';
|
||||||
if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYEMAIL';
|
if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYEMAIL';
|
||||||
|
|
||||||
if (! empty($trigger_name))
|
if (! empty($triggername))
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php";
|
include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php";
|
||||||
$interface=new Interfaces($db);
|
$interface=new Interfaces($db);
|
||||||
$result=$interface->run_triggers($trigger_name, $objectobj, $user, $langs, $conf);
|
$result=$interface->run_triggers($triggername, $objectobj, $user, $langs, $conf);
|
||||||
if ($result < 0) { $error++; $errors=$interface->errors; }
|
if ($result < 0) { $error++; $errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
if ($error)
|
if ($error)
|
||||||
{
|
{
|
||||||
setEventMessages($db->lasterror(), $errors, 'errors');
|
setEventMessages($db->lasterror(), $errors, 'errors');
|
||||||
dol_syslog("Error in trigger ".$trigger_name.' '.$db->lasterror(), LOG_ERR);
|
dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -825,7 +825,8 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se
|
|||||||
}
|
}
|
||||||
|
|
||||||
$arrayofinclusion=array();
|
$arrayofinclusion=array();
|
||||||
foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf).'.pdf','/').'$';
|
foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$';
|
||||||
|
foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files
|
||||||
$listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true);
|
$listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true);
|
||||||
|
|
||||||
// build list of files with full path
|
// build list of files with full path
|
||||||
|
|||||||
@ -487,6 +487,7 @@ abstract class CommonDocGenerator
|
|||||||
$resarray= array(
|
$resarray= array(
|
||||||
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
|
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
|
||||||
'line_product_ref'=>$line->product_ref,
|
'line_product_ref'=>$line->product_ref,
|
||||||
|
'line_product_ref_fourn'=>$line->ref_fourn, // for supplier doc lines
|
||||||
'line_product_label'=>$line->product_label,
|
'line_product_label'=>$line->product_label,
|
||||||
'line_product_type'=>$line->product_type,
|
'line_product_type'=>$line->product_type,
|
||||||
'line_desc'=>$line->desc,
|
'line_desc'=>$line->desc,
|
||||||
|
|||||||
@ -6913,7 +6913,7 @@ abstract class CommonObject
|
|||||||
if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]='';
|
if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]='';
|
||||||
|
|
||||||
//var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1));
|
//var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1));
|
||||||
if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default']))
|
if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default']))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']);
|
$this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']);
|
||||||
|
|||||||
@ -756,6 +756,7 @@ class ExtraFields
|
|||||||
|
|
||||||
if ($elementtype == 'thirdparty') $elementtype='societe';
|
if ($elementtype == 'thirdparty') $elementtype='societe';
|
||||||
if ($elementtype == 'contact') $elementtype='socpeople';
|
if ($elementtype == 'contact') $elementtype='socpeople';
|
||||||
|
if ($elementtype == 'order_supplier') $elementtype='commande_fournisseur';
|
||||||
|
|
||||||
$array_name_label=array();
|
$array_name_label=array();
|
||||||
|
|
||||||
|
|||||||
@ -1087,8 +1087,18 @@ class Form
|
|||||||
|
|
||||||
// On recherche les societes
|
// On recherche les societes
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX ."societe as s";
|
|
||||||
|
if ($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST) {
|
||||||
|
$sql .= " ,s.address, s.zip, s.town";
|
||||||
|
$sql .= " , dictp.code as country_code";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql.= " FROM (".MAIN_DB_PREFIX ."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
|
$sql.= " )";
|
||||||
|
if ($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST) {
|
||||||
|
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."c_country as dictp ON dictp.rowid=s.fk_pays";
|
||||||
|
}
|
||||||
$sql.= " WHERE s.entity IN (".getEntity('societe').")";
|
$sql.= " WHERE s.entity IN (".getEntity('societe').")";
|
||||||
if (! empty($user->socid)) $sql.= " AND s.rowid = ".$user->socid;
|
if (! empty($user->socid)) $sql.= " AND s.rowid = ".$user->socid;
|
||||||
if ($filter) $sql.= " AND (".$filter.")";
|
if ($filter) $sql.= " AND (".$filter.")";
|
||||||
@ -1177,6 +1187,13 @@ class Form
|
|||||||
if ($obj->client || $obj->fournisseur) $label.=')';
|
if ($obj->client || $obj->fournisseur) $label.=')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST) {
|
||||||
|
$label.='-'.$obj->address.'-'. $obj->zip.' '. $obj->town;
|
||||||
|
if (!empty($obj->country_code)) {
|
||||||
|
$label.= ' '. $langs->trans('Country'.$obj->country_code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($outputmode))
|
if (empty($outputmode))
|
||||||
{
|
{
|
||||||
if (in_array($obj->rowid,$selected))
|
if (in_array($obj->rowid,$selected))
|
||||||
@ -6344,7 +6361,7 @@ class Form
|
|||||||
|
|
||||||
$disabled = ($disabled ? ' disabled' : '');
|
$disabled = ($disabled ? ' disabled' : '');
|
||||||
|
|
||||||
$resultyesno = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
|
$resultyesno = '<select class="flat width75" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
|
||||||
if ($useempty) $resultyesno .= '<option value="-1"'.(($value < 0)?' selected':'').'> </option>'."\n";
|
if ($useempty) $resultyesno .= '<option value="-1"'.(($value < 0)?' selected':'').'> </option>'."\n";
|
||||||
if (("$value" == 'yes') || ($value == 1))
|
if (("$value" == 'yes') || ($value == 1))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,11 +36,11 @@
|
|||||||
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
||||||
* @param int $autoselect Automatic selection if just one value
|
* @param int $autoselect Automatic selection if just one value
|
||||||
* @param array $ajaxoptions Multiple options array
|
* @param array $ajaxoptions Multiple options array
|
||||||
* Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
||||||
* Ex: array('disabled'=> )
|
* - Ex: array('disabled'=> )
|
||||||
* Ex: array('show'=> )
|
* - Ex: array('show'=> )
|
||||||
* Ex: array('update_textarea'=> )
|
* - Ex: array('update_textarea'=> )
|
||||||
* Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax)
|
* - Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax)
|
||||||
* @return string Script
|
* @return string Script
|
||||||
*/
|
*/
|
||||||
function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array())
|
function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array())
|
||||||
@ -622,4 +622,3 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=a
|
|||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -162,15 +162,15 @@ function convertTime2Seconds($iHours=0,$iMinutes=0,$iSeconds=0)
|
|||||||
*
|
*
|
||||||
* @param int $iSecond Number of seconds
|
* @param int $iSecond Number of seconds
|
||||||
* @param string $format Output format ('all': total delay days hour:min like "2 days 12:30",
|
* @param string $format Output format ('all': total delay days hour:min like "2 days 12:30",
|
||||||
* 'allwithouthour': total delay days without hour part like "2 days",
|
* - 'allwithouthour': total delay days without hour part like "2 days",
|
||||||
* 'allhourmin': total delay with format hours:min like "60:30",
|
* - 'allhourmin': total delay with format hours:min like "60:30",
|
||||||
* 'allhour': total delay hours without min/sec like "60:30",
|
* - 'allhour': total delay hours without min/sec like "60:30",
|
||||||
* 'fullhour': total delay hour decimal like "60.5" for 60:30,
|
* - 'fullhour': total delay hour decimal like "60.5" for 60:30,
|
||||||
* 'hour': only hours part "12",
|
* - 'hour': only hours part "12",
|
||||||
* 'min': only minutes part "30",
|
* - 'min': only minutes part "30",
|
||||||
* 'sec': only seconds part,
|
* - 'sec': only seconds part,
|
||||||
* 'month': only month part,
|
* - 'month': only month part,
|
||||||
* 'year': only year part);
|
* - 'year': only year part);
|
||||||
* @param int $lengthOfDay Length of day (default 86400 seconds for 1 day, 28800 for 8 hour)
|
* @param int $lengthOfDay Length of day (default 86400 seconds for 1 day, 28800 for 8 hour)
|
||||||
* @param int $lengthOfWeek Length of week (default 7)
|
* @param int $lengthOfWeek Length of week (default 7)
|
||||||
* @return string Formated text of duration
|
* @return string Formated text of duration
|
||||||
@ -964,4 +964,3 @@ function monthArray($outputlangs,$short=0)
|
|||||||
|
|
||||||
return $montharray;
|
return $montharray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1133,10 +1133,11 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
* @param int $nophperrors Disable all PHP output errors
|
* @param int $nophperrors Disable all PHP output errors
|
||||||
* @param int $nohook Disable all hooks
|
* @param int $nohook Disable all hooks
|
||||||
* @param object $object Current object in use
|
* @param object $object Current object in use
|
||||||
|
* @param boolean $allowdotdot Allow to delete file path with .. inside. Never use this, it is reserved for migration purpose.
|
||||||
* @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error
|
* @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error
|
||||||
* @see dol_delete_dir
|
* @see dol_delete_dir
|
||||||
*/
|
*/
|
||||||
function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=null)
|
function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=null,$allowdotdot=false)
|
||||||
{
|
{
|
||||||
global $db, $conf, $user, $langs;
|
global $db, $conf, $user, $langs;
|
||||||
global $hookmanager;
|
global $hookmanager;
|
||||||
@ -1148,7 +1149,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
|
|||||||
|
|
||||||
// Security:
|
// Security:
|
||||||
// We refuse transversal using .. and pipes into filenames.
|
// We refuse transversal using .. and pipes into filenames.
|
||||||
if (preg_match('/\.\./',$file) || preg_match('/[<>|]/',$file))
|
if ((! $allowdotdot && preg_match('/\.\./',$file)) || preg_match('/[<>|]/',$file))
|
||||||
{
|
{
|
||||||
dol_syslog("Refused to delete file ".$file, LOG_WARNING);
|
dol_syslog("Refused to delete file ".$file, LOG_WARNING);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -377,8 +377,8 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
|||||||
*
|
*
|
||||||
* @param array $array_sql SQL requests to be executed when enabling module
|
* @param array $array_sql SQL requests to be executed when enabling module
|
||||||
* @param string $options String with options when disabling module:
|
* @param string $options String with options when disabling module:
|
||||||
* 'noboxes' = Do not insert boxes
|
* - 'noboxes' = Do not insert boxes
|
||||||
* 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
|
* - 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
|
||||||
*
|
*
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
@ -468,7 +468,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
|||||||
*
|
*
|
||||||
* @param string[] $array_sql SQL requests to be executed when module is disabled
|
* @param string[] $array_sql SQL requests to be executed when module is disabled
|
||||||
* @param string $options Options when disabling module:
|
* @param string $options Options when disabling module:
|
||||||
* 'newboxdefonly|noboxes' = We don't remove boxes.
|
* - 'newboxdefonly|noboxes' = We don't remove boxes.
|
||||||
*
|
*
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -66,7 +66,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
?>
|
?>
|
||||||
<?php $coldisplay=0; ?>
|
<?php $coldisplay=0; ?>
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
||||||
<tr <?php echo 'id="row-'.$line->id.'" '.$bcdd[$var]; echo $domData; ?> >
|
<tr id="row-<?php echo $line->id?> class="drag drop oddeven" <?php echo $domData; ?> >
|
||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
<td class="linecolnum" align="center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
<td class="linecolnum" align="center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -321,7 +321,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
//Line extrafield
|
//Line extrafield
|
||||||
if (!empty($extrafieldsline))
|
if (!empty($extrafieldsline))
|
||||||
{
|
{
|
||||||
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bcdd[$var],'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
print $line->showOptionals($extrafieldsline, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'generic');
|
dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'generic');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -957,6 +957,7 @@ if ($action == 'create')
|
|||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
$projectid = GETPOST('projectid','int')?GETPOST('projectid','int'):0;
|
$projectid = GETPOST('projectid','int')?GETPOST('projectid','int'):0;
|
||||||
|
if(empty($projectid) && ! empty($object->fk_project)) $projectid = $object->fk_project;
|
||||||
if ($origin == 'project') $projectid = ($originid ? $originid : 0);
|
if ($origin == 'project') $projectid = ($originid ? $originid : 0);
|
||||||
|
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
|
|||||||
@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref)){
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans("Shipment"), -1, 'sending');
|
dol_fiche_head($head, 'documents', $langs->trans("Shipment"), -1, 'sending');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file){
|
foreach($filearray as $key => $file){
|
||||||
|
|||||||
@ -103,7 +103,7 @@ if ($object->id)
|
|||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -94,7 +94,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans("InterventionCard"), -1, 'intervention');
|
dol_fiche_head($head, 'documents', $langs->trans("InterventionCard"), -1, 'intervention');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -850,4 +850,3 @@ class ProductFournisseur extends Product
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ if ($object->id > 0)
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans('SupplierOrder'), -1, 'order');
|
dol_fiche_head($head, 'documents', $langs->trans('SupplierOrder'), -1, 'order');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -145,7 +145,7 @@ if ($object->id > 0)
|
|||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -69,7 +69,6 @@ $mode=GETPOST("mode");
|
|||||||
|
|
||||||
$search_all = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
$search_all = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||||
$search_label = GETPOST("search_label","alpha");
|
$search_label = GETPOST("search_label","alpha");
|
||||||
$search_company = GETPOST("search_company","alpha");
|
|
||||||
$search_amount_no_tax = GETPOST("search_amount_no_tax","alpha");
|
$search_amount_no_tax = GETPOST("search_amount_no_tax","alpha");
|
||||||
$search_amount_all_tax = GETPOST("search_amount_all_tax","alpha");
|
$search_amount_all_tax = GETPOST("search_amount_all_tax","alpha");
|
||||||
$search_product_category=GETPOST('search_product_category','int');
|
$search_product_category=GETPOST('search_product_category','int');
|
||||||
@ -77,7 +76,7 @@ $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','al
|
|||||||
$search_refsupplier=GETPOST('search_refsupplier','alpha');
|
$search_refsupplier=GETPOST('search_refsupplier','alpha');
|
||||||
$search_type=GETPOST('search_type','int');
|
$search_type=GETPOST('search_type','int');
|
||||||
$search_project=GETPOST('search_project','alpha');
|
$search_project=GETPOST('search_project','alpha');
|
||||||
$search_societe=GETPOST('search_societe','alpha');
|
$search_company=GETPOST('search_company','alpha');
|
||||||
$search_montant_ht=GETPOST('search_montant_ht','alpha');
|
$search_montant_ht=GETPOST('search_montant_ht','alpha');
|
||||||
$search_montant_vat=GETPOST('search_montant_vat','alpha');
|
$search_montant_vat=GETPOST('search_montant_vat','alpha');
|
||||||
$search_montant_localtax1=GETPOST('search_montant_localtax1','alpha');
|
$search_montant_localtax1=GETPOST('search_montant_localtax1','alpha');
|
||||||
@ -203,7 +202,6 @@ if (empty($reshook))
|
|||||||
$search_type="";
|
$search_type="";
|
||||||
$search_label="";
|
$search_label="";
|
||||||
$search_project='';
|
$search_project='';
|
||||||
$search_societe="";
|
|
||||||
$search_company="";
|
$search_company="";
|
||||||
$search_amount_no_tax="";
|
$search_amount_no_tax="";
|
||||||
$search_amount_all_tax="";
|
$search_amount_all_tax="";
|
||||||
@ -315,13 +313,12 @@ if ($search_type != '' && $search_type >= 0)
|
|||||||
//if ($search_type == '5') $sql.=" AND f.type = 5"; // situation
|
//if ($search_type == '5') $sql.=" AND f.type = 5"; // situation
|
||||||
}
|
}
|
||||||
if ($search_project) $sql .= natural_search('p.ref', $search_project);
|
if ($search_project) $sql .= natural_search('p.ref', $search_project);
|
||||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
||||||
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
||||||
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
||||||
if ($search_state) $sql.= natural_search("state.nom",$search_state);
|
if ($search_state) $sql.= natural_search("state.nom",$search_state);
|
||||||
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
|
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
|
||||||
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
|
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
|
||||||
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
|
||||||
if ($search_montant_ht != '') $sql.= natural_search('f.total_ht', $search_montant_ht, 1);
|
if ($search_montant_ht != '') $sql.= natural_search('f.total_ht', $search_montant_ht, 1);
|
||||||
if ($search_montant_vat != '') $sql.= natural_search('f.total_tva', $search_montant_vat, 1);
|
if ($search_montant_vat != '') $sql.= natural_search('f.total_tva', $search_montant_vat, 1);
|
||||||
if ($search_montant_localtax1 != '') $sql.= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
if ($search_montant_localtax1 != '') $sql.= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
||||||
@ -431,7 +428,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$soc->fetch($socid);
|
||||||
if (empty($search_societe)) $search_societe = $soc->name;
|
if (empty($search_company)) $search_company = $soc->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$param='&socid='.$socid;
|
$param='&socid='.$socid;
|
||||||
@ -665,7 +662,7 @@ if ($resql)
|
|||||||
// Thirpdarty
|
// Thirpdarty
|
||||||
if (! empty($arrayfields['s.nom']['checked']))
|
if (! empty($arrayfields['s.nom']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_societe" value="'.$search_societe.'"></td>';
|
print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_company" value="'.$search_company.'"></td>';
|
||||||
}
|
}
|
||||||
// Town
|
// Town
|
||||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
|
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
|
||||||
|
|||||||
@ -99,7 +99,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'documents', $langs->trans("CPTitreMenu"), -1,'holiday');
|
dol_fiche_head($head, 'documents', $langs->trans("CPTitreMenu"), -1,'holiday');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
|
|||||||
@ -675,8 +675,8 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
|
|||||||
|
|
||||||
//print 'mem='.memory_get_usage().' - '.memory_get_peak_usage();
|
//print 'mem='.memory_get_usage().' - '.memory_get_peak_usage();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user