From d959c552f2656d2723c6d0c47404434fb5250af2 Mon Sep 17 00:00:00 2001
From: aspangaro <alexandre.spangaro@gmail.com>
Date: Fri, 19 Jun 2015 06:01:42 +0200
Subject: [PATCH] Fix: Accountancy - SQL error

---
 htdocs/accountancy/journal/sellsjournal.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php
index 24ed25f56ed..db9af17388a 100644
--- a/htdocs/accountancy/journal/sellsjournal.php
+++ b/htdocs/accountancy/journal/sellsjournal.php
@@ -141,7 +141,7 @@ if ($result) {
 
 		// Situation invoices handling
 		$line = new FactureLigne($db);
-		$line->fetch($obj->id);
+		$line->fetch($obj->rowid);
 		$prev_progress = $line->get_prev_progress();
 		if ($obj->situation_percent == 0) { // Avoid divide by 0
 			$situation_ratio = 0;
-- 
GitLab