mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/admin/bank.php htdocs/core/lib/functions.lib.php
This commit is contained in:
@@ -662,7 +662,7 @@ NEW: Disabled users are striked.
|
|||||||
NEW: Enhance navigation of project module
|
NEW: Enhance navigation of project module
|
||||||
NEW: fichinter lines ordered by rang AND DATE
|
NEW: fichinter lines ordered by rang AND DATE
|
||||||
NEW: hidden conf to use input file multiple from mail form
|
NEW: hidden conf to use input file multiple from mail form
|
||||||
NEW: hidden feature: SUPPLIERORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
|
NEW: hidden feature: SUPPLIER_ORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
|
||||||
NEW: Hidden option MAIN_LANDING_PAGE to choose the first page to show after login works as a "global" option (llx_const) and as a "per user" option (llx_user_param).
|
NEW: Hidden option MAIN_LANDING_PAGE to choose the first page to show after login works as a "global" option (llx_const) and as a "per user" option (llx_user_param).
|
||||||
NEW: Holiday is a now a RH module. All RH module provides by default visilibity on users of its hierarchy.
|
NEW: Holiday is a now a RH module. All RH module provides by default visilibity on users of its hierarchy.
|
||||||
NEW: If error is reported during migration process, you can ignore it to avoid to be locked.
|
NEW: If error is reported during migration process, you can ignore it to avoid to be locked.
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ $action = GETPOST('action','alpha');
|
|||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$param = GETPOST('param','alpha');
|
$param = GETPOST('param','alpha');
|
||||||
$cancel = GETPOST('cancel','alpha');
|
$cancel = GETPOST('cancel','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type = 'action';
|
$type = 'action';
|
||||||
|
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
|
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if (!$user->admin)
|
|||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scandir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'bankaccount';
|
$type = 'bankaccount';
|
||||||
|
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<td align="center">' . "\n";
|
print '<td align="center">' . "\n";
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&scandir=' . $module->scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&scan_dir=' . $module->scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
|
||||||
'switch_off') . '</a>';
|
'switch_off') . '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
@@ -346,7 +346,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
'on');
|
'on');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&scandir=' . $module->scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"),
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&scan_dir=' . $module->scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"),
|
||||||
'off') . '</a>';
|
'off') . '</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type = 'order';
|
$type = 'order';
|
||||||
|
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,7 +476,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ if (!$user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='contract';
|
$type='contract';
|
||||||
|
|
||||||
if (empty($conf->global->CONTRACT_ADDON))
|
if (empty($conf->global->CONTRACT_ADDON))
|
||||||
@@ -397,7 +397,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ if (! $user->admin)
|
|||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$value=GETPOST('value','alpha');
|
$value=GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='shipping';
|
$type='shipping';
|
||||||
|
|
||||||
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
||||||
@@ -263,7 +263,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@@ -402,7 +402,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($module->type == 'pdf')
|
if ($module->type == 'pdf')
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='expensereport';
|
$type='expensereport';
|
||||||
|
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@@ -406,7 +406,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='ficheinter';
|
$type='ficheinter';
|
||||||
|
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@@ -439,7 +439,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ if (!$user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='delivery';
|
$type='delivery';
|
||||||
|
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@@ -393,7 +393,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,7 +405,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='invoice';
|
$type='invoice';
|
||||||
|
|
||||||
if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON = 'mod_payment_cicada.php';
|
if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON = 'mod_payment_cicada.php';
|
||||||
@@ -188,7 +188,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='propal';
|
$type='propal';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -443,7 +443,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,7 +455,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ accessforbidden();
|
|||||||
$type=GETPOST('type', 'alpha');
|
$type=GETPOST('type', 'alpha');
|
||||||
$value=GETPOST('value', 'alpha');
|
$value=GETPOST('value', 'alpha');
|
||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$specimenthirdparty=new Societe($db);
|
$specimenthirdparty=new Societe($db);
|
||||||
$specimenthirdparty->initAsSpecimen();
|
$specimenthirdparty->initAsSpecimen();
|
||||||
@@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
|
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
|
||||||
//{
|
//{
|
||||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
/*}
|
/*}
|
||||||
@@ -411,7 +411,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,11 +421,11 @@ foreach ($dirmodels as $reldir)
|
|||||||
{
|
{
|
||||||
//print img_picto($langs->trans("Default"),'on');
|
//print img_picto($langs->trans("Default"),'on');
|
||||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ $type=GETPOST('type', 'alpha');
|
|||||||
$value=GETPOST('value', 'alpha');
|
$value=GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$specimenthirdparty=new Societe($db);
|
$specimenthirdparty=new Societe($db);
|
||||||
$specimenthirdparty->initAsSpecimen();
|
$specimenthirdparty->initAsSpecimen();
|
||||||
@@ -420,7 +420,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
|
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@@ -433,7 +433,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,7 +445,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='supplier_payment';
|
$type='supplier_payment';
|
||||||
|
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='supplier_proposal';
|
$type='supplier_proposal';
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
@@ -423,7 +423,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -709,7 +709,7 @@ if ($action == 'create')
|
|||||||
// Location
|
// Location
|
||||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="minwidth100" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assigned to
|
// Assigned to
|
||||||
@@ -965,7 +965,7 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$object->label.'"></td></tr>';
|
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" class="minwidth100" value="'.$object->label.'"></td></tr>';
|
||||||
|
|
||||||
// Full day event
|
// Full day event
|
||||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent?' checked':'').'></td></tr>';
|
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent?' checked':'').'></td></tr>';
|
||||||
@@ -1049,7 +1049,7 @@ if ($id > 0)
|
|||||||
// Location
|
// Location
|
||||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="minwidth100" value="'.$object->location.'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assigned to
|
// Assigned to
|
||||||
|
|||||||
@@ -492,21 +492,36 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Account number
|
// Account number
|
||||||
if (! empty($arrayfields['b.account_number']['checked']))
|
if (! empty($arrayfields['b.account_number']['checked']))
|
||||||
{
|
{
|
||||||
$accountingaccount = new AccountingAccount($db);
|
print '<td>';
|
||||||
$accountingaccount->fetch('',$acc->account_number);
|
if (! empty($conf->accounting->enabled))
|
||||||
|
{
|
||||||
print '<td>'.$accountingaccount->getNomUrl(0,1,1,'',1).'</td>';
|
$accountingaccount = new AccountingAccount($db);
|
||||||
|
$accountingaccount->fetch('',$acc->account_number);
|
||||||
|
print $accountingaccount->getNomUrl(0,1,1,'',1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $acc->account_number;
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accountancy journal
|
// Accountancy journal
|
||||||
if (! empty($arrayfields['b.fk_accountancy_journal']['checked']))
|
if (! empty($arrayfields['b.fk_accountancy_journal']['checked']))
|
||||||
{
|
{
|
||||||
$accountingjournal = new AccountingJournal($db);
|
print '<td>';
|
||||||
$accountingjournal->fetch($acc->fk_accountancy_journal);
|
if (! empty($conf->accounting->enabled))
|
||||||
|
{
|
||||||
print '<td>'.$accountingjournal->getNomUrl(0,1,1,'',1).'</td>';
|
$accountingjournal = new AccountingJournal($db);
|
||||||
|
$accountingjournal->fetch('',$acc->fk_accountancy_journal);
|
||||||
|
print $accountingjournal->getNomUrl(0,1,1,'',1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ if ($action == 'add_confirm')
|
|||||||
|
|
||||||
if (! $label)
|
if (! $label)
|
||||||
{
|
{
|
||||||
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Description")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Description")), null, 'errors');
|
||||||
}
|
}
|
||||||
if (! $amount)
|
if (! $amount)
|
||||||
|
|||||||
@@ -2322,10 +2322,6 @@ class Form
|
|||||||
unset($producttmpselect);
|
unset($producttmpselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->SUPPLIER_ORDER_WITH_NOPRICEDEFINED))
|
|
||||||
{
|
|
||||||
print '<input type="hidden" id="idprod" name="idprod" value="0" />';
|
|
||||||
}
|
|
||||||
// mode=2 means suppliers products
|
// mode=2 means suppliers products
|
||||||
$urloption=($socid > 0?'socid='.$socid.'&':'').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice;
|
$urloption=($socid > 0?'socid='.$socid.'&':'').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice;
|
||||||
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||||
@@ -2333,11 +2329,6 @@ class Form
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!empty($conf->global->SUPPLIER_ORDER_WITH_NOPRICEDEFINED))
|
|
||||||
{
|
|
||||||
print '<input type="hidden" id="idprod" name="idprod" value="0" />';
|
|
||||||
print '<script type="text/javascript">$("#'.$htmlname.'").change(function() { $("#idprod").val($(this).val());});</script>';
|
|
||||||
}
|
|
||||||
print $this->select_produits_fournisseurs_list($socid,$selected,$htmlname,$filtertype,$filtre,'',-1,0,0,$alsoproductwithnosupplierprice);
|
print $this->select_produits_fournisseurs_list($socid,$selected,$htmlname,$filtertype,$filtre,'',-1,0,0,$alsoproductwithnosupplierprice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
* 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)
|
||||||
* @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())
|
||||||
@@ -146,6 +147,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
$("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value
|
$("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value
|
||||||
// Disable an element
|
// Disable an element
|
||||||
if (options.option_disabled) {
|
if (options.option_disabled) {
|
||||||
|
console.log("Make action option_disabled on #"+options.option_disabled+" with disabled="+ui.item.disabled)
|
||||||
if (ui.item.disabled) {
|
if (ui.item.disabled) {
|
||||||
$("#" + options.option_disabled).prop("disabled", true);
|
$("#" + options.option_disabled).prop("disabled", true);
|
||||||
if (options.error) {
|
if (options.error) {
|
||||||
@@ -154,28 +156,32 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
if (options.warning) {
|
if (options.warning) {
|
||||||
$.jnotify(options.warning, "warning", false); // Output with jnotify the warning message
|
$.jnotify(options.warning, "warning", false); // Output with jnotify the warning message
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#" + options.option_disabled).removeAttr("disabled");
|
$("#" + options.option_disabled).removeAttr("disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.disabled) {
|
if (options.disabled) {
|
||||||
|
console.log("Make action disabled on each "+options.option_disabled)
|
||||||
$.each(options.disabled, function(key, value) {
|
$.each(options.disabled, function(key, value) {
|
||||||
$("#" + value).prop("disabled", true);
|
$("#" + value).prop("disabled", true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (options.show) {
|
if (options.show) {
|
||||||
|
console.log("Make action show on each "+options.show)
|
||||||
$.each(options.show, function(key, value) {
|
$.each(options.show, function(key, value) {
|
||||||
$("#" + value).show().trigger("show");
|
$("#" + value).show().trigger("show");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Update an input
|
// Update an input
|
||||||
if (ui.item.update) {
|
if (ui.item.update) {
|
||||||
|
console.log("Make action update on each ui.item.update")
|
||||||
// loop on each "update" fields
|
// loop on each "update" fields
|
||||||
$.each(ui.item.update, function(key, value) {
|
$.each(ui.item.update, function(key, value) {
|
||||||
$("#" + key).val(value).trigger("change");
|
$("#" + key).val(value).trigger("change");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (ui.item.textarea) {
|
if (ui.item.textarea) {
|
||||||
|
console.log("Make action textarea on each ui.item.textarea")
|
||||||
$.each(ui.item.textarea, function(key, value) {
|
$.each(ui.item.textarea, function(key, value) {
|
||||||
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances[key] != "undefined") {
|
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances[key] != "undefined") {
|
||||||
CKEDITOR.instances[key].setData(value);
|
CKEDITOR.instances[key].setData(value);
|
||||||
@@ -192,7 +198,6 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
}
|
}
|
||||||
,delay: 500
|
,delay: 500
|
||||||
}).data("'.$dataforrenderITem.'")._renderItem = function( ul, item ) {
|
}).data("'.$dataforrenderITem.'")._renderItem = function( ul, item ) {
|
||||||
|
|
||||||
return $("<li>")
|
return $("<li>")
|
||||||
.data( "'.$dataforitem.'", item ) // jQuery UI > 1.10.0
|
.data( "'.$dataforitem.'", item ) // jQuery UI > 1.10.0
|
||||||
.append( \'<a><span class="tag">\' + item.label + "</span></a>" )
|
.append( \'<a><span class="tag">\' + item.label + "</span></a>" )
|
||||||
|
|||||||
@@ -190,8 +190,9 @@ function getBrowserInfo($user_agent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OS
|
// OS
|
||||||
if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
|
if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
|
||||||
elseif (preg_match('/macintosh/i', $user_agent)) { $os='macintosh'; }
|
elseif (preg_match('/macintosh/i', $user_agent)) { $os='macintosh'; }
|
||||||
|
elseif (preg_match('/windows/i', $user_agent)) { $os='windows'; }
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
|
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
|
||||||
@@ -201,7 +202,8 @@ function getBrowserInfo($user_agent)
|
|||||||
elseif (preg_match('/epiphany/i', $user_agent)) { $name='epiphany'; }
|
elseif (preg_match('/epiphany/i', $user_agent)) { $name='epiphany'; }
|
||||||
elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
|
elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
|
||||||
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='opera'; $version=$reg[2]; }
|
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='opera'; $version=$reg[2]; }
|
||||||
elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
|
elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
|
||||||
|
elseif (preg_match('/(Windows NT\s([0-9]+\.[0-9])).*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
|
||||||
elseif (preg_match('/l(i|y)n(x|ks)(\(|\/|\s)*([\d\.]+)/i', $user_agent, $reg)) { $name='lynxlinks'; $version=$reg[4]; }
|
elseif (preg_match('/l(i|y)n(x|ks)(\(|\/|\s)*([\d\.]+)/i', $user_agent, $reg)) { $name='lynxlinks'; $version=$reg[4]; }
|
||||||
|
|
||||||
if ($tablet) {
|
if ($tablet) {
|
||||||
@@ -1190,10 +1192,10 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
$nophoto='';
|
$nophoto='';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
||||||
}
|
}
|
||||||
elseif ($conf->browser->layout != 'phone') { // Show no photo link
|
//elseif ($conf->browser->layout != 'phone') { // Show no photo link
|
||||||
$nophoto='/public/theme/common/nophoto.png';
|
$nophoto='/public/theme/common/nophoto.png';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1270,7 +1272,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $phototoshow && $conf->browser->layout != 'phone') // Show No photo link (picto of pbject)
|
if (! $phototoshow) // Show No photo link (picto of pbject)
|
||||||
{
|
{
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||||
if ($object->element == 'action')
|
if ($object->element == 'action')
|
||||||
@@ -1288,6 +1290,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
}
|
}
|
||||||
$morehtmlleft.='<!-- No photo to show -->';
|
$morehtmlleft.='<!-- No photo to show -->';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
||||||
|
|
||||||
$morehtmlleft.='</div>';
|
$morehtmlleft.='</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6454,7 +6457,7 @@ function dol_mimetype($file,$default='application/octet-stream',$mode=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return value from dictionary
|
* Return value from dictionary
|
||||||
*
|
*
|
||||||
* @param string $tablename name of dictionary
|
* @param string $tablename name of dictionary
|
||||||
* @param string $field the value to return
|
* @param string $field the value to return
|
||||||
* @param int $id id of line
|
* @param int $id id of line
|
||||||
@@ -6464,13 +6467,13 @@ function dol_mimetype($file,$default='application/octet-stream',$mode=0)
|
|||||||
function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid')
|
function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid')
|
||||||
{
|
{
|
||||||
global $dictvalues,$db,$langs;
|
global $dictvalues,$db,$langs;
|
||||||
|
|
||||||
if (!isset($dictvalues[$tablename]))
|
if (!isset($dictvalues[$tablename]))
|
||||||
{
|
{
|
||||||
$dictvalues[$tablename] = array();
|
$dictvalues[$tablename] = array();
|
||||||
$sql = 'SELECT * FROM '.$tablename.' WHERE 1';
|
$sql = 'SELECT * FROM '.$tablename.' WHERE 1';
|
||||||
if ($checkentity) $sql.= ' entity IN (0,'.getEntity('').')';
|
if ($checkentity) $sql.= ' entity IN (0,'.getEntity('').')';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -6484,7 +6487,7 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($dictvalues[$tablename][$id])) return $dictvalues[$tablename][$id]->{$field}; // Found
|
if (!empty($dictvalues[$tablename][$id])) return $dictvalues[$tablename][$id]->{$field}; // Found
|
||||||
else // Not found
|
else // Not found
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
* $langs
|
* $langs
|
||||||
* $dateSelector
|
* $dateSelector
|
||||||
* $forceall (0 by default, 1 for supplier invoices/orders)
|
* $forceall (0 by default, 1 for supplier invoices/orders)
|
||||||
* $senderissupplier (0 by default, 1 for supplier invoices/orders)
|
* $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
|
||||||
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -208,12 +208,13 @@ else {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// $senderissupplier=2 is same than 1 but disable test on minimum qty and disable autofill qty with minimum
|
||||||
if ($senderissupplier != 2)
|
if ($senderissupplier != 2)
|
||||||
{
|
{
|
||||||
$ajaxoptions=array(
|
$ajaxoptions=array(
|
||||||
'update' => array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key
|
'update' => array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key
|
||||||
'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done
|
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
|
||||||
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
|
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for exemple shown we select a disabled option into combo)
|
||||||
);
|
);
|
||||||
$alsoproductwithnosupplierprice=0;
|
$alsoproductwithnosupplierprice=0;
|
||||||
}
|
}
|
||||||
@@ -222,6 +223,7 @@ else {
|
|||||||
$ajaxoptions = array();
|
$ajaxoptions = array();
|
||||||
$alsoproductwithnosupplierprice=1;
|
$alsoproductwithnosupplierprice=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice);
|
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice);
|
||||||
}
|
}
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ $typeconst=array('yesno','texte','chaine');
|
|||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value');
|
$value = GETPOST('value');
|
||||||
|
$label = GETPOST('label','alpha');
|
||||||
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$type='donation';
|
$type='donation';
|
||||||
|
|
||||||
@@ -287,14 +289,14 @@ if (is_resource($handle))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +310,7 @@ if (is_resource($handle))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1157,7 +1157,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
// insert products details into database
|
// insert products details into database
|
||||||
for ($i=0;$i<$num;$i++)
|
for ($i=0;$i<$num;$i++)
|
||||||
{
|
{
|
||||||
$result = $this->addline( // This include test on qty if option SUPPLIERORDER_WITH_NOPRICEDEFINED is not set
|
$result = $this->addline( // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||||
$this->lines[$i]->desc,
|
$this->lines[$i]->desc,
|
||||||
$this->lines[$i]->subprice,
|
$this->lines[$i]->subprice,
|
||||||
$this->lines[$i]->qty,
|
$this->lines[$i]->qty,
|
||||||
@@ -1393,7 +1393,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
if ($fk_product > 0)
|
if ($fk_product > 0)
|
||||||
{
|
{
|
||||||
if (empty($conf->global->SUPPLIERORDER_WITH_NOPRICEDEFINED))
|
if (empty($conf->global->SUPPLIER_ORDER_WITH_NOPRICEDEFINED))
|
||||||
{
|
{
|
||||||
// Check quantity is enough
|
// Check quantity is enough
|
||||||
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_prod_fourn_price=".$fk_prod_fourn_price." qty=".$qty." fourn_ref=".$fourn_ref);
|
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_prod_fourn_price=".$fk_prod_fourn_price." qty=".$qty." fourn_ref=".$fourn_ref);
|
||||||
@@ -2842,8 +2842,9 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($this->db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($this->db);
|
||||||
$filter=array('t.fk_commande'=>$this->id);
|
$filter=array('t.fk_commande'=>$this->id);
|
||||||
if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) {
|
if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) {
|
||||||
$filter['t.status']=1;
|
$filter['t.status']=1; // Restrict to lines with status validated
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret=$supplierorderdispatch->fetchAll('','',0,0,$filter);
|
$ret=$supplierorderdispatch->fetchAll('','',0,0,$filter);
|
||||||
if ($ret<0)
|
if ($ret<0)
|
||||||
{
|
{
|
||||||
@@ -2854,20 +2855,27 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
{
|
{
|
||||||
if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines)>0)
|
if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines)>0)
|
||||||
{
|
{
|
||||||
//Build array with quantity deliverd by product
|
$date_liv = dol_now();
|
||||||
|
|
||||||
|
// Build array with quantity deliverd by product
|
||||||
foreach($supplierorderdispatch->lines as $line) {
|
foreach($supplierorderdispatch->lines as $line) {
|
||||||
$qtydelivered[$line->fk_product]+=$line->qty;
|
$qtydelivered[$line->fk_product]+=$line->qty;
|
||||||
}
|
}
|
||||||
foreach($this->lines as $line) {
|
foreach($this->lines as $line) {
|
||||||
$qtywished[$line->fk_product]+=$line->qty;
|
$qtywished[$line->fk_product]+=$line->qty;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_liv = dol_now();
|
|
||||||
|
|
||||||
//Compare array
|
//Compare array
|
||||||
$diff_array=array_diff_assoc($qtydelivered,$qtywished);
|
$diff_array=array_diff_assoc($qtydelivered,$qtywished); // Warning: $diff_array is done only on common keys.
|
||||||
|
$keysinwishednotindelivered=array_diff(array_keys($qtywished),array_keys($qtydelivered)); // To check we also have same number of keys
|
||||||
|
$keysindeliverednotinwished=array_diff(array_keys($qtydelivered),array_keys($qtywished)); // To check we also have same number of keys
|
||||||
|
/*var_dump(array_keys($qtydelivered));
|
||||||
|
var_dump(array_keys($qtywished));
|
||||||
|
var_dump($diff_array);
|
||||||
|
var_dump($keysinwishednotindelivered);
|
||||||
|
var_dump($keysindeliverednotinwished);
|
||||||
|
exit;*/
|
||||||
|
|
||||||
if (count($diff_array)==0) //No diff => mean everythings is received
|
if (count($diff_array)==0 && count($keysinwishednotindelivered)==0 && count($keysindeliverednotinwished)==0) //No diff => mean everythings is received
|
||||||
{
|
{
|
||||||
if ($closeopenorder)
|
if ($closeopenorder)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -365,21 +365,29 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$productsupplier = new ProductFournisseur($db);
|
$productsupplier = new ProductFournisseur($db);
|
||||||
|
|
||||||
if (empty($conf->global->SUPPLIER_ORDER_WITH_NOPRICEDEFINED))
|
if (empty($conf->global->SUPPLIER_ORDER_WITH_NOPRICEDEFINED)) // TODO this test seems useless
|
||||||
{
|
{
|
||||||
$idprod=0;
|
$idprod=0;
|
||||||
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...)
|
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...)
|
||||||
}
|
}
|
||||||
|
if (preg_match('/^idprod_([0-9]+)$/',GETPOST('idprodfournprice'), $reg))
|
||||||
if (GETPOST('idprodfournprice') > 0)
|
{
|
||||||
|
$idprod=$reg[1];
|
||||||
|
$res=$productsupplier->fetch($idprod);
|
||||||
|
// Call to init properties of $productsupplier
|
||||||
|
// So if a supplier price already exists for another thirdparty (first one found), we use it as reference price
|
||||||
|
$productsupplier->get_buyprice(0, -1, $idprod, 'none'); // We force qty to -1 to be sure to find if a supplier price exist
|
||||||
|
}
|
||||||
|
elseif (GETPOST('idprodfournprice') > 0)
|
||||||
{
|
{
|
||||||
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat.
|
$qtytosearch=$qty; // Just to see if a price exists for the quantity. Not used to found vat.
|
||||||
|
//$qtytosearch=-1; // We force qty to -1 to be sure to find if a supplier price exist
|
||||||
|
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qtytosearch);
|
||||||
|
$res=$productsupplier->fetch($idprod);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($idprod > 0)
|
if ($idprod > 0)
|
||||||
{
|
{
|
||||||
$res=$productsupplier->fetch($idprod);
|
|
||||||
|
|
||||||
$label = $productsupplier->label;
|
$label = $productsupplier->label;
|
||||||
|
|
||||||
$desc = $productsupplier->description;
|
$desc = $productsupplier->description;
|
||||||
@@ -400,8 +408,8 @@ if (empty($reshook))
|
|||||||
$tva_tx,
|
$tva_tx,
|
||||||
$localtax1_tx,
|
$localtax1_tx,
|
||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
|
$idprod,
|
||||||
$productsupplier->id,
|
$productsupplier->id,
|
||||||
GETPOST('idprodfournprice'),
|
|
||||||
$productsupplier->fourn_ref,
|
$productsupplier->fourn_ref,
|
||||||
$remise_percent,
|
$remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
@@ -2105,6 +2113,7 @@ elseif (! empty($object->id))
|
|||||||
// Add free products/services form
|
// Add free products/services form
|
||||||
global $forceall, $senderissupplier, $dateSelector;
|
global $forceall, $senderissupplier, $dateSelector;
|
||||||
$forceall=1; $senderissupplier=1; $dateSelector=0;
|
$forceall=1; $senderissupplier=1; $dateSelector=0;
|
||||||
|
if (! empty($conf->global->SUPPLIER_ORDER_WITH_NOPRICEDEFINED)) $senderissupplier=2; // $senderissupplier=2 is same than 1 but disable test on minimum qty and disable autofill qty with minimum.
|
||||||
|
|
||||||
// Show object lines
|
// Show object lines
|
||||||
$inputalsopricewithtax=0;
|
$inputalsopricewithtax=0;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
* \ingroup commande
|
* \ingroup commande
|
||||||
* \brief Page to dispatch receiving
|
* \brief Page to dispatch receiving
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/modules/supplier_order/modules_commandefournisseur.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/modules/supplier_order/modules_commandefournisseur.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
|
||||||
@@ -84,17 +85,33 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'checkdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) {
|
if ($action == 'checkdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))))
|
||||||
|
{
|
||||||
|
$error=0;
|
||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result = $supplierorderdispatch->fetch($lineid);
|
$result = $supplierorderdispatch->fetch($lineid);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
dol_print_error($db);
|
{
|
||||||
$result = $supplierorderdispatch->setStatut(1);
|
$error++;
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
$error ++;
|
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$result = $supplierorderdispatch->setStatut(1);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
|
$error++;
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$result = $object->calcAndSetStatusDispatch($user);
|
$result = $object->calcAndSetStatusDispatch($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
@@ -102,19 +119,42 @@ if ($action == 'checkdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'uncheckdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) {
|
if ($action == 'uncheckdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))))
|
||||||
|
{
|
||||||
|
$error=0;
|
||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result = $supplierorderdispatch->fetch($lineid);
|
$result = $supplierorderdispatch->fetch($lineid);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
dol_print_error($db);
|
{
|
||||||
$result = $supplierorderdispatch->setStatut(0);
|
$error++;
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
$error ++;
|
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$result = $supplierorderdispatch->setStatut(0);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
|
$error ++;
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$result = $object->calcAndSetStatusDispatch($user);
|
$result = $object->calcAndSetStatusDispatch($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
@@ -122,19 +162,42 @@ if ($action == 'uncheckdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANC
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'denydispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) {
|
if ($action == 'denydispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))))
|
||||||
|
{
|
||||||
|
$error=0;
|
||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result = $supplierorderdispatch->fetch($lineid);
|
$result = $supplierorderdispatch->fetch($lineid);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
dol_print_error($db);
|
{
|
||||||
$result = $supplierorderdispatch->setStatut(2);
|
$error++;
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
$error ++;
|
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$result = $supplierorderdispatch->setStatut(2);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
|
$error ++;
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$result = $object->calcAndSetStatusDispatch($user);
|
$result = $object->calcAndSetStatusDispatch($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
@@ -142,6 +205,14 @@ if ($action == 'denydispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) {
|
if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) {
|
||||||
@@ -743,7 +814,8 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
|
|
||||||
// Add button to check/uncheck disaptching
|
// Add button to check/uncheck disaptching
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))) {
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))
|
||||||
|
{
|
||||||
if (empty($objp->status)) {
|
if (empty($objp->status)) {
|
||||||
print '<a class="button buttonRefused" href="#">' . $langs->trans("Approve") . '</a>';
|
print '<a class="button buttonRefused" href="#">' . $langs->trans("Approve") . '</a>';
|
||||||
print '<a class="button buttonRefused" href="#">' . $langs->trans("Deny") . '</a>';
|
print '<a class="button buttonRefused" href="#">' . $langs->trans("Deny") . '</a>';
|
||||||
|
|||||||
@@ -976,21 +976,30 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if ($prod_entry_mode != 'free' && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
if ($prod_entry_mode != 'free' && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||||
{
|
{
|
||||||
$idprod=0;
|
|
||||||
$productsupplier=new ProductFournisseur($db);
|
$productsupplier=new ProductFournisseur($db);
|
||||||
|
|
||||||
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-2; // Same behaviour than with combolist. When not select idprodfournprice is now -2 (to avoid conflict with next action that may return -1)
|
$idprod=0;
|
||||||
|
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...)
|
||||||
|
|
||||||
if (GETPOST('idprodfournprice') > 0)
|
if (preg_match('/^idprod_([0-9]+)$/',GETPOST('idprodfournprice'), $reg))
|
||||||
|
{
|
||||||
|
$idprod=$reg[1];
|
||||||
|
$res=$productsupplier->fetch($idprod);
|
||||||
|
// Call to init properties of $productsupplier
|
||||||
|
// So if a supplier price already exists for another thirdparty (first one found), we use it as reference price
|
||||||
|
$productsupplier->get_buyprice(0, -1, $idprod, 'none'); // We force qty to -1 to be sure to find if a supplier price exist
|
||||||
|
}
|
||||||
|
elseif (GETPOST('idprodfournprice') > 0)
|
||||||
{
|
{
|
||||||
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat.
|
$qtytosearch=$qty; // Just to see if a price exists for the quantity. Not used to found vat.
|
||||||
|
//$qtytosearch=-1; // We force qty to -1 to be sure to find if a supplier price exist
|
||||||
|
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qtytosearch);
|
||||||
|
$res=$productsupplier->fetch($idprod);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Replaces $fk_unit with the product's
|
//Replaces $fk_unit with the product's
|
||||||
if ($idprod > 0)
|
if ($idprod > 0)
|
||||||
{
|
{
|
||||||
$result=$productsupplier->fetch($idprod);
|
|
||||||
|
|
||||||
$label = $productsupplier->label;
|
$label = $productsupplier->label;
|
||||||
|
|
||||||
$desc = $productsupplier->description;
|
$desc = $productsupplier->description;
|
||||||
@@ -1005,10 +1014,29 @@ if (empty($reshook))
|
|||||||
$type = $productsupplier->type;
|
$type = $productsupplier->type;
|
||||||
$price_base_type = 'HT';
|
$price_base_type = 'HT';
|
||||||
|
|
||||||
// TODO Save the product supplier ref into database into field ref_supplier (must rename field ref into ref_supplier first)
|
// TODO Save the product supplier ref into database (like done for supplier propal and order) into field ref_supplier (must rename field ref into ref_supplier first)
|
||||||
$result=$object->addline($desc, $productsupplier->fourn_pu, $tva_tx, $localtax1_tx, $localtax2_tx, $qty, $idprod, $remise_percent, $date_start, $date_end, 0, $tva_npr, $price_base_type, $type, -1, 0, $array_options, $productsupplier->fk_unit);
|
$result=$object->addline(
|
||||||
|
$desc,
|
||||||
|
$productsupplier->fourn_pu,
|
||||||
|
$tva_tx,
|
||||||
|
$localtax1_tx,
|
||||||
|
$localtax2_tx,
|
||||||
|
$qty,
|
||||||
|
$idprod,
|
||||||
|
$remise_percent,
|
||||||
|
$date_start,
|
||||||
|
$date_end,
|
||||||
|
0,
|
||||||
|
$tva_npr,
|
||||||
|
$price_base_type,
|
||||||
|
$type,
|
||||||
|
-1,
|
||||||
|
0,
|
||||||
|
$array_options,
|
||||||
|
$productsupplier->fk_unit
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if ($idprod == -2 || $idprod == 0)
|
if ($idprod == -99 || $idprod == 0)
|
||||||
{
|
{
|
||||||
// Product not selected
|
// Product not selected
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@@ -1075,10 +1075,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<meta name="robots" content="noindex'.($disablenofollow?'':',nofollow').'">'."\n"; // Do not index
|
print '<meta name="robots" content="noindex'.($disablenofollow?'':',nofollow').'">'."\n"; // Do not index
|
||||||
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; // Scale for mobile device
|
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; // Scale for mobile device
|
||||||
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
||||||
// Favicon. Note, even if we remove this meta, the browser and android webview try to find a favicon.ico
|
// Favicon
|
||||||
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
||||||
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
|
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
|
||||||
print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n";
|
if (empty($conf->dol_use_jmobile)) print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n"; // Not required into an Android webview
|
||||||
//if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser','int')) print '<link rel="top" title="'.$langs->trans("Home").'" href="'.(DOL_URL_ROOT?DOL_URL_ROOT:'/').'">'."\n";
|
//if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser','int')) print '<link rel="top" title="'.$langs->trans("Home").'" href="'.(DOL_URL_ROOT?DOL_URL_ROOT:'/').'">'."\n";
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser','int')) print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser','int')) print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser','int')) print '<link rel="author" title="Dolibarr Development Team" href="https://www.dolibarr.org">'."\n";
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser','int')) print '<link rel="author" title="Dolibarr Development Team" href="https://www.dolibarr.org">'."\n";
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ if (! $user->admin || (empty($conf->product->enabled) && empty($conf->service->e
|
|||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='product';
|
$type='product';
|
||||||
|
|
||||||
// Pricing Rules
|
// Pricing Rules
|
||||||
@@ -460,7 +460,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,7 +472,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if (!$user->admin) accessforbidden();
|
|||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
$type='project';
|
$type='project';
|
||||||
|
|
||||||
|
|
||||||
@@ -645,7 +645,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@@ -653,7 +653,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,7 +665,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -804,7 +804,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS))
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=deltask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=deltask&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@@ -812,7 +812,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=settask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=settask&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -824,7 +824,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoctask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoctask&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -307,9 +307,14 @@ if (count($tasksarray)>0)
|
|||||||
$dateformatinput2="%m/%d/%Y"; // How the date for data are formated
|
$dateformatinput2="%m/%d/%Y"; // How the date for data are formated
|
||||||
//var_dump($dateformatinput);
|
//var_dump($dateformatinput);
|
||||||
//var_dump($dateformatinput2);
|
//var_dump($dateformatinput2);
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
|
|
||||||
print '<div id="tabs" class="gantt" style="width: 80vw; border: 1px solid #ACACAC;">'."\n";
|
print '<div id="tabs" class="gantt" style="width: 80vw; border: 1px solid #ACACAC;">'."\n";
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.inc.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.inc.php';
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table id="tablelines" class="noborder" width="100%">';
|
print '<table id="tablelines" class="noborder" width="100%">';
|
||||||
|
|
||||||
if (count($tasksarray) > 0)
|
if (count($tasksarray) > 0)
|
||||||
@@ -536,6 +537,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ if ($action == 'updateoptions')
|
|||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$type='company';
|
$type='company';
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
@@ -135,7 +135,7 @@ if ($action== 'del')
|
|||||||
if ($action == 'setdoc')
|
if ($action == 'setdoc')
|
||||||
{
|
{
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@@ -521,7 +521,7 @@ foreach ($dirsociete as $dirroot)
|
|||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
//if ($conf->global->COMPANY_ADDON_PDF != "$name")
|
//if ($conf->global->COMPANY_ADDON_PDF != "$name")
|
||||||
//{
|
//{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
//}
|
//}
|
||||||
@@ -542,7 +542,7 @@ foreach ($dirsociete as $dirroot)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -574,7 +574,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$productsupplier = new ProductFournisseur($db);
|
$productsupplier = new ProductFournisseur($db);
|
||||||
|
|
||||||
if (empty($conf->global->SUPPLIER_PROPOSAL_WITH_NOPRICEDEFINED))
|
if (empty($conf->global->SUPPLIER_PROPOSAL_WITH_NOPRICEDEFINED)) // TODO this test seems useless
|
||||||
{
|
{
|
||||||
$idprod=0;
|
$idprod=0;
|
||||||
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...)
|
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...)
|
||||||
@@ -589,8 +589,9 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
elseif (GETPOST('idprodfournprice') > 0)
|
elseif (GETPOST('idprodfournprice') > 0)
|
||||||
{
|
{
|
||||||
//$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat.
|
//$qtytosearch=$qty; // Just to see if a price exists for the quantity. Not used to found vat.
|
||||||
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), -1); // We force qty to -1 to be sure to find if a supplier price exist
|
$qtytosearch=-1; // We force qty to -1 to be sure to find if a supplier price exist
|
||||||
|
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qtytosearch);
|
||||||
$res=$productsupplier->fetch($idprod);
|
$res=$productsupplier->fetch($idprod);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,7 +601,7 @@ if (empty($reshook))
|
|||||||
$price_base_type = $productsupplier->fourn_price_base_type;
|
$price_base_type = $productsupplier->fourn_price_base_type;
|
||||||
$type = $productsupplier->type;
|
$type = $productsupplier->type;
|
||||||
$label = $productsupplier->label;
|
$label = $productsupplier->label;
|
||||||
$desc = $productsupplier->description;
|
$desc = $productsupplier->description;
|
||||||
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
||||||
|
|
||||||
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice'));
|
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice'));
|
||||||
|
|||||||
@@ -709,7 +709,7 @@ div.fiche>form>div.div-table-responsive {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.flexcontainer {
|
.flexcontainer {
|
||||||
display: inline-flex;
|
<?php if (in_array($conf->browser->name, array('chrome','firefox'))) echo 'display: inline-flex;'."\n"; ?>
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
@@ -719,10 +719,11 @@ div.fiche>form>div.div-table-responsive {
|
|||||||
.thumbstat150 {
|
.thumbstat150 {
|
||||||
flex: 1 1 170px;
|
flex: 1 1 170px;
|
||||||
}
|
}
|
||||||
.thumbstat, thumbstat150 {
|
.thumbstat, .thumbstat150 {
|
||||||
/* flex-grow: 1; */
|
/* flex-grow: 1; */
|
||||||
/* flex-shrink: 1; */
|
/* flex-shrink: 1; */
|
||||||
/* flex-basis: 140px; */
|
/* flex-basis: 140px; */
|
||||||
|
display: inline;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
@@ -2808,7 +2809,7 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
|
|||||||
width: 103px;
|
width: 103px;
|
||||||
}
|
}
|
||||||
.boxstats130 {
|
.boxstats130 {
|
||||||
width: 160px;
|
width: 158px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
padding: 3px
|
padding: 3px
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -710,7 +710,7 @@ div.fiche>form>div.div-table-responsive {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.flexcontainer {
|
.flexcontainer {
|
||||||
display: inline-flex;
|
<?php if (in_array($conf->browser->browsername, array('chrome','firefox'))) echo 'display: inline-flex;' ?>
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
@@ -720,10 +720,11 @@ div.fiche>form>div.div-table-responsive {
|
|||||||
.thumbstat150 {
|
.thumbstat150 {
|
||||||
flex: 1 1 150px;
|
flex: 1 1 150px;
|
||||||
}
|
}
|
||||||
.thumbstat, thumbstat150 {
|
.thumbstat, .thumbstat150 {
|
||||||
/* flex-grow: 1; */
|
/* flex-grow: 1; */
|
||||||
/* flex-shrink: 1; */
|
/* flex-shrink: 1; */
|
||||||
/* flex-basis: 140px; */
|
/* flex-basis: 140px; */
|
||||||
|
display: inline;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
|
|||||||
@@ -924,8 +924,8 @@ function updateOrder($authentication,$order)
|
|||||||
{
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$order->generateDocument($order->modelpdf, $outputlangs);
|
$object->generateDocument($order->modelpdf, $outputlangs);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($order['status'] == 0) $result=$object->set_reopen($fuser);
|
if ($order['status'] == 0) $result=$object->set_reopen($fuser);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
||||||
|
|
||||||
if (! function_exists('mb_substr')) { print "\n".__METHOD__." function mb_substr must be enabled.\n"; die(); }
|
if (! function_exists('mb_substr')) { print "\n".__METHOD__." function mb_substr must be enabled.\n"; die(); }
|
||||||
|
|
||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,6 +278,15 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertFalse($tmp['tablet']);
|
$this->assertFalse($tmp['tablet']);
|
||||||
$this->assertEquals('classic', $tmp['layout']);
|
$this->assertEquals('classic', $tmp['layout']);
|
||||||
|
|
||||||
|
//Internet Explorer 11 bis
|
||||||
|
$user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP06; rv:11.0) like Gecko';
|
||||||
|
$tmp=getBrowserInfo($user_agent);
|
||||||
|
$this->assertEquals('ie',$tmp['browsername']);
|
||||||
|
$this->assertEquals('11.0',$tmp['browserversion']);
|
||||||
|
$this->assertEmpty($tmp['phone']);
|
||||||
|
$this->assertFalse($tmp['tablet']);
|
||||||
|
$this->assertEquals('classic', $tmp['layout']);
|
||||||
|
|
||||||
//iPad
|
//iPad
|
||||||
$user_agent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25';
|
$user_agent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25';
|
||||||
$tmp=getBrowserInfo($user_agent);
|
$tmp=getBrowserInfo($user_agent);
|
||||||
@@ -445,11 +454,11 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
$text='<a href="/myurl" title="<u>Afficher projet</u>">ABC</a>';
|
$text='<a href="/myurl" title="<u>Afficher projet</u>">ABC</a>';
|
||||||
$after=dol_string_nohtmltag($text,1);
|
$after=dol_string_nohtmltag($text,1);
|
||||||
$this->assertEquals("ABC",$after,"test6");
|
$this->assertEquals("ABC",$after,"test6");
|
||||||
|
|
||||||
$text='<a href="/myurl" title="<u>Afficher projet</u>">DEF</a>';
|
$text='<a href="/myurl" title="<u>Afficher projet</u>">DEF</a>';
|
||||||
$after=dol_string_nohtmltag($text,1);
|
$after=dol_string_nohtmltag($text,1);
|
||||||
$this->assertEquals("DEF",$after,"test7");
|
$this->assertEquals("DEF",$after,"test7");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user