0
votes

We have a requirement to provide user with a COPY Transaction button on Show Journal Screen, clicking this button will load exact of selected transaction on main POS screen which cashier can tender and conclude.

I have created a button on form, on button's click event, I have loaded and initiated the transaction object using the following code:

 if (gridView1.SelectedRowsCount > 0)
            {
                DataRow Row = gridView1.GetDataRow(gridView1.GetSelectedRows()[0]);
                selectedTransactionId = (string)Row["TRANSACTIONID"];
                selectedStoreId = (string)Row["STORE"];
                selectedTerminalId = (string)Row["TERMINAL"];

                PosTransaction transaction = LoadTransaction(selectedTransactionId, selectedStoreId, selectedTerminalId);


            }

Now I cannot find a way to load this transaction to main screen, I've tried setting this.posTransaction = transaction; but it does not work.

I then tried to suspend the transaction and retrieve suspended transaction, I can successfully suspend transaction from the following code:

this.Application.BusinessLogic.SuspendRetrieveSystem.SuspendTransaction(transaction);

but cannot retrieve this transaction using the following code:

this.Application.BusinessLogic.SuspendRetrieveSystem.RetrieveTransaction(transaction.TransactionId);

I know I can read items one by one and add them to transaction, but what if a discount was applied to the transaction or the transaction was a loyalty transaction, so I must reload the exact transaction.

1

1 Answers

1
votes

Have you tried?

if (!string.IsNullOrEmpty(this.selectedTransactionId)) {
    application.RunOperation(PosisOperations.RecallTransaction, this.selectedTransactionId);
}