diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 5af6fbe37333e4501955317882f7c8a85125a558..1fe8f76efaac9f31608c800821dd23700c8a7ea8 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -777,7 +777,7 @@ if (empty($reshook)) $pu_ht = price($prodcustprice->lines [0]->price); $pu_ttc = price($prodcustprice->lines [0]->price_ttc); $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; + $tva_tx = $prodcustprice->lines [0]->tva_tx; } } } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index e0e569a99b243a2925eaaf11851fc3d6d9dee999..9495895bedac3579ec8b42ed2dc0c78e4a983840 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -730,7 +730,7 @@ if (empty($reshook)) $pu_ht = price($prodcustprice->lines [0]->price); $pu_ttc = price($prodcustprice->lines [0]->price_ttc); $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; + $tva_tx = $prodcustprice->lines [0]->tva_tx; } } else diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 3ee875b5d937fb026941fe9ee30437b32aa628c1..2bf69038e78c8aae9c0ab56d786d228dacc03580 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1433,7 +1433,7 @@ if (empty($reshook)) $pu_ht = price($prodcustprice->lines[0]->price); $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines[0]->tva_tx; + $tva_tx = $prodcustprice->lines[0]->tva_tx; } } } diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 33da64e322167c38443ec3a1990082878c300c51..b5467f74a02897e83769a0abd03ae82cfb585691 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -504,7 +504,7 @@ if (empty($reshook)) $pu_ht = price($prodcustprice->lines[0]->price); $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines[0]->tva_tx; + $tva_tx = $prodcustprice->lines[0]->tva_tx; } } } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 86e45ade086d22792b49a1470f0f7355c12a8596..3c29f4e8fca9211e51a6d0f9ca838df71cf21c67 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -494,7 +494,7 @@ if (empty($reshook)) $pu_ht = price($prodcustprice->lines [0]->price); $pu_ttc = price($prodcustprice->lines [0]->price_ttc); $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; + $tva_tx = $prodcustprice->lines [0]->tva_tx; } } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9926ca60f693740746d1b56fc70d9d4bedd783e7..e3e899eceba066d1f6230497aaf9759379b708cb 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/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>'; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php old mode 100644 new mode 100755 index 3e29c9f23e8ba02a27496899fccfc13f8f858dde..d38a3d761e4248cabcca34791f697ac58694aca8 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/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)) { ?> diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 49440246946e568f1a20b5ef2b1f7551f600c9bb..1e0f92a1cac198addedbdf790cec1106535d723d 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -24,6 +24,9 @@ -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +-- after changing const name, please insure that old constant was rename +UPDATE llx_const SET name = 'THIRDPARTY_DEFAULT_CREATE_CONTACT' WHERE name='MAIN_THIRPARTY_CREATION_INDIVIDUAL' -- under 3.9.0 +UPDATE llx_const SET name = 'THIRDPARTY_DEFAULT_CREATE_CONTACT' WHERE name='MAIN_THIRDPARTY_CREATION_INDIVIDUAL' -- under 4.0.1 -- VPGSQL8.2 ALTER TABLE llx_product_lot ALTER COLUMN entity SET DEFAULT 1; ALTER TABLE llx_product_lot MODIFY COLUMN entity integer DEFAULT 1; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 0a493ef60bc0a8f29e6ece502865094fbf84930a..b4a3f8ab420a413cf7fb21a20b5bb6d1bea38f6d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -636,7 +636,7 @@ if (empty($reshook)) $pu_ht = price($prodcustprice->lines [0]->price); $pu_ttc = price($prodcustprice->lines [0]->price_ttc); $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; + $tva_tx = $prodcustprice->lines [0]->tva_tx; } } }