[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/kraft/src
From: Klaas Freitag <klaas () freisturz ! de>
Date: 2011-11-26 20:40:21
Message-ID: 20111126204021.B88E8AC88D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1265939 by freitag:
- fix updates of the doc overview
- docpostcard individual tax aware
M +17 -2 docpostcard.cpp
M +1 -0 kraftview.cpp
M +1 -1 positionviewwidget.cpp
--- trunk/playground/office/kraft/src/docpostcard.cpp #1265938:1265939
@@ -91,7 +91,6 @@
mPositionCount = posList.count();
mTotal = posList.nettoPrice().toHtmlString( posList.locale() );
QString brutto = posList.bruttoPrice( tax, reducedTax ).toHtmlString( posList.locale() );
- QString taxStr = posList.taxSum( tax, reducedTax ).toHtmlString( posList.locale() );
mPositions += QString( "<tr><td colspan=\"2\" class=\"baseline\"></td></tr>" );
if ( taxType != DocPositionBase::TaxInvalid && taxType != DocPositionBase::TaxNone ) {
@@ -100,13 +99,29 @@
QString curTax;
curTax.setNum( tax, 'f', 1 );
- if ( taxType == DocPositionBase::TaxReduced ) {
+ QString taxStr;
+
+ if( taxType == DocPositionBase::TaxReduced || taxType == DocPositionBase::TaxIndividual ) {
curTax.setNum( reducedTax, 'f', 1 );
+ taxStr = posList.reducedTaxSum( reducedTax ).toHtmlString( posList.locale() );
+ mPositions += QString( "<tr><td>" ) + i18n( "+ %1% Tax:" ).arg( curTax ) +
+ QString( "</td><td align=\"right\">%1</td></tr>" ).arg( taxStr );
}
+ if( taxType == DocPositionBase::TaxFull || taxType == DocPositionBase::TaxIndividual ) {
+ curTax.setNum( tax, 'f', 1 );
+ taxStr = posList.fullTaxSum( tax ).toHtmlString( posList.locale() );
mPositions += QString( "<tr><td>" ) + i18n( "+ %1% Tax:" ).arg( curTax ) +
QString( "</td><td align=\"right\">%1</td></tr>" ).arg( taxStr );
}
+
+ if( taxType == DocPositionBase::TaxIndividual ) {
+ taxStr = posList.taxSum( tax, reducedTax ).toHtmlString( posList.locale() );
+ mPositions += QString( "<tr><td>" ) + i18n( "Sum Tax:" ) +
+ QString( "</td><td align=\"right\">%1</td></tr>" ).arg( taxStr );
+ }
+
+ }
mPositions += QString( "<tr><td><b>" ) + i18n( "Total:" )+
QString( "</b></td><td align=\"right\"><b>%1</b></td></tr>" ).arg( brutto );
mPositions += "</table></div>";
--- trunk/playground/office/kraft/src/kraftview.cpp #1265938:1265939
@@ -672,6 +672,7 @@
}
mTaxBefore = newId;
+ slotModifiedFooter();
}
/* This is the flow in the move up method:
--- trunk/playground/office/kraft/src/positionviewwidget.cpp #1265938:1265939
@@ -340,7 +340,7 @@
}
mTaxSubmenu->setIcon( KIcon( icon ));
-
+ emit positionModified();
}
void PositionViewWidget::slotAllowIndividualTax( bool allow )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic