-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix #339, missing rendering of message * [Tests] Add tests for message and additional information
- Loading branch information
Showing
7 changed files
with
162 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const SwissQRBill = require("../"); | ||
|
||
const data = { | ||
currency: "CHF", | ||
amount: 1199.95, | ||
reference: "210000000003139471430009017", | ||
additionalInformation: "//S1/10/10201409/11/170309/20/14000000/ 30/106017086", | ||
creditor: { | ||
name: "Robert Schneider AG", | ||
address: "Rue du Lac 1268", | ||
zip: 2501, | ||
city: "Biel", | ||
account: "CH4431999123000889012", | ||
country: "CH" | ||
}, | ||
debtor: { | ||
name: "Pia-Maria Rutschmann-Schnyder", | ||
address: "Grosse Marktgasse 28", | ||
zip: 9400, | ||
city: "Rorschach", | ||
country: "CH" | ||
} | ||
}; | ||
|
||
const pdf = new SwissQRBill.PDF(data, "./output/additional-information.pdf", { "size": "A6/5" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const SwissQRBill = require("../"); | ||
|
||
const data = { | ||
currency: "CHF", | ||
amount: 1199.95, | ||
reference: "210000000003139471430009017", | ||
message: "Invoice number 12345 from order number 12345 on may 3rd 2021.", | ||
additionalInformation: "//S1/10/10201409/11/170309/20/14000000/ 30/106017086", | ||
creditor: { | ||
name: "Robert Schneider AG", | ||
address: "Rue du Lac 1268", | ||
zip: 2501, | ||
city: "Biel", | ||
account: "CH4431999123000889012", | ||
country: "CH" | ||
}, | ||
debtor: { | ||
name: "Pia-Maria Rutschmann-Schnyder", | ||
address: "Grosse Marktgasse 28", | ||
zip: 9400, | ||
city: "Rorschach", | ||
country: "CH" | ||
} | ||
}; | ||
|
||
const pdf = new SwissQRBill.PDF(data, "./output/message-additional-information.pdf", { "size": "A6/5" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const SwissQRBill = require("../"); | ||
|
||
const data = { | ||
currency: "CHF", | ||
amount: 1199.95, | ||
reference: "210000000003139471430009017", | ||
message: "Invoice number 12345 from order number 12345 on may 3rd 2021.", | ||
creditor: { | ||
name: "Robert Schneider AG", | ||
address: "Rue du Lac 1268", | ||
zip: 2501, | ||
city: "Biel", | ||
account: "CH4431999123000889012", | ||
country: "CH" | ||
}, | ||
debtor: { | ||
name: "Pia-Maria Rutschmann-Schnyder", | ||
address: "Grosse Marktgasse 28", | ||
zip: 9400, | ||
city: "Rorschach", | ||
country: "CH" | ||
} | ||
}; | ||
|
||
const pdf = new SwissQRBill.PDF(data, "./output/message.pdf", { "size": "A6/5" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const SwissQRBill = require("../"); | ||
|
||
const data = { | ||
currency: "CHF", | ||
amount: 1199.95, | ||
message: "Invoice number 12345 from order number 12345 on may 3rd 2021.", | ||
creditor: { | ||
name: "Robert Schneider AG", | ||
address: "Rue du Lac 1268", | ||
zip: 2501, | ||
city: "Biel", | ||
account: "CH5800791123000889012", | ||
country: "CH" | ||
}, | ||
debtor: { | ||
name: "Pia-Maria Rutschmann-Schnyder", | ||
address: "Grosse Marktgasse 28", | ||
zip: 9400, | ||
city: "Rorschach", | ||
country: "CH" | ||
} | ||
}; | ||
|
||
const pdf = new SwissQRBill.PDF(data, "./output/no-reference-message.pdf", { "size": "A6/5" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters