Skip to content

Commit

Permalink
implemented XRechnung XML viewer. issue #2165
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Sep 13, 2024
1 parent 8385960 commit 8ed09a9
Show file tree
Hide file tree
Showing 9 changed files with 1,884 additions and 57 deletions.
Binary file modified j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@
import com.jdimension.jlawyer.client.launcher.LauncherFactory;
import com.jdimension.jlawyer.client.mail.EmailUtils;
import com.jdimension.jlawyer.client.mail.MessageContainer;
import com.jdimension.jlawyer.client.utils.einvoice.EInvoiceUtils;
import com.jdimension.jlawyer.persistence.ArchiveFileBean;
import com.jdimension.jlawyer.persistence.MailboxSetup;
import java.awt.Dimension;
Expand Down Expand Up @@ -759,6 +760,20 @@ public static JComponent getDocumentViewer(ArchiveFileBean caseDto, String id, S
xjp.setPreferredSize(new Dimension(width, height));
xjp.showContent(id, content);
return xjp;
} else if (lFileName.endsWith(".xml") && EInvoiceUtils.isEInvoice(new String(content))) {
XRechnungPanel xmlp = new XRechnungPanel();
xmlp.setSize(new Dimension(width, height));
xmlp.setMaximumSize(new Dimension(width, height));
xmlp.setPreferredSize(new Dimension(width, height));
xmlp.showContent(id, content);
return xmlp;
} else if (lFileName.endsWith(".xml")) {
XmlPanel xmlp = new XmlPanel();
xmlp.setSize(new Dimension(width, height));
xmlp.setMaximumSize(new Dimension(width, height));
xmlp.setPreferredSize(new Dimension(width, height));
xmlp.showContent(id, content);
return xmlp;
} else if (lFileName.endsWith(".eml")) {
try {
InputStream source = new ByteArrayInputStream(content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.rendering.ImageType;
import org.apache.pdfbox.rendering.PDFRenderer;
import org.mustangproject.Invoice;
import org.mustangproject.ZUGFeRD.ZUGFeRDImporter;
import org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter;
import themes.colors.DefaultColorTheme;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="tabs" alignment="1" pref="385" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="tabs" alignment="1" pref="201" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JTabbedPane" name="tabs">
<Properties>
<Property name="tabPlacement" type="int" value="2"/>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
<FontInfo relative="true">
<Font component="tabs" property="font" relativeSize="true" size="0"/>
</FontInfo>
</Property>
</Properties>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="E-Rechnung (HTML)">
<Property name="tabTitle" type="java.lang.String" value="E-Rechnung (HTML)"/>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JEditorPane" name="htmlInvoice">
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="E-Rechnung (XML)">
<Property name="tabTitle" type="java.lang.String" value="E-Rechnung (XML)"/>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextPane" name="xmlPane">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Courier" size="17" style="1"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Form>
Loading

0 comments on commit 8ed09a9

Please sign in to comment.