@@ -128,6 +128,8 @@ class invoice extends Base {
128128 }
129129 }
130130
131+ let qrDivContent = "" ;
132+
131133 const data = {
132134 currency : "CHF" ,
133135 amount : this . totalForInvoice ,
@@ -151,11 +153,16 @@ class invoice extends Base {
151153 const options = {
152154 language : "DE"
153155 } ;
154- const svg = new SwissQRBill ( data , options ) ;
155- // make svg scalable, by adding viewBox and removing height/width attributes
156- svg . instance . viewBox ( 0 , 0 , 740 , 420 )
157- svg . instance . height ( "" ) ;
158- svg . instance . width ( "" ) ;
156+
157+ if ( this . config . get ( 'invoiceSettings' ) . SwissQRBill ) {
158+ const svg = new SwissQRBill ( data , options ) ;
159+ // make svg scalable, by adding viewBox and removing height/width attributes
160+ svg . instance . viewBox ( 0 , 0 , 740 , 420 )
161+ svg . instance . height ( "" ) ;
162+ svg . instance . width ( "" ) ;
163+ qrDivContent = svg . toString ( ) ;
164+ }
165+
159166 let positions = "" ;
160167 let positionIids = Object . keys ( this . invoicePositions ) ;
161168 positionIids . sort ( ) ;
@@ -214,7 +221,7 @@ ${this.config.get('invoiceSettings').bankAccount}
214221${ closing }
215222
216223
217- <div class="qr-div">${ svg . toString ( ) } </div>`
224+ <div class="qr-div">${ qrDivContent } </div>`
218225
219226 }
220227
0 commit comments