@powerhousedao/contributor-billing 0.0.94 → 0.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"InvoicePDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/InvoicePDF.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAIb,MAAM,wCAAwC,CAAC;AAyThD,UAAU,eAAe;IACvB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8ahD,CAAC"}
1
+ {"version":3,"file":"InvoicePDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/InvoicePDF.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAIb,MAAM,wCAAwC,CAAC;AAiThD,UAAU,eAAe;IACvB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmahD,CAAC"}
@@ -36,7 +36,7 @@ const styles = StyleSheet.create({
36
36
  fontFamily: "Helvetica",
37
37
  },
38
38
  invoiceNumber: {
39
- fontSize: 12,
39
+ fontSize: 11,
40
40
  marginLeft: 0,
41
41
  },
42
42
  section: {
@@ -106,7 +106,7 @@ const styles = StyleSheet.create({
106
106
  fontWeight: "normal",
107
107
  },
108
108
  tableCol40: {
109
- width: "38%",
109
+ width: "30%",
110
110
  paddingRight: 8,
111
111
  },
112
112
  tableCol15: {
@@ -114,7 +114,7 @@ const styles = StyleSheet.create({
114
114
  textAlign: "right",
115
115
  },
116
116
  tableCol12: {
117
- width: "12%",
117
+ width: "15%",
118
118
  textAlign: "right",
119
119
  },
120
120
  tableCol18: {
@@ -203,17 +203,9 @@ const styles = StyleSheet.create({
203
203
  marginTop: -15,
204
204
  marginLeft: -15,
205
205
  },
206
- statusLabel: {
207
- fontSize: 14,
208
- marginTop: -13,
209
- fontFamily: "Helvetica",
210
- fontWeight: "normal",
211
- color: "#9ea0a2",
212
- marginRight: 4,
213
- },
214
206
  invoiceLabel: {
215
- fontSize: 14,
216
- marginRight: 8,
207
+ fontSize: 11,
208
+ marginRight: 2,
217
209
  marginBottom: 4,
218
210
  fontFamily: "Helvetica",
219
211
  color: "#9ea0a2",
@@ -312,33 +304,27 @@ export const InvoicePDF = ({ invoice, fiatMode, }) => {
312
304
  }
313
305
  const lineItemChunks = chunkLineItems(invoice.lineItems, MAX_ITEMS_FIRST_PAGE, MAX_ITEMS_OTHER_PAGES);
314
306
  const totalPages = lineItemChunks.length;
315
- return (_jsx(Document, { children: lineItemChunks.map((items, pageIndex) => (_jsxs(Page, { size: "A4", style: styles.pageBackground, children: [_jsxs(View, { style: styles.page, children: [pageIndex === 0 && (_jsxs(_Fragment, { children: [_jsxs(View, { style: {
307
+ return (_jsx(Document, { children: lineItemChunks.map((items, pageIndex) => (_jsxs(Page, { size: "A4", style: styles.pageBackground, children: [_jsxs(View, { style: styles.page, children: [pageIndex === 0 && (_jsxs(_Fragment, { children: [_jsx(View, { style: {
316
308
  flexDirection: "row",
317
309
  justifyContent: "space-between",
318
310
  alignItems: "flex-start",
319
- }, children: [_jsxs(View, { style: {
320
- flexDirection: "column",
321
- alignItems: "flex-start",
322
- marginRight: 0,
323
- }, children: [_jsx(Text, { style: {
324
- fontSize: 18,
325
- fontWeight: "bold",
326
- marginBottom: 20,
327
- paddingRight: 100,
328
- marginRight: 0,
329
- }, hyphenationCallback: (word) => [word], children: invoice.issuer.name }), _jsxs(View, { style: {
330
- flexDirection: "row",
331
- alignItems: "flex-start",
332
- gap: 24,
333
- flexWrap: "nowrap",
334
- }, children: [_jsxs(View, { children: [_jsx(Text, { style: styles.invoiceLabel, children: "Invoice number" }), _jsx(Text, { style: styles.invoiceNumber, children: invoice.invoiceNo })] }), _jsxs(View, { style: {
335
- flexDirection: "row",
336
- gap: 20,
337
- alignItems: "flex-start",
338
- }, children: [_jsxs(View, { children: [_jsx(Text, { style: styles.invoiceLabel, children: "Invoice date" }), _jsx(Text, { style: styles.invoiceNumber, children: formatDate(invoice.dateIssued) })] }), invoice.dateDelivered && (_jsxs(View, { children: [_jsx(Text, { style: styles.invoiceLabel, children: "Delivery date" }), _jsx(Text, { style: styles.invoiceNumber, children: formatDate(invoice.dateDelivered) })] })), _jsxs(View, { children: [_jsx(Text, { style: styles.invoiceLabel, children: "Due date" }), _jsx(Text, { style: styles.invoiceNumber, children: formatDate(invoice.dateDue) })] }), _jsxs(View, { children: [_jsxs(Text, { style: styles.invoiceLabel, children: ["Invoice of ", invoice.currency] }), _jsx(Text, { style: [
339
- styles.invoiceNumber,
340
- { fontWeight: "bold" },
341
- ], children: formatNumber(invoice.totalPriceTaxIncl) })] })] })] })] }), _jsx(View, {})] }), _jsxs(View, { style: {
311
+ }, children: _jsxs(View, { style: {
312
+ flexDirection: "column",
313
+ alignItems: "flex-start",
314
+ marginRight: 0,
315
+ }, children: [_jsx(Text, { style: {
316
+ fontSize: 18,
317
+ fontWeight: "bold",
318
+ marginBottom: 20,
319
+ paddingRight: 100,
320
+ marginRight: 0,
321
+ }, hyphenationCallback: (word) => [word], children: invoice.issuer.name }), _jsxs(View, { style: {
322
+ flexDirection: "row",
323
+ gap: 10,
324
+ alignItems: "flex-start",
325
+ width: "100%",
326
+ flexWrap: "nowrap",
327
+ }, children: [_jsxs(View, { style: { width: "30%" }, children: [_jsx(Text, { style: styles.invoiceLabel, children: "Invoice number" }), _jsx(Text, { style: [styles.invoiceNumber], wrap: true, children: invoice.invoiceNo })] }), _jsxs(View, { style: { width: "15%" }, children: [_jsx(Text, { style: styles.invoiceLabel, children: "Invoice date" }), _jsx(Text, { style: styles.invoiceNumber, children: formatDate(invoice.dateIssued) })] }), invoice.dateDelivered && (_jsxs(View, { style: { width: "15%" }, children: [_jsx(Text, { style: styles.invoiceLabel, children: "Delivery date" }), _jsx(Text, { style: styles.invoiceNumber, children: formatDate(invoice.dateDelivered) })] })), _jsxs(View, { style: { width: "20%" }, children: [_jsx(Text, { style: styles.invoiceLabel, children: "Due date" }), _jsx(Text, { style: styles.invoiceNumber, children: formatDate(invoice.dateDue) })] }), _jsxs(View, { style: { width: "20%" }, children: [_jsxs(Text, { style: styles.invoiceLabel, children: ["Invoice of ", invoice.currency] }), _jsx(Text, { style: [styles.invoiceNumber, { fontWeight: "bold" }], children: formatNumber(invoice.totalPriceTaxIncl) })] })] })] }) }), _jsxs(View, { style: {
342
328
  flexDirection: "row",
343
329
  justifyContent: "space-between",
344
330
  marginTop: 20,
@@ -385,7 +371,7 @@ export const InvoicePDF = ({ invoice, fiatMode, }) => {
385
371
  }
386
372
  const PaymentSectionFiat = ({ paymentRouting, }) => {
387
373
  console.log("paymentRouting", paymentRouting.bank);
388
- return (_jsxs(View, { style: [styles.gridContainer, { marginTop: 0, marginLeft: 0 }], children: [_jsxs(View, { style: styles.gridColumn, children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Bank Name:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.name || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Address:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.streetAddress || "" })] }), paymentRouting.bank?.address?.extendedAddress && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.extendedAddress })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsxs(Text, { style: styles.companyInfo, children: [paymentRouting.bank?.address?.city || "", ",", " ", paymentRouting.bank?.address?.stateProvince || "", ",", " ", getCountryName(paymentRouting.bank?.address?.country || "") || ""] })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Postcode:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.postalCode || "00000" })] })] }), _jsxs(View, { style: [styles.gridColumn], children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.beneficiary || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct No:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountNum || "" })] }), paymentRouting.bank?.ABA && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "ABA/ACH:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.ABA })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "BIC/SWIFT:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.BIC || paymentRouting.bank?.SWIFT || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountType || "" })] }), paymentRouting.bank?.intermediaryBank?.accountNum && (_jsxs(_Fragment, { children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Bank:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.name })] }), paymentRouting.bank?.intermediaryBank?.accountNum && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Acct:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.accountNum })] })), paymentRouting.bank?.intermediaryBank?.accountType && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.accountType })] })), paymentRouting.bank?.intermediaryBank?.beneficiary && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.beneficiary })] })), paymentRouting.bank?.intermediaryBank?.ABA && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary ABA:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.ABA })] })), (paymentRouting.bank?.intermediaryBank?.BIC ||
374
+ return (_jsxs(View, { style: [styles.gridContainer, { marginTop: 0, marginLeft: 0 }], children: [_jsxs(View, { style: styles.gridColumn, children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Bank Name:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.name || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Address:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.streetAddress || "" })] }), paymentRouting.bank?.address?.extendedAddress && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.extendedAddress })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsxs(Text, { style: styles.companyInfo, children: [paymentRouting.bank?.address?.city || "", ",", " ", paymentRouting.bank?.address?.stateProvince || "", ",", " ", getCountryName(paymentRouting.bank?.address?.country || "") || ""] })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Postcode:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.postalCode || "00000" })] })] }), _jsxs(View, { style: [styles.gridColumn, { paddingLeft: 12 }], children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.beneficiary || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct No:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountNum || "" })] }), paymentRouting.bank?.ABA && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "ABA/ACH:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.ABA })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "BIC/SWIFT:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.BIC || paymentRouting.bank?.SWIFT || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountType || "" })] }), paymentRouting.bank?.intermediaryBank?.accountNum && (_jsxs(_Fragment, { children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Bank:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.name })] }), paymentRouting.bank?.intermediaryBank?.accountNum && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Acct:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.accountNum })] })), paymentRouting.bank?.intermediaryBank?.accountType && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.accountType })] })), paymentRouting.bank?.intermediaryBank?.beneficiary && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.beneficiary })] })), paymentRouting.bank?.intermediaryBank?.ABA && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary ABA:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.ABA })] })), (paymentRouting.bank?.intermediaryBank?.BIC ||
389
375
  paymentRouting.bank?.intermediaryBank?.SWIFT) && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary BIC/SWIFT:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.BIC ||
390
376
  paymentRouting.bank?.intermediaryBank?.SWIFT })] })), paymentRouting.bank?.intermediaryBank?.address?.streetAddress && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Address:" }), _jsxs(Text, { style: styles.companyInfo, children: [paymentRouting.bank?.intermediaryBank?.address
391
377
  ?.streetAddress, paymentRouting.bank?.intermediaryBank?.address
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/contributor-billing",
3
3
  "description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
4
- "version": "0.0.94",
4
+ "version": "0.0.95",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [