Add discount line programmatically to sale line
Joined: September 19 2016
Posted: September 19 2016 at 1:12am
i am hoping that someone could possibly help me.
i am trying to programmatically add a discount line to a saleline item.
i am needing to loop through the current lines on the transaction and conditionally add a discount to lines that meet certain criteria.
this is the code i have so far:
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.LineDiscountItem disc = new LSRetailPosis.Transaction.Line.Discount.LineDiscountItem();
disc.Percentage = 10;
// this is where i am getting stuck, i am not sure how i should add the discount ite to the existing line
val.Comment = "test Discount";
any help would be appreciated
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum