diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index ba29a357df5..8b9ba496dad 100755
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -161,17 +161,6 @@ foreach ($tabfac as $key => $val)
$invoicestatic->ref=$val["ref"];
$invoicestatic->type=$val["type"];
- print "
";
- // third party
- //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
-
- foreach ($tabttc[$key] as $k => $mt)
- {
- print "".$k." | ".$langs->trans("ThirdParty")." | ".($mt>=0?price($mt):'')." | ".($mt<0?-price(-$mt):'')." | ";
- }
- print "
";
// product
foreach ($tabht[$key] as $k => $mt)
{
@@ -181,7 +170,10 @@ foreach ($tabfac as $key => $val)
//print "".$conf->global->COMPTA_JOURNAL_BUY." | ";
print "".$val["date"]." | ";
print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k." | ".$langs->trans("Products")." | ".($mt<0?price(-$mt):'')." | ".($mt>=0?price($mt):'')." | ";
+ print "".$k." | ".$langs->trans("Products")." | ";
+ print ''.($mt>=0?price($mt):'')." | ";
+ print ''.($mt<0?price(-$mt):'')." | ";
+ print "";
}
}
// vat
@@ -194,10 +186,26 @@ foreach ($tabfac as $key => $val)
//print "".$conf->global->COMPTA_JOURNAL_BUY." | ";
print "".$val["date"]." | ";
print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k." | ".$langs->trans("VAT")." | ".($mt<0?price(-$mt):'')." | ".($mt>=0?price($mt):'')." | ";
+ print "".$k." | ".$langs->trans("VAT")." ".$key." | ";
+ print ''.($mt>=0?price($mt):'')." | ";
+ print ''.($mt<0?price(-$mt):'')." | ";
+ print "";
}
}
-
+ print "";
+ // third party
+ //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
+ print "".$val["date"]." | ";
+ print "".$invoicestatic->getNomUrl(1)." | ";
+
+ foreach ($tabttc[$key] as $k => $mt)
+ {
+ print "".$k." | ".$langs->trans("ThirdParty")." | ";
+ print ''.($mt<0?-price(-$mt):'')." | ";
+ print ''.($mt>=0?price($mt):'')." | ";
+ }
+ print "
";
+
$var = !$var;
}
@@ -206,5 +214,6 @@ print "";
// End of page
llxFooter();
+
$db->close();
?>
\ No newline at end of file