Skip to content

Commit

Permalink
fill number of images automatically if 0
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenHankiewicz committed Sep 14, 2024
1 parent f31f5f5 commit f081233
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public void readInvoiceProperties() {
}
}

// if the number of pages is still 0 try to count these
if (invoicePages_units == 0) {
invoicePages_units = process.getSortHelperImages();
}

invoicePages_total = invoicePages_units * invoicePages_price;
invoiceService_total = invoiceService_units * invoiceService_price;
invoiceAdditionals_total = invoiceAdditionals_units * invoiceAdditionals_price;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private Document createXmlDocumentOfContent(Fileformat ff) throws PreferencesExc

// generally add the number of images for the process
Element e4 = new Element("processFiles");
e4.setText(String.valueOf(String.valueOf(p.getSortHelperImages())));
e4.setText(String.valueOf(p.getSortHelperImages()));
mainElement.addContent(e4);

// add all properties
Expand Down

0 comments on commit f081233

Please sign in to comment.