Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5ea03e7448
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.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
|
||||||
@ -76,6 +76,7 @@ if ($action == 'update')
|
|||||||
|
|
||||||
// This one is not always defined
|
// This one is not always defined
|
||||||
if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity);
|
if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity);
|
||||||
|
if (isset($_POST["MAIN_BUGTRACK_ENABLELINK"])) dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
||||||
|
|
||||||
@ -235,6 +236,17 @@ if ($action == 'edit') // Edit
|
|||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||||
|
{
|
||||||
|
// Show bugtrack link
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
||||||
|
print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Message on login page
|
// Message on login page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||||
@ -378,6 +390,16 @@ else // Show
|
|||||||
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||||
|
{
|
||||||
|
// Show bugtrack link
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
||||||
|
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print "</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
// Message login
|
// Message login
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||||
|
|||||||
@ -450,46 +450,49 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Loop on each file found
|
// Loop on each file found
|
||||||
foreach($file_list as $file)
|
if (is_array($file_list))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
foreach($file_list as $file)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
|
||||||
// Define relative path for download link (depends on module)
|
// Define relative path for download link (depends on module)
|
||||||
$relativepath=$file["name"]; // Cas general
|
$relativepath=$file["name"]; // Cas general
|
||||||
if ($filename) $relativepath=$filename."/".$file["name"]; // Cas propal, facture...
|
if ($filename) $relativepath=$filename."/".$file["name"]; // Cas propal, facture...
|
||||||
// Autre cas
|
// Autre cas
|
||||||
if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; }
|
if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; }
|
||||||
if ($modulepart == 'export') { $relativepath = $file["name"]; }
|
if ($modulepart == 'export') { $relativepath = $file["name"]; }
|
||||||
|
|
||||||
$out.= "<tr ".$bc[$var].">";
|
$out.= "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
// Show file name with link to download
|
// Show file name with link to download
|
||||||
$out.= '<td nowrap="nowrap">';
|
$out.= '<td nowrap="nowrap">';
|
||||||
$out.= '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
$out.= '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
||||||
$mime=dol_mimetype($relativepath,'',0);
|
$mime=dol_mimetype($relativepath,'',0);
|
||||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||||
$out.= '>';
|
$out.= '>';
|
||||||
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
||||||
$out.= '</a>'."\n";
|
$out.= '</a>'."\n";
|
||||||
$out.= '</td>';
|
$out.= '</td>';
|
||||||
|
|
||||||
// Show file size
|
// Show file size
|
||||||
$size=(! empty($file['size'])?$file['size']:dol_filesize($filedir."/".$file["name"]));
|
$size=(! empty($file['size'])?$file['size']:dol_filesize($filedir."/".$file["name"]));
|
||||||
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size($size).'</td>';
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size($size).'</td>';
|
||||||
|
|
||||||
// Show file date
|
// Show file date
|
||||||
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
|
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
|
||||||
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour','tzuser').'</td>';
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour').'</td>';
|
||||||
|
|
||||||
if ($delallowed)
|
if ($delallowed)
|
||||||
{
|
{
|
||||||
$out.= '<td align="right">';
|
$out.= '<td align="right">';
|
||||||
$out.= '<a href="'.$urlsource.(strpos($urlsource,'?')?'&':'?').'action=remove_file&file='.urlencode($relativepath);
|
$out.= '<a href="'.$urlsource.(strpos($urlsource,'?')?'&':'?').'action=remove_file&file='.urlencode($relativepath);
|
||||||
$out.= ($param?'&'.$param:'');
|
$out.= ($param?'&'.$param:'');
|
||||||
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
||||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||||
$out.= '">'.img_delete().'</a></td>';
|
$out.= '">'.img_delete().'</a></td>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$out.= '</tr>';
|
$out.= '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -142,8 +142,7 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
$("#idprod").change(function() {
|
$("#idprod").change(function() {
|
||||||
$("#fournprice options").remove();
|
$("#fournprice options").remove();
|
||||||
$("#fournprice").hide();
|
$("#fournprice").hide();
|
||||||
$("#buying_price").val("");
|
$("#buying_price").val("").show();
|
||||||
$("#buying_price").show();
|
|
||||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) {
|
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) {
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
var options = '';
|
var options = '';
|
||||||
@ -158,9 +157,8 @@ $("#idprod").change(function() {
|
|||||||
options += '>'+this.label+'</option>';
|
options += '>'+this.label+'</option>';
|
||||||
});
|
});
|
||||||
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||||
$("#fournprice").html(options);
|
|
||||||
$("#buying_price").hide();
|
$("#buying_price").hide();
|
||||||
$("#fournprice").show();
|
$("#fournprice").html(options).show();
|
||||||
$("#fournprice").change(function() {
|
$("#fournprice").change(function() {
|
||||||
var selval = $(this).find('option:selected').attr("price");
|
var selval = $(this).find('option:selected').attr("price");
|
||||||
if (selval)
|
if (selval)
|
||||||
|
|||||||
@ -190,10 +190,10 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (20
|
|||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '0', '0', 'VAT Rate 0', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '0', '0', 'VAT Rate 0', 1);
|
||||||
|
|
||||||
-- SPAIN (id country=4)
|
-- SPAIN (id country=4)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values ( 41, 4, '21','0','5.2','1','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-15','1','VAT standard rate',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values ( 42, 4, '10','0','1.4','1','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-15','1','VAT reduced rate',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values ( 43, 4, '4','0','0.5','1','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-15','1','VAT super-reduced rate',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 44, 4, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-15','1','VAT Rate 0',1);
|
||||||
|
|
||||||
-- SWEDEN (id country=20)
|
-- SWEDEN (id country=20)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (201,20, '25','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (201,20, '25','0','VAT standard rate',1);
|
||||||
|
|||||||
@ -1512,7 +1512,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Link to bugtrack
|
// Link to bugtrack
|
||||||
if (! empty($conf->global->MAIN_SHOW_BUGTRACK_LINK))
|
if (! empty($conf->global->MAIN_BUGTRACK_ENABLELINK))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user