@@ -74,7 +74,7 @@ class invoice extends Base {
7474 let countryDebitor = "CH" ;
7575
7676 if ( nDebitorAddressFields > 0 ) {
77- nameDebitor = this . config . get ( 'invoiceAddress' ) [ 0 ] . replaceAll ( "_ ", " " ) ;
77+ nameDebitor = this . config . get ( 'invoiceAddress' ) [ 0 ] . replace ( "/_/g ", " " ) ;
7878 }
7979 else {
8080 nameDebitor = this . config . get ( 'invoiceAddress' ) . toString ( ) ;
@@ -83,10 +83,10 @@ class invoice extends Base {
8383 if ( nDebitorAddressFields > 2 ) {
8484 let endOfZipPosDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 1 ] . search ( "[ _]" ) ;
8585 if ( endOfZipPosDebitor > 0 ) {
86- zipDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 1 ] . substring ( 0 , endOfZipPosDebitor ) . replaceAll ( "_ ", " " ) ;
87- cityDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 1 ] . substring ( endOfZipPosDebitor + 1 ) . replaceAll ( "_ ", " " ) ;
86+ zipDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 1 ] . substring ( 0 , endOfZipPosDebitor ) . replace ( "/_/g ", " " ) ;
87+ cityDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 1 ] . substring ( endOfZipPosDebitor + 1 ) . replace ( "/_/g ", " " ) ;
8888 }
89- addressDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 2 ] . replaceAll ( "_ ", " " ) ;
89+ addressDebitor = this . config . get ( 'invoiceAddress' ) [ nDebitorAddressFields - 2 ] . replace ( "/_/g ", " " ) ;
9090 if ( zipDebitor . search ( "-" ) > 0 )
9191 {
9292 let countryZip = zipDebitor . split ( "-" ) ;
0 commit comments