Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-04-22 10:33:46 +02:00
commit 5cbb0359aa
75 changed files with 2172 additions and 1087 deletions

View File

@ -50,6 +50,7 @@ For users:
- New: [ task #770 ] Add ODT document generation for Projects module - New: [ task #770 ] Add ODT document generation for Projects module
- New: [ task #741 ] Add intervention box - New: [ task #741 ] Add intervention box
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated - New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated
- New: [ task #823 ] Shipping_validate email notification
For translators: For translators:
- Update language files. - Update language files.
@ -87,7 +88,7 @@ WARNING: If you used external modules, some of them may need to be upgraded due
***** ChangeLog for 3.3.2 compared to 3.3.1 ***** ***** ChangeLog for 3.3.2 compared to 3.3.1 *****
- Fix: Ducth (nl_NL) translation - Fix: Dutch (nl_NL) translation
- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated - Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
- Generalize fix: file with a specific mask not found, again - Generalize fix: file with a specific mask not found, again
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger - Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
@ -100,9 +101,9 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price - Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price
- Fix: Orderstoinvoice didn't act as expected when no order was checked - Fix: Orderstoinvoice didn't act as expected when no order was checked
- Fix: Bad link to all proposals into Third party card if customer is prospect - Fix: Bad link to all proposals into Third party card if customer is prospect
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #789 ] VAT not being calculated in POS - Fix: [ bug #789 ] VAT not being calculated in POS
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list - Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #810 ] Cannot update ODT template path - Fix: [ bug #810 ] Cannot update ODT template path
- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary - Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary
- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres) - Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres)

View File

@ -133,7 +133,11 @@ class modMyModule extends DolibarrModules
$this->tabs = array(); $this->tabs = array();
// Dictionnaries // Dictionnaries
if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; if (! isset($conf->mymodule->enabled))
{
$conf->mymodule=new stdClass();
$conf->mymodule->enabled=0;
}
$this->dictionnaries=array(); $this->dictionnaries=array();
/* Example: /* Example:
if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; // This is to avoid warnings if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; // This is to avoid warnings

View File

@ -1520,7 +1520,12 @@ class Adherent extends CommonObject
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
$lienfin='</a>'; $lienfin='</a>';
} }
if ($option == 'category')
{
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
$lienfin='</a>';
}
$picto='user'; $picto='user';
$label=$langs->trans("ShowMember"); $label=$langs->trans("ShowMember");

View File

@ -65,8 +65,8 @@ else
/* /*
* Actions * Actions
*/ */
if ($action == "save" && empty($cancel)) if ($action == "save" && empty($cancel))
{ {
$i=0; $i=0;
@ -125,7 +125,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
/** /**
* Affichage du formulaire de saisie * View
*/ */
llxHeader(); llxHeader();
@ -184,48 +184,7 @@ print "</center>";
print "</form>\n"; print "</form>\n";
print '</div>'; dol_fiche_end();
/*
* Other options
*/
print_titre($langs->trans("OtherOptions"));
$var=true;
print '<table class="noborder allwidth">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>'."\n";
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'."\n";
// Manual or automatic
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>'."\n";
print '<td align="center" width="100">'."\n";
if ($conf->use_javascript_ajax)
{
print ajax_constantonoff('AGENDA_USE_EVENT_TYPE');
}
else
{
if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Disabled"),'off').'</a>';
}
else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Enabled"),'on').'</a>';
}
}
print '</td></tr>'."\n";
print '</table>';
print "<br>"; print "<br>";

View File

@ -0,0 +1,135 @@
<?php
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/admin/agenda.php
* \ingroup agenda
* \brief Autocreate actions for agenda module setup page
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
if (!$user->admin)
accessforbidden();
$langs->load("admin");
$langs->load("other");
$action = GETPOST('action','alpha');
$cancel = GETPOST('cancel','alpha');
/*
* Actions
*/
if (preg_match('/set_(.*)/',$action,$reg))
{
$code=$reg[1];
$value=(GETPOST($code) ? GETPOST($code) : 1);
if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
{
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
else
{
dol_print_error($db);
}
}
if (preg_match('/del_(.*)/',$action,$reg))
{
$code=$reg[1];
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
{
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
else
{
dol_print_error($db);
}
}
/**
* View
*/
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
print "<br>\n";
$head=agenda_prepare_head();
dol_fiche_head($head, 'other', $langs->trans("Agenda"));
print_titre($langs->trans("OtherOptions"));
$var=true;
print '<table class="noborder allwidth">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>'."\n";
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'."\n";
// Manual or automatic
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>'."\n";
print '<td align="center" width="100">'."\n";
if ($conf->use_javascript_ajax)
{
print ajax_constantonoff('AGENDA_USE_EVENT_TYPE');
}
else
{
if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Disabled"),'off').'</a>';
}
else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Enabled"),'on').'</a>';
}
}
print '</td></tr>'."\n";
print '</table>';
dol_fiche_end();
print "<br>";
dol_htmloutput_mesg($mesg);
llxFooter();
$db->close();
?>

View File

@ -391,7 +391,7 @@ if ($id == 11)
// Define localtax_typeList (used for dictionnary "c_tva") // Define localtax_typeList (used for dictionnary "c_tva")
$localtax_typeList = array(); $localtax_typeList = array();
if (GETPOST("id") == 10) if ($id == 10)
{ {
$localtax_typeList = array( $localtax_typeList = array(
"0" => $langs->trans("No"), "0" => $langs->trans("No"),
@ -441,22 +441,32 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($fieldnamekey == 'position') $fieldnamekey = 'Position'; if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode'; if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
$msg.=$langs->trans("ErrorFieldRequired",$langs->transnoentities($fieldnamekey)).'<br>'; $msg.=$langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)).'<br>';
} }
} }
// Other checks // Other checks
if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) { if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) {
$ok=0; $ok=0;
$msg.="Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record.<br>"; $msg.= $langs->transnoentities('ErrorReservedTypeSystemSystemAuto').'<br>';
} }
if (isset($_POST["code"]) && $_POST["code"]=='0') { if (isset($_POST["code"]))
$ok=0; {
$msg.="Code can't contains value 0<br>"; if ($_POST["code"]=='0')
{
$ok=0;
$msg.= $langs->transnoentities('ErrorCodeCantContainZero').'<br>';
}
if (!is_numeric($_POST['code']))
{
$ok = 0;
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
}
} }
if (isset($_POST["country"]) && $_POST["country"]=='0') { if (isset($_POST["country"]) && $_POST["country"]=='0') {
$ok=0; $ok=0;
$msg.=$langs->trans("ErrorFieldRequired",$langs->trans("Country")).'<br>'; $msg.=$langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")).'<br>';
} }
// Clean some parameters // Clean some parameters
if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0 if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0 if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
@ -518,7 +528,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
else else
{ {
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
$msg=$langs->trans("ErrorRecordAlreadyExists").'<br>'; $msg=$langs->transnoentities("ErrorRecordAlreadyExists").'<br>';
} }
else { else {
dol_print_error($db); dol_print_error($db);
@ -588,7 +598,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
{ {
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{ {
$msg='<div class="error">'.$langs->trans("ErrorRecordIsUsedByChild").'</div>'; $msg='<div class="error">'.$langs->transnoentities("ErrorRecordIsUsedByChild").'</div>';
} }
else else
{ {
@ -994,6 +1004,7 @@ if ($id)
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
$langs->load('agenda');
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }

View File

@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
$langs->load("admin"); $langs->load("admin");
$langs->load('other');
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -99,7 +99,7 @@ $error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->e
if (empty($reshook)) if (empty($reshook))
{ {
//Suppression d'un objet d'une categorie // Remove element from category
if ($removecat > 0) if ($removecat > 0)
{ {
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer)) if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
@ -113,17 +113,20 @@ if (empty($reshook))
{ {
$object = new Societe($db); $object = new Societe($db);
$result = $object->fetch($objectid); $result = $object->fetch($objectid);
$elementtype = 'fournisseur';
} }
if ($type==2 && $user->rights->societe->creer) if ($type==2 && $user->rights->societe->creer)
{ {
$object = new Societe($db); $object = new Societe($db);
$result = $object->fetch($objectid); $result = $object->fetch($objectid);
$elementtype = 'societe';
} }
if ($type == 3 && $user->rights->adherent->creer) if ($type == 3 && $user->rights->adherent->creer)
{ {
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$object = new Adherent($db); $object = new Adherent($db);
$result = $object->fetch($objectid); $result = $object->fetch($objectid);
$elementtype = 'member';
} }
$cat = new Categorie($db); $cat = new Categorie($db);
$result=$cat->fetch($removecat); $result=$cat->fetch($removecat);
@ -507,7 +510,7 @@ function formCategory($db,$object,$typeid,$socid=0)
//print $c->getNomUrl(1); //print $c->getNomUrl(1);
print img_object('','category').' '.$way."</td>"; print img_object('','category').' '.$way."</td>";
// Lien supprimer // Link to delete from category
print '<td align="right">'; print '<td align="right">';
$permission=0; $permission=0;
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);

View File

@ -420,6 +420,7 @@ class Categorie
$sql .= " WHERE fk_categorie = ".$this->id; $sql .= " WHERE fk_categorie = ".$this->id;
$sql .= " AND fk_".($type=='fournisseur'?'societe':$type)." = ".$obj->id; $sql .= " AND fk_".($type=='fournisseur'?'societe':$type)." = ".$obj->id;
dol_syslog(get_class($this).'::del_type sql='.$sql);
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
return 1; return 1;

View File

@ -36,6 +36,7 @@ $ref=GETPOST('ref');
$type=GETPOST('type'); $type=GETPOST('type');
$action=GETPOST('action'); $action=GETPOST('action');
$confirm=GETPOST('confirm'); $confirm=GETPOST('confirm');
$removeelem = GETPOST('removeelem','int');
if ($id == "") if ($id == "")
{ {
@ -61,6 +62,40 @@ $type=$object->type;
* Actions * Actions
*/ */
// Remove element from category
if ($id > 0 && $removeelem > 0)
{
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
{
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$tmpobject = new Product($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'product';
}
if ($type==1 && $user->rights->societe->creer)
{
$tmpobject = new Societe($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'fournisseur';
}
if ($type==2 && $user->rights->societe->creer)
{
$tmpobject = new Societe($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'societe';
}
if ($type == 3 && $user->rights->adherent->creer)
{
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$tmpobject = new Adherent($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'member';
}
$result=$object->del_type($tmpobject,$elementtype);
if ($result < 0) dol_print_error('',$object->error);
}
if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confirm == 'yes') if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confirm == 'yes')
{ {
if ($object->delete($user) >= 0) if ($object->delete($user) >= 0)
@ -214,7 +249,7 @@ if ($object->type == 0)
{ {
print "<br>"; print "<br>";
print "<table class='noborder' width='100%'>\n"; print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("ProductsAndServices")."</td></tr>\n"; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("ProductsAndServices")."</td></tr>\n";
if (count($prods) > 0) if (count($prods) > 0)
{ {
@ -224,10 +259,24 @@ if ($object->type == 0)
$var=!$var; $var=!$var;
print "\t<tr ".$bc[$var].">\n"; print "\t<tr ".$bc[$var].">\n";
print '<td nowrap="nowrap" valign="top">'; print '<td nowrap="nowrap" valign="top">';
if ($prod->type == 1) print img_object($langs->trans("ShowService"),"service"); print $prod->getNomUrl(1,'category');
else print img_object($langs->trans("ShowProduct"),"product"); print "</td>\n";
print " <a href='".DOL_URL_ROOT."/product/fiche.php?id=".$prod->id."'>".$prod->ref."</a></td>\n";
print '<td valign="top">'.$prod->libelle."</td>\n"; print '<td valign="top">'.$prod->libelle."</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
$permission=0;
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
if ($typeid == 1) $permission=$user->rights->societe->creer;
if ($typeid == 2) $permission=$user->rights->societe->creer;
if ($typeid == 3) $permission=$user->rights->adherent->creer;
if ($permission)
{
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&amp;type=".$typeid."&amp;removeelem=".$prod->id."'>";
print img_delete($langs->trans("DeleteFromCat")).' ';
print $langs->trans("DeleteFromCat")."</a>";
}
print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
} }
@ -249,8 +298,8 @@ if ($object->type == 1)
else else
{ {
print "<br>"; print "<br>";
print "<table class='noborder' width='100%'>\n"; print '<table class="noborder" width="100%">'."\n";
print "<tr class='liste_titre'><td>".$langs->trans("Suppliers")."</td></tr>\n"; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Suppliers")."</td></tr>\n";
if (count($socs) > 0) if (count($socs) > 0)
{ {
@ -261,9 +310,24 @@ if ($object->type == 1)
print "\t<tr ".$bc[$var].">\n"; print "\t<tr ".$bc[$var].">\n";
print '<td nowrap="nowrap" valign="top">'; print '<td nowrap="nowrap" valign="top">';
print $soc->getNomUrl(1); print $soc->getNomUrl(1,'category_supplier');
print "</td>\n"; print "</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
$permission=0;
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
if ($typeid == 1) $permission=$user->rights->societe->creer;
if ($typeid == 2) $permission=$user->rights->societe->creer;
if ($typeid == 3) $permission=$user->rights->adherent->creer;
if ($permission)
{
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&amp;type=".$typeid."&amp;removeelem=".$soc->id."'>";
print img_delete($langs->trans("DeleteFromCat")).' ';
print $langs->trans("DeleteFromCat")."</a>";
}
print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
} }
@ -285,8 +349,8 @@ if($object->type == 2)
else else
{ {
print "<br>"; print "<br>";
print "<table class='noborder' width='100%'>\n"; print '<table class="noborder" width="100%">'."\n";
print "<tr class='liste_titre'><td>".$langs->trans("Customers")."</td></tr>\n"; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Customers")."</td></tr>\n";
if (count($socs) > 0) if (count($socs) > 0)
{ {
@ -298,9 +362,23 @@ if($object->type == 2)
$var=!$var; $var=!$var;
print "\t<tr ".$bc[$var].">\n"; print "\t<tr ".$bc[$var].">\n";
print '<td nowrap="nowrap" valign="top">'; print '<td nowrap="nowrap" valign="top">';
print $soc->getNomUrl(1); print $soc->getNomUrl(1,'category');
print "</td>\n"; print "</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
$permission=0;
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
if ($typeid == 1) $permission=$user->rights->societe->creer;
if ($typeid == 2) $permission=$user->rights->societe->creer;
if ($typeid == 3) $permission=$user->rights->adherent->creer;
if ($permission)
{
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&amp;type=".$typeid."&amp;removeelem=".$soc->id."'>";
print img_delete($langs->trans("DeleteFromCat")).' ';
print $langs->trans("DeleteFromCat")."</a>";
}
print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
} }
@ -326,7 +404,7 @@ if ($object->type == 3)
{ {
print "<br>"; print "<br>";
print "<table class='noborder' width='100%'>\n"; print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Member")."</td></tr>\n"; print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Member")."</td></tr>\n";
if (count($prods) > 0) if (count($prods) > 0)
{ {
@ -336,10 +414,25 @@ if ($object->type == 3)
$var=!$var; $var=!$var;
print "\t<tr ".$bc[$var].">\n"; print "\t<tr ".$bc[$var].">\n";
print '<td nowrap="nowrap" valign="top">'; print '<td nowrap="nowrap" valign="top">';
print $member->getNomUrl(1); $member->ref=$member->login;
print $member->getNomUrl(1,0,'category');
print "</td>\n"; print "</td>\n";
print '<td valign="top">'.$member->lastname."</td>\n"; print '<td valign="top">'.$member->lastname."</td>\n";
print '<td valign="top">'.$member->firstname."</td>\n"; print '<td valign="top">'.$member->firstname."</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
$permission=0;
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
if ($typeid == 1) $permission=$user->rights->societe->creer;
if ($typeid == 2) $permission=$user->rights->societe->creer;
if ($typeid == 3) $permission=$user->rights->adherent->creer;
if ($permission)
{
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&amp;type=".$typeid."&amp;removeelem=".$member->id."'>";
print img_delete($langs->trans("DeleteFromCat")).' ';
print $langs->trans("DeleteFromCat")."</a>";
}
print "</tr>\n"; print "</tr>\n";
} }
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
@ -663,7 +663,6 @@ if ($id > 0)
*/ */
$head=actions_prepare_head($act); $head=actions_prepare_head($act);
dol_fiche_head($head, 'card', $langs->trans("Action"),0,'action');
$now=dol_now(); $now=dol_now();
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
@ -711,6 +710,8 @@ if ($id > 0)
print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">'; print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1'? $backtopage : $_SERVER["HTTP_REFERER"]).'">'; if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1'? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
dol_fiche_head($head, 'card', $langs->trans("Action"),0,'action');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref
@ -836,7 +837,9 @@ if ($id > 0)
print '</table>'; print '</table>';
print '<center><br><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">'; dol_fiche_end();
print '<center><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
print ' &nbsp; &nbsp; <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print ' &nbsp; &nbsp; <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</center>'; print '</center>';
@ -844,6 +847,8 @@ if ($id > 0)
} }
else else
{ {
dol_fiche_head($head, 'card', $langs->trans("Action"),0,'action');
// Affichage fiche action en mode visu // Affichage fiche action en mode visu
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -1021,14 +1026,13 @@ if ($id > 0)
} }
print '</table><br><br>'; print '</table><br><br>';
} }
}
print "</div>\n"; dol_fiche_end();
}
/* /*
* Barre d'actions * Barre d'actions
*
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';

View File

@ -1534,7 +1534,7 @@ else
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_PROPAL',$object->socid); $text.=$notify->confirmMessage('PROPAL_VALIDATE',$object->socid);
} }
if (! $error) $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1); if (! $error) $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1);
@ -2171,7 +2171,7 @@ else
//print '</td></tr></table>'; //print '</td></tr></table>';
print '</div></div></div>'; print '</div></div></div>';
} }

View File

@ -1784,7 +1784,7 @@ else
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_ORDER',$object->socid); $text.=$notify->confirmMessage('ORDER_VALIDATE',$object->socid);
} }
$formquestion=array(); $formquestion=array();
if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $object->hasProductsOrServices(1)) if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $object->hasProductsOrServices(1))
@ -1935,15 +1935,15 @@ else
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>'; print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
print '</tr>'; print '</tr>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
{ {
$filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} }
else else
{ {
$filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; $filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')";
$filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; $filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'";
} }
// Relative and absolute discounts // Relative and absolute discounts
@ -2170,9 +2170,9 @@ else
} }
} }
$rowspan=4; $rowspan=4;
if ($mysoc->localtax1_assuj=="1") $rowspan++; if ($mysoc->localtax1_assuj=="1") $rowspan++;
if ($mysoc->localtax2_assuj=="1") $rowspan++; if ($mysoc->localtax2_assuj=="1") $rowspan++;
// Total HT // Total HT
print '<tr><td>'.$langs->trans('AmountHT').'</td>'; print '<tr><td>'.$langs->trans('AmountHT').'</td>';
@ -2411,7 +2411,7 @@ else
print '</div>'; print '</div>';
} }
} }
print '<br>'; print '<br>';
if ($action != 'presend') if ($action != 'presend')

View File

@ -2523,7 +2523,7 @@ else if ($id > 0 || ! empty($ref))
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC',$object->socid); $text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid);
} }
$formquestion=array(); $formquestion=array();
@ -3618,7 +3618,7 @@ else if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
} }
} }
print '<br>'; print '<br>';
if ($action != 'prerelance' && $action != 'presend') if ($action != 'prerelance' && $action != 'presend')
{ {
@ -3659,7 +3659,7 @@ else if ($id > 0 || ! empty($ref))
$somethingshown=$formactions->showactions($object,'invoice',$socid); $somethingshown=$formactions->showactions($object,'invoice',$socid);
//print '</td></tr></table>'; //print '</td></tr></table>';
print '</div></div></div>'; print '</div></div></div>';
} }
else else
{ {

View File

@ -3528,31 +3528,31 @@ class FactureLigne
$this->db->begin(); $this->db->begin();
// Mise a jour ligne en base // Mise a jour ligne en base
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET";
$sql.= " description='".$this->db->escape($this->desc)."'"; $sql.= " description='".$this->db->escape($this->desc)."'";
$sql.= ",label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null"); $sql.= ",label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null");
$sql.= ",subprice=".price2num($this->subprice).""; $sql.= ",subprice=".price2num($this->subprice)."";
$sql.= ",remise_percent=".price2num($this->remise_percent).""; $sql.= ",remise_percent=".price2num($this->remise_percent)."";
if ($this->fk_remise_except) $sql.= ",fk_remise_except=".$this->fk_remise_except; if ($this->fk_remise_except) $sql.= ",fk_remise_except=".$this->fk_remise_except;
else $sql.= ",fk_remise_except=null"; else $sql.= ",fk_remise_except=null";
$sql.= ",tva_tx=".price2num($this->tva_tx).""; $sql.= ",tva_tx=".price2num($this->tva_tx)."";
$sql.= ",localtax1_tx=".price2num($this->localtax1_tx).""; $sql.= ",localtax1_tx=".price2num($this->localtax1_tx)."";
$sql.= ",localtax2_tx=".price2num($this->localtax2_tx).""; $sql.= ",localtax2_tx=".price2num($this->localtax2_tx)."";
$sql.= ",qty=".price2num($this->qty).""; $sql.= ",qty=".price2num($this->qty)."";
$sql.= ",date_start=".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null"); $sql.= ",date_start=".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null");
$sql.= ",date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null"); $sql.= ",date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null");
$sql.= ",product_type=".$this->product_type; $sql.= ",product_type=".$this->product_type;
$sql.= ",info_bits='".$this->info_bits."'"; $sql.= ",info_bits='".$this->info_bits."'";
$sql.= ",special_code='".$this->special_code."'"; $sql.= ",special_code='".$this->special_code."'";
if (empty($this->skip_update_total)) if (empty($this->skip_update_total))
{ {
$sql.= ",total_ht=".price2num($this->total_ht).""; $sql.= ",total_ht=".price2num($this->total_ht)."";
$sql.= ",total_tva=".price2num($this->total_tva).""; $sql.= ",total_tva=".price2num($this->total_tva)."";
$sql.= ",total_ttc=".price2num($this->total_ttc).""; $sql.= ",total_ttc=".price2num($this->total_ttc)."";
$sql.= ",total_localtax1=".price2num($this->total_localtax1).""; $sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
$sql.= ",total_localtax2=".price2num($this->total_localtax2).""; $sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
} }
$sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?"'".$this->db->escape($this->fk_fournprice)."'":"null"); $sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?"'".$this->db->escape($this->fk_fournprice)."'":"null");
$sql.= " , buy_price_ht='".price2num($this->pa_ht)."'"; $sql.= " , buy_price_ht='".price2num($this->pa_ht)."'";
$sql.= ",fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null"); $sql.= ",fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null");

View File

@ -0,0 +1,390 @@
<?php
/* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/compta/stats/cabyprodserv.php
* \brief Page reporting TO by Products & Services
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$langs->load("products");
$langs->load("categories");
$langs->load("errors");
// Security pack (data & check)
$socid = GETPOST('socid','int');
if ($user->societe_id > 0) $socid = $user->societe_id;
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->COMPTA_MODE;
if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta");
$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
if (! $sortorder) $sortorder="asc";
if (! $sortfield) $sortfield="name";
// Category
$selected_cat = (int)GETPOST('search_categ', 'int');
$subcat = false;
if (GETPOST('subcat', 'alpha') === 'yes') {
$subcat = true;
}
// Date range
$year=GETPOST("year");
$month=GETPOST("month");
$date_startyear = GETPOST("date_startyear");
$date_startmonth = GETPOST("date_startmonth");
$date_startday = GETPOST("date_startday");
$date_endyear = GETPOST("date_endyear");
$date_endmonth = GETPOST("date_endmonth");
$date_endday = GETPOST("date_endday");
if (empty($year))
{
$year_current = strftime("%Y",dol_now());
$month_current = strftime("%m",dol_now());
$year_start = $year_current;
} else {
$year_current = $year;
$month_current = strftime("%m",dol_now());
$year_start = $year;
}
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
// Quarter
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
{
$q=GETPOST("q")?GETPOST("q"):0;
if ($q==0)
{
// We define date_start and date_end
$month_start=GETPOST("month")?GETPOST("month"):($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
$year_end=$year_start;
$month_end=$month_start;
if (! GETPOST("month")) // If month not forced
{
if (! GETPOST('year') && $month_start > $month_current)
{
$year_start--;
$year_end--;
}
$month_end=$month_start-1;
if ($month_end < 1) $month_end=12;
else $year_end++;
}
$date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false);
}
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
} else {
// TODO We define q
}
$commonparams=array();
$commonparams['modecompta']=$modecompta;
$commonparams['sortorder'] = $sortorder;
$commonparams['sortfield'] = $sortfield;
$headerparams = array();
$headerparams['date_startyear'] = $date_startyear;
$headerparams['date_startmonth'] = $date_startmonth;
$headerparams['date_startday'] = $date_startday;
$headerparams['date_endyear'] = $date_endyear;
$headerparams['date_endmonth'] = $date_endmonth;
$headerparams['date_endday'] = $date_endday;
$headerparams['q'] = $q;
$tableparams = array();
$tableparams['search_categ'] = $selected_cat;
$tableparams['subcat'] = ($subcat === true)?'yes':'';
// Adding common parameters
$allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
foreach($allparams as $key => $value) {
$paramslink .= '&' . $key . '=' . $value;
}
/*
* View
*/
llxHeader();
$form=new Form($db);
$formother = new FormOther($db);
// Show report header
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByProductsAndServices");
if ($modecompta=="CREANCES-DETTES") {
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description.= $langs->trans("DepositsAreNotIncluded");
} else {
$description.= $langs->trans("DepositsAreIncluded");
}
$builddate=time();
} else {
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
$builddate=time();
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams);
// SQL request
$catotal=0;
if ($modecompta == 'CREANCES-DETTES') {
$sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label,";
$sql.= " sum(DISTINCT l.total_ht) as amount, sum(DISTINCT l.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
$sql.= " JOIN ".MAIN_DB_PREFIX."facturedet as l";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON l.fk_facture = f.rowid";
if ($selected_cat === -2) {
$sql.=" LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = " . $selected_cat;
if ($subcat) {
$sql.=" OR c.fk_parent = " . $selected_cat;
}
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_categorie = c.rowid";
}
$sql.= " WHERE l.fk_product = p.rowid";
$sql.= " AND f.fk_statut in (1,2)";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql.= " AND f.type IN (0,1,2)";
} else {
$sql.= " AND f.type IN (0,1,2,3)";
}
if ($date_start && $date_end) {
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
}
if ($selected_cat === -2) {
$sql.=" AND cp.fk_product is null";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " AND cp.fk_product = p.rowid";
}
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " GROUP BY p.rowid ";
$sql.= "ORDER BY p.ref ";
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$i=0;
while ($i < $num) {
$obj = $db->fetch_object($result);
$amount_ht[$obj->rowid] = $obj->amount;
$amount[$obj->rowid] = $obj->amount_ttc;
$name[$obj->rowid] = $obj->ref . '&nbsp;-&nbsp;' . $obj->label;
$catotal_ht+=$obj->amount;
$catotal+=$obj->amount_ttc;
$i++;
}
} else {
dol_print_error($db);
}
// Show Array
$i=0;
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
// Extra parameters management
foreach($headerparams as $key => $value)
{
print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
}
print '<table class="noborder" width="100%">';
// Category filter
print '<tr class="liste_titre">';
print '<td>';
print $langs->trans("Category") . ': ' . $formother->select_categories(0, $selected_cat, 'search_categ', true);
print ' ';
print $langs->trans("SubCats") . '? ';
print '<input type="checkbox" name="subcat" value="yes"';
if ($subcat) {
print ' checked';
}
print '></td>';
print '<td colspan="3" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td></tr>';
// Array header
print "<tr class=\"liste_titre\">";
print_liste_field_titre(
$langs->trans("Product"),
$_SERVER["PHP_SELF"],
"name",
"",
$paramslink,
"",
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('AmountHT'),
$_SERVER["PHP_SELF"],
"amount_ht",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans("AmountTTC"),
$_SERVER["PHP_SELF"],
"amount_ttc",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans("Percentage"),
$_SERVER["PHP_SELF"],
"amount_ttc",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
// TODO: statistics?
print "</tr>\n";
// Array Data
$var=true;
if (count($amount)) {
$arrayforsort=$name;
// defining arrayforsort
if ($sortfield == 'nom' && $sortorder == 'asc') {
asort($name);
$arrayforsort=$name;
}
if ($sortfield == 'nom' && $sortorder == 'desc') {
arsort($name);
$arrayforsort=$name;
}
if ($sortfield == 'amount_ht' && $sortorder == 'asc') {
asort($amount_ht);
$arrayforsort=$amount_ht;
}
if ($sortfield == 'amount_ht' && $sortorder == 'desc') {
arsort($amount_ht);
$arrayforsort=$amount_ht;
}
if ($sortfield == 'amount_ttc' && $sortorder == 'asc') {
asort($amount);
$arrayforsort=$amount;
}
if ($sortfield == 'amount_ttc' && $sortorder == 'desc') {
arsort($amount);
$arrayforsort=$amount;
}
foreach($arrayforsort as $key=>$value) {
$var=!$var;
print "<tr ".$bc[$var].">";
// Third party
$fullname=$name[$key];
if ($key >= 0) {
$linkname='<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$key.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$fullname.'</a>';
} else {
$linkname=$langs->trans("PaymentsNotLinkedToProduct");
}
print "<td>".$linkname."</td>\n";
// Amount w/o VAT
print '<td align="right">';
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
} else {
print '<a href="#">';
}
print price($amount_ht[$key]);
print '</td>';
// Amount with VAT
print '<td align="right">';
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
} else {
print '<a href="#">';
}
print price($amount[$key]);
print '</a>';
print '</td>';
// Percent;
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
// TODO: statistics?
print "</tr>\n";
$i++;
}
// Total
print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
print '<td align="right">'.price($catotal_ht).'</td>';
print '<td align="right">'.price($catotal).'</td>';
print '<td>&nbsp;</td>';
print '</tr>';
$db->free($result);
}
print "</table>";
print '</form>';
} else {
// $modecompta != 'CREANCES-DETTES'
// TODO: better message
print '<div class="warning">' . $langs->trans("WarningNotRelevant") . '</div>';
}
llxFooter();
$db->close();
?>

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003 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-2009 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.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
@ -46,6 +47,12 @@ if (! $sortfield) $sortfield="name";
// Date range // Date range
$year=GETPOST("year"); $year=GETPOST("year");
$month=GETPOST("month"); $month=GETPOST("month");
$date_startyear = GETPOST("date_startyear");
$date_startmonth = GETPOST("date_startmonth");
$date_startday = GETPOST("date_startday");
$date_endyear = GETPOST("date_endyear");
$date_endmonth = GETPOST("date_endmonth");
$date_endday = GETPOST("date_endday");
if (empty($year)) if (empty($year))
{ {
$year_current = strftime("%Y",dol_now()); $year_current = strftime("%Y",dol_now());
@ -89,9 +96,34 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
else else
{ {
// TODO We define q // TODO We define q
} }
$commonparams=array();
$commonparams['modecompta']=$modecompta;
$commonparams['sortorder'] = $sortorder;
$commonparams['sortfield'] = $sortfield;
$headerparams = array();
$headerparams['date_startyear'] = $date_startyear;
$headerparams['date_startmonth'] = $date_startmonth;
$headerparams['date_startday'] = $date_startday;
$headerparams['date_endyear'] = $date_endyear;
$headerparams['date_endmonth'] = $date_endmonth;
$headerparams['date_endday'] = $date_endday;
$headerparams['q'] = $q;
$tableparams = array();
$tableparams['search_categ'] = $selected_cat;
$tableparams['subcat'] = ($subcat === true)?'yes':'';
// Adding common parameters
$allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
foreach($allparams as $key => $value) {
$paramslink .= '&' . $key . '=' . $value;
}
/* /*
* View * View
@ -102,9 +134,8 @@ llxHeader();
$form=new Form($db); $form=new Form($db);
// Affiche en-tete du rapport // Show report header
if ($modecompta=="CREANCES-DETTES") if ($modecompta=="CREANCES-DETTES") {
{
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')'; $nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
@ -114,8 +145,7 @@ if ($modecompta=="CREANCES-DETTES")
else $description.= $langs->trans("DepositsAreIncluded"); else $description.= $langs->trans("DepositsAreIncluded");
$builddate=time(); $builddate=time();
//$exportlink=$langs->trans("NotYetAvailable"); //$exportlink=$langs->trans("NotYetAvailable");
} } else {
else {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')'; $nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
@ -131,20 +161,29 @@ if (! empty($modecompta)) $moreparam['modecompta']=$modecompta;
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam);
// Charge tableau // Show array
$catotal=0; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
if ($modecompta == 'CREANCES-DETTES') // Extra parameters management
foreach($headerparams as $key => $value)
{ {
print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
}
$catotal=0;
if ($modecompta == 'CREANCES-DETTES') {
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid";
$sql.= " WHERE f.fk_statut in (1,2)"; $sql.= " WHERE f.fk_statut in (1,2)";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
else $sql.= " AND f.type IN (0,1,2,3)"; $sql.= " AND f.type IN (0,1,2)";
if ($date_start && $date_end) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } else {
} $sql.= " AND f.type IN (0,1,2,3)";
else }
{ if ($date_start && $date_end) {
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
}
} else {
/* /*
* Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
* vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
@ -155,7 +194,9 @@ else
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON pf.fk_facture = f.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON pf.fk_facture = f.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement";
$sql.= " WHERE 1=1"; $sql.= " WHERE 1=1";
if ($date_start && $date_end) $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; if ($date_start && $date_end) {
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
}
} }
$sql.= " AND f.entity = ".$conf->entity; $sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid; if ($socid) $sql.= " AND f.fk_soc = ".$socid;
@ -163,27 +204,25 @@ $sql .= " GROUP BY u.rowid, u.lastname, u.firstname";
$sql .= " ORDER BY u.rowid"; $sql .= " ORDER BY u.rowid";
$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);
$amount[$obj->rowid] = $obj->amount_ttc; $amount_ht[$obj->rowid] = $obj->amount;
$name[$obj->rowid] = $obj->lastname.' '.$obj->firstname; $amount[$obj->rowid] = $obj->amount_ttc;
$catotal+=$obj->amount_ttc; $name[$obj->rowid] = $obj->name.' '.$obj->firstname;
$i++; $catotal_ht+=$obj->amount;
$catotal+=$obj->amount_ttc;
$i++;
} }
} } else {
else {
dol_print_error($db); dol_print_error($db);
} }
// On ajoute les paiements ancienne version, non lies par paiement_facture donc sans user // Adding old-version payments, non-bound by "paiement_facture" then without User
if ($modecompta != 'CREANCES-DETTES') if ($modecompta != 'CREANCES-DETTES') {
{ $sql = "SELECT -1 as rowidx, '' as name, '' as firstname, sum(DISTINCT p.amount) as amount_ttc";
$sql = "SELECT -1 as rowidx, '' as lastname, '' as firstname, sum(p.amount) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."paiement as p"; $sql.= ", ".MAIN_DB_PREFIX."paiement as p";
@ -192,42 +231,86 @@ if ($modecompta != 'CREANCES-DETTES')
$sql.= " AND p.fk_bank = b.rowid"; $sql.= " AND p.fk_bank = b.rowid";
$sql.= " AND b.fk_account = ba.rowid"; $sql.= " AND b.fk_account = ba.rowid";
$sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND ba.entity = ".$conf->entity;
if ($date_start && $date_end) $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; if ($date_start && $date_end) {
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
}
$sql.= " GROUP BY rowidx, name, firstname"; $sql.= " GROUP BY rowidx, name, firstname";
$sql.= " ORDER BY rowidx"; $sql.= " ORDER BY rowidx";
$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);
$amount[$obj->rowidx] = $obj->amount_ttc; $amount[$obj->rowidx] = $obj->amount_ttc;
$name[$obj->rowidx] = $obj->lastname.' '.$obj->firstname; $name[$obj->rowidx] = $obj->name.' '.$obj->firstname;
$catotal+=$obj->amount_ttc; $catotal+=$obj->amount_ttc;
$i++; $i++;
} }
} } else {
else {
dol_print_error($db); dol_print_error($db);
} }
} }
$i = 0; $i = 0;
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"name","",'&amp;year='.($year).'&modecompta='.$modecompta,"",$sortfield,$sortorder); print_liste_field_titre(
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"amount_ttc","",'&amp;year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder); $langs->trans("User"),
print_liste_field_titre($langs->trans("Percentage"),$_SERVER["PHP_SELF"],"amount_ttc","",'&amp;year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder); $_SERVER["PHP_SELF"],
print_liste_field_titre($langs->trans("OtherStatistics"),$_SERVER["PHP_SELF"],"","","",'align="center" width="20%"'); "name",
"",
$paramslink,
"",
$sortfield,
$sortorder
);
if ($modecompta == 'CREANCES-DETTES') {
print_liste_field_titre(
$langs->trans('AmountHT'),
$_SERVER["PHP_SELF"],
"amount_ht",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
} else {
print '<td colspan="1"></td>';
}
print_liste_field_titre(
$langs->trans("AmountTTC"),
$_SERVER["PHP_SELF"],
"amount_ttc",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans("Percentage"),
$_SERVER["PHP_SELF"],"amount_ttc",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans("OtherStatistics"),
$_SERVER["PHP_SELF"],
"",
"",
"",
'align="center" width="20%"'
);
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
if (count($amount)) if (count($amount)) {
{
$arrayforsort=$name; $arrayforsort=$name;
// We define arrayforsort // We define arrayforsort
@ -239,6 +322,14 @@ if (count($amount))
arsort($name); arsort($name);
$arrayforsort=$name; $arrayforsort=$name;
} }
if ($sortfield == 'amount_ht' && $sortorder == 'asc') {
asort($amount_ht);
$arrayforsort=$amount_ht;
}
if ($sortfield == 'amount_ht' && $sortorder == 'desc') {
arsort($amount_ht);
$arrayforsort=$amount_ht;
}
if ($sortfield == 'amount_ttc' && $sortorder == 'asc') { if ($sortfield == 'amount_ttc' && $sortorder == 'asc') {
asort($amount); asort($amount);
$arrayforsort=$amount; $arrayforsort=$amount;
@ -248,8 +339,7 @@ if (count($amount))
$arrayforsort=$amount; $arrayforsort=$amount;
} }
foreach($arrayforsort as $key => $value) foreach($arrayforsort as $key => $value) {
{
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
@ -257,23 +347,44 @@ if (count($amount))
$fullname=$name[$key]; $fullname=$name[$key];
if ($key >= 0) { if ($key >= 0) {
$linkname='<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$key.'">'.img_object($langs->trans("ShowUser"),'user').' '.$fullname.'</a>'; $linkname='<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$key.'">'.img_object($langs->trans("ShowUser"),'user').' '.$fullname.'</a>';
} } else {
else {
$linkname=$langs->trans("PaymentsNotLinkedToUser"); $linkname=$langs->trans("PaymentsNotLinkedToUser");
} }
print "<td>".$linkname."</td>\n"; print "<td>".$linkname."</td>\n";
// Amount // Amount w/o VAT
print '<td align="right">'; print '<td align="right">';
if ($modecompta != 'CREANCES-DETTES') if ($modecompta != 'CREANCES-DETTES')
{ {
if ($key > 0) print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid='.$key.'">'; if ($key > 0) {
else print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid=-1">'; print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid='.$key.'">';
} else {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid=-1">';
}
} else {
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
} else {
print '<a href="#">';
}
print price($amount_ht[$key]);
} }
else print '</td>';
{
if ($key > 0) print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">'; // Amount with VAT
else print '<a href="#">'; print '<td align="right">';
if ($modecompta != 'CREANCES-DETTES') {
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid='.$key.'">';
} else {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid=-1">';
}
} else {
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
} else {
print '<a href="#">';
}
} }
print price($amount[$key]); print price($amount[$key]);
print '</td>'; print '</td>';
@ -283,17 +394,30 @@ if (count($amount))
// Other stats // Other stats
print '<td align="center">'; print '<td align="center">';
if (! empty($conf->propal->enabled) && $key>0) print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a>&nbsp;'; if (! empty($conf->propal->enabled) && $key>0) {
if (! empty($conf->commande->enabled) && $key>0) print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a>&nbsp;'; print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a>&nbsp;';
if (! empty($conf->facture->enabled) && $key>0) print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a>&nbsp;'; }
if (! empty($conf->commande->enabled) && $key>0) {
print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a>&nbsp;';
}
if (! empty($conf->facture->enabled) && $key>0) {
print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a>&nbsp;';
}
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }
// Total // Total
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.price($catotal).'</td><td>&nbsp;</td>'; print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
if ($modecompta != 'CREANCES-DETTES') {
print '<td colspan="1"></td>';
} else {
print '<td align="right">'.price($catotal_ht).'</td>';
}
print '<td align="right">'.price($catotal).'</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.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
@ -27,8 +28,10 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$langs->load("companies"); $langs->load("companies");
$langs->load("categories");
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->COMPTA_MODE; $modecompta = $conf->global->COMPTA_MODE;
@ -41,6 +44,13 @@ if (! $sortfield) $sortfield="nom";
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
// Category
$selected_cat = (int)GETPOST('search_categ', 'int');
$subcat = false;
if (GETPOST('subcat', 'alpha') === 'yes') {
$subcat = true;
}
// Security check // Security check
if ($user->societe_id > 0) $socid = $user->societe_id; if ($user->societe_id > 0) $socid = $user->societe_id;
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat'); if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
@ -49,6 +59,12 @@ if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accountin
// Date range // Date range
$year=GETPOST("year"); $year=GETPOST("year");
$month=GETPOST("month"); $month=GETPOST("month");
$date_startyear = GETPOST("date_startyear");
$date_startmonth = GETPOST("date_startmonth");
$date_startday = GETPOST("date_startday");
$date_endyear = GETPOST("date_endyear");
$date_endmonth = GETPOST("date_endmonth");
$date_endday = GETPOST("date_endday");
if (empty($year)) if (empty($year))
{ {
$year_current = strftime("%Y",dol_now()); $year_current = strftime("%Y",dol_now());
@ -92,10 +108,34 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
else else
{ {
// TODO We define q // TODO We define q
} }
$commonparams=array();
$commonparams['modecompta']=$modecompta;
$commonparams['sortorder'] = $sortorder;
$commonparams['sortfield'] = $sortfield;
$headerparams = array();
$headerparams['date_startyear'] = $date_startyear;
$headerparams['date_startmonth'] = $date_startmonth;
$headerparams['date_startday'] = $date_startday;
$headerparams['date_endyear'] = $date_endyear;
$headerparams['date_endmonth'] = $date_endmonth;
$headerparams['date_endday'] = $date_endday;
$headerparams['q'] = $q;
$tableparams = array();
$tableparams['search_categ'] = $selected_cat;
$tableparams['subcat'] = ($subcat === true)?'yes':'';
// Adding common parameters
$allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
foreach($allparams as $key => $value) {
$paramslink .= '&' . $key . '=' . $value;
}
/* /*
* View * View
@ -105,8 +145,9 @@ llxHeader();
$form=new Form($db); $form=new Form($db);
$thirdparty_static=new Societe($db); $thirdparty_static=new Societe($db);
$formother = new FormOther($db);
// Affiche en-tete de rapport // Show report header
if ($modecompta=="CREANCES-DETTES") if ($modecompta=="CREANCES-DETTES")
{ {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
@ -118,8 +159,7 @@ if ($modecompta=="CREANCES-DETTES")
else $description.= $langs->trans("DepositsAreIncluded"); else $description.= $langs->trans("DepositsAreIncluded");
$builddate=time(); $builddate=time();
//$exportlink=$langs->trans("NotYetAvailable"); //$exportlink=$langs->trans("NotYetAvailable");
} } else {
else {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')'; $nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
@ -129,26 +169,44 @@ else {
$builddate=time(); $builddate=time();
//$exportlink=$langs->trans("NotYetAvailable"); //$exportlink=$langs->trans("NotYetAvailable");
} }
$moreparam=array();
if (! empty($modecompta)) $moreparam['modecompta']=$modecompta; report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam);
// Charge tableau // Show Array
$catotal=0; $catotal=0;
if ($modecompta == 'CREANCES-DETTES') if ($modecompta == 'CREANCES-DETTES') {
{ $sql = "SELECT DISTINCT s.rowid as socid, s.nom as name,";
$sql = "SELECT s.rowid as socid, s.nom as name, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; $sql.= " sum(DISTINCT f.total) as amount, sum(DISTINCT f.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= " JOIN ".MAIN_DB_PREFIX."facture as f";
if ($selected_cat === -2) {
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = ".$selected_cat;
if (subcat) {
$sql.=" OR c.fk_parent = " . $selected_cat;
}
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON cs.fk_categorie = c.rowid";
}
$sql.= " WHERE f.fk_statut in (1,2)"; $sql.= " WHERE f.fk_statut in (1,2)";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
else $sql.= " AND f.type IN (0,1,2,3)"; $sql.= " AND f.type IN (0,1,2)";
} else {
$sql.= " AND f.type IN (0,1,2,3)";
}
$sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.fk_soc = s.rowid";
if ($date_start && $date_end) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; if ($date_start && $date_end) {
} $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
else }
{ if ($selected_cat === -2) {
$sql.=" AND cs.fk_societe is null";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " AND cs.fk_societe = s.rowid";
}
} else {
/* /*
* Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
* vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
@ -161,7 +219,9 @@ else
$sql .= " WHERE p.rowid = pf.fk_paiement"; $sql .= " WHERE p.rowid = pf.fk_paiement";
$sql.= " AND pf.fk_facture = f.rowid"; $sql.= " AND pf.fk_facture = f.rowid";
$sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.fk_soc = s.rowid";
if ($date_start && $date_end) $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; if ($date_start && $date_end) {
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
}
} }
$sql.= " AND f.entity = ".$conf->entity; $sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid; if ($socid) $sql.= " AND f.fk_soc = ".$socid;
@ -169,27 +229,26 @@ $sql.= " GROUP BY s.rowid, s.nom";
$sql.= " ORDER BY s.rowid"; $sql.= " ORDER BY s.rowid";
$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);
$amount[$obj->socid] += $obj->amount_ttc; $amount_ht[$obj->socid] = $obj->amount;
$name[$obj->socid] = $obj->name; $amount[$obj->socid] = $obj->amount_ttc;
$catotal+=$obj->amount_ttc; $name[$obj->socid] = $obj->name.' '.$obj->firstname;
$i++; $catotal_ht+=$obj->amount;
$catotal+=$obj->amount_ttc;
$i++;
} }
} } else {
else {
dol_print_error($db); dol_print_error($db);
} }
// On ajoute les paiements anciennes version, non lies par paiement_facture // On ajoute les paiements anciennes version, non lies par paiement_facture
if ($modecompta != 'CREANCES-DETTES') if ($modecompta != 'CREANCES-DETTES') {
{ $sql = "SELECT '0' as socid, 'Autres' as name, sum(DISTINCT p.amount) as amount_ttc";
$sql = "SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."paiement as p"; $sql.= ", ".MAIN_DB_PREFIX."paiement as p";
@ -203,20 +262,17 @@ if ($modecompta != 'CREANCES-DETTES')
$sql.= " ORDER BY name"; $sql.= " ORDER BY name";
$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);
$amount[$obj->rowid] += $obj->amount_ttc; $amount[$obj->rowid] += $obj->amount_ttc;
$name[$obj->rowid] = $obj->name; $name[$obj->rowid] = $obj->name;
$catotal+=$obj->amount_ttc; $catotal+=$obj->amount_ttc;
$i++; $i++;
} }
} } else {
else {
dol_print_error($db); dol_print_error($db);
} }
} }
@ -224,20 +280,87 @@ if ($modecompta != 'CREANCES-DETTES')
// Show array // Show array
$i = 0; $i = 0;
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
// Extra parameters management
foreach($headerparams as $key => $value)
{
print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
}
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; // Category filter
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"nom","",'&amp;year='.($year).'&modecompta='.$modecompta,"",$sortfield,$sortorder); print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"amount_ttc","",'&amp;year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder); print '<td>';
print_liste_field_titre($langs->trans("Percentage"),$_SERVER["PHP_SELF"],"amount_ttc","",'&amp;year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder); print $langs->trans("Category") . ': ' . $formother->select_categories(2, $selected_cat, 'search_categ', true);
print_liste_field_titre($langs->trans("OtherStatistics"),$_SERVER["PHP_SELF"],"","","",'align="center" width="20%"'); print ' ';
print $langs->trans("SubCats") . '? ';
print '<input type="checkbox" name="subcat" value="yes"';
if ($subcat) {
print ' checked="checked"';
}
print'></td>';
print '<td colspan="4" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td>';
print '</tr>';
// Array titles
print "<tr class='liste_titre'>";
print_liste_field_titre(
$langs->trans("Company"),
$_SERVER["PHP_SELF"],
"nom",
"",
$paramslink,
"",
$sortfield,$sortorder
);
if ($modecompta == 'CREANCES-DETTES') {
print_liste_field_titre(
$langs->trans('AmountHT'),
$_SERVER["PHP_SELF"],
"amount_ht",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
} else {
print '<td colspan="1"></td>';
}
print_liste_field_titre(
$langs->trans("AmountTTC"),
$_SERVER["PHP_SELF"],
"amount_ttc",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans("Percentage"),
$_SERVER["PHP_SELF"],
"amount_ttc",
"",
$paramslink,
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans("OtherStatistics"),
$_SERVER["PHP_SELF"],
"",
"",
"",
'align="center" width="20%"'
);
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
if (count($amount)) if (count($amount)) {
{
$arrayforsort=$name; $arrayforsort=$name;
// Defining array arrayforsort
// On definit tableau arrayforsort
if ($sortfield == 'nom' && $sortorder == 'asc') { if ($sortfield == 'nom' && $sortorder == 'asc') {
asort($name); asort($name);
$arrayforsort=$name; $arrayforsort=$name;
@ -246,6 +369,14 @@ if (count($amount))
arsort($name); arsort($name);
$arrayforsort=$name; $arrayforsort=$name;
} }
if ($sortfield == 'amount_ht' && $sortorder == 'asc') {
asort($amount_ht);
$arrayforsort=$amount_ht;
}
if ($sortfield == 'amount_ht' && $sortorder == 'desc') {
arsort($amount_ht);
$arrayforsort=$amount_ht;
}
if ($sortfield == 'amount_ttc' && $sortorder == 'asc') { if ($sortfield == 'amount_ttc' && $sortorder == 'asc') {
asort($amount); asort($amount);
$arrayforsort=$amount; $arrayforsort=$amount;
@ -255,8 +386,7 @@ if (count($amount))
$arrayforsort=$amount; $arrayforsort=$amount;
} }
foreach($arrayforsort as $key=>$value) foreach($arrayforsort as $key=>$value) {
{
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
@ -267,23 +397,43 @@ if (count($amount))
$thirdparty_static->name=$fullname; $thirdparty_static->name=$fullname;
$thirdparty_static->client=1; $thirdparty_static->client=1;
$linkname=$thirdparty_static->getNomUrl(1,'customer'); $linkname=$thirdparty_static->getNomUrl(1,'customer');
} } else {
else {
$linkname=$langs->trans("PaymentsNotLinkedToInvoice"); $linkname=$langs->trans("PaymentsNotLinkedToInvoice");
} }
print "<td>".$linkname."</td>\n"; print "<td>".$linkname."</td>\n";
// Amount // Amount w/o VAT
print '<td align="right">'; print '<td align="right">';
if ($modecompta != 'CREANCES-DETTES') if ($modecompta != 'CREANCES-DETTES') {
{ if ($key > 0) {
if ($key > 0) print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?socid='.$key.'">'; print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid='.$key.'">';
else print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?orphelins=1">'; } else {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?userid=-1">';
}
} else {
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
} else {
print '<a href="#">';
}
print price($amount_ht[$key]);
} }
else print '</td>';
{
if ($key > 0) print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$key.'">'; // Amount with VAT
else print '<a href="#">'; print '<td align="right">';
if ($modecompta != 'CREANCES-DETTES') {
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?socid='.$key.'">';
} else {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/liste.php?orphelins=1">';
}
} else {
if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$key.'">';
} else {
print '<a href="#">';
}
} }
print price($amount[$key]); print price($amount[$key]);
print '</a>'; print '</a>';
@ -294,17 +444,30 @@ if (count($amount))
// Other stats // Other stats
print '<td align="center">'; print '<td align="center">';
if (! empty($conf->propal->enabled) && $key>0) print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a>&nbsp;'; if (! empty($conf->propal->enabled) && $key>0) {
if (! empty($conf->commande->enabled) && $key>0) print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a>&nbsp;'; print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a>&nbsp;';
if (! empty($conf->facture->enabled) && $key>0) print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a>&nbsp;'; }
if (! empty($conf->commande->enabled) && $key>0) {
print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a>&nbsp;';
}
if (! empty($conf->facture->enabled) && $key>0) {
print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a>&nbsp;';
}
print '</td>'; print '</td>';
print "</tr>\n";
print "</tr>\n"; $i++;
$i++;
} }
// Total // Total
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.price($catotal).'</td><td>&nbsp;</td>'; print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
if ($modecompta != 'CREANCES-DETTES') {
print '<td colspan="1"></td>';
} else {
print '<td align="right">'.price($catotal_ht).'</td>';
}
print '<td align="right">'.price($catotal).'</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
@ -312,8 +475,7 @@ if (count($amount))
} }
print "</table>"; print "</table>";
print '<br>'; print '</form>';
llxFooter(); llxFooter();

View File

@ -4,6 +4,7 @@
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com> * Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Pierre Morin <pierre.morin@auguria.net> * Copyright (C) 2010 Pierre Morin <pierre.morin@auguria.net>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* *
* 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
@ -139,8 +140,7 @@ if (! dol_is_dir($upload_dir))
print '<!-- TYPE='.$type.' -->'."\n"; print '<!-- TYPE='.$type.' -->'."\n";
print '<!-- Page called with mode='.(isset($mode)?$mode:'').' type='.$type.' module='.$module.' url='.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n"; print '<!-- Page called with mode='.(isset($mode)?$mode:'').' type='.$type.' module='.$module.' url='.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
$param=''; $param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
$param.=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
$url=DOL_URL_ROOT.'/ecm/index.php'; $url=DOL_URL_ROOT.'/ecm/index.php';
// Dir scan // Dir scan
@ -149,126 +149,73 @@ if ($type == 'directory')
$formfile=new FormFile($db); $formfile=new FormFile($db);
$maxlengthname=40; $maxlengthname=40;
$excludefiles = array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$');
$sorting = (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC);
// Right area. If module is defined, we are in automatic ecm. // Right area. If module is defined, we are in automatic ecm.
if ($module == 'company') // Auto area for suppliers invoices $automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project');
{
$upload_dir = $conf->societe->dir_output; // TODO change for multicompany sharing
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module; // TODO change for multicompany sharing
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound"))); // Auto area for suppliers invoices
if ($module == 'company') $upload_dir = $conf->societe->dir_output;
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url); // Auto area for suppliers invoices
} else if ($module == 'invoice') $upload_dir = $conf->facture->dir_output;
else if ($module == 'invoice') // Auto area for suppliers invoices // Auto area for suppliers invoices
{ else if ($module == 'invoice_supplier')
$upload_dir = $conf->facture->dir_output;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else if ($module == 'invoice_supplier') // Auto area for suppliers invoices
{ {
$relativepath='facture'; $relativepath='facture';
$upload_dir = $conf->fournisseur->dir_output.'/'.$relativepath; $upload_dir = $conf->fournisseur->dir_output.'/'.$relativepath;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
} }
else if ($module == 'propal') // Auto area for customers orders // Auto area for customers orders
{ else if ($module == 'propal') $upload_dir = $conf->propal->dir_output;
$upload_dir = $conf->propal->dir_output; // Auto area for customers orders
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); else if ($module == 'order') $upload_dir = $conf->commande->dir_output;
// Auto area for suppliers orders
$param.='&module='.$module; else if ($module == 'order_supplier')
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else if ($module == 'order') // Auto area for customers orders
{
$upload_dir = $conf->commande->dir_output;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else if ($module == 'order_supplier') // Auto area for suppliers orders
{ {
$relativepath='commande'; $relativepath='commande';
$upload_dir = $conf->fournisseur->dir_output.'/'.$relativepath; $upload_dir = $conf->fournisseur->dir_output.'/'.$relativepath;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); }
// Auto area for suppliers invoices
else if ($module == 'contract') $upload_dir = $conf->contrat->dir_output;
// Auto area for products
else if ($module == 'product') $upload_dir = $conf->product->dir_output;
// Auto area for suppliers invoices
else if ($module == 'tax') $upload_dir = $conf->tax->dir_output;
// Auto area for projects
else if ($module == 'project') $upload_dir = $conf->projet->dir_output;
if (in_array($module, $automodules))
{
$param.='&module='.$module; $param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound"))); $textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$filearray=dol_dir_list($upload_dir,"files",1,'', $excludefiles, $sortfield, $sorting,1);
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url); $formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
} }
else if ($module == 'contract') // Auto area for suppliers invoices //Manual area
{ else
$upload_dir = $conf->contrat->dir_output;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else if ($module == 'product') // Auto area for products
{
$upload_dir = $conf->product->dir_output;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else if ($module == 'tax') // Auto area for suppliers invoices
{
$upload_dir = $conf->tax->dir_output;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else if ($module == 'project') // Auto area for projects
{
$upload_dir = $conf->projet->dir_output;
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$param.='&module='.$module;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
}
else // Manual area
{ {
$relativepath=$ecmdir->getRelativePath(); $relativepath=$ecmdir->getRelativePath();
$upload_dir = $conf->ecm->dir_output.'/'.$relativepath; $upload_dir = $conf->ecm->dir_output.'/'.$relativepath;
$filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','\.meta$','^temp$','^CVS$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
if ($section) $param.='&section='.$section;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")));
// If $section defined with value 0 // If $section defined with value 0
if ($section === '0') if ($section === '0')
{ {
$filearray=array(); $filearray=array();
$textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>'; $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
} }
else $filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','\.meta$','^temp$','^CVS$'),$sortfield, $sorting,1);
if ($section)
{
$param.='&section='.$section;
$textifempty = $langs->trans('NoFileFound');
}
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,$maxlengthname,'',$url); $formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,$maxlengthname,'',$url);
} }
} }
if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))

View File

@ -117,7 +117,7 @@ if (file_exists($fullpathselecteddir))
// Loop on all database entries (sqltree) to find the one matching the subdir found into dir to scan // Loop on all database entries (sqltree) to find the one matching the subdir found into dir to scan
foreach($sqltree as $key => $tmpval) foreach($sqltree as $key => $tmpval)
{ {
//print "-- key=".$key." - ".$val['fullrelativename']." vs ".(($selecteddir != '/'?$selecteddir.'/':'').$file).'<br>'; //print "-- key=".$key." - ".$tmpval['fullrelativename']." vs ".(($selecteddir != '/'?$selecteddir.'/':'').$file)."<br>\n";
if ($tmpval['fullrelativename'] == (($selecteddir != '/'?$selecteddir.'/':'').$file)) // We found equivalent record into database if ($tmpval['fullrelativename'] == (($selecteddir != '/'?$selecteddir.'/':'').$file)) // We found equivalent record into database
{ {
$val=$tmpval; $val=$tmpval;

File diff suppressed because it is too large Load Diff

View File

@ -144,7 +144,6 @@ class HookManager
foreach($modules as $module => $actionclassinstance) foreach($modules as $module => $actionclassinstance)
{ {
//print 'class='.get_class($actionclassinstance).' method='.$method.' action='.$action; //print 'class='.get_class($actionclassinstance).' method='.$method.' action='.$action;
// jump to next class if method does not exists // jump to next class if method does not exists
if (! method_exists($actionclassinstance,$method)) continue; if (! method_exists($actionclassinstance,$method)) continue;
// test to avoid to run twice a hook, when a module implements several active contexts // test to avoid to run twice a hook, when a module implements several active contexts
@ -178,7 +177,7 @@ class HookManager
$result = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example) $result = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results); if (! empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints; if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
// TODO. remove this. array result must be set into $actionclassinstance->results // TODO. remove this. array result must be set into $actionclassinstance->results

View File

@ -384,6 +384,11 @@ function agenda_prepare_head()
$head[$h][2] = 'extsites'; $head[$h][2] = 'extsites';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php";
$head[$h][1] = $langs->trans("Other");
$head[$h][2] = 'other';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda_admin'); complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda_admin');
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php"; $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";

View File

@ -814,13 +814,14 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
} }
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
if (! $format) $format='daytextshort'; if (! $format) $format='daytextshort';
$reduceformat=(! empty($conf->dol_optimize_smallscreen) && in_array($format,array('day','hour')))?1:0;
// Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default. // Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default.
if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short); if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short);
else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short);
else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration); else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration);
else if ($format == 'daytext') $format=($outputlangs->trans("FormatDateText")!="FormatDateText"?$outputlangs->trans("FormatDateText"):$conf->format_date_text); else if ($format == 'daytext') $format=($outputlangs->trans("FormatDateText")!="FormatDateText"?$outputlangs->trans("FormatDateText"):$conf->format_date_text);
else if ($format == 'daytextshort') $format=($outputlangs->trans("FormatDateTextShort")!="FormatDateTextShort"?$outputlangs->trans("FormatDateTextShort"):$conf->format_date_text_short); else if ($format == 'daytextshort') $format=($outputlangs->trans("FormatDateTextShort")!="FormatDateTextShort"?$outputlangs->trans("FormatDateTextShort"):$conf->format_date_text_short);
else if ($format == 'dayhour') $format=($outputlangs->trans("FormatDateHourShort")!="FormatDateHourShort"?$outputlangs->trans("FormatDateHourShort"):$conf->format_date_hour_short); else if ($format == 'dayhour') $format=($outputlangs->trans("FormatDateHourShort")!="FormatDateHourShort"?$outputlangs->trans("FormatDateHourShort"):$conf->format_date_hour_short);
else if ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short); else if ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short);
else if ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text); else if ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text);
@ -828,12 +829,18 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
// Format not sensitive to language // Format not sensitive to language
else if ($format == 'dayhourlog') $format='%Y%m%d%H%M%S'; else if ($format == 'dayhourlog') $format='%Y%m%d%H%M%S';
else if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; else if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ';
else if ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ'; else if ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ';
else if ($format == 'dayxcard') $format='%Y%m%d'; else if ($format == 'dayxcard') $format='%Y%m%d';
else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339 else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339
else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339 else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339
else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S'; else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S';
if ($reduceformat)
{
$format=str_replace('%Y','%y',$format);
$format=str_replace('yyyy','yy',$format);
}
// If date undefined or "", we return "" // If date undefined or "", we return ""
if (dol_strlen($time) == 0) return ''; // $time=0 allowed (it means 01/01/1970 00:00:00) if (dol_strlen($time) == 0) return ''; // $time=0 allowed (it means 01/01/1970 00:00:00)

View File

@ -1283,7 +1283,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
if (! $tmpdir) { unset($listofdir[$key]); continue; } if (! $tmpdir) { unset($listofdir[$key]); continue; }
if (is_dir($tmpdir)) if (is_dir($tmpdir))
{ {
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt','','name',SORT_ASC,0,true); // Disable hook for the moment $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0,true); // Disable hook for the moment
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
} }
} }

View File

@ -852,6 +852,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
*/ */
if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/stats/casoc.php?leftmenu=ca",$langs->trans("ByCompanies"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire); if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/stats/casoc.php?leftmenu=ca",$langs->trans("ByCompanies"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/stats/cabyuser.php?leftmenu=ca",$langs->trans("ByUsers"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire); if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/stats/cabyuser.php?leftmenu=ca",$langs->trans("ByUsers"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=ca", $langs->trans("ByProductsAndServices"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
// Journaux // Journaux
//if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journaux"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire); //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journaux"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);

View File

@ -198,10 +198,10 @@ class modFacture extends DolibarrModules
$this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export")); $this->export_permission[$r]=array(array("facture","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber');
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_start[$r]='SELECT DISTINCT ';

View File

@ -109,7 +109,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0); if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
else else
{ {
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt','','name',SORT_ASC,0,true); // Disable hook for the moment $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0,true); // Disable hook for the moment
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
} }
} }
@ -210,16 +210,27 @@ class doc_generic_odt extends ModeleThirdPartyDoc
{ {
//print "srctemplatepath=".$srctemplatepath; // Src filename //print "srctemplatepath=".$srctemplatepath; // Src filename
$newfile=basename($srctemplatepath); $newfile=basename($srctemplatepath);
$newfiletmp=preg_replace('/\.odt/i','',$newfile); $newfiletmp=preg_replace('/\.od(s|t)/i','',$newfile);
$newfiletmp=preg_replace('/template_/i','',$newfiletmp); $newfiletmp=preg_replace('/template_/i','',$newfiletmp);
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp); $newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt)
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
if ( ! empty($conf->global->MAIN_ODT_USE_TIMING))
{
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
}
else
{
$filename=$newfiletmp.'.'.$newfileformat;
}
$file=$dir.'/'.$filename; $file=$dir.'/'.$filename;
$object->builddoc_filename=$filename; // For triggers $object->builddoc_filename=$filename; // For triggers
//print "newfileformat=".$newfileformat;
//print "newdir=".$dir; //print "newdir=".$dir;
//print "newfile=".$newfile; //print "newfile=".$newfile;
//print "file=".$file; //print "file=".$file;
//print "conf->societe->dir_temp=".$conf->societe->dir_temp; //print "conf->societe->dir_temp=".$conf->societe->dir_temp;
//exit;
dol_mkdir($conf->societe->multidir_temp[$object->entity]); dol_mkdir($conf->societe->multidir_temp[$object->entity]);

View File

@ -27,7 +27,7 @@
var required = jQuery("#required"); var required = jQuery("#required");
var default_value = jQuery("#default_value"); var default_value = jQuery("#default_value");
<?php <?php
if(GETPOST('type') != "select") if((GETPOST('type') != "select") && (GETPOST('type') != "sellist"))
{ {
print 'jQuery("#value_choice").hide();'; print 'jQuery("#value_choice").hide();';
} }
@ -48,6 +48,7 @@
else if (type == 'boolean') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();} else if (type == 'boolean') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();}
else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();} else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();}
else if (type == 'select') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();} else if (type == 'select') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
else if (type == 'sellist') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
else if (type == 'checkbox') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();} else if (type == 'checkbox') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
else if (type == 'radio') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();} else if (type == 'radio') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
else if (type == 'separate') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); required.val('').attr('disabled','disabled'); default_value.val('').attr('disabled','disabled'); jQuery("#value_choice").hide();} else if (type == 'separate') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); required.val('').attr('disabled','disabled'); default_value.val('').attr('disabled','disabled'); jQuery("#value_choice").hide();}
@ -63,6 +64,7 @@
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>"> <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
<input type="hidden" name="action" value="add"> <input type="hidden" name="action" value="add">
<input type="hidden" name="rowid" value="<?php echo $rowid ?>">
<table summary="listofattributes" class="border centpercent"> <table summary="listofattributes" class="border centpercent">
<!-- Type --> <!-- Type -->
@ -85,7 +87,7 @@
<table class="nobordernopadding"> <table class="nobordernopadding">
<tr><td width="30%"> <tr><td width="30%">
<textarea name="param" id="param"><?php echo GETPOST('param'); ?></textarea> <textarea name="param" id="param"><?php echo GETPOST('param'); ?></textarea>
</td><td><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelp"),1,0)?></td></tr> </td><td><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelp".$type),1,0)?></td></tr>
</table> </table>
</td> </td>

View File

@ -44,6 +44,7 @@
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>"> <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
<input type="hidden" name="attrname" value="<?php echo $attrname; ?>"> <input type="hidden" name="attrname" value="<?php echo $attrname; ?>">
<input type="hidden" name="action" value="update"> <input type="hidden" name="action" value="update">
<input type="hidden" name="rowid" value="<?php echo $rowid ?>">
<table summary="listofattributes" class="border centpercent"> <table summary="listofattributes" class="border centpercent">
@ -80,7 +81,7 @@ if((($type == 'select') || ($type == 'checkbox') ||(($type == 'radio'))) && is_a
</td></tr> </td></tr>
<!-- Value (for select list / radio) --> <!-- Value (for select list / radio) -->
<?php <?php
if(($type == 'select') || ($type == 'checkbox') ||(($type == 'radio'))) if(($type == 'select') || ($type == 'sellist') || ($type == 'checkbox') ||(($type == 'radio')))
{ {
?> ?>
<tr id="value_choice"> <tr id="value_choice">
@ -88,7 +89,11 @@ if(($type == 'select') || ($type == 'checkbox') ||(($type == 'radio')))
<?php echo $langs->trans("Value"); ?> <?php echo $langs->trans("Value"); ?>
</td> </td>
<td> <td>
<table class="nobordernopadding">
<tr><td width="30%">
<textarea name="param" id="param"><?php echo $param_chain; ?></textarea> <textarea name="param" id="param"><?php echo $param_chain; ?></textarea>
</td><td><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelp".$type),1,0)?></td></tr>
</table>
</td> </td>
</tr> </tr>
<?php <?php

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* *
* 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
@ -35,7 +36,8 @@ class InterfaceNotification
'PROPAL_VALIDATE', 'PROPAL_VALIDATE',
'FICHINTER_VALIDATE', 'FICHINTER_VALIDATE',
'ORDER_SUPPLIER_APPROVE', 'ORDER_SUPPLIER_APPROVE',
'ORDER_SUPPLIER_REFUSE' 'ORDER_SUPPLIER_REFUSE',
'SHIPPING_VALIDATE'
); );
/** /**
@ -196,6 +198,19 @@ class InterfaceNotification
$notify = new Notify($this->db); $notify = new Notify($this->db);
$notify->send($action, $object->socid, $mesg, 'order_supplier', $object->id, $filepdf); $notify->send($action, $object->socid, $mesg, 'order_supplier', $object->id, $filepdf);
} }
elseif ($action == 'SHIPPING_VALIDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$ref = dol_sanitizeFileName($object->ref);
$filepdf = $conf->expedition->dir_output . '/sending/' . $ref . '/' . $ref . '.pdf';
if (! file_exists($filepdf)) $filepdf='';
$mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated",$object->ref);
$notify = new Notify($this->db);
$notify->send($action, $object->socid, $mesg, 'expedition', $object->id, $filepdf);
}
// If not found // If not found
/* /*

View File

@ -142,7 +142,8 @@ class EcmDirectory // extends CommonObject
$dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath();
$result=dol_mkdir($dir); $result=dol_mkdir($dir);
if ($result < 0) { $error++; $this->error="ErrorFailedToCreateDir"; }
// Appel des triggers // Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db); $interface=new Interfaces($this->db);

View File

@ -118,6 +118,7 @@ if ($action == 'add' && $user->rights->ecm->setup)
{ {
$langs->load("errors"); $langs->load("errors");
setEventMessage($langs->trans($ecmdir->error), 'errors'); setEventMessage($langs->trans($ecmdir->error), 'errors');
setEventMessage($ecmdir->errors, 'errors');
$action = 'create'; $action = 'create';
} }
} }

View File

@ -5,6 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* *
* 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
@ -698,16 +699,16 @@ if ($action == 'create')
//$lines = $object->fetch_lines(1); //$lines = $object->fetch_lines(1);
$numAsked = count($object->lines); $numAsked = count($object->lines);
print '<script type="text/javascript" language="javascript"> print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery("#autofill").click(function() {'; jQuery("#autofill").click(function() {';
$i=0; $i=0;
while($i < $numAsked) while($i < $numAsked)
{ {
print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
$i++; $i++;
} }
print '}); print '});
jQuery("#autoreset").click(function() {'; jQuery("#autoreset").click(function() {';
$i=0; $i=0;
while($i < $numAsked) while($i < $numAsked)
@ -716,8 +717,8 @@ if ($action == 'create')
$i++; $i++;
} }
print '}); print '});
}); });
</script>'; </script>';
print '<br>'; print '<br>';
@ -904,7 +905,7 @@ if ($action == 'create')
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Create").'"></center>'; print '<br><center><input type="submit" class="button" value="'.$langs->trans("Create").'"></center>';
print '</form>'; print '</form>';
print '<br>'; print '<br>';
} }
@ -974,7 +975,18 @@ else
{ {
$numref = $object->ref; $numref = $object->ref;
} }
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$langs->trans("ConfirmValidateSending",$numref),'confirm_valid','',0,1);
$text = $langs->trans("ConfirmValidateSending",$numref);
if (! empty($conf->notification->enabled))
{
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db);
$text.='<br>';
$text.=$notify->confirmMessage('SHIPPING_VALIDATE',$object->socid);
}
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
/* /*

View File

@ -25,12 +25,12 @@
require '../main.inc.php'; require '../main.inc.php';
$langs->load("externalsite@externalsite"); $langs->load("externalsite");
if (empty($conf->global->EXTERNALSITE_URL)) if (empty($conf->global->EXTERNALSITE_URL))
{ {
llxHeader(); llxHeader();
print '<div class="error">Module ExternalSite was not configured properly.</div>'; print '<div class="error">'.$langs->trans('ExternalSiteModuleNotComplete').'</div>';
llxFooter(); llxFooter();
} }

View File

@ -24,7 +24,7 @@
require ("../main.inc.php"); require ("../main.inc.php");
$langs->load("@externalsite"); $langs->load("externalsite");
top_htmlhead("",""); top_htmlhead("","");
top_menu("","","_top"); top_menu("","","_top");

View File

@ -1077,7 +1077,7 @@ elseif (! empty($object->id))
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage(3,$object->socid); $text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid);
} }
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1); $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
@ -1762,10 +1762,10 @@ elseif (! empty($object->id))
print "</div>"; print "</div>";
} }
print "<br>"; print "<br>";
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
//print '<table width="100%"><tr><td width="50%" valign="top">'; //print '<table width="100%"><tr><td width="50%" valign="top">';
//print '<a name="builddoc"></a>'; // ancre //print '<a name="builddoc"></a>'; // ancre

View File

@ -1342,12 +1342,12 @@ else
} }
$text=$langs->trans('ConfirmValidateBill',$numref); $text=$langs->trans('ConfirmValidateBill',$numref);
/*if (! empty($conf->notification->enabled)) /*if (! empty($conf->notification->enabled))
{ {
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC_SUP',$object->socid); $text.=$notify->confirmMessage('BILL_SUPPLIER_VALIDATE',$object->socid);
}*/ }*/
$formquestion=array(); $formquestion=array();
@ -2066,7 +2066,7 @@ else
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
} }
print '</div>'; print '</div>';
print '<br>'; print '<br>';
if ($action != 'edit') if ($action != 'edit')
{ {

View File

@ -85,8 +85,9 @@ if ($object->fetch($id))
dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company');
print '<table width="100%" class="notopnoleftnoright">'; print '<div class="fichecenter"><div class="fichehalfleft">';
print '<tr><td valign="top" width="50%" class="notopnoleft">'; //print '<table width="100%" class="notopnoleftnoright">';
//print '<tr><td valign="top" width="50%" class="notopnoleft">';
print '<table width="100%" class="border">'; print '<table width="100%" class="border">';
print '<tr><td width="20%">'.$langs->trans("ThirdPartyName").'</td><td width="80%" colspan="3">'; print '<tr><td width="20%">'.$langs->trans("ThirdPartyName").'</td><td width="80%" colspan="3">';
@ -216,7 +217,11 @@ if ($object->fetch($id))
print '</table>'; print '</table>';
print '</td><td valign="top" width="50%" class="notopnoleftnoright">';
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
//print '</td><td valign="top" width="50%" class="notopnoleftnoright">';
$var=true; $var=true;
$MAXLIST=5; $MAXLIST=5;
@ -367,9 +372,12 @@ if ($object->fetch($id))
} }
} }
print '</td></tr>'; print '</div></div></div>';
print '</table>' . "\n"; print '<div style="clear:both"></div>';
print '</div>'; //print '</td></tr>';
//print '</table>' . "\n";
dol_fiche_end();
/* /*

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -228,7 +228,6 @@ if ($id > 0)
print "</tr>\n"; print "</tr>\n";
print '</table><br>'; print '</table><br>';
} }
else else
{ {
@ -242,7 +241,15 @@ $nbaquis=$holiday->getCPforUser($user_id);
$nbdeduced=$holiday->getConfCP('nbHolidayDeducted'); $nbdeduced=$holiday->getConfCP('nbHolidayDeducted');
$nb_holiday = $nbaquis / $nbdeduced; $nb_holiday = $nbaquis / $nbdeduced;
print $langs->trans('SoldeCPUser',round($nb_holiday,2)).($nbdeduced != 1 ? ' ('.$nbaquis.' / '.$nbdeduced.')' : ''); print $langs->trans('SoldeCPUser',round($nb_holiday,2)).($nbdeduced != 1 ? ' ('.$nbaquis.' / '.$nbdeduced.')' : '');
print '</div>';
if ($id > 0)
{
dol_fiche_end();
print '</br>';
}
else {
print '</div>';
}
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n"; print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<table class="noborder" width="100%;">'; print '<table class="noborder" width="100%;">';

View File

@ -458,7 +458,7 @@ if (! $error && $db->connected && $action == "set")
print '<tr><td>'; print '<tr><td>';
print $langs->trans("ConfFileReload"); print $langs->trans("ConfFileReload");
print '</td>'; print '</td>';
print '<td>'.$langs->trans("OK").'</td></tr>'; print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
$userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:""; $userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:"";
@ -508,7 +508,7 @@ if (! $error && $db->connected && $action == "set")
print $langs->trans("UserCreation").' : '; print $langs->trans("UserCreation").' : ';
print $dolibarr_main_db_user; print $dolibarr_main_db_user;
print '</td>'; print '</td>';
print '<td>'.$langs->trans("OK").'</td></tr>'; print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
} }
else else
{ {
@ -542,7 +542,7 @@ if (! $error && $db->connected && $action == "set")
print $langs->trans("UserCreation").' : '; print $langs->trans("UserCreation").' : ';
print $dolibarr_main_db_user; print $dolibarr_main_db_user;
print '</td>'; print '</td>';
print '<td>'.$langs->trans("Error").'</td>'; print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td>';
print '</tr>'; print '</tr>';
// Affiche aide diagnostique // Affiche aide diagnostique
@ -576,7 +576,7 @@ if (! $error && $db->connected && $action == "set")
print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : "; print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : ";
print $dolibarr_main_db_name; print $dolibarr_main_db_name;
print '</td>'; print '</td>';
print "<td>".$langs->trans("OK")."</td></tr>"; print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
$check1=$newdb->getDefaultCharacterSetDatabase(); $check1=$newdb->getDefaultCharacterSetDatabase();
$check2=$newdb->getDefaultCollationDatabase(); $check2=$newdb->getDefaultCollationDatabase();
@ -606,7 +606,7 @@ if (! $error && $db->connected && $action == "set")
print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : "; print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : ";
print $dolibarr_main_db_name; print $dolibarr_main_db_name;
print '</td>'; print '</td>';
print '<td>'.$langs->trans("Error").'</td>'; print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td>';
print '</tr>'; print '</tr>';
// Affiche aide diagnostique // Affiche aide diagnostique
@ -632,43 +632,35 @@ if (! $error && $db->connected && $action == "set")
if ($db->connected == 1) if ($db->connected == 1)
{ {
dolibarr_install_syslog("etape1: connexion to server by user ".$conf->db->user." is ok", LOG_DEBUG);
print "<tr><td>";
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_host;
print "</td><td>";
print '<img src="../theme/eldy/img/tick.png" alt="Ok">';
print "</td></tr>";
// si acces serveur ok et acces base ok, tout est ok, on ne va pas plus loin, on a meme pas utilise le compte root. // si acces serveur ok et acces base ok, tout est ok, on ne va pas plus loin, on a meme pas utilise le compte root.
if ($db->database_selected == 1) if ($db->database_selected == 1)
{ {
dolibarr_install_syslog("etape1: connexion to server by user ".$conf->db->user." is ok", LOG_DEBUG);
print "<tr><td>";
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_host;
print "</td><td>";
print $langs->trans("OK");
print "</td></tr>";
dolibarr_install_syslog("etape1: connexion to database : ".$conf->db->name.", by user : ".$conf->db->user." is ok", LOG_DEBUG); dolibarr_install_syslog("etape1: connexion to database : ".$conf->db->name.", by user : ".$conf->db->user." is ok", LOG_DEBUG);
print "<tr><td>"; print "<tr><td>";
print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_name; print $dolibarr_main_db_name;
print "</td><td>"; print "</td><td>";
print $langs->trans("OK"); print '<img src="../theme/eldy/img/tick.png" alt="Ok">';
print "</td></tr>"; print "</td></tr>";
$error = 0; $error = 0;
} }
else else
{ {
dolibarr_install_syslog("etape1: connexion to server by user ".$conf->db->user." is ok", LOG_DEBUG);
print "<tr><td>";
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_host;
print "</td><td>";
print $langs->trans("OK");
print "</td></tr>";
dolibarr_install_syslog("etape1: connexion to database ".$conf->db->name.", by user : ".$conf->db->user." has failed", LOG_ERR); dolibarr_install_syslog("etape1: connexion to database ".$conf->db->name.", by user : ".$conf->db->user." has failed", LOG_ERR);
print "<tr><td>"; print "<tr><td>";
print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_name; print $dolibarr_main_db_name;
print '</td><td>'; print '</td><td>';
print $langs->trans("Error"); print '<img src="../theme/eldy/img/error.png" alt="Error">';
print "</td></tr>"; print "</td></tr>";
// Affiche aide diagnostique // Affiche aide diagnostique
@ -688,7 +680,7 @@ if (! $error && $db->connected && $action == "set")
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_host; print $dolibarr_main_db_host;
print '</td><td>'; print '</td><td>';
print '<font class="error">'.$db->error.'</div>'; print '<img src="../theme/eldy/img/error.png" alt="Error">';
print "</td></tr>"; print "</td></tr>";
// Affiche aide diagnostique // Affiche aide diagnostique
@ -938,7 +930,7 @@ function write_conf_file($conffile)
print $langs->trans("SaveConfigurationFile"); print $langs->trans("SaveConfigurationFile");
print ' <strong>'.$conffile.'</strong>'; print ' <strong>'.$conffile.'</strong>';
print "</td><td>"; print "</td><td>";
print $langs->trans("OK"); print '<img src="../theme/eldy/img/tick.png" alt="Ok">';
print "</td></tr>"; print "</td></tr>";
} }
else else

View File

@ -87,12 +87,12 @@ if ($action == "set")
if ($db->connected == 1) if ($db->connected == 1)
{ {
print "<tr><td>"; print "<tr><td>";
print $langs->trans("ServerConnection")." : ".$conf->db->host."</td><td>".$langs->trans("OK")."</td></tr>"; print $langs->trans("ServerConnection")." : ".$conf->db->host.'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
$ok = 1 ; $ok = 1 ;
} }
else else
{ {
print "<tr><td>Failed to connect to server : ".$conf->db->host."</td><td>".$langs->trans("Error")."</td></tr>"; print "<tr><td>Failed to connect to server : ".$conf->db->host.'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
} }
if ($ok) if ($ok)
@ -104,7 +104,7 @@ if ($action == "set")
else else
{ {
dolibarr_install_syslog("etape2: Connexion failed to database : ".$conf->db->name); dolibarr_install_syslog("etape2: Connexion failed to database : ".$conf->db->name);
print "<tr><td>Failed to select database ".$conf->db->name."</td><td>".$langs->trans("Error")."</td></tr>"; print "<tr><td>Failed to select database ".$conf->db->name.'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
$ok = 0 ; $ok = 0 ;
} }
} }
@ -241,13 +241,13 @@ if ($action == "set")
if ($error == 0) if ($error == 0)
{ {
print '<tr><td>'; print '<tr><td>';
print $langs->trans("TablesAndPrimaryKeysCreation").'</td><td>'.$langs->trans("OK").'</td></tr>'; print $langs->trans("TablesAndPrimaryKeysCreation").'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
$ok = 1; $ok = 1;
} }
} }
else else
{ {
print '<tr><td>'.$langs->trans("ErrorFailedToFindSomeFiles",$dir).'</td><td><font class="error">'.$langs->trans("Error").'</font></td></tr>'; print '<tr><td>'.$langs->trans("ErrorFailedToFindSomeFiles",$dir).'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
dolibarr_install_syslog("Failed to find files to create database in directory ".$dir,LOG_ERR); dolibarr_install_syslog("Failed to find files to create database in directory ".$dir,LOG_ERR);
} }
} }
@ -388,7 +388,7 @@ if ($action == "set")
if ($tablefound && $error == 0) if ($tablefound && $error == 0)
{ {
print '<tr><td>'; print '<tr><td>';
print $langs->trans("OtherKeysCreation").'</td><td>'.$langs->trans("OK").'</td></tr>'; print $langs->trans("OtherKeysCreation").'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
$okkeys = 1; $okkeys = 1;
} }
} }
@ -466,11 +466,11 @@ if ($action == "set")
print "<tr><td>".$langs->trans("FunctionsCreation")."</td>"; print "<tr><td>".$langs->trans("FunctionsCreation")."</td>";
if ($ok) if ($ok)
{ {
print "<td>".$langs->trans("OK")."</td></tr>"; print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
} }
else else
{ {
print '<td><font class="error">'.$langs->trans("Error").'</font></td></tr>'; print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
$ok = 1 ; $ok = 1 ;
} }
@ -588,11 +588,11 @@ if ($action == "set")
print "<tr><td>".$langs->trans("ReferenceDataLoading")."</td>"; print "<tr><td>".$langs->trans("ReferenceDataLoading")."</td>";
if ($ok) if ($ok)
{ {
print "<td>".$langs->trans("OK")."</td></tr>"; print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
} }
else else
{ {
print '<td><font class="error">'.$langs->trans("Error").'</font></td></tr>'; print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
$ok = 1; // Data loading are not blocking errors $ok = 1; // Data loading are not blocking errors
} }
} }

View File

@ -357,7 +357,10 @@ ExtrafieldSelect=Llista de selecció
ExtrafieldSeparator=Separador ExtrafieldSeparator=Separador
ExtrafieldCheckBox=Casella de verificació ExtrafieldCheckBox=Casella de verificació
ExtrafieldRadio=Botó de selecció excloent ExtrafieldRadio=Botó de selecció excloent
ExtrafieldParamHelp=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>... ExtrafieldParamHelpselect=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>...
ExtrafieldParamHelpcheckbox=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>...
ExtrafieldParamHelpradio=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>...
ExtrafieldParamHelpsellist=La llista ha de ser del table<br><br> per exemple : <br>table:label:(code)<br>
LibraryToBuildPDF=Llibreria usada per a la creació d'arxius PDF LibraryToBuildPDF=Llibreria usada per a la creació d'arxius PDF
WarningUsingFPDF=Atenció: El seu arxiu <b>conf.php</b> conté la directiva <b>dolibarr_pdf_force_fpdf=1</b>. Això fa que s'usi la llibreria FPDF per generar els seus arxius PDF. Aquesta llibreria és antiga i no cobreix algunes funcionalitats (Unicode, transparència d'imatges, idiomes ciríl · lics, àrabs o asiàtics, etc.), Pel que pot tenir problemes en la generació dels PDF.<br> Per resoldre-ho, i disposar d'un suport complet de PDF, pot descarregar la <a href="http://www.tcpdf.org/" target="_blank"> llibreria TCPDF </a>, i a continuació comentar o eliminar la línia <b>$dolibarr_pdf_force_fpdf=1</b>, i afegir al seu lloc <b>$dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF'</b> WarningUsingFPDF=Atenció: El seu arxiu <b>conf.php</b> conté la directiva <b>dolibarr_pdf_force_fpdf=1</b>. Això fa que s'usi la llibreria FPDF per generar els seus arxius PDF. Aquesta llibreria és antiga i no cobreix algunes funcionalitats (Unicode, transparència d'imatges, idiomes ciríl · lics, àrabs o asiàtics, etc.), Pel que pot tenir problemes en la generació dels PDF.<br> Per resoldre-ho, i disposar d'un suport complet de PDF, pot descarregar la <a href="http://www.tcpdf.org/" target="_blank"> llibreria TCPDF </a>, i a continuació comentar o eliminar la línia <b>$dolibarr_pdf_force_fpdf=1</b>, i afegir al seu lloc <b>$dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF'</b>
LocalTaxDesc=Alguns països apliquen 2 o 3 taxes a cada línia de factura. Si és el cas, escolliu el tipus de la segona i tercera taxa i el seu valor. Els possibles tipus són: <br> 1: taxa local aplicable a productes i serveis sense IVA (IVA no s'aplica a la taxa local) <br> 2: taxa local s'aplica a productes i serveis abans de l'IVA (IVA es calcula sobre import + taxa local) <br> 3: taxa local s'aplica a productes sense IVA (IVA no s'aplica a la taxa local) <br> 4: taxa local s'aplica a productes abans de l'IVA (IVA es calcula sobre l'import + taxa local) <br> 5: taxa local s'aplica a serveis sense IVA (IVA no s'aplica a la taxa local) <br> 6: taxa local s'aplica a serveis abans de l'IVA (IVA es calcula sobre import + taxa local) LocalTaxDesc=Alguns països apliquen 2 o 3 taxes a cada línia de factura. Si és el cas, escolliu el tipus de la segona i tercera taxa i el seu valor. Els possibles tipus són: <br> 1: taxa local aplicable a productes i serveis sense IVA (IVA no s'aplica a la taxa local) <br> 2: taxa local s'aplica a productes i serveis abans de l'IVA (IVA es calcula sobre import + taxa local) <br> 3: taxa local s'aplica a productes sense IVA (IVA no s'aplica a la taxa local) <br> 4: taxa local s'aplica a productes abans de l'IVA (IVA es calcula sobre l'import + taxa local) <br> 5: taxa local s'aplica a serveis sense IVA (IVA no s'aplica a la taxa local) <br> 6: taxa local s'aplica a serveis abans de l'IVA (IVA es calcula sobre import + taxa local)

View File

@ -46,6 +46,8 @@ ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %
ErrorDecimalLargerThanAreForbidden=Error, a precision higher than <b>%s</b> is not supported. ErrorDecimalLargerThanAreForbidden=Error, a precision higher than <b>%s</b> is not supported.
DictionnarySetup=Dictionary setup DictionnarySetup=Dictionary setup
Dictionnary=Dictionaries Dictionnary=Dictionaries
ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record
ErrorCodeCantContainZero=Code can't contain value 0
DisableJavascript=Disable JavaScript and Ajax functions DisableJavascript=Disable JavaScript and Ajax functions
ConfirmAjax=Use Ajax confirmation popups ConfirmAjax=Use Ajax confirmation popups
UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).<br><br>Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant SOCIETE_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).<br><br>Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant SOCIETE_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
@ -360,7 +362,10 @@ ExtrafieldSelect = Select list
ExtrafieldSeparator=Separator ExtrafieldSeparator=Separator
ExtrafieldCheckBox=Checkbox ExtrafieldCheckBox=Checkbox
ExtrafieldRadio=Radio button ExtrafieldRadio=Radio button
ExtrafieldParamHelp=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpselect=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpradio=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpsellist=Parameters list have come from table<br><br> for exemple : <br>c_typent:libelle:id<br>
LibraryToBuildPDF=Library used to build PDF LibraryToBuildPDF=Library used to build PDF
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b> WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (vat is not applied on local tax)<br>2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)<br>3 : local tax apply on products without vat (vat is not applied on local tax)<br>4 : local tax apply on products before vat (vat is calculated on amount + localtax)<br>5 : local tax apply on services without vat (vat is not applied on local tax)<br>6 : local tax apply on services before vat (vat is calculated on amount + localtax) LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (vat is not applied on local tax)<br>2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)<br>3 : local tax apply on products without vat (vat is not applied on local tax)<br>4 : local tax apply on products before vat (vat is calculated on amount + localtax)<br>5 : local tax apply on services without vat (vat is not applied on local tax)<br>6 : local tax apply on services before vat (vat is calculated on amount + localtax)
@ -543,6 +548,7 @@ Permission98=Dispatch invoice accountancy lines
Permission101=Read sendings Permission101=Read sendings
Permission102=Create/modify sendings Permission102=Create/modify sendings
Permission104=Validate sendings Permission104=Validate sendings
Permission106=Export sendings
Permission109=Delete sendings Permission109=Delete sendings
Permission111=Read financial accounts Permission111=Read financial accounts
Permission112=Create/modify/delete and compare transactions Permission112=Create/modify/delete and compare transactions

View File

@ -32,7 +32,7 @@ ViewCal=Month view
ViewDay=Day view ViewDay=Day view
ViewWeek=Week view ViewWeek=Week view
ViewWithPredefinedFilters= View with predefined filters ViewWithPredefinedFilters= View with predefined filters
AutoActions= Automatic filling of agenda AutoActions= Automatic filling
AgendaAutoActionDesc= Define here events for which you want Dolibarr to create automatically an event in agenda. If nothing is checked (by default), only manual actions will be included in agenda. AgendaAutoActionDesc= Define here events for which you want Dolibarr to create automatically an event in agenda. If nothing is checked (by default), only manual actions will be included in agenda.
AgendaSetupOtherDesc= This page provides options to allow export of your Dolibarr events into an external calendar (thunderbird, google calendar, ...) AgendaSetupOtherDesc= This page provides options to allow export of your Dolibarr events into an external calendar (thunderbird, google calendar, ...)
AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda. AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda.

View File

@ -81,6 +81,7 @@ ActionAC_SHIP=Send shipping by mail
ActionAC_SUP_ORD=Send supplier order by mail ActionAC_SUP_ORD=Send supplier order by mail
ActionAC_SUP_INV=Send supplier invoice by mail ActionAC_SUP_INV=Send supplier invoice by mail
ActionAC_OTH=Other ActionAC_OTH=Other
ActionAC_OTH_AUTO=Other (automatically inserted events)
ActionAC_MANUAL=Manually inserted events ActionAC_MANUAL=Manually inserted events
ActionAC_AUTO=Automatically inserted events ActionAC_AUTO=Automatically inserted events
Stats=Sales statistics Stats=Sales statistics
@ -92,4 +93,4 @@ NoData=There is no data
StatusProsp=Prospect status StatusProsp=Prospect status
DraftPropals=Draft commercial proposals DraftPropals=Draft commercial proposals
SearchPropal=Search a commercial proposal SearchPropal=Search a commercial proposal
CommercialDashboard=Commercial summary CommercialDashboard=Commercial summary

View File

@ -152,4 +152,5 @@ Pcg_type=Pcg type
Pcg_subtype=Pcg subtype Pcg_subtype=Pcg subtype
InvoiceLinesToDispatch=Invoice lines to dispatch InvoiceLinesToDispatch=Invoice lines to dispatch
InvoiceDispatched=Dispatched invoices InvoiceDispatched=Dispatched invoices
AccountancyDashboard=Accountancy summary AccountancyDashboard=Accountancy summary
ByProductsAndServices=By products and services

View File

@ -136,4 +136,5 @@ WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable i
WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other setup). WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other setup).
WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution.
WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box.
WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card).
WarningNotRelevant=Irrelevant operation for this dataset

View File

@ -1,4 +1,5 @@
# Dolibarr language file - en_US - externalsite # Dolibarr language file - en_US - externalsite
CHARSET=UTF-8 CHARSET=UTF-8
ExternalSiteSetup=Setup link to external website ExternalSiteSetup=Setup link to external website
ExternalSiteURL=External Site URL ExternalSiteURL=External Site URL
ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly.

View File

@ -132,4 +132,9 @@ NoCPforMonth=No leave this month.
Jours=days Jours=days
nbJours=Number days nbJours=Number days
TitleAdminCP=Configuration of Holidays TitleAdminCP=Configuration of Holidays
Permission20001=Read / Modify all requests of holidays Permission20001=Read/create/modify their holidays
Permission20002=Read/modify all requests of holidays
Permission20003=Delete their holidays requests
Permission20004=Define users holidays
Permission20005=Review log of modified holidays
Permission20006=Access holidays monthly report

View File

@ -152,6 +152,7 @@ EMailTextOrderApproved=The order %s has been approved.
EMailTextOrderApprovedBy=The order %s has been approved by %s. EMailTextOrderApprovedBy=The order %s has been approved by %s.
EMailTextOrderRefused=The order %s has been refused. EMailTextOrderRefused=The order %s has been refused.
EMailTextOrderRefusedBy=The order %s has been refused by %s. EMailTextOrderRefusedBy=The order %s has been refused by %s.
EMailTextExpeditionValidated=The shipping %s has been validated.
ImportedWithSet=Importation data set ImportedWithSet=Importation data set
DolibarrNotification=Automatic notification DolibarrNotification=Automatic notification
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing... ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...

View File

@ -186,4 +186,14 @@ AlwaysUseNewPrice=Always use current price of product/service
AlwaysUseFixedPrice=Use the fixed price AlwaysUseFixedPrice=Use the fixed price
PriceByQuantity=Price by quantity PriceByQuantity=Price by quantity
PriceByQuantityRange=Quantity range PriceByQuantityRange=Quantity range
ProductsDashboard=Products/Services summary ProductsDashboard=Products/Services summary
### composition fabrication
Building=Production and items dispatchment
Build=Produce
BuildIt=Produce & Dispatch
BuildindListInfo=Available quantity for production per warehouse (set it to 0 for no further action)
QtyNeed=Qty
UnitPmp=Net unit VWAP
CostPmpHT=Net total VWAP
ProductUsedForBuild=Auto consumed by production
ProductBuilded=Production completed

View File

@ -45,6 +45,8 @@ ErrorModuleRequireDolibarrVersion=Error, este módulo requiere una versión %s o
ErrorDecimalLargerThanAreForbidden=Error, las precisiones superiores a <b>%s</b> no están soportadas. ErrorDecimalLargerThanAreForbidden=Error, las precisiones superiores a <b>%s</b> no están soportadas.
DictionnarySetup=Diccionarios DictionnarySetup=Diccionarios
Dictionnary=Diccionarios Dictionnary=Diccionarios
ErrorReservedTypeSystemSystemAuto=El uso del tipo 'system' y 'systemauto' está reservado. Puede utilizar 'user' como valor para añadir su propio registro
ErrorCodeCantContainZero=El código no puede contener el valor 0
DisableJavascript=Desactivar las funciones Javascript DisableJavascript=Desactivar las funciones Javascript
ConfirmAjax=Utilizar los popups de confirmación Ajax ConfirmAjax=Utilizar los popups de confirmación Ajax
UseSearchToSelectCompany=Utilizar un formulario de búsqueda para buscar terceros (en vez de lista desplegable)<br><br>Tenga en cuenta que si tiene un gran número de productos o servicios (>100 000), puede mejorar el rendimiento mediante la constante SOCIETE_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. UseSearchToSelectCompany=Utilizar un formulario de búsqueda para buscar terceros (en vez de lista desplegable)<br><br>Tenga en cuenta que si tiene un gran número de productos o servicios (>100 000), puede mejorar el rendimiento mediante la constante SOCIETE_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena.
@ -290,7 +292,7 @@ ServerNotAvailableOnIPOrPort=Servidor no disponible en la dirección <b>%s</b> e
DoTestServerAvailability=Probar conectividad con el servidor DoTestServerAvailability=Probar conectividad con el servidor
DoTestSend=Probar envío DoTestSend=Probar envío
DoTestSendHTML=Probar envío HTML DoTestSendHTML=Probar envío HTML
ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, no se puede usar opción @ si la secuencia {yy}{mm} o {yyyy}{mm} no se encuentra en la máscara. ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, no se puede usar la opción @ si la secuencia {yy}{mm} o {yyyy}{mm} no se encuentra en la máscara.
UMask=Parámetro UMask de nuevos archivos en Unix/Linux/BSD. UMask=Parámetro UMask de nuevos archivos en Unix/Linux/BSD.
UMaskExplanation=Este parámetro determina los derechos de los archivos creados en el servidor Dolibarr (durante la subida, por ejemplo).<br>Este debe ser el valor octal (por ejemplo, 0666 significa lectura / escritura para todos).<br>Este parámetro no tiene ningún efecto sobre un servidor Windows. UMaskExplanation=Este parámetro determina los derechos de los archivos creados en el servidor Dolibarr (durante la subida, por ejemplo).<br>Este debe ser el valor octal (por ejemplo, 0666 significa lectura / escritura para todos).<br>Este parámetro no tiene ningún efecto sobre un servidor Windows.
SeeWikiForAllTeam=Vea el wiki para más detalles de todos los actores y de su organización SeeWikiForAllTeam=Vea el wiki para más detalles de todos los actores y de su organización
@ -357,7 +359,10 @@ ExtrafieldSelect=Lista de selección
ExtrafieldSeparator=Separador ExtrafieldSeparator=Separador
ExtrafieldCheckBox=Casilla de verificación ExtrafieldCheckBox=Casilla de verificación
ExtrafieldRadio=Botón de selección excluyente ExtrafieldRadio=Botón de selección excluyente
ExtrafieldParamHelp=La lista debe ser en forma llave,valor<br><br> por ejemplo : <br>1,texto1<br>2,texto2<br>3,texto3<br>... ExtrafieldParamHelpselect=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>...
ExtrafieldParamHelpcheckbox=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>...
ExtrafieldParamHelpradio=La llista ha de ser en forma clau, valor<br><br> per exemple : <br>1,text1<br>2,text2<br>3,text3<br>...
ExtrafieldParamHelpsellist=La llista ha de ser del table<br><br> per exemple : <br>table:label:(code)<br>
LibraryToBuildPDF=Librería usada para la creación de archivos PDF LibraryToBuildPDF=Librería usada para la creación de archivos PDF
WarningUsingFPDF=Atención: Su archivo <b>conf.php</b> contiene la directiva <b>dolibarr_pdf_force_fpdf=1</b>. Esto hace que se use la librería FPDF para generar sus archivos PDF. Esta librería es antigua y no cubre algunas funcionalidades (Unicode, transparencia de imágenes, idiomas cirílicos, árabes o asiáticos, etc.), por lo que puede tener problemas en la generación de los PDF.<br>Para resolverlo, y disponer de un soporte completo de PDF, puede descargar la <a href="http://www.tcpdf.org/" target="_blank">librería TCPDF</a> , y a continuación comentar o eliminar la línea <b>$dolibarr_pdf_force_fpdf=1</b>, y añadir en su lugar <b>$dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF'</b> WarningUsingFPDF=Atención: Su archivo <b>conf.php</b> contiene la directiva <b>dolibarr_pdf_force_fpdf=1</b>. Esto hace que se use la librería FPDF para generar sus archivos PDF. Esta librería es antigua y no cubre algunas funcionalidades (Unicode, transparencia de imágenes, idiomas cirílicos, árabes o asiáticos, etc.), por lo que puede tener problemas en la generación de los PDF.<br>Para resolverlo, y disponer de un soporte completo de PDF, puede descargar la <a href="http://www.tcpdf.org/" target="_blank">librería TCPDF</a> , y a continuación comentar o eliminar la línea <b>$dolibarr_pdf_force_fpdf=1</b>, y añadir en su lugar <b>$dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF'</b>
LocalTaxDesc=Algunos países aplican 2 o 3 tasas a cada línea de factura. Si es el caso, escoja el tipo de la segunda y tercera tasa y su valor. Los posibles tipos son:<br>1 : tasa local aplicable a productos y servicios sin IVA (IVA no se aplica en la tasa local)<br>2 : tasa local se aplica a productos y servicios antes del IVA (IVA se calcula sobre importe+tasa local)<br>3 : tasa local se aplica a productos sin IVA (IVA no se aplica en la tasa local)<br>4 : tasa local se aplica a productos antes del IVA (IVA se calcula sobre el importe+tasa local)<br>5 : tasa local se aplica a servicios sin IVA (IVA no se aplica a la tasa local)<br>6 : tasa local se aplica a servicios antes del IVA (IVA se calcula sobre importe + tasa local) LocalTaxDesc=Algunos países aplican 2 o 3 tasas a cada línea de factura. Si es el caso, escoja el tipo de la segunda y tercera tasa y su valor. Los posibles tipos son:<br>1 : tasa local aplicable a productos y servicios sin IVA (IVA no se aplica en la tasa local)<br>2 : tasa local se aplica a productos y servicios antes del IVA (IVA se calcula sobre importe+tasa local)<br>3 : tasa local se aplica a productos sin IVA (IVA no se aplica en la tasa local)<br>4 : tasa local se aplica a productos antes del IVA (IVA se calcula sobre el importe+tasa local)<br>5 : tasa local se aplica a servicios sin IVA (IVA no se aplica a la tasa local)<br>6 : tasa local se aplica a servicios antes del IVA (IVA se calcula sobre importe + tasa local)
@ -478,6 +483,8 @@ Module2900Name=GeoIPMaxmind
Module2900Desc=Capacidades de conversión GeoIP Maxmind Module2900Desc=Capacidades de conversión GeoIP Maxmind
Module5000Name=Multi-empresa Module5000Name=Multi-empresa
Module5000Desc=Permite gestionar varias empresas Module5000Desc=Permite gestionar varias empresas
Module6000Name=Workflow
Module6000Desc=Gestión de flujos de trabajo
Module20000Name=Días libres Module20000Name=Días libres
Module20000Desc=Gestión de los días libres de los empleados Module20000Desc=Gestión de los días libres de los empleados
Module50000Name=PayBox Module50000Name=PayBox
@ -541,6 +548,7 @@ Permission98=Desglosar líneas de facturas
Permission101=Consultar expediciones Permission101=Consultar expediciones
Permission102=Crear/modificar expediciones Permission102=Crear/modificar expediciones
Permission104=Validar expediciones Permission104=Validar expediciones
Permission106=Exportar expediciones
Permission109=Eliminar expediciones Permission109=Eliminar expediciones
Permission111=Consultar cuentas financieras (cuentas bancarias, cajas) Permission111=Consultar cuentas financieras (cuentas bancarias, cajas)
Permission112=Crear/modificar cantidad/eliminar registros bancarios Permission112=Crear/modificar cantidad/eliminar registros bancarios
@ -911,7 +919,7 @@ MAIN_ROUNDING_RULE_TOT=Tamaño rango para el redondeo (para algunos países que
UnitPriceOfProduct=Precio unitario sin IVA de un producto UnitPriceOfProduct=Precio unitario sin IVA de un producto
TotalPriceAfterRounding=Precio total después del redondeo TotalPriceAfterRounding=Precio total después del redondeo
ParameterActiveForNextInputOnly=Parámetro efectivo solamente a partir de las próximas sesiones ParameterActiveForNextInputOnly=Parámetro efectivo solamente a partir de las próximas sesiones
NoEventOrNoAuditSetup=No se han registrado eventos de seguridad. Esto puede ser normal si la auditoría no ha sido habilitado en la página "configuración->seguridad->auditoría". NoEventOrNoAuditSetup=No se han registrado eventos de seguridad. Esto puede ser normal si la auditoría no ha sido habilitada en la página "configuración->seguridad->auditoría".
NoEventFoundWithCriteria=No se han encontrado eventos de seguridad para tales criterios de búsqueda. NoEventFoundWithCriteria=No se han encontrado eventos de seguridad para tales criterios de búsqueda.
SeeLocalSendMailSetup=Ver la configuración local de sendmail SeeLocalSendMailSetup=Ver la configuración local de sendmail
BackupDesc=Para realizar una copia de seguridad completa de Dolibarr, usted debe: BackupDesc=Para realizar una copia de seguridad completa de Dolibarr, usted debe:

View File

@ -250,7 +250,7 @@ Deposit=Anticipo
Deposits=Anticipos Deposits=Anticipos
DiscountFromCreditNote=Descuento resultante del abono %s DiscountFromCreditNote=Descuento resultante del abono %s
DiscountFromDeposit=Pagos de la factura de anticipo %s DiscountFromDeposit=Pagos de la factura de anticipo %s
AbsoluteDiscountUse=Este tipo de crédito no puede ser utilizado en una factura antes de su validación AbsoluteDiscountUse=Este tipo de descuento no puede ser utilizado en una factura antes de su validación
CreditNoteDepositUse=La factura debe de estar validada para poder utilizar este tipo de créditos CreditNoteDepositUse=La factura debe de estar validada para poder utilizar este tipo de créditos
NewGlobalDiscount=Nuevo descuento fijo NewGlobalDiscount=Nuevo descuento fijo
NewRelativeDiscount=Nuevo descuento NewRelativeDiscount=Nuevo descuento

View File

@ -81,6 +81,7 @@ ActionAC_SHIP=Envío expedición por correo
ActionAC_SUP_ORD=Envío pedido a proveedor por correo ActionAC_SUP_ORD=Envío pedido a proveedor por correo
ActionAC_SUP_INV=Envío factura de proveedor por correo ActionAC_SUP_INV=Envío factura de proveedor por correo
ActionAC_OTH=Otra ActionAC_OTH=Otra
ActionAC_OTH_AUTO=Otra (eventos insertados automáticamente)
ActionAC_MANUAL=Eventos creados manualmente ActionAC_MANUAL=Eventos creados manualmente
ActionAC_AUTO=Eventos creados automáticamente ActionAC_AUTO=Eventos creados automáticamente
Stats=Estadísticas de venta Stats=Estadísticas de venta

View File

@ -1,4 +1,5 @@
# Dolibarr language file - es_ES - externalsite # Dolibarr language file - es_ES - externalsite
CHARSET=UTF-8 CHARSET=UTF-8
ExternalSiteSetup=Configuración del enlace al sitio web externo ExternalSiteSetup=Configuración del enlace al sitio web externo
ExternalSiteURL=URL del sitio externo ExternalSiteURL=URL del sitio externo
ExternalSiteModuleNotComplete=El módulo Sitio web externo no ha sido configurado correctamente.

View File

@ -132,4 +132,9 @@ NoCPforMonth=Sin vacaciones este mes.
Jours=días Jours=días
nbJours=Número de días nbJours=Número de días
TitleAdminCP=Configuración de las vacaciones TitleAdminCP=Configuración de las vacaciones
Permission20001=Leer / Crear / Modificar sus vacaciones Permission20001=Consultar/crear/modificar sus vacaciones
Permission20002=Consultar/modificar todas las solicitudes de permisos retribuídos
Permission20003=Eliminar las solicitudes de permisos retribuídos
Permission20004=Definir los permisos retribuídos de los usuarios
Permission20005=Consultar el historial de modificaciones de permisos retribuidos
Permission20006=Acceder al informe mensual de permisos retribuidos

View File

@ -151,6 +151,7 @@ EMailTextOrderApproved=Pedido %s aprobado
EMailTextOrderApprovedBy=Pedido %s aprobado por %s EMailTextOrderApprovedBy=Pedido %s aprobado por %s
EMailTextOrderRefused=Pedido %s rechazado EMailTextOrderRefused=Pedido %s rechazado
EMailTextOrderRefusedBy=Pedido %s rechazado por %s EMailTextOrderRefusedBy=Pedido %s rechazado por %s
EMailTextExpeditionValidated=El envío %s ha sido validado.
ImportedWithSet=Lote de importación (import key) ImportedWithSet=Lote de importación (import key)
DolibarrNotification=Notificación automática DolibarrNotification=Notificación automática
ResizeDesc=Introduzca el nuevo ancho <b>O</b> la nueva altura. La relación se conserva al cambiar el tamaño ... ResizeDesc=Introduzca el nuevo ancho <b>O</b> la nueva altura. La relación se conserva al cambiar el tamaño ...

View File

@ -45,6 +45,8 @@ ErrorModuleRequireDolibarrVersion= Erreur, ce module requiert une version %s ou
ErrorDecimalLargerThanAreForbidden= Erreur, les précisions supérieures à <b>%s</b> ne sont pas supportées. ErrorDecimalLargerThanAreForbidden= Erreur, les précisions supérieures à <b>%s</b> ne sont pas supportées.
DictionnarySetup= Dictionnaires DictionnarySetup= Dictionnaires
Dictionnary= Dictionnaires Dictionnary= Dictionnaires
ErrorReservedTypeSystemSystemAuto=
ErrorCodeCantContainZero=
DisableJavascript= Désactiver les fonctions Javascript et Ajax DisableJavascript= Désactiver les fonctions Javascript et Ajax
ConfirmAjax= Utiliser les popups de confirmation Ajax ConfirmAjax= Utiliser les popups de confirmation Ajax
UseSearchToSelectCompany= Utiliser un champ avec autocomplétion pour choisir un tiers (plutôt qu'une liste déroulante).<br><br>Notez que si vous avez un nombre important de tiers (> 100 000), vous pouvez améliorer les performances en définissant la constante SOCIETE_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaine. UseSearchToSelectCompany= Utiliser un champ avec autocomplétion pour choisir un tiers (plutôt qu'une liste déroulante).<br><br>Notez que si vous avez un nombre important de tiers (> 100 000), vous pouvez améliorer les performances en définissant la constante SOCIETE_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaine.
@ -357,7 +359,10 @@ ExtrafieldSelect = Liste de sélection
ExtrafieldSeparator = Séparateur de champ ExtrafieldSeparator = Séparateur de champ
ExtrafieldCheckBox=Case à cocher ExtrafieldCheckBox=Case à cocher
ExtrafieldRadio=Case d'option ExtrafieldRadio=Case d'option
ExtrafieldParamHelp=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>... ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
ExtrafieldParamHelpsellist=La liste vient d'une table<br><br> par exemple : <br>c_typent:libelle:id<br>
LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF
WarningUsingFPDF=Attention: Votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalitée (Unicode, transparence des images, langues cyrillic, arabes ou asiatiques...), aussi vous pouvez rencontrez des problèmes durant la génération des PDF.<br>Pour résoudre cela et avoir un support complet de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">librairie TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b> WarningUsingFPDF=Attention: Votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalitée (Unicode, transparence des images, langues cyrillic, arabes ou asiatiques...), aussi vous pouvez rencontrez des problèmes durant la génération des PDF.<br>Pour résoudre cela et avoir un support complet de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">librairie TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b>
LocalTaxDesc=Certains pays appliquent 2 voir 3 taux sur chaque ligne de facture. Si c'est le cas, choisissez le type du deuxième et troisième taux et sa valeur. Les types possibles sont:<br>1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)<br>3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)<br>4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)<br>5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale) LocalTaxDesc=Certains pays appliquent 2 voir 3 taux sur chaque ligne de facture. Si c'est le cas, choisissez le type du deuxième et troisième taux et sa valeur. Les types possibles sont:<br>1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)<br>3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)<br>4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)<br>5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale)
@ -542,6 +547,7 @@ Permission98= Ventiler les lignes de factures
Permission101= Consulter les expéditions Permission101= Consulter les expéditions
Permission102= Créer/modifier les expéditions Permission102= Créer/modifier les expéditions
Permission104= Valider les expéditions Permission104= Valider les expéditions
Permission106= Exporter les expéditions
Permission109= Supprimer les expéditions Permission109= Supprimer les expéditions
Permission111= Consulter les comptes financiers (comptes bancaires, caisses) Permission111= Consulter les comptes financiers (comptes bancaires, caisses)
Permission112= Créer/modifier montant/supprimer écritures bancaires Permission112= Créer/modifier montant/supprimer écritures bancaires

View File

@ -32,7 +32,7 @@ ViewCal=Vue mois
ViewDay=Vue jour ViewDay=Vue jour
ViewWeek=Vue semaine ViewWeek=Vue semaine
ViewWithPredefinedFilters=Vues avec filtres prédéfinis ViewWithPredefinedFilters=Vues avec filtres prédéfinis
AutoActions=Alimentation automatique de l'agenda AutoActions=Alimentation automatique
AgendaAutoActionDesc=Définissez dans cet onglet les événements pour lesquels dolibarr créera automatiquement une action dans l'agenda. Si aucune case n'est cochée (par défaut), seules les actions manuelles seront incluses dans l'agenda. AgendaAutoActionDesc=Définissez dans cet onglet les événements pour lesquels dolibarr créera automatiquement une action dans l'agenda. Si aucune case n'est cochée (par défaut), seules les actions manuelles seront incluses dans l'agenda.
AgendaSetupOtherDesc=Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (thunderbird, google calendar, ...) AgendaSetupOtherDesc=Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (thunderbird, google calendar, ...)
AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr. AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr.

View File

@ -81,6 +81,7 @@ ActionAC_SHIP=Envoi bon d'expédition par mail
ActionAC_SUP_ORD=Envoi commande fournisseur par mail ActionAC_SUP_ORD=Envoi commande fournisseur par mail
ActionAC_SUP_INV=Envoi facture fournisseur par mail ActionAC_SUP_INV=Envoi facture fournisseur par mail
ActionAC_OTH=Autre ActionAC_OTH=Autre
ActionAC_OTH_AUTO=Autre (evênements insérés automatiquement)
ActionAC_MANUAL=Evênements insérés manuellement ActionAC_MANUAL=Evênements insérés manuellement
ActionAC_AUTO=Evênements insérés automatiquement ActionAC_AUTO=Evênements insérés automatiquement
Stats=Statistiques de vente Stats=Statistiques de vente

View File

@ -163,4 +163,5 @@ Pcg_type=Classe de compte
Pcg_subtype=Sous classe de compte Pcg_subtype=Sous classe de compte
InvoiceLinesToDispatch=Lignes de factures à ventiler InvoiceLinesToDispatch=Lignes de factures à ventiler
InvoiceDispatched=Factures ventilées InvoiceDispatched=Factures ventilées
AccountancyDashboard=Synthèse compta/tréso AccountancyDashboard=Synthèse compta/tréso
ByProductsAndServices=Par produits et services

View File

@ -137,4 +137,5 @@ WarningLockFileDoesNotExists=Attention, une fois l'installation terminée, les o
WarningUntilDirRemoved=Les alertes de sécurité sont visibles par les administrateurs uniquement et resteront actives tant que la vulnérabilité sera avérée (ou que la constante MAIN_REMOVE_INSTALL_WARNING aura été définie dans Configuration->Divers) WarningUntilDirRemoved=Les alertes de sécurité sont visibles par les administrateurs uniquement et resteront actives tant que la vulnérabilité sera avérée (ou que la constante MAIN_REMOVE_INSTALL_WARNING aura été définie dans Configuration->Divers)
WarningCloseAlways=Attention, la fermeture se fait même lorsque le montant diffère. N'activez cette fonctionnalité qu'en connaissance de cause. WarningCloseAlways=Attention, la fermeture se fait même lorsque le montant diffère. N'activez cette fonctionnalité qu'en connaissance de cause.
WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boite provoque de sérieux ralentissement des pages affichant cette boite. WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boite provoque de sérieux ralentissement des pages affichant cette boite.
WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur) WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur)
WarningNotRelevant=Opération non pertinente pour cet ensemble de données

View File

@ -1,4 +1,5 @@
# Dolibarr language file - fr_FR - externalsite # Dolibarr language file - fr_FR - externalsite
CHARSET=UTF-8 CHARSET=UTF-8
ExternalSiteSetup=Configuration du lien vers le site externe ExternalSiteSetup=Configuration du lien vers le site externe
ExternalSiteURL=URL du site externe ExternalSiteURL=URL du site externe
ExternalSiteModuleNotComplete=

View File

@ -130,4 +130,9 @@ NoCPforMonth=Aucun congé ce mois-ci.
Jours=jours Jours=jours
nbJours=Nombre jours nbJours=Nombre jours
TitleAdminCP=Configuration des Congés TitleAdminCP=Configuration des Congés
Permission20001=Lire / Créer / modifier ses congés Permission20001=Lire / Créer / modifier ses congès
Permission20002=Lire / Modifier toutes les demandes de congés payés
Permission20003=Supprimer des demandes de congés payés
Permission20004=Définir les congés payés des utilisateurs
Permission20005=Voir les logs de modification des congés payés
Permission20006=Accéder au rapport mensuel des congés payés

View File

@ -3,9 +3,9 @@ CHARSET=UTF-8
DIRECTION=ltr DIRECTION=ltr
SeparatorDecimal=, SeparatorDecimal=,
SeparatorThousand= SeparatorThousand=
FormatDateShort=%d/%m/%y FormatDateShort=%d/%m/%Y
FormatDateShortInput=%d/%m/%Y FormatDateShortInput=%d/%m/%Y
FormatDateShortJava=dd/MM/yy FormatDateShortJava=dd/MM/yyyy
FormatDateShortJavaInput=dd/MM/yyyy FormatDateShortJavaInput=dd/MM/yyyy
FormatDateShortJQuery=dd/mm/yy FormatDateShortJQuery=dd/mm/yy
FormatDateShortJQueryInput=dd/mm/yy FormatDateShortJQueryInput=dd/mm/yy

View File

@ -151,6 +151,7 @@ EMailTextOrderApproved=La commande %s a été approuvée.
EMailTextOrderApprovedBy=La commande %s a été approuvée par %s. EMailTextOrderApprovedBy=La commande %s a été approuvée par %s.
EMailTextOrderRefused=La commande %s a été refusée. EMailTextOrderRefused=La commande %s a été refusée.
EMailTextOrderRefusedBy=La commande %s a été refusée par %s. EMailTextOrderRefusedBy=La commande %s a été refusée par %s.
EMailTextExpeditionValidated=
ImportedWithSet=Lot d'importation (Import key) ImportedWithSet=Lot d'importation (Import key)
DolibarrNotification=Notification automatique DolibarrNotification=Notification automatique
ResizeDesc=Entrer la nouvelle largeur <b>OU</b> la nouvelle hauteur. Le ratio est conservé lors du redimensionnement... ResizeDesc=Entrer la nouvelle largeur <b>OU</b> la nouvelle hauteur. Le ratio est conservé lors du redimensionnement...

View File

@ -186,4 +186,12 @@ AlwaysUseNewPrice=Toujours utiliser le prix du jour
AlwaysUseFixedPrice=Utiliser le prix fixé AlwaysUseFixedPrice=Utiliser le prix fixé
PriceByQuantity=Prix par quantité PriceByQuantity=Prix par quantité
PriceByQuantityRange=Grille de quantités PriceByQuantityRange=Grille de quantités
ProductsDashboard=Synthèse produits/services ProductsDashboard=Synthèse produits/services
### composition fabrication
Building=Fabrication
Build=Fabriquer
BuildIt=Lancer la fabrication
BuildindListInfo=Nombre de produit fabricable par entrepot, si saisie à zéro on ne fabrique pas
QtyNeed=Affectée
UnitPmp=Prix Achat Unitaire
CostPmpHT=Cout à l'achat HT

View File

@ -1797,8 +1797,16 @@ class Product extends CommonObject
*/ */
function add_sousproduit($id_pere, $id_fils,$qty) function add_sousproduit($id_pere, $id_fils,$qty)
{ {
$sql = 'DELETE from '.MAIN_DB_PREFIX.'product_association'; // Clean parameters
$sql .= ' WHERE fk_product_pere = "'.$id_pere.'" AND fk_product_fils = "'.$id_fils.'"'; if (! is_numeric($id_pere)) $id_pere=0;
if (! is_numeric($id_fils)) $id_fils=0;
$result=$this->del_sousproduit($id_pere, $id_fils);
if ($result < 0) return $result;
// Check not already father of id_pere (to avoid father -> child -> father links)
$sql = 'SELECT fk_product_pere from '.MAIN_DB_PREFIX.'product_association';
$sql .= ' WHERE fk_product_pere = '.$id_fils.' AND fk_product_fils = '.$id_pere;
if (! $this->db->query($sql)) if (! $this->db->query($sql))
{ {
dol_print_error($this->db); dol_print_error($this->db);
@ -1806,37 +1814,27 @@ class Product extends CommonObject
} }
else else
{ {
$sql = 'SELECT fk_product_pere from '.MAIN_DB_PREFIX.'product_association'; $result = $this->db->query($sql);
$sql .= ' WHERE fk_product_pere = "'.$id_fils.'" AND fk_product_fils = "'.$id_pere.'"'; if ($result)
if (! $this->db->query($sql))
{ {
dol_print_error($this->db); $num = $this->db->num_rows($result);
return -1; if($num > 0)
}
else
{
$result = $this->db->query($sql);
if ($result)
{ {
$num = $this->db->num_rows($result); $this->error="isFatherOfThis";
if($num > 0) return -1;
}
else
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_association(fk_product_pere,fk_product_fils,qty)';
$sql .= ' VALUES ('.$id_pere.', '.$id_fils.', '.$qty.')';
if (! $this->db->query($sql))
{ {
$this->error="isFatherOfThis"; dol_print_error($this->db);
return -1; return -1;
} }
else else
{ {
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_association(fk_product_pere,fk_product_fils,qty)'; return 1;
$sql .= ' VALUES ("'.$id_pere.'","'.$id_fils.'","'.$qty.'")';
if (! $this->db->query($sql))
{
dol_print_error($this->db);
return -1;
}
else
{
return 1;
}
} }
} }
} }
@ -1848,14 +1846,18 @@ class Product extends CommonObject
* *
* @param int $fk_parent Id du produit auquel ne sera plus lie le produit lie * @param int $fk_parent Id du produit auquel ne sera plus lie le produit lie
* @param int $fk_child Id du produit a ne plus lie * @param int $fk_child Id du produit a ne plus lie
* @return int < 0 si erreur, > 0 si ok * @return int < 0 if KO, > 0 if OK
*/ */
function del_sousproduit($fk_parent, $fk_child) function del_sousproduit($fk_parent, $fk_child)
{ {
if (! is_numeric($fk_parent)) $fk_parent=0;
if (! is_numeric($fk_child)) $fk_child=0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association";
$sql.= " WHERE fk_product_pere = '".$fk_parent."'"; $sql.= " WHERE fk_product_pere = ".$fk_parent;
$sql.= " AND fk_product_fils = '".$fk_child."'"; $sql.= " AND fk_product_fils = ".$fk_child;
dol_syslog(get_class($this).'::del_sousproduit sql='.$sql);
if (! $this->db->query($sql)) if (! $this->db->query($sql))
{ {
dol_print_error($this->db); dol_print_error($this->db);
@ -2413,6 +2415,10 @@ class Product extends CommonObject
$lien = '<a href="'.DOL_URL_ROOT.'/product/composition/fiche.php?id='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/product/composition/fiche.php?id='.$this->id.'">';
$lienfin='</a>'; $lienfin='</a>';
} }
else if ($option == 'category')
{
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=0">';
}
else else
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$this->id.'">';

View File

@ -72,8 +72,8 @@ $cancel <> $langs->trans("Cancel") &&
$error=0; $error=0;
for($i=0;$i<$_POST["max_prod"];$i++) for($i=0;$i<$_POST["max_prod"];$i++)
{ {
// print "<br> : ".$_POST["prod_id_chk".$i]; print "<br> : ".$_POST["prod_id_chk".$i];
if($_POST["prod_id_chk".$i] != "") if ($_POST["prod_id_chk".$i] > 0)
{ {
if($product->add_sousproduit($id, $_POST["prod_id_".$i],$_POST["prod_qty_".$i]) > 0) if($product->add_sousproduit($id, $_POST["prod_id_".$i],$_POST["prod_qty_".$i]) > 0)
{ {

View File

@ -1455,6 +1455,15 @@ class Societe extends CommonObject
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id; $lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id;
} }
else if ($option == 'category')
{
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=2';
}
else if ($option == 'category_supplier')
{
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=1';
}
// By default // By default
if (empty($lien)) if (empty($lien))
{ {
@ -1462,7 +1471,7 @@ class Societe extends CommonObject
} }
// Add type of canvas // Add type of canvas
$lien.=(!empty($this->canvas)?'&amp;canvas='.$this->canvas:'').'">'; $lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
$lienfin='</a>'; $lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin); if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);

View File

@ -22,10 +22,10 @@
* \ingroup core * \ingroup core
*/ */
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
$theme_bordercolor = array(235,235,224); $theme_bordercolor = array(235,235,224);
$theme_datacolor = array(array(125,135,150), array(200,160,180), array(190,190,220), array(170,140,190), array(190,190,170)); $theme_datacolor = array(array(190,190,220), array(200,160,180), array(125,135,150), array(170,140,190), array(190,190,170));
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
?> ?>

View File

@ -21,25 +21,28 @@
/** /**
* \file htdocs/theme/amarok/style.css.php * \file htdocs/theme/amarok/style.css.php
* \brief Fichier de style CSS du theme amarok * \brief File for CSS style sheet Amarok
*/ */
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
if (! defined('NOLOGIN')) define('NOLOGIN',1); if (! defined('NOLOGIN')) define('NOLOGIN',1); // File must be accessed by logon page so without login
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
session_cache_limiter(FALSE); session_cache_limiter(FALSE);
require_once("../../main.inc.php"); require_once '../../main.inc.php';
// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSION['dol_login']);
// Define css type // Define css type
header('Content-type: text/css'); header('Content-type: text/css');
@ -69,12 +72,55 @@ $fontlist='helvetica,arial,tahoma,verdana'; //$fontlist='Verdana,Helvetica,Ar
$img_liste_titre=dol_buildpath($path.'/theme/'.$theme.'/img/menus/trtitle.png',1); $img_liste_titre=dol_buildpath($path.'/theme/'.$theme.'/img/menus/trtitle.png',1);
$img_head=dol_buildpath($path.'/theme/'.$theme.'/img/headbg2.jpg',1); $img_head=dol_buildpath($path.'/theme/'.$theme.'/img/headbg2.jpg',1);
$img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1); $img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1);
$dol_hide_topmenu=$conf->dol_hide_topmenu;
$dol_hide_leftmenu=$conf->dol_hide_leftmenu;
$dol_optimize_smallscreen=$conf->dol_optimize_smallscreen;
$dol_no_mouse_hover=$conf->dol_no_mouse_hover;
$dol_use_jmobile=$conf->dol_use_jmobile;
// Define reference colors
// Example: Light grey: $colred=235;$colgreen=235;$colblue=235;
// Example: Pink: $colred=230;$colgreen=210;$colblue=230;
// Example: Green: $colred=210;$colgreen=230;$colblue=210;
// Example: Ocean: $colred=220;$colgreen=220;$colblue=240;
//$conf->global->THEME_ELDY_ENABLE_PERSONALIZED=0;
//$user->conf->THEME_ELDY_ENABLE_PERSONALIZED=0;
//var_dump($user->conf->THEME_ELDY_RGB);
$colred =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_RGB)?235:hexdec(substr($conf->global->THEME_ELDY_RGB,0,2))):(empty($user->conf->THEME_ELDY_RGB)?235:hexdec(substr($user->conf->THEME_ELDY_RGB,0,2)));
$colgreen=empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_RGB)?235:hexdec(substr($conf->global->THEME_ELDY_RGB,2,2))):(empty($user->conf->THEME_ELDY_RGB)?235:hexdec(substr($user->conf->THEME_ELDY_RGB,2,2)));
$colblue =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_RGB)?235:hexdec(substr($conf->global->THEME_ELDY_RGB,4,2))):(empty($user->conf->THEME_ELDY_RGB)?235:hexdec(substr($user->conf->THEME_ELDY_RGB,4,2)));
// Colors
$isred=max(0,(2*$colred-$colgreen-$colblue)/2); // 0 - 255
$isgreen=max(0,(2*$colgreen-$colred-$colblue)/2); // 0 - 255
$isblue=max(0,(2*$colblue-$colred-$colgreen)/2); // 0 - 255
$colorback1=($colred-3).','.($colgreen-3).','.($colblue-3); // topmenu
$colorback2=($colred+5).','.($colgreen+5).','.($colblue+5);
$colorbacktab1=($colred+15).','.($colgreen+16).','.($colblue+17); // vmenu
$colorbacktab1b=($colred+5).','.($colgreen+6).','.($colblue+7); // vmenu (not menu)
$colorbacktab2=($colred-15).','.($colgreen-15).','.($colblue-15);
$colorbacktitle1=($colred-5).','.($colgreen-5).','.($colblue-5); // title of array
$colorbacktitle2=($colred-15).','.($colgreen-15).','.($colblue-15);
$colorbacktabcard1=($colred+15).','.($colgreen+16).','.($colblue+17); // card
$colorbacktabcard2=($colred-15).','.($colgreen-15).','.($colblue-15);
$colorbacktabactive=($colred-15).','.($colgreen-15).','.($colblue-15);
$colorbacklineimpair1=(244+round($isred/3)).','.(244+round($isgreen/3)).','.(244+round($isblue/3)); // line impair
$colorbacklineimpair2=(250+round($isred/3)).','.(250+round($isgreen/3)).','.(250+round($isblue/3)); // line impair
$colorbacklineimpairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)); // line impair
$colorbacklinepair1='255,255,255'; // line pair
$colorbacklinepair2='255,255,255'; // line pair
$colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9));
$colorbackbody='#f5f5f5';
$colortext='40,40,40';
$fontsize=empty($conf->dol_optimize_smallscreen)?'12':'14';
$fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'14';
?> ?>
/* ============================================================================== */ /* ============================================================================== */
/* Styles par défaut */ /* Default styles */
/* ============================================================================== */ /* ============================================================================== */
*, html { *, html {
@ -84,31 +130,17 @@ font-size:100%;
} }
body { body {
background-color:#f5f5f5; <?php if (GETPOST("optioncss") == 'print' || ! empty($conf->dol_optimize_smallscreen)) { ?>
<?php if ($_SESSION['dol_login'] != '') {?> background-color: #FFFFFF;
<?php if (GETPOST("optioncss") != 'print') {?> <?php } else { ?>
background-image:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/vmenu.png',1); ?>); background-color: <?php print $colorbackbody; ?>;
background-repeat:repeat-y; <?php } ?>
margin:0px;
<?php } ?>
<?php } else {?>
background-image:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/background_login.png',1); ?>);
margin:100px;
<?php } ?>
color:#232323; color:#232323;
font-size:<?php print $fontsize ?>px; font-size:<?php print $fontsize ?>px;
font-family:<?php print $fontlist ?>; font-family:<?php print $fontlist ?>;
<?php print 'direction:'.$langs->trans("DIRECTION").";\n"; ?> <?php print 'direction:'.$langs->trans("DIRECTION").";\n"; ?>
} }
.checkVatPopup {
background-color:#f5f5f5;
background-image:none;
margin:10px;
line-height:16px;
}
a { a {
font-family:<?php print $fontlist ?>; font-family:<?php print $fontlist ?>;
font-weight:bold; font-weight:bold;
@ -194,6 +226,15 @@ div.inline-block
display:inline-block; display:inline-block;
} }
th .button {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-moz-border-radius:0px !important;
-webkit-border-radius:0px !important;
border-radius:0px !important;
}
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
} }
@ -211,11 +252,102 @@ div.inline-block
} }
.blockvmenubookmarks .menu_contenu {
background-color: transparent;
}
/* ! Message d'erreur lors du login : */
center .error { padding:8px !important; padding-left:26px !important; padding-right:20px; width:inherit; max-width:450px;color:#552323 !important; font-size:14px; border-radius:8px; text-align: left;}
/* ============================================================================== */ /* ============================================================================== */
/* Login */ /* Styles to hide objects */
/* ============================================================================== */ /* ============================================================================== */
body.body center{color:white;} .hideobject { display:none; }
<?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
<?php } ?>
.linkobject { cursor:pointer; }
/* ============================================================================== */
/* Styles for dragging lines */
/* ============================================================================== */
.dragClass {
color: #333333;
}
td.showDragHandle {
cursor: move;
}
.tdlineupdown {
white-space: nowrap;
}
/* ============================================================================== */
/* Menu top et 1ere ligne tableau */
/* ============================================================================== */
div.tmenu {
<?php if (GETPOST("optioncss") == 'print') {?>
display:none;
<?php } else {?>
position:relative;
display:block;
margin:0;
padding:0;
padding-left:1em;
top:0;
left:0;
right:0;
white-space:nowrap;
height:36px;
<?php if ($conf->browser->name != 'ie') echo "line-height:36px; /* disabled for ie9 */ \n"; ?>
background:#333333;
background-image:linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, rgba(255,255,255,.3)),
color-stop(1, rgba(0,0,0,.3))
);
border-bottom:solid 1px rgba(0,0,0,.8);
box-shadow:0 0 6px rgba(0,0,0,.4) !important;
z-index:100;
<?php } ?>
}
div.tmenu a {
font-weight:normal;
}
div.tmenu li {
display:inline-table;
margin-right:1em;
text-transform:uppercase;
}
div.tmenu li a {color:#cccccc;}
div.tmenu li a:hover { color:rgba(255,255,255,1);}
div.tmenu ul li a.tmenusel {/* texte du menu principal sélectionné */
color:#ffffff;
font-weight:bold;
}
.tmenudisabled { color:#808080 !important; cursor: not-allowed; }
/* Login */
form#login { form#login {
display:block; display:block;
@ -329,96 +461,6 @@ table.login_table .vmenu {
font-size:120%; font-size:120%;
} }
.blockvmenubookmarks .menu_contenu {
background-color: transparent;
}
/* ! Message d'erreur lors du login : */
center .error { padding:8px !important; padding-left:26px !important; padding-right:20px; width:inherit; max-width:450px;color:#552323 !important; font-size:14px; border-radius:8px; text-align: left;}
/* ============================================================================== */
/* Styles to hide objects */
/* ============================================================================== */
.hideobject { display:none; }
<?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
<?php } ?>
.linkobject { cursor:pointer; }
/* For dragging lines */
.dragClass {color:#333333;}
td.showDragHandle {cursor:move;}
.tdlineupdown {white-space:nowrap;}
/* ============================================================================== */
/* Menu top et 1ère ligne tableau */
/* ============================================================================== */
div.tmenu {
<?php if (GETPOST("optioncss") == 'print') {?>
display:none;
<?php } else {?>
position:relative;
display:block;
margin:0;
padding:0;
padding-left:1em;
top:0;
left:0;
right:0;
white-space:nowrap;
height:36px;
<?php if ($conf->browser->name != 'ie') echo "line-height:36px; /* disabled for ie9 */ \n"; ?>
background:#333333;
background-image:linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image:-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, rgba(255,255,255,.3)),
color-stop(1, rgba(0,0,0,.3))
);
border-bottom:solid 1px rgba(0,0,0,.8);
box-shadow:0 0 6px rgba(0,0,0,.4) !important;
z-index:100;
<?php } ?>
}
div.tmenu a {
font-weight:normal;
}
div.tmenu li {
display:inline-table;
margin-right:1em;
text-transform:uppercase;
}
div.tmenu li a {color:#cccccc;}
div.tmenu li a:hover {color:rgba(255,255,255,.2);}
div.tmenu ul li a.tmenusel {/* texte du menu principal sélectionné */
color:#ffffff;
font-weight:bold;
}
.tmenudisabled { color:#808080 !important; cursor: not-allowed; }
/* --- end nav --- */
/* Login */
div.login_block { div.login_block {
position:absolute; position:absolute;
top:5px; top:5px;
@ -438,16 +480,16 @@ div.login_block table {
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding:8px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin:0px 0px 0px 8px; margin:0px 0px 0px 8px;
font-weight:bold; font-weight:bold;
} }
img.login, img.printer, img.entity { img.login, img.printer, img.entity {
padding:8px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin:0px 0px 0px 8px; margin:0px 0px 0px 8px;
text-decoration:none; text-decoration:none;
color:#ffffff; color: white;
font-weight:bold; font-weight:bold;
} }
@ -461,6 +503,9 @@ div.vmenu {
display:none; display:none;
<?php } else {?> <?php } else {?>
width:170px; width:170px;
-moz-box-shadow: 4px 4px 4px #CCC;
-webkit-box-shadow: 4px 4px 4px #CCC;
box-shadow: 4px 4px 4px #CCC;
<?php } ?> <?php } ?>
} }
@ -773,8 +818,11 @@ div.tabs {
div.tabBar { div.tabBar {
background-color:#ffffff; background-color:#ffffff;
padding:6px; padding:6px;
margin:3px 0px 5px; margin:3px 0px 14px 0px;
border:1px solid #bbbbbb; border:1px solid #bbbbbb;
-moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD;
} }
div.tabBar table.notopnoleftnoright { div.tabBar table.notopnoleftnoright {
@ -1066,7 +1114,7 @@ table.liste {
table.liste td {padding:1px 2px 1px 0px;} table.liste td {padding:1px 2px 1px 0px;}
tr.liste_titre, tr.box_titre { div.liste_titre, tr.liste_titre, tr.box_titre {
padding:4px; padding:4px;
background-color:rgba(0,0,0,.2); background-color:rgba(0,0,0,.2);
background-image:linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%); background-image:linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
@ -1116,13 +1164,13 @@ tr.impair td, tr.pair td {padding:1px 1px 1px 2px;}
tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td {padding:1px 0px;} tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td {padding:1px 0px;}
.impair { .impair {
background:#f4f4f4; background:#fdfdfd;
font-family:<?php print $fontlist ?>; font-family:<?php print $fontlist ?>;
border:0px; border:0px;
} }
.pair { .pair {
background:#eaeaea; background:#f4f4f4;
font-family:<?php print $fontlist ?>; font-family:<?php print $fontlist ?>;
border:0px; border:0px;
} }
@ -1147,12 +1195,12 @@ tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td {paddin
} }
tr.box_impair { tr.box_impair {
background:#f4f4f4; background:#fdfdfd;
font-family:<?php print $fontlist ?>; font-family:<?php print $fontlist ?>;
} }
tr.box_pair { tr.box_pair {
background:#eaeaea; background:#f4f4f4;
font-family:<?php print $fontlist ?>; font-family:<?php print $fontlist ?>;
} }
@ -1423,7 +1471,7 @@ td.dpHead {
/* Jour courant */ /* Jour courant */
.dpSelected { .dpSelected {
background-color:#a61111; background-color:#0B63A2;
color:#ffffff; color:#ffffff;
font-weight:bold; font-weight:bold;
} }
@ -1468,7 +1516,7 @@ td.dpHead {
padding:0px 2px; padding:0px 2px;
font-size:9px; font-size:9px;
border-width:0px; border-width:0px;
color:#a61111; color:#0B63A2;
vertical-align:middle; vertical-align:middle;
cursor:pointer; cursor:pointer;
} }
@ -1499,17 +1547,9 @@ table.cal_month { border-spacing: 0px; }
.cal_current_month_right { border-right: solid 1px #E0E0E0; } .cal_current_month_right { border-right: solid 1px #E0E0E0; }
.cal_other_month_right { border-right: solid 1px #C0C0C0; } .cal_other_month_right { border-right: solid 1px #C0C0C0; }
.cal_other_month { .cal_other_month { opacity: 0.6; background: #EAEAEA; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
background:#dddddd; .cal_past_month { opacity: 0.6; background: #EEEEEE; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
} .cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
.cal_past_month {
background:#eeeeee;
}
.cal_current_month {
background:#ffffff;
}
.cal_today { .cal_today {
background:#ffffff; background:#ffffff;
@ -1518,37 +1558,19 @@ table.cal_month { border-spacing: 0px; }
div.dayevent table.nobordernopadding tr td {padding:1px;} div.dayevent table.nobordernopadding tr td {padding:1px;}
table.cal_event { table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px;
border-collapse:collapse; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
margin-bottom:1px; moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
} box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d));
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -webkit-padding-start: 0px; -webkit-padding-start: 0px; } }
table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -moz-padding-start: 0px; -webkit-padding-start: 0px; }
li.cal_event { border: none; list-style-type: none; } li.cal_event { border: none; list-style-type: none; }
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
.cal_event a:link { .cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; }
color:#232323; .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; }
font-size:11px; .cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); }
font-weight:normal !important;
}
.cal_event a:visited {
color:#232323;
font-size:11px;
font-weight:normal !important;
}
.cal_event a:active {
color:#232323;
font-size:11px;
font-weight:normal !important;
}
.cal_event a:hover {
color:rgba(255,255,255,.75);
font-size:11px;
font-weight:normal !important;
}
/* ============================================================================== */ /* ============================================================================== */

View File

@ -58,6 +58,8 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on
$langs->load("main",0,1); $langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$fontsize=empty($conf->dol_optimize_smallscreen)?'12':'12';
$fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'11';
$path=''; // This value may be used in future for external module to overwrite theme $path=''; // This value may be used in future for external module to overwrite theme
$theme='eldy'; // Value of theme $theme='eldy'; // Value of theme
@ -198,7 +200,7 @@ if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
?> ?>
/* ============================================================================== */ /* ============================================================================== */
/* Styles par defaut */ /* Default styles */
/* ============================================================================== */ /* ============================================================================== */
body { body {
@ -304,8 +306,8 @@ input[type=image] { background-color: transparent; border: none; box-shadow: non
box-shadow: 4px 4px 4px #CCC; box-shadow: 4px 4px 4px #CCC;
} }
form { form {
padding: 0em 0em 0em 0em; padding:0px;
margin: 0em 0em 0em 0em; margin:0px;
} }
div.float div.float
{ {
@ -852,9 +854,9 @@ td.vmenu {
.vmenu { .vmenu {
margin-left: 4px; margin-left: 4px;
<?php if (GETPOST("optioncss") == 'print') { ?> <?php if (GETPOST("optioncss") == 'print') { ?>
display: none; display: none;
<?php } ?> <?php } ?>
} }
.menu_contenu { padding-top: 1px; } .menu_contenu { padding-top: 1px; }
@ -1317,11 +1319,14 @@ div.tabsAction {
a.tabTitle { a.tabTitle {
background: #657090; /* background: #657090;
color: white; color: white;*/
color:rgba(0,0,0,.5);
margin-right:10px;
text-shadow:1px 1px 1px #ffffff;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
font-weight: normal; font-weight: normal;
padding: 0px 6px 2px 6px; padding: 5px 6px 2px 6px;
margin: 0px 6px; margin: 0px 6px;
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;
@ -1329,7 +1334,7 @@ a.tabTitle {
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
padding: 2px 6px 2px 6px; padding: 5px 6px 2px 6px;
margin: 0em 0.2em; margin: 0em 0.2em;
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;
@ -1364,6 +1369,7 @@ a.tab#active {
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active a.tab:link, a.tab:visited, a.tab:hover, a.tab#active
{ {
color: #<?php echo $colortextmain; ?>; color: #<?php echo $colortextmain; ?>;
font-weight: normal !important;
} }
a.tabimage { a.tabimage {