Skip to content
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
@@ -0,0 +1,102 @@
import quickbooks from "../../quickbooks.app.mjs";
import { AP_AGING_REPORT_COLUMNS } from "../../common/constants.mjs";

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.1",
type: "action",
props: {
quickbooks,
shipvia: {
type: "string",
label: "Ship Via",
description: "Filter by the shipping method",
optional: true,
},
termIds: {
propDefinition: [
quickbooks,
"termIds",
],
},
startDueDate: {
type: "string",
label: "Start Due Date",
description: "The range of dates over which receivables are due, in the format `YYYY-MM-DD`. `start_duedate` must be less than `end_duedate`. If not specified, all data is returned.",
optional: true,
},
endDueDate: {
type: "string",
label: "End Due Date",
description: "The range of dates over which receivables are due, in the format `YYYY-MM-DD`. `start_duedate` must be less than `end_duedate`. If not specified, all data is returned.",
optional: true,
},
accountingMethod: {
propDefinition: [
quickbooks,
"accountingMethod",
],
},
reportDate: {
type: "string",
label: "Report Date",
description: "Start date to use for the report, in the format `YYYY-MM-DD`",
optional: true,
},
numPeriods: {
type: "integer",
label: "Num Periods",
description: "The number of periods to be shown in the report",
optional: true,
},
vendorIds: {
propDefinition: [
quickbooks,
"vendorIds",
],
},
pastDue: {
type: "integer",
label: "Past Due",
description: "Filters report contents based on minimum days past due",
optional: true,
},
agingPeriod: {
type: "integer",
label: "Aging Period",
description: "The number of days in the aging period",
optional: true,
},
columns: {
propDefinition: [
quickbooks,
"columns",
],
options: AP_AGING_REPORT_COLUMNS,
},
},
async run({ $ }) {
const response = await this.quickbooks.getApAgingReport({
$,
params: {
shipvia: this.shipvia,
term: this.termIds,
start_duedate: this.startDueDate,
end_duedate: this.endDueDate,
accounting_method: this.accountingMethod,
report_date: this.reportDate,
num_periods: this.numPeriods,
vendor: this.vendorIds,
past_due: this.pastDue,
aging_period: this.agingPeriod,
columns: this.columns,
},
});
if (response) {
$.export("summary", "Successfully created AP Aging Detail Report");
}
return response;
},
};
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 @@ -5,7 +5,7 @@ export default {
key: "quickbooks-create-bill",
name: "Create Bill",
description: "Creates a bill. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#create-a-bill)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#create-a-customer)",
version: "0.1.5",
version: "0.1.6",
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-invoice",
name: "Create Invoice",
description: "Creates an invoice. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment)",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
quickbooks,
Expand Down
144 changes: 144 additions & 0 deletions components/quickbooks/actions/create-pl-report/create-pl-report.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
import quickbooks from "../../quickbooks.app.mjs";
import {
DATE_MACRO_OPTIONS, PAYMENT_METHOD_OPTIONS, ACCOUNT_TYPE_OPTIONS, PROFIT_LOSS_REPORT_COLUMNS,
} from "../../common/constants.mjs";

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.1",
type: "action",
props: {
quickbooks,
customerIds: {
propDefinition: [
quickbooks,
"customer",
],
type: "string[]",
label: "Customer Ids",
description: "Filters report contents to include information for specified customers",
optional: true,
},
accountIds: {
propDefinition: [
quickbooks,
"accountIds",
],
},
accountingMethod: {
propDefinition: [
quickbooks,
"accountingMethod",
],
},
dateMacro: {
type: "string",
label: "Date Macro",
description: "Predefined date range. Use if you want the report to cover a standard report date range; otherwise, use the `start_date` and `end_date` to cover an explicit report date range",
options: DATE_MACRO_OPTIONS,
optional: true,
},
startDate: {
type: "string",
label: "Start Date",
description: "The start date of the report, in the format `YYYY-MM-DD`. `start_date` must be less than `end_date`",
optional: true,
},
endDate: {
type: "string",
label: "End Date",
description: "The end date of the report, in the format `YYYY-MM-DD`. `start_date` must be less than `end_date`",
optional: true,
},
adjustedGainLoss: {
type: "string",
label: "Adjusted Gain Loss",
description: "Specifies whether unrealized gain and losses are included in the report",
options: [
"true",
"false",
],
optional: true,
},
classIds: {
propDefinition: [
quickbooks,
"classIds",
],
},
paymentMethod: {
type: "string",
label: "Payment Method",
description: "Filters report contents based on payment method",
options: PAYMENT_METHOD_OPTIONS,
optional: true,
},
employeeIds: {
propDefinition: [
quickbooks,
"employeeIds",
],
},
departmentIds: {
propDefinition: [
quickbooks,
"departmentIds",
],
},
vendorIds: {
propDefinition: [
quickbooks,
"vendorIds",
],
},
accountType: {
type: "string",
label: "Account Type",
description: "Account type from which transactions are included in the report",
options: ACCOUNT_TYPE_OPTIONS,
optional: true,
},
sortBy: {
type: "string",
label: "Sort By",
description: "The column type used in sorting report rows",
options: PROFIT_LOSS_REPORT_COLUMNS,
optional: true,
},
columns: {
propDefinition: [
quickbooks,
"columns",
],
options: PROFIT_LOSS_REPORT_COLUMNS,
},
},
async run({ $ }) {
const response = await this.quickbooks.getProfitLossReport({
$,
params: {
customer: this.customerIds,
account: this.accountIds,
accounting_method: this.accountingMethod,
date_macro: this.dateMacro,
start_date: this.startDate,
end_date: this.endDate,
adjusted_gain_loss: this.adjustedGainLoss,
class: this.classIds,
payment_method: this.paymentMethod,
employee: this.employeeIds,
department: this.departmentIds,
vendor: this.vendorIds,
account_type: this.accountType,
sort_by: this.sortBy,
columns: this.columns,
},
});
if (response) {
$.export("summary", "Successfully created Profit and Loss Detail Report");
}
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "quickbooks-create-purchase",
name: "Create Purchase",
description: "Creates a new purchase. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#create-a-purchase)",
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-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.4",
version: "0.0.5",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)",
version: "0.0.3",
version: "0.0.4",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#read-a-bill)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/customer#read-a-customer)",
version: "0.3.5",
version: "0.3.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#read-an-invoice)",
version: "0.2.6",
version: "0.2.7",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#read-a-purchase-order)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#read-a-purchase)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#read-a-salesreceipt)",
version: "0.1.5",
version: "0.1.6",
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 docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#read-a-timeactivity-object)",
version: "0.1.5",
version: "0.1.6",
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-sandbox-search-invoices",
name: "Search Invoices",
description: "Searches for invoices. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#query-an-invoice)",
version: "0.1.5",
version: "0.1.6",
type: "action",
props: {
quickbooks,
Expand Down
Loading
Loading