I created new customize form which content suspended transaction so now i need to Retrieve suspended transaction
so after research about that i found this way on SuspendedTrans in Triggers project .
Triggering Reciptprint in blank operation project
The good place for this is the PostSuspendTransaction method in the SuspendTriggers class. This class is located in the SuspendTriggers project of the Triggers solution.
The implementation is quite simple, yet a little bit tricky:
public void PostSuspendTransaction(IPosTransaction posTransaction)
{
LSRetailPosis.ApplicationLog.Log("SuspendTriggers.PostSuspendTransaction", "After the suspension of a transaction...", LSRetailPosis.LogTraceLevel.Trace);
RetailTransaction retailTransaction = posTransaction as RetailTransaction;
if (retailTransaction != null)
{
Application.RunOperation(PosisOperations.BlankOperation, "PrintRecipt;", posTransaction);
}
And also place for this is the BlankOperation method in the BlankOperations class. This class is located in the BlankOperations project of the Triggers solution.
and in BlankOperations as following code
// Do whatever you need
// .....................
if (operationInfo.OperationId == "PrintRecipt")
{
try
{
RetailTransaction retailTransaction = posTransaction as RetailTransaction;
if (retailTransaction == null)
{
POSFormsManager.ShowPOSMessageDialog(3660); // This action is not valid for this type of transaction.
}
else
{
Application.Services.Printing.PrintReceipt(FormType.Receipt, retailTransaction, true);
}
}
catch (PosisException ex)
{
ApplicationExceptionHandler.HandleException(this.ToString(), ex);
throw;
}
catch (System.Exception ex2)
{
ApplicationExceptionHandler.HandleException(this.ToString(), ex2);
throw;
}
}
}
*This post is locked for comments
is it Good way
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156