Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
30cd4aeced
@ -67,7 +67,6 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
$refreshaction='refresh_'.$this->boxcode;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$facturestatic=new Facture($db);
|
||||
|
||||
$text = $langs->trans("BoxSuppliersInvoicesPerMonth",$max);
|
||||
$this->info_box_head = array(
|
||||
|
||||
@ -67,7 +67,6 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||
$refreshaction='refresh_'.$this->boxcode;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
$facturestatic=new Facture($db);
|
||||
|
||||
$text = $langs->trans("BoxSuppliersOrdersPerMonth",$max);
|
||||
$this->info_box_head = array(
|
||||
|
||||
@ -140,7 +140,7 @@ class FormFile
|
||||
if (empty($sectionid)) $out .= '<br>';
|
||||
|
||||
$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);
|
||||
if (empty($res))
|
||||
{
|
||||
|
||||
@ -86,7 +86,24 @@ function societe_prepare_head($object)
|
||||
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
// Notes
|
||||
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
|
||||
$nbNote = 0;
|
||||
if(!empty($object->note_private)) $nbNote++;
|
||||
if(!empty($object->note_public)) $nbNote++;
|
||||
@ -96,32 +113,15 @@ function societe_prepare_head($object)
|
||||
$head[$h][2] = 'note';
|
||||
$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
|
||||
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));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Documents");
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'document';
|
||||
$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
|
||||
|
||||
@ -55,14 +55,22 @@ function contract_prepare_head($object)
|
||||
|
||||
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][1] = $langs->trans("Note");
|
||||
$head[$h][1] = $langs->trans("Notes");
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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][1] = $langs->trans("Documents");
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -67,14 +67,22 @@ function fichinter_prepare_head($object)
|
||||
|
||||
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][1] = $langs->trans('Notes');
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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][1] = $langs->trans("Documents");
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -58,18 +58,22 @@ function facturefourn_prepare_head($object)
|
||||
|
||||
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][1] = $langs->trans('Notes');
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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;
|
||||
/*$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');
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
@ -126,18 +130,22 @@ function ordersupplier_prepare_head($object)
|
||||
|
||||
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][1] = $langs->trans("Notes");
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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;
|
||||
/*$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');
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -74,18 +74,22 @@ function facture_prepare_head($object)
|
||||
|
||||
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][1] = $langs->trans('Notes');
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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;
|
||||
/*$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');
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -82,22 +82,26 @@ function commande_prepare_head($object)
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
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))
|
||||
{
|
||||
$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][1] = $langs->trans('Notes');
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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][1] = $langs->trans("Info");
|
||||
|
||||
@ -64,20 +64,27 @@ function project_prepare_head($object)
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'project');
|
||||
|
||||
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.'/projet/note.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Notes');
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'notes';
|
||||
$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;
|
||||
/*$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->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');
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/note.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Notes');
|
||||
$head[$h][2] = 'notes';
|
||||
$h++;
|
||||
|
||||
|
||||
// Then tab for sub level of projet, i mean tasks
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Tasks");
|
||||
|
||||
@ -78,18 +78,22 @@ function propal_prepare_head($object)
|
||||
|
||||
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][1] = $langs->trans('Notes');
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'note';
|
||||
$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;
|
||||
/*$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');
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -166,10 +166,10 @@ class modBanque extends DolibarrModules
|
||||
$this->export_label[$r]='Bordereaux remise Chq/Fact';
|
||||
$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",
|
||||
"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",
|
||||
"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",
|
||||
"bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company","f.facnumber"=>"bill");
|
||||
|
||||
@ -89,6 +89,8 @@ FirstDayOfHoliday=Premier jour de congés
|
||||
LastDayOfHoliday=Dernier jour de congés
|
||||
HolidaysMonthlyUpdate=Mise à jour mensuelle
|
||||
ManualUpdate=Mise à jour manuelle
|
||||
Morning=Matin
|
||||
Afternoon=Après-midi
|
||||
|
||||
## Configuration du Module ##
|
||||
ConfCP=Configuration du module Congés
|
||||
|
||||
@ -158,7 +158,7 @@ $sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||
$sql .= " AND d.buy_price_ht <> 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
|
||||
$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 ";
|
||||
|
||||
@ -86,7 +86,7 @@ if ($socid > 0) {
|
||||
{
|
||||
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
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>';
|
||||
|
||||
$client = true;
|
||||
@ -97,7 +97,7 @@ if ($socid > 0) {
|
||||
else {
|
||||
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
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>';
|
||||
}
|
||||
|
||||
@ -176,9 +176,9 @@ $sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
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
|
||||
$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 ";
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
@ -180,9 +180,9 @@ $sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||
$sql .= " AND d.buy_price_ht <> 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
|
||||
$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 ";
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
@ -312,4 +312,4 @@ $(document).ready(function() {
|
||||
$("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>");
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -142,55 +142,55 @@ $listofreferent=array(
|
||||
'title'=>"ListProposalsAssociatedProject",
|
||||
'class'=>'Propal',
|
||||
'table'=>'propal',
|
||||
'test'=>$conf->propal->enabled),
|
||||
'test'=>$conf->propal->enabled && $user->rights->propale->lire),
|
||||
'order'=>array(
|
||||
'title'=>"ListOrdersAssociatedProject",
|
||||
'class'=>'Commande',
|
||||
'table'=>'commande',
|
||||
'test'=>$conf->commande->enabled),
|
||||
'test'=>$conf->commande->enabled && $user->rights->commande->lire),
|
||||
'invoice'=>array(
|
||||
'title'=>"ListInvoicesAssociatedProject",
|
||||
'class'=>'Facture',
|
||||
'table'=>'facture',
|
||||
'test'=>$conf->facture->enabled),
|
||||
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
|
||||
'invoice_predefined'=>array(
|
||||
'title'=>"ListPredefinedInvoicesAssociatedProject",
|
||||
'class'=>'FactureRec',
|
||||
'table'=>'facture_rec',
|
||||
'test'=>$conf->facture->enabled),
|
||||
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
|
||||
'order_supplier'=>array(
|
||||
'title'=>"ListSupplierOrdersAssociatedProject",
|
||||
'class'=>'CommandeFournisseur',
|
||||
'table'=>'commande_fournisseur',
|
||||
'test'=>$conf->fournisseur->enabled),
|
||||
'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire),
|
||||
'invoice_supplier'=>array(
|
||||
'title'=>"ListSupplierInvoicesAssociatedProject",
|
||||
'class'=>'FactureFournisseur',
|
||||
'table'=>'facture_fourn',
|
||||
'test'=>$conf->fournisseur->enabled),
|
||||
'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire),
|
||||
'contract'=>array(
|
||||
'title'=>"ListContractAssociatedProject",
|
||||
'class'=>'Contrat',
|
||||
'table'=>'contrat',
|
||||
'test'=>$conf->contrat->enabled),
|
||||
'test'=>$conf->contrat->enabled && $user->rights->contrat->lire),
|
||||
'intervention'=>array(
|
||||
'title'=>"ListFichinterAssociatedProject",
|
||||
'class'=>'Fichinter',
|
||||
'table'=>'fichinter',
|
||||
'disableamount'=>1,
|
||||
'test'=>$conf->ficheinter->enabled),
|
||||
'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
|
||||
'trip'=>array(
|
||||
'title'=>"ListTripAssociatedProject",
|
||||
'class'=>'Deplacement',
|
||||
'table'=>'deplacement',
|
||||
'disableamount'=>1,
|
||||
'test'=>$conf->deplacement->enabled),
|
||||
'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
|
||||
'agenda'=>array(
|
||||
'title'=>"ListActionsAssociatedProject",
|
||||
'class'=>'ActionComm',
|
||||
'table'=>'actioncomm',
|
||||
'disableamount'=>1,
|
||||
'test'=>$conf->agenda->enabled)
|
||||
'test'=>$conf->agenda->enabled && $user->rights->agenda->allactions->lire)
|
||||
);
|
||||
|
||||
if ($action=="addelement")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user