From c4a2923ac1a84dcac001970a5538cc495feed090 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 24 Jan 2009 15:25:12 +0000 Subject: [PATCH] merge changes from stable08 branch (-r344:349) git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@249 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- doc/prog_odttemplate.html | 1 + src/eventsummary.cpp | 4 ++++ src/odtrender.cpp | 6 ++++-- src/smoke_de.ts | 2 +- src/smoke_de_SAX.ts | 3 ++- src/smoke_en.ts | 2 +- src/templatedlg.cpp | 2 +- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/prog_odttemplate.html b/doc/prog_odttemplate.html index 7291d71..ca7c1c4 100644 --- a/doc/prog_odttemplate.html +++ b/doc/prog_odttemplate.html @@ -173,6 +173,7 @@ Variables: @UNUSED@tickets that are still unused @CANCELLED@tickets that were cancelled @TOTALMONEY@the total amount of income for this event +@EVENTPRICE@the default price for this event @TICKETS@the amount of ticket lines in the overview @TICKETS:PRICE@the price of this category diff --git a/src/eventsummary.cpp b/src/eventsummary.cpp index 4b4e2fc..81f389e 100644 --- a/src/eventsummary.cpp +++ b/src/eventsummary.cpp @@ -263,6 +263,10 @@ void MEventSummary::getVariable(QString varname,MOdtRenderer::VarType&av,QVarian if(varname=="ORDERS"){ value=orderids.size(); av=MOdtRenderer::IntVar; + }else + if(varname=="EVENTPRICE"){ + value=event.price(); + av=MOdtRenderer::MoneyVar; } } diff --git a/src/odtrender.cpp b/src/odtrender.cpp index 2dc679d..38831aa 100644 --- a/src/odtrender.cpp +++ b/src/odtrender.cpp @@ -234,7 +234,7 @@ QString MOdtRendererPrivate::renderLine(QString line,QString loop,int lpos) static QString vc="ABCDEFGHIJKLMNOPQRSTUVWXYZ:+-0123456789$#"; //check for conditionals if(line.trimmed().startsWith("#IF:")){ - QString stmt=line.trimmed().mid(3).trimmed(); + QString stmt=line.trimmed().mid(4).trimmed(); qDebug("????????????????If: %s",stmt.toAscii().data()); //split out var name //get list of statement tokens @@ -249,7 +249,7 @@ QString MOdtRendererPrivate::renderLine(QString line,QString loop,int lpos) qint64 op2=intToken(stl[2],loop,lpos); if(stl[1]=="<")iftrue=op1")iftrue=op1>op2;else - if(stl[1]=="=" || stl[1]=="=")iftrue=op1==op2;else + if(stl[1]=="=" || stl[1]=="==")iftrue=op1==op2;else if(stl[1]=="<=")iftrue=op1<=op2;else if(stl[1]==">=")iftrue=op1>=op2;else if(stl[1]=="<>" || stl[1]=="!=")iftrue=op1!=op2; @@ -257,6 +257,7 @@ QString MOdtRendererPrivate::renderLine(QString line,QString loop,int lpos) qDebug("??????????IfError: unknown operator"); return ""; } + qDebug("???????????????? If(%lli %s %lli) evaluates to: %s",op1,stl[1].toAscii().data(),op2,iftrue?"true":"false"); return ""; }else if(line.trimmed()=="#ELSE"){ @@ -320,6 +321,7 @@ QString MOdtRendererPrivate::renderLine(QString line,QString loop,int lpos) return ""; } } + qDebug("????????????????CalcResult: %s <= %lli",var.toAscii().data(),res); setLocalVar(var,res); return ""; } diff --git a/src/smoke_de.ts b/src/smoke_de.ts index 53ab517..95416ae 100644 --- a/src/smoke_de.ts +++ b/src/smoke_de.ts @@ -2820,7 +2820,7 @@ Verbleibender Betrag: %2 - Please chose a variant of template %s: + Please chose a variant of template %1: Bitte wählen Sie eine Variante für die Vorlage %1: diff --git a/src/smoke_de_SAX.ts b/src/smoke_de_SAX.ts index 46a728a..700c789 100644 --- a/src/smoke_de_SAX.ts +++ b/src/smoke_de_SAX.ts @@ -1,5 +1,6 @@ + MBackupDialog @@ -2817,7 +2818,7 @@ Value remaining on voucher: %2 - Please chose a variant of template %s: + Please chose a variant of template %1: Such Dir ma' ne Variande von dor Vorlache %1 raus: diff --git a/src/smoke_en.ts b/src/smoke_en.ts index 945a258..6c8beca 100644 --- a/src/smoke_en.ts +++ b/src/smoke_en.ts @@ -2685,7 +2685,7 @@ Value remaining on voucher: %2 - Please chose a variant of template %s: + Please chose a variant of template %1: diff --git a/src/templatedlg.cpp b/src/templatedlg.cpp index a384e36..641b834 100644 --- a/src/templatedlg.cpp +++ b/src/templatedlg.cpp @@ -29,7 +29,7 @@ MTemplateChoice::MTemplateChoice(const QString&cd,const QString&tname,const QStr setWindowTitle(tr("Chose Template")); QVBoxLayout *vl; setLayout(vl=new QVBoxLayout); - vl->addWidget(new QLabel(tr("Please chose a variant of template %s:").arg(tname))); + vl->addWidget(new QLabel(tr("Please chose a variant of template %1:").arg(tname))); vl->addWidget(box=new QComboBox); box->setEditable(false); QSettings set; -- 1.7.2.5