From: Konrad Rosenbaum Date: Sun, 10 Jul 2016 13:27:23 +0000 (+0200) Subject: render voucher validity; fix locale initialization X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=324dfe21fd3fc10d0dc13a57d2f25baff1235756;p=web%2Fkonrad%2Fsmoke.git render voucher validity; fix locale initialization --- diff --git a/commonlib/templates/ticketrender.cpp b/commonlib/templates/ticketrender.cpp index 2d31ae6..0109320 100644 --- a/commonlib/templates/ticketrender.cpp +++ b/commonlib/templates/ticketrender.cpp @@ -594,6 +594,7 @@ QString MVoucherLabel::getVariable(QString var)const if(var=="VOUCHERID"||var=="BARCODE")return vouc.voucherid(); if(var=="PRICE")return vouc.priceString(); if(var=="VALUE")return vouc.valueString(); + if(var=="VALIDDATE")return vouc.validDate(); return ""; } diff --git a/src/main.cpp b/src/main.cpp index 28deac0..f99f2da 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,7 @@ int MagicSmokeMain::realmain(int argc,char**argv) WTransaction::setLogPrefix("Main-T"); MSInterface*ms=new MSInterface(sc.currentProfileId()); ms->loginSession(sc.currentUsername(), sc.currentSessionId()); + ms->initialize(); MOverview *mo=new MOverview(sc.currentProfileId()); mo->showRestored(); }else{ diff --git a/src/templates/ticketedit.cpp b/src/templates/ticketedit.cpp index f81fd78..913cef3 100644 --- a/src/templates/ticketedit.cpp +++ b/src/templates/ticketedit.cpp @@ -266,7 +266,9 @@ const QString example( "ARTIST\tHenry the Drycleaner\tstring\n" "PRICECATEGORY\tExpensive\tstring\n" "PRICECATEGORYABBR\texp\tstring\n" -"VALUE\t12.00\tmoney"); +"VALUE\t12.00\tmoney\n" +"VALIDDATE\t2023-12-31\tdate" +); void MTicketEditor::loadExampleData() {