FIX : php strict warning
This commit is contained in:
parent
f9ded46a99
commit
4e98f57385
@ -49,7 +49,7 @@ class pdf_proforma extends pdf_einstein
|
|||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
parent::__construct($db);
|
parent::__construct($db);
|
||||||
|
|
||||||
$this->name = "proforma";
|
$this->name = "proforma";
|
||||||
@ -66,7 +66,7 @@ class pdf_proforma extends pdf_einstein
|
|||||||
* @param Translate $outputlangs Object lang for output
|
* @param Translate $outputlangs Object lang for output
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="InvoiceProForma")
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class modExpedition extends DolibarrModules
|
|||||||
// Constants
|
// Constants
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|
||||||
$this->const[$r][0] = "EXPEDITION_ADDON_PDF";
|
$this->const[$r][0] = "EXPEDITION_ADDON_PDF";
|
||||||
$this->const[$r][1] = "chaine";
|
$this->const[$r][1] = "chaine";
|
||||||
$this->const[$r][2] = "rouget";
|
$this->const[$r][2] = "rouget";
|
||||||
@ -125,14 +125,14 @@ class modExpedition extends DolibarrModules
|
|||||||
$this->const[$r][3] = "";
|
$this->const[$r][3] = "";
|
||||||
$this->const[$r][4] = 0;
|
$this->const[$r][4] = 0;
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->const[$r][0] = "MAIN_SUBMODULE_EXPEDITION";
|
$this->const[$r][0] = "MAIN_SUBMODULE_EXPEDITION";
|
||||||
$this->const[$r][1] = "chaine";
|
$this->const[$r][1] = "chaine";
|
||||||
$this->const[$r][2] = "1";
|
$this->const[$r][2] = "1";
|
||||||
$this->const[$r][3] = "Enable shipments";
|
$this->const[$r][3] = "Enable shipments";
|
||||||
$this->const[$r][4] = 0;
|
$this->const[$r][4] = 0;
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
// Boxes
|
// Boxes
|
||||||
$this->boxes = array();
|
$this->boxes = array();
|
||||||
|
|
||||||
@ -224,8 +224,14 @@ class modExpedition extends DolibarrModules
|
|||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
$shipment=new Commande($this->db);
|
$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++;
|
$r++;
|
||||||
$this->export_code[$r]=$this->rights_class.'_'.$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)
|
$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');
|
$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');
|
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
|
$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';
|
$keyforselect='socpeople'; $keyforelement='contact'; $keyforaliasextra='extra3';
|
||||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class CompanyBankAccount extends Account
|
|||||||
* @param User $user User
|
* @param User $user User
|
||||||
* @return int <0 if KO, >= 0 if OK
|
* @return int <0 if KO, >= 0 if OK
|
||||||
*/
|
*/
|
||||||
function create($user='')
|
function create(User $user = null)
|
||||||
{
|
{
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ class CompanyBankAccount extends Account
|
|||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($user='')
|
function update(User $user = null)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ class CompanyBankAccount extends Account
|
|||||||
* @param User $user User deleting
|
* @param User $user User deleting
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($user='')
|
function delete(User $user = null)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user