How to Calculate current Sales Price of item from Code (after evaluating all trade agreements and discount offers)

This question is not answered

I need to develop a SSRS which will list all items and their sales prices, some items have discount offers, some have trade agreements and some items have both applied on them, I am wondering if there is a built-in method which will return current sales price after taking all offers and trade agreements into account.

any code example would be much appreciated.

All Replies
  • have u tried debugging SalesOrder form.?? that should give you an idea, how the salesPrice is calculated  at saleslines.

  • Can you please suggest where should I put breakpoint, I tried write method of SalesLine Datasource but unable to figure out whats happening.

  • You can try using the below piece of code. Its available at  \Classes\PriceDisc_Price\findPriceAgreement . 

    Customize it as per your requirement. However 7th parameter needs customer account. So if u want to consider trade agreements etc, AFAIK, u can use below mentioned piece of code. Then store the itemid, price in a tempTable and show it in SSRS report. 

    PriceDisc::findItemPriceAgreement (this.parmModuleType(),

                                                                                                       this.parmItemId(), 

                                                                                                       this.parmInventDim(),

                                                                                                       this.parmUnitID(),

                                                                                                       this.parmPriceDate(),

                                                                                                       this.parmQty(),

                                                                                                       this.parmAccountNum(),

                                                                                                       this.parmCurrencyCode(),

                                                                                                       this.parmPriceGroupId());

  • there is  a basic assumption in your report requirement.

    Sales Price if different for different users and quantities at different dimensions.

    In such a setup the report is a mess

    You need list of items reports with sales price

    You need to assume that standard sales price mentioned inventTableModule  for this or

    Assume that salesprice is

    For all customers  irrespective of the dimensions and qty purchased the price of item

    Account code  = all

    Price Type  = Price(Sales)

    InventDimID = AllBlank

    Qty from = 0

    qtyTo  = unmentioned

    regads

    VEnkatesh

  • I was looking for simmilar solution,thanx