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.
ποΈ 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
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
ποΈ Billβs billedAt
DEBIT
π **Purchases (asset)**
π΅ Bill total price (product prices + freight costs
CREDIT
π **Suspense - Purchases (expense)**
π΅ Bill total price (product prices + freight costs)
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
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
ποΈ 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
ποΈ 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
ποΈ 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 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
ποΈ 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
ποΈ 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
ποΈ 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
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
Thank you!