Skip to content

Commit 11bd365

Browse files
merge advanced options
1 parent 7905132 commit 11bd365

File tree

2 files changed

+53
-220
lines changed

2 files changed

+53
-220
lines changed

components/quickbooks/actions/create-invoice-advanced/create-invoice-advanced.mjs

Lines changed: 0 additions & 219 deletions
This file was deleted.

components/quickbooks/actions/create-invoice/create-invoice.mjs

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "quickbooks-create-invoice",
77
name: "Create Invoice",
88
description: "Creates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)",
9-
version: "0.2.1",
9+
version: "0.2.2",
1010
type: "action",
1111
props: {
1212
quickbooks,
@@ -46,6 +46,48 @@ export default {
4646
"currency",
4747
],
4848
},
49+
docNumber: {
50+
type: "string",
51+
label: "Document Number",
52+
description: "Reference number for the transaction",
53+
optional: true,
54+
},
55+
billAddr: {
56+
type: "object",
57+
label: "Billing Address",
58+
description: "Billing address details",
59+
optional: true,
60+
},
61+
shipAddr: {
62+
type: "object",
63+
label: "Shipping Address",
64+
description: "Shipping address details",
65+
optional: true,
66+
},
67+
trackingNum: {
68+
type: "string",
69+
label: "Tracking Number",
70+
description: "Shipping tracking number",
71+
optional: true,
72+
},
73+
privateNote: {
74+
type: "string",
75+
label: "Private Note",
76+
description: "Private note for internal use",
77+
optional: true,
78+
},
79+
customerMemo: {
80+
type: "string",
81+
label: "Customer Memo",
82+
description: "Memo visible to customer",
83+
optional: true,
84+
},
85+
taxCodeId: {
86+
propDefinition: [
87+
quickbooks,
88+
"taxCodeId",
89+
],
90+
},
4991
lineItemsAsObjects: {
5092
propDefinition: [
5193
quickbooks,
@@ -138,6 +180,11 @@ export default {
138180
DueDate: this.dueDate,
139181
AllowOnlineCreditCardPayment: this.allowOnlineCreditCardPayment,
140182
AllowOnlineACHPayment: this.allowOnlineACHPayment,
183+
DocNumber: this.docNumber,
184+
BillAddr: this.billAddr,
185+
ShipAddr: this.shipAddr,
186+
TrackingNum: this.trackingNum,
187+
PrivateNote: this.privateNote,
141188
};
142189

143190
if (this.billEmail) {
@@ -151,6 +198,11 @@ export default {
151198
value: this.currencyRefValue,
152199
};
153200
}
201+
if (this.customerMemo) {
202+
data.CustomerMemo = {
203+
value: this.customerMemo,
204+
};
205+
}
154206

155207
const response = await this.quickbooks.createInvoice({
156208
$,

0 commit comments

Comments
 (0)