浏览代码

Merge pull request #5863 from benlo06/fr_total_tva

New: Permit to print TotalTTC price in objectline_view
Laurent Destailleur 8 年之前
父节点
当前提交
a28e2a7fb6
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 3 1
      htdocs/core/class/commonobject.class.php
  2. 6 1
      htdocs/core/tpl/objectline_view.tpl.php

+ 3 - 1
htdocs/core/class/commonobject.class.php

@@ -3280,7 +3280,7 @@ abstract class CommonObject
 	{
 		global $conf, $hookmanager, $langs, $user;
 		// TODO We should not use global var for this !
-		global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove;
+		global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove, $outputalsopricetotalwithtax;
 
 		// Define usemargins
 		$usemargins=0;
@@ -3343,6 +3343,8 @@ abstract class CommonObject
 		// Multicurrency
 		if (!empty($conf->multicurrency->enabled)) print '<td class="linecoltotalht_currency" align="right">'.$langs->trans('TotalHTShortCurrency').'</td>';
 
+        if ($outputalsopricetotalwithtax) print '<td align="right" width="80">'.$langs->trans('TotalTTCShort').'</td>';
+
 		print '<td class="linecoledit"></td>';  // No width to allow autodim
 
 		print '<td class="linecoldelete" width="10"></td>';

+ 6 - 1
htdocs/core/tpl/objectline_view.tpl.php

@@ -36,7 +36,7 @@
  * $type, $text, $description, $line
  */
 
-global $forceall, $senderissupplier, $inputalsopricewithtax, $usemargins;
+global $forceall, $senderissupplier, $inputalsopricewithtax, $usemargins, $outputalsopricetotalwithtax;
 
 $usemargins=0;
 if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
@@ -45,6 +45,7 @@ if (empty($dateSelector)) $dateSelector=0;
 if (empty($forceall)) $forceall=0;
 if (empty($senderissupplier)) $senderissupplier=0;
 if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
+if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
 if (empty($usemargins)) $usemargins=0;
 ?>
 <?php $coldisplay=0; ?>
@@ -203,6 +204,10 @@ if (empty($usemargins)) $usemargins=0;
 		<td align="right" class="linecolutotalht_currency nowrap"><?php $coldisplay++; ?><?php echo price($line->multicurrency_total_ht); ?></td>
 		<?php } ?>
 	<?php } ?>
+        <?php if ($outputalsopricetotalwithtax) { ?>
+        <td align="right" class="liencolht nowrap"><?php $coldisplay++; ?><?php echo price($line->total_ttc); ?></td>
+        <?php } ?>
+
 
 	<?php 
 	if ($this->statut == 0  && ($object_rights->creer)) { ?>