
Hi everyone,
I'm currently building a customization form that can search a loyalty member (by name, and phone) and apply loyalty member by using blank operation. When i clicked the blank operation button, they opened a custom form that can search a loyalty member. Once my clicked the "apply" button, they go back to the main blank operation class to add loyalty member to the transaction.
However, the problem is.. I can't add loyalty member to the transaction before i added an item(s) to the transaction. That's because if you want to use "AddLoyaltyRequest" method, you need retailTransaction parameter and loyalty id. the loyalty id is no problem because i can get it from the form. The posTransaction / retailTransaction parameter is still empty because there is no transaction. So, in order to apply loyalty member into the transaction, i have to add / scan an item first, and then go to the search form and apply loyalty with no problem.
Is it possible to initialize pos transaction / retail transaction without adding item(s) first?
Because, when i saw the standard "Add loyalty card" button, the loyalty member can be applied without adding item(s) first to the transaction.
Here is my code snippet.
public void BlankOperation(IBlankOperationInfo operationInfo, IPosTransaction posTransaction)
{
retailTransaction = posTransaction as RetailTransaction;
if (operationInfo.OperationId == "1")
{
SqlConnection connection = Application.Settings.Database.Connection;
frmSearchMember searchForm = new frmSearchMember(connection);
searchForm.BringToFront();
searchForm.ShowDialog();
searchForm.Focus();
if (searchForm.returnMember == true)
{
Application.Services.Loyalty.AddLoyaltyRequest(retailTransaction,searchForm.loyaltyID);
}
operationInfo.OperationHandled = true;
}
}
Thanks in advance
*This post is locked for comments
I have the same question (0)