Fix: php 5.4 strict mode warning
This commit is contained in:
parent
7fe53c4dcf
commit
cd7bf41ae0
@ -74,7 +74,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$menu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
|
$menu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
|
||||||
if ($objp->rappro && $objp->courant != 2 && ! $objp->clos) // If not cash account and not closed and can be reconciliate
|
if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate
|
||||||
{
|
{
|
||||||
$menu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
|
$menu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,9 @@ class Deplacement extends CommonObject
|
|||||||
var $fk_project;
|
var $fk_project;
|
||||||
var $extraparams=array();
|
var $extraparams=array();
|
||||||
|
|
||||||
|
var $statuts=array();
|
||||||
|
var $statuts_short=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -308,19 +311,19 @@ class Deplacement extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
|
if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
|
||||||
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
|
if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
//if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
//if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
|
if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
|
||||||
if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
|
if ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -563,13 +563,13 @@ if ($conf->don->enabled && $user->rights->societe->lire)
|
|||||||
|
|
||||||
|
|
||||||
// Last trips and expenses
|
// Last trips and expenses
|
||||||
if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
|
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
|
||||||
{
|
{
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php');
|
||||||
|
|
||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
|
|
||||||
$sql = "SELECT u.rowid as uid, u.name, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km";
|
$sql = "SELECT u.rowid as uid, u.name, u.firstname, d.fk_statut, d.rowid, d.dated as date, d.tms as dm, d.km";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE u.rowid = d.fk_user";
|
$sql.= " WHERE u.rowid = d.fk_user";
|
||||||
@ -923,7 +923,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
|||||||
{
|
{
|
||||||
$facstatic=new FactureFournisseur($db);
|
$facstatic=new FactureFournisseur($db);
|
||||||
|
|
||||||
$sql = "SELECT ff.rowid, ff.facnumber, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc,";
|
$sql = "SELECT ff.rowid, ff.facnumber, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,";
|
||||||
$sql.= " s.nom, s.rowid as socid,";
|
$sql.= " s.nom, s.rowid as socid,";
|
||||||
$sql.= " sum(pf.amount) as am";
|
$sql.= " sum(pf.amount) as am";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||||
|
|||||||
@ -36,6 +36,11 @@ abstract class CommonObject
|
|||||||
public $errors;
|
public $errors;
|
||||||
public $canvas; // Contains canvas name if it is
|
public $canvas; // Contains canvas name if it is
|
||||||
|
|
||||||
|
public $lastname;
|
||||||
|
public $firstname;
|
||||||
|
public $name;
|
||||||
|
public $nom;
|
||||||
|
public $civility_id;
|
||||||
|
|
||||||
// No constructor as it is an abstract class
|
// No constructor as it is an abstract class
|
||||||
|
|
||||||
@ -66,7 +71,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If order not defined, we use the setup
|
// If order not defined, we use the setup
|
||||||
if ($nameorder < 0) $nameorder=(! $conf->global->MAIN_FIRSTNAME_NAME_POSITION);
|
if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION));
|
||||||
|
|
||||||
if ($nameorder)
|
if ($nameorder)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -64,7 +64,10 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|||||||
|
|
||||||
if ($dir = opendir($newpath))
|
if ($dir = opendir($newpath))
|
||||||
{
|
{
|
||||||
|
$filedate='';
|
||||||
|
$filesize='';
|
||||||
$file_list = array();
|
$file_list = array();
|
||||||
|
|
||||||
while (false !== ($file = readdir($dir)))
|
while (false !== ($file = readdir($dir)))
|
||||||
{
|
{
|
||||||
if (! utf8_check($file)) $file=utf8_encode($file); // To be sure data is stored in utf8 in memory
|
if (! utf8_check($file)) $file=utf8_encode($file); // To be sure data is stored in utf8 in memory
|
||||||
|
|||||||
@ -897,7 +897,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Customers invoices
|
// Customers invoices
|
||||||
if ($conf->facture->enabled)
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
||||||
@ -911,7 +911,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
|
|
||||||
$newmenu->add("/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),1,$user->rights->facture->lire);
|
$newmenu->add("/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),1,$user->rights->facture->lire);
|
||||||
|
|
||||||
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
|
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),2,$user->rights->facture->lire);
|
$newmenu->add("/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),2,$user->rights->facture->lire);
|
||||||
}
|
}
|
||||||
@ -921,13 +921,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Suppliers
|
// Suppliers
|
||||||
if ($conf->societe->enabled && $conf->fournisseur->enabled)
|
if (! empty($conf->societe->enabled) && ! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->facture->enabled)
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
$newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
||||||
if ($user->societe_id == 0)
|
if (isset($user->societe_id) && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer);
|
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer);
|
||||||
}
|
}
|
||||||
@ -939,17 +939,17 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Orders
|
// Orders
|
||||||
if ($conf->commande->enabled)
|
if (! empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
if ($conf->facture->enabled) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
||||||
// if ($leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
|
// if ($leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
if (isset($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||||
if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
|
if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Donations
|
// Donations
|
||||||
if ($conf->don->enabled)
|
if (! empty($conf->don->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("donations");
|
$langs->load("donations");
|
||||||
$newmenu->add("/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy",$langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations');
|
$newmenu->add("/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy",$langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations');
|
||||||
@ -959,7 +959,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Trips and expenses
|
// Trips and expenses
|
||||||
if ($conf->deplacement->enabled)
|
if (! empty($conf->deplacement->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
$newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses');
|
$newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses');
|
||||||
@ -969,7 +969,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Taxes and social contributions
|
// Taxes and social contributions
|
||||||
if ($conf->tax->enabled)
|
if (! empty($conf->tax->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy",$langs->trans("MenuTaxAndDividends"), 0, $user->rights->tax->charges->lire, '', $mainmenu, 'tax');
|
$newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy",$langs->trans("MenuTaxAndDividends"), 0, $user->rights->tax->charges->lire, '', $mainmenu, 'tax');
|
||||||
if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/sociales/index.php?leftmenu=tax_social",$langs->trans("MenuSocialContributions"),1,$user->rights->tax->charges->lire);
|
if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/sociales/index.php?leftmenu=tax_social",$langs->trans("MenuSocialContributions"),1,$user->rights->tax->charges->lire);
|
||||||
@ -986,7 +986,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
global $mysoc;
|
global $mysoc;
|
||||||
|
|
||||||
//Local Taxes
|
//Local Taxes
|
||||||
if($mysoc->country_code=='ES' && $mysoc->localtax2_assuj=="1")
|
if($mysoc->country_code=='ES' && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj=="1"))
|
||||||
{
|
{
|
||||||
if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/index.php?leftmenu=tax_vat&mainmenu=accountancy",$langs->transcountry("LT2",$mysoc->country_code),1,$user->rights->tax->charges->lire);
|
if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/index.php?leftmenu=tax_vat&mainmenu=accountancy",$langs->transcountry("LT2",$mysoc->country_code),1,$user->rights->tax->charges->lire);
|
||||||
if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/fiche.php?leftmenu=tax_vat&action=create",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer);
|
if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/fiche.php?leftmenu=tax_vat&action=create",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer);
|
||||||
@ -1000,7 +1000,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compta simple
|
// Compta simple
|
||||||
if ($conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION)
|
if (! empty($conf->comptabilite->enabled) && ! empty($conf->global->FACTURE_VENTILATION))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Dispatch"),0,$user->rights->compta->ventilation->lire, '', $mainmenu, 'ventil');
|
$newmenu->add("/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Dispatch"),0,$user->rights->compta->ventilation->lire, '', $mainmenu, 'ventil');
|
||||||
if ($leftmenu=="ventil") $newmenu->add("/compta/ventilation/liste.php",$langs->trans("ToDispatch"),1,$user->rights->compta->ventilation->lire);
|
if ($leftmenu=="ventil") $newmenu->add("/compta/ventilation/liste.php",$langs->trans("ToDispatch"),1,$user->rights->compta->ventilation->lire);
|
||||||
@ -1014,13 +1014,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compta expert
|
// Compta expert
|
||||||
if ($conf->accounting->enabled)
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rapports
|
// Rapports
|
||||||
if ($conf->comptabilite->enabled || $conf->accounting->enabled)
|
if (! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
|
|
||||||
@ -1064,7 +1064,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Bank-Caisse
|
// Bank-Caisse
|
||||||
if ($conf->banque->enabled)
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/bank/index.php?leftmenu=bank&mainmenu=bank",$langs->trans("MenuBankCash"),0,$user->rights->banque->lire, '', $mainmenu, 'bank');
|
$newmenu->add("/compta/bank/index.php?leftmenu=bank&mainmenu=bank",$langs->trans("MenuBankCash"),0,$user->rights->banque->lire, '', $mainmenu, 'bank');
|
||||||
|
|
||||||
@ -1078,7 +1078,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prelevements
|
// Prelevements
|
||||||
if ($conf->prelevement->enabled)
|
if (! empty($conf->prelevement->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank",$langs->trans("StandingOrders"),0,$user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank",$langs->trans("StandingOrders"),0,$user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
||||||
|
|
||||||
@ -1096,7 +1096,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gestion cheques
|
// Gestion cheques
|
||||||
if ($conf->facture->enabled && $conf->banque->enabled)
|
if (! empty($conf->facture->enabled) && ! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->cheque, '', $mainmenu, 'checks');
|
$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->cheque, '', $mainmenu, 'checks');
|
||||||
$newmenu->add("/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque);
|
$newmenu->add("/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque);
|
||||||
@ -1111,7 +1111,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
if ($mainmenu == 'products')
|
if ($mainmenu == 'products')
|
||||||
{
|
{
|
||||||
// Products
|
// Products
|
||||||
if ($conf->product->enabled)
|
if (! empty($conf->product->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product');
|
$newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product');
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
@ -1130,7 +1130,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
if ($conf->service->enabled)
|
if (! empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
|
$newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
@ -1145,7 +1145,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled)
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
@ -1157,7 +1157,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stocks
|
// Stocks
|
||||||
if ($conf->stock->enabled)
|
if (! empty($conf->stock->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
||||||
@ -1168,7 +1168,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Expeditions
|
// Expeditions
|
||||||
if ($conf->expedition->enabled)
|
if (! empty($conf->expedition->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
$newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings');
|
$newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings');
|
||||||
@ -1187,7 +1187,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
{
|
{
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
|
|
||||||
if ($conf->societe->enabled && $conf->fournisseur->enabled)
|
if (! empty($conf->societe->enabled) && ! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/fourn/index.php?leftmenu=suppliers", $langs->trans("Suppliers"), 0, $user->rights->societe->lire && $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers');
|
$newmenu->add("/fourn/index.php?leftmenu=suppliers", $langs->trans("Suppliers"), 0, $user->rights->societe->lire && $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers');
|
||||||
|
|
||||||
@ -1201,12 +1201,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$newmenu->add("/fourn/stats.php",$langs->trans("Statistics"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire);
|
$newmenu->add("/fourn/stats.php",$langs->trans("Statistics"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->facture->enabled)
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$newmenu->add("/fourn/facture/index.php?leftmenu=orders", $langs->trans("Bills"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'orders');
|
$newmenu->add("/fourn/facture/index.php?leftmenu=orders", $langs->trans("Bills"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'orders');
|
||||||
|
|
||||||
if ($user->societe_id == 0)
|
if (isset($user->societe_id) && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer);
|
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer);
|
||||||
}
|
}
|
||||||
@ -1214,7 +1214,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"), 1, $user->rights->fournisseur->facture->lire);
|
$newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"), 1, $user->rights->fournisseur->facture->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->fournisseur->enabled)
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$newmenu->add("/fourn/commande/index.php?leftmenu=suppliers",$langs->trans("Orders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'suppliers');
|
$newmenu->add("/fourn/commande/index.php?leftmenu=suppliers",$langs->trans("Orders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'suppliers');
|
||||||
@ -1222,11 +1222,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$newmenu->add("/fourn/commande/liste.php?leftmenu=suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire);
|
$newmenu->add("/fourn/commande/liste.php?leftmenu=suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->categorie->enabled)
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
if ($user->societe_id == 0)
|
if (isset($user->societe_id) && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
$newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||||
}
|
}
|
||||||
@ -1240,7 +1240,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
*/
|
*/
|
||||||
if ($mainmenu == 'project')
|
if ($mainmenu == 'project')
|
||||||
{
|
{
|
||||||
if ($conf->projet->enabled)
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
|
|
||||||
@ -1305,7 +1305,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
*/
|
*/
|
||||||
if ($mainmenu == 'members')
|
if ($mainmenu == 'members')
|
||||||
{
|
{
|
||||||
if ($conf->adherent->enabled)
|
if (! empty($conf->adherent->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
@ -1326,11 +1326,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire);
|
$newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire);
|
||||||
|
|
||||||
|
|
||||||
if ($conf->categorie->enabled)
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
if ($user->societe_id == 0)
|
if (isset($user->societe_id) && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
$newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,8 +54,8 @@ if (! defined('LOG_DEBUG'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Force PHP error_reporting setup (Dolibarr may report warning without this)
|
// Force PHP error_reporting setup (Dolibarr may report warning without this)
|
||||||
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));
|
//error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));
|
||||||
//error_reporting(E_ALL | E_STRICT);
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
// End of common declaration part
|
// End of common declaration part
|
||||||
if (defined('DOL_INC_FOR_VERSION_ERROR')) return;
|
if (defined('DOL_INC_FOR_VERSION_ERROR')) return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user