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

This commit is contained in:
Laurent Destailleur 2013-07-23 18:37:09 +02:00
commit 30cd4aeced
17 changed files with 121 additions and 78 deletions

View File

@ -67,7 +67,6 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
$refreshaction='refresh_'.$this->boxcode; $refreshaction='refresh_'.$this->boxcode;
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$facturestatic=new Facture($db);
$text = $langs->trans("BoxSuppliersInvoicesPerMonth",$max); $text = $langs->trans("BoxSuppliersInvoicesPerMonth",$max);
$this->info_box_head = array( $this->info_box_head = array(

View File

@ -67,7 +67,6 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
$refreshaction='refresh_'.$this->boxcode; $refreshaction='refresh_'.$this->boxcode;
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
$facturestatic=new Facture($db);
$text = $langs->trans("BoxSuppliersOrdersPerMonth",$max); $text = $langs->trans("BoxSuppliersOrdersPerMonth",$max);
$this->info_box_head = array( $this->info_box_head = array(

View File

@ -140,7 +140,7 @@ class FormFile
if (empty($sectionid)) $out .= '<br>'; if (empty($sectionid)) $out .= '<br>';
$out .= "\n<!-- End form attach new file -->\n\n"; $out .= "\n<!-- End form attach new file -->\n\n";
$parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url); $parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url, 'perm'=>$perm);
$res = $hookmanager->executeHooks('formattachOptions',$parameters,$object); $res = $hookmanager->executeHooks('formattachOptions',$parameters,$object);
if (empty($res)) if (empty($res))
{ {

View File

@ -86,6 +86,23 @@ function societe_prepare_head($object)
if ($user->societe_id == 0) if ($user->societe_id == 0)
{ {
if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Referers");
$head[$h][2] = 'consumption';
$h++;
}
// Notifications
if (! empty($conf->notification->enabled))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Notifications");
$head[$h][2] = 'notify';
$h++;
}
// Notes // Notes
$nbNote = 0; $nbNote = 0;
if(!empty($object->note_private)) $nbNote++; if(!empty($object->note_private)) $nbNote++;
@ -96,32 +113,15 @@ function societe_prepare_head($object)
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Referers");
$head[$h][2] = 'consumption';
$h++;
}
// Attached files // Attached files
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->societe->multidir_output[$object->entity] . "/" . $object->id; $upload_dir = $conf->societe->dir_output . "/" . $object->id;
$nbFiles = count(dol_dir_list($upload_dir)); $nbFiles = count(dol_dir_list($upload_dir));
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')'; if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;
// Notifications
if (! empty($conf->notification->enabled))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Notifications");
$head[$h][2] = 'notify';
$h++;
}
} }
// Log // Log

View File

@ -55,14 +55,22 @@ function contract_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note"); $head[$h][1] = $langs->trans("Notes");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->contrat->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -67,14 +67,22 @@ function fichinter_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->ficheinter->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -58,18 +58,22 @@ function facturefourn_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$object->ref;
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id;
/*$filesdir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($fac->id,2).$fac->id;
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$listoffiles=dol_dir_list($filesdir,'files',1);
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
@ -126,18 +130,22 @@ function ordersupplier_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->fournisseur->dir_output . "/commande/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id;
/*$filesdir = $conf->fournisseur->dir_output . "/commande/" . dol_sanitizeFileName($commande->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$listoffiles=dol_dir_list($filesdir,'files',1);
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -74,18 +74,22 @@ function facture_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id;
/*$filesdir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($fac->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$listoffiles=dol_dir_list($filesdir,'files',1);
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -82,23 +82,27 @@ function commande_prepare_head($object)
// $this->tabs = array('entity:-tabname); to remove a tab // $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'order'); complete_head_from_modules($conf,$langs,$object,$head,$h,'order');
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
/*$filesdir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($commande->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$listoffiles=dol_dir_list($filesdir,'files',1);
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
$head[$h][1] = $langs->trans('Documents');
$head[$h][2] = 'documents';
$h++;
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$object->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");
$head[$h][2] = 'info'; $head[$h][2] = 'info';

View File

@ -64,19 +64,26 @@ function project_prepare_head($object)
// $this->tabs = array('entity:-tabname); to remove a tab // $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'project'); complete_head_from_modules($conf,$langs,$object,$head,$h,'project');
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id; if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
/*$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref); {
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $nbNote = 0;
$listoffiles=dol_dir_list($filesdir,'files',1); if(!empty($object->note_private)) $nbNote++;
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/ if(!empty($object->note_public)) $nbNote++;
$head[$h][1] = $langs->trans('Documents');
$head[$h][2] = 'document';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/projet/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/projet/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'notes'; $head[$h][2] = 'notes';
$h++; $h++;
}
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'document';
$h++;
// Then tab for sub level of projet, i mean tasks // Then tab for sub level of projet, i mean tasks
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id;

View File

@ -78,18 +78,22 @@ function propal_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
/*$filesdir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($propal->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$listoffiles=dol_dir_list($filesdir,'files',1);
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;

View File

@ -166,10 +166,10 @@ class modBanque extends DolibarrModules
$this->export_label[$r]='Bordereaux remise Chq/Fact'; $this->export_label[$r]='Bordereaux remise Chq/Fact';
$this->export_permission[$r]=array(array("banque","export")); $this->export_permission[$r]=array(array("banque","export"));
$this->export_fields_array[$r]=array('ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation", $this->export_fields_array[$r]=array('ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
"bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","bch.date_bordereau"=>"DateBordereau","bch.number"=>"NumeroBordereau","bch.amount"=>"TotalBordereau","bch.nbcheque"=>"NbCheque","f.facnumber"=>"NumFacture" "bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","bch.date_bordereau"=>"DateBordereau","bch.number"=>"NumeroBordereau","bch.ref_ext"=>"RefExt","bch.amount"=>"TotalBordereau","bch.nbcheque"=>"NbCheque","f.facnumber"=>"NumFacture"
); );
$this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Number','b.num_releve'=>'Text','b.datec'=>"Date", $this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Number','b.num_releve'=>'Text','b.datec'=>"Date",
"bu.url_id"=>"Text","s.nom"=>"Text","bch.date_bordereau"=>"Date","bch.number"=>"Text","bch.amount"=>"Number","bch.nbcheque"=>"NumBer","f.facnumber"=>"Text" "bu.url_id"=>"Text","s.nom"=>"Text","bch.date_bordereau"=>"Date","bch.number"=>"Number","bch.ref_ext"=>"Text","bch.amount"=>"Number","bch.nbcheque"=>"NumBer","f.facnumber"=>"Text"
); );
$this->export_entities_array[$r]=array('ba.ref'=>'account','ba.label'=>'account','b.datev'=>'account','b.num_chq'=>'account','b.amount'=>'account','b.num_releve'=>'account','b.datec'=>"account", $this->export_entities_array[$r]=array('ba.ref'=>'account','ba.label'=>'account','b.datev'=>'account','b.num_chq'=>'account','b.amount'=>'account','b.num_releve'=>'account','b.datec'=>"account",
"bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company","f.facnumber"=>"bill"); "bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company","f.facnumber"=>"bill");

View File

@ -89,6 +89,8 @@ FirstDayOfHoliday=Premier jour de congés
LastDayOfHoliday=Dernier jour de congés LastDayOfHoliday=Dernier jour de congés
HolidaysMonthlyUpdate=Mise à jour mensuelle HolidaysMonthlyUpdate=Mise à jour mensuelle
ManualUpdate=Mise à jour manuelle ManualUpdate=Mise à jour manuelle
Morning=Matin
Afternoon=Après-midi
## Configuration du Module ## ## Configuration du Module ##
ConfCP=Configuration du module Congés ConfCP=Configuration du module Congés

View File

@ -158,7 +158,7 @@ $sql .= " AND d.buy_price_ht IS NOT NULL";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
$sql .= " AND d.buy_price_ht <> 0"; $sql .= " AND d.buy_price_ht <> 0";
if ($agentid > 0) if ($agentid > 0)
$sql.= " GROUP BY s.rowid"; $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname, f.type";
else else
$sql.= " GROUP BY u.rowid, s.nom, s.rowid, s.code_client, s.client, u.login, u.lastname, u.firstname, f.type "; $sql.= " GROUP BY u.rowid, s.nom, s.rowid, s.code_client, s.client, u.login, u.lastname, u.firstname, f.type ";
$sql.= " ORDER BY $sortfield $sortorder "; $sql.= " ORDER BY $sortfield $sortorder ";

View File

@ -86,7 +86,7 @@ if ($socid > 0) {
{ {
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="4">'; print '<td colspan="4">';
$form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,$socid,'socid','client=1',1,0,1); $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,$socid,'socid','client=1 OR client=3',1,0,1);
print '</td></tr>'; print '</td></tr>';
$client = true; $client = true;
@ -97,7 +97,7 @@ if ($socid > 0) {
else { else {
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="4">'; print '<td colspan="4">';
$form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,null,'socid','client=1',1,0,1); $form->form_thirdparty($_SERVER['PHP_SELF'],null,'socid','client=1 OR client=3',1,0,1);
print '</td></tr>'; print '</td></tr>';
} }
@ -176,9 +176,9 @@ $sql .= " AND d.buy_price_ht IS NOT NULL";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
$sql .= " AND d.buy_price_ht <> 0"; $sql .= " AND d.buy_price_ht <> 0";
if ($client) if ($client)
$sql.= " GROUP BY f.rowid"; $sql.= " GROUP BY f.rowid, s.rowid, s.nom, s.code_client, s.client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.type ";
else else
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid "; $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid, f.type ";
$sql.= " ORDER BY $sortfield $sortorder "; $sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination // TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset); //$sql.= $db->plimit($conf->liste_limit +1, $offset);

View File

@ -180,9 +180,9 @@ $sql .= " AND d.buy_price_ht IS NOT NULL";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
$sql .= " AND d.buy_price_ht <> 0"; $sql .= " AND d.buy_price_ht <> 0";
if ($id > 0) if ($id > 0)
$sql.= " GROUP BY f.rowid"; $sql.= " GROUP BY f.rowid, d.fk_product, p.label, p.rowid, p.fk_product_type, p.ref, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.type";
else else
$sql.= " GROUP BY d.fk_product, p.label, p.rowid, p.fk_product_type, p.ref, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid"; $sql.= " GROUP BY d.fk_product, p.label, p.rowid, p.fk_product_type, p.ref, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid, f.type";
$sql.= " ORDER BY $sortfield $sortorder "; $sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination // TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset); //$sql.= $db->plimit($conf->liste_limit +1, $offset);

View File

@ -142,55 +142,55 @@ $listofreferent=array(
'title'=>"ListProposalsAssociatedProject", 'title'=>"ListProposalsAssociatedProject",
'class'=>'Propal', 'class'=>'Propal',
'table'=>'propal', 'table'=>'propal',
'test'=>$conf->propal->enabled), 'test'=>$conf->propal->enabled && $user->rights->propale->lire),
'order'=>array( 'order'=>array(
'title'=>"ListOrdersAssociatedProject", 'title'=>"ListOrdersAssociatedProject",
'class'=>'Commande', 'class'=>'Commande',
'table'=>'commande', 'table'=>'commande',
'test'=>$conf->commande->enabled), 'test'=>$conf->commande->enabled && $user->rights->commande->lire),
'invoice'=>array( 'invoice'=>array(
'title'=>"ListInvoicesAssociatedProject", 'title'=>"ListInvoicesAssociatedProject",
'class'=>'Facture', 'class'=>'Facture',
'table'=>'facture', 'table'=>'facture',
'test'=>$conf->facture->enabled), 'test'=>$conf->facture->enabled && $user->rights->facture->lire),
'invoice_predefined'=>array( 'invoice_predefined'=>array(
'title'=>"ListPredefinedInvoicesAssociatedProject", 'title'=>"ListPredefinedInvoicesAssociatedProject",
'class'=>'FactureRec', 'class'=>'FactureRec',
'table'=>'facture_rec', 'table'=>'facture_rec',
'test'=>$conf->facture->enabled), 'test'=>$conf->facture->enabled && $user->rights->facture->lire),
'order_supplier'=>array( 'order_supplier'=>array(
'title'=>"ListSupplierOrdersAssociatedProject", 'title'=>"ListSupplierOrdersAssociatedProject",
'class'=>'CommandeFournisseur', 'class'=>'CommandeFournisseur',
'table'=>'commande_fournisseur', 'table'=>'commande_fournisseur',
'test'=>$conf->fournisseur->enabled), 'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire),
'invoice_supplier'=>array( 'invoice_supplier'=>array(
'title'=>"ListSupplierInvoicesAssociatedProject", 'title'=>"ListSupplierInvoicesAssociatedProject",
'class'=>'FactureFournisseur', 'class'=>'FactureFournisseur',
'table'=>'facture_fourn', 'table'=>'facture_fourn',
'test'=>$conf->fournisseur->enabled), 'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire),
'contract'=>array( 'contract'=>array(
'title'=>"ListContractAssociatedProject", 'title'=>"ListContractAssociatedProject",
'class'=>'Contrat', 'class'=>'Contrat',
'table'=>'contrat', 'table'=>'contrat',
'test'=>$conf->contrat->enabled), 'test'=>$conf->contrat->enabled && $user->rights->contrat->lire),
'intervention'=>array( 'intervention'=>array(
'title'=>"ListFichinterAssociatedProject", 'title'=>"ListFichinterAssociatedProject",
'class'=>'Fichinter', 'class'=>'Fichinter',
'table'=>'fichinter', 'table'=>'fichinter',
'disableamount'=>1, 'disableamount'=>1,
'test'=>$conf->ficheinter->enabled), 'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
'trip'=>array( 'trip'=>array(
'title'=>"ListTripAssociatedProject", 'title'=>"ListTripAssociatedProject",
'class'=>'Deplacement', 'class'=>'Deplacement',
'table'=>'deplacement', 'table'=>'deplacement',
'disableamount'=>1, 'disableamount'=>1,
'test'=>$conf->deplacement->enabled), 'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
'agenda'=>array( 'agenda'=>array(
'title'=>"ListActionsAssociatedProject", 'title'=>"ListActionsAssociatedProject",
'class'=>'ActionComm', 'class'=>'ActionComm',
'table'=>'actioncomm', 'table'=>'actioncomm',
'disableamount'=>1, 'disableamount'=>1,
'test'=>$conf->agenda->enabled) 'test'=>$conf->agenda->enabled && $user->rights->agenda->allactions->lire)
); );
if ($action=="addelement") if ($action=="addelement")