Product Unit Price Calculation Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcbeinder
    Member
    • May 2018
    • 68

    Product Unit Price Calculation Question

    I'm curious how the Unit Price is being calculated. When setting the Pricing Type to Profit Margin with a Pricing Factor of X, where in the system is this behavior defined? I'm not seeing any formulas defined. I'm looking to duplicate this type of behavior for a few different fields on some custom entities.
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi marcbeinder,

    It's calculated like this:

    Unit Price = (100 * Cost Price) / (100 - Pricing Factor)

    Comment

    • marcbeinder
      Member
      • May 2018
      • 68

      #3
      Thank you lazovic! And where where would I put that into Entity Manager? The formula editor? I've never used that functionality before.

      Comment

      • lazovic
        Super Moderator
        • Jan 2022
        • 809

        #4
        marcbeinder,

        To edit the formula script for a specific entity type, follow Administration > Entity Manager > a needed entity type > Formula.

        You will need to convert the equation into a formula, take the values from the fields in which you will enter the values, and enter into another field. You just need to know what names your fields have in custom entities.

        Something like that:
        Code:
        unitPrice = (100 * costPrice) / (100 - pricingFactor);

        Comment

        • marcbeinder
          Member
          • May 2018
          • 68

          #5
          Awesome! Thank you so much lazovic!

          Comment

          Working...