Skip to content

Commit

Permalink
Removed test data and fixed formatting in pdf organization number
Browse files Browse the repository at this point in the history
  • Loading branch information
Wholteza committed Jul 2, 2023
1 parent eb25b33 commit aaa3f3b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
37 changes: 17 additions & 20 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,41 @@ import {

const testCompanyInformation: CompanyInformation = {
Identity: {
Name: "Company Companysson",
OrganizationNumber: "0000000000",
VatNumber: "000000",
Name: "",
OrganizationNumber: "",
VatNumber: "",
},
ContactInformation: {
Email: "test@example.org",
Phone: "0700000000",
Website: "example.org",
Email: "",
Phone: "",
Website: "",
},
Address: {
City: "Testy",
Street: "Testenton st. 12",
ZipCode: "00000",
City: "",
Street: "",
ZipCode: "",
},
PaymentInformation: {
Bankgiro: "0000-000",
Bankgiro: "",
},
};

const testCustomerInformation: CustomerInformation = {
Identity: {
Name: "Customer Customersson",
OrganizationNumber: "0000000000",
},
Contact: {
Phone: "0700000000",
Name: "",
OrganizationNumber: "",
},
Address: {
City: "Testy",
Street: "Testenton st. 12",
ZipCode: "00000",
City: "",
Street: "",
ZipCode: "",
},
};

const testReceiptInformation: ReceiptInformation = {
number: "A1",
number: "",
date: new Date(Date.now()),
paymentTerms: "Kontantbetalning",
paymentTerms: "",
};

const testReceiptRow: ReceiptRowFormModel = {
Expand Down
1 change: 1 addition & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ h1 {
body {
@include font-family();
background-color: $color-background;

margin: 0;
padding: 0;
overflow-x: hidden;
Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export type CompanyInformation = {
export type CustomerInformation = {
Identity: Identity;
Address: Address;
Contact: Contact;
};

export type ReceiptInformation = {
Expand Down
12 changes: 10 additions & 2 deletions src/use-pdf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,21 @@ const usePdf = () => {
]);
writeOnNewLine([
{
text: `${companyInformation.Identity.Name} (${companyInformation.Identity.OrganizationNumber})`,
text: `${companyInformation.Identity.Name} ${
companyInformation.Identity.OrganizationNumber
? "(" + companyInformation.Identity.OrganizationNumber + ")"
: ""
}`,
x: columns.left,
type: "body",
},

{
text: `${customerInformation.Identity.Name} (${customerInformation.Identity.OrganizationNumber})`,
text: `${customerInformation.Identity.Name} ${
customerInformation.Identity.OrganizationNumber
? "(" + customerInformation.Identity.OrganizationNumber + ")"
: ""
}`,
x: columns.right.left,
type: "body",
},
Expand Down

0 comments on commit aaa3f3b

Please sign in to comment.