Notifications
Announcements
No record found.
Good day.
i hope someone is able to help me in this regard.
is it possible through code to apply a manual line discount on an existing line in POS?
any help would be appreciated.
*This post is locked for comments
i have tried programmatically adding a discount item to the sale line item. it seems to work by discounting the item but the VAT/TAX of the transaction does not seem to calculate, which also affects the total of the transaction.
i am adding the discount in the Blank Operations dll with the below code:
LSRetailPosis.Transaction.RetailTransaction retailTrans = posTransaction as LSRetailPosis.Transaction.RetailTransaction; if ((TypeOfTransaction)retailTrans.TransactionType == TypeOfTransaction.Sales) { foreach (var val in retailTrans.SaleItems) { LSRetailPosis.Transaction.Line.Discount.DiscountItem disc; disc = new LSRetailPosis.Transaction.Line.Discount.LineDiscountItem(); disc.Percentage = Convert.ToDecimal(10); val.DiscountLines.AddFirst(disc); val.Comment = "Test Discount "; val.CalculateLine(); } } retailTrans.CalcTotals(); }
has anyone been able to successfully add a discount line to an existing item?
any help would be greatly appreciated.
i have managed to resolve me issue by adding the following line.
this.Application.Services.Tax.CalculateTax(retailTrans);
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2