[Answered] Selling Consignment Items to Credit (Customer) Accounts

For the quick how-to, refer to this post later in the thread:

Here I go again with trying to wrap my head around Accounting flows… this always gets me stumped somewhere along the way.

I have some products (i.e. a Calendar or Book) that I take on consignment. When the Item is sold, I want to have the Money (Cash or Credit Card) go directly to a Customer Account, and not affect the Sales Account, and not have Cash double-counted as an Income either.

So I can successfully have a Book purchased, and the Sales Account is not being affected, and the Customer Account is being Credited properly (changing Transaction Type). The issue I am having is the Payment Account (Cash) is showing an Amount as well, effectively doubling the count of Cash that should be in the Drawer (once for Customer Account Cash Payment and once for Cash Payment of the Item).

Can someone please help me with setting up the proper Account Transaction flow with proper Documents and Types?

Don’t you receive cash when a book purchased? Yes… So it should go to Cash account…

The amount should go to customer (supplier?) account is Sale amount. Supplier does not care if it is paid by cash or you gave it as a gift.

Create order tags for book. Select a supplier for book and change account transaction for book order accordingly with Update Order action.

PS: That might not make sense if you don’t update supplier account as soon as you receive consignment items.

I got it figured. Maybe I didn’t explain properly quite what I want.

My Consignment Items come to me Free. They could be from a Customer or a Supplier - it doesn’t matter - but I don’t pay for them. On top of that, I may not make any money from the Sale of these Items (no commission).

My Cashout Report counts Cash Payments, CC Payments, and Customer Account Payments (Cash or CC) in order to do reconciliation. What I was seeing was double the Amount for Cash (or CC) in drawer. Instead I want to see only the Customer (Cash or CC) Account Payment.

It is ok for the Payment of the Product to go through the Cash or CC (Payment) Accounts - in fact, I want it to, so that I can capture the Tender Type used and apply it to Customer Payment Transaction. Having the funds transferred into Sales Account doesn’t help me in this case, because I can’t see the Tender used to Pay, so instead I need Funds transfer from Payment Account Type to Customer/Supplier Account Type.

Product > Cash then Cash > Customer Account Payment (Cash)
or
Product > CC then CC > Customer Account Payment (CC)

1 Like

Never thought consignment items can be tracked like that :slight_smile: Great solution.

QMcKay,

I am looking at a similar need. We have a consignment/ice cream shop. We pay nothing to the “suppliers” until that item sells.

Was wondering if you got it figured out, whether it works or not how you were expecting.

My dilemma is in addition to state and local sales tax (already set up) I was looking to divert a portion of the funds from the sale (85% or sale price minus 15% commission) to a supplier account (how much I owe them from the sale) and the commission account.

I thought about treating the commission like an included tax, but that makes the numbers go nutso.

Explain numbers go nutso. What is it doing that you do not like. And how did you set it up?

I know this is an old thread, but I ran into an issue the other day that I didn’t consider. My system works well for crediting Customer or Supplier Accounts when paid by Cash or CC (Payment Account Type), but it crashes when the item is paid for on another Customer Account.

What I have been doing is capturing the Payment Type Name (Cash or Credit Card), then I transfer funds from one of those Accounts into the Consignment (Customer or Supplier) Account.

The issue is that when I “pay” for an item using a Customer Account (Payment Type Name = Customer Account), I cannot discern the actual Account Name. This causes a crash with an error indicating that the Transaction is trying to operate on an Account that it can’t find (because it is null). Here is the crash report:

Inner Exception 3
Type:        System.NullReferenceException
Message:     Object reference not set to an instance of an object.
Source:      Samba.Services
Stack Trace: at Samba.Services.Implementations.AccountModule.AccountService.CreateTransactionDocument(Account selectedAccount, AccountTransactionDocumentType documentType, String description, Decimal amount, IEnumerable`1 accounts)
   at Samba.Modules.AccountModule.ActionProcessors.CreateAccountTransactionDocument.Process(ActionData actionData)
   at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
   at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
   at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__4(EventParameters`1 x)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

I see that there are Printer Tags called {SOURCE ACCOUNT} and {TARGET ACCOUNT}, however, I can’t seem to get them to populate.

At the same time, I recently started selling a single item that I make commission on… I have figured a way to make this happen, but within my current setup, it is not pretty, because it is item-specific. I need to think of a way to make this more flexible in this regard.

Maybe I should go about this a completely different way… any thoughts?

I know, the first question you will have is: how is it configured currently? Answer: almost exactly the same way Gift Certificates are set up - check that Tutorial for more information.

I think these refer specifically to when you press print from within Accounting Screen. I could be wrong.

Found a nice way around the Consignment Commission using Product Tags and Order Tags.

Now on to figuring a way out of this crash.

The basic problem is this: a Customer Account Payment Type is not tied directly to an Account the way Cash or CC Payment Types happen to have the same name as their respective Accounts.

A Customer Account Transaction could use any Customer Account to “pay” the bill.

@emre, is there a way to retrieve the Account Name from the Entity? Something like:

{ACCOUNT NAME:Customer}

Couldn’t understand from call trace. Are you creating it inside a ticket?

Don’t worry about the error. I know why it is happening.
It because I was trying to fire a Create Transaction Document, while using the Payment Type Name as the Account Name.

This works fine for Cash and CC, but does not work for Customer Account Payment Type, because we don’t know which Customer Account is being “charged”.

To answer your question, yes it is being created inside a ticket, after Payment Processed, in Before Ticket Closing I do an Order State Change, which is then captured by Order State Changed event, where I fire the Transaction Document creation.

That is why I ask the question: can we retrieve the Account Name of a Customer Entity?

1 Like

OK. We’ll have {ENTITY ACCOUNT NAME:X} tag for next release.

1 Like

But… I wondered something. If it is inside ticket wouldn’t Create Account Transaction action work fine? Do you need separate document?

2 Likes

I have tried a simple Transaction instead of a Document without success.

The account that gets funds from the sale of a product varies depending on the product. I assume this would mean I need to set up a Transaction for every consignment item, which isn’t practical. However, using a Document allows me to create Transactions dynamically, by changing the “target” Account depending on the Product.

That is, unless I am missing some fundamental understanding of how to use a Transaction as opposed to a Document.

Thanks for that @emre. I think it will be useful. If I were careful to have my Account names identical to Customer Entity Names, I could use the Entity instead, but for reliability purposes, it would be better to be able to get the Account. We do have {ENTITY BALANCE} afterall, so I imagine the addition of this new Tag shouldn’t be difficult.

1 Like

For those who are interested, here is how I have this set up, and it is working fairly well - it will be even better once we have the new Tag for {ENTITY ACCOUNT NAME:X}


Custom Product Tags - CNAccount,CNCommission

  • CNAccount: this is the Account that will be credited for the value of the product when it is sold.

  • CNCommission: this value will be deducted from the value of the product before the credit transaction, and will be applied to the Payment Account (Cash, Credit Card, or Customer Account), so you will be able to reconcile any commission funds that you make for your business.


Product Tag Editor - set the CNAccount Name and CNCommission Value for consignment products


Product Group Code - Consignment (optional)

Any Consignment Products could have Group Code set as Consignment, but it is optional.


Order Tag - Consignment Item : Consignment Amount (no mapping required)

An Order Tag Group called Consignment Item containing a single sub-Tag called Consignment Amount.


Account Types - CN Balances & Transfer Accounts

These Account Types will be used to Credit/Debit other Account Types.


Accounts - CN Purchaes, CN Redemptions & CN Funds

CN Purchases (CN Balances)
CN Redemptions (CN Balances)

CN Funds (Transfer Accounts)


Transaction Type - CN Purchase Transaction


Transaction Type - CN Debit Transaction


Transaction Type - CN Redemption Transaction


Transaction Type - CN Consignment Payment


Document Type - CN Redemption Doc


Document Type - Customer Consignment


Action - CN Account Payment for Consignment Item

CN Account Payment for Consignment Item
Type: Create Account Transaction Document
ATDN: Customer Consignment
Account Name: [:Account Name]
Description: [:PaymentType] [[:Description]]
Amount: [:Amount]


Action - CN Account Debit for Consignment Item

CN Account Debit for Consignment Item
Type: Create Account Transaction Document
ATDN: CN Redemption Doc
Account Name: [:Account Name]
Description: [:PaymentType] [[:Description]]
Amount: [:Amount]


Action - CN Update Order State

CN Update Order State
Type: Update Order State
State Name: Consignment
Group Order: 3
Current State: [:Current State]
State: [:State]
State Order: 3


Action - CN Update Order Transaction Type

CN Update Order Transaction Type
Type: Update Order
Price: [:OrderPrice]
Account Transaction Type: CN Purchase Transaction


Action - CN Tag Order

CN Tag Order
Type: Tag Order
Order Tag Name: CN Item
Order Tag Value: Consignment Amount
Order Tag Note: [:TagNote]
Order Tag Price: [:TagPrice]


Action - CN Store PaymentType

CN Store PaymentType
Type: Update Program Setting
Setting Name: CNPaymentType
Setting Value: [:PaymentType]
Update Type: Update
Is Local: True


:exclamation: All Rules require a Default Mapping (* * * *)

Rule - CN Update New Order

Event: Order Added to Ticket
Execute Rule if Matches
Constraints:
Menu Item Group Code Equals Consignment (optional)
{ITEM TAG:CNAccount} Is Not Null

CN Tag Order
Tag Note: {ITEM TAG:CNAccount}
Tag Price: [=TN('{PRICE}')-TN('{ITEM TAG:CNCommission}')]

CN Update Order State
Current State:
State: Ordered

Update Order Gift State
Current Status:
Status: Locked
Value:

CN Update Order Transaction Type
OrderPrice: [=TN('{ITEM TAG:CNCommission}')]


Rule - CN Store Payment Type

:exclamation: This Rule will change when we get the new Tag called {ENTITY ACCOUNT NAME:X}

Event: Payment Processed
Execute Rule if Matches
Constraints: (none)

CN Store Payment Type
Constraint: '[:PaymentTypeName]'!='Customer Account'
PaymentType: [:PaymentTypeName]

CN Store Payment Type
Constraint: '[:PaymentTypeName]'=='Customer Account'
PaymentType: {ENTITY DATA:Customer:Phone}-{ENTITY NAME:Customer}

:exclamation: The Action above will change when we get the new Tag called {ENTITY ACCOUNT NAME:X}.

Specifically, the value for PaymentType will change; it will probably be something like this instead:

{ENTITY ACCOUNT NAME:Customers}

Rule - CN Update States

Event: Before Ticket Closing
Execute Rule if Matches
Constraints:
Remaining Amount Equals 0

CN Update Order State
Current State: Ordered
State: Purchased


Rule - CN Purchased

Event: Order State Updated
Execute Rule if Matches
Constraints:
State Name Equals Consignment
State Equals Purchased
{ITEM TAG:CNAccount} Is Not Null

CN Account Payment for Consignment Item
Account Name: {ITEM TAG:CNAccount}
PaymentType: Consignment {SETTING:CNPaymentType} Payment
Description: {NAME}
Amount: [=TN('{TOTAL AMOUNT}')-TN('{ITEM TAG:CNCommission}')]

CN Account Debit for Consignment Item
Constraint: '{SETTING:CNPaymentType}'=='Cash' || '{SETTING:CNPaymentType}'=='Credit Card'
Account Name: {SETTING:CNPaymentType}
PaymentType: {SETTING:CNPaymentType} Consignment Debit
Description: {NAME}
Amount: [=TN('{TOTAL AMOUNT}')-TN('{ITEM TAG:CNCommission}')]

:exclamation: The Constraint for the above Action should include all of your “regular” Payment Types, but should exclude Customer Account Payment Type. If you have more Payment Types, add them to the Constraint and separate them with || (double-pipe = “or”), for example:

'{SETTING:CNPaymentType}'=='Cash' || '{SETTING:CNPaymentType}'=='Credit Card' || '{SETTING:CNPaymentType}'=='Cash USD' || '{SETTING:CNPaymentType}'=='Gift Certificate'
2 Likes

Wow what an awesome idea, so this could be used for me to sell american candy from my shop for someone else and it still go through the till but not affect my sales?!

If so this is amazeballzz

Yes, the idea behind it this setup is to ensure Consignment Items are not tracked through the Sales Account; instead, the income is credited to a (Customer) Account, just like an account payment.

P.S. it doesn’t need to be a Customer Account… it could be tweaked to be some other type of account, like a Supplier Account, or you could even create a Consignment Account Type to use.