Separating Sales Accounts on Ticket

In this tutorial I’ll demonstrate how to create a separate “Sales Account” transactions for a specific product group. In our case we sell Tobacco and we want to see Tobacco Sales separately under accounting. This is a great example for using multiple transaction types in a single ticket.

First of all I’ll create few products for Tobacco group. From Settings > Products > Product List > Batch Create Product list a new popup appears for product list entry. First line starting with # character is the name of the product group and I typed product name and price on each line.

:bulb: On screenshots I highlighted parts we’re discussing in yellow color.

New products are added.

I’ll add a product category to Menu and allow it to Auto Select products.

Now I’ll create a new account for Tobacco Sales. From Settings > Accounts menu I cloned Sales Account and named it as Tobacco Sales.

I’ll also create a new Account Transaction Type for Tobacco Sales account.

I need an action to change an order’s transaction type. I configured Account Transaction Type as [:Account Transaction Type Name] variable so I can change it in a rule.

I’ll need a rule to change an order’s transaction type for tobacco orders. When an order added to ticket from Tobacco group the account transaction type becomes Tobacco Sales Transaction.

That’s all. Now I’ll create a ticket.

I sold $3 regular items and $5 tobacco. This is how account transaction document creates.

… and this is how accounting screen appears.

2 Likes

##BONUS

After 5.1.61 update you can limit payment types by menu item group. In this sample we’ll use limit payment processor to prevent credit card payments used for paying tobacco.

Navigate to Settings > Tickets > Payment Types, edit Credit Card payment type, switch to Payment Processors screen and insert Add Limit payment processor.

Click Settings Link to edit Add Limit Processor settings.

-I configured Max Amount parameter as:

{TICKET ORDER EXACT TOTAL EXP:MenuItem.GroupCode != "Tobacco"}

:bulb: TICKET ORDER EXACT TOTAL is a new ticket expression tag for 5.1.61. It returns total of orders and also reflects calculations like discounts, services, etc.

Min amount configured as $1 so amounts less than $1 can be paid with credit card. You can configure it as a smaller non zero value.

I also enabled “Include Past Payments” setting so partial payments will taken into account.

Let’s go back to our sample ticket.

We have $5 Tobacco and $3 non Tobacco sales.

On payment screen we can settle at most $3 with Credit Card.

New TICKET ORDERS EXACT TOTAL tag allows us to reflect discounts so when I add %10 discount, amount I can settle with Credit Card also decreases.

What will happen if all orders are Tobacco?

When I remove non-Tobacco orders I can’t use Credit Card button at all.

5 Likes

SIMPLE AWSOME!!!

I know that I will use this!!!

Thanks!!!

G.

Man I didn’t know that you could literally create batch items with group code and price straight from batch create! I think that itself can be considered a separate tutorial :P. More like a tip than a tutorial but it’s really neat. I don’t know If I’m the only one who didn’t notice that short cut but now that I started using it, I’m loving it! Best thing ever! In accordance to extra kudos for this tutorial. I found myself using this a lot more than I thought.

That was mentioned here but I think I need to update it for V5.

https://doc.sambapos.org/doku.php/en/quick_setup_guide

That explains why I never knew it hehe. Thanks for that :slight_smile:

Can we make exception for discount too,
When there is tobacco, discount just non tobacco. So tobbaco can’t discounted

I hope at calculation there is maping to product

This would be done by using the calculation action and a similar order total expression with a formula/divide to calculate the discount.

Hello guys, So how about if one needs to separate all account for a certain group of products into a different accounts screen as well as the reporting. This is a business that has two companies in one place and they sell all items as if it was a single business. One group of products they are a partnership business and the rest the belong to one guy.

With the above method of transaction types changes at order level works fine, and i am able to see the move of value from sales account into receivable accounts in both account screens appropriately as below,

My Vagies Sale Transaction rule Change for Vagies Category

Back to my order screen i have first 2 products from the breakfast category and the bottom 2 from the Vagies Category

Before payment is made if we just submit this order i have the desired result in accounts
Here is my General account Screen

And here is my Vagies account Screen

The above is as expected, problem comes in going further when payment is made, i am not sure which event i am supposed to counter, So i tried passing this account type

to the Update Order Action in Payment Processed event

When i go back and pay the ticket, this is how my accounts screens end

General

Vagies

How can i move Vagies Receivables into Vagies Cash without affecting the General Accounts, I know my rule above in payment processed may be totally wrong, but just to communicate the idea. Any help in the right direction will be appreciated. Thanks.