Skip to content
Snippets Groups Projects
Commit b7279421 authored by Juanjo Menent's avatar Juanjo Menent Committed by GitHub
Browse files

Merge pull request #5702 from simnandez/3.8

FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
parents 5c2af9b7 3078e6fa
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
......@@ -617,7 +617,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($value == 'entity') {
......@@ -665,7 +665,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
......@@ -1283,23 +1283,12 @@ if ($id)
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='localtax1') {
else if ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
if ($obj->localtax1 == 0)
$valuetoshow = '';
$align="right";
}
else if ($fieldlist[$field]=='localtax2') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
if ($obj->localtax2 == 0)
$valuetoshow = '';
$align="right";
}
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
{
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="right";
}
else if (in_array($fieldlist[$field],array('recuperableonly')))
{
$align="center";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment