psr2 Squiz.WhiteSpace.ScopeClosingBrace.Indent
This commit is contained in:
parent
2e5382f40d
commit
80a12fcd1c
@ -140,12 +140,10 @@ else { print "err"; }
|
|||||||
$prodids = array();
|
$prodids = array();
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql) {
|
||||||
{
|
|
||||||
$num_prods = $db->num_rows($resql);
|
$num_prods = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num_prods)
|
while ($i < $num_prods) {
|
||||||
{
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
@ -155,7 +153,6 @@ if ($resql)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print "Build ".GEN_NUMBER_COMMANDE." orders\n";
|
print "Build ".GEN_NUMBER_COMMANDE." orders\n";
|
||||||
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -173,6 +173,8 @@
|
|||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
|
|
||||||
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
||||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@ -159,7 +159,8 @@ if ($mode)
|
|||||||
}
|
}
|
||||||
if ($mode == 'memberbyregion') //+
|
if ($mode == 'memberbyregion') //+
|
||||||
{
|
{
|
||||||
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
$data[]=array(
|
||||||
|
'label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
||||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
||||||
'label2'=>($obj->label2?$obj->label2:$langs->trans("Unknown")),
|
'label2'=>($obj->label2?$obj->label2:$langs->trans("Unknown")),
|
||||||
'nb'=>$obj->nb,
|
'nb'=>$obj->nb,
|
||||||
|
|||||||
@ -68,8 +68,7 @@ if (!function_exists('gzdecode')) {
|
|||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'addprinter' && $user->admin)
|
if ($action == 'addprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($printername)) {
|
if (empty($printername)) {
|
||||||
@ -81,8 +80,7 @@ if ($action == 'addprinter' && $user->admin)
|
|||||||
setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings');
|
setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter);
|
$result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
@ -100,8 +98,7 @@ if ($action == 'addprinter' && $user->admin)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'deleteprinter' && $user->admin)
|
if ($action == 'deleteprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($printerid)) {
|
if (empty($printerid)) {
|
||||||
@ -109,8 +106,7 @@ if ($action == 'deleteprinter' && $user->admin)
|
|||||||
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->DeletePrinter($printerid);
|
$result= $printer->DeletePrinter($printerid);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
@ -128,8 +124,7 @@ if ($action == 'deleteprinter' && $user->admin)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'updateprinter' && $user->admin)
|
if ($action == 'updateprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($printerid)) {
|
if (empty($printerid)) {
|
||||||
@ -137,18 +132,14 @@ if ($action == 'updateprinter' && $user->admin)
|
|||||||
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid);
|
$result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("PrinterUpdated",$printername), null);
|
setEventMessages($langs->trans("PrinterUpdated",$printername), null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -156,24 +147,19 @@ if ($action == 'updateprinter' && $user->admin)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'testprinter' && $user->admin)
|
if ($action == 'testprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
if (empty($printerid)) {
|
if (empty($printerid)) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
// test
|
// test
|
||||||
$ret = $printer->SendTestToPrinter($printerid);
|
$ret = $printer->SendTestToPrinter($printerid);
|
||||||
if ($ret == 0)
|
if ($ret == 0) {
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("TestSentToPrinter", $printername), null);
|
setEventMessages($langs->trans("TestSentToPrinter", $printername), null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessages($printer->error, $printer->errors, 'errors');
|
setEventMessages($printer->error, $printer->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,8 +167,7 @@ if ($action == 'testprinter' && $user->admin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'updatetemplate' && $user->admin)
|
if ($action == 'updatetemplate' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($templateid)) {
|
if (empty($templateid)) {
|
||||||
@ -190,18 +175,14 @@ if ($action == 'updatetemplate' && $user->admin)
|
|||||||
setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->UpdateTemplate($templatename, $template, $templateid);
|
$result= $printer->UpdateTemplate($templatename, $template, $templateid);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("TemplateUpdated",$templatename), null);
|
setEventMessages($langs->trans("TemplateUpdated",$templatename), null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -223,8 +204,7 @@ print load_fiche_titre($langs->trans("ReceiptPrinterSetup"),$linkback,'title_set
|
|||||||
|
|
||||||
$head = receiptprinteradmin_prepare_head($mode);
|
$head = receiptprinteradmin_prepare_head($mode);
|
||||||
|
|
||||||
if ($mode == 'config' && $user->admin)
|
if ($mode == 'config' && $user->admin) {
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=config" autocomplete="off">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=config" autocomplete="off">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
if ($action!='editprinter') {
|
if ($action!='editprinter') {
|
||||||
@ -253,11 +233,9 @@ if ($mode == 'config' && $user->admin)
|
|||||||
if ($ret > 0) {
|
if ($ret > 0) {
|
||||||
setEventMessages($printer->error, $printer->errors, 'errors');
|
setEventMessages($printer->error, $printer->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
for ($line=0; $line < $nbofprinters; $line++)
|
for ($line=0; $line < $nbofprinters; $line++) {
|
||||||
{
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid)
|
if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) {
|
||||||
{
|
|
||||||
print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
|
print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
|
||||||
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
|
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
|
||||||
$ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']);
|
$ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']);
|
||||||
@ -291,10 +269,8 @@ if ($mode == 'config' && $user->admin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action!='editprinter')
|
if ($action!='editprinter') {
|
||||||
{
|
if ($nbofprinters > 0) {
|
||||||
if ($nbofprinters > 0)
|
|
||||||
{
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th>'.$langs->trans("Name").'</th>';
|
print '<th>'.$langs->trans("Name").'</th>';
|
||||||
print '<th>'.$langs->trans("Type").'</th>';
|
print '<th>'.$langs->trans("Type").'</th>';
|
||||||
@ -357,8 +333,7 @@ if ($mode == 'config' && $user->admin)
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'template' && $user->admin)
|
if ($mode == 'template' && $user->admin) {
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=template" autocomplete="off">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=template" autocomplete="off">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
if ($action!='edittemplate') {
|
if ($action!='edittemplate') {
|
||||||
@ -429,8 +404,7 @@ if ($mode == 'template' && $user->admin)
|
|||||||
print '<th>'.$langs->trans("Description").'</th>';
|
print '<th>'.$langs->trans("Description").'</th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$max = count($printer->tags);
|
$max = count($printer->tags);
|
||||||
for ($tag=0; $tag < $max; $tag++)
|
for ($tag=0; $tag < $max; $tag++) {
|
||||||
{
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td><'.$printer->tags[$tag].'></td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>';
|
print '<td><'.$printer->tags[$tag].'></td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -98,8 +98,7 @@ print '<br>';
|
|||||||
|
|
||||||
$arrayofsocialnetworks=array('jabber'=>'Jabber', 'skype'=>'Skype', 'twitter'=>'Twitter', 'facebook'=>'Facebook');
|
$arrayofsocialnetworks=array('jabber'=>'Jabber', 'skype'=>'Skype', 'twitter'=>'Twitter', 'facebook'=>'Facebook');
|
||||||
|
|
||||||
foreach($arrayofsocialnetworks as $snkey => $snlabel)
|
foreach($arrayofsocialnetworks as $snkey => $snlabel) {
|
||||||
{
|
|
||||||
$consttocheck = 'SOCIALNETWORKS_'.strtoupper($snkey);
|
$consttocheck = 'SOCIALNETWORKS_'.strtoupper($snkey);
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
$link = ajax_constantonoff($consttocheck);
|
$link = ajax_constantonoff($consttocheck);
|
||||||
|
|||||||
@ -96,8 +96,7 @@ foreach ($modulesdir as $dir)
|
|||||||
|
|
||||||
if (empty($conf->$module->enabled)) $enabled=false;
|
if (empty($conf->$module->enabled)) $enabled=false;
|
||||||
|
|
||||||
if ($enabled)
|
if ($enabled) {
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* If exists, load the API class for enable module
|
* If exists, load the API class for enable module
|
||||||
*
|
*
|
||||||
|
|||||||
@ -875,8 +875,8 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
|
|
||||||
foreach($extralabels as $key=>$val) {
|
foreach($extralabels as $key=>$val) {
|
||||||
|
|
||||||
if (($extrafields->attribute_type[$key] == 'varchar') ||
|
if (($extrafields->attribute_type[$key] == 'varchar')
|
||||||
($extrafields->attribute_type[$key] == 'text')) {
|
|| ($extrafields->attribute_type[$key] == 'text')) {
|
||||||
if (!empty($arrayquery['options_'.$key])) {
|
if (!empty($arrayquery['options_'.$key])) {
|
||||||
$sqlwhere[]= " (tse.".$key." LIKE '".$arrayquery['options_'.$key]."')";
|
$sqlwhere[]= " (tse.".$key." LIKE '".$arrayquery['options_'.$key]."')";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,14 +109,12 @@ if (is_resource($handle))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num )
|
while ($i < $num ) {
|
||||||
{
|
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
print '<td>'.img_object('',$mailmodule->picto).' '.$obj->label.'</td><td class="right">'.$obj->nb.'<td>';
|
print '<td>'.img_object('',$mailmodule->picto).' '.$obj->label.'</td><td class="right">'.$obj->nb.'<td>';
|
||||||
$i++;
|
$i++;
|
||||||
@ -154,8 +152,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."mailing as m";
|
|||||||
$sql.= " ORDER BY m.date_creat DESC";
|
$sql.= " ORDER BY m.date_creat DESC";
|
||||||
$sql.= " LIMIT ".$limit;
|
$sql.= " LIMIT ".$limit;
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="2">'.$langs->trans("LastMailings",$limit).'</td>';
|
print '<td colspan="2">'.$langs->trans("LastMailings",$limit).'</td>';
|
||||||
@ -164,12 +161,10 @@ if ($result)
|
|||||||
print '<td class="right"><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("AllEMailings").'</a></td></tr>';
|
print '<td class="right"><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("AllEMailings").'</a></td></tr>';
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
if ($num > 0)
|
if ($num > 0) {
|
||||||
{
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num )
|
while ($i < $num ) {
|
||||||
{
|
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -297,8 +297,7 @@ class Proposals extends DolibarrApi
|
|||||||
|
|
||||||
if ($updateRes > 0) {
|
if ($updateRes > 0) {
|
||||||
return $updateRes;
|
return $updateRes;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new RestException(400, $this->propal->error);
|
throw new RestException(400, $this->propal->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,8 +24,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;
|
||||||
}
|
}
|
||||||
@ -54,7 +53,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
?>
|
?>
|
||||||
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
||||||
<td class="linkedcol-element" ><?php echo $langs->trans("Proposal"); ?>
|
<td class="linkedcol-element" ><?php echo $langs->trans("Proposal"); ?>
|
||||||
<?php if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
|
<?php
|
||||||
|
if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
|
||||||
{
|
{
|
||||||
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
|
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
|
||||||
print '<a class="objectlinked_importbtn" href="'.$url.'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
|
print '<a class="objectlinked_importbtn" href="'.$url.'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
|
||||||
|
|||||||
@ -66,10 +66,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<th colspan="2">'.$langs->trans("BankChecks")."</th>\n";
|
print '<th colspan="2">'.$langs->trans("BankChecks")."</th>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($resql)
|
if ($resql) {
|
||||||
{
|
if ($row = $db->fetch_row($resql) ) {
|
||||||
if ($row = $db->fetch_row($resql) )
|
|
||||||
{
|
|
||||||
$num = $row[0];
|
$num = $row[0];
|
||||||
}
|
}
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -57,8 +57,7 @@ $date_startday = GETPOST("date_startday");
|
|||||||
$date_endyear = GETPOST("date_endyear");
|
$date_endyear = GETPOST("date_endyear");
|
||||||
$date_endmonth = GETPOST("date_endmonth");
|
$date_endmonth = GETPOST("date_endmonth");
|
||||||
$date_endday = GETPOST("date_endday");
|
$date_endday = GETPOST("date_endday");
|
||||||
if (empty($year))
|
if (empty($year)) {
|
||||||
{
|
|
||||||
$year_current = strftime("%Y",dol_now());
|
$year_current = strftime("%Y",dol_now());
|
||||||
$month_current = strftime("%m",dol_now());
|
$month_current = strftime("%m",dol_now());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
|
|||||||
@ -74,8 +74,7 @@ $date_startday = GETPOST("date_startday",'alpha');
|
|||||||
$date_endyear = GETPOST("date_endyear",'alpha');
|
$date_endyear = GETPOST("date_endyear",'alpha');
|
||||||
$date_endmonth = GETPOST("date_endmonth",'alpha');
|
$date_endmonth = GETPOST("date_endmonth",'alpha');
|
||||||
$date_endday = GETPOST("date_endday",'alpha');
|
$date_endday = GETPOST("date_endday",'alpha');
|
||||||
if (empty($year))
|
if (empty($year)) {
|
||||||
{
|
|
||||||
$year_current = strftime("%Y",dol_now());
|
$year_current = strftime("%Y",dol_now());
|
||||||
$month_current = strftime("%m",dol_now());
|
$month_current = strftime("%m",dol_now());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
|
|||||||
@ -1010,7 +1010,8 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Removed extrafields
|
// Removed extrafields
|
||||||
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) { // For avoid conflicts if trigger used
|
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) {
|
||||||
|
// For avoid conflicts if trigger used
|
||||||
$result=$this->deleteExtraFields($this);
|
$result=$this->deleteExtraFields($this);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5434,8 +5434,7 @@ abstract class CommonObject
|
|||||||
elseif (in_array($type,array('int','integer','price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/',$type))
|
elseif (in_array($type,array('int','integer','price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/',$type))
|
||||||
{
|
{
|
||||||
$morecss = 'maxwidth75';
|
$morecss = 'maxwidth75';
|
||||||
}elseif ($type == 'url')
|
} elseif ($type == 'url') {
|
||||||
{
|
|
||||||
$morecss='minwidth400';
|
$morecss='minwidth400';
|
||||||
}
|
}
|
||||||
elseif ($type == 'boolean')
|
elseif ($type == 'boolean')
|
||||||
|
|||||||
@ -1403,8 +1403,7 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
$weekday=self::calc_weekday($first_daynr, !$monday_first);
|
$weekday=self::calc_weekday($first_daynr, !$monday_first);
|
||||||
$calc_year=$year;
|
$calc_year=$year;
|
||||||
|
|
||||||
if ($month == 1 && $day <= 7-$weekday)
|
if ($month == 1 && $day <= 7-$weekday) {
|
||||||
{
|
|
||||||
if (!$week_year && (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)))
|
if (!$week_year && (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)))
|
||||||
return 0;
|
return 0;
|
||||||
$week_year= 1;
|
$week_year= 1;
|
||||||
@ -1415,16 +1414,13 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
|
|
||||||
if (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)) {
|
if (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)) {
|
||||||
$days= $daynr - ($first_daynr+ (7-$weekday));
|
$days= $daynr - ($first_daynr+ (7-$weekday));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$days= $daynr - ($first_daynr - $weekday);
|
$days= $daynr - ($first_daynr - $weekday);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($week_year && $days >= 52*7)
|
if ($week_year && $days >= 52*7) {
|
||||||
{
|
|
||||||
$weekday= ($weekday + self::calc_days_in_year($calc_year)) % 7;
|
$weekday= ($weekday + self::calc_days_in_year($calc_year)) % 7;
|
||||||
if ((!$first_weekday && $weekday < 4) || ($first_weekday && $weekday == 0))
|
if ((!$first_weekday && $weekday < 4) || ($first_weekday && $weekday == 0)) {
|
||||||
{
|
|
||||||
$calc_year++;
|
$calc_year++;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2367,13 +2367,16 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (strtoupper($countrycode) == "MU")
|
elseif (strtoupper($countrycode) == "MU")
|
||||||
{//Maurice
|
{
|
||||||
|
//Maurice
|
||||||
if(dol_strlen($phone) == 11)
|
if(dol_strlen($phone) == 11)
|
||||||
{//ex: +230_ABC_DE_FG
|
{
|
||||||
|
//ex: +230_ABC_DE_FG
|
||||||
$newphone = substr($newphone,0,4).$separ.substr($newphone,4,3).$separ.substr($newphone,7,2).$separ.substr($newphone,9,2);
|
$newphone = substr($newphone,0,4).$separ.substr($newphone,4,3).$separ.substr($newphone,7,2).$separ.substr($newphone,9,2);
|
||||||
}
|
}
|
||||||
elseif(dol_strlen($phone) == 12)
|
elseif(dol_strlen($phone) == 12)
|
||||||
{//ex: +230_ABCD_EF_GH
|
{
|
||||||
|
//ex: +230_ABCD_EF_GH
|
||||||
$newphone = substr($newphone,0,4).$separ.substr($newphone,4,4).$separ.substr($newphone,8,2).$separ.substr($newphone,10,2);
|
$newphone = substr($newphone,0,4).$separ.substr($newphone,4,4).$separ.substr($newphone,8,2).$separ.substr($newphone,10,2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2514,9 +2517,11 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif(strtoupper($countrycode) == "AU")
|
elseif(strtoupper($countrycode) == "AU")
|
||||||
{//Australie
|
{
|
||||||
|
//Australie
|
||||||
if(dol_strlen($phone) == 12)
|
if(dol_strlen($phone) == 12)
|
||||||
{//ex: +61_A_BCDE_FGHI
|
{
|
||||||
|
//ex: +61_A_BCDE_FGHI
|
||||||
$newphone = substr($newphone,0,3).$separ.substr($newphone,3,1).$separ.substr($newphone,4,4).$separ.substr($newphone,8,4);
|
$newphone = substr($newphone,0,3).$separ.substr($newphone,3,1).$separ.substr($newphone,4,4).$separ.substr($newphone,8,4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -771,8 +771,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
// Show payment mode
|
// Show payment mode
|
||||||
if ($object->mode_reglement_code
|
if ($object->mode_reglement_code
|
||||||
&& $object->mode_reglement_code != 'CHQ'
|
&& $object->mode_reglement_code != 'CHQ'
|
||||||
&& $object->mode_reglement_code != 'VIR')
|
&& $object->mode_reglement_code != 'VIR') {
|
||||||
{
|
|
||||||
$pdf->SetFont('','B', $default_font_size - 2);
|
$pdf->SetFont('','B', $default_font_size - 2);
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
||||||
|
|||||||
@ -831,8 +831,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
// Show payment mode
|
// Show payment mode
|
||||||
if ($object->mode_reglement_code
|
if ($object->mode_reglement_code
|
||||||
&& $object->mode_reglement_code != 'CHQ'
|
&& $object->mode_reglement_code != 'CHQ'
|
||||||
&& $object->mode_reglement_code != 'VIR')
|
&& $object->mode_reglement_code != 'VIR') {
|
||||||
{
|
|
||||||
$pdf->SetFont('','B', $default_font_size - 2);
|
$pdf->SetFont('','B', $default_font_size - 2);
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
||||||
|
|||||||
@ -294,8 +294,9 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
|
||||||
else {
|
$socobject = $object->contact;
|
||||||
|
} else {
|
||||||
$socobject = $object->thirdparty;
|
$socobject = $object->thirdparty;
|
||||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||||
$contactobject = $object->contact;
|
$contactobject = $object->contact;
|
||||||
|
|||||||
@ -1315,8 +1315,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
// Revenue stamp
|
// Revenue stamp
|
||||||
if (price2num($object->revenuestamp) != 0)
|
if (price2num($object->revenuestamp) != 0)
|
||||||
|
|||||||
@ -1377,8 +1377,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
// Revenue stamp
|
// Revenue stamp
|
||||||
if (price2num($object->revenuestamp) != 0)
|
if (price2num($object->revenuestamp) != 0)
|
||||||
|
|||||||
@ -130,7 +130,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// On d<EFBFBD>fini critere recherche compteur
|
// On défini critere recherche compteur
|
||||||
$mask=$conf->global->FICHINTER_ARTIC_MASK;
|
$mask=$conf->global->FICHINTER_ARTIC_MASK;
|
||||||
|
|
||||||
if (! $mask)
|
if (! $mask)
|
||||||
|
|||||||
@ -321,8 +321,9 @@ class doc_generic_product_odt extends ModelePDFProduct
|
|||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
|
||||||
else {
|
$socobject = $object->contact;
|
||||||
|
} else {
|
||||||
$socobject = $object->thirdparty;
|
$socobject = $object->thirdparty;
|
||||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||||
$contactobject = $object->contact;
|
$contactobject = $object->contact;
|
||||||
|
|||||||
@ -321,8 +321,9 @@ class doc_generic_stock_odt extends ModelePDFStock
|
|||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
|
||||||
else {
|
$socobject = $object->contact;
|
||||||
|
} else {
|
||||||
$socobject = $object->thirdparty;
|
$socobject = $object->thirdparty;
|
||||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||||
$contactobject = $object->contact;
|
$contactobject = $object->contact;
|
||||||
|
|||||||
@ -235,7 +235,10 @@ if ($permission) {
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
<?php } } ?>
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,8 +21,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;
|
||||||
}
|
}
|
||||||
@ -67,13 +66,18 @@ $colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1)); // Normalize
|
|||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
||||||
|
|
||||||
<?php if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
<?php
|
||||||
|
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||||
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
||||||
?>
|
?>
|
||||||
<body class="body bodylogin" style="background-image: url('<?php echo $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND; ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
<body class="body bodylogin" style="background-image: url('<?php echo $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND; ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
||||||
<?php } else { ?>
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -200,9 +200,12 @@ $coldisplay=-1; // We remove first td
|
|||||||
}
|
}
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
|
if (!empty($user->rights->margins->creer)) {
|
||||||
|
?>
|
||||||
|
<td class="margininfos right">
|
||||||
|
<?php
|
||||||
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<?php if (!empty($user->rights->margins->creer)) { ?>
|
|
||||||
<td class="margininfos right"><?php $coldisplay++; ?>
|
|
||||||
<!-- For predef product -->
|
<!-- For predef product -->
|
||||||
<?php if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { ?>
|
<?php if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { ?>
|
||||||
<select id="fournprice_predef" name="fournprice_predef" class="flat right" style="display: none;"></select>
|
<select id="fournprice_predef" name="fournprice_predef" class="flat right" style="display: none;"></select>
|
||||||
@ -211,7 +214,8 @@ $coldisplay=-1; // We remove first td
|
|||||||
<input class="flat right" type="text" size="5" id="buying_price" name="buying_price" class="hideobject" value="<?php echo price($line->pa_ht,0,'',0); ?>">
|
<input class="flat right" type="text" size="5" id="buying_price" name="buying_price" class="hideobject" value="<?php echo price($line->pa_ht,0,'',0); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($user->rights->margins->creer) {
|
<?php
|
||||||
|
if ($user->rights->margins->creer) {
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||||
{
|
{
|
||||||
$margin_rate = (isset($_POST["np_marginRate"])?GETPOST("np_marginRate","alpha",2):(($line->pa_ht == 0)?'':price($line->marge_tx)));
|
$margin_rate = (isset($_POST["np_marginRate"])?GETPOST("np_marginRate","alpha",2):(($line->pa_ht == 0)?'':price($line->marge_tx)));
|
||||||
|
|||||||
@ -204,13 +204,15 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
|
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
|
||||||
<?php if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
|
<?php
|
||||||
|
if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
|
||||||
// I comment this because it shows info even when not required
|
// I comment this because it shows info even when not required
|
||||||
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
||||||
// must also not be output for most entities (proposal, intervention, ...)
|
// must also not be output for most entities (proposal, intervention, ...)
|
||||||
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
||||||
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
||||||
} else echo ' '; ?>
|
} else echo ' ';
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -308,9 +310,13 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
|
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } else { ?>
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<?php if($action == 'selectlines'){ ?>
|
<?php if($action == 'selectlines'){ ?>
|
||||||
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -206,8 +206,7 @@ class ActionsDatapolicy
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
||||||
DataPolicy::sendMailDataPolicyContact($object);
|
DataPolicy::sendMailDataPolicyContact($object);
|
||||||
}
|
} elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicy') {
|
||||||
elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicy') {
|
|
||||||
$object->fetch(GETPOST('id'));
|
$object->fetch(GETPOST('id'));
|
||||||
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
||||||
|
|||||||
@ -188,8 +188,7 @@ if ($action == 'create' || empty($action))
|
|||||||
$total = $expensereport->total_ttc;
|
$total = $expensereport->total_ttc;
|
||||||
|
|
||||||
// autofill remainder amount
|
// autofill remainder amount
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax)) {
|
||||||
{
|
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
//Add js for AutoFill
|
//Add js for AutoFill
|
||||||
print ' $(document).ready(function () {';
|
print ' $(document).ready(function () {';
|
||||||
@ -197,8 +196,8 @@ if ($action == 'create' || empty($action))
|
|||||||
var amount = $(this).data("value");
|
var amount = $(this).data("value");
|
||||||
document.getElementById($(this).data(\'rowid\')).value = amount ;
|
document.getElementById($(this).data(\'rowid\')).value = amount ;
|
||||||
});';
|
});';
|
||||||
print ' });'."\n";
|
print "\t});\n";
|
||||||
print ' </script>'."\n";
|
print "</script>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("DoPayment"));
|
print load_fiche_titre($langs->trans("DoPayment"));
|
||||||
|
|||||||
@ -281,8 +281,7 @@ class Interventions extends DolibarrApi
|
|||||||
|
|
||||||
if ($updateRes > 0) {
|
if ($updateRes > 0) {
|
||||||
return $updateRes;
|
return $updateRes;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new RestException(400, $this->fichinter->error);
|
throw new RestException(400, $this->fichinter->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3082,17 +3082,19 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
}elseif(! empty($conf->global->SUPPLIER_ORDER_MORE_THAN_WISHED) )
|
} elseif (! empty($conf->global->SUPPLIER_ORDER_MORE_THAN_WISHED) ) {
|
||||||
{//set livraison to 'tot' if more products received than wished. (and if $closeopenorder is set to 1 of course...)
|
//set livraison to 'tot' if more products received than wished. (and if $closeopenorder is set to 1 of course...)
|
||||||
|
|
||||||
$close=0;
|
$close=0;
|
||||||
|
|
||||||
if( count($diff_array) > 0 )
|
if( count($diff_array) > 0 )
|
||||||
{//there are some difference between the two arrays
|
{
|
||||||
|
//there are some difference between the two arrays
|
||||||
|
|
||||||
//scan the array of results
|
//scan the array of results
|
||||||
foreach($diff_array as $key => $value)
|
foreach($diff_array as $key => $value)
|
||||||
{//if the quantity delivered is greater or equal to wish quantity
|
{
|
||||||
|
//if the quantity delivered is greater or equal to wish quantity
|
||||||
if($qtydelivered[$key] >= $qtywished[$key] )
|
if($qtydelivered[$key] >= $qtywished[$key] )
|
||||||
{
|
{
|
||||||
$close++;
|
$close++;
|
||||||
@ -3101,10 +3103,9 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($close == count($diff_array))
|
if($close == count($diff_array)) {
|
||||||
{//all the products are received equal or more than the wished quantity
|
//all the products are received equal or more than the wished quantity
|
||||||
if ($closeopenorder)
|
if ($closeopenorder) {
|
||||||
{
|
|
||||||
$ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
$ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
||||||
if ($ret<0) {
|
if ($ret<0) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -3122,7 +3123,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{//all the products are not received
|
{
|
||||||
|
//all the products are not received
|
||||||
$ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
$ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
||||||
if ($ret<0) {
|
if ($ret<0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -37,8 +37,7 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||||||
*/
|
*/
|
||||||
if ($action=="update"){
|
if ($action=="update"){
|
||||||
$res1=dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README'), 'chaine', 0, '', $conf->entity);
|
$res1=dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README'), 'chaine', 0, '', $conf->entity);
|
||||||
if ($res1 < 0)
|
if ($res1 < 0) {
|
||||||
{
|
|
||||||
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
|
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -639,8 +639,7 @@ class MultiCurrency extends CommonObject
|
|||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
|
|
||||||
if ($response->success)
|
if ($response->success) {
|
||||||
{
|
|
||||||
|
|
||||||
$TRate = $response->quotes;
|
$TRate = $response->quotes;
|
||||||
$timestamp = $response->timestamp;
|
$timestamp = $response->timestamp;
|
||||||
|
|||||||
@ -277,19 +277,19 @@ class PriceExpression
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// // Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// // want this action calls a trigger.
|
||||||
|
|
||||||
//// Call triggers
|
// //// Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// //// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|||||||
@ -201,19 +201,19 @@ class PriceGlobalVariable
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// // Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// // want this action calls a trigger.
|
||||||
|
|
||||||
//// Call triggers
|
// //// Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// //// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|||||||
@ -225,19 +225,19 @@ class PriceGlobalVariableUpdater
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// // Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// // want this action calls a trigger.
|
||||||
|
|
||||||
//// Call triggers
|
// //// Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// //// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|||||||
@ -36,8 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled)) {
|
||||||
{
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -231,14 +231,12 @@ class Projects extends DolibarrApi
|
|||||||
}
|
}
|
||||||
$this->project->getLinesArray(DolibarrApiAccess::$user);
|
$this->project->getLinesArray(DolibarrApiAccess::$user);
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach ($this->project->lines as $line) // $line is a task
|
foreach ($this->project->lines as $line) {
|
||||||
{
|
// $line is a task
|
||||||
if ($includetimespent == 1)
|
if ($includetimespent == 1) {
|
||||||
{
|
|
||||||
$timespent = $line->getSummaryOfTimeSpent(0);
|
$timespent = $line->getSummaryOfTimeSpent(0);
|
||||||
}
|
}
|
||||||
if ($includetimespent == 1)
|
if ($includetimespent == 1) {
|
||||||
{
|
|
||||||
// TODO
|
// TODO
|
||||||
// Add class for timespent records and loop and fill $line->lines with records of timespent
|
// Add class for timespent records and loop and fill $line->lines with records of timespent
|
||||||
}
|
}
|
||||||
|
|||||||
@ -507,8 +507,6 @@ class Tasks extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function addTimeSpent($id, $date, $duration, $user_id = 0, $note = '')
|
function addTimeSpent($id, $date, $duration, $user_id = 0, $note = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if( ! DolibarrApiAccess::$user->rights->projet->creer) {
|
if( ! DolibarrApiAccess::$user->rights->projet->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,10 @@ if ($this->control->tpl['fournisseur']) {
|
|||||||
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } }?>
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if (! empty($conf->barcode->enabled)) { ?>
|
<?php if (! empty($conf->barcode->enabled)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -113,7 +113,10 @@ if ($this->control->tpl['fournisseur']) {
|
|||||||
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } }?>
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if (! empty($conf->barcode->enabled)) { ?>
|
<?php if (! empty($conf->barcode->enabled)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -2011,7 +2011,6 @@ class Societe extends CommonObject
|
|||||||
$name=$this->name?$this->name:$this->nom;
|
$name=$this->name?$this->name:$this->nom;
|
||||||
|
|
||||||
if(!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)){
|
if(!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)){
|
||||||
|
|
||||||
if(empty($option) && $this->client > 0) $option = 'customer';
|
if(empty($option) && $this->client > 0) $option = 'customer';
|
||||||
if(empty($option) && $this->fournisseur > 0) $option = 'supplier';
|
if(empty($option) && $this->fournisseur > 0) $option = 'supplier';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -457,8 +457,7 @@ $num = $db->num_rows($resql);
|
|||||||
|
|
||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($search_all != '' || $search_cti != '') && $action != 'list')
|
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($search_all != '' || $search_cti != '') && $action != 'list') {
|
||||||
{
|
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$id = $obj->rowid;
|
$id = $obj->rowid;
|
||||||
if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) {
|
if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) {
|
||||||
|
|||||||
@ -453,8 +453,7 @@ if ($conf->global->TAKEPOSCONNECTOR){
|
|||||||
|
|
||||||
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -599,7 +599,8 @@ if (! empty($id) || ! empty($ref))
|
|||||||
<td><input type="text" id="price_impact" name="price_impact" value="<?php echo price($price_impact) ?>">
|
<td><input type="text" id="price_impact" name="price_impact" value="<?php echo price($price_impact) ?>">
|
||||||
<input type="checkbox" id="price_impact_percent" name="price_impact_percent" <?php echo $price_impact_percent ? ' checked' : '' ?>> <label for="price_impact_percent"><?php echo $langs->trans('PercentageVariation') ?></label></td>
|
<input type="checkbox" id="price_impact_percent" name="price_impact_percent" <?php echo $price_impact_percent ? ' checked' : '' ?>> <label for="price_impact_percent"><?php echo $langs->trans('PercentageVariation') ?></label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($object->isProduct()) {
|
<?php
|
||||||
|
if ($object->isProduct()) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td><label for="weight_impact">'.$langs->trans('WeightImpact').'</label></td>';
|
print '<td><label for="weight_impact">'.$langs->trans('WeightImpact').'</label></td>';
|
||||||
print '<td><input type="text" id="weight_impact" name="weight_impact" value="'.price($weight_impact).'"></td>';
|
print '<td><input type="text" id="weight_impact" name="weight_impact" value="'.price($weight_impact).'"></td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user