Merge branch 'develop' into patch-7

This commit is contained in:
Laurent Destailleur 2020-10-23 14:10:33 +02:00 committed by GitHub
commit 8d5d7f801c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -47,7 +47,7 @@ class RejetPrelevement
*
* @param DoliDb $db Database handler
* @param User $user Objet user
* @param string $type type
* @param string $type Type ('direct-debit' for direct debit or 'bank-transfer' for credit transfer)
*/
public function __construct($db, $user, $type)
{
@ -288,13 +288,8 @@ class RejetPrelevement
//Returns all invoices of a withdrawal
$sql = "SELECT f.rowid as facid, pl.amount";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf";
//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
if ($this->type == 'bank-transfer') {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON (pf.fk_facture_fourn = f.rowid)";
} else {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
}
if ($this->type == 'bank-transfer') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON (pf.fk_facture_fourn = f.rowid)";
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_lignes as pl ON (pf.fk_prelevement_lignes = pl.rowid)";
$sql .= " WHERE pf.fk_prelevement_lignes = ".$this->id;
$sql .= " AND f.entity IN (".getEntity('invoice').")";

View File

@ -2192,7 +2192,7 @@ class ExpenseReport extends CommonObject
$modele = $conf->global->EXPENSEREPORT_ADDON_PDF;
}
}
if (!empty($modele)) {
$modelpath = "core/modules/expensereport/doc/";