refs #1408 discount show rate

This commit is contained in:
Cüneyt Şentürk 2020-04-20 04:42:48 +03:00
parent 550be2ef53
commit 929e1a74bd
2 changed files with 4 additions and 6 deletions

View File

@ -72,13 +72,12 @@ class BillTotal extends Model
}
if (!empty($percent)) {
$title .= ' (';
if (setting('localisation.percent_position', 'after') == 'after') {
$title .= ($this->code == 'discount') ? false : (($tax->type == 'fixed') ? $percent : $percent . '%');
$title .= ($this->code == 'discount') ? $percent. '%' : (($tax->type == 'fixed') ? $percent : $percent . '%');
} else {
$title .= ($this->code == 'discount') ? false : (($tax->type == 'fixed') ? $percent : '%' . $percent);
$title .= ($this->code == 'discount') ? '%' .$percent : (($tax->type == 'fixed') ? $percent : '%' . $percent);
}
$title .= ')';

View File

@ -72,13 +72,12 @@ class InvoiceTotal extends Model
}
if (!empty($percent)) {
$title .= ' (';
if (setting('localisation.percent_position', 'after') == 'after') {
$title .= ($this->code == 'discount') ? false : (($tax->type == 'fixed') ? $percent : $percent . '%');
$title .= ($this->code == 'discount') ? $percent. '%' : (($tax->type == 'fixed') ? $percent : $percent . '%');
} else {
$title .= ($this->code == 'discount') ? false : (($tax->type == 'fixed') ? $percent : '%' . $percent);
$title .= ($this->code == 'discount') ? '%' .$percent : (($tax->type == 'fixed') ? $percent : '%' . $percent);
}
$title .= ')';