Skip to content
Snippets Groups Projects
Commit 4e98f573 authored by florian HENRY's avatar florian HENRY
Browse files

FIX : php strict warning

parent f9ded46a
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ class pdf_proforma extends pdf_einstein
function __construct($db)
{
global $conf,$langs,$mysoc;
parent::__construct($db);
$this->name = "proforma";
......@@ -66,7 +66,7 @@ class pdf_proforma extends pdf_einstein
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="InvoiceProForma")
{
global $conf,$langs,$hookmanager;
......
......@@ -83,7 +83,7 @@ class modExpedition extends DolibarrModules
// Constants
$this->const = array();
$r=0;
$this->const[$r][0] = "EXPEDITION_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "rouget";
......@@ -125,14 +125,14 @@ class modExpedition extends DolibarrModules
$this->const[$r][3] = "";
$this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "MAIN_SUBMODULE_EXPEDITION";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "1";
$this->const[$r][3] = "Enable shipments";
$this->const[$r][4] = 0;
$r++;
// Boxes
$this->boxes = array();
......@@ -224,8 +224,14 @@ class modExpedition extends DolibarrModules
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$shipment=new Commande($this->db);
$idcontacts=join(',',array_keys($shipment->liste_type_contact('external','',0,0,'')));
$contact_arrays=$shipment->liste_type_contact('external','',0,0,'');
if (is_array($contact_arrays) && count($contact_arrays)>0){
$idcontacts=join(',',array_keys($shipment->liste_type_contact('external','',0,0,'')));
} else {
$idcontacts=0;
}
$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='Shipments'; // Translation key (used only if key ExportDataset_xxx_z not found)
......@@ -237,7 +243,7 @@ class modExpedition extends DolibarrModules
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','d.nom'=>'company','co.label'=>'company','co.code'=>'company','s.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note_public'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product','p.weight'=>'product','p.weight_units'=>'product','p.volume'=>'product','p.volume_units'=>'product');
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) $this->export_entities_array[$r]+=array('sp.rowid'=>'contact','sp.lastname'=>'contact','sp.firstname'=>'contact','sp.note_public'=>'contact');
$this->export_dependencies_array[$r]=array('shipment_line'=>'ed.rowid','product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT))
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT))
{
$keyforselect='socpeople'; $keyforelement='contact'; $keyforaliasextra='extra3';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
......
......@@ -64,7 +64,7 @@ class CompanyBankAccount extends Account
* @param User $user User
* @return int <0 if KO, >= 0 if OK
*/
function create($user='')
function create(User $user = null)
{
$now=dol_now();
......@@ -102,7 +102,7 @@ class CompanyBankAccount extends Account
* @param User $user Object user
* @return int <=0 if KO, >0 if OK
*/
function update($user='')
function update(User $user = null)
{
global $conf;
......@@ -205,7 +205,7 @@ class CompanyBankAccount extends Account
* @param User $user User deleting
* @return int <0 if KO, >0 if OK
*/
function delete($user='')
function delete(User $user = null)
{
global $conf;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment