Generates XML files for DeltaPro from Amazon invoices
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.0 KiB

7 years ago
#include "genxml.h"
GenXML::GenXML( QVector<QVector<QString>> data, QString file )
7 years ago
{
tabledata = data;
xmlfile = file;
7 years ago
}
int GenXML::Convert () {
QDomDocument xmldoc;
xmldoc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\"");
QDomElement TransferData = xmldoc.createElement("TransferData");
TransferData.setAttribute("xmlns", "urn:Transfer");
QDomElement Accountings = xmldoc.createElement("Accountings");
qDebug("RAZMER: %i", tabledata[1].size());
for( int i=0; i<tabledata.size(); i++) {
if(tabledata[i][0] == QString("Фактура").toUtf8()) {
qDebug("FAKTURA");
}
else {
qDebug("NE E FAKTURA");
}
qDebug("%s", tabledata[i][1]);
}
// if(tabledata[1][0] == QString("Фактура").toUtf8())
// qDebug("FAKTURA E");
// QMessageBox msgBox;
// msgBox.setWindowTitle("foo");
// msgBox.setText(tabledata[1][0]);
// msgBox.exec();
//// qDebug(tabledata[1][0].toLatin1());
7 years ago
return 0;
}