start of audit dialog
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 25 Dec 2010 11:25:46 +0000 (11:25 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 25 Dec 2010 11:25:46 +0000 (11:25 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@676 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/dialogs/dialogs.pri
src/dialogs/orderauditdlg.cpp [new file with mode: 0644]
src/dialogs/orderauditdlg.h [new file with mode: 0644]
src/dialogs/orderwin.cpp

index 6d9abe6..1b40913 100644 (file)
@@ -11,7 +11,8 @@ HEADERS += \
        dialogs/pricecatdlg.h \
        dialogs/aclwin.h \
        dialogs/flagedit.h \
-       dialogs/wizard.h
+       dialogs/wizard.h \
+       dialogs/orderauditdlg.h
 
 SOURCES += \
        dialogs/configdialog.cpp \
@@ -26,6 +27,7 @@ SOURCES += \
        dialogs/pricecatdlg.cpp \
        dialogs/aclwin.cpp \
        dialogs/flagedit.cpp \
-       dialogs/wizard.cpp
+       dialogs/wizard.cpp \
+       dialogs/orderauditdlg.cpp
 
 INCLUDEPATH += ./dialogs
\ No newline at end of file
diff --git a/src/dialogs/orderauditdlg.cpp b/src/dialogs/orderauditdlg.cpp
new file mode 100644 (file)
index 0000000..aabe424
--- /dev/null
@@ -0,0 +1,19 @@
+//
+// C++ Implementation: orderaudit dialog
+//
+// Description: 
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2010-2011
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#include "orderauditdlg.h"
+
+MOrderAuditDialog::MOrderAuditDialog(const MTGetOrderAudit& audit, QWidget* parent)
+       : QDialog(parent)
+{
+
+}
diff --git a/src/dialogs/orderauditdlg.h b/src/dialogs/orderauditdlg.h
new file mode 100644 (file)
index 0000000..dbe3a42
--- /dev/null
@@ -0,0 +1,27 @@
+//
+// C++ Interface: orderaudit dialog
+//
+// Description: 
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2010-2011
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#ifndef MAGICSMOKE_ORDERAUDITDLG_H
+#define MAGICSMOKE_ORDERAUDITDLG_H
+
+#include <QDialog>
+
+class MTGetOrderAudit;
+
+class MOrderAuditDialog:public QDialog
+{
+       Q_OBJECT
+       public:
+               MOrderAuditDialog(const MTGetOrderAudit&audit,QWidget*parent=0);
+};
+
+#endif
index f273b4a..5d6ac60 100644 (file)
@@ -4,7 +4,7 @@
 // Description: 
 //
 //
-// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008-2011
 //
 // Copyright: See README/COPYING files that come with this distribution
 //
@@ -14,6 +14,7 @@
 #include "labeldlg.h"
 #include "misc.h"
 #include "odtrender.h"
+#include "orderauditdlg.h"
 #include "orderwin.h"
 #include "ticketrender.h"
 #include "msinterface.h"
@@ -1092,7 +1093,15 @@ void MOrderWindow::voucherAudit()
 void MOrderWindow::orderAudit()
 {
        MTGetOrderAudit oa=req->queryGetOrderAudit(m_order.orderid());
-       qDebug()<<"order lines"<<oa.getorder().size()<<"ticket lines"<<oa.gettickets().size()<<"voucher lines"<<oa.getvouchers().size();
+//     qDebug()<<"order lines"<<oa.getorder().size()<<"ticket lines"<<oa.gettickets().size()<<"voucher lines"<<oa.getvouchers().size();
+       if(oa.hasError()){
+               QMessageBox::warning(this,tr("Warning"),tr("Error while retrieving audit data: %1").arg(oa.errorString()));
+               return;
+       }
+       if(oa.getorder().size()==0)
+               QMessageBox::warning(this,tr("Warning"),tr("Sorry, no audit data available."));
+       else
+               MOrderAuditDialog(oa,this).exec();
 }