Fix sql error

This commit is contained in:
Laurent Destailleur 2017-12-18 19:15:42 +01:00
parent 2204790602
commit 2e87318b58
2 changed files with 5 additions and 4 deletions

View File

@ -218,7 +218,7 @@ class pdf_paiement
if (! empty($conf->banque->enabled))
$sql.= ", ba.ref as bankaccount";
$sql.= ", p.rowid as prowid";
$sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p LEFT JOIN ON ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id AND c.entity IN (".getEntity('c_paiement').")";
$sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id AND c.entity IN (".getEntity('c_paiement').")";
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f,";
$sql.= " ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf,";
if (! empty($conf->banque->enabled))

View File

@ -85,9 +85,10 @@ if ($action == 'builddoc')
$formother=new FormOther($db);
llxHeader();
$titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports"));
llxHeader('', $titre);
print load_fiche_titre($titre,'','title_accountancy.png');
// Formulaire de generation
@ -152,7 +153,7 @@ if ($year)
{
if (preg_match('/^supplier_payment/i',$file))
{
$tfile = $dir . '/'.$year.'/'.$file;
$relativepath = $year.'/'.$file;
print "<tr ".$bc[$var].">".'<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=facture_fournisseur&amp;file=payments/'.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';