From b73a1642560967e968ba13eb4a06dbfa6df2987b Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Thu, 17 Nov 2016 16:32:19 +0100
Subject: [PATCH] Work on accounting module

---
 htdocs/accountancy/customer/index.php | 2 +-
 htdocs/accountancy/customer/list.php  | 2 +-
 htdocs/accountancy/supplier/index.php | 2 +-
 htdocs/accountancy/supplier/list.php  | 2 +-
 htdocs/comm/propal/card.php           | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php
index be03f372b0a..86e3ce9eb5d 100644
--- a/htdocs/accountancy/customer/index.php
+++ b/htdocs/accountancy/customer/index.php
@@ -80,7 +80,7 @@ if ($action == 'validatehistory') {
 	$sqlclean .= '	ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
 	$resql = $db->query($sqlclean);
 
-	// Now make the binding
+	// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
 	if ($db->type == 'pgsql') {
 		$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet";
 		$sql1 .= " SET fk_code_ventilation = accnt.rowid";
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index aa1c2742a08..ec1065d65c3 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -335,7 +335,7 @@ if ($result) {
 		if ($objp->product_label) print '<br>'.$objp->product_label;
 		print '</td>';
 		
-		print '<td class="tdoverflow">';
+		print '<td class="tdoverflowonsmartphone">';
 		$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
 		$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
 		print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->description);
diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php
index 5c60627ebb2..5b96e38d379 100644
--- a/htdocs/accountancy/supplier/index.php
+++ b/htdocs/accountancy/supplier/index.php
@@ -77,7 +77,7 @@ if ($action == 'validatehistory') {
 	$sqlclean .= '	ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
 	$resql = $db->query($sqlclean);
 	
-	// Now make the binding
+	// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
 	if ($db->type == 'pgsql') {
 		$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
 		$sql1 .= " SET fk_code_ventilation = accnt.rowid";
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index e59fb91cf23..daafd1d7b13 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -334,7 +334,7 @@ if ($result) {
 		// Ref Invoice
 		print '<td>' . $facturefourn_static->getNomUrl(1) . '</td>';
 
-		print '<td class="tdoverflow">';
+		print '<td class="tdoverflowonsmartphone">';
 		print $objp->invoice_label;
 		print '</td>';
 		
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 1fe8f76efaa..69891ca5ad4 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -2384,7 +2384,7 @@ if ($action == 'create')
 
 		$var = true;
 
-		print $formfile->showdocuments('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
+		print $formfile->showdocuments('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
 
 		// Show links to link elements
 		$linktoelem = $form->showLinkToObjectBlock($object, null, array('propal'));
-- 
GitLab