Skip to content
Snippets Groups Projects
Commit d9a35847 authored by Martin Straka's avatar Martin Straka
Browse files

Added fiction flag into delivery info.

parent cc740159
Branches
Tags
1 merge request!358Fix Delivery Info
......@@ -401,15 +401,26 @@ QString Html::Export::htmlInfoPdf(Html::Export::ExportType type,
/* Header */
if (type == TYPE_DELIVERY_INFO) {
html += createPdfHeader(tr("Delivery Info"), envelope.dmID());
if (envelope.dmAcceptanceTime().isNull()) {
html += createPdfHeader(tr("Delivery Info"),
envelope.dmID());
} else {
html += createPdfHeader(tr("Acceptance Info"),
envelope.dmID());
}
} else {
html += createPdfHeader(tr("Message Envelope"), envelope.dmID());
html += createPdfHeader(tr("Message Envelope"),
envelope.dmID());
}
html += tableInfoStartPdf();
html += lineSeparatorPdf();
if (type == TYPE_DELIVERY_INFO) {
html += textLabelPdf(tr("Delivery Info"));
if (envelope.dmAcceptanceTime().isNull()) {
html += textLabelPdf(tr("Message Delivery Info"));
} else {
html += textLabelPdf(tr("Message Acceptance Info"));
}
} else {
html += textLabelPdf(tr("Message Envelope"));
}
......@@ -435,9 +446,6 @@ QString Html::Export::htmlInfoPdf(Html::Export::ExportType type,
} else {
html += messageTableInfoPdf(tr("Attachment Size"),
getSizeStr(envelope.dmAttachmentSize()));
html += messageTableInfoPdf(tr("Prohibit Acceptance through Fiction"),
(envelope.dmAllowSubstDelivery() == Isds::Type::BOOL_TRUE) ?
tr("yes") : tr("no"));
}
html += lineSeparatorPdf();
......@@ -495,11 +503,14 @@ QString Html::Export::htmlInfoPdf(Html::Export::ExportType type,
html += messageTableInfoPdf(tr("Personal Delivery"),
(envelope.dmPersonalDelivery() == Isds::Type::BOOL_TRUE) ?
tr("yes") : tr("no"));
html += messageTableInfoPdf(tr("Prohibit Acceptance through Fiction"),
(envelope.dmAllowSubstDelivery() != Isds::Type::BOOL_TRUE) ?
tr("yes") : tr("no"));
/* Events info section */
if (type == TYPE_DELIVERY_INFO) {
html += lineSeparatorPdf();
html += textLabelPdf(tr("Events") + QStringLiteral(":"));
html += textLabelPdf(tr("Message Events") + QStringLiteral(":"));
foreach (const Isds::Event &event, envelope.dmEvents()) {
html += messageTableInfoPdf(
dateTimeToStringPdf(event.time()),
......@@ -612,8 +623,8 @@ QString Html::Export::htmlMessageInfoApp(const Isds::Envelope &envelope,
html += strongInfoLine(tr("Message Type"),
Isds::Description::descrDmTypeChar(envelope.dmType()));
}
html += strongInfoLine(tr("Acceptance through Fiction"),
(envelope.dmAllowSubstDelivery() == Isds::Type::BOOL_TRUE) ?
html += strongInfoLine(tr("Prohibit Acceptance through Fiction"),
(envelope.dmAllowSubstDelivery() != Isds::Type::BOOL_TRUE) ?
tr("yes") : tr("no"));
/* Sender & recipient info section */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment