Pistachio accounting hooks

Created by Katie Tomechko, Modified on Tue, 25 Mar at 10:36 AM by Katie Tomechko

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


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article