Articles on: General Overview

Pistachio accounting hooks

Pistachio has the capability to automatically create accounting journal entries based on the activity in the system. This article gives an overview of the journal entries the system creates. Currently these journal entries are only available for users with a Quickbooks Online integration.

Invoice becomes β€œPaid”


Payment Transaction


πŸ—“οΈ Payment's paymentDate

DEBIT

If paid via Cardpointe:
πŸ““ **Payment Processor Clearing**
πŸ’΅ Payment Amount
πŸ“ Sales Order Tenant Location

If paid manually (cash, check, credit card outside of Pistachio):
πŸ““ **Manual Processor Clearing**
πŸ’΅ Payment Amount
πŸ“ Sales Order Tenant Location

if paid with store credits:
πŸ““ Store Credit
πŸ’΅ Payment Amount
πŸ“ Sales Order Tenant Location

CREDIT

If at least one item is delivered:
πŸ““ **Accounts Receivable**
πŸ’΅ Sum of all the paid invoice line-items relative to the delivered items

If at least one item is not delivered:
πŸ““ **Unearned Revenue**
πŸ’΅ Sum of all the paid invoice line-items relative to the non-delivered items

Bill becomes β€œOpen”



Create a QBO Bill



Create a QBO Bill with one or two line-items per β€œPistachio Bill line-item”:

One line-item for the Product Cost (if it is not a carrier bill)

One line-item for the Freight Cost (if that's greater than zero)
We use an expense account on all Bill line-items called Suspense - Purchases (expense) due to QBO API

Adjustment Transaction



πŸ—“οΈ Bill’s billedAt

DEBIT
πŸ““ **Purchases (asset)**
πŸ’΅ Bill total price (product prices + freight costs

CREDIT
πŸ““ **Suspense - Purchases (expense)**
πŸ’΅ Bill total price (product prices + freight costs)

Received Item Transaction



For each bill item that was already received (receivedAt is not null).

πŸ—“οΈ Item receivedAt

DEBIT
πŸ““ **Inventory**
πŸ’΅ Bill line-item product cost + freight cost
πŸ“ Item's tenantLocation or the item's deliveredFrom location (or the PO tenantLocation)

CREDIT
πŸ““ **Purchases** **(asset)**
πŸ’΅ Bill line-item product cost + freight cost

Delivered item Inventory Transaction



For each bill TANGIBLE-GOOD item that was already delivered ( and hasn't been returned):

πŸ—“οΈ Item deliveredAt

DEBIT
πŸ““ **COGS - Product**
πŸ’΅ Bill line-item product cost + freight cost
πŸ“ Sales Order Tenant Location

CREDIT
If the item was never marked received:
πŸ““ **Purchases (asset)**
πŸ’΅ PI manufacturer/paid price: sum of all the bill line-items (product and freight costs) relative to the PI

Else:
πŸ““ **Inventory**
πŸ’΅ Bill line-item product cost + freight cost
πŸ“ PI's deliveredFrom location

Item becomes β€œReceived”



Received Item Transaction



πŸ—“οΈ now()

DEBIT
πŸ““ **Inventory**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item
πŸ“ Item tenant location (if not null) or purchase order tenant location

CREDIT
πŸ““ **Purchases (assets)**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item

Item becomes β€œDelivered”



Delivered Item Sales Transaction



πŸ—“οΈ now()

DEBIT
If the item already has payments associated with it:
πŸ““ **Unearned Revenue**
πŸ’΅ Paid amount: sum of all the payed invoice line-items associated with the item

If the item hasn't been fully paid already:
πŸ““ **Accounts Receivable**
πŸ’΅ The pending balance of the item
If the Invoice PIs’ SOIs include discounts:
πŸ““ **Discounts**
πŸ’΅ Total discount applied to the item (line-item discounts + order discount allocation)

CREDIT
If the item is a tangible good:
πŸ““ **Product Sales**
πŸ’΅ Item sub total
πŸ“ Sales Order tenant location

If the item is a delivery line-item:
πŸ““ **Delivery Sales**
πŸ’΅ Item sub total
πŸ“ Sales Order tenant location

If the item is a service:
πŸ““ **Service Sales**
πŸ’΅ Item sub total
πŸ“ Sales Order tenant location
If the item has been charged tax:
πŸ““ **Sales Tax Payable**
πŸ’΅ Total Sales tax relative to the item
πŸ“ State from sales order item delivery address

Delivered PIs Inventory Transaction



πŸ—“οΈ now()

If the item is a tangible good

DEBIT
πŸ““ **COGS - Product**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item
πŸ“ Sales Order tenant location

CREDIT
If the item's deliveredFrom is null:
πŸ““ **Purchases (asset)**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item

Else:
πŸ““ **Inventory**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item
πŸ“ Item's deliveredFrom location

Transfer becomes β€œTransferred”



Transfer Transaction


πŸ—“οΈ transfer endedAt or now() (in case the endedAt is null)

DEBIT
πŸ““ **Inventory (new location)**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item

CREDIT
πŸ““ **Inventory (old location)**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item

Refund invoice becomes β€œPaid”



πŸ—“οΈ now()

For each refunded item

DEBIT
πŸ““ **Refunds Payable**
πŸ’΅ Invoice payment line-item amount

CREDIT
If payment is made via Cardpointe
πŸ““ **Payment Processor Clearing**
πŸ’΅ Invoice payment line-item Amount
πŸ“ Sales Order Tenant Location

If payment is made β€œmanually”
πŸ““ **Manual Processor Clearing**
πŸ’΅ Invoice payment line-item Amount
πŸ“ Sales Order Tenant Location

If payment is made β€œmanually” with β€œstore credits” option
πŸ““ Store Credit
πŸ’΅ Invoice payment line-item Amount
πŸ“ Sales Order Tenant Location

β€œSales Order Return” is Created



πŸ—“οΈ return's returnedAt

For each returned Item:

DEBIT
πŸ““ **Inventory**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item
πŸ“ Return destination

CREDIT
πŸ““ **COGS - Product**
πŸ’΅ Sum of all the bill line-items (product and freight costs) related to the item
πŸ“ Sales Order tenant location

β€œSales Order Cancelation” is Created



πŸ—“οΈ salesOrderCancelation canceledAt

For each NON-DELIVERED PI:

DEBIT
πŸ““ Unearned revenue
πŸ’΅ Sum of all the paid invoice line-items related to the delivered item

CREDIT
If the PI is refundable:
πŸ““ Refunds payable
πŸ’΅ Sum of all the paid invoice line-items related to the delivered item

If the item is not refundable:

πŸ““ Product/Delivery/Service Sales according to the product type
πŸ’΅ Sum of all the paid invoice line-items relative to the delivered items
πŸ“ Sales Order tenant location

For each REFUNDABLE & DELIVERED PI:

DEBIT
πŸ““ **Sales Returns**
πŸ’΅ Item sub total (with add-ons): total price - taxes + discount
πŸ“ Sales Order tenant location

πŸ““ **Sales Tax Payable**
πŸ’΅ Total Sales tax relative to the item
πŸ“ State from sales order item jurisdiction within SO's taxDetails

CREDIT
If this PI has payments associated with it:
πŸ““ **Refunds Payable**
πŸ’΅ Sum of all the paid invoice line-items relative to the delivered items

If the PI wasn't fully paid for:
πŸ““ **Accounts Receivable**
πŸ’΅ The pending balance of the item: total price - paid amount

πŸ““ **Discounts**
πŸ’΅ Total discount applied to the item

Updated on: 25/03/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!