render voucher validity; fix locale initialization
authorKonrad Rosenbaum <konrad@silmor.de>
Sun, 10 Jul 2016 13:27:23 +0000 (15:27 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Sun, 10 Jul 2016 13:27:23 +0000 (15:27 +0200)
commonlib/templates/ticketrender.cpp
src/main.cpp
src/templates/ticketedit.cpp

index 2d31ae6..0109320 100644 (file)
@@ -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 "";
 }
 
index 28deac0..f99f2da 100644 (file)
@@ -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{
index f81fd78..913cef3 100644 (file)
@@ -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()
 {