Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
d4ab580e9b
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006 Marc Barilley <marc@ocebo.com>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -29,10 +29,10 @@
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param FactureFournisseur $object Object related to tabs
|
||||
* @return array Array of tabs to show
|
||||
*/
|
||||
function facturefourn_prepare_head($object)
|
||||
function facturefourn_prepare_head(FactureFournisseur $object)
|
||||
{
|
||||
global $db, $langs, $conf;
|
||||
|
||||
@ -56,7 +56,7 @@ function facturefourn_prepare_head($object)
|
||||
}
|
||||
|
||||
//if ($fac->mode_reglement_code == 'PRE')
|
||||
if (!empty($conf->paymentbybanktransfer->enabled)) {
|
||||
if (isModEnabled('paymentbybanktransfer')) {
|
||||
$nbStandingOrders = 0;
|
||||
$sql = "SELECT COUNT(pfd.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_demande as pfd";
|
||||
@ -132,8 +132,8 @@ function facturefourn_prepare_head($object)
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @return array Array of tabs to show
|
||||
* @param CommandeFournisseur $object Object related to tabs
|
||||
* @return array Array of tabs to show
|
||||
*/
|
||||
function ordersupplier_prepare_head(CommandeFournisseur $object)
|
||||
{
|
||||
|
||||
@ -176,8 +176,20 @@ class CommandeFournisseur extends CommonOrder
|
||||
*/
|
||||
public $fk_account;
|
||||
|
||||
/**
|
||||
* @var int payment choice ID
|
||||
*/
|
||||
public $mode_reglement_id;
|
||||
|
||||
/**
|
||||
* @var string payment choice code
|
||||
*/
|
||||
public $mode_reglement_code;
|
||||
|
||||
/**
|
||||
* @var string paymnet choice label
|
||||
*/
|
||||
public $mode_reglement;
|
||||
public $user_author_id;
|
||||
public $user_valid_id;
|
||||
public $user_approve_id;
|
||||
@ -272,7 +284,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>3, 'position'=>175),
|
||||
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>3, 'position'=>180),
|
||||
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>0, 'position'=>190),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>'$conf->banque->enabled', 'visible'=>3, 'position'=>200),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>'isModEnabled("banque")', 'visible'=>3, 'position'=>200),
|
||||
'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>3, 'position'=>205),
|
||||
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>3, 'position'=>210),
|
||||
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>0, 'position'=>215),
|
||||
@ -998,8 +1010,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
if (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER)) {
|
||||
$mybool = false;
|
||||
|
||||
$file = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER.'.php';
|
||||
$classname = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER;
|
||||
$file = getDolGlobalString('COMMANDE_SUPPLIER_ADDON_NUMBER').'.php';
|
||||
$classname = getDolGlobalString('COMMANDE_SUPPLIER_ADDON_NUMBER');
|
||||
|
||||
// Include file with class
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
@ -1461,7 +1473,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql .= ", ".((int) $user->id);
|
||||
$sql .= ", ".self::STATUS_DRAFT;
|
||||
$sql .= ", ".((int) $this->source);
|
||||
$sql .= ", '".$this->db->escape($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)."'";
|
||||
$sql .= ", '".$this->db->escape(getDolGlobalString('COMMANDE_SUPPLIER_ADDON_PDF'))."'";
|
||||
$sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : 'null');
|
||||
$sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'null');
|
||||
$sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL');
|
||||
@ -3267,7 +3279,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
if (!empty($this->model_pdf)) {
|
||||
$modele = $this->model_pdf;
|
||||
} elseif (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)) {
|
||||
$modele = $conf->global->COMMANDE_SUPPLIER_ADDON_PDF;
|
||||
$modele = getDolGlobalString('COMMANDE_SUPPLIER_ADDON_PDF');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user