Skip to content

Commit

Permalink
Do not display the individual tax block in the report for uniform taxes.
Browse files Browse the repository at this point in the history
If the document only has full tax items, there is no need to show the
block of individual taxes on the pdf. That mistake in the detection is
fixed by this commit.
  • Loading branch information
dragotin committed Jun 12, 2018
1 parent b24a946 commit a7d4b23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reportgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ void ReportGenerator::slotAddresseeSearchFinished( int )
/* replace the placeholders */
/* A placeholder has the format <!-- %VALUE --> */

ArchDocPositionList posList = mArchDoc->positions();
const ArchDocPositionList posList = mArchDoc->positions();
QString h;

ArchDocPositionList::iterator it;
ArchDocPositionList::const_iterator it;
int specialPosCnt = 0;
int taxFreeCnt = 0;
int reducedTaxCnt = 0;
Expand All @@ -235,7 +235,7 @@ void ReportGenerator::slotAddresseeSearchFinished( int )
DocPositionBase::TaxType ttype = DocPositionBase::TaxInvalid;
for ( it = posList.begin(); it != posList.end(); ++it ) {
ArchDocPosition pos (*it);
if( ttype == -1 ) {
if( ttype == DocPositionBase::TaxInvalid ) {
ttype = pos.taxType();
} else {
if( ttype != pos.taxType() ) { // different from previous one?
Expand Down

0 comments on commit a7d4b23

Please sign in to comment.