Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop Conflicts: htdocs/compta/paiement.php htdocs/fourn/facture/paiement.php
This commit is contained in:
commit
af9e2d07d2
@ -8,7 +8,8 @@ charset = utf-8
|
|||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
[*.php]
|
[*.php]
|
||||||
indent_style = tab
|
indent_style = space
|
||||||
|
trim_trailing_whitespace = true
|
||||||
[*.js]
|
[*.js]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
[*.css]
|
[*.css]
|
||||||
|
|||||||
@ -45,8 +45,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
|||||||
$includecustom=0;
|
$includecustom=0;
|
||||||
$includeconstants=array();
|
$includeconstants=array();
|
||||||
|
|
||||||
if (empty($argv[1]))
|
if (empty($argv[1])) {
|
||||||
{
|
|
||||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
@ -54,14 +53,11 @@ if (empty($argv[1]))
|
|||||||
parse_str($argv[1]);
|
parse_str($argv[1]);
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $argc)
|
while ($i < $argc) {
|
||||||
{
|
|
||||||
if (! empty($argv[$i])) parse_str($argv[$i]);
|
if (! empty($argv[$i])) parse_str($argv[$i]);
|
||||||
if (preg_match('/includeconstant=/',$argv[$i]))
|
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||||
{
|
|
||||||
$tmp=explode(':', $includeconstant, 3);
|
$tmp=explode(':', $includeconstant, 3);
|
||||||
if (count($tmp) != 3)
|
if (count($tmp) != 3) {
|
||||||
{
|
|
||||||
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
|
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
}
|
}
|
||||||
@ -70,8 +66,7 @@ while ($i < $argc)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($release))
|
if (empty($release)) {
|
||||||
{
|
|
||||||
print "Error: Missing release paramater\n";
|
print "Error: Missing release paramater\n";
|
||||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
@ -81,39 +76,29 @@ $savrelease = $release;
|
|||||||
|
|
||||||
// If release is auto, we take current version
|
// If release is auto, we take current version
|
||||||
$tmpver=explode('-', $release, 2);
|
$tmpver=explode('-', $release, 2);
|
||||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable')
|
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
|
||||||
{
|
|
||||||
$release=DOL_VERSION;
|
$release=DOL_VERSION;
|
||||||
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
|
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($includecustom))
|
if (empty($includecustom)) {
|
||||||
{
|
|
||||||
$tmpverbis=explode('-', $release, 2);
|
$tmpverbis=explode('-', $release, 2);
|
||||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable')
|
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
|
||||||
{
|
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
|
||||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto')
|
|
||||||
{
|
|
||||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||||
if ($tmpverter[0] != $tmpverbis[0])
|
if ($tmpverter[0] != $tmpverbis[0]) {
|
||||||
{
|
|
||||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||||
{
|
|
||||||
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
|
|
||||||
{
|
|
||||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
@ -123,10 +108,8 @@ else
|
|||||||
print "Release : ".$release."\n";
|
print "Release : ".$release."\n";
|
||||||
print "Include custom in signature : ".$includecustom."\n";
|
print "Include custom in signature : ".$includecustom."\n";
|
||||||
print "Include constants in signature : ";
|
print "Include constants in signature : ";
|
||||||
foreach ($includeconstants as $countrycode => $tmp)
|
foreach ($includeconstants as $countrycode => $tmp) {
|
||||||
{
|
foreach($tmp as $constname => $constvalue) {
|
||||||
foreach($tmp as $constname => $constvalue)
|
|
||||||
{
|
|
||||||
print $constname.'='.$constvalue." ";
|
print $constname.'='.$constvalue." ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,11 +127,9 @@ $fp = fopen($outputfile,'w');
|
|||||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||||
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
|
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
|
||||||
|
|
||||||
foreach ($includeconstants as $countrycode => $tmp)
|
foreach ($includeconstants as $countrycode => $tmp) {
|
||||||
{
|
|
||||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||||
foreach($tmp as $constname => $constvalue)
|
foreach($tmp as $constname => $constvalue) {
|
||||||
{
|
|
||||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||||
$checksumconcat[]=$valueforchecksum;
|
$checksumconcat[]=$valueforchecksum;
|
||||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||||
|
|||||||
@ -112,9 +112,6 @@
|
|||||||
<rule ref="Generic.Functions.CallTimePassByReference" />
|
<rule ref="Generic.Functions.CallTimePassByReference" />
|
||||||
|
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
@ -190,6 +187,9 @@
|
|||||||
</rule>
|
</rule>
|
||||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
||||||
|
|
||||||
|
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen" />
|
||||||
|
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose" />
|
||||||
|
|
||||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||||
<properties>
|
<properties>
|
||||||
@ -432,5 +432,5 @@
|
|||||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||||
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
||||||
|
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|||||||
@ -220,11 +220,13 @@ class autoTranslator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($key == 'CHARSET') $val=$this->_outputpagecode;
|
if ($key == 'CHARSET') {
|
||||||
elseif (preg_match('/^Format/',$key)) $val=$value;
|
$val=$this->_outputpagecode;
|
||||||
elseif ($value=='-') $val=$value;
|
} elseif (preg_match('/^Format/', $key)) {
|
||||||
else
|
$val=$value;
|
||||||
{
|
} elseif ($value=='-') {
|
||||||
|
$val=$value;
|
||||||
|
} else {
|
||||||
// If not translated then translate
|
// If not translated then translate
|
||||||
if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
|
if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
|
||||||
else $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
|
else $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
|
||||||
|
|||||||
@ -531,12 +531,15 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
if ($fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||||
|
|
||||||
if ($valuetoshow != '')
|
if ($valuetoshow != '') {
|
||||||
{
|
|
||||||
print '<td align="'.$align.'">';
|
print '<td align="'.$align.'">';
|
||||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||||
else print $valuetoshow;
|
} elseif (! empty($tabhelp[$id][$value])) {
|
||||||
|
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||||
|
} else {
|
||||||
|
print $valuetoshow;
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
||||||
|
|||||||
@ -627,11 +627,17 @@ if ($id)
|
|||||||
|
|
||||||
// Can an entry be erased or disabled ?
|
// Can an entry be erased or disabled ?
|
||||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
||||||
if (isset($obj->code) && $id != 10)
|
if (isset($obj->code) && $id != 10) {
|
||||||
{
|
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) {
|
||||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
$iserasable = 0;
|
||||||
elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
$canbedisabled = 0;
|
||||||
elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
} elseif ($obj->code == 'RECEP') {
|
||||||
|
$iserasable = 0;
|
||||||
|
$canbedisabled = 0;
|
||||||
|
} elseif ($obj->code == 'EF0') {
|
||||||
|
$iserasable = 0;
|
||||||
|
$canbedisabled = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$canbemodified=$iserasable;
|
$canbemodified=$iserasable;
|
||||||
|
|||||||
@ -95,15 +95,13 @@ if ($cancel) {
|
|||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
|
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage)) {
|
||||||
{
|
|
||||||
header("Location: ".$backtopage);
|
header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $user->rights->adherent->configurer)
|
if ($action == 'add' && $user->rights->adherent->configurer) {
|
||||||
{
|
|
||||||
$object->label = trim($label);
|
$object->label = trim($label);
|
||||||
$object->statut = (int) $statut;
|
$object->statut = (int) $statut;
|
||||||
$object->subscription = (int) $subscription;
|
$object->subscription = (int) $subscription;
|
||||||
@ -266,8 +264,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
$membertype = new AdherentType($db);
|
$membertype = new AdherentType($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$membertype->id = $objp->rowid;
|
$membertype->id = $objp->rowid;
|
||||||
|
|||||||
@ -192,10 +192,8 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
|
|||||||
{
|
{
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action=="setshippableiconinlist") {
|
||||||
|
|
||||||
// Activate Set Shippable Icon In List
|
// Activate Set Shippable Icon In List
|
||||||
elseif ($action=="setshippableiconinlist") {
|
|
||||||
$setshippableiconinlist = GETPOST('value', 'int');
|
$setshippableiconinlist = GETPOST('value', 'int');
|
||||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|||||||
@ -136,9 +136,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
|
|||||||
else dol_syslog($imgThumbMini);
|
else dol_syslog($imgThumbMini);
|
||||||
}
|
}
|
||||||
else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING);
|
else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING);
|
||||||
}
|
} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
|
||||||
elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
|
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$tmparray=explode(':', $result);
|
$tmparray=explode(':', $result);
|
||||||
|
|||||||
@ -1436,8 +1436,7 @@ if ($id)
|
|||||||
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
||||||
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
} elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i', $fieldlist[$field])) {
|
||||||
elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
|
||||||
$valuetoshow=price($valuetoshow);
|
$valuetoshow=price($valuetoshow);
|
||||||
}
|
}
|
||||||
if ($value == 'private')
|
if ($value == 'private')
|
||||||
@ -1558,9 +1557,7 @@ if ($id)
|
|||||||
elseif ($fieldlist[$field]=='taux') {
|
elseif ($fieldlist[$field]=='taux') {
|
||||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
} elseif (in_array($fieldlist[$field], array('recuperableonly'))) {
|
||||||
elseif (in_array($fieldlist[$field],array('recuperableonly')))
|
|
||||||
{
|
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
||||||
@ -1600,7 +1597,10 @@ if ($id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Can an entry be erased or disabled ?
|
// Can an entry be erased or disabled ?
|
||||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
// all true by default
|
||||||
|
$iserasable=1;
|
||||||
|
$canbedisabled=1;
|
||||||
|
$canbemodified=1;
|
||||||
if (isset($obj->code) && $id != 10)
|
if (isset($obj->code) && $id != 10)
|
||||||
{
|
{
|
||||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||||
|
|||||||
@ -55,10 +55,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
} elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||||
|
|
||||||
elseif (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
|
|
||||||
{
|
|
||||||
$code=$reg[1];
|
$code=$reg[1];
|
||||||
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -104,9 +104,7 @@ if ($action === 'downloadblockchain') {
|
|||||||
echo $bc;
|
echo $bc;
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
} elseif (GETPOST('downloadcsv', 'alpha')) {
|
||||||
elseif (GETPOST('downloadcsv','alpha'))
|
|
||||||
{
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$previoushash='';
|
$previoushash='';
|
||||||
@ -438,8 +436,7 @@ print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"],'','',$param,'align="cente
|
|||||||
print getTitleFieldOfList('<span id="blockchainstatus"></span>', 0, $_SERVER["PHP_SELF"], '', '', $param, 'align="center"', $sortfield, $sortorder, '')."\n";
|
print getTitleFieldOfList('<span id="blockchainstatus"></span>', 0, $_SERVER["PHP_SELF"], '', '', $param, 'align="center"', $sortfield, $sortorder, '')."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (! empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR))
|
if (! empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) {
|
||||||
{
|
|
||||||
// This is version that is faster but require more memory and report errors that are outside the filter range
|
// This is version that is faster but require more memory and report errors that are outside the filter range
|
||||||
|
|
||||||
// TODO Make a full scan of table in reverse order of id of $block, so we can use the parameter $previoushash into checkSignature to save requests
|
// TODO Make a full scan of table in reverse order of id of $block, so we can use the parameter $previoushash into checkSignature to save requests
|
||||||
|
|||||||
@ -1428,9 +1428,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
elseif ($event->type_code == 'ICALEVENT')
|
elseif ($event->type_code == 'ICALEVENT')
|
||||||
{
|
{
|
||||||
$cssclass.= " unmovable";
|
$cssclass.= " unmovable";
|
||||||
}
|
} elseif ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar)) {
|
||||||
elseif ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
|
|
||||||
{
|
|
||||||
$tmpyearend = date('Y', $event->date_end_in_calendar);
|
$tmpyearend = date('Y', $event->date_end_in_calendar);
|
||||||
$tmpmonthend = date('m', $event->date_end_in_calendar);
|
$tmpmonthend = date('m', $event->date_end_in_calendar);
|
||||||
$tmpdayend = date('d', $event->date_end_in_calendar);
|
$tmpdayend = date('d', $event->date_end_in_calendar);
|
||||||
|
|||||||
@ -527,11 +527,11 @@ if (empty($reshook))
|
|||||||
if ($action == 'settitre') $object->titre = trim(GETPOST('titre', 'alpha'));
|
if ($action == 'settitre') $object->titre = trim(GETPOST('titre', 'alpha'));
|
||||||
elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from', 'alpha'));
|
elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from', 'alpha'));
|
||||||
elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto', 'alpha'));
|
elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto', 'alpha'));
|
||||||
elseif ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha'));
|
elseif ($action == 'setemail_errorsto') {
|
||||||
elseif ($action == 'settitre' && empty($object->titre)) {
|
$object->email_errorsto = trim(GETPOST('email_errorsto', 'alpha'));
|
||||||
|
} elseif ($action == 'settitre' && empty($object->titre)) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTitle"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTitle"));
|
||||||
}
|
} elseif ($action == 'setfrom' && empty($object->email_from)) {
|
||||||
elseif ($action == 'setfrom' && empty($object->email_from)) {
|
|
||||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -518,8 +518,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
print_liste_field_titre("OtherInformations", $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder);
|
print_liste_field_titre("OtherInformations", $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Source", $_SERVER["PHP_SELF"], "", $param, "", 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Source", $_SERVER["PHP_SELF"], "", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||||
// Date sending
|
// Date sending
|
||||||
if ($object->statut < 2)
|
if ($object->statut < 2) {
|
||||||
{
|
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -641,8 +641,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Close proposal
|
// Close proposal
|
||||||
elseif ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha'))
|
elseif ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel', 'alpha')) {
|
||||||
{
|
|
||||||
if (! (GETPOST('statut', 'int') > 0)) {
|
if (! (GETPOST('statut', 'int') > 0)) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
||||||
$action = 'statut';
|
$action = 'statut';
|
||||||
@ -672,8 +671,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reopen proposal
|
// Reopen proposal
|
||||||
elseif ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha'))
|
elseif ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel', 'alpha')) {
|
||||||
{
|
|
||||||
// prevent browser refresh from reopening proposal several times
|
// prevent browser refresh from reopening proposal several times
|
||||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
||||||
{
|
{
|
||||||
@ -1318,16 +1316,13 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) {
|
||||||
|
|
||||||
elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha'))
|
|
||||||
{
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set project
|
|
||||||
elseif ($action == 'classin' && $usercancreate) {
|
elseif ($action == 'classin' && $usercancreate) {
|
||||||
|
// Set project
|
||||||
$object->setProject(GETPOST('projectid', 'int'));
|
$object->setProject(GETPOST('projectid', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1132,9 +1132,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
||||||
|
|
||||||
elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
|||||||
$langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency'));
|
$langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
$facid = GETPOST('facid', 'int');
|
$facid = GETPOST('facid', 'int');
|
||||||
$accountid = GETPOST('accountid', 'int');
|
$accountid = GETPOST('accountid', 'int');
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
|
* Copyright (C) 2016-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -653,8 +653,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel','alpha'))
|
elseif ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel', 'alpha')) {
|
||||||
{
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update)
|
if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update)
|
||||||
|
|||||||
@ -58,7 +58,8 @@ if ($action == 'builddoc' && $permissioncreate)
|
|||||||
// Special case to force bank account
|
// Special case to force bank account
|
||||||
//if (property_exists($object, 'fk_bank'))
|
//if (property_exists($object, 'fk_bank'))
|
||||||
//{
|
//{
|
||||||
if (GETPOST('fk_bank','int')) { // this field may come from an external module
|
if (GETPOST('fk_bank', 'int')) {
|
||||||
|
// this field may come from an external module
|
||||||
$object->fk_bank = GETPOST('fk_bank', 'int');
|
$object->fk_bank = GETPOST('fk_bank', 'int');
|
||||||
} elseif (! empty($object->fk_account)) {
|
} elseif (! empty($object->fk_account)) {
|
||||||
$object->fk_bank = $object->fk_account;
|
$object->fk_bank = $object->fk_account;
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -902,8 +903,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se
|
|||||||
$newlang='';
|
$newlang='';
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang=GETPOST('lang_id', 'aZ09');
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang=GETPOST('lang_id', 'aZ09');
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang;
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang;
|
||||||
if (! empty($newlang))
|
if (! empty($newlang)) {
|
||||||
{
|
|
||||||
$outputlangs = new Translate("", $conf);
|
$outputlangs = new Translate("", $conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,10 +59,8 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel
|
|||||||
if ($result < 0) dol_print_error($db, $result);
|
if ($result < 0) dol_print_error($db, $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel', 'alpha')) {
|
||||||
// Set public note
|
// Set public note
|
||||||
elseif ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha'))
|
|
||||||
{
|
|
||||||
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||||
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private', 'none'), ENT_QUOTES), '_private');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private', 'none'), ENT_QUOTES), '_private');
|
||||||
|
|||||||
@ -634,8 +634,9 @@ class Menubase
|
|||||||
$tab_titre = explode("/", $menu['titre']);
|
$tab_titre = explode("/", $menu['titre']);
|
||||||
$title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]);
|
$title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]);
|
||||||
}
|
}
|
||||||
elseif (preg_match('/\|\|/',$menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle)
|
elseif (preg_match('/\|\|/', $menu['titre']))
|
||||||
{
|
{
|
||||||
|
// To manage different translation (Title||AltTitle@ConditionForAltTitle)
|
||||||
$tab_title = explode("||", $menu['titre']);
|
$tab_title = explode("||", $menu['titre']);
|
||||||
$alt_title = explode("@", $tab_title[1]);
|
$alt_title = explode("@", $tab_title[1]);
|
||||||
$title_enabled = verifCond($alt_title[1]);
|
$title_enabled = verifCond($alt_title[1]);
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -2654,10 +2655,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
if (! empty($conf->productbatch->enabled)) $original_file=$conf->productbatch->multidir_output[$entity].'/'.$original_file;
|
if (! empty($conf->productbatch->enabled)) $original_file=$conf->productbatch->multidir_output[$entity].'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les mouvements stocks
|
// Wrapping for stock movements
|
||||||
elseif ($modulepart == 'movement' || $modulepart == 'mouvement')
|
elseif ($modulepart == 'movement' || $modulepart == 'mouvement')
|
||||||
{
|
{
|
||||||
if (empty($entity) || (empty($conf->stock->multidir_output[$entity]) )) return array('accessallowed'=>0, 'error'=>'Value entity must be provided');
|
if (empty($entity) || empty($conf->stock->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided');
|
||||||
if (($fuser->rights->stock->{$lire} || $fuser->rights->stock->movement->{$lire} || $fuser->rights->stock->mouvement->{$lire}) || preg_match('/^specimen/i', $original_file))
|
if (($fuser->rights->stock->{$lire} || $fuser->rights->stock->movement->{$lire} || $fuser->rights->stock->mouvement->{$lire}) || preg_match('/^specimen/i', $original_file))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
|
|||||||
@ -3089,7 +3089,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
|
|
||||||
$fa='fa';
|
$fa='fa';
|
||||||
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
|
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
|
||||||
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '') . ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
|
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '');
|
||||||
|
$enabledisablehtml .= ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
|
||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||||
$enabledisablehtml.= $titlealt;
|
$enabledisablehtml.= $titlealt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -577,8 +577,7 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If test is just a static regex
|
// If test is just a static regex
|
||||||
elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval))
|
elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) {
|
||||||
{
|
|
||||||
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
||||||
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
||||||
$this->errors[$error]['type']='REGEX';
|
$this->errors[$error]['type']='REGEX';
|
||||||
|
|||||||
@ -602,10 +602,8 @@ class ImportXlsx extends ModeleImports
|
|||||||
$errorforthistable++;
|
$errorforthistable++;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
} elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) {
|
||||||
// If test is just a static regex
|
// If test is just a static regex
|
||||||
elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval))
|
|
||||||
{
|
|
||||||
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
|
||||||
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]);
|
||||||
$this->errors[$error]['type']='REGEX';
|
$this->errors[$error]['type']='REGEX';
|
||||||
|
|||||||
@ -27,8 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($conf) || ! is_object($conf))
|
if (empty($conf) || ! is_object($conf)) {
|
||||||
{
|
|
||||||
print "Error, template page can't be called as URL";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,7 +145,7 @@ $coldisplay=-1; // We remove first td
|
|||||||
}
|
}
|
||||||
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td align="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"';
|
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht, 0, '', 0):price($line->subprice, 0, '', 0)) . '"';
|
||||||
if ($line->fk_prev_id != null) print ' readonly';
|
if ($line->fk_prev_id != null) print ' readonly';
|
||||||
print '></td>';
|
print '></td>';
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ $coldisplay=-1; // We remove first td
|
|||||||
if ($inputalsopricewithtax)
|
if ($inputalsopricewithtax)
|
||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td align="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"';
|
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc, 0, '', 0):'').'"';
|
||||||
if ($line->fk_prev_id != null) print ' readonly';
|
if ($line->fk_prev_id != null) print ' readonly';
|
||||||
print '></td>';
|
print '></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -28,6 +29,7 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin","cron","bills","members"));
|
$langs->loadLangs(array("admin","cron","bills","members"));
|
||||||
|
|||||||
@ -117,9 +117,8 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if ($resupload < 0) // Unknown error
|
if ($resupload < 0) // Unknown error
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
||||||
}
|
} elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) {
|
||||||
elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus
|
// Files infected by a virus
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
||||||
}
|
}
|
||||||
else // Known error
|
else // Known error
|
||||||
|
|||||||
@ -841,9 +841,7 @@ if (empty($reshook))
|
|||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
||||||
|
|
||||||
elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -594,8 +594,7 @@ if (empty($reshook))
|
|||||||
/*
|
/*
|
||||||
* Mise a jour d'une ligne d'intervention
|
* Mise a jour d'une ligne d'intervention
|
||||||
*/
|
*/
|
||||||
elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save"))
|
elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save', 'alpha') == $langs->trans("Save")) {
|
||||||
{
|
|
||||||
$objectline = new FichinterLigne($db);
|
$objectline = new FichinterLigne($db);
|
||||||
if ($objectline->fetch($lineid) <= 0)
|
if ($objectline->fetch($lineid) <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1239,9 +1239,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors');
|
setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors');
|
||||||
} elseif (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) {
|
} elseif (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) {
|
||||||
setEventMessages($langs->trans("ErrorFieldsRequired"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldsRequired"), null, 'errors');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//Create SOAP client and connect it to order
|
//Create SOAP client and connect it to order
|
||||||
$soapclient_order = new nusoap_client($ws_url."/webservices/server_order.php");
|
$soapclient_order = new nusoap_client($ws_url."/webservices/server_order.php");
|
||||||
$soapclient_order->soap_defencoding='UTF-8';
|
$soapclient_order->soap_defencoding='UTF-8';
|
||||||
|
|||||||
@ -42,10 +42,10 @@ $langs->loadLangs(array('companies', 'bills', 'banks', 'compta'));
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$facid = GETPOST('facid', 'int');
|
$facid = GETPOST('facid', 'int');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
$accountid = GETPOST('accountid');
|
$accountid = GETPOST('accountid', 'int');
|
||||||
$day = GETPOST('day', 'int');
|
$day = GETPOST('day', 'int');
|
||||||
$month = GETPOST('month', 'int');
|
$month = GETPOST('month', 'int');
|
||||||
$year = GETPOST('year', 'int');
|
$year = GETPOST('year', 'int');
|
||||||
@ -773,8 +773,7 @@ if (empty($action))
|
|||||||
if (!$user->rights->societe->client->voir) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid;
|
if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid;
|
||||||
// Search criteria
|
// Search criteria
|
||||||
if ($month > 0)
|
if ($month > 0) {
|
||||||
{
|
|
||||||
if ($year > 0 && empty($day))
|
if ($year > 0 && empty($day))
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year, $month, false))."' AND '".$db->idate(dol_get_last_day($year, $month, false))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year, $month, false))."' AND '".$db->idate(dol_get_last_day($year, $month, false))."'";
|
||||||
elseif ($year > 0 && ! empty($day))
|
elseif ($year > 0 && ! empty($day))
|
||||||
|
|||||||
@ -106,9 +106,8 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if ($resupload < 0) // Unknown error
|
if ($resupload < 0) // Unknown error
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
||||||
}
|
} elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) {
|
||||||
elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus
|
// Files infected by a virus
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
|
||||||
}
|
}
|
||||||
else // Known error
|
else // Known error
|
||||||
|
|||||||
@ -54,3 +54,4 @@ Paymentnumpad=Payment Num Pad
|
|||||||
Numberspad=Numbers Pad
|
Numberspad=Numbers Pad
|
||||||
BillsCoinsPad=Bills and Coins Pad
|
BillsCoinsPad=Bills and Coins Pad
|
||||||
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||||
|
TakeposNeedsCategories=TakePOS needs product categories to work
|
||||||
@ -133,8 +133,7 @@ unset($conf->db->pass); // This is to avoid password to be shown in memory/sw
|
|||||||
/*
|
/*
|
||||||
* Object $user
|
* Object $user
|
||||||
*/
|
*/
|
||||||
if (! defined('NOREQUIREUSER'))
|
if (! defined('NOREQUIREUSER')) {
|
||||||
{
|
|
||||||
$user = new User($db);
|
$user = new User($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1176,8 +1177,7 @@ else
|
|||||||
// Accountancy_code_sell
|
// Accountancy_code_sell
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if($type = 0)
|
if($type = 0) {
|
||||||
{
|
|
||||||
$accountancy_code_sell = (GETPOST('accountancy_code_sell', 'alpha')?(GETPOST('accountancy_code_sell', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT);
|
$accountancy_code_sell = (GETPOST('accountancy_code_sell', 'alpha')?(GETPOST('accountancy_code_sell', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT);
|
||||||
} else {
|
} else {
|
||||||
$accountancy_code_sell = (GETPOST('accountancy_code_sell', 'alpha')?(GETPOST('accountancy_code_sell', 'alpha')):$conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT);
|
$accountancy_code_sell = (GETPOST('accountancy_code_sell', 'alpha')?(GETPOST('accountancy_code_sell', 'alpha')):$conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT);
|
||||||
@ -1190,8 +1190,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if($type = 0)
|
if($type = 0) {
|
||||||
{
|
|
||||||
$accountancy_code_sell_intra = (GETPOST('accountancy_code_sell_intra', 'alpha')?(GETPOST('accountancy_code_sell_intra', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT);
|
$accountancy_code_sell_intra = (GETPOST('accountancy_code_sell_intra', 'alpha')?(GETPOST('accountancy_code_sell_intra', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT);
|
||||||
} else {
|
} else {
|
||||||
$accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha');
|
$accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha');
|
||||||
@ -1228,8 +1227,7 @@ else
|
|||||||
if ($conf->global->MAIN_FEATURES_LEVEL)
|
if ($conf->global->MAIN_FEATURES_LEVEL)
|
||||||
{
|
{
|
||||||
// Accountancy_code_sell_intra
|
// Accountancy_code_sell_intra
|
||||||
if ($mysoc->isInEEC())
|
if ($mysoc->isInEEC()) {
|
||||||
{
|
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
|
||||||
print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_sell_intra" value="'.$object->accountancy_code_sell_intra.'">';
|
print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_sell_intra" value="'.$object->accountancy_code_sell_intra.'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -722,18 +722,14 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error))
|
if (empty($error)) {
|
||||||
{
|
|
||||||
// We remove directory
|
// We remove directory
|
||||||
$projectref = dol_sanitizeFileName($this->ref);
|
$projectref = dol_sanitizeFileName($this->ref);
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output) {
|
||||||
{
|
|
||||||
$dir = $conf->projet->dir_output . "/" . $projectref;
|
$dir = $conf->projet->dir_output . "/" . $projectref;
|
||||||
if (file_exists($dir))
|
if (file_exists($dir)) {
|
||||||
{
|
|
||||||
$res = @dol_delete_dir_recursive($dir);
|
$res = @dol_delete_dir_recursive($dir);
|
||||||
if (!$res)
|
if (!$res) {
|
||||||
{
|
|
||||||
$this->errors[] = 'ErrorFailToDeleteDir';
|
$this->errors[] = 'ErrorFailToDeleteDir';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -955,48 +951,37 @@ class Project extends CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if ($mode == 0)
|
if ($mode == 0) {
|
||||||
{
|
|
||||||
return $langs->trans($this->statuts_long[$statut]);
|
return $langs->trans($this->statuts_long[$statut]);
|
||||||
}
|
} elseif ($mode == 1) {
|
||||||
if ($mode == 1)
|
|
||||||
{
|
|
||||||
return $langs->trans($this->statuts_short[$statut]);
|
return $langs->trans($this->statuts_short[$statut]);
|
||||||
}
|
} elseif ($mode == 2) {
|
||||||
if ($mode == 2)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||||
if ($statut == 2)
|
elseif ($statut == 2)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||||
}
|
} elseif ($mode == 3) {
|
||||||
if ($mode == 3)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
||||||
if ($statut == 2)
|
elseif ($statut == 2)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
||||||
}
|
} elseif ($mode == 4) {
|
||||||
if ($mode == 4)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||||
if ($statut == 2)
|
if ($statut == 2)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||||
}
|
} elseif ($mode == 5) {
|
||||||
if ($mode == 5)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
||||||
if ($statut == 2)
|
elseif ($statut == 2)
|
||||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -969,9 +969,9 @@ foreach ($listofreferent as $key => $value)
|
|||||||
|
|
||||||
// Third party or user
|
// Third party or user
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
if (is_object($element->thirdparty)) print $element->thirdparty->getNomUrl(1,'',48);
|
if (is_object($element->thirdparty)) {
|
||||||
elseif ($tablename == 'expensereport_det')
|
print $element->thirdparty->getNomUrl(1, '', 48);
|
||||||
{
|
} elseif ($tablename == 'expensereport_det') {
|
||||||
$tmpuser=new User($db);
|
$tmpuser=new User($db);
|
||||||
$tmpuser->fetch($expensereport->fk_user_author);
|
$tmpuser->fetch($expensereport->fk_user_author);
|
||||||
print $tmpuser->getNomUrl(1, '', 48);
|
print $tmpuser->getNomUrl(1, '', 48);
|
||||||
|
|||||||
@ -687,9 +687,7 @@ if (empty($reshook))
|
|||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) {
|
||||||
|
|
||||||
elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
|
||||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -59,8 +60,7 @@ $stripe = new Stripe($db);
|
|||||||
|
|
||||||
llxHeader('', $langs->trans("StripePayoutList"));
|
llxHeader('', $langs->trans("StripePayoutList"));
|
||||||
|
|
||||||
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
|
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) {
|
||||||
{
|
|
||||||
$service = 'StripeTest';
|
$service = 'StripeTest';
|
||||||
$servicestatus = '0';
|
$servicestatus = '0';
|
||||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||||
@ -80,8 +80,9 @@ $stripeacc = $stripe->getStripeAccount($service);
|
|||||||
if (! $rowid) {
|
if (! $rowid) {
|
||||||
|
|
||||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
if ($optioncss != '')
|
if ($optioncss != '') {
|
||||||
print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
|
print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
|
||||||
|
}
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
@ -207,16 +208,17 @@ if (! $rowid) {
|
|||||||
print "<td align=\"right\">" . price(($payout->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . "</td>";
|
print "<td align=\"right\">" . price(($payout->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . "</td>";
|
||||||
// Status
|
// Status
|
||||||
print "<td align='right'>";
|
print "<td align='right'>";
|
||||||
if ($payout->status=='paid')
|
if ($payout->status=='paid') {
|
||||||
{print img_picto($langs->trans("".$payout->status.""),'statut4');}
|
print img_picto($langs->trans("".$payout->status.""), 'statut4');
|
||||||
elseif ($payout->status=='pending')
|
} elseif ($payout->status=='pending') {
|
||||||
{print img_picto($langs->trans("".$payout->status.""),'statut7');}
|
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||||
elseif ($payout->status=='in_transit')
|
} elseif ($payout->status=='in_transit') {
|
||||||
{print img_picto($langs->trans("".$payout->status.""),'statut7');}
|
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||||
elseif ($payout->status=='failed')
|
} elseif ($payout->status=='failed') {
|
||||||
{print img_picto($langs->trans("".$payout->status.""),'statut7');}
|
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||||
elseif ($payout->status=='canceled')
|
} elseif ($payout->status=='canceled') {
|
||||||
{print img_picto($langs->trans("".$payout->status.""),'statut8');}
|
print img_picto($langs->trans("".$payout->status.""), 'statut8');
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,11 @@
|
|||||||
html,body {
|
html,body {
|
||||||
padding:0;
|
box-sizing: border-box;
|
||||||
|
padding:3px;
|
||||||
margin:0;
|
margin:0;
|
||||||
height:100%;
|
height:100%;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
|
||||||
width:100%;
|
|
||||||
height:50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row div {
|
|
||||||
width:33%;
|
|
||||||
height:100%;
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.calcbutton {
|
button.calcbutton {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -69,33 +59,36 @@ button.actionbutton {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
overflow: visible; /* removes extra width in IE */
|
overflow: visible; /* removes extra width in IE */
|
||||||
width:32%;
|
width:33%;
|
||||||
height:32%;
|
height:33%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.wrapper{
|
div.wrapper{
|
||||||
float:left; /* important */
|
float:left; /* important */
|
||||||
position:relative; /* important(so we can absolutely position the description div */
|
position:relative; /* important(so we can absolutely position the description div */
|
||||||
width:21.5%;
|
width:25%;
|
||||||
height:23%;
|
height:25%;
|
||||||
margin:1%;
|
margin:0;
|
||||||
|
padding:1px;
|
||||||
border: 0.1em solid;
|
border: 0.1em solid;
|
||||||
box-shadow: 3px 3px 2px #888;
|
box-shadow: 3px 3px 2px #888;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color:#f0eeee;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.wrapper2{
|
div.wrapper2{
|
||||||
float:left; /* important */
|
float:left; /* important */
|
||||||
position:relative; /* important(so we can absolutely position the description div */
|
position:relative; /* important(so we can absolutely position the description div */
|
||||||
width:10.9%;
|
width:12.5%;
|
||||||
height:23%;
|
height:25%;
|
||||||
margin-top:0.5%;
|
margin:0;
|
||||||
margin-bottom:0.5%;
|
padding:1px;
|
||||||
margin-left:0.5%;
|
|
||||||
margin-right:0.5%;
|
|
||||||
border: 0.1em solid;
|
border: 0.1em solid;
|
||||||
box-shadow: 3px 3px 2px #888;
|
box-shadow: 2px 2px 1px #888;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color:#f0eeee;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active{
|
button:active{
|
||||||
@ -124,8 +117,8 @@ div.description{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container{
|
.container{
|
||||||
width: 98%;
|
width: 100%;
|
||||||
height: 98%;
|
height: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -145,10 +138,12 @@ div.description{
|
|||||||
|
|
||||||
.div1{
|
.div1{
|
||||||
height:100%;
|
height:100%;
|
||||||
width: 33%;
|
width: 34%;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
overflow: auto;
|
||||||
|
background-color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div2{
|
.div2{
|
||||||
@ -156,7 +151,6 @@ div.description{
|
|||||||
width: 33%;
|
width: 33%;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@ -165,7 +159,6 @@ div.description{
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 33%;
|
width: 33%;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,6 +168,7 @@ div.description{
|
|||||||
float: left;
|
float: left;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 6px;
|
font-size: 6px;
|
||||||
|
padding:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div5{
|
.div5{
|
||||||
@ -183,6 +177,7 @@ div.description{
|
|||||||
float: left;
|
float: left;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 6px;
|
font-size: 6px;
|
||||||
|
padding:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.description_content{
|
p.description_content{
|
||||||
|
|||||||
@ -387,12 +387,12 @@ $( document ).ready(function() {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body style="overflow: hidden; background-color:#E8E8E8;">
|
<body style="overflow: hidden; background-color:#D1D1D1;">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row1">
|
<div class="row1">
|
||||||
|
|
||||||
<div id="poslines" class="div1" style="overflow: auto;">
|
<div id="poslines" class="div1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="div2">
|
<div class="div2">
|
||||||
@ -415,6 +415,13 @@ $( document ).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// TakePOS setup check
|
||||||
|
if (empty($conf->global->CASHDESK_ID_THIRDPARTY) or empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) or empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB)) {
|
||||||
|
setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors');
|
||||||
|
}
|
||||||
|
if (count($maincategories)==0) {
|
||||||
|
setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors');
|
||||||
|
}
|
||||||
// User menu and external TakePOS modules
|
// User menu and external TakePOS modules
|
||||||
$menus = array();
|
$menus = array();
|
||||||
$r=0;
|
$r=0;
|
||||||
@ -447,14 +454,15 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->TAKEPOSCONNECTOR){
|
if ($conf->global->TAKEPOSCONNECTOR){
|
||||||
$menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
$menus[$r++]=array(
|
||||||
'action'=>'OpenDrawer();');
|
'title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
||||||
|
'action'=>'OpenDrawer();'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('takeposfrontend'));
|
$hookmanager->initHooks(array('takeposfrontend'));
|
||||||
$reshook=$hookmanager->executeHooks('ActionButtons');
|
$reshook=$hookmanager->executeHooks('ActionButtons');
|
||||||
if (!empty($reshook))
|
if (!empty($reshook)) {
|
||||||
{
|
|
||||||
$menus[$r++]=$reshook;
|
$menus[$r++]=$reshook;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -197,7 +197,9 @@ class Users extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id Id of account to update
|
* @param int $id Id of account to update
|
||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
* @return int
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function put($id, $request_data = null)
|
function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -472,15 +472,17 @@ else
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login');
|
print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login');
|
||||||
if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
if ($useringroup->admin && ! $useringroup->entity) {
|
||||||
elseif ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star');
|
print img_picto($langs->trans("SuperAdministrator"), 'redstar');
|
||||||
|
} elseif ($useringroup->admin) {
|
||||||
|
print img_picto($langs->trans("Administrator"), 'star');
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$useringroup->lastname.'</td>';
|
print '<td>'.$useringroup->lastname.'</td>';
|
||||||
print '<td>'.$useringroup->firstname.'</td>';
|
print '<td>'.$useringroup->firstname.'</td>';
|
||||||
print '<td align="center">'.$useringroup->getLibStatut(3).'</td>';
|
print '<td align="center">'.$useringroup->getLibStatut(3).'</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (! empty($user->admin))
|
if (! empty($user->admin)) {
|
||||||
{
|
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=removeuser&user='.$useringroup->id.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=removeuser&user='.$useringroup->id.'">';
|
||||||
print img_picto($langs->trans("RemoveFromGroup"), 'unlink');
|
print img_picto($langs->trans("RemoveFromGroup"), 'unlink');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user