web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

"Pay cash" operation using code in AX 2012 Retail SDK

(0) ShareShare
ReportReport
Posted on by 672

Hi Champs!

I am going thru with one requirement and putting my efforts to sort out it. [BTW I am new in retail development :) ]

Normally on POS, we sale by adding items and then finally complete it by "Pay cash/Pay customer account". I wanted to do last operation by using code. I don't want to interfere with screens.

As we normally do suspend transaction operation like:

 

this.Application.BusinessLogic.SuspendRetrieveSystem.SuspendTransaction(retailTransaction as PosTransaction);

 

Is there anything like this to perform "Pay cash/Pay customer account"?

Regards,

Ehtasham

*This post is locked for comments

I have the same question (0)
  • Nirvana115 Profile Picture
    4,921 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Hi,

    Normally u can use one paymenet method for sale item Pay cash or Pay customer account.

    Except if u use the partial payment u can use the Pay cash/Pay customer account in same time.

    Use the class Paycash to execute the payement process in POS :

    transaction = posTransaction as RetailTransaction;  
    
    PayCash pay = new PayCash(false, "1");  // 1 is the number of Payement method
                  
                    pay.OperationID = PosisOperations.PayCash; // choose ure payment method
                    pay.OperationInfo = new OperationInfo();
                    pay.POSTransaction = (PosTransaction)posTransaction;
                    pay.Amount = transaction.NetAmountWithTax;
    
                     pay.RunOperation();
                              

    Regards,


  • Oksana Kovaliova Profile Picture
    3,597 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Hi Ehtasham,

    What will be the condition to finish the payment?

    It's a big difficult to understand the business process: cashier is scanning items... and.. at what step payment will be run (without interfere with screen)?

    Regards,

    Oksana

  • Ehtasham Rahman Profile Picture
    672 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Thank you for the sharing Nirvana. I'll get back to you soon.

  • Ehtasham Rahman Profile Picture
    672 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Hi Oskana!

    Actually it is a kind of activity in which user will proceed with the "Pay cash" operation at day end. Now one option is that he will recall the transaction and manually "Pay cash" it.

    The other procedure is in which I'll give an interface on which cashier will select multiple transactions and "Pay cash" them at once. In that scenario I don't need to interfere with screens, I'll proceed with the exact transaction amount and that's it.

  • Verified answer
    Oksana Kovaliova Profile Picture
    3,597 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Hi Ehtasham,

    If you need to run 'Pay cash' with exact amount (no change), you can call standard 'Pay cash quick' operation:

    using Microsoft.Dynamics.Retail.Pos.SystemCore; //reference to standard DLL

    var application = PosApplication.Instance as IApplication;
    application.RunOperation(PosisOperations.PayCashQuick, tenderId, transaction); //tenderId - is ID payment method, transaction - your transaction object


    Regards,
    Oksana

  • Ehtasham Rahman Profile Picture
    672 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Thank you Oksana! I'll get back to you soon.

  • Suspended Transaction Profile Picture
    25 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Hi Oksana,

    Can you please tell me what about if want to pay partial for example from 100 rupees of transaction i want to pay 50 from cash first and 50 from card and i don't want any cash exchange window when paying quick cash.

    Thanks in Advance

    Regards,

    Hussain  

  • Oksana Kovaliova Profile Picture
    3,597 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Hi,

    'Pay cash quick' operation is used when you want to pay cash for full remain transaction balance.

    In situation you describe, 'Pay cash quick' cannot be used, because you do not use 'Cash' to finalize the sale.

    In the scenario you describe you should not see 'Exchange window' in general,

    but you will see it if rounded amount and balance amount are different or 'Gift receipt' printing is configured to 'When required'.

    Regards,

    Oksana

  • Suspended Transaction Profile Picture
    25 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    Thank You Oksana for your reply

  • mohammed.mqi Profile Picture
    2,050 on at
    RE: "Pay cash" operation using code in AX 2012 Retail SDK

    any idea to how Retrieve suspended transaction ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans