Fix style and sql error for field fde.ref not found

This commit is contained in:
Laurent Destailleur 2015-08-28 18:20:51 +02:00
parent 6624182361
commit 4377a2d013
6 changed files with 9 additions and 8 deletions

View File

@ -179,7 +179,7 @@ if ($nbofentries > 0)
} }
else else
{ {
print '<tr>'; print '<tr '.$bc[0].'>';
print '<td colspan="3"><table class="nobordernopadding"><tr class="nobordernopadding"><td>'.img_picto_common('','treemenu/branchbottom.gif').'</td>'; print '<td colspan="3"><table class="nobordernopadding"><tr class="nobordernopadding"><td>'.img_picto_common('','treemenu/branchbottom.gif').'</td>';
print '<td valign="middle">'; print '<td valign="middle">';
print $langs->trans("NoCategoryYet"); print $langs->trans("NoCategoryYet");

View File

@ -184,7 +184,7 @@ print "<td>".$langs->trans("Account")."</td>";
print "<td>".$langs->trans("Type")."</td><td align='right'>".$langs->trans("Debit")."</td><td align='right'>".$langs->trans("Credit")."</td>"; print "<td>".$langs->trans("Type")."</td><td align='right'>".$langs->trans("Debit")."</td><td align='right'>".$langs->trans("Credit")."</td>";
print "</tr>\n"; print "</tr>\n";
$var=true; $var=false;
$invoicestatic=new FactureFournisseur($db); $invoicestatic=new FactureFournisseur($db);
$companystatic=new Fournisseur($db); $companystatic=new Fournisseur($db);

View File

@ -215,7 +215,7 @@ print '<td>'.$langs->trans('Account').'</td>';
print '<td>'.$langs->trans('Type').'</td><td align="right">'.$langs->trans('Debit').'</td><td align="right">'.$langs->trans('Credit').'</td>'; print '<td>'.$langs->trans('Type').'</td><td align="right">'.$langs->trans('Debit').'</td><td align="right">'.$langs->trans('Credit').'</td>';
print "</tr>\n"; print "</tr>\n";
$var=true; $var=false;
$invoicestatic=new Facture($db); $invoicestatic=new Facture($db);
$companystatic=new Client($db); $companystatic=new Client($db);

View File

@ -1508,14 +1508,14 @@ class ExpenseReportLine
} }
/** /**
* fetch record * Fetch record for expense report detailed line
* *
* @param int $rowid Id of object to load * @param int $rowid Id of object to load
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($rowid) function fetch($rowid)
{ {
$sql = 'SELECT fde.rowid, fde.ref, fde.fk_expensereport, fde.fk_c_type_fees, fde.fk_projet, fde.date,'; $sql = 'SELECT fde.rowid, fde.fk_expensereport, fde.fk_c_type_fees, fde.fk_projet, fde.date,';
$sql.= ' fde.tva_tx as vatrate, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc,'; $sql.= ' fde.tva_tx as vatrate, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc,';
$sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,'; $sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,';
$sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref'; $sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref';

View File

@ -1470,8 +1470,8 @@ class Project extends CommonObject
/** /**
* Create an intervention document on disk using template defined into PROJECT_ADDON_PDF * Create an intervention document on disk using template defined into PROJECT_ADDON_PDF
* *
* @param string $modele force le modele a utiliser ('' par defaut) * @param string $modele Force template to use ('' by default)
* @param Translate $outputlangs objet lang a utiliser pour traduction * @param Translate $outputlangs Objet lang to use for translation
* @param int $hidedetails Hide details of lines * @param int $hidedetails Hide details of lines
* @param int $hidedesc Hide description * @param int $hidedesc Hide description
* @param int $hideref Hide ref * @param int $hideref Hide ref

View File

@ -602,6 +602,7 @@ foreach ($listofreferent as $key => $value)
$expensereport->fetch($element->fk_expensereport); $expensereport->fetch($element->fk_expensereport);
} }
//print 'xxx'.$tablename;
//print $classname; //print $classname;
if ($breakline && $saved_third_id != $element->thirdparty->id) if ($breakline && $saved_third_id != $element->thirdparty->id)
@ -620,7 +621,7 @@ foreach ($listofreferent as $key => $value)
$qualifiedfortotal=true; $qualifiedfortotal=true;
if ($key == 'invoice') if ($key == 'invoice')
{ {
if ($element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice if (! empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice, do not include into total
} }
$var=!$var; $var=!$var;