Skip to content

Quickbooks Create Purchase Order Updates #17090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-create-ap-aging-report",
name: "Create AP Aging Detail Report",
description: "Creates an AP aging report in Quickbooks Online. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/apagingdetail#query-a-report)",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
quickbooks,
Expand Down
2 changes: 1 addition & 1 deletion components/quickbooks/actions/create-bill/create-bill.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "quickbooks-create-bill",
name: "Create Bill",
description: "Creates a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#create-a-bill)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-create-customer",
name: "Create Customer",
description: "Creates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#create-a-customer)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
key: "quickbooks-create-estimate",
name: "Create Estimate",
description: "Creates an estimate. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#create-an-estimate)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "quickbooks-create-invoice",
name: "Create Invoice",
description: "Creates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)",
version: "0.2.3",
version: "0.2.4",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "quickbooks-create-payment",
name: "Create Payment",
description: "Creates a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment)",
version: "0.0.8",
version: "0.0.9",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "quickbooks-create-pl-report",
name: "Create Profit and Loss Detail Report",
description: "Creates a profit and loss report in Quickbooks Online. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/profitandloss#query-a-report)",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,27 @@ export default {
key: "quickbooks-create-purchase-order",
name: "Create Purchase Order",
description: "Creates a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
quickbooks,
accountId: {
propDefinition: [
quickbooks,
"accountIds",
],
type: "string",
label: "Account ID",
description: "The ID of the account to use for the purchase order",
async options() {
const { QueryResponse: queryResponse } = await this.quickbooks.query({
params: {
query: "select * from Account where Classification = 'Liability' AND AccountSubType = 'AccountsPayable'",
},
});
return queryResponse.Account.map(({
Id, Name,
}) => ({
value: Id,
label: Name,
}));
},
},
vendorRefValue: {
propDefinition: [
Expand Down Expand Up @@ -102,7 +111,7 @@ export default {
props.lineItems = {
type: "string[]",
label: "Line Items",
description: "Line items of a purchase order. Set DetailType to `ItemBasedExpenseLineDetail` or `AccountBasedExpenseLineDetail`. Example: `{ \"DetailType\": \"ItemBasedExpenseLineDetail\", \"Amount\": 100.0, \"ItemBasedExpenseLineDetail\": { \"ItemRef\": { \"name\": \"Services\", \"value\": \"1\" } } }` [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder) for more information.",
description: "Line items of a purchase order. DetailType is `ItemBasedExpenseLineDetail`. Example: `{ \"DetailType\": \"ItemBasedExpenseLineDetail\", \"Amount\": 100.0, \"ItemBasedExpenseLineDetail\": { \"ItemRef\": { \"name\": \"Services\", \"value\": \"1\" } } }` [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder) for more information.",
};
return props;
}
Expand All @@ -116,35 +125,26 @@ export default {
return props;
}
for (let i = 1; i <= this.numLineItems; i++) {
props[`detailType_${i}`] = {
type: "string",
label: `Line ${i} - Detail Type`,
options: [
{
label: "Item Based Expense",
value: "ItemBasedExpenseLineDetail",
},
{
label: "Account Based Expense",
value: "AccountBasedExpenseLineDetail",
},
],
default: "ItemBasedExpenseLineDetail",
};
props[`item_${i}`] = {
type: "string",
label: `Line ${i} - Item/Account ID`,
options: async ({ page }) => {
return this.quickbooks.getPropOptions({
const options = await this.quickbooks.getPropOptions({
page,
resource: "Item",
mapper: ({
Id: value, Name: label,
}) => ({
value,
label,
}),
Id: value, Name: label, ExpenseAccountRef,
}) => {
if (ExpenseAccountRef) {
return {
value,
label,
};
}
return null;
},
});
return options.filter((option) => option !== null);
},
};
props[`amount_${i}`] = {
Expand Down Expand Up @@ -180,12 +180,6 @@ export default {
throw new ConfigurationError("No valid line items were provided.");
}

lines.forEach((line, index) => {
if (line.DetailType !== "ItemBasedExpenseLineDetail" && line.DetailType !== "AccountBasedExpenseLineDetail") {
throw new ConfigurationError(`Line Item at index ${index + 1} has invalid DetailType '${line.DetailType}'. Must be 'ItemBasedExpenseLineDetail' or 'AccountBasedExpenseLineDetail'`);
}
});

const hasShippingAddress = this.shippingStreetAddress
|| this.shippingCity
|| this.shippingState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "quickbooks-create-purchase",
name: "Create Purchase",
description: "Creates a new purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#create-a-purchase)",
version: "0.0.7",
version: "0.0.8",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "quickbooks-create-sales-receipt",
name: "Create Sales Receipt",
description: "Creates a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#create-a-salesreceipt)",
version: "0.0.8",
version: "0.0.9",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "quickbooks-delete-purchase",
name: "Delete Purchase",
description: "Delete a specific purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)",
version: "0.0.7",
version: "0.0.8",
type: "action",
props: {
quickbooks,
Expand Down
2 changes: 1 addition & 1 deletion components/quickbooks/actions/get-bill/get-bill.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-bill",
name: "Get Bill",
description: "Returns info about a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#read-a-bill)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-customer",
name: "Get Customer",
description: "Returns info about a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/customer#read-a-customer)",
version: "0.3.9",
version: "0.3.10",
type: "action",
props: {
quickbooks,
Expand Down
2 changes: 1 addition & 1 deletion components/quickbooks/actions/get-invoice/get-invoice.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-invoice",
name: "Get Invoice",
description: "Returns info about an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#read-an-invoice)",
version: "0.2.10",
version: "0.2.11",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "quickbooks-get-my-company",
name: "Get My Company",
description: "Gets info about a company. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
2 changes: 1 addition & 1 deletion components/quickbooks/actions/get-payment/get-payment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-payment",
name: "Get Payment",
description: "Returns info about a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#read-a-payment)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-purchase-order",
name: "Get Purchase Order",
description: "Returns details about a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#read-a-purchase-order)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-purchase",
name: "Get Purchase",
description: "Returns info about a purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#read-a-purchase)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-sales-receipt",
name: "Get Sales Receipt",
description: "Returns details about a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#read-a-salesreceipt)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-get-time-activity",
name: "Get Time Activity",
description: "Returns info about an activity. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#read-a-timeactivity-object)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-accounts",
name: "Search Accounts",
description: "Search for accounts. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/account#query-an-account)",
version: "0.2.9",
version: "0.2.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-customers",
name: "Search Customers",
description: "Searches for customers. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#query-a-customer)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-invoices",
name: "Search Invoices",
description: "Searches for invoices. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#query-an-invoice)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-items",
name: "Search Items",
description: "Searches for items. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-products",
name: "Search Products",
description: "Search for products. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "quickbooks-search-purchases",
name: "Search Purchases",
description: "Searches for purchases. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#query-a-purchase)",
version: "0.0.7",
version: "0.0.8",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-query",
name: "Search Query",
description: "Performs a search query against a Quickbooks entity. [See the documentation](https://developer.intuit.com/app/develophttps://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/data-queries)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-services",
name: "Search Services",
description: "Search for services. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-time-activities",
name: "Search Time Activities",
description: "Searches for time activities. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#query-a-timeactivity-object)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-search-vendors",
name: "Search Vendors",
description: "Searches for vendors. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/vendor#query-a-vendor)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "quickbooks-send-estimate",
name: "Send Estimate",
description: "Sends an estimate by email. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#send-an-estimate)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "quickbooks-send-invoice",
name: "Send Invoice",
description: "Sends an invoice by email. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#send-an-invoice)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "quickbooks-sparse-update-invoice",
name: "Sparse Update Invoice",
description: "Sparse updating provides the ability to update a subset of properties for a given object; only elements specified in the request are updated. Missing elements are left untouched. The ID of the object to update is specified in the request body.​ [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#sparse-update-an-invoice)",
version: "0.1.7",
version: "0.1.8",
type: "action",
props: {
quickbooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-update-customer",
name: "Update Customer",
description: "Updates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#full-update-a-customer)",
version: "0.1.9",
version: "0.1.10",
type: "action",
props: {
quickbooks,
Expand Down
Loading
Loading