feat(invoice): add send route
This commit is contained in:
88
pkg/invoice/report/qrbill/assets/ch-cross.svg
Normal file
88
pkg/invoice/report/qrbill/assets/ch-cross.svg
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 20.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Ebene_2"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 128 128"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="ch-cross.svg"
|
||||
width="128"
|
||||
height="128"
|
||||
inkscape:export-filename="/home/irvin/Work/repos/swiss-qr-invoice/assets/raw/ch-cross.png"
|
||||
inkscape:export-xdpi="232.22856"
|
||||
inkscape:export-ydpi="232.22856"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
style="shape-rendering:crispEdges"><metadata
|
||||
id="metadata17"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs15" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1668"
|
||||
inkscape:window-height="1021"
|
||||
id="namedview13"
|
||||
showgrid="false"
|
||||
inkscape:document-units="px"
|
||||
units="px"
|
||||
inkscape:zoom="2.8284271"
|
||||
inkscape:cx="-38.018193"
|
||||
inkscape:cy="61.405051"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="31"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Ebene_2"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid916" /></sodipodi:namedview>
|
||||
<style
|
||||
type="text/css"
|
||||
id="style2">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill:none;stroke:#FFFFFF;stroke-width:1.4357;stroke-miterlimit:10;}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<g
|
||||
id="g4736"
|
||||
transform="matrix(4.8380969,0,0,4.8380389,-1.9834927e-5,9.0008541e-4)"><polygon
|
||||
transform="matrix(1.3598365,0,0,1.3598365,-0.23403522,-0.23403522)"
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.73538256"
|
||||
id="polygon4"
|
||||
points="0.7,0.7 0.7,1.6 0.7,18.3 0.7,19.1 1.6,19.1 18.3,19.1 19.1,19.1 19.1,18.3 19.1,1.6 19.1,0.7 18.3,0.7 1.6,0.7 " /><rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:1"
|
||||
id="rect6"
|
||||
height="14.958201"
|
||||
width="4.4874606"
|
||||
class="st0"
|
||||
y="5.2231627"
|
||||
x="11.034758" /><rect
|
||||
style="fill:#fffff9;fill-opacity:1;stroke-width:1"
|
||||
id="rect8"
|
||||
height="4.4874606"
|
||||
width="14.958201"
|
||||
class="st0"
|
||||
y="10.526525"
|
||||
x="5.7313952" /><polygon
|
||||
transform="matrix(1.3598207,0,0,1.3598361,-0.2338788,-0.23403126)"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.05601561;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="polygon10"
|
||||
points="1.6,0.7 0.7,0.7 0.7,1.6 0.7,18.3 0.7,19.1 1.6,19.1 18.3,19.1 19.1,19.1 19.1,18.3 19.1,1.6 19.1,0.7 18.3,0.7 "
|
||||
class="st1" /></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
71
pkg/invoice/report/qrbill/assets/scissors.svg
Normal file
71
pkg/invoice/report/qrbill/assets/scissors.svg
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="106.131"
|
||||
viewBox="0 0 16.933333 28.080496"
|
||||
version="1.1"
|
||||
id="svg851"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="scissors.svg"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<defs
|
||||
id="defs845" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.6582031"
|
||||
inkscape:cx="-135.5963"
|
||||
inkscape:cy="106.75833"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1080"
|
||||
inkscape:window-x="86"
|
||||
inkscape:window-y="117"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata848">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-52.847684,-108.31232)">
|
||||
<text
|
||||
y="-57.540855"
|
||||
x="117.23324"
|
||||
class="st2 st3"
|
||||
id="text18"
|
||||
style="font-size:11.17903996px;font-family:ZapfDingbatsITC;stroke-width:0.26458332"
|
||||
transform="rotate(90)">✂</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
111
pkg/invoice/report/qrbill/assets/style.css
Normal file
111
pkg/invoice/report/qrbill/assets/style.css
Normal file
@@ -0,0 +1,111 @@
|
||||
.c6ee15365-8f47-4dab-8bee-2a56a7916c57 {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 240px 1px 1fr;
|
||||
grid-template-rows: 1px 1fr;
|
||||
|
||||
.separator-h {
|
||||
grid-row: 1;
|
||||
grid-column: 1 / span 3;
|
||||
|
||||
border-top: 1px solid black;
|
||||
svg {
|
||||
transform: rotate(-90deg);
|
||||
margin-top: -52px;
|
||||
}
|
||||
}
|
||||
|
||||
.separator-v {
|
||||
grid-row: 2;
|
||||
grid-column: 2;
|
||||
|
||||
border-right: 1px solid black;
|
||||
svg {
|
||||
margin-left: -32px;
|
||||
}
|
||||
}
|
||||
|
||||
.receiver {
|
||||
grid-row: 2;
|
||||
grid-column: 1;
|
||||
|
||||
font-size: 12pt;
|
||||
padding: 1em;
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
h4 {
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
}
|
||||
|
||||
.payer {
|
||||
grid-row: 2;
|
||||
grid-column: 3;
|
||||
display: grid;
|
||||
grid-template-columns: 250px 1fr;
|
||||
grid-template-rows: 2em 1fr;
|
||||
padding: 1em;
|
||||
gap: 1em;
|
||||
|
||||
width: 100%;
|
||||
|
||||
h2 {
|
||||
grid-row: 1;
|
||||
grid-column: 1 / 2;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
.qr-code {
|
||||
grid-row: 2;
|
||||
grid-column: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.qr-section-img {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 1;
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.qr-section-info {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
justify-items: center;
|
||||
|
||||
p,
|
||||
h4 {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.payment-details {
|
||||
grid-row: 2;
|
||||
grid-column: 2;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
pkg/invoice/report/qrbill/assets/template.html
Normal file
70
pkg/invoice/report/qrbill/assets/template.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<article class="c6ee15365-8f47-4dab-8bee-2a56a7916c57">
|
||||
<div class="separator-h">{{ .Scissors }}</div>
|
||||
<div class="receiver">
|
||||
<div class="payment-details">
|
||||
<div>
|
||||
<h2>Empfangsschein</h2>
|
||||
<h4 style="margin-top: 0">Konto / Zahlbar an</h4>
|
||||
<p>
|
||||
{{ .ReceiverIBAN }} <br />
|
||||
{{ .ReceiverName }} <br />
|
||||
{{ .ReceiverStreet}} {{.ReceiverNumber}} <br />
|
||||
{{ .ReceiverZIPCode }} {{ .ReceiverPlace }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Referenz</h4>
|
||||
<p>{{ .Reference }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Zahlbar durch</h4>
|
||||
<p>
|
||||
{{ .PayeeName }} <br />
|
||||
{{ .PayeeStreet}} {{.PayeeNumber}} <br />
|
||||
{{ .PayeeZIPCode }} {{ .PayeePlace }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator-v">{{ .Scissors }}</div>
|
||||
<div class="payer">
|
||||
<h2>Zahlteil</h2>
|
||||
<div class="qr-code">
|
||||
<!-- Replace with your QR code image or generated SVG -->
|
||||
<div class="qr-section-img">
|
||||
<image src="{{ .GetQR }}"></image>
|
||||
{{ .Cross }}
|
||||
</div>
|
||||
|
||||
<div class="qr-section-info">
|
||||
<h4>Währung</h4>
|
||||
<h4>Betrag</h4>
|
||||
<p>CHF</p>
|
||||
<p>{{ .Amount }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-details">
|
||||
<div>
|
||||
<h4 style="margin-top: 0">Konto / Zahlbar an</h4>
|
||||
<p>
|
||||
{{ .ReceiverIBAN }} <br />
|
||||
{{ .ReceiverName }} <br />
|
||||
{{ .ReceiverStreet}} {{.ReceiverNumber}} <br />
|
||||
{{ .ReceiverZIPCode }} {{ .ReceiverPlace }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Referenz</h4>
|
||||
<p>{{ .Reference }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Zahlbar durch</h4>
|
||||
<p>
|
||||
{{ .PayeeName }} <br />
|
||||
{{ .PayeeStreet}} {{.PayeeNumber}} <br />
|
||||
{{ .PayeeZIPCode }} {{ .PayeePlace }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
Reference in New Issue
Block a user