I am working to customize a functionality for printing the receipt of suspended transactions. One option is to develop a new crystal report for receipt printing. But I am concerned with the default receipt that is already available in POS and its code is also available in POS SDK (printing, peripheral) . How can I use that receipt for printing the suspended transactions ?
any help will appreciate able.
Thanx in advance.
*This post is locked for comments
Hi Abdul,
Your 'test' object is null - and you try to call GetSuspendedTransaction for NULL - it will cause exception
Hi Oksana Kovaliova ,
I am trying to do same thing in suspend trigger but facing error of null reference in obj Transaction object ,can you check what is wrong in this code and also mention what should I pass in IRounding parameter ,currently I am passing null.
Your quick response is highly appreciated .
public void PostSuspendTransaction(IPosTransaction posTransaction)
{
LSRetailPosis.ApplicationLog.Log("SuspendTriggers.PostSuspendTransaction", "After the suspension of a transaction...", LSRetailPosis.LogTraceLevel.Trace);
SuspendRetrieveData test =null;
RetailTransaction obj;
//SqlConnection conn =this.Application.Settings.Database.Connection;
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Data Source=DEVSRVR;" +
"Initial Catalog=MTH01;" +
"Integrated Security=SSPI;";
obj = test.GetSuspendedTransaction(conn, posTransaction.TransactionId, null, posTransaction.StoreId, "PKR", true);
}
Hi Muhammad,
1) You can use standard method GetSuspendedTransaction of class SuspendRetrieveData from POS DataAccess.dll to load suspended transaction data from database to RetailTransaction object.
2) After this you can call Printing service PrintReceipt method with FormType = Receipt and Transaction = your RetailTransaction from p.1
2 things to remember are:
1) Receipt ID will be empty, because Receipt ID is populated right after transaction is closed (when full amount is paid)
2) When you recall this transaction, its transaction ID will be changed by POS => transaction ID from your receipt will become invalid.
Regards,
Oksana
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,232 Super User 2024 Season 2
Martin Dráb 230,064 Most Valuable Professional
nmaenpaa 101,156