Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3fdc57cc56
72
ChangeLog
72
ChangeLog
@ -4,6 +4,7 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 3.4 compared to 3.3.2 *****
|
||||
For users:
|
||||
- New: Can use ODS templates as document templates.
|
||||
- New: Add link to autofill/reset with quantity to ship when creating a
|
||||
delivery receipt.
|
||||
- New: Event into calendar use different colors for different users.
|
||||
@ -11,45 +12,48 @@ For users:
|
||||
- New: Add a tab "consumption" on thirdparties to list products bought/sells.
|
||||
- New: Some performance enhancements.
|
||||
- New: Can attach files onto trip and expenses modules.
|
||||
- New: Add option MAIN_PDF_TITLE_BACKGROUND_COLOR.
|
||||
- New: Add hidden option MAIN_PDF_TITLE_BACKGROUND_COLOR.
|
||||
- New: Merge tab customer and prospect.
|
||||
- New: Add ES formated address country rule.
|
||||
- New: Can define a hierarchical responsible on user.
|
||||
- New: Add a hierarchical view for users.
|
||||
- New: Can define a hierarchical responsible on user and add a tree view to
|
||||
see hierarchy of users.
|
||||
- New: Can expand/collapse menus, categories and users list.
|
||||
- New: extra parameters are supported into ODT templates.
|
||||
- New: total per vat rate are available as tags for ODT templates.
|
||||
- New: Add more types for extra parameters (lists, phone, emails, checkbox, prices).
|
||||
- New: extra parameters are supported into ODT/ODS templates.
|
||||
- New: total per vat rate are available as tags for ODT/ODS templates.
|
||||
- New: Some part of interface use more CSS3 (ie: agenda)
|
||||
- New: [ task #707 ] Create option ProfIdx are mandatory to validate a invoice.
|
||||
- New: [ task #707 ] Create option "ProfIdx is mandatory to validate a invoice".
|
||||
- New: Can define if we want to use VAT or not for subscriptions (foundation module).
|
||||
- New: Can define a default choice for choice "More action when recording
|
||||
a subscription" (foundation module).
|
||||
- New: Add link to check professional id for india.
|
||||
- New: Can define a default choice for "More action when recording a
|
||||
subscription" (foundation module).
|
||||
- New: Add link to check professional id for India.
|
||||
- New: [ task #731 ] Uniformize ref generation
|
||||
- New: [ task #748 ] Add a link "Dolibarr" into left menu
|
||||
- New: Script email_unpaid_invoices_to_representative accepts now a parameter test
|
||||
and a delay.
|
||||
- New: Can define a different clicktodial setup per user.
|
||||
- New: Add option INVOICE_CAN_NEVER_BE_REMOVED.
|
||||
- New: Enhance agenda module to reach RFC2445 (add busy information).
|
||||
- New: Script email_unpaid_invoices_to_representative accepts now a parameter "test"
|
||||
and a "late delay".
|
||||
- New: Can define different clicktodial setups for each user.
|
||||
- New: Add hidden option INVOICE_CAN_NEVER_BE_REMOVED.
|
||||
- New: Enhance agenda module to reach RFC2445 ("type" not enabled by default and add
|
||||
"busy" information).
|
||||
- New: Add module Opensurvey.
|
||||
- New: Default aprrover for holidays i sby default hierchical parent.
|
||||
- New: Default approver for holidays is set by default to hierchical parent.
|
||||
- First change to prepare feature "click to print" (IPP) for PDF.
|
||||
- New: [ task #350 ] Merge tab customer and prospect
|
||||
- New: [ task #710 ] Add substitution into mailing send (and HTML is now valid)
|
||||
- New: [ task #711 ] Add combobox for contact as done for product/thirdparty
|
||||
- New: [ task #714 ] In Emailing module admin autogenerate security key of READRECIEPT
|
||||
- New: [ task #743 ] GED : Add aministration option to disabled autotree to display
|
||||
- New: [ task #767 ] Customer Address fallback when a contact doesn't have an address
|
||||
- New: [ task #768 ] WYSIWYG for all mail
|
||||
- New: [ task #773 ] Add Project document in GED(ECM) modules
|
||||
- New: [ task #783 ] Add checkbox and radio into extrafield feature
|
||||
- New: [ task #798 ] Add range limit date on product/services as it is done on order and invoice
|
||||
- New: [ task #814 ] Add extrafield feature into Project/project tasks module
|
||||
- New: [ task #770 ] Add ODT document generation for Projects module
|
||||
- New: [ task #741 ] Add intervention box
|
||||
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated
|
||||
- New: [ task #350 ] Merge tab customer and prospect.
|
||||
- New: [ task #710 ] Add substitution into mailing send (and HTML is now valid).
|
||||
- New: [ task #711 ] Add combobox for contact, as done for product/thirdparty.
|
||||
- New: [ task #714 ] In Emailing module admin autogenerate security key of READRECEIPT.
|
||||
- New: [ task #743 ] GED : Add aministration option to disable autotree display.
|
||||
- New: [ task #767 ] Customer Address fallback when a contact doesn't have an address.
|
||||
- New: [ task #768 ] WYSIWYG for all mails.
|
||||
- New: [ task #773 ] Add Project document in GED(ECM) modules.
|
||||
- New: [ task #783 ] Add more types for extra parameters (lists, phone, emails, checkbox,
|
||||
prices, radio).
|
||||
- New: [ task #798 ] Add range limit date on product/services as it is done on order
|
||||
and invoice.
|
||||
- New: [ task #814 ] Add extrafield feature for projects ands tasks.
|
||||
- New: [ task #770 ] Add ODT document generation for Projects module.
|
||||
- New: [ task #741 ] Add intervention box.
|
||||
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated.
|
||||
- New: [ task #823 ] Shipping_validate email notification.
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
@ -59,8 +63,8 @@ For developers:
|
||||
- An external module can force its theme.
|
||||
- Add function dol_set_focus('#xxx').
|
||||
- A mymodule can bring its own core/modules/mymodule/modules_mymodule.php file.
|
||||
- Removed not used libraries.
|
||||
- More web services.
|
||||
- Removed some not used libraries.
|
||||
- More web services.
|
||||
- Renamed some database fields, code variables and parameters from french to english.
|
||||
- First change to manage margins on contracts.
|
||||
- Add hook getFormMail.
|
||||
@ -87,7 +91,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 *****
|
||||
|
||||
- Fix: Ducth (nl_NL) translation
|
||||
- Fix: Dutch (nl_NL) translation
|
||||
- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
|
||||
- Generalize fix: file with a specific mask not found, again
|
||||
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
|
||||
@ -100,9 +104,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: 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: [ bug #774 ] Bug on creating event with box "all day" crossed
|
||||
- Fix: [ bug #789 ] VAT not being calculated in POS
|
||||
- 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 #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)
|
||||
|
||||
@ -133,7 +133,11 @@ class modMyModule extends DolibarrModules
|
||||
$this->tabs = array();
|
||||
|
||||
// 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();
|
||||
/* Example:
|
||||
if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; // This is to avoid warnings
|
||||
|
||||
@ -1520,7 +1520,12 @@ class Adherent extends CommonObject
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
if ($option == 'category')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
$picto='user';
|
||||
$label=$langs->trans("ShowMember");
|
||||
|
||||
|
||||
@ -65,8 +65,8 @@ else
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
* Actions
|
||||
*/
|
||||
if ($action == "save" && empty($cancel))
|
||||
{
|
||||
$i=0;
|
||||
@ -125,7 +125,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
|
||||
|
||||
/**
|
||||
* Affichage du formulaire de saisie
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
@ -184,48 +184,7 @@ print "</center>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* 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"> </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"> </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>";
|
||||
|
||||
|
||||
135
htdocs/admin/agenda_other.php
Normal file
135
htdocs/admin/agenda_other.php
Normal 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"> </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"> </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();
|
||||
?>
|
||||
@ -391,7 +391,7 @@ if ($id == 11)
|
||||
|
||||
// Define localtax_typeList (used for dictionnary "c_tva")
|
||||
$localtax_typeList = array();
|
||||
if (GETPOST("id") == 10)
|
||||
if ($id == 10)
|
||||
{
|
||||
$localtax_typeList = array(
|
||||
"0" => $langs->trans("No"),
|
||||
@ -441,22 +441,32 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
|
||||
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
|
||||
|
||||
$msg.=$langs->trans("ErrorFieldRequired",$langs->transnoentities($fieldnamekey)).'<br>';
|
||||
$msg.=$langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)).'<br>';
|
||||
}
|
||||
}
|
||||
// Other checks
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) {
|
||||
$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') {
|
||||
$ok=0;
|
||||
$msg.="Code can't contains value 0<br>";
|
||||
if (isset($_POST["code"]))
|
||||
{
|
||||
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') {
|
||||
$ok=0;
|
||||
$msg.=$langs->trans("ErrorFieldRequired",$langs->trans("Country")).'<br>';
|
||||
$msg.=$langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")).'<br>';
|
||||
}
|
||||
|
||||
// Clean some parameters
|
||||
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
|
||||
@ -518,7 +528,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
else
|
||||
{
|
||||
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
$msg=$langs->trans("ErrorRecordAlreadyExists").'<br>';
|
||||
$msg=$langs->transnoentities("ErrorRecordAlreadyExists").'<br>';
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
@ -588,7 +598,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
||||
{
|
||||
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
|
||||
{
|
||||
$msg='<div class="error">'.$langs->trans("ErrorRecordIsUsedByChild").'</div>';
|
||||
$msg='<div class="error">'.$langs->transnoentities("ErrorRecordIsUsedByChild").'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -994,6 +1004,7 @@ if ($id)
|
||||
$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') {
|
||||
$langs->load('agenda');
|
||||
$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]);
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load('other');
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ $error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->e
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
//Suppression d'un objet d'une categorie
|
||||
// Remove element from category
|
||||
if ($removecat > 0)
|
||||
{
|
||||
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
@ -113,17 +113,20 @@ if (empty($reshook))
|
||||
{
|
||||
$object = new Societe($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'fournisseur';
|
||||
}
|
||||
if ($type==2 && $user->rights->societe->creer)
|
||||
{
|
||||
$object = new Societe($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'societe';
|
||||
}
|
||||
if ($type == 3 && $user->rights->adherent->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$object = new Adherent($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'member';
|
||||
}
|
||||
$cat = new Categorie($db);
|
||||
$result=$cat->fetch($removecat);
|
||||
@ -507,7 +510,7 @@ function formCategory($db,$object,$typeid,$socid=0)
|
||||
//print $c->getNomUrl(1);
|
||||
print img_object('','category').' '.$way."</td>";
|
||||
|
||||
// Lien supprimer
|
||||
// Link to delete from category
|
||||
print '<td align="right">';
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
|
||||
@ -420,6 +420,7 @@ class Categorie
|
||||
$sql .= " WHERE fk_categorie = ".$this->id;
|
||||
$sql .= " AND fk_".($type=='fournisseur'?'societe':$type)." = ".$obj->id;
|
||||
|
||||
dol_syslog(get_class($this).'::del_type sql='.$sql);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
return 1;
|
||||
|
||||
@ -36,6 +36,7 @@ $ref=GETPOST('ref');
|
||||
$type=GETPOST('type');
|
||||
$action=GETPOST('action');
|
||||
$confirm=GETPOST('confirm');
|
||||
$removeelem = GETPOST('removeelem','int');
|
||||
|
||||
if ($id == "")
|
||||
{
|
||||
@ -61,6 +62,40 @@ $type=$object->type;
|
||||
* 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 ($object->delete($user) >= 0)
|
||||
@ -214,7 +249,7 @@ if ($object->type == 0)
|
||||
{
|
||||
print "<br>";
|
||||
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)
|
||||
{
|
||||
@ -224,10 +259,24 @@ if ($object->type == 0)
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
print '<td nowrap="nowrap" valign="top">';
|
||||
if ($prod->type == 1) print img_object($langs->trans("ShowService"),"service");
|
||||
else print img_object($langs->trans("ShowProduct"),"product");
|
||||
print " <a href='".DOL_URL_ROOT."/product/fiche.php?id=".$prod->id."'>".$prod->ref."</a></td>\n";
|
||||
print $prod->getNomUrl(1,'category');
|
||||
print "</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."&type=".$typeid."&removeelem=".$prod->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
@ -249,8 +298,8 @@ if ($object->type == 1)
|
||||
else
|
||||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print "<tr class='liste_titre'><td>".$langs->trans("Suppliers")."</td></tr>\n";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Suppliers")."</td></tr>\n";
|
||||
|
||||
if (count($socs) > 0)
|
||||
{
|
||||
@ -261,9 +310,24 @@ if ($object->type == 1)
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
|
||||
print '<td nowrap="nowrap" valign="top">';
|
||||
print $soc->getNomUrl(1);
|
||||
print $soc->getNomUrl(1,'category_supplier');
|
||||
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."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
@ -285,8 +349,8 @@ if($object->type == 2)
|
||||
else
|
||||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print "<tr class='liste_titre'><td>".$langs->trans("Customers")."</td></tr>\n";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Customers")."</td></tr>\n";
|
||||
|
||||
if (count($socs) > 0)
|
||||
{
|
||||
@ -298,9 +362,23 @@ if($object->type == 2)
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
print '<td nowrap="nowrap" valign="top">';
|
||||
print $soc->getNomUrl(1);
|
||||
print $soc->getNomUrl(1,'category');
|
||||
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."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
@ -326,7 +404,7 @@ if ($object->type == 3)
|
||||
{
|
||||
print "<br>";
|
||||
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)
|
||||
{
|
||||
@ -336,10 +414,25 @@ if ($object->type == 3)
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
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 valign="top">'.$member->lastname."</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."&type=".$typeid."&removeelem=".$member->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,6 +51,19 @@ if ($user->societe_id > 0)
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
$act = new ActionComm($db);
|
||||
|
||||
if ($objectid > 0)
|
||||
{
|
||||
$ret = $act->fetch($objectid);
|
||||
if ($ret > 0) {
|
||||
$company=new Societe($db);
|
||||
$company->fetch($act->societe->id);
|
||||
$act->societe=$company; // For backward compatibility
|
||||
$act->thirdparty=$company;
|
||||
}
|
||||
}
|
||||
|
||||
// Get parameters
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
@ -79,7 +92,7 @@ if ($action == 'delete')
|
||||
{
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
$ret=dol_delete_file($file);
|
||||
$ret=dol_delete_file($file,0,0,0,$act);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
$action='';
|
||||
@ -96,184 +109,172 @@ $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
|
||||
llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||
|
||||
|
||||
if ($objectid > 0)
|
||||
if ($act->id > 0)
|
||||
{
|
||||
$act = new ActionComm($db);
|
||||
if ($act->fetch($objectid))
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
|
||||
$author=new User($db);
|
||||
$author->fetch($act->author->id);
|
||||
$act->author=$author;
|
||||
|
||||
if ($act->contact->id) $act->fetch_contact($act->contact->id);
|
||||
|
||||
$head=actions_prepare_head($act);
|
||||
dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action');
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Type
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$act->type.'</td></tr>';
|
||||
}
|
||||
|
||||
$company=new Societe($db);
|
||||
$company->fetch($act->societe->id);
|
||||
$act->societe=$company;
|
||||
// Title
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$act->label.'</td></tr>';
|
||||
|
||||
$author=new User($db);
|
||||
$author->fetch($act->author->id);
|
||||
$act->author=$author;
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($act->fulldayevent).'</td></tr>';
|
||||
|
||||
if ($act->contact->id) $act->fetch_contact($act->contact->id);
|
||||
// Date start
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="2">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour');
|
||||
else print dol_print_date($act->datep,'day');
|
||||
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '<td rowspan="4" align="center" valign="middle" width="180">'."\n";
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$head=actions_prepare_head($act);
|
||||
dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action');
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="2">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour');
|
||||
else print dol_print_date($act->datef,'day');
|
||||
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
// Status
|
||||
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
print $act->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
// Location
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$act->location.'</td></tr>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Type
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
|
||||
// Third party - Contact
|
||||
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None"));
|
||||
if ($act->societe->id && $act->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($act->societe->fetch($act->societe->id))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$act->type.'</td></tr>';
|
||||
print "<br>".dol_print_phone($act->societe->tel);
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$act->label.'</td></tr>';
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($act->fulldayevent).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="2">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour');
|
||||
else print dol_print_date($act->datep,'day');
|
||||
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '<td rowspan="4" align="center" valign="middle" width="180">'."\n";
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="2">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour');
|
||||
else print dol_print_date($act->datef,'day');
|
||||
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
print $act->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$act->location.'</td></tr>';
|
||||
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
|
||||
// Third party - Contact
|
||||
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None"));
|
||||
if ($act->societe->id && $act->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($act->societe->fetch($act->societe->id))
|
||||
{
|
||||
print "<br>".dol_print_phone($act->societe->tel);
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Contact").'</td>';
|
||||
print '<td>';
|
||||
if ($act->contact->id > 0)
|
||||
{
|
||||
print $act->contact->getNomUrl(1);
|
||||
if ($act->contact->id && $act->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($act->contact->fetch($act->contact->id))
|
||||
{
|
||||
print "<br>".dol_print_phone($act->contact->phone_pro);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("None");
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
if ($act->fk_project)
|
||||
{
|
||||
$project=new Project($db);
|
||||
$project->fetch($act->fk_project);
|
||||
print $project->getNomUrl(1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Priority
|
||||
print '<tr><td nowrap>'.$langs->trans("Priority").'</td><td colspan="3">';
|
||||
print ($act->priority?$act->priority:'');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
$totalsize=0;
|
||||
foreach($filearray as $key => $file)
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Contact").'</td>';
|
||||
print '<td>';
|
||||
if ($act->contact->id > 0)
|
||||
{
|
||||
print $act->contact->getNomUrl(1);
|
||||
if ($act->contact->id && $act->type_code == 'AC_TEL')
|
||||
{
|
||||
$totalsize+=$file['size'];
|
||||
if ($act->contact->fetch($act->contact->id))
|
||||
{
|
||||
print "<br>".dol_print_phone($act->contact->phone_pro);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td width="30%" nowrap>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id,'',0,0,($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create));
|
||||
|
||||
|
||||
// List of document
|
||||
$param='&id='.$act->id;
|
||||
$formfile->list_of_documents($filearray,$act,'actions',$param,0,'',$user->rights->agenda->myactions->create);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
print $langs->trans("None");
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
if ($act->fk_project)
|
||||
{
|
||||
$project=new Project($db);
|
||||
$project->fetch($act->fk_project);
|
||||
print $project->getNomUrl(1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Priority
|
||||
print '<tr><td nowrap>'.$langs->trans("Priority").'</td><td colspan="3">';
|
||||
print ($act->priority?$act->priority:'');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
$totalsize=0;
|
||||
foreach($filearray as $key => $file)
|
||||
{
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td width="30%" nowrap>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id,'',0,0,($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create),50,$act);
|
||||
|
||||
|
||||
// List of document
|
||||
$param='&id='.$act->id;
|
||||
$formfile->list_of_documents($filearray,$act,'actions',$param,0,'',$user->rights->agenda->myactions->create);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* 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-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -663,7 +663,6 @@ if ($id > 0)
|
||||
*/
|
||||
|
||||
$head=actions_prepare_head($act);
|
||||
dol_fiche_head($head, 'card', $langs->trans("Action"),0,'action');
|
||||
|
||||
$now=dol_now();
|
||||
$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.'">';
|
||||
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%">';
|
||||
|
||||
// Ref
|
||||
@ -836,7 +837,9 @@ if ($id > 0)
|
||||
|
||||
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 ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
|
||||
@ -844,6 +847,8 @@ if ($id > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_fiche_head($head, 'card', $langs->trans("Action"),0,'action');
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -1021,14 +1026,13 @@ if ($id > 0)
|
||||
}
|
||||
print '</table><br><br>';
|
||||
}
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Barre d'actions
|
||||
*
|
||||
*/
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
@ -1534,7 +1534,7 @@ else
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
$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);
|
||||
@ -2171,7 +2171,7 @@ else
|
||||
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
print '</div></div></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1784,7 +1784,7 @@ else
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
$text.='<br>';
|
||||
$text.=$notify->confirmMessage('NOTIFY_VAL_ORDER',$object->socid);
|
||||
$text.=$notify->confirmMessage('ORDER_VALIDATE',$object->socid);
|
||||
}
|
||||
$formquestion=array();
|
||||
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 '</tr>';
|
||||
|
||||
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
|
||||
$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
|
||||
{
|
||||
$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)'";
|
||||
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
|
||||
$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
|
||||
{
|
||||
$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)'";
|
||||
}
|
||||
|
||||
// Relative and absolute discounts
|
||||
@ -2170,9 +2170,9 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
$rowspan=4;
|
||||
if ($mysoc->localtax1_assuj=="1") $rowspan++;
|
||||
if ($mysoc->localtax2_assuj=="1") $rowspan++;
|
||||
$rowspan=4;
|
||||
if ($mysoc->localtax1_assuj=="1") $rowspan++;
|
||||
if ($mysoc->localtax2_assuj=="1") $rowspan++;
|
||||
|
||||
// Total HT
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td>';
|
||||
@ -2411,7 +2411,7 @@ else
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
if ($action != 'presend')
|
||||
|
||||
@ -2523,7 +2523,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
$text.='<br>';
|
||||
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC',$object->socid);
|
||||
$text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid);
|
||||
}
|
||||
$formquestion=array();
|
||||
|
||||
@ -3618,7 +3618,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
if ($action != 'prerelance' && $action != 'presend')
|
||||
{
|
||||
@ -3659,7 +3659,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$somethingshown=$formactions->showactions($object,'invoice',$socid);
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
print '</div></div></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -3528,31 +3528,31 @@ class FactureLigne
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Mise a jour ligne en base
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET";
|
||||
$sql.= " description='".$this->db->escape($this->desc)."'";
|
||||
$sql.= ",label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null");
|
||||
$sql.= ",subprice=".price2num($this->subprice)."";
|
||||
$sql.= ",remise_percent=".price2num($this->remise_percent)."";
|
||||
if ($this->fk_remise_except) $sql.= ",fk_remise_except=".$this->fk_remise_except;
|
||||
else $sql.= ",fk_remise_except=null";
|
||||
$sql.= ",tva_tx=".price2num($this->tva_tx)."";
|
||||
$sql.= ",localtax1_tx=".price2num($this->localtax1_tx)."";
|
||||
$sql.= ",localtax2_tx=".price2num($this->localtax2_tx)."";
|
||||
$sql.= ",qty=".price2num($this->qty)."";
|
||||
$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.= ",product_type=".$this->product_type;
|
||||
$sql.= ",info_bits='".$this->info_bits."'";
|
||||
$sql.= ",special_code='".$this->special_code."'";
|
||||
if (empty($this->skip_update_total))
|
||||
{
|
||||
$sql.= ",total_ht=".price2num($this->total_ht)."";
|
||||
$sql.= ",total_tva=".price2num($this->total_tva)."";
|
||||
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
||||
$sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
|
||||
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
||||
}
|
||||
// Mise a jour ligne en base
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET";
|
||||
$sql.= " description='".$this->db->escape($this->desc)."'";
|
||||
$sql.= ",label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null");
|
||||
$sql.= ",subprice=".price2num($this->subprice)."";
|
||||
$sql.= ",remise_percent=".price2num($this->remise_percent)."";
|
||||
if ($this->fk_remise_except) $sql.= ",fk_remise_except=".$this->fk_remise_except;
|
||||
else $sql.= ",fk_remise_except=null";
|
||||
$sql.= ",tva_tx=".price2num($this->tva_tx)."";
|
||||
$sql.= ",localtax1_tx=".price2num($this->localtax1_tx)."";
|
||||
$sql.= ",localtax2_tx=".price2num($this->localtax2_tx)."";
|
||||
$sql.= ",qty=".price2num($this->qty)."";
|
||||
$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.= ",product_type=".$this->product_type;
|
||||
$sql.= ",info_bits='".$this->info_bits."'";
|
||||
$sql.= ",special_code='".$this->special_code."'";
|
||||
if (empty($this->skip_update_total))
|
||||
{
|
||||
$sql.= ",total_ht=".price2num($this->total_ht)."";
|
||||
$sql.= ",total_tva=".price2num($this->total_tva)."";
|
||||
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
||||
$sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
|
||||
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
||||
}
|
||||
$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.= ",fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null");
|
||||
|
||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
*/
|
||||
class ChargeSociales extends CommonObject
|
||||
{
|
||||
public $element='rowid';
|
||||
public $element='chargesociales';
|
||||
public $table='chargesociales';
|
||||
public $table_element='chargesociales';
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file = $upload_dir . '/' . GETPOST("urlfile"); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
$ret=dol_delete_file($file);
|
||||
$ret=dol_delete_file($file,0,0,0,$object);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
}
|
||||
@ -172,7 +172,7 @@ if ($object->id)
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id,'',0,0,$user->rights->tax->charges->creer);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id,'',0,0,$user->rights->tax->charges->creer,50,$object);
|
||||
|
||||
|
||||
// List of document
|
||||
|
||||
390
htdocs/compta/stats/cabyprodserv.php
Normal file
390
htdocs/compta/stats/cabyprodserv.php
Normal 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 . ' - ' . $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).'%' : ' ').'</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> </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();
|
||||
?>
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -46,6 +47,12 @@ if (! $sortfield) $sortfield="name";
|
||||
// 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());
|
||||
@ -89,9 +96,34 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
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
|
||||
@ -102,9 +134,8 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
// Affiche en-tete du rapport
|
||||
if ($modecompta=="CREANCES-DETTES")
|
||||
{
|
||||
// Show report header
|
||||
if ($modecompta=="CREANCES-DETTES") {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$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);
|
||||
@ -114,8 +145,7 @@ if ($modecompta=="CREANCES-DETTES")
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$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);
|
||||
@ -131,20 +161,29 @@ if (! empty($modecompta)) $moreparam['modecompta']=$modecompta;
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam);
|
||||
|
||||
|
||||
// Charge tableau
|
||||
$catotal=0;
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
// Show array
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
// 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.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid";
|
||||
$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)";
|
||||
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)."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
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)."'";
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* 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)
|
||||
@ -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 as p ON p.rowid = pf.fk_paiement";
|
||||
$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;
|
||||
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";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
$amount[$obj->rowid] = $obj->amount_ttc;
|
||||
$name[$obj->rowid] = $obj->lastname.' '.$obj->firstname;
|
||||
$catotal+=$obj->amount_ttc;
|
||||
$i++;
|
||||
$amount_ht[$obj->rowid] = $obj->amount;
|
||||
$amount[$obj->rowid] = $obj->amount_ttc;
|
||||
$name[$obj->rowid] = $obj->name.' '.$obj->firstname;
|
||||
$catotal_ht+=$obj->amount;
|
||||
$catotal+=$obj->amount_ttc;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// On ajoute les paiements ancienne version, non lies par paiement_facture donc sans user
|
||||
if ($modecompta != 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT -1 as rowidx, '' as lastname, '' as firstname, sum(p.amount) as amount_ttc";
|
||||
// Adding old-version payments, non-bound by "paiement_facture" then without User
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
$sql = "SELECT -1 as rowidx, '' as name, '' as firstname, sum(DISTINCT p.amount) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."paiement as p";
|
||||
@ -192,42 +231,86 @@ if ($modecompta != 'CREANCES-DETTES')
|
||||
$sql.= " AND p.fk_bank = b.rowid";
|
||||
$sql.= " AND b.fk_account = ba.rowid";
|
||||
$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.= " ORDER BY rowidx";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
$amount[$obj->rowidx] = $obj->amount_ttc;
|
||||
$name[$obj->rowidx] = $obj->lastname.' '.$obj->firstname;
|
||||
$name[$obj->rowidx] = $obj->name.' '.$obj->firstname;
|
||||
$catotal+=$obj->amount_ttc;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"name","",'&year='.($year).'&modecompta='.$modecompta,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"amount_ttc","",'&year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Percentage"),$_SERVER["PHP_SELF"],"amount_ttc","",'&year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("OtherStatistics"),$_SERVER["PHP_SELF"],"","","",'align="center" width="20%"');
|
||||
print_liste_field_titre(
|
||||
$langs->trans("User"),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"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";
|
||||
$var=true;
|
||||
|
||||
if (count($amount))
|
||||
{
|
||||
if (count($amount)) {
|
||||
$arrayforsort=$name;
|
||||
|
||||
// We define arrayforsort
|
||||
@ -239,6 +322,14 @@ if (count($amount))
|
||||
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;
|
||||
@ -248,8 +339,7 @@ if (count($amount))
|
||||
$arrayforsort=$amount;
|
||||
}
|
||||
|
||||
foreach($arrayforsort as $key => $value)
|
||||
{
|
||||
foreach($arrayforsort as $key => $value) {
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
@ -257,23 +347,44 @@ if (count($amount))
|
||||
$fullname=$name[$key];
|
||||
if ($key >= 0) {
|
||||
$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");
|
||||
}
|
||||
print "<td>".$linkname."</td>\n";
|
||||
|
||||
// Amount
|
||||
// Amount w/o VAT
|
||||
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">';
|
||||
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_ht[$key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($key > 0) print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
|
||||
else print '<a href="#">';
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
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 '</td>';
|
||||
@ -283,17 +394,30 @@ if (count($amount))
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
if (! empty($conf->propal->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
if (! empty($conf->commande->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
if (! empty($conf->facture->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
if (! empty($conf->propal->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
}
|
||||
if (! empty($conf->commande->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
}
|
||||
if (! empty($conf->facture->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Total
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.price($catotal).'</td><td> </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> </td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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/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("companies");
|
||||
$langs->load("categories");
|
||||
|
||||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
|
||||
$modecompta = $conf->global->COMPTA_MODE;
|
||||
@ -41,6 +44,13 @@ if (! $sortfield) $sortfield="nom";
|
||||
|
||||
$socid = GETPOST('socid','int');
|
||||
|
||||
// Category
|
||||
$selected_cat = (int)GETPOST('search_categ', 'int');
|
||||
$subcat = false;
|
||||
if (GETPOST('subcat', 'alpha') === 'yes') {
|
||||
$subcat = true;
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
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
|
||||
$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());
|
||||
@ -92,10 +108,34 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
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
|
||||
@ -105,8 +145,9 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
$thirdparty_static=new Societe($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
// Affiche en-tete de rapport
|
||||
// Show report header
|
||||
if ($modecompta=="CREANCES-DETTES")
|
||||
{
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
@ -118,8 +159,7 @@ if ($modecompta=="CREANCES-DETTES")
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$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);
|
||||
@ -129,26 +169,44 @@ else {
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
$moreparam=array();
|
||||
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,$tableparams);
|
||||
|
||||
|
||||
// Charge tableau
|
||||
// Show Array
|
||||
$catotal=0;
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT DISTINCT s.rowid as socid, s.nom as name,";
|
||||
$sql.= " sum(DISTINCT f.total) as amount, sum(DISTINCT f.total_ttc) as amount_ttc";
|
||||
$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)";
|
||||
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 (! 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)";
|
||||
}
|
||||
$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)."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
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 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
|
||||
* 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.= " AND pf.fk_facture = f.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;
|
||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||
@ -169,27 +229,26 @@ $sql.= " GROUP BY s.rowid, s.nom";
|
||||
$sql.= " ORDER BY s.rowid";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
$amount[$obj->socid] += $obj->amount_ttc;
|
||||
$name[$obj->socid] = $obj->name;
|
||||
$catotal+=$obj->amount_ttc;
|
||||
$i++;
|
||||
$amount_ht[$obj->socid] = $obj->amount;
|
||||
$amount[$obj->socid] = $obj->amount_ttc;
|
||||
$name[$obj->socid] = $obj->name.' '.$obj->firstname;
|
||||
$catotal_ht+=$obj->amount;
|
||||
$catotal+=$obj->amount_ttc;
|
||||
$i++;
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// On ajoute les paiements anciennes version, non lies par paiement_facture
|
||||
if ($modecompta != 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc";
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
$sql = "SELECT '0' as socid, 'Autres' as name, sum(DISTINCT p.amount) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."paiement as p";
|
||||
@ -203,20 +262,17 @@ if ($modecompta != 'CREANCES-DETTES')
|
||||
$sql.= " ORDER BY name";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
$amount[$obj->rowid] += $obj->amount_ttc;
|
||||
$name[$obj->rowid] = $obj->name;
|
||||
$catotal+=$obj->amount_ttc;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
@ -224,20 +280,87 @@ if ($modecompta != 'CREANCES-DETTES')
|
||||
|
||||
// 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%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"nom","",'&year='.($year).'&modecompta='.$modecompta,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"amount_ttc","",'&year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Percentage"),$_SERVER["PHP_SELF"],"amount_ttc","",'&year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("OtherStatistics"),$_SERVER["PHP_SELF"],"","","",'align="center" width="20%"');
|
||||
// Category filter
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print $langs->trans("Category") . ': ' . $formother->select_categories(2, $selected_cat, 'search_categ', true);
|
||||
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";
|
||||
$var=true;
|
||||
|
||||
if (count($amount))
|
||||
{
|
||||
if (count($amount)) {
|
||||
$arrayforsort=$name;
|
||||
|
||||
// On definit tableau arrayforsort
|
||||
// Defining array arrayforsort
|
||||
if ($sortfield == 'nom' && $sortorder == 'asc') {
|
||||
asort($name);
|
||||
$arrayforsort=$name;
|
||||
@ -246,6 +369,14 @@ if (count($amount))
|
||||
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;
|
||||
@ -255,8 +386,7 @@ if (count($amount))
|
||||
$arrayforsort=$amount;
|
||||
}
|
||||
|
||||
foreach($arrayforsort as $key=>$value)
|
||||
{
|
||||
foreach($arrayforsort as $key=>$value) {
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
@ -267,23 +397,43 @@ if (count($amount))
|
||||
$thirdparty_static->name=$fullname;
|
||||
$thirdparty_static->client=1;
|
||||
$linkname=$thirdparty_static->getNomUrl(1,'customer');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$linkname=$langs->trans("PaymentsNotLinkedToInvoice");
|
||||
}
|
||||
print "<td>".$linkname."</td>\n";
|
||||
|
||||
// Amount
|
||||
// Amount w/o VAT
|
||||
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">';
|
||||
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_ht[$key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($key > 0) print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$key.'">';
|
||||
else print '<a href="#">';
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
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 '</a>';
|
||||
@ -294,17 +444,30 @@ if (count($amount))
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
if (! empty($conf->propal->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
if (! empty($conf->commande->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
if (! empty($conf->facture->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
if (! empty($conf->propal->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
}
|
||||
if (! empty($conf->commande->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
}
|
||||
if (! empty($conf->facture->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Total
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.price($catotal).'</td><td> </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> </td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -312,8 +475,7 @@ if (count($amount))
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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 '<!-- 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';
|
||||
|
||||
// Dir scan
|
||||
@ -149,126 +149,73 @@ if ($type == 'directory')
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
$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.
|
||||
if ($module == 'company') // Auto area for suppliers invoices
|
||||
{
|
||||
$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);
|
||||
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project');
|
||||
|
||||
$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') // Auto area for suppliers invoices
|
||||
{
|
||||
$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
|
||||
// TODO change for multicompany sharing
|
||||
// Auto area for suppliers invoices
|
||||
if ($module == 'company') $upload_dir = $conf->societe->dir_output;
|
||||
// Auto area for suppliers invoices
|
||||
else if ($module == 'invoice') $upload_dir = $conf->facture->dir_output;
|
||||
// Auto area for suppliers invoices
|
||||
else if ($module == 'invoice_supplier')
|
||||
{
|
||||
$relativepath='facture';
|
||||
$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
|
||||
{
|
||||
$upload_dir = $conf->propal->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') // 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
|
||||
// Auto area for customers orders
|
||||
else if ($module == 'propal') $upload_dir = $conf->propal->dir_output;
|
||||
// Auto area for customers orders
|
||||
else if ($module == 'order') $upload_dir = $conf->commande->dir_output;
|
||||
// Auto area for suppliers orders
|
||||
else if ($module == 'order_supplier')
|
||||
{
|
||||
$relativepath='commande';
|
||||
$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;
|
||||
$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);
|
||||
}
|
||||
else if ($module == 'contract') // Auto area for suppliers invoices
|
||||
{
|
||||
$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
|
||||
//Manual area
|
||||
else
|
||||
{
|
||||
$relativepath=$ecmdir->getRelativePath();
|
||||
$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.='§ion='.$section;
|
||||
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")));
|
||||
// If $section defined with value 0
|
||||
if ($section === '0')
|
||||
{
|
||||
$filearray=array();
|
||||
$textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
|
||||
$filearray=array();
|
||||
$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.='§ion='.$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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))
|
||||
|
||||
@ -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
|
||||
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
|
||||
{
|
||||
$val=$tmpval;
|
||||
|
||||
@ -56,6 +56,8 @@ class FileUpload
|
||||
$filename = $regs[2];
|
||||
}
|
||||
|
||||
$parentForeignKey = '';
|
||||
|
||||
// For compatibility
|
||||
if ($element == 'propal') {
|
||||
$pathname = 'comm/propal';
|
||||
@ -69,6 +71,14 @@ class FileUpload
|
||||
$element = $pathname = 'projet';
|
||||
$dir_output=$conf->$element->dir_output;
|
||||
}
|
||||
elseif ($element == 'project_task') {
|
||||
$pathname = 'projet'; $filename='task';
|
||||
$dir_output=$conf->projet->dir_output;
|
||||
$parentForeignKey = 'fk_project';
|
||||
$parentClass = 'Project';
|
||||
$parentElement = 'projet';
|
||||
$parentObject = 'project';
|
||||
}
|
||||
elseif ($element == 'fichinter') {
|
||||
$element='ficheinter';
|
||||
$dir_output=$conf->$element->dir_output;
|
||||
@ -80,6 +90,17 @@ class FileUpload
|
||||
elseif ($element == 'invoice_supplier') {
|
||||
$pathname = 'fourn'; $filename='fournisseur.facture';
|
||||
$dir_output=$conf->fournisseur->facture->dir_output;
|
||||
}
|
||||
elseif ($element == 'product') {
|
||||
$dir_output = $conf->product->multidir_output[$conf->entity];
|
||||
}
|
||||
elseif ($element == 'action') {
|
||||
$pathname = 'comm/action'; $filename='actioncomm';
|
||||
$dir_output=$conf->agenda->dir_output;
|
||||
}
|
||||
elseif ($element == 'chargesociales') {
|
||||
$pathname = 'compta/sociales'; $filename='chargesociales';
|
||||
$dir_output=$conf->tax->dir_output;
|
||||
} else {
|
||||
$dir_output=$conf->$element->dir_output;
|
||||
}
|
||||
@ -97,11 +118,23 @@ class FileUpload
|
||||
$object = new $classname($db);
|
||||
|
||||
$object->fetch($fk_element);
|
||||
$object->fetch_thirdparty();
|
||||
if (!empty($parentForeignKey)) {
|
||||
dol_include_once('/'.$parentElement.'/class/'.$parentObject.'.class.php');
|
||||
$parent = new $parentClass($db);
|
||||
$parent->fetch($object->$parentForeignKey);
|
||||
if (!empty($parent->socid)) {
|
||||
$parent->fetch_thirdparty();
|
||||
}
|
||||
$object->$parentObject = dol_clone($parent);
|
||||
} else {
|
||||
$object->fetch_thirdparty();
|
||||
}
|
||||
|
||||
$object_ref = dol_sanitizeFileName($object->ref);
|
||||
if ($element == 'invoice_supplier') {
|
||||
$object_ref = get_exdir($object->id, 2) . $object_ref;
|
||||
} else if ($element == 'project_task') {
|
||||
$object_ref = $object->project->ref . '/' . $object_ref;
|
||||
}
|
||||
|
||||
$this->options = array(
|
||||
|
||||
@ -144,7 +144,6 @@ class HookManager
|
||||
foreach($modules as $module => $actionclassinstance)
|
||||
{
|
||||
//print 'class='.get_class($actionclassinstance).' method='.$method.' action='.$action;
|
||||
|
||||
// jump to next class if method does not exists
|
||||
if (! method_exists($actionclassinstance,$method)) continue;
|
||||
// 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)
|
||||
|
||||
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;
|
||||
|
||||
// TODO. remove this. array result must be set into $actionclassinstance->results
|
||||
|
||||
@ -344,7 +344,7 @@ class Form
|
||||
* Show a text and picto with tooltip on text or picto
|
||||
*
|
||||
* @param string $text Text to show
|
||||
* @param string $htmltext Content html of tooltip. Must be HTML/UTF8 encoded.
|
||||
* @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded.
|
||||
* @param int $tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2
|
||||
* @param int $direction -1=Le picto est avant, 0=pas de picto, 1=le picto est apres
|
||||
* @param string $img Code img du picto (use img_xxx() function to get it)
|
||||
@ -383,7 +383,7 @@ class Form
|
||||
//if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').'</'.$tag.'>';
|
||||
$paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':'');
|
||||
$paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':'');
|
||||
if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.'</'.$tag.'>';
|
||||
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.'</'.$tag.'>';
|
||||
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||
if (empty($notabs)) $s.='</tr></table>';
|
||||
|
||||
|
||||
@ -384,6 +384,11 @@ function agenda_prepare_head()
|
||||
$head[$h][2] = 'extsites';
|
||||
$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');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
|
||||
|
||||
@ -47,7 +47,7 @@ function societe_prepare_head($object)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$object->id;
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] = $langs->trans("Prospect");
|
||||
if ($object->client==3) $head[$h][1] .= '/';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= '/';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client==1 || $object->client==3)) $head[$h][1] .= $langs->trans("Customer");
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
|
||||
@ -814,13 +814,14 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
||||
}
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
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.
|
||||
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 == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration);
|
||||
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 == '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 == '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 == '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);
|
||||
@ -828,12 +829,18 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
||||
// Format not sensitive to language
|
||||
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 == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ';
|
||||
else if ($format == 'dayxcard') $format='%Y%m%d';
|
||||
else if ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ';
|
||||
else if ($format == 'dayxcard') $format='%Y%m%d';
|
||||
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 == '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 (dol_strlen($time) == 0) return ''; // $time=0 allowed (it means 01/01/1970 00:00:00)
|
||||
|
||||
|
||||
@ -1283,7 +1283,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
||||
if (! $tmpdir) { unset($listofdir[$key]); continue; }
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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/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
|
||||
//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);
|
||||
|
||||
@ -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_icon[$r]='bill';
|
||||
$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_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.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_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_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_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_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_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_sql_start[$r]='SELECT DISTINCT ';
|
||||
|
||||
@ -109,7 +109,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -210,16 +210,27 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
{
|
||||
//print "srctemplatepath=".$srctemplatepath; // Src filename
|
||||
$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('/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;
|
||||
$object->builddoc_filename=$filename; // For triggers
|
||||
//print "newfileformat=".$newfileformat;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
//print "conf->societe->dir_temp=".$conf->societe->dir_temp;
|
||||
//exit;
|
||||
|
||||
dol_mkdir($conf->societe->multidir_temp[$object->entity]);
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ if ($forgetpasslink || $helpcenterlink)
|
||||
<?php if ($main_home)
|
||||
{
|
||||
?>
|
||||
<center><div align="center" style="max-width: 80%">
|
||||
<center><div align="center" class="login_main_home" style="max-width: 80%">
|
||||
<?php echo $main_home; ?>
|
||||
</div></center><br>
|
||||
<?php
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -35,7 +36,8 @@ class InterfaceNotification
|
||||
'PROPAL_VALIDATE',
|
||||
'FICHINTER_VALIDATE',
|
||||
'ORDER_SUPPLIER_APPROVE',
|
||||
'ORDER_SUPPLIER_REFUSE'
|
||||
'ORDER_SUPPLIER_REFUSE',
|
||||
'SHIPPING_VALIDATE'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -196,6 +198,19 @@ class InterfaceNotification
|
||||
$notify = new Notify($this->db);
|
||||
$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
|
||||
/*
|
||||
|
||||
@ -142,7 +142,8 @@ class EcmDirectory // extends CommonObject
|
||||
|
||||
$dir=$conf->ecm->dir_output.'/'.$this->getRelativePath();
|
||||
$result=dol_mkdir($dir);
|
||||
|
||||
if ($result < 0) { $error++; $this->error="ErrorFailedToCreateDir"; }
|
||||
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
|
||||
@ -118,6 +118,7 @@ if ($action == 'add' && $user->rights->ecm->setup)
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans($ecmdir->error), 'errors');
|
||||
setEventMessage($ecmdir->errors, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* 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);
|
||||
$numAsked = count($object->lines);
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#autofill").click(function() {';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#autofill").click(function() {';
|
||||
$i=0;
|
||||
while($i < $numAsked)
|
||||
{
|
||||
print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
|
||||
$i++;
|
||||
}
|
||||
print '});
|
||||
}
|
||||
print '});
|
||||
jQuery("#autoreset").click(function() {';
|
||||
$i=0;
|
||||
while($i < $numAsked)
|
||||
@ -716,8 +717,8 @@ if ($action == 'create')
|
||||
$i++;
|
||||
}
|
||||
print '});
|
||||
});
|
||||
</script>';
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
@ -904,7 +905,7 @@ if ($action == 'create')
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Create").'"></center>';
|
||||
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
}
|
||||
@ -974,7 +975,18 @@ else
|
||||
{
|
||||
$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>';
|
||||
}
|
||||
/*
|
||||
|
||||
@ -25,12 +25,12 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
|
||||
$langs->load("externalsite@externalsite");
|
||||
$langs->load("externalsite");
|
||||
|
||||
if (empty($conf->global->EXTERNALSITE_URL))
|
||||
{
|
||||
llxHeader();
|
||||
print '<div class="error">Module ExternalSite was not configured properly.</div>';
|
||||
print '<div class="error">'.$langs->trans('ExternalSiteModuleNotComplete').'</div>';
|
||||
llxFooter();
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
require ("../main.inc.php");
|
||||
|
||||
$langs->load("@externalsite");
|
||||
$langs->load("externalsite");
|
||||
|
||||
top_htmlhead("","");
|
||||
top_menu("","","_top");
|
||||
|
||||
@ -1077,7 +1077,7 @@ elseif (! empty($object->id))
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
$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);
|
||||
@ -1762,10 +1762,10 @@ elseif (! empty($object->id))
|
||||
|
||||
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 '<a name="builddoc"></a>'; // ancre
|
||||
|
||||
|
||||
@ -1342,12 +1342,12 @@ else
|
||||
}
|
||||
|
||||
$text=$langs->trans('ConfirmValidateBill',$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('NOTIFY_VAL_FAC_SUP',$object->socid);
|
||||
/*if (! empty($conf->notification->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
$text.='<br>';
|
||||
$text.=$notify->confirmMessage('BILL_SUPPLIER_VALIDATE',$object->socid);
|
||||
}*/
|
||||
$formquestion=array();
|
||||
|
||||
@ -2066,7 +2066,7 @@ else
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
if ($action != 'edit')
|
||||
{
|
||||
|
||||
@ -85,8 +85,9 @@ if ($object->fetch($id))
|
||||
dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
print '<table width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td valign="top" width="50%" class="notopnoleft">';
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
//print '<table width="100%" class="notopnoleftnoright">';
|
||||
//print '<tr><td valign="top" width="50%" class="notopnoleft">';
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
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 '</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;
|
||||
|
||||
$MAXLIST=5;
|
||||
@ -367,9 +372,12 @@ if ($object->fetch($id))
|
||||
}
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
print '</div></div></div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
//print '</td></tr>';
|
||||
//print '</table>' . "\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* 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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -228,7 +228,6 @@ if ($id > 0)
|
||||
print "</tr>\n";
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -242,7 +241,15 @@ $nbaquis=$holiday->getCPforUser($user_id);
|
||||
$nbdeduced=$holiday->getConfCP('nbHolidayDeducted');
|
||||
$nb_holiday = $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 '<table class="noborder" width="100%;">';
|
||||
|
||||
BIN
htdocs/install/doctemplates/thirdparties/template_thirdparty.ods
Normal file
BIN
htdocs/install/doctemplates/thirdparties/template_thirdparty.ods
Normal file
Binary file not shown.
@ -458,7 +458,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
print '<tr><td>';
|
||||
print $langs->trans("ConfFileReload");
|
||||
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"]:"";
|
||||
@ -508,7 +508,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
print $langs->trans("UserCreation").' : ';
|
||||
print $dolibarr_main_db_user;
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("OK").'</td></tr>';
|
||||
print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -542,7 +542,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
print $langs->trans("UserCreation").' : ';
|
||||
print $dolibarr_main_db_user;
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Error").'</td>';
|
||||
print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Affiche aide diagnostique
|
||||
@ -576,7 +576,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : ";
|
||||
print $dolibarr_main_db_name;
|
||||
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();
|
||||
$check2=$newdb->getDefaultCollationDatabase();
|
||||
@ -606,7 +606,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : ";
|
||||
print $dolibarr_main_db_name;
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Error").'</td>';
|
||||
print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Affiche aide diagnostique
|
||||
@ -632,43 +632,35 @@ if (! $error && $db->connected && $action == "set")
|
||||
|
||||
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.
|
||||
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);
|
||||
print "<tr><td>";
|
||||
print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
|
||||
print $dolibarr_main_db_name;
|
||||
print "</td><td>";
|
||||
print $langs->trans("OK");
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok">';
|
||||
print "</td></tr>";
|
||||
|
||||
$error = 0;
|
||||
}
|
||||
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);
|
||||
print "<tr><td>";
|
||||
print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
|
||||
print $dolibarr_main_db_name;
|
||||
print '</td><td>';
|
||||
print $langs->trans("Error");
|
||||
print '<img src="../theme/eldy/img/error.png" alt="Error">';
|
||||
print "</td></tr>";
|
||||
|
||||
// Affiche aide diagnostique
|
||||
@ -688,7 +680,7 @@ if (! $error && $db->connected && $action == "set")
|
||||
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
|
||||
print $dolibarr_main_db_host;
|
||||
print '</td><td>';
|
||||
print '<font class="error">'.$db->error.'</div>';
|
||||
print '<img src="../theme/eldy/img/error.png" alt="Error">';
|
||||
print "</td></tr>";
|
||||
|
||||
// Affiche aide diagnostique
|
||||
@ -938,7 +930,7 @@ function write_conf_file($conffile)
|
||||
print $langs->trans("SaveConfigurationFile");
|
||||
print ' <strong>'.$conffile.'</strong>';
|
||||
print "</td><td>";
|
||||
print $langs->trans("OK");
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok">';
|
||||
print "</td></tr>";
|
||||
}
|
||||
else
|
||||
|
||||
@ -87,12 +87,12 @@ if ($action == "set")
|
||||
if ($db->connected == 1)
|
||||
{
|
||||
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 ;
|
||||
}
|
||||
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)
|
||||
@ -104,7 +104,7 @@ if ($action == "set")
|
||||
else
|
||||
{
|
||||
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 ;
|
||||
}
|
||||
}
|
||||
@ -241,13 +241,13 @@ if ($action == "set")
|
||||
if ($error == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -388,7 +388,7 @@ if ($action == "set")
|
||||
if ($tablefound && $error == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -466,11 +466,11 @@ if ($action == "set")
|
||||
print "<tr><td>".$langs->trans("FunctionsCreation")."</td>";
|
||||
if ($ok)
|
||||
{
|
||||
print "<td>".$langs->trans("OK")."</td></tr>";
|
||||
print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
|
||||
}
|
||||
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 ;
|
||||
}
|
||||
|
||||
@ -588,11 +588,11 @@ if ($action == "set")
|
||||
print "<tr><td>".$langs->trans("ReferenceDataLoading")."</td>";
|
||||
if ($ok)
|
||||
{
|
||||
print "<td>".$langs->trans("OK")."</td></tr>";
|
||||
print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,6 +46,8 @@ ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %
|
||||
ErrorDecimalLargerThanAreForbidden=Error, a precision higher than <b>%s</b> is not supported.
|
||||
DictionnarySetup=Dictionary setup
|
||||
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
|
||||
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.
|
||||
@ -546,6 +548,7 @@ Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
Permission106=Export sendings
|
||||
Permission109=Delete sendings
|
||||
Permission111=Read financial accounts
|
||||
Permission112=Create/modify/delete and compare transactions
|
||||
|
||||
@ -32,7 +32,7 @@ ViewCal=Month view
|
||||
ViewDay=Day view
|
||||
ViewWeek=Week view
|
||||
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.
|
||||
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.
|
||||
|
||||
@ -81,6 +81,7 @@ ActionAC_SHIP=Send shipping by mail
|
||||
ActionAC_SUP_ORD=Send supplier order by mail
|
||||
ActionAC_SUP_INV=Send supplier invoice by mail
|
||||
ActionAC_OTH=Other
|
||||
ActionAC_OTH_AUTO=Other (automatically inserted events)
|
||||
ActionAC_MANUAL=Manually inserted events
|
||||
ActionAC_AUTO=Automatically inserted events
|
||||
Stats=Sales statistics
|
||||
@ -92,4 +93,4 @@ NoData=There is no data
|
||||
StatusProsp=Prospect status
|
||||
DraftPropals=Draft commercial proposals
|
||||
SearchPropal=Search a commercial proposal
|
||||
CommercialDashboard=Commercial summary
|
||||
CommercialDashboard=Commercial summary
|
||||
|
||||
@ -152,4 +152,5 @@ Pcg_type=Pcg type
|
||||
Pcg_subtype=Pcg subtype
|
||||
InvoiceLinesToDispatch=Invoice lines to dispatch
|
||||
InvoiceDispatched=Dispatched invoices
|
||||
AccountancyDashboard=Accountancy summary
|
||||
AccountancyDashboard=Accountancy summary
|
||||
ByProductsAndServices=By products and services
|
||||
|
||||
@ -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).
|
||||
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.
|
||||
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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Dolibarr language file - en_US - externalsite
|
||||
CHARSET=UTF-8
|
||||
ExternalSiteSetup=Setup link to external website
|
||||
ExternalSiteURL=External Site URL
|
||||
ExternalSiteURL=External Site URL
|
||||
ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly.
|
||||
@ -132,4 +132,9 @@ NoCPforMonth=No leave this month.
|
||||
Jours=days
|
||||
nbJours=Number days
|
||||
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
|
||||
|
||||
@ -152,6 +152,7 @@ EMailTextOrderApproved=The order %s has been approved.
|
||||
EMailTextOrderApprovedBy=The order %s has been approved by %s.
|
||||
EMailTextOrderRefused=The order %s has been refused.
|
||||
EMailTextOrderRefusedBy=The order %s has been refused by %s.
|
||||
EMailTextExpeditionValidated=The shipping %s has been validated.
|
||||
ImportedWithSet=Importation data set
|
||||
DolibarrNotification=Automatic notification
|
||||
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...
|
||||
|
||||
@ -111,10 +111,12 @@ ServiceLimitedDuration=If product is a service with limited duration:
|
||||
MultiPricesAbility=Activate the multi-prices
|
||||
MultiPricesNumPrices=Number of price
|
||||
MultiPriceLevelsName=Price categories
|
||||
AssociatedProductsAbility=Activate the sub-products
|
||||
AssociatedProducts=Sub-products
|
||||
AssociatedProductsNumber=Number of products composing this product
|
||||
ParentProductsNumber=Number of parent product
|
||||
AssociatedProductsAbility=Activate the virtual products feature
|
||||
AssociatedProducts=Virtual product
|
||||
AssociatedProductsNumber=Number of products composing this virtual product
|
||||
ParentProductsNumber=Number of parent virtual product
|
||||
IfZeroItIsNotAVirtualProduct=If 0, this product is not a virtual product
|
||||
IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any virtual product
|
||||
EditAssociate=Associate
|
||||
Translation=Translation
|
||||
KeywordFilter=Keyword filter
|
||||
@ -124,7 +126,7 @@ AddDel=Add/Delete
|
||||
Quantity=Quantity
|
||||
NoMatchFound=No match found
|
||||
ProductAssociationList=List of related products/services: name of product/service (quantity affected)
|
||||
ProductParentList=List of products/services with this product as a component
|
||||
ProductParentList=List of virtual products/services with this product as a component
|
||||
ErrorAssociationIsFatherOfThis=One of selected product is parent with current product
|
||||
DeleteProduct=Delete a product/service
|
||||
ConfirmDeleteProduct=Are you sure you want to delete this product/service?
|
||||
@ -184,4 +186,14 @@ AlwaysUseNewPrice=Always use current price of product/service
|
||||
AlwaysUseFixedPrice=Use the fixed price
|
||||
PriceByQuantity=Price by quantity
|
||||
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
|
||||
|
||||
@ -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.
|
||||
DictionnarySetup=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
|
||||
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.
|
||||
@ -290,7 +292,7 @@ ServerNotAvailableOnIPOrPort=Servidor no disponible en la dirección <b>%s</b> e
|
||||
DoTestServerAvailability=Probar conectividad con el servidor
|
||||
DoTestSend=Probar envío
|
||||
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.
|
||||
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
|
||||
@ -481,6 +483,8 @@ Module2900Name=GeoIPMaxmind
|
||||
Module2900Desc=Capacidades de conversión GeoIP Maxmind
|
||||
Module5000Name=Multi-empresa
|
||||
Module5000Desc=Permite gestionar varias empresas
|
||||
Module6000Name=Workflow
|
||||
Module6000Desc=Gestión de flujos de trabajo
|
||||
Module20000Name=Días libres
|
||||
Module20000Desc=Gestión de los días libres de los empleados
|
||||
Module50000Name=PayBox
|
||||
@ -544,6 +548,7 @@ Permission98=Desglosar líneas de facturas
|
||||
Permission101=Consultar expediciones
|
||||
Permission102=Crear/modificar expediciones
|
||||
Permission104=Validar expediciones
|
||||
Permission106=Exportar expediciones
|
||||
Permission109=Eliminar expediciones
|
||||
Permission111=Consultar cuentas financieras (cuentas bancarias, cajas)
|
||||
Permission112=Crear/modificar cantidad/eliminar registros bancarios
|
||||
@ -914,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
|
||||
TotalPriceAfterRounding=Precio total después del redondeo
|
||||
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.
|
||||
SeeLocalSendMailSetup=Ver la configuración local de sendmail
|
||||
BackupDesc=Para realizar una copia de seguridad completa de Dolibarr, usted debe:
|
||||
|
||||
@ -250,7 +250,7 @@ Deposit=Anticipo
|
||||
Deposits=Anticipos
|
||||
DiscountFromCreditNote=Descuento resultante del abono %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
|
||||
NewGlobalDiscount=Nuevo descuento fijo
|
||||
NewRelativeDiscount=Nuevo descuento
|
||||
|
||||
@ -81,6 +81,7 @@ ActionAC_SHIP=Envío expedición por correo
|
||||
ActionAC_SUP_ORD=Envío pedido a proveedor por correo
|
||||
ActionAC_SUP_INV=Envío factura de proveedor por correo
|
||||
ActionAC_OTH=Otra
|
||||
ActionAC_OTH_AUTO=Otra (eventos insertados automáticamente)
|
||||
ActionAC_MANUAL=Eventos creados manualmente
|
||||
ActionAC_AUTO=Eventos creados automáticamente
|
||||
Stats=Estadísticas de venta
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Dolibarr language file - es_ES - externalsite
|
||||
CHARSET=UTF-8
|
||||
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.
|
||||
@ -132,4 +132,9 @@ NoCPforMonth=Sin vacaciones este mes.
|
||||
Jours=días
|
||||
nbJours=Número de días
|
||||
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
|
||||
@ -151,6 +151,7 @@ EMailTextOrderApproved=Pedido %s aprobado
|
||||
EMailTextOrderApprovedBy=Pedido %s aprobado por %s
|
||||
EMailTextOrderRefused=Pedido %s rechazado
|
||||
EMailTextOrderRefusedBy=Pedido %s rechazado por %s
|
||||
EMailTextExpeditionValidated=El envío %s ha sido validado.
|
||||
ImportedWithSet=Lote de importación (import key)
|
||||
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 ...
|
||||
|
||||
@ -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.
|
||||
DictionnarySetup= Dictionnaires
|
||||
Dictionnary= Dictionnaires
|
||||
ErrorReservedTypeSystemSystemAuto=
|
||||
ErrorCodeCantContainZero=
|
||||
DisableJavascript= Désactiver les fonctions Javascript et 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.
|
||||
@ -545,6 +547,7 @@ Permission98= Ventiler les lignes de factures
|
||||
Permission101= Consulter les expéditions
|
||||
Permission102= Créer/modifier les expéditions
|
||||
Permission104= Valider les expéditions
|
||||
Permission106= Exporter les expéditions
|
||||
Permission109= Supprimer les expéditions
|
||||
Permission111= Consulter les comptes financiers (comptes bancaires, caisses)
|
||||
Permission112= Créer/modifier montant/supprimer écritures bancaires
|
||||
|
||||
@ -32,7 +32,7 @@ ViewCal=Vue mois
|
||||
ViewDay=Vue jour
|
||||
ViewWeek=Vue semaine
|
||||
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.
|
||||
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.
|
||||
|
||||
@ -81,6 +81,7 @@ ActionAC_SHIP=Envoi bon d'expédition par mail
|
||||
ActionAC_SUP_ORD=Envoi commande fournisseur par mail
|
||||
ActionAC_SUP_INV=Envoi facture fournisseur par mail
|
||||
ActionAC_OTH=Autre
|
||||
ActionAC_OTH_AUTO=Autre (evênements insérés automatiquement)
|
||||
ActionAC_MANUAL=Evênements insérés manuellement
|
||||
ActionAC_AUTO=Evênements insérés automatiquement
|
||||
Stats=Statistiques de vente
|
||||
|
||||
@ -163,4 +163,5 @@ Pcg_type=Classe de compte
|
||||
Pcg_subtype=Sous classe de compte
|
||||
InvoiceLinesToDispatch=Lignes de factures à ventiler
|
||||
InvoiceDispatched=Factures ventilées
|
||||
AccountancyDashboard=Synthèse compta/tréso
|
||||
AccountancyDashboard=Synthèse compta/tréso
|
||||
ByProductsAndServices=Par produits et services
|
||||
|
||||
@ -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)
|
||||
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.
|
||||
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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Dolibarr language file - fr_FR - externalsite
|
||||
CHARSET=UTF-8
|
||||
ExternalSiteSetup=Configuration du lien vers le site externe
|
||||
ExternalSiteURL=URL du site externe
|
||||
ExternalSiteURL=URL du site externe
|
||||
ExternalSiteModuleNotComplete=
|
||||
@ -130,4 +130,9 @@ NoCPforMonth=Aucun congé ce mois-ci.
|
||||
Jours=jours
|
||||
nbJours=Nombre jours
|
||||
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
|
||||
|
||||
@ -3,9 +3,9 @@ CHARSET=UTF-8
|
||||
DIRECTION=ltr
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
FormatDateShort=%d/%m/%y
|
||||
FormatDateShort=%d/%m/%Y
|
||||
FormatDateShortInput=%d/%m/%Y
|
||||
FormatDateShortJava=dd/MM/yy
|
||||
FormatDateShortJava=dd/MM/yyyy
|
||||
FormatDateShortJavaInput=dd/MM/yyyy
|
||||
FormatDateShortJQuery=dd/mm/yy
|
||||
FormatDateShortJQueryInput=dd/mm/yy
|
||||
|
||||
@ -151,6 +151,7 @@ EMailTextOrderApproved=La commande %s a été approuvée.
|
||||
EMailTextOrderApprovedBy=La commande %s a été approuvée par %s.
|
||||
EMailTextOrderRefused=La commande %s a été refusée.
|
||||
EMailTextOrderRefusedBy=La commande %s a été refusée par %s.
|
||||
EMailTextExpeditionValidated=
|
||||
ImportedWithSet=Lot d'importation (Import key)
|
||||
DolibarrNotification=Notification automatique
|
||||
ResizeDesc=Entrer la nouvelle largeur <b>OU</b> la nouvelle hauteur. Le ratio est conservé lors du redimensionnement...
|
||||
|
||||
@ -111,11 +111,13 @@ ServiceLimitedDuration=Si produit de type service à durée limitée :
|
||||
MultiPricesAbility=Prise en charge de prix multiples
|
||||
MultiPricesNumPrices=Nombre de prix
|
||||
MultiPriceLevelsName=Catégorie de prix
|
||||
AssociatedProductsAbility=Prise en charge des produits composés
|
||||
AssociatedProducts=Composition
|
||||
AssociatedProductsNumber=Nbre de sous-produits composant ce produit
|
||||
ParentProductsNumber=Nbre de produits parent
|
||||
EditAssociate=Composer
|
||||
AssociatedProductsAbility=Prise en charge des produits virtuels
|
||||
AssociatedProducts=Produit virtuel
|
||||
AssociatedProductsNumber=Nbre de sous-produits constituant ce produit virtuel
|
||||
ParentProductsNumber=Nbre de produits virtuels parent
|
||||
IfZeroItIsNotAVirtualProduct=Si 0, ce produit n'est pas un produit virtuel
|
||||
IfZeroItIsNotUsedByVirtualProduct=Si 0, ce produit n'est pas utilisé par un produit virtuel
|
||||
EditAssociate=Composer comme produit virtuel
|
||||
Translation=Traduction
|
||||
KeywordFilter=Filtre par mot-clé
|
||||
CategoryFilter=Filtre par catégorie
|
||||
@ -123,8 +125,8 @@ ProductToAddSearch=Recherche des produits à ajouter
|
||||
AddDel=Ajouter/Retirer
|
||||
Quantity=Quantité
|
||||
NoMatchFound=Aucun résultat n'a été trouvé
|
||||
ProductAssociationList=Liste des produits/services composant ce produit: Le nombre entre parenthèse est la quantité affectée dans cette composition.
|
||||
ProductParentList=Liste des produits/services avec ce produit comme composante
|
||||
ProductAssociationList=Liste des produits/services composant ce produit virtuel: Le nombre entre parenthèse est la quantité affectée dans cette composition.
|
||||
ProductParentList=Liste des produits/services virtuels avec ce produit comme composante
|
||||
ErrorAssociationIsFatherOfThis=L'un des produits sélectionnés est parent du produit en cours
|
||||
DeleteProduct=Supprimer un produit/service
|
||||
ConfirmDeleteProduct=Êtes-vous sûr de vouloir supprimer ce produit/service ?
|
||||
@ -184,4 +186,12 @@ AlwaysUseNewPrice=Toujours utiliser le prix du jour
|
||||
AlwaysUseFixedPrice=Utiliser le prix fixé
|
||||
PriceByQuantity=Prix par quantité
|
||||
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
|
||||
|
||||
@ -1797,8 +1797,16 @@ class Product extends CommonObject
|
||||
*/
|
||||
function add_sousproduit($id_pere, $id_fils,$qty)
|
||||
{
|
||||
$sql = 'DELETE from '.MAIN_DB_PREFIX.'product_association';
|
||||
$sql .= ' WHERE fk_product_pere = "'.$id_pere.'" AND fk_product_fils = "'.$id_fils.'"';
|
||||
// Clean parameters
|
||||
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))
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
@ -1806,37 +1814,27 @@ class Product extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$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))
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
$num = $this->db->num_rows($result);
|
||||
if($num > 0)
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
if($num > 0)
|
||||
$this->error="isFatherOfThis";
|
||||
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;
|
||||
}
|
||||
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))
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
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_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)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association";
|
||||
$sql.= " WHERE fk_product_pere = '".$fk_parent."'";
|
||||
$sql.= " AND fk_product_fils = '".$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.= " WHERE fk_product_pere = ".$fk_parent;
|
||||
$sql.= " AND fk_product_fils = ".$fk_child;
|
||||
|
||||
dol_syslog(get_class($this).'::del_sousproduit sql='.$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
@ -2120,7 +2122,7 @@ class Product extends CommonObject
|
||||
* Define value of this->res
|
||||
*
|
||||
* @param array $prod Products array
|
||||
* @param string $compl_path Directory path
|
||||
* @param string $compl_path Directory path of parents to add before
|
||||
* @param int $multiply Because each sublevel must be multiplicated by parent nb
|
||||
* @param int $level Init level
|
||||
* @return void
|
||||
@ -2130,65 +2132,36 @@ class Product extends CommonObject
|
||||
global $conf,$langs;
|
||||
|
||||
$product = new Product($this->db);
|
||||
foreach($prod as $nom_pere => $desc_pere)
|
||||
//var_dump($prod);
|
||||
foreach($prod as $id_product => $desc_pere) // nom_pere is 0 or id of sub_product
|
||||
{
|
||||
if (is_array($desc_pere)) // If this parent desc is an array, this is an array of childs
|
||||
{
|
||||
$id=(! empty($desc_pere[0]) ? $desc_pere[0] :'');
|
||||
$nb=(! empty($desc_pere[1]) ? $desc_pere[1] :'');
|
||||
$type=(! empty($desc_pere[2]) ? $desc_pere[2] :'');
|
||||
$label=(! empty($desc_pere[3]) ? $desc_pere[3] :'');
|
||||
if ($multiply < 1) $multiply=1;
|
||||
|
||||
if ($multiply)
|
||||
{
|
||||
//print "XXX ".$desc_pere[1]." multiply=".$multiply;
|
||||
$img="";
|
||||
$this->fetch($id);
|
||||
$this->load_stock();
|
||||
if ($this->stock_warehouse[1]->real < $this->seuil_stock_alerte)
|
||||
{
|
||||
$img=img_warning($langs->trans("StockTooLow"));
|
||||
}
|
||||
$this->res[]= array(
|
||||
/* "<tr><td> ->
|
||||
<a href=\"".DOL_URL_ROOT."/product/fiche.php?id=".$desc_pere[0]."\">".$compl_path.stripslashes($nom_pere)."
|
||||
</a> (".$desc_pere[1].")</td><td align=\"center\"> ".($desc_pere[1]*$multiply)."</td><td> </td><td> </td>
|
||||
<td align=\"center\">".$this->stock_entrepot[1]." ".$img."</td></tr>",
|
||||
$desc_pere[0], // Id product
|
||||
*/ 'id'=>$id, // Id product
|
||||
'nb'=>$nb, // Nb of units that compose parent product
|
||||
'nb_total'=>$nb*$multiply, // Nb of units for all nb of product
|
||||
'stock'=>$this->stock_warehouse[1]->real, // Stock
|
||||
'stock_alert'=>$this->seuil_stock_alerte, // Stock alert
|
||||
'fullpath' => $compl_path.$nom_pere, // Label
|
||||
'type'=>$type // Nb of units that compose parent product
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->fetch($desc_pere[0]);
|
||||
$this->load_stock();
|
||||
$this->res[]= array(
|
||||
/* $compl_path.$nom_pere." (".$desc_pere[1].")",
|
||||
$desc_pere[0], // Id product
|
||||
*/ 'id'=>$id, // Id product
|
||||
//print "XXX We add id=".$id." - label=".$label." - nb=".$nb." - multiply=".$multiply." fullpath=".$compl_path.$label."\n";
|
||||
$this->fetch($id);
|
||||
$this->load_stock();
|
||||
$this->res[]= array(
|
||||
'id'=>$id, // Id product
|
||||
'nb'=>$nb, // Nb of units that compose parent product
|
||||
'nb_total'=>$nb, // Nb of units for all nb of product
|
||||
'stock'=>$this->stock_warehouse[1]->real, // Stock
|
||||
'nb_total'=>$nb*$multiply, // Nb of units for all nb of product
|
||||
'stock'=>$this->stock_warehouse[1]->real, // Stock
|
||||
'stock_alert'=>$this->seuil_stock_alerte, // Stock alert
|
||||
'fullpath' => $compl_path.$nom_pere, // Label
|
||||
'type'=>$type // Nb of units that compose parent product
|
||||
);
|
||||
}
|
||||
}
|
||||
else if($nom_pere != "0" && $nom_pere != "1")
|
||||
{
|
||||
$this->res[]= array($compl_path.$nom_pere,$desc_pere);
|
||||
'fullpath' => $compl_path.$label, // Label
|
||||
'type'=>$type // Nb of units that compose parent product
|
||||
);
|
||||
}
|
||||
|
||||
// Recursive call if child is an array
|
||||
if (is_array($desc_pere[0]))
|
||||
if (is_array($desc_pere['childs']))
|
||||
{
|
||||
$this ->fetch_prod_arbo($desc_pere[0], $nom_pere." -> ", $desc_pere[1]*$multiply, $level+1);
|
||||
//print 'YYY We go down for '.$desc_pere[3]." -> \n";
|
||||
$this ->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1]*$multiply, $level+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2225,11 +2198,12 @@ class Product extends CommonObject
|
||||
$this->res = array();
|
||||
if (isset($this->sousprods) && is_array($this->sousprods))
|
||||
{
|
||||
foreach($this->sousprods as $nom_pere => $desc_pere)
|
||||
foreach($this->sousprods as $prod_name => $desc_product)
|
||||
{
|
||||
if (is_array($desc_pere)) $this->fetch_prod_arbo($desc_pere,"",$multiply);
|
||||
if (is_array($desc_product)) $this->fetch_prod_arbo($desc_product,"",$multiply);
|
||||
}
|
||||
}
|
||||
//var_dump($this->res);
|
||||
return $this->res;
|
||||
}
|
||||
|
||||
@ -2290,7 +2264,7 @@ class Product extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Return all parent products fo current product
|
||||
* Return all direct parent products fo current product
|
||||
*
|
||||
* @return array prod
|
||||
*/
|
||||
@ -2321,19 +2295,19 @@ class Product extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Return childs of product with if fk_parent
|
||||
* Return childs of product $id
|
||||
*
|
||||
* @param int $fk_parent Id of product to search childs of
|
||||
* @param int $id Id of product to search childs of
|
||||
* @return array Prod
|
||||
*/
|
||||
function getChildsArbo($fk_parent)
|
||||
function getChildsArbo($id)
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.label as label, pa.qty as qty, pa.fk_product_fils as id, p.fk_product_type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."product_association as pa";
|
||||
$sql.= " WHERE p.rowid = pa.fk_product_fils";
|
||||
$sql.= " AND pa.fk_product_pere = ".$fk_parent;
|
||||
$sql.= " AND pa.fk_product_fils != ".$fk_parent; // This should not happens, it is to avoid invinite loop if it happens
|
||||
$sql.= " AND pa.fk_product_pere = ".$id;
|
||||
$sql.= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens
|
||||
|
||||
dol_syslog(get_class($this).'::getChildsArbo sql='.$sql);
|
||||
$res = $this->db->query($sql);
|
||||
@ -2348,7 +2322,7 @@ class Product extends CommonObject
|
||||
$listofchilds=$this->getChildsArbo($rec['id']);
|
||||
foreach($listofchilds as $keyChild => $valueChild)
|
||||
{
|
||||
$prods[$rec['rowid']][$keyChild] = $valueChild;
|
||||
$prods[$rec['rowid']]['childs'][$keyChild] = $valueChild;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2370,14 +2344,14 @@ class Product extends CommonObject
|
||||
function get_sousproduits_arbo()
|
||||
{
|
||||
$parent = $this->getParent();
|
||||
foreach($parent as $key => $value)
|
||||
foreach($parent as $key => $value) // key=label, value[0]=id
|
||||
{
|
||||
foreach($this->getChildsArbo($value[0]) as $keyChild => $valueChild)
|
||||
{
|
||||
$parent[$key][$keyChild] = $valueChild;
|
||||
}
|
||||
}
|
||||
foreach($parent as $key => $value)
|
||||
foreach($parent as $key => $value) // key=label, value is array of childs
|
||||
{
|
||||
$this->sousprods[$key] = $value;
|
||||
}
|
||||
@ -2412,6 +2386,10 @@ class Product extends CommonObject
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/composition/fiche.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else if ($option == 'category')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=0">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$this->id.'">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
@ -72,8 +72,8 @@ $cancel <> $langs->trans("Cancel") &&
|
||||
$error=0;
|
||||
for($i=0;$i<$_POST["max_prod"];$i++)
|
||||
{
|
||||
// print "<br> : ".$_POST["prod_id_chk".$i];
|
||||
if($_POST["prod_id_chk".$i] != "")
|
||||
print "<br> : ".$_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)
|
||||
{
|
||||
@ -198,15 +198,18 @@ if ($id || $ref)
|
||||
print '</tr>';
|
||||
|
||||
// Number of subproducts
|
||||
$prodsfather = $product->getFather(); //Parent Products
|
||||
$prodsfather = $product->getFather(); // Parent Products
|
||||
$product->get_sousproduits_arbo();
|
||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>'.count($product->get_arbo_each_prod()).'</td>';
|
||||
$prods_arbo=$product->get_arbo_each_prod();
|
||||
$nbofsubproducts=count($prods_arbo);
|
||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>';
|
||||
print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct'));
|
||||
print '</td>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// List of subproducts
|
||||
$prods_arbo = $product->get_arbo_each_prod();
|
||||
// List of products into this virtual product
|
||||
if (count($prods_arbo) > 0)
|
||||
{
|
||||
print '<tr><td colspan="2">';
|
||||
@ -223,6 +226,7 @@ if ($id || $ref)
|
||||
//print $productstatic->getNomUrl(1).'<br>';
|
||||
//print $value[0]; // This contains a tr line.
|
||||
print '<tr>';
|
||||
//print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].($value['nb_total'] > $value['nb']?'->'.$value['nb_total']:'').')    </td>';
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')    </td>';
|
||||
if (! empty($conf->stock->enabled)) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
|
||||
print '</tr>';
|
||||
@ -231,8 +235,10 @@ if ($id || $ref)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Number of parent products
|
||||
print '<tr><td>'.$langs->trans("ParentProductsNumber").'</td><td>'.count($prodsfather).'</td>';
|
||||
// Number of parent virtual products
|
||||
print '<tr><td>'.$langs->trans("ParentProductsNumber").'</td><td>';
|
||||
print $form->textwithpicto(count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct'));
|
||||
print '</td>';
|
||||
|
||||
if (count($prodsfather) > 0)
|
||||
{
|
||||
@ -286,12 +292,14 @@ if ($id || $ref)
|
||||
// Number of subproducts
|
||||
$prodsfather = $product->getFather(); //Parent Products
|
||||
$product->get_sousproduits_arbo();
|
||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>'.count($product->get_arbo_each_prod()).'</td>';
|
||||
$prods_arbo=$product->get_arbo_each_prod();
|
||||
$nbofsubproducts=count($prods_arbo);
|
||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>';
|
||||
print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct'));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// List of subproducts
|
||||
$prods_arbo = $product->get_arbo_each_prod();
|
||||
//var_dump($prods_arbo);
|
||||
if(count($prods_arbo) > 0)
|
||||
{
|
||||
print '<tr><td colspan="2">';
|
||||
@ -316,8 +324,10 @@ if ($id || $ref)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Number of parent products
|
||||
print '<tr><td>'.$langs->trans("ParentProductsNumber").'</td><td>'.count($prodsfather).'</td>';
|
||||
// Number of parent virtual products
|
||||
print '<tr><td>'.$langs->trans("ParentProductsNumber").'</td><td>';
|
||||
print $form->textwithpicto(count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct'));
|
||||
print '</td>';
|
||||
|
||||
if (count($prodsfather) > 0)
|
||||
{
|
||||
|
||||
@ -183,6 +183,7 @@ class Task extends CommonObject
|
||||
$sql.= " t.label,";
|
||||
$sql.= " t.description,";
|
||||
$sql.= " t.duration_effective,";
|
||||
$sql.= " t.datec,";
|
||||
$sql.= " t.dateo,";
|
||||
$sql.= " t.datee,";
|
||||
$sql.= " t.fk_user_creat,";
|
||||
|
||||
@ -93,7 +93,11 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$projectstatic->fetch($object->fk_project);
|
||||
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
if (! empty($projectstatic->socid)) {
|
||||
$projectstatic->fetch_thirdparty();
|
||||
}
|
||||
|
||||
$object->project = dol_clone($projectstatic);
|
||||
|
||||
$upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
@ -114,7 +118,7 @@ if ($action=='delete')
|
||||
{
|
||||
$langs->load("other");
|
||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
$ret=dol_delete_file($file);
|
||||
$ret=dol_delete_file($file,0,0,0,$object);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||
|
||||
@ -1455,6 +1455,15 @@ class Societe extends CommonObject
|
||||
{
|
||||
$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
|
||||
if (empty($lien))
|
||||
{
|
||||
@ -1462,7 +1471,7 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
// Add type of canvas
|
||||
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
|
||||
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
|
||||
|
||||
@ -22,10 +22,10 @@
|
||||
* \ingroup core
|
||||
*/
|
||||
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$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_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
|
||||
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$theme_bordercolor = array(235,235,224);
|
||||
$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_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
|
||||
|
||||
?>
|
||||
|
||||
@ -21,25 +21,28 @@
|
||||
|
||||
/**
|
||||
* \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('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('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('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
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
|
||||
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_head=dol_buildpath($path.'/theme/'.$theme.'/img/headbg2.jpg',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 {
|
||||
@ -84,31 +130,17 @@ font-size:100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color:#f5f5f5;
|
||||
<?php if ($_SESSION['dol_login'] != '') {?>
|
||||
<?php if (GETPOST("optioncss") != 'print') {?>
|
||||
background-image:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/vmenu.png',1); ?>);
|
||||
background-repeat:repeat-y;
|
||||
margin:0px;
|
||||
<?php } ?>
|
||||
<?php } else {?>
|
||||
background-image:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/background_login.png',1); ?>);
|
||||
margin:100px;
|
||||
<?php } ?>
|
||||
<?php if (GETPOST("optioncss") == 'print' || ! empty($conf->dol_optimize_smallscreen)) { ?>
|
||||
background-color: #FFFFFF;
|
||||
<?php } else { ?>
|
||||
background-color: <?php print $colorbackbody; ?>;
|
||||
<?php } ?>
|
||||
color:#232323;
|
||||
font-size:<?php print $fontsize ?>px;
|
||||
font-family:<?php print $fontlist ?>;
|
||||
|
||||
<?php print 'direction:'.$langs->trans("DIRECTION").";\n"; ?>
|
||||
}
|
||||
|
||||
.checkVatPopup {
|
||||
background-color:#f5f5f5;
|
||||
background-image:none;
|
||||
margin:10px;
|
||||
line-height:16px;
|
||||
}
|
||||
|
||||
a {
|
||||
font-family:<?php print $fontlist ?>;
|
||||
font-weight:bold;
|
||||
@ -194,6 +226,15 @@ div.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 {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@ -211,11 +252,104 @@ 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 */
|
||||
|
||||
body.body center { color:white; margin-top: 100px; }
|
||||
|
||||
form#login {
|
||||
display:block;
|
||||
@ -329,96 +463,6 @@ table.login_table .vmenu {
|
||||
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 {
|
||||
position:absolute;
|
||||
top:5px;
|
||||
@ -438,19 +482,23 @@ div.login_block table {
|
||||
|
||||
div.login {
|
||||
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;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
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;
|
||||
text-decoration:none;
|
||||
color:#ffffff;
|
||||
color: white;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
div.login_main_home {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Menu gauche */
|
||||
@ -461,6 +509,9 @@ div.vmenu {
|
||||
display:none;
|
||||
<?php } else {?>
|
||||
width:170px;
|
||||
-moz-box-shadow: 4px 4px 4px #CCC;
|
||||
-webkit-box-shadow: 4px 4px 4px #CCC;
|
||||
box-shadow: 4px 4px 4px #CCC;
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
@ -773,8 +824,11 @@ div.tabs {
|
||||
div.tabBar {
|
||||
background-color:#ffffff;
|
||||
padding:6px;
|
||||
margin:3px 0px 5px;
|
||||
margin:3px 0px 14px 0px;
|
||||
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 {
|
||||
@ -865,7 +919,7 @@ div.fichehalfright {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
|
||||
}
|
||||
div.ficheaddleft {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 16px;\n"; }
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 16px;\n"; }
|
||||
else print "margin-top: 10px;\n"; ?>
|
||||
}
|
||||
|
||||
@ -1066,7 +1120,7 @@ table.liste {
|
||||
|
||||
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;
|
||||
background-color:rgba(0,0,0,.2);
|
||||
background-image:linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
@ -1116,13 +1170,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;}
|
||||
|
||||
.impair {
|
||||
background:#f4f4f4;
|
||||
background:#fdfdfd;
|
||||
font-family:<?php print $fontlist ?>;
|
||||
border:0px;
|
||||
}
|
||||
|
||||
.pair {
|
||||
background:#eaeaea;
|
||||
background:#f4f4f4;
|
||||
font-family:<?php print $fontlist ?>;
|
||||
border:0px;
|
||||
}
|
||||
@ -1147,12 +1201,12 @@ tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td {paddin
|
||||
}
|
||||
|
||||
tr.box_impair {
|
||||
background:#f4f4f4;
|
||||
background:#fdfdfd;
|
||||
font-family:<?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
tr.box_pair {
|
||||
background:#eaeaea;
|
||||
background:#f4f4f4;
|
||||
font-family:<?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
@ -1423,7 +1477,7 @@ td.dpHead {
|
||||
|
||||
/* Jour courant */
|
||||
.dpSelected {
|
||||
background-color:#a61111;
|
||||
background-color:#0B63A2;
|
||||
color:#ffffff;
|
||||
font-weight:bold;
|
||||
}
|
||||
@ -1468,7 +1522,7 @@ td.dpHead {
|
||||
padding:0px 2px;
|
||||
font-size:9px;
|
||||
border-width:0px;
|
||||
color:#a61111;
|
||||
color:#0B63A2;
|
||||
vertical-align:middle;
|
||||
cursor:pointer;
|
||||
}
|
||||
@ -1499,17 +1553,9 @@ table.cal_month { border-spacing: 0px; }
|
||||
.cal_current_month_right { border-right: solid 1px #E0E0E0; }
|
||||
.cal_other_month_right { border-right: solid 1px #C0C0C0; }
|
||||
|
||||
.cal_other_month {
|
||||
background:#dddddd;
|
||||
}
|
||||
|
||||
.cal_past_month {
|
||||
background:#eeeeee;
|
||||
}
|
||||
|
||||
.cal_current_month {
|
||||
background:#ffffff;
|
||||
}
|
||||
.cal_other_month { opacity: 0.6; background: #EAEAEA; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||
.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_today {
|
||||
background:#ffffff;
|
||||
@ -1518,37 +1564,19 @@ table.cal_month { border-spacing: 0px; }
|
||||
|
||||
div.dayevent table.nobordernopadding tr td {padding:1px;}
|
||||
|
||||
table.cal_event {
|
||||
border-collapse:collapse;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
|
||||
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 { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
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));
|
||||
}
|
||||
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; }
|
||||
|
||||
.cal_event a:link {
|
||||
color:#232323;
|
||||
font-size:11px;
|
||||
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;
|
||||
}
|
||||
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); }
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -58,6 +58,8 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$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
|
||||
$theme='eldy'; // Value of theme
|
||||
@ -198,7 +200,7 @@ if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
|
||||
?>
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Styles par defaut */
|
||||
/* Default styles */
|
||||
/* ============================================================================== */
|
||||
|
||||
body {
|
||||
@ -304,8 +306,8 @@ input[type=image] { background-color: transparent; border: none; box-shadow: non
|
||||
box-shadow: 4px 4px 4px #CCC;
|
||||
}
|
||||
form {
|
||||
padding: 0em 0em 0em 0em;
|
||||
margin: 0em 0em 0em 0em;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
div.float
|
||||
{
|
||||
@ -852,9 +854,9 @@ td.vmenu {
|
||||
|
||||
.vmenu {
|
||||
margin-left: 4px;
|
||||
<?php if (GETPOST("optioncss") == 'print') { ?>
|
||||
<?php if (GETPOST("optioncss") == 'print') { ?>
|
||||
display: none;
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
.menu_contenu { padding-top: 1px; }
|
||||
@ -1317,11 +1319,14 @@ div.tabsAction {
|
||||
|
||||
|
||||
a.tabTitle {
|
||||
background: #657090;
|
||||
color: white;
|
||||
/* background: #657090;
|
||||
color: white;*/
|
||||
color:rgba(0,0,0,.5);
|
||||
margin-right:10px;
|
||||
text-shadow:1px 1px 1px #ffffff;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
padding: 0px 6px 2px 6px;
|
||||
padding: 4px 6px 2px 6px;
|
||||
margin: 0px 6px;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
@ -1329,7 +1334,7 @@ a.tabTitle {
|
||||
|
||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
padding: 2px 6px 2px 6px;
|
||||
padding: 4px 6px 2px 6px;
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
@ -1364,6 +1369,7 @@ a.tab#active {
|
||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active
|
||||
{
|
||||
color: #<?php echo $colortextmain; ?>;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
a.tabimage {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user