From 324dfe21fd3fc10d0dc13a57d2f25baff1235756 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 10 Jul 2016 15:27:23 +0200 Subject: [PATCH] render voucher validity; fix locale initialization --- commonlib/templates/ticketrender.cpp | 1 + src/main.cpp | 1 + src/templates/ticketedit.cpp | 4 +++- 3 files changed, 5 insertions(+), 1 deletions(-) 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() { -- 1.7.2.5