Work Period report does not work very well for custom implementations. This is why Custom Reports was developed. In fact in the near future I am thinking you will see the default reports that are built in will change and become dynamic no longer hard coded. They will still exist but will be fully customizable just like Custom reports are now. @emre has hinted at this several times.
In fact I would be willing to bet custom reports will probably become standard feature eventually with the old reports as default pre-built custom reports that you can edit to your liking or make completely new ones.
I recommend you look at Custom Reports module from Samba Market and if you want a starting place for tutorial look here:
ok…the existing reports do enough for me but it would be great if the Sales Numbers didn’t reflect gift card purchases
Any way for me to add pre existing gift card numbers to this process? I’ve added some test numbers but the gift card search wont list them. even with gc20 as the prefix.
While the GC is showing as part of Sales in the WorkPeriod report, it is not actually part of the Sales Account. As to why the Report shows it as a Sale, I don’t know. The Report is wrong, but you cannot alter it (at least not yet). The only alternative (at this time) is to design your own Report instead.
You should be able to add them manually, but it isn’t particularly easy to do so. The reason the search mechanism isn’t finding them is because it filters for a GCStatus State of Purchased. Setting this Entity State is the tricky part.
Create an Account for GC20xxxxxxxx
Create a Gift Certificate Entity for GC20xxxxxxxx
Set the Entity to use the Account (must have identical name)
Set the Entity custom data field for GCBalance to the value of the GC (which is the last numbers of the GC name)
Create a Transaction Document containing a GC Credit Transaction which transfers funds from (source) GC20xxxxxxxx to (target) GC Funds for the value of the GC.
Now the tricky part: set the GC Entity State called GCStatus to Purchased. How do we do that? I would use SQL.
INSERT INTO [EntityStateValues] (
[EntityId]
,[EntityStates]
) values (
(select [Id] from [Entities] where [Name]='GC201501270806685200') -- substitute your GCxxx name here
,'[{"D":"\/Date(1422367600895-0600)\/","S":"Purchased","SN":"GCStatus"}]'
)
We could design a way to do all of this via Automation, but the practicality of doing so would be a factor of the quantity of GCs you need to create.
There are hundreds of gift cards outstanding. The return rate is unknown…at the moment the numbers and balances are on paper.
I’m not sure that it would be worth the effort. It may be a better idea to change the gift card to a ‘new’ samba account as the customers present their old card. Can I create a card without tendering a payment?
Not with the implementation described in this Tutorial, since the Account and Entity Creation is done upon Settlement. However, if you understand the flow of how this works, it could be done with some alterations.
This is what currently happens:
GC is added to Ticket, and receives Order State of Ordered.
Ticket is Settled. This invokes the Event called Before Ticket Closing.
The Rule called GC Update States captures this event and changes the Order State to Printed. This invokes the Event called Order State Updated.
The Rule called GC Purchased & Printed captures this event and does the work of creating the Entity and Account, creating the Credit Transaction to the Account, and setting the Entity State to Purchased.
So what can we do to change this? Here is one idea…
EDIT: This addition is so simple, that I am going to add it to my system. One reason for being able to do this (for me) is when I donate a GC to a charity, and I don’t want tender any cash for it or show it as a Sale.
Create an Automation Command called GC manual create, map it to Order Line, and set the Enabled States and Visible States to Ordered.
For security purposes, it may be wise to also either map the Automation Command to AdministratorUser Role and/or set the Confirmation to Admin PIN.
Create a Rule to capture the Automation Command and fire the Action GC Update Order State to switch the State from Ordered to Printed.
Accounts:
The Cash Sale for 50.00 was for another product for illustrative purposes. Notice there is no Sale nor Cash visible for the GC Creation of 700.
Also to add, there is no mapping for a lot of the rules in this tutorial. Does that mean there shouldn’t be any mapping? and it should all be greyed out?