Merge remote-tracking branch 'upstream/develop' into free_email

This commit is contained in:
Frédéric FRANCE 2020-05-05 18:37:56 +02:00
commit 93cac43306
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
147 changed files with 1561 additions and 637 deletions

View File

@ -195,22 +195,6 @@ tools:
- 'htdocs/includes/*' - 'htdocs/includes/*'
paths: { } paths: { }
php_changetracking:
enabled: false
bug_patterns:
- '\bfix(?:es|ed)?\b'
feature_patterns:
- '\badd(?:s|ed)?\b'
- '\bimplement(?:s|ed)?\b'
filter:
excluded_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
paths: { }
# Coding-Style / Bug Detection # Coding-Style / Bug Detection
js_hint: js_hint:
enabled: false enabled: false

View File

@ -28,7 +28,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp) - [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp)
- DoliDeb for Debian or Ubuntu - [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
Releases can be downloaded from [official website](https://www.dolibarr.org/). Releases can be downloaded from [official website](https://www.dolibarr.org/).

View File

@ -67,19 +67,11 @@
</rule> </rule>
<!-- <!-- Warnings on TODO -->
<!-- Disabled: We want to keep TODO as normal
<rule ref="Generic.Commenting.Todo" /> <rule ref="Generic.Commenting.Todo" />
--> -->
<!-- Warning if action on same line than if -->
<!--
<rule ref="Generic.ControlStructures.InlineControlStructure">
<properties>
<property name="error" value="false"/>
</properties>
</rule>
-->
<!-- PHP code MUST use only UTF-8 without BOM. --> <!-- PHP code MUST use only UTF-8 without BOM. -->
<rule ref="Generic.Files.ByteOrderMark"/> <rule ref="Generic.Files.ByteOrderMark"/>
@ -99,17 +91,31 @@
</properties> </properties>
</rule> </rule>
<!-- Disallow several statements on same line --> <!-- Disallow several statements on same line -->
<!-- Warning if action on same line than if -->
<!-- Disabled: We want to allow this for better code compacity and readability
<rule ref="Generic.ControlStructures.InlineControlStructure">
<properties>
<property name="error" value="false"/>
</properties>
</rule>
-->
<!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability --> <!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
<rule ref="Generic.Formatting.DisallowMultipleStatements"> <rule ref="Generic.Formatting.DisallowMultipleStatements">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<!-- Have 2 chars padding maximum and always show as errors -->
<!-- <!-- Check assignement have the = align on each line. Have 20 chars padding maximum and always show as errors -->
<!-- Disabled: Report some false warning
<rule ref="Generic.Formatting.MultipleStatementAlignment"> <rule ref="Generic.Formatting.MultipleStatementAlignment">
<properties> <property name="maxPadding" value="2"/> <property <properties>
name="ignoreMultiLine" value="true"/> </properties> </rule> <property name="maxPadding" value="20"/>
<property name="ignoreMultiLine" value="true"/>
</properties>
</rule>
--> -->
<rule ref="Generic.Formatting.SpaceAfterCast" /> <rule ref="Generic.Formatting.SpaceAfterCast" />
@ -127,7 +133,7 @@
<!-- Tweaks to metrics --> <!-- Tweaks to metrics -->
<rule ref="Generic.Metrics.CyclomaticComplexity"> <rule ref="Generic.Metrics.CyclomaticComplexity">
<properties> <properties>
<property name="complexity" value="150" /> <property name="complexity" value="250" />
<property name="absoluteComplexity" value="300" /> <property name="absoluteComplexity" value="300" />
</properties> </properties>
</rule> </rule>
@ -181,6 +187,13 @@
</properties> </properties>
</rule> </rule>
<!-- Check for duplicate class names -->
<!-- Disabled: We need this for dependency injection.
<rule ref="Generic.Classes.DuplicateClassName" />
-->
<!-- Rules from Squiz Standard -->
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" /> <rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
@ -190,12 +203,9 @@
<property name="ignoreBlankLines" value="false"/> <property name="ignoreBlankLines" value="false"/>
</properties> </properties>
</rule> </rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile"> <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
<severity>0</severity> <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
</rule> <!-- Disabled: We want to have 2 empty line as separator sometimes -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" > <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" >
<severity>0</severity> <severity>0</severity>
</rule> </rule>
@ -208,7 +218,6 @@
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" /> <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction"> <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction">
<severity>0</severity>
</rule> </rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties> <properties>
@ -220,23 +229,16 @@
</rule> </rule>
<rule ref="Squiz.Scope.MethodScope.Missing" /> <rule ref="Squiz.Scope.MethodScope.Missing" />
<!-- Rules from PEAR Standard --> <!-- Rules from PEAR Standard -->
<rule ref="PEAR.Classes.ClassDeclaration" /> <rule ref="PEAR.Classes.ClassDeclaration" />
<!-- Check for duplicate class names -->
<!-- <rule ref="Generic.Classes.DuplicateClassName" /> -->
<rule ref="PEAR.Commenting.ClassComment" /> <rule ref="PEAR.Commenting.ClassComment" />
<!-- TODO Remove this and fix reported errors --> <rule ref="PEAR.Commenting.ClassComment.Missing" />
<rule ref="PEAR.Commenting.ClassComment.Missing">
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.ClassComment.MissingTag"> <rule ref="PEAR.Commenting.ClassComment.MissingTag" />
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag"> <rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag">
<severity>0</severity> <severity>0</severity>
@ -245,67 +247,38 @@
<rule ref="PEAR.Commenting.ClassComment.MissingCategoryTag"> <rule ref="PEAR.Commenting.ClassComment.MissingCategoryTag">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.ClassComment.MissingLicenseTag"> <rule ref="PEAR.Commenting.ClassComment.MissingLicenseTag">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.ClassComment.MissingLinkTag"> <rule ref="PEAR.Commenting.ClassComment.MissingLinkTag">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.ClassComment.MissingPackageTag"> <rule ref="PEAR.Commenting.ClassComment.MissingPackageTag">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<!--
<rule ref="PEAR.Commenting.FileComment" />
<rule ref="PEAR.Commenting.FileComment.WrongStyle">
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.FileComment.MissingVersion">
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.FileComment.MissingTag">
<severity>0</severity>
</rule>
-->
<rule ref="PEAR.Commenting.FunctionComment" /> <rule ref="PEAR.Commenting.FunctionComment" />
<rule ref="PEAR.Commenting.FunctionComment.Empty"> <rule ref="PEAR.Commenting.FunctionComment.Empty" />
<severity>5</severity>
</rule>
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
<severity>0</severity>
</rule>-->
<!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
<severity>0</severity>
</rule>-->
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" /> <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName"> <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType"> <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName" /> <rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired" />
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
<severity>0</severity>
</rule>
<rule ref="PEAR.Commenting.FunctionComment.WrongStyle"> <rule ref="PEAR.Commenting.FunctionComment.WrongStyle">
<severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.FunctionComment.SpacingBeforeParamType"> <rule ref="PEAR.Commenting.FunctionComment.SpacingBeforeParamType">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
@ -342,6 +315,7 @@
<rule ref="PEAR.Files.IncludingFile.UseInclude"> <rule ref="PEAR.Files.IncludingFile.UseInclude">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<!-- TODO Enable this test. We should use require for include in prior of include when out of if --> <!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce"> <rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
<severity>0</severity> <severity>0</severity>

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -122,6 +122,10 @@ if ($action == 'update')
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity);
else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity);
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array()))));
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity);
else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity);
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity);
else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity);

View File

@ -34,10 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Noti
$langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails')); $langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails'));
// Security check // Security check
if (!$user->admin) if (!$user->admin) {
accessforbidden(); accessforbidden();
}
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
$error = 0;
/* /*
@ -45,27 +47,48 @@ $action = GETPOST('action', 'aZ09');
*/ */
// Action to update or add a constant // Action to update or add a constant
if ($action == 'update' || $action == 'add') if ($action == 'settemplates')
{ {
$constlineid = GETPOST('rowid', 'int'); $db->begin();
$constname = GETPOST('constname', 'alpha');
$constvalue = (GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue')); if (!$error && is_array($_POST))
$consttype = (GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype')); {
$constnote = (GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote')); $reg = array();
foreach ($_POST as $key => $val)
{
if (!preg_match('/^constvalue_(.*)_TEMPLATE/', $key, $reg)) continue;
$typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype]; $triggername = $reg[1];
$constvalue = GETPOST($key, 'alpha');
$consttype = 'emailtemplate:xxx';
$tmparray=explode(':', $constvalue);
if (! empty($tmparray[0]) && ! empty($tmparray[1])) {
$constvalue = $tmparray[0];
$consttype = 'emailtemplate:'.$tmparray[1];
//var_dump($constvalue);
//var_dump($consttype);
$res = dolibarr_set_const($db, $triggername.'_TEMPLATE', $constvalue, $consttype, 0, '', $conf->entity);
if ($res < 0) {
$error++;
break;
}
} else {
$res = dolibarr_del_const($db, $triggername.'_TEMPLATE', $conf->entity);
}
}
}
$res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
if (!$res > 0) $error++;
if (!$error) if (!$error)
{ {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} }
else else
{ {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors'); setEventMessages($langs->trans("Error"), null, 'errors');
} }
} }
@ -74,12 +97,31 @@ if ($action == 'setvalue' && $user->admin)
{ {
$db->begin(); $db->begin();
$result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", $_POST["email_from"], 'chaine', 0, '', $conf->entity); $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "none"), 'chaine', 0, '', $conf->entity);
if ($result < 0) $error++; if ($result < 0) $error++;
if (!$error)
{
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
if ($action == 'setfixednotif' && $user->admin)
{
$db->begin();
if (!$error && is_array($_POST)) if (!$error && is_array($_POST))
{ {
//var_dump($_POST);
$reg = array(); $reg = array();
foreach ($_POST as $key => $val) foreach ($_POST as $key => $val)
{ {
@ -168,9 +210,18 @@ print '</td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
print '</form>';
print '<br><br>'; print '<br><br>';
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="settemplates">';
// Notification per contacts // Notification per contacts
$title = $langs->trans("ListOfNotificationsPerUser"); $title = $langs->trans("ListOfNotificationsPerUser");
if (!empty($conf->societe->enabled)) $title = $langs->trans("ListOfNotificationsPerUserOrContact"); if (!empty($conf->societe->enabled)) $title = $langs->trans("ListOfNotificationsPerUserOrContact");
@ -211,7 +262,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
} }
$helptext = ''; $helptext = '';
form_constantes($constantes, 0, $helptext); form_constantes($constantes, 2, $helptext);
} else { } else {
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
@ -248,14 +299,18 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
print '</table>'; print '</table>';
} }
print '<div class="opacitymedium">'; print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>'; print '</form>';
print '</div>';
print '<br><br>'; print '<br><br>';
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setfixednotif">';
print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', ''); print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', '');
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
@ -333,6 +388,12 @@ foreach ($listofnotifiedevents as $notifiedevent)
} }
print '</table>'; print '</table>';
print '<div class="opacitymedium">';
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
print '</div>';
print '<br>'; print '<br>';
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>'; print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';

View File

@ -979,7 +979,6 @@ class BOM extends CommonObject
* *
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
*/ */
//public function doScheduledJob($param1, $param2, ...)
public function doScheduledJob() public function doScheduledJob()
{ {
global $conf, $langs; global $conf, $langs;

View File

@ -556,6 +556,12 @@ foreach ($accounts as $key=>$type)
} }
// Extra fields // Extra fields
if (is_array($objecttmp->array_options)) {
$obj = new stdClass();
foreach ($objecttmp->array_options as $k => $v) {
$obj->$k = $v;
}
}
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields); $parameters = array('arrayfields'=>$arrayfields);

View File

@ -297,7 +297,15 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }
if ($massaction == 'withdrawrequest') if ($massaction == 'makepayment'){
$arrayofselected=is_array($toselect)?$toselect:array();
$loc = dol_buildpath('/compta/paiement.php', 2).'?action=create&facids='.implode(',', $arrayofselected);
header('Location: '.$loc);
exit;
}
elseif ($massaction == 'withdrawrequest')
{ {
$langs->load("withdrawals"); $langs->load("withdrawals");
@ -657,6 +665,7 @@ if ($resql)
'generate_doc'=>$langs->trans("ReGeneratePDF"), 'generate_doc'=>$langs->trans("ReGeneratePDF"),
'builddoc'=>$langs->trans("PDFMerge"), 'builddoc'=>$langs->trans("PDFMerge"),
'presend'=>$langs->trans("SendByMail"), 'presend'=>$langs->trans("SendByMail"),
//'makepayment'=>$langs->trans("InvoicePaymentsLimits"), TODO Blank page when using this
); );
if ($conf->prelevement->enabled) { if ($conf->prelevement->enabled) {
$langs->load("withdrawals"); $langs->load("withdrawals");

View File

@ -521,7 +521,9 @@ if (empty($reshook))
} }
$desc = $prod->description; $desc = $prod->description;
$desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc;
else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
$fk_unit = $prod->fk_unit; $fk_unit = $prod->fk_unit;
} }
else else

View File

@ -360,7 +360,7 @@ if ($result)
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td width="110" class="nowrap">'; print '<td class="nowraponall">';
$staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->cid); $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->cid);
$staticcontrat->id = $obj->cid; $staticcontrat->id = $obj->cid;
print $staticcontrat->getNomUrl(1, 16); print $staticcontrat->getNomUrl(1, 16);
@ -425,7 +425,7 @@ if ($resql)
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td width="110" class="nowrap">'; print '<td class="nowraponall">';
$staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat);
$staticcontrat->id = $obj->fk_contrat; $staticcontrat->id = $obj->fk_contrat;
print $staticcontrat->getNomUrl(1, 16); print $staticcontrat->getNomUrl(1, 16);
@ -506,7 +506,7 @@ if ($resql)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td width="110" class="nowrap">'; print '<td class="nowraponall">';
$staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat);
$staticcontrat->id = $obj->fk_contrat; $staticcontrat->id = $obj->fk_contrat;
print $staticcontrat->getNomUrl(1, 16); print $staticcontrat->getNomUrl(1, 16);
@ -586,7 +586,7 @@ if ($resql)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td width="110" class="nowrap">'; print '<td class="nowraponall">';
$staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat);
$staticcontrat->id = $obj->fk_contrat; $staticcontrat->id = $obj->fk_contrat;
print $staticcontrat->getNomUrl(1, 16); print $staticcontrat->getNomUrl(1, 16);

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014-2019 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014-2019 Juanjo Menent <jmenent@2byte.es>
@ -612,9 +612,11 @@ while ($i < min($num, $limit))
} }
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Ref
if (!empty($arrayfields['c.ref']['checked'])) if (!empty($arrayfields['c.ref']['checked']))
{ {
print '<td class="nowrap">'; print '<td class="nowraponall">';
print $contracttmp->getNomUrl(1); print $contracttmp->getNomUrl(1);
if ($obj->nb_late) print img_warning($langs->trans("Late")); if ($obj->nb_late) print img_warning($langs->trans("Late"));
if (!empty($obj->note_private) || !empty($obj->note_public)) { if (!empty($obj->note_private) || !empty($obj->note_public)) {
@ -631,6 +633,7 @@ while ($i < min($num, $limit))
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['c.ref_customer']['checked'])) if (!empty($arrayfields['c.ref_customer']['checked']))
{ {
print '<td>'.$contracttmp->getFormatedCustomerRef($obj->ref_customer).'</td>'; print '<td>'.$contracttmp->getFormatedCustomerRef($obj->ref_customer).'</td>';

View File

@ -56,7 +56,7 @@ $arrayresult = array();
if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire)
{ {
$arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
} }
if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || !empty($conf->fournisseur->enabled)) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || !empty($conf->fournisseur->enabled)) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire)
@ -75,13 +75,18 @@ if (((!empty($conf->product->enabled) && $user->rights->produit->lire) || (!empt
$arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); $arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
} }
if (!empty($conf->mrp->enabled) && $user->rights->mrp->read && empty($conf->global->MAIN_SEARCHFORM_MRP_DISABLED))
{
$arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire) if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire)
{ {
$arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
} }
if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire) if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire)
{ {
$arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_task', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
} }
if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire) if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire)
@ -103,15 +108,15 @@ if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUST
if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire)
{ {
$arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
} }
if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) || ! empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) || ! empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire)
{ {
$arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
} }
if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
{ {
$arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
} }
if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire)
@ -122,6 +127,10 @@ if (!empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_F
{ {
$arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); $arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
} }
if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read)
{
$arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
}
// HR // HR
if (!empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) if (!empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire)
@ -136,10 +145,6 @@ if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLI
{ {
$arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
} }
if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read)
{
$arrayresult['searchintotickets'] = array('position'=>220, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
}
/* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag /* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag

View File

@ -1674,7 +1674,7 @@ class Form
* @param int $show_empty 0=list with no empty value, 1=add also an empty value into list * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list
* @param array $exclude Array list of users id to exclude * @param array $exclude Array list of users id to exclude
* @param int $disabled If select list must be disabled * @param int $disabled If select list must be disabled
* @param array|string $include Array list of users id to include or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me * @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
* @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled
* @param string $force_entity '0' or Ids of environment to force * @param string $force_entity '0' or Ids of environment to force
* @param int $maxlength Maximum length of string into list (0=no limit) * @param int $maxlength Maximum length of string into list (0=no limit)
@ -2507,7 +2507,7 @@ class Form
$label = $objp->label; $label = $objp->label;
if (!empty($objp->label_translated)) $label = $objp->label_translated; if (!empty($objp->label_translated)) $label = $objp->label_translated;
if (!empty($filterkey) && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '<strong>$1</strong>', $label, 1); if (!empty($filterkey) && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $label, 1);
$outkey = $objp->rowid; $outkey = $objp->rowid;
$outref = $objp->ref; $outref = $objp->ref;
@ -2579,7 +2579,7 @@ class Form
if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) $opt .= ' ('.getCountry($outorigin, 1).')'; if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) $opt .= ' ('.getCountry($outorigin, 1).')';
$objRef = $objp->ref; $objRef = $objp->ref;
if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '<strong>$1</strong>', $objRef, 1); if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $objRef, 1);
$outval .= $objRef; $outval .= $objRef;
if ($outbarcode) $outval .= ' ('.$outbarcode.')'; if ($outbarcode) $outval .= ' ('.$outbarcode.')';
$outval .= ' - '.dol_trunc($label, $maxlengtharticle); $outval .= ' - '.dol_trunc($label, $maxlengtharticle);
@ -2948,11 +2948,11 @@ class Form
} }
$objRef = $objp->ref; $objRef = $objp->ref;
if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '<strong>$1</strong>', $objRef, 1); if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $objRef, 1);
$objRefFourn = $objp->ref_fourn; $objRefFourn = $objp->ref_fourn;
if ($filterkey && $filterkey != '') $objRefFourn = preg_replace('/('.preg_quote($filterkey).')/i', '<strong>$1</strong>', $objRefFourn, 1); if ($filterkey && $filterkey != '') $objRefFourn = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $objRefFourn, 1);
$label = $objp->label; $label = $objp->label;
if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '<strong>$1</strong>', $label, 1); if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $label, 1);
$optlabel = $objp->ref; $optlabel = $objp->ref;
if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn)) { if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn)) {

View File

@ -23,6 +23,10 @@
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
/**
* Class to manage forms for categories
*/
class FormCategory extends Form class FormCategory extends Form
{ {
/** /**

View File

@ -32,6 +32,10 @@
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
/**
* Class of forms component to manage companies
*/
class FormCompany extends Form class FormCompany extends Form
{ {

View File

@ -1393,7 +1393,7 @@ class FormFile
if ($permtoeditline) if ($permtoeditline)
{ {
$paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '&section_dir='.urlencode($relativepath) : ''); $paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '&section_dir='.urlencode($relativepath) : '');
print '<a class="editfielda" href="'.(($useinecm == 1 || $useinecm == 5) ? '#' : ($url.'?action=editfile&urlfile='.urlencode($filepath).$paramsectiondir.$param)).'" class="editfilelink" rel="'.$filepath.'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>'; print '<a class="editfielda reposition" href="'.(($useinecm == 1 || $useinecm == 5) ? '#' : ($url.'?action=editfile&urlfile='.urlencode($filepath).$paramsectiondir.$param)).'" class="editfilelink" rel="'.$filepath.'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
} }
} }
if ($permonobject) if ($permonobject)

View File

@ -236,8 +236,11 @@ function GetRootPath()
return substr($sRealPath, 0, $position); return substr($sRealPath, 0, $position);
} }
// Emulate the asp Server.mapPath function. /**
// given an url path return the physical directory that it corresponds to * Emulate the asp Server.mapPath function.
* @param string $path given an url path return the physical directory that it corresponds to
* @return string Path
*/
function Server_MapPath($path) function Server_MapPath($path)
{ {
// This function is available only for Apache // This function is available only for Apache
@ -338,7 +341,12 @@ function GetCurrentFolder()
return $sCurrentFolder; return $sCurrentFolder;
} }
// Do a cleanup of the folder name to avoid possible problems /**
* Do a cleanup of the folder name to avoid possible problems
*
* @param string $sNewFolderName Folder
* @return string Folder sanitized
*/
function SanitizeFolderName($sNewFolderName) function SanitizeFolderName($sNewFolderName)
{ {
$sNewFolderName = stripslashes($sNewFolderName); $sNewFolderName = stripslashes($sNewFolderName);
@ -349,7 +357,12 @@ function SanitizeFolderName($sNewFolderName)
return $sNewFolderName; return $sNewFolderName;
} }
// Do a cleanup of the file name to avoid possible problems /**
* Do a cleanup of the file name to avoid possible problems
*
* @param string $sNewFileName Folder
* @return string Folder sanitized
*/
function SanitizeFileName($sNewFileName) function SanitizeFileName($sNewFileName)
{ {
global $Config; global $Config;
@ -366,7 +379,15 @@ function SanitizeFileName($sNewFileName)
return $sNewFileName; return $sNewFileName;
} }
// This is the function that sends the results of the uploading process. /**
* This is the function that sends the results of the uploading process.
*
* @param string $errorNumber errorNumber
* @param string $fileUrl fileUrl
* @param string $fileName fileName
* @param string $customMsg customMsg
* @return void
*/
function SendUploadResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '') function SendUploadResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '')
{ {
// Minified version of the document.domain automatic fix script (#1919). // Minified version of the document.domain automatic fix script (#1919).

View File

@ -1409,7 +1409,7 @@ function complete_elementList_with_modules(&$elementList)
* *
* @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label)
* where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ...
* @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all (form is output by caller, recommanded) * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all (form is output by caller, recommended)
* @param string $helptext Help * @param string $helptext Help
* @return void * @return void
*/ */
@ -1420,6 +1420,9 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '')
$form = new Form($db); $form = new Form($db);
if (empty($strictw3c)) {
dol_syslog("Warning: Function form_constantes is calle with parameter strictw3c = 0, this is deprecated. Value must be 2 now.", LOG_DEBUG);
}
if (!empty($strictw3c) && $strictw3c == 1) if (!empty($strictw3c) && $strictw3c == 1)
{ {
print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -1584,12 +1587,13 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '')
//var_dump($modelmail); //var_dump($modelmail);
$moreonlabel = ''; $moreonlabel = '';
if (!empty($arrayofmessagename[$modelmail->label])) $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>'; if (!empty($arrayofmessagename[$modelmail->label])) $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
$arrayofmessagename[$modelmail->label] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; // The 'label' is the key that is unique if we exclude the language
$arrayofmessagename[$modelmail->label.':'.$tmp[1]] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel;
} }
} }
//var_dump($arraydefaultmessage); //var_dump($arraydefaultmessage);
//var_dump($arrayofmessagename); //var_dump($arrayofmessagename);
print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value, 'None', 1, 0, '', 0, 0, 0, '', '', 1); print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1);
} }
else // type = 'string' ou 'chaine' else // type = 'string' ou 'chaine'
{ {

View File

@ -720,10 +720,11 @@ function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1)
* @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666'
* @param int $overwriteifexists Overwrite file if exists (1 by default) * @param int $overwriteifexists Overwrite file if exists (1 by default)
* @param array $arrayreplacement Array to use to replace filenames with another one during the copy (works only on file names, not on directory names). * @param array $arrayreplacement Array to use to replace filenames with another one during the copy (works only on file names, not on directory names).
* @param int $excludesubdir 0=Do not exclude subdirectories, 1=Exclude subdirectories, 2=Exclude subdirectories if name is not a 2 chars (used for country codes subdirectories).
* @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK * @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK
* @see dol_copy() * @see dol_copy()
*/ */
function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null) function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null, $excludesubdir = 0)
{ {
global $conf; global $conf;
@ -759,8 +760,10 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep
{ {
if (is_dir($ossrcfile."/".$file)) if (is_dir($ossrcfile."/".$file))
{ {
if (empty($excludesubdir) || ($excludesubdir == 2 && strlen($file) == 2)) {
//var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists");
$tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement); $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement, $excludesubdir);
}
} }
else else
{ {

View File

@ -353,6 +353,24 @@ function show_stats_for_company($product, $socid)
print '<td class="right" width="25%">'.$langs->trans("TotalQuantity").'</td>'; print '<td class="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
print '</tr>'; print '</tr>';
// MO
if (!empty($conf->mrp->enabled) && $user->rights->mrp->read)
{
$nblines++;
//$ret = $product->load_stats_mo($socid);
if ($ret < 0) dol_print_error($db);
$langs->load("orders");
print '<tr><td>';
print '<a href="mo.php?id='.$product->id.'">'.img_object('', 'mrp').' '.$langs->trans("MO").'</a>';
print '</td><td class="right">';
print $product->stats_mo['suppliers'];
print '</td><td class="right">';
print $product->stats_mo['nb'];
print '</td><td class="right">';
print $product->stats_mo['qty'];
print '</td>';
print '</tr>';
}
// Customer proposals // Customer proposals
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
{ {
@ -379,7 +397,7 @@ function show_stats_for_company($product, $socid)
if ($ret < 0) dol_print_error($db); if ($ret < 0) dol_print_error($db);
$langs->load("propal"); $langs->load("propal");
print '<tr><td>'; print '<tr><td>';
print '<a href="supplier_proposal.php?id='.$product->id.'">'.img_object('', 'propal').' '.$langs->trans("SupplierProposals").'</a>'; print '<a href="supplier_proposal.php?id='.$product->id.'">'.img_object('', 'supplier_proposal').' '.$langs->trans("SupplierProposals").'</a>';
print '</td><td class="right">'; print '</td><td class="right">';
print $product->stats_proposal_supplier['suppliers']; print $product->stats_proposal_supplier['suppliers'];
print '</td><td class="right">'; print '</td><td class="right">';
@ -415,7 +433,7 @@ function show_stats_for_company($product, $socid)
if ($ret < 0) dol_print_error($db); if ($ret < 0) dol_print_error($db);
$langs->load("orders"); $langs->load("orders");
print '<tr><td>'; print '<tr><td>';
print '<a href="commande_fournisseur.php?id='.$product->id.'">'.img_object('', 'order').' '.$langs->trans("SuppliersOrders").'</a>'; print '<a href="commande_fournisseur.php?id='.$product->id.'">'.img_object('', 'supplier_order').' '.$langs->trans("SuppliersOrders").'</a>';
print '</td><td class="right">'; print '</td><td class="right">';
print $product->stats_commande_fournisseur['suppliers']; print $product->stats_commande_fournisseur['suppliers'];
print '</td><td class="right">'; print '</td><td class="right">';
@ -425,24 +443,6 @@ function show_stats_for_company($product, $socid)
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
// MO
if (!empty($conf->mrp->enabled) && $user->rights->mrp->read)
{
$nblines++;
//$ret = $product->load_stats_mo($socid);
if ($ret < 0) dol_print_error($db);
$langs->load("orders");
print '<tr><td>';
print '<a href="mo.php?id='.$product->id.'">'.img_object('', 'mrp').' '.$langs->trans("MO").'</a>';
print '</td><td class="right">';
print $product->stats_mo['suppliers'];
print '</td><td class="right">';
print $product->stats_mo['nb'];
print '</td><td class="right">';
print $product->stats_mo['qty'];
print '</td>';
print '</tr>';
}
// Customer invoices // Customer invoices
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
{ {
@ -469,7 +469,7 @@ function show_stats_for_company($product, $socid)
if ($ret < 0) dol_print_error($db); if ($ret < 0) dol_print_error($db);
$langs->load("bills"); $langs->load("bills");
print '<tr><td>'; print '<tr><td>';
print '<a href="facture_fournisseur.php?id='.$product->id.'">'.img_object('', 'bill').' '.$langs->trans("SuppliersInvoices").'</a>'; print '<a href="facture_fournisseur.php?id='.$product->id.'">'.img_object('', 'supplier_invoice').' '.$langs->trans("SuppliersInvoices").'</a>';
print '</td><td class="right">'; print '</td><td class="right">';
print $product->stats_facture_fournisseur['suppliers']; print $product->stats_facture_fournisseur['suppliers'];
print '</td><td class="right">'; print '</td><td class="right">';

View File

@ -43,6 +43,14 @@ function takepos_prepare_head()
$head[$h][2] = 'receipt'; $head[$h][2] = 'receipt';
$h++; $h++;
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
{
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php';
$head[$h][1] = $langs->trans("BarRestaurant");
$head[$h][2] = 'bar';
$h++;
}
$numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
for ($i = 1; $i <= $numterminals; $i++) for ($i = 1; $i <= $numterminals; $i++)
{ {

View File

@ -359,7 +359,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring); print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring);
print '</th>'; print '</th>';
print '<th class="right">'; print '<th class="right">';
$url = 'https://www.dolistore.com/4-skins'; $url = 'https://www.dolistore.com/9-skins';
print '<a href="'.$url.'" target="_blank">'; print '<a href="'.$url.'" target="_blank">';
print $langs->trans('DownloadMoreSkins'); print $langs->trans('DownloadMoreSkins');
print '</a>'; print '</a>';
@ -726,6 +726,33 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>'; print '</tr>';
} }
// TextTitleLinkColor
if ($foruserprofile)
{
}
else
{
$default=(empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundTableTitleTextlinkColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', 'formcolor', 1).' ';
}
else
{
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default"));
}
print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
print '</span>';
print '</td>';
print '</tr>';
}
// BackgroundTableLineOddColor // BackgroundTableLineOddColor
if ($foruserprofile) if ($foruserprofile)
{ {

View File

@ -282,7 +282,8 @@ class modEmailCollector extends DolibarrModules
$tmpresql = $this->db->query($tmpsql); $tmpresql = $this->db->query($tmpsql);
if ($tmpresql) { if ($tmpresql) {
if ($this->db->num_rows($tmpresql) == 0) { if ($this->db->num_rows($tmpresql) == 0) {
$descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated.';
$descriptionA1 .= ' If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.';
$sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; $sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)";
$sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', '".$this->db->escape($descriptionA1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', '".$this->db->escape($descriptionA1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)";
$sqlforexampleA2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleA2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)";
@ -319,7 +320,9 @@ class modEmailCollector extends DolibarrModules
$tmpresql = $this->db->query($tmpsql); $tmpresql = $this->db->query($tmpsql);
if ($tmpresql) { if ($tmpresql) {
if ($this->db->num_rows($tmpresql) == 0) { if ($this->db->num_rows($tmpresql) == 0) {
$descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.<br>Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated.";
$descriptionC1 .= " If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.<br>";
$descriptionC1 .= "Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1.";
$sqlforexampleC1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; $sqlforexampleC1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)";
$sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads', '".$this->db->escape($descriptionC1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads', '".$this->db->escape($descriptionC1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)";
$sqlforexampleC2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleC2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)";

View File

@ -61,6 +61,9 @@ abstract class ModelePDFProduct extends CommonDocGenerator
} }
} }
/**
* Class template for classes of numbering product
*/
abstract class ModeleProductCode abstract class ModeleProductCode
{ {
/** /**
@ -97,7 +100,6 @@ abstract class ModeleProductCode
*/ */
public function getExample($langs) public function getExample($langs)
{ {
$langs->load("bills");
return $langs->trans("NoExample"); return $langs->trans("NoExample");
} }

View File

@ -55,11 +55,17 @@ class PaymentDonation extends CommonObject
public $fk_donation; public $fk_donation;
public $datec = ''; public $datec = '';
public $tms = ''; public $tms = '';
public $datep = ''; public $datep = '';
public $amount; // Total amount of payment public $amount; // Total amount of payment
public $amounts = array(); // Array of amounts public $amounts = array(); // Array of amounts
public $typepayment; public $typepayment;
public $num_payment; public $num_payment;
/** /**

View File

@ -772,7 +772,6 @@ class EcmFiles extends CommonObject
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
$result = ''; $result = '';
$companylink = '';
$label = '<u>'.$langs->trans("MyModule").'</u>'; $label = '<u>'.$langs->trans("MyModule").'</u>';
$label .= '<br>'; $label .= '<br>';
@ -867,6 +866,9 @@ class EcmFiles extends CommonObject
} }
/**
* Class of an index line of a document
*/
class EcmfilesLine class EcmfilesLine
{ {
/** /**

View File

@ -1,4 +1,6 @@
<?php <?php
use Sabre\VObject\Recur\EventIterator\HandleRDateExpandTest;
/* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> /* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2018 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
@ -1185,8 +1187,13 @@ function migrate_contracts_date1($db, $langs, $conf)
print '</td></tr>'; print '</td></tr>';
} }
/* /**
* Mise a jour date contrat avec date min effective mise en service si inferieur * Update contracts with date min real if service date is lower
*
* @param DoliDB $db Database handler
* @param Translate $langs Language
* @param Conf $conf Conf
* @return void
*/ */
function migrate_contracts_date2($db, $langs, $conf) function migrate_contracts_date2($db, $langs, $conf)
{ {

View File

@ -1803,6 +1803,7 @@ TopMenuDisableImages=Hide images in Top menu
LeftMenuBackgroundColor=Background color for Left menu LeftMenuBackgroundColor=Background color for Left menu
BackgroundTableTitleColor=Background color for Table title line BackgroundTableTitleColor=Background color for Table title line
BackgroundTableTitleTextColor=Text color for Table title line BackgroundTableTitleTextColor=Text color for Table title line
BackgroundTableTitleTextlinkColor=Text color for Table title link line
BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineOddColor=Background color for odd table lines
BackgroundTableLineEvenColor=Background color for even table lines BackgroundTableLineEvenColor=Background color for even table lines
MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay)

View File

@ -106,3 +106,5 @@ MainPrinterToUse=Main printer to use
OrderPrinterToUse=Order printer to use OrderPrinterToUse=Order printer to use
MainTemplateToUse=Main template to use MainTemplateToUse=Main template to use
OrderTemplateToUse=Order template to use OrderTemplateToUse=Order template to use
BarRestaurant=Bar Restaurant
AutoOrder=Customer auto order

View File

@ -953,12 +953,13 @@ SearchIntoMembers=Members
SearchIntoUsers=Users SearchIntoUsers=Users
SearchIntoProductsOrServices=Products or services SearchIntoProductsOrServices=Products or services
SearchIntoProjects=Projects SearchIntoProjects=Projects
SearchIntoMO=Manufacturing Orders
SearchIntoTasks=Tasks SearchIntoTasks=Tasks
SearchIntoCustomerInvoices=Customer invoices SearchIntoCustomerInvoices=Customer invoices
SearchIntoSupplierInvoices=Vendor invoices SearchIntoSupplierInvoices=Vendor invoices
SearchIntoCustomerOrders=Sales orders SearchIntoCustomerOrders=Sales orders
SearchIntoSupplierOrders=Purchase orders SearchIntoSupplierOrders=Purchase orders
SearchIntoCustomerProposals=Customer proposals SearchIntoCustomerProposals=Commercial proposals
SearchIntoSupplierProposals=Vendor proposals SearchIntoSupplierProposals=Vendor proposals
SearchIntoInterventions=Interventions SearchIntoInterventions=Interventions
SearchIntoContracts=Contracts SearchIntoContracts=Contracts

View File

@ -1803,6 +1803,7 @@ TopMenuDisableImages=Cacher les images du menu principal
LeftMenuBackgroundColor=Couleur de fond pour le menu Gauche LeftMenuBackgroundColor=Couleur de fond pour le menu Gauche
BackgroundTableTitleColor=Couleur de fond pour la ligne de titres des liste/tableaux BackgroundTableTitleColor=Couleur de fond pour la ligne de titres des liste/tableaux
BackgroundTableTitleTextColor=Couleur du texte pour la ligne de titre des tableaux BackgroundTableTitleTextColor=Couleur du texte pour la ligne de titre des tableaux
BackgroundTableTitleTextlinkColor=Couleur du texte pour la ligne de titre lien des tableaux
BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables
BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tales BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tales
MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai) MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai)

View File

@ -1047,10 +1047,10 @@ class MyObject extends CommonObject
/** /**
* Action executed by scheduler * Action executed by scheduler
* CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters'
* Use public function doScheduledJob($param1, $param2, ...) to get parameters
* *
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
*/ */
//public function doScheduledJob($param1, $param2, ...)
public function doScheduledJob() public function doScheduledJob()
{ {
global $conf, $langs; global $conf, $langs;

View File

@ -533,7 +533,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/ */
// Delete (need delete permission, or if draft, just need create/modify permission) // Delete (need delete permission, or if draft, just need create/modify permission)
if ($permissiontodelete) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
{ {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n"; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n";
} }

View File

@ -108,7 +108,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea
if (!$sortorder) $sortorder = "ASC"; if (!$sortorder) $sortorder = "ASC";
// Initialize array of search criterias // Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha')); $search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml'));
$search = array(); $search = array();
foreach ($object->fields as $key => $val) foreach ($object->fields as $key => $val)
{ {

View File

@ -1008,7 +1008,7 @@ class Mo extends CommonObject
} }
$url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id; $url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id;
if ($option = 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id;
if ($option != 'nolink') if ($option != 'nolink')
{ {
@ -1226,10 +1226,10 @@ class Mo extends CommonObject
/** /**
* Action executed by scheduler * Action executed by scheduler
* CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters'
* Use public function doScheduledJob($param1, $param2, ...) to get parameters
* *
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
*/ */
//public function doScheduledJob($param1, $param2, ...)
public function doScheduledJob() public function doScheduledJob()
{ {
global $conf, $langs; global $conf, $langs;

View File

@ -639,7 +639,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Delete (need delete permission, or if draft, just need create/modify permission) // Delete (need delete permission, or if draft, just need create/modify permission)
if ($permissiontodelete) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
{ {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n"; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
} }

View File

@ -107,7 +107,7 @@ if ($user->socid > 0) // Protection if external user
// Initialize array of search criterias // Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha')); $search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml'));
$search = array(); $search = array();
foreach ($object->fields as $key => $val) foreach ($object->fields as $key => $val)
{ {

View File

@ -254,8 +254,10 @@ class FormProduct
$out .= $comboenhancement; $out .= $comboenhancement;
} }
if (strpos($htmlname, 'search_') !== 0) {
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
}
$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled' : '').' id="'.$htmlname.'" name="'.($htmlname.($disabled ? '_disabled' : '')).'">'; $out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled' : '').' id="'.$htmlname.'" name="'.($htmlname.($disabled ? '_disabled' : '')).'">';
if ($empty) $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>'; if ($empty) $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>';

View File

@ -1443,7 +1443,7 @@ class Product extends CommonObject
} }
} }
/* /**
* Sets an accountancy code for a product. * Sets an accountancy code for a product.
* Also calls PRODUCT_MODIFY trigger when modified * Also calls PRODUCT_MODIFY trigger when modified
* *

View File

@ -101,7 +101,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
foreach ($listofsearchfields as $key => $value) foreach ($listofsearchfields as $key => $value)
{ {
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>'; print '<tr class="oddeven">';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>'; print '</tr>';
@ -201,7 +201,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>';
print '<tr '.$bc[0].'><td class="center" colspan="2">'; print '<tr class="oddeven"><td class="center" colspan="2">';
$sql = "SELECT c.label, count(*) as nb"; $sql = "SELECT c.label, count(*) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cs"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cs";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
@ -413,7 +413,7 @@ llxFooter();
$db->close(); $db->close();
/* /**
* Print html activity for product type * Print html activity for product type
* *
* @param int $product_type Type of product * @param int $product_type Type of product
@ -422,7 +422,6 @@ $db->close();
function activitytrim($product_type) function activitytrim($product_type)
{ {
global $conf, $langs, $db; global $conf, $langs, $db;
global $bc;
// We display the last 3 years // We display the last 3 years
$yearofbegindate = date('Y', dol_time_plus_duree(time(), -3, "y")); $yearofbegindate = date('Y', dol_time_plus_duree(time(), -3, "y"));

View File

@ -164,25 +164,21 @@ if ($id > 0 || !empty($ref))
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER ['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER ['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">'; print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - '; print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - ';

View File

@ -172,25 +172,21 @@ if ($id > 0 || !empty($ref)) {
if ($result) { if ($result) {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">'; print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - '; print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - ';

View File

@ -153,25 +153,22 @@ if ($id > 0 || !empty($ref))
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
$i = 0; $i = 0;
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('companies', 'bills', 'products')); $langs->loadLangs(array('companies', 'bills', 'products', 'supplier_proposal'));
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha'); $ref = GETPOST('ref', 'alpha');
@ -185,25 +185,21 @@ if ($id > 0 || !empty($ref))
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER ['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER ['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">'; print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - '; print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - ';

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('companies', 'bills', 'products', 'companies')); $langs->loadLangs(array('companies', 'bills', 'products', 'companies', 'supplier_proposal'));
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha'); $ref = GETPOST('ref', 'alpha');
@ -165,25 +165,21 @@ if ($id > 0 || !empty($ref))
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&amp;id=$product->id", $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">'; print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - '; print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - ';

View File

@ -150,25 +150,21 @@ if ($id > 0 || !empty($ref))
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.urlencode($search_month);
if (!empty($search_year))
$option .= '&amp;search_year='.urlencode($search_year);
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
$i = 0; $i = 0;
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';

View File

@ -169,25 +169,21 @@ if ($id > 0 || !empty($ref))
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">'; print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - '; print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - ';

View File

@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('products', 'companies')); $langs->loadLangs(array('products', 'companies', 'supplier_proposal'));
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha'); $ref = GETPOST('ref', 'alpha');
@ -169,25 +169,21 @@ if ($id > 0 || !empty($ref))
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
if (!empty($id))
$option .= '&amp;id='.$product->id;
if (!empty($search_month))
$option .= '&amp;search_month='.$search_month;
if (!empty($search_year))
$option .= '&amp;search_year='.$search_year;
if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit);
if (!empty($id)) $option .= '&id='.$product->id;
if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month);
if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year);
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n";
if (!empty($sortfield)) if (!empty($sortfield))
print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>';
if (!empty($sortorder)) if (!empty($sortorder))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
if (!empty($page)) {
print '<input type="hidden" name="page" value="'.$page.'"/>';
$option .= '&amp;page='.$page;
}
print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) $option .= '&page='.urlencode($page);
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">'; print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - '; print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - ';

View File

@ -129,8 +129,8 @@ try {
)); ));
} }
/* /**
* generate payment response * Generate payment response
* *
* @param \Stripe\PaymentIntent $intent PaymentIntent * @param \Stripe\PaymentIntent $intent PaymentIntent
* @return void * @return void

View File

@ -871,10 +871,12 @@ class Dolresource extends CommonObject
return $resources; return $resources;
} }
/* /**
* Return an int number of resources linked to the element * Return an int number of resources linked to the element
* *
* @return int * @param string $element Element type
* @param int $element_id Element id
* @return int Nb of resources loaded
*/ */
public function fetchElementResources($element, $element_id) public function fetchElementResources($element, $element_id)
{ {

View File

@ -0,0 +1,178 @@
<?php
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/admin/bar.php
* \ingroup takepos
* \brief Setup page for TakePos module - Bar Restaurant features
*/
require '../../main.inc.php'; // Load $user and permissions
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
// Security check
if (!$user->admin) accessforbidden();
$langs->loadLangs(array("admin", "cashdesk", "printing"));
global $db;
/*
* Actions
*/
if (GETPOST('action', 'alpha') == 'set')
{
$db->begin();
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
if (!$res > 0) $error++;
if (!$error)
{
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
/*
* View
*/
$form = new Form($db);
$formproduct = new FormProduct($db);
llxHeader('', $langs->trans("CashDeskSetup"));
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
$head = takepos_prepare_head();
dol_fiche_head($head, 'bar', 'TakePOS', -1);
print '<br>';
// Mode
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="set">';
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") {
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderNotes");
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
print '</td></tr>';
}
print '<tr class="oddeven value"><td>';
print $langs->trans("BasicPhoneLayout");
print '<td colspan="2">';
//print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1);
print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("ProductSupplements");
print '<td colspan="2">';
//print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1);
print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
if ($conf->global->TAKEPOS_SUPPLEMENTS)
{
print '<tr class="oddeven"><td>';
print $langs->trans("SupplementCategory");
print '<td colspan="2">';
print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0);
print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY');
print "</td></tr>\n";
}
print '<tr class="oddeven value"><td>';
print $langs->trans("AutoOrder");
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_AUTO_ORDER", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
print '</table>';
if ($conf->global->TAKEPOS_AUTO_ORDER)
{
print '<br>';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Table").'</td><td>'.$langs->trans("URL").'</td><td>'.$langs->trans("QR").'</td>';
print "</tr>\n";
//global $dolibarr_main_url_root;
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
$sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables";
$resql = $db->query($sql);
$rows = array();
while ($row = $db->fetch_array($resql)) {
print '<tr class="oddeven value"><td>';
print $langs->trans("Table")." ".$row['label'];
print '<td>';
print "<a target='_blank' href='".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid'])."'>".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid'])."</a>";
print '<td>';
print "<img src='".DOL_DOCUMENT_ROOT."/takepos/genimg/qr.php?id=".dol_encode($row['rowid'])."' height='42' width='42'>";
print '</td></tr>';
}
print '</table>';
}
print '</div>';
print '<br>';
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
print "</form>\n";
print '<br>';
llxFooter();
$db->close();

View File

@ -434,19 +434,6 @@ print "</td></tr>\n";
//print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0); //print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0);
//print "</td></tr>\n"; //print "</td></tr>\n";
print '</table>';
print '</div>';
print '<br>';
// Bar Restaurant mode
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("Other").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("EnableBarOrRestaurantFeatures"); print $langs->trans("EnableBarOrRestaurantFeatures");
print '</td>'; print '</td>';
@ -455,48 +442,6 @@ print ajax_constantonoff("TAKEPOS_BAR_RESTAURANT", array(), $conf->entity, 0, 0,
//print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1); //print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1);
print "</td></tr>\n"; print "</td></tr>\n";
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") {
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderNotes");
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
print '</td></tr>';
}
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
{
print '<tr class="oddeven value"><td>';
print $langs->trans("BasicPhoneLayout");
print '<td colspan="2">';
//print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1);
print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("ProductSupplements");
print '<td colspan="2">';
//print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1);
print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
if ($conf->global->TAKEPOS_SUPPLEMENTS)
{
print '<tr class="oddeven"><td>';
print $langs->trans("SupplementCategory");
print '<td colspan="2">';
print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0);
print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY');
print "</td></tr>\n";
}
}
print '</table>'; print '</table>';
print '</div>'; print '</div>';

View File

@ -142,4 +142,10 @@ elseif ($action == 'search' && $term != '') {
} }
echo json_encode($object); echo json_encode($object);
} elseif ($action == 'thecheck') {
$place = GETPOST('place', 'alpha');
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
$printer = new dolReceiptPrinter($db);
$printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term});
} }

View File

@ -0,0 +1,33 @@
<?php
/* Copyright (C) 2020 Andreu Bisquerra <jove@bisquerra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
require '../../main.inc.php'; // Load $user and permissions
require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php';
$key = GETPOST('key');
$module = new modtcpdfbarcode($db);
$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y');

View File

@ -47,13 +47,16 @@ $idproduct = GETPOST('idproduct', 'int');
$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant
$placeid = 0; // $placeid is ID of invoice $placeid = 0; // $placeid is ID of invoice
if (empty($user->rights->takepos->run)) { if ($_SESSION["publicterminal"]) {
$_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers
}
elseif (empty($user->rights->takepos->run)) {
accessforbidden(); accessforbidden();
} }
if ($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || $_SESSION["publicterminal"])
{ {
// DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED // DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED
if ($_SESSION["takeposterminal"] == "") if ($_SESSION["takeposterminal"] == "")

View File

@ -37,7 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant if ($_SESSION["publicterminal"]){
// Decode place if is a order from customer phone
$key = GETPOST('key');
$place=dol_decode($key);
}
else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant
$action = GETPOST('action', 'alpha'); $action = GETPOST('action', 'alpha');
$setterminal = GETPOST('setterminal', 'int'); $setterminal = GETPOST('setterminal', 'int');
@ -48,7 +53,10 @@ if ($setterminal > 0)
$langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter")); $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter"));
if (empty($user->rights->takepos->run)) { if ($_SESSION["publicterminal"]) {
$_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers
}
elseif (empty($user->rights->takepos->run)) {
accessforbidden(); accessforbidden();
} }
@ -167,6 +175,14 @@ function Exit(){
window.location.href='../user/logout.php'; window.location.href='../user/logout.php';
} }
function CheckPlease(){
console.log("Request the check to the waiter");
$.ajax({
type: "GET",
url: "<?php print dol_buildpath('/takepos/ajax/ajax.php', 1).'?action=thecheck&=place='.$place; ?>",
});
}
</script> </script>
<body style="overflow: hidden; background-color:#D1D1D1;"> <body style="overflow: hidden; background-color:#D1D1D1;">
@ -175,10 +191,13 @@ if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"]
?> ?>
<div class="container"> <div class="container">
<div class="phonebuttonsrow"> <div class="phonebuttonsrow">
<button type="button" class="phonebutton" onclick="LoadPlacesList();"><?php echo strtoupper(substr($langs->trans('Floors'), 0, 3)); ?></button> <?php
<button type="button" class="phonebutton" onclick="LoadCats();"><?php echo strtoupper(substr($langs->trans('Categories'), 0, 3)); ?></button> if (!$_SESSION["publicterminal"]) print '<button type="button" class="phonebutton" onclick="LoadPlacesList();">'.strtoupper(substr($langs->trans('Floors'), 0, 3)).'</button>';
<button type="button" class="phonebutton" onclick="TakeposPrintingOrder();"><?php echo strtoupper(substr($langs->trans('Order'), 0, 3)); ?></button> print '<button type="button" class="phonebutton" onclick="LoadCats();">'.strtoupper(substr($langs->trans('Categories'), 0, 3)).'</button>';
<button type="button" class="phonebutton" onclick="Exit();"><?php echo strtoupper(substr($langs->trans('Logout'), 0, 3)); ?></button> print '<button type="button" class="phonebutton" onclick="TakeposPrintingOrder();">'.strtoupper(substr($langs->trans('Order'), 0, 3)).'</button>';
print '<button type="button" class="phonebutton" onclick="Exit();">'.strtoupper(substr($langs->trans('Logout'), 0, 3)).'</button>';
if ($_SESSION["publicterminal"]) print '<button type="button" class="phonebutton" onclick="CheckPlease();">'.strtoupper(substr($langs->trans('Payment'), 0, 3)).'</button>';
?>
</div> </div>
<div class="row1"> <div class="row1">
<div id="phonediv1" class="phonediv1"></div> <div id="phonediv1" class="phonediv1"></div>

View File

@ -0,0 +1,29 @@
<?php
/* Copyright (C) - 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/public/auto_order.php
* \ingroup takepos
* \brief Public orders for customers
*/
if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
$_SESSION["basiclayout"] = 1;
$_SESSION["publicterminal"] = true; // Is a public customer
require '../phone.php';

View File

@ -1132,6 +1132,9 @@ table[summary="list_of_modules"] .fa-cog {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
.hideonsmartphone { display: none; }
.hideonsmartphoneimp { display: none !important; }
} }
/* Force values for small screen 570 */ /* Force values for small screen 570 */
@ -1189,8 +1192,6 @@ table[summary="list_of_modules"] .fa-cog {
max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */ max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */
} }
.hideonsmartphone { display: none; }
.hideonsmartphoneimp { display: none !important; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
.maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; }
.maxwidth50onsmartphone { max-width: 40px; } .maxwidth50onsmartphone { max-width: 40px; }
@ -3364,6 +3365,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
} }
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
text-shadow: none !important; text-shadow: none !important;
color: rgb(<?php echo $colortexttitlelink ?>);
} }
tr.liste_titre_topborder td { tr.liste_titre_topborder td {
border-top-width: <?php echo $borderwidth; ?>px; border-top-width: <?php echo $borderwidth; ?>px;

View File

@ -128,6 +128,7 @@ $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp
$colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY); $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY);
$colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB); $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB);
$colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE); $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE);
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT); $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK); $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1); $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);

View File

@ -69,6 +69,7 @@ $colorbacklinebreak = '233,228,230'; // line break
$colorbackbody = '255,255,255'; $colorbackbody = '255,255,255';
$colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 $colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120
$colortexttitle = '0,0,0'; $colortexttitle = '0,0,0';
$colortexttitlelink = '10, 20, 100';
$colortext = '0,0,0'; $colortext = '0,0,0';
$colortextlink = '10, 20, 100'; $colortextlink = '10, 20, 100';
$fontsize = '0.86em'; $fontsize = '0.86em';

View File

@ -130,6 +130,7 @@ $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp
$colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY); $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY);
$colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB); $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB);
$colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortext : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE); $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortext : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE);
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT); $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK); $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1); $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
@ -3398,6 +3399,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
} }
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
text-shadow: none !important; text-shadow: none !important;
color: rgb(<?php echo $colortexttitlelink ?>);
} }
tr.liste_titre_topborder td { tr.liste_titre_topborder td {
border-top-width: <?php echo $borderwidth; ?>px; border-top-width: <?php echo $borderwidth; ?>px;

View File

@ -65,6 +65,7 @@ $colorbacklinebreak = '214,218,220';
$colorbackbody = '248,248,248'; $colorbackbody = '248,248,248';
$colortexttitlenotab = '80,71,5'; $colortexttitlenotab = '80,71,5';
$colortexttitle = '20,20,20'; $colortexttitle = '20,20,20';
$colortexttitlelink = '0,0,120';
$colortext = '0,0,0'; $colortext = '0,0,0';
$colortextlink = '0,0,120'; $colortextlink = '0,0,120';
$fontsize = '14'; $fontsize = '14';

View File

@ -20,24 +20,21 @@ class Diff
const DELETED = 1; const DELETED = 1;
const INSERTED = 2; const INSERTED = 2;
/* Returns the diff for two strings. The return value is an array, each of /**
* Returns the diff for two strings. The return value is an array, each of
* whose values is an array containing two values: a line (or character, if * whose values is an array containing two values: a line (or character, if
* $compareCharacters is true), and one of the constants DIFF::UNMODIFIED (the * $compareCharacters is true), and one of the constants DIFF::UNMODIFIED (the
* line or character is in both strings), DIFF::DELETED (the line or character * line or character is in both strings), DIFF::DELETED (the line or character
* is only in the first string), and DIFF::INSERTED (the line or character is * is only in the first string), and DIFF::INSERTED (the line or character is
* only in the second string). The parameters are: * only in the second string). The parameters are:
* *
* $string1 - the first string * @param string $string1 First string
* $string2 - the second string * @param string $string2 Second string
* $compareCharacters - true to compare characters, and false to compare * @param string $compareCharacters true to compare characters, and false to compare lines; this optional parameter defaults to false
* lines; this optional parameter defaults to false * @return array Array of diff
*/ */
public static function compare( public static function compare($string1, $string2, $compareCharacters = false)
$string1, {
$string2,
$compareCharacters = false
) {
// initialise the sequences and comparison start and end positions // initialise the sequences and comparison start and end positions
$start = 0; $start = 0;
if ($compareCharacters) { if ($compareCharacters) {
@ -90,12 +87,13 @@ class Diff
return $diff; return $diff;
} }
/* Returns the diff for two files. The parameters are: /**
* Returns the diff for two files. The parameters are:
* *
* $file1 - the path to the first file * @param string $file1 Path to the first file
* $file2 - the path to the second file * @param string $file2 Path to the second file
* $compareCharacters - true to compare characters, and false to compare * @param boolean $compareCharacters true to compare characters, and false to compare lines; this optional parameter defaults to false
* lines; this optional parameter defaults to false * @return array Array of diff
*/ */
public static function compareFiles( public static function compareFiles(
$file1, $file1,
@ -111,23 +109,18 @@ class Diff
); );
} }
/* Returns the table of longest common subsequence lengths for the specified /**
* sequences. The parameters are: * Returns the table of longest common subsequence lengths for the specified sequences. The parameters are:
* *
* $sequence1 - the first sequence * @param string $sequence1 the first sequence
* $sequence2 - the second sequence * @param string $sequence2 the second sequence
* $start - the starting index * @param string $start the starting index
* $end1 - the ending index for the first sequence * @param string $end1 the ending index for the first sequence
* $end2 - the ending index for the second sequence * @param string $end2 the ending index for the second sequence
* @return array array of diff
*/ */
private static function computeTable( private static function computeTable($sequence1, $sequence2, $start, $end1, $end2)
$sequence1, {
$sequence2,
$start,
$end1,
$end2
) {
// determine the lengths to be compared // determine the lengths to be compared
$length1 = $end1 - $start + 1; $length1 = $end1 - $start + 1;
$length2 = $end2 - $start + 1; $length2 = $end2 - $start + 1;
@ -156,21 +149,18 @@ class Diff
return $table; return $table;
} }
/* Returns the partial diff for the specificed sequences, in reverse order. /**
* Returns the partial diff for the specificed sequences, in reverse order.
* The parameters are: * The parameters are:
* *
* $table - the table returned by the computeTable function * @param string $table the table returned by the computeTable function
* $sequence1 - the first sequence * @param string $sequence1 the first sequence
* $sequence2 - the second sequence * @param string $sequence2 the second sequence
* $start - the starting index * @param string $start the starting index
* @return array array of diff
*/ */
private static function generatePartialDiff( private static function generatePartialDiff($table, $sequence1, $sequence2, $start)
$table, {
$sequence1,
$sequence2,
$start
) {
// initialise the diff // initialise the diff
$diff = array(); $diff = array();
@ -205,17 +195,17 @@ class Diff
return $diff; return $diff;
} }
/* Returns a diff as a string, where unmodified lines are prefixed by ' ', /**
* Returns a diff as a string, where unmodified lines are prefixed by ' ',
* deletions are prefixed by '- ', and insertions are prefixed by '+ '. The * deletions are prefixed by '- ', and insertions are prefixed by '+ '. The
* parameters are: * parameters are:
* *
* $diff - the diff array * @param array $diff the diff array
* $separator - the separator between lines; this optional parameter defaults * @param string $separator the separator between lines; this optional parameter defaults to "\n"
* to "\n" * @return string String
*/ */
public static function toString($diff, $separator = "\n") public static function toString($diff, $separator = "\n")
{ {
// initialise the string // initialise the string
$string = ''; $string = '';
@ -242,17 +232,17 @@ class Diff
return $string; return $string;
} }
/* Returns a diff as an HTML string, where unmodified lines are contained /**
* Returns a diff as an HTML string, where unmodified lines are contained
* within 'span' elements, deletions are contained within 'del' elements, and * within 'span' elements, deletions are contained within 'del' elements, and
* insertions are contained within 'ins' elements. The parameters are: * insertions are contained within 'ins' elements. The parameters are:
* *
* $diff - the diff array * @param string $diff the diff array
* $separator - the separator between lines; this optional parameter defaults * @param string $separator the separator between lines; this optional parameter defaults to '<br>'
* to '<br>' * @return string HTML string
*/ */
public static function toHTML($diff, $separator = '<br>') public static function toHTML($diff, $separator = '<br>')
{ {
// initialise the HTML // initialise the HTML
$html = ''; $html = '';
@ -283,17 +273,16 @@ class Diff
return $html; return $html;
} }
/* Returns a diff as an HTML table. The parameters are: /**
* Returns a diff as an HTML table. The parameters are:
* *
* $diff - the diff array * @param string $diff the diff array
* $indentation - indentation to add to every line of the generated HTML; this * @param string $indentation indentation to add to every line of the generated HTML; this optional parameter defaults to ''
* optional parameter defaults to '' * @param string $separator the separator between lines; this optional parameter defaults to '<br>'
* $separator - the separator between lines; this optional parameter * @return string HTML string
* defaults to '<br>'
*/ */
public static function toTable($diff, $indentation = '', $separator = '<br>') public static function toTable($diff, $indentation = '', $separator = '<br>')
{ {
// initialise the HTML // initialise the HTML
$html = $indentation."<table class=\"diff\">\n"; $html = $indentation."<table class=\"diff\">\n";
@ -373,14 +362,16 @@ class Diff
return $html.$indentation."</table>\n"; return $html.$indentation."</table>\n";
} }
/* Returns the content of the cell, for use in the toTable function. The /**
* Returns the content of the cell, for use in the toTable function. The
* parameters are: * parameters are:
* *
* $diff - the diff array * @param string $diff the diff array
* $indentation - indentation to add to every line of the generated HTML * @param string $indentation indentation to add to every line of the generated HTML
* $separator - the separator between lines * @param string $separator the separator between lines
* $index - the current index, passes by reference * @param string $index the current index, passes by reference
* $type - the type of line * @param string $type the type of line
* @return string HTML string
*/ */
private static function getCellContent($diff, $indentation, $separator, &$index, $type) private static function getCellContent($diff, $indentation, $separator, &$index, $type)
{ {

View File

@ -137,7 +137,12 @@ $server->register(
// Full methods code /**
* Full methods code
*
* @param string $authentication Authentication string
* @return array Array of data
*/
function getVersions($authentication) function getVersions($authentication)
{ {
global $db, $conf, $langs; global $db, $conf, $langs;

View File

@ -249,6 +249,13 @@ class Website extends CommonObject
// } // }
} }
if (! $error) {
$stringtodolibarrfile = "# Some properties for Dolibarr web site CMS\n";
$stringtodolibarrfile .= "param=value\n";
//print $conf->website->dir_output.'/'.$this->ref.'/.dolibarr';exit;
file_put_contents($conf->website->dir_output.'/'.$this->ref.'/.dolibarr', $stringtodolibarrfile);
}
// Commit or rollback // Commit or rollback
if ($error) { if ($error) {
$this->db->rollback(); $this->db->rollback();
@ -668,7 +675,7 @@ class Website extends CommonObject
if (!$error) if (!$error)
{ {
dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0); dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0, null, 2);
// Check symlink to medias and restore it if ko // Check symlink to medias and restore it if ko
$pathtomedias = DOL_DATA_ROOT.'/medias'; // Target $pathtomedias = DOL_DATA_ROOT.'/medias'; // Target
@ -927,30 +934,34 @@ class Website extends CommonObject
$arrayreplacementincss['file=logos%2Fthumbs%2F'.$mysoc->logo] = "file=logos%2Fthumbs%2F__LOGO_KEY__"; $arrayreplacementincss['file=logos%2Fthumbs%2F'.$mysoc->logo] = "file=logos%2Fthumbs%2F__LOGO_KEY__";
} }
// Create output directories
dol_syslog("Create containers dir");
dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers');
dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey');
dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey');
// Copy files into 'containers'
$srcdir = $conf->website->dir_output.'/'.$website->ref; $srcdir = $conf->website->dir_output.'/'.$website->ref;
$destdir = $conf->website->dir_temp.'/'.$website->ref.'/containers'; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/containers';
// Create containers dir
dol_syslog("Create containers dir");
dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers');
// Copy files into medias
dol_syslog("Copy content from ".$srcdir." into ".$destdir); dol_syslog("Copy content from ".$srcdir." into ".$destdir);
dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename, 2);
// Copy files into medias/image
$srcdir = DOL_DATA_ROOT.'/medias/image/'.$website->ref; $srcdir = DOL_DATA_ROOT.'/medias/image/'.$website->ref;
$destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey'; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey';
dol_syslog("Copy content from ".$srcdir." into ".$destdir); dol_syslog("Copy content from ".$srcdir." into ".$destdir);
dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename);
// Copy files into medias/js
$srcdir = DOL_DATA_ROOT.'/medias/js/'.$website->ref; $srcdir = DOL_DATA_ROOT.'/medias/js/'.$website->ref;
$destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey'; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey';
// Copy containers files
dol_syslog("Copy content from ".$srcdir." into ".$destdir); dol_syslog("Copy content from ".$srcdir." into ".$destdir);
dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename);
// Make some replacement into some files
$cssindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/styles.css.php'; $cssindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/styles.css.php';
dolReplaceInFile($cssindestdir, $arrayreplacementincss); dolReplaceInFile($cssindestdir, $arrayreplacementincss);

View File

@ -271,8 +271,12 @@ if (GETPOST('optioncontent')) $algo .= 'content';
if (GETPOST('optionsitefiles')) $algo .= 'sitefiles'; if (GETPOST('optionsitefiles')) $algo .= 'sitefiles';
if (empty($sortfield)) { if (empty($sortfield)) {
if ($action == 'file_manager') {
$sortfield='name'; $sortorder = 'ASC';
} else {
$sortfield = 'pageurl'; $sortorder = 'ASC'; $sortfield = 'pageurl'; $sortorder = 'ASC';
} }
}
$searchkey = GETPOST('searchstring', 'none'); $searchkey = GETPOST('searchstring', 'none');
@ -3527,9 +3531,10 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print $langs->trans("SearchString"); print $langs->trans("SearchString");
print '</div>'; print '</div>';
print '<div class="tagtd">'; print '<div class="tagtd">';
print '<input type="text" name="searchstring" value="'.dol_escape_htmltag($searchkey).'" autofocus>';
print '<input type="submit" class="button" name="buttonreplacesitesearch" value="'.$langs->trans("Search").'">'; print '<input type="text" name="searchstring" value="'.dol_escape_htmltag($searchkey, 0, 0, '', 1).'" autofocus>';
print '<input type="submit" class="button" name="buttonreplacesitesearch" value="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</div>'; print '</div>';
print '</div>'; print '</div>';

View File

@ -715,7 +715,6 @@ class Hook extends CommonObject
* *
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
*/ */
//public function doScheduledJob($param1, $param2, ...)
public function doScheduledJob() public function doScheduledJob()
{ {
global $conf, $langs; global $conf, $langs;

View File

@ -73,7 +73,11 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -73,7 +73,11 @@ class ActionCommTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class ActionCommTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -75,7 +75,11 @@ class AdherentTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -91,7 +95,11 @@ class AdherentTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -73,7 +73,11 @@ class AdminLibTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -82,7 +86,11 @@ class AdminLibTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class BOMTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class BOMTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -75,7 +75,11 @@ class BankAccountTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class BankAccountTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -103,7 +103,11 @@ class BuildDocTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -121,7 +125,11 @@ class BuildDocTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -73,7 +73,11 @@ class CMailFileTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -82,7 +86,11 @@ class CMailFileTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class CategorieTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class CategorieTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -86,7 +86,11 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -95,7 +99,11 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -86,7 +86,11 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -95,7 +99,11 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -75,7 +75,11 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -73,7 +73,11 @@ class CommandeTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class CommandeTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -73,7 +73,11 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -82,7 +86,11 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -73,7 +73,11 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -82,7 +86,11 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -82,7 +82,11 @@ class ContactTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -92,7 +96,11 @@ class ContactTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class ContratTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class ContratTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -76,7 +76,11 @@ class CoreTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -85,7 +89,11 @@ class CoreTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -88,7 +92,11 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class DiscountTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class DiscountTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class EntrepotTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -86,7 +90,11 @@ class EntrepotTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -78,7 +78,11 @@ class ExportTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -87,7 +91,11 @@ class ExportTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -75,7 +75,11 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -75,7 +75,11 @@ class FactureRecTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -84,7 +88,11 @@ class FactureRecTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class FactureTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -87,7 +91,11 @@ class FactureTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -74,7 +74,11 @@ class FichinterTest extends PHPUnit\Framework\TestCase
print "\n"; print "\n";
} }
// Static methods /**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -83,7 +87,11 @@ class FichinterTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
// tear down after class /**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass() public static function tearDownAfterClass()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

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