diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
index c8f2142684c..0d2a6a7baed 100644
--- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
+++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
@@ -41,6 +41,11 @@ ALTER TABLE llx_website_page ADD COLUMN fk_user_modif integer;
-- For 7.0
+ALTER TABLE llx_product_fournisseur_price ADD COLUMN localtax1_tx double(6,3) DEFAULT 0;
+ALTER TABLE llx_product_fournisseur_price ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
+ALTER TABLE llx_product_fournisseur_price ADD COLUMN localtax2_tx double(6,3) DEFAULT 0;
+ALTER TABLE llx_product_fournisseur_price ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
+
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_SENTBYMAIL','Mails sent from member card','Executed when you send email from member card','member',23);
diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql
index f341b103edb..1c86bfe04f8 100755
--- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql
+++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql
@@ -38,6 +38,10 @@ create table llx_product_fournisseur_price
unitcharges double(24,8) DEFAULT 0, -- deprecated
default_vat_code varchar(10),
tva_tx double(6,3) NOT NULL,
+ localtax1_tx double(6,3) DEFAULT 0,
+ localtax1_type varchar(10) NOT NULL DEFAULT '0',
+ localtax2_tx double(6,3) DEFAULT 0,
+ localtax2_type varchar(10) NOT NULL DEFAULT '0',
info_bits integer NOT NULL DEFAULT 0,
fk_user integer,
fk_supplier_price_expression integer, -- Link to the rule for dynamic price calculation
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 7475d1194eb..93d2542ea69 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -382,6 +382,7 @@ LT2ES=IRPF
LT1IN=CGST
LT2IN=SGST
VATRate=Tax Rate
+DefaultTaxRate=Default tax rate
Average=Average
Sum=Sum
Delta=Delta
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index f3d61b26f81..af9fa2a927f 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -744,7 +744,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{
// TVA
- print '
| ' . $langs->trans("VATRate") . ' | ';
+ print ' |
| ' . $langs->trans("DefaultTaxRate") . ' | ';
$positiverates='';
if (price2num($object->multiprices_tva_tx[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_tva_tx[$soc->price_level]);
@@ -758,7 +758,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
else
{
// TVA
- print ' |
| ' . $langs->trans("VATRate") . ' | ';
+ print ' |
| ' . $langs->trans("DefaultTaxRate") . ' | ';
$positiverates='';
if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx);
@@ -781,14 +781,14 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{
// We show only vat for level 1
- print ' |
| ' . $langs->trans("VATRate") . ' | ';
+ print '
| ' . $langs->trans("DefaultTaxRate") . ' | ';
print '' . vatrate($object->multiprices_tva_tx[1], true) . ' | ';
print '
';
}
else
{
// TVA
- print '| ' . $langs->trans("VATRate") . ' | ';
+ print ' |
| ' . $langs->trans("DefaultTaxRate") . ' | ';
$positiverates='';
if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx);
@@ -945,7 +945,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
else
{
// TVA
- print ' |
| ' . $langs->trans("VATRate") . ' | ';
+ print ' |
| ' . $langs->trans("DefaultTaxRate") . ' | ';
$positiverates='';
if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx);
@@ -1123,7 +1123,7 @@ if ($action == 'edit_vat' && ($user->rights->produit->creer || $user->rights->se
print '';
// VAT
- print '| ' . $langs->trans("VATRate") . ' | ';
+ print ' | | ' . $langs->trans("DefaultTaxRate") . ' | ';
print $form->load_tva("tva_tx", $object->default_vat_code ? $object->tva_tx.' ('.$object->default_vat_code.')' : $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr, $object->type, false, 1);
print ' | ';
@@ -1157,7 +1157,7 @@ if ($action == 'edit_price' && $object->getRights()->creer)
print '';
// VAT
- print '| ' . $langs->trans("VATRate") . ' | ';
+ print ' | | ' . $langs->trans("DefaultTaxRate") . ' | ';
print $form->load_tva("tva_tx", $object->default_vat_code ? $object->tva_tx.' ('.$object->default_vat_code.')' : $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr, $object->type, false, 1);
print ' | ';
@@ -1298,7 +1298,7 @@ if ($action == 'edit_price' && $object->getRights()->creer)
print ''.$langs->trans("PriceLevel").' | ';
- if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) print ''.$langs->trans("VATRate").' | ';
+ if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) print ''.$langs->trans("DefaultTaxRate").' | ';
else print ' | ';
print ''.$langs->trans("SellingPrice").' | ';
@@ -1439,7 +1439,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
print '' . $langs->trans("PriceBase") . ' | ';
print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL;
- if (empty($conf->global->PRODUIT_MULTIPRICES)) print '' . $langs->trans("VATRate") . ' | ';
+ if (empty($conf->global->PRODUIT_MULTIPRICES)) print '' . $langs->trans("DefaultTaxRate") . ' | ';
print '' . $langs->trans("HT") . ' | ';
print '' . $langs->trans("TTC") . ' | ';
if (! empty($conf->dynamicprices->enabled)) {
@@ -1606,7 +1606,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '';
// VAT
- print '| ' . $langs->trans("VATRate") . ' | ';
+ print ' | | ' . $langs->trans("DefaultTaxRate") . ' | ';
print $form->load_tva("tva_tx", $object->default_vat_code ? $object->tva_tx.' ('.$object->default_vat_code.')' : $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr, $object->type, false, 1);
print ' | ';
@@ -1695,7 +1695,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '';
// VAT
- print '| ' . $langs->trans("VATRate") . ' | ';
+ print ' | | ' . $langs->trans("DefaultTaxRate") . ' | ';
print $form->load_tva("tva_tx", $prodcustprice->default_vat_code ? $prodcustprice->tva_tx.' ('.$prodcustprice->default_vat_code.')' : $prodcustprice->tva_tx, $mysoc, '', $object->id, $prodcustprice->recuperableonly, $object->type, false, 1);
print ' | ';
@@ -1799,7 +1799,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '' . $langs->trans("ThirdParty") . ' | ';
print '' . $langs->trans("AppliedPricesFrom") . ' | ';
print '' . $langs->trans("PriceBase") . ' | ';
- print '' . $langs->trans("VATRate") . ' | ';
+ print '' . $langs->trans("DefaultTaxRate") . ' | ';
print '' . $langs->trans("HT") . ' | ';
print '' . $langs->trans("TTC") . ' | ';
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '' . $langs->trans("INCT") . ' | ';
@@ -1920,7 +1920,7 @@ var_dump($prodcustprice);exit;
print '' . $langs->trans("ThirdParty") . ' | ';
print '' . $langs->trans("AppliedPricesFrom") . ' | ';
print '' . $langs->trans("PriceBase") . ' | ';
- print '' . $langs->trans("VATRate") . ' | ';
+ print '' . $langs->trans("DefaultTaxRate") . ' | ';
print '' . $langs->trans("HT") . ' | ';
print '' . $langs->trans("TTC") . ' | ';
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '' . $langs->trans("INCT") . ' | ';
|