浏览代码

Minor code fix

Laurent Destailleur 8 年之前
父节点
当前提交
ccd7100b7f

+ 8 - 8
htdocs/accountancy/customer/index.php

@@ -171,9 +171,9 @@ print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
 print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
 for($i = 1; $i <= 12; $i ++) {
-	print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
+	print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
 }
-print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
+print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
 
 $sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
 $sql .= "  " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
@@ -220,9 +220,9 @@ print "<br>\n";
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
 for($i = 1; $i <= 12; $i ++) {
-	print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
+	print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
 }
-print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
+print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
 
 $sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
 for($i = 1; $i <= 12; $i ++) {
@@ -264,9 +264,9 @@ if (! empty($conf->margin->enabled)) {
 	print '<table class="noborder" width="100%">';
 	print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
 	for($i = 1; $i <= 12; $i ++) {
-		print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
+		print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
 	}
-	print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
+	print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
 
 	$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
 	for($i = 1; $i <= 12; $i ++) {
@@ -291,9 +291,9 @@ if (! empty($conf->margin->enabled)) {
 
 			print '<tr><td>' . $row[0] . '</td>';
 			for($i = 1; $i <= 12; $i ++) {
-				print '<td align="right">' . price($row[$i]) . '</td>';
+				print '<td align="right">' . price(price2num($row[$i])) . '</td>';
 			}
-			print '<td align="right"><b>' . price($row[13]) . '</b></td>';
+			print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
 			print '</tr>';
 		}
 		$db->free($resql);

+ 6 - 5
htdocs/accountancy/customer/lines.php

@@ -87,6 +87,11 @@ if (! $user->rights->accounting->ventilation->dispatch)
 
 $formventilation = new FormVentilation($db);
 
+
+/*
+ * Actions
+ */
+
 // Purge search criteria
 if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
 {
@@ -148,10 +153,6 @@ print '<script type="text/javascript">
 			});
 			 </script>';
 
-/*
- * Action
- */
-
 /*
  * Customer Invoice lines
  */
@@ -251,7 +252,7 @@ if ($result) {
 
 	print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
 	print $formventilation->select_account($account_parent, 'account_parent', 1);
-	print '<input type="submit" class="butAction" value="' . $langs->trans("Validate") . '"/></div>';
+	print '<input type="submit" class="button" value="' . $langs->trans("Validate") . '"/></div>';
 
 	print '<tr class="liste_titre">';
 	print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);

+ 3 - 0
htdocs/accountancy/customer/list.php

@@ -103,9 +103,12 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
 	$search_vat = '';
 }
 
+
+
 /*
  * View
  */
+
 llxHeader('', $langs->trans("Ventilation"));
 
 print '<script type="text/javascript">

+ 5 - 5
htdocs/accountancy/supplier/index.php

@@ -155,9 +155,9 @@ print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
 print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
 for($i = 1; $i <= 12; $i ++) {
-	print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
+	print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
 }
-print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
+print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
 
 $sql = "SELECT  ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
 $sql .= "  " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
@@ -205,9 +205,9 @@ print "<br>\n";
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
 for($i = 1; $i <= 12; $i ++) {
-	print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
+	print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
 }
-print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
+print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
 
 $sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
 for($i = 1; $i <= 12; $i ++) {
@@ -247,4 +247,4 @@ if ($resql) {
 print "</table>\n";
 
 llxFooter();
-$db->close();
+$db->close();

+ 7 - 1
htdocs/accountancy/supplier/lines.php

@@ -85,6 +85,11 @@ if (! $user->rights->accounting->ventilation->dispatch)
 
 $formventilation = new FormVentilation($db);
 
+
+/*
+ * Actions
+ */
+
 // Purge search criteria
 if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
 {
@@ -121,6 +126,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
 	}
 }
 
+
 /*
  * View
  */
@@ -198,7 +204,7 @@ if ($result) {
 	
 	print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
 	print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
-	print '<input type="submit" class="butAction" value="' . $langs->trans("Validate") . '" /></div>';
+	print '<input type="submit" class="button" value="' . $langs->trans("Validate") . '" /></div>';
 	
 	print '<tr class="liste_titre">';
 	print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);

+ 2 - 1
htdocs/install/mysql/tables/llx_facturedet.sql

@@ -54,7 +54,8 @@ create table llx_facturedet
   buy_price_ht					double(24,8) DEFAULT 0,				-- buying price
   fk_product_fournisseur_price	integer      DEFAULT NULL,			-- reference of supplier price when line was added (may be used to update buy_price_ht current price when future invoice will be created)
 
-  fk_code_ventilation			integer    DEFAULT 0 NOT NULL,
+  fk_code_ventilation			integer    DEFAULT 0 NOT NULL,		-- Id in table llx_accounting_bookeeping to know accounting account for product line
+  
   special_code					integer    DEFAULT 0,			    -- code pour les lignes speciales
   rang							integer    DEFAULT 0,				-- position of line
   fk_contract_line  integer NULL,									-- id of contract line when invoice comes from contract lines