.
This commit is contained in:
@@ -81,13 +81,15 @@ class DividendsSummary
|
||||
if (!isset($test[$country]['incomes'][$val->getTax()])) {
|
||||
$test[$country]['incomes'][$val->getTax()] = 0;
|
||||
}
|
||||
if ($this->getRate($val) < 1) {
|
||||
die("Rate for date: ".$val->getDateTime()->format("Y-m-d")." / ".$val->getCurrency() . " is 0");
|
||||
}
|
||||
$income = round($val->getCount()*$val->getValue()*$this->getRate($val),5);
|
||||
$test[$country]['incomeAll'] += $income;
|
||||
$test[$country]['tax'] += round($this->count($val),5);
|
||||
$test[$country]['destiny_tax'] += round($this->count($val,true),5);
|
||||
$test[$country]['tax_cost'] += round($this->countTaxPrice($val),5);
|
||||
$test[$country]['incomes'][$val->getTax()] += $income;
|
||||
|
||||
if (!isset($countryToCurrency[$country])) {
|
||||
$countryToCurrency[$country] = $val->getCurrency();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user