Is it possible to modify the formula for calculating standard fields ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkhalifa
    Member
    • Jan 2019
    • 48

    Is it possible to modify the formula for calculating standard fields ?


    Hello, I use the API to send the quote information to espo, I noticed that the field discountAmount does not take the value that I send by the API but it is always calculated from the sums of the discount of the quoteItem. While in my case I have overall discounts that do not apply on the quoteItem but directly on the quotes. So I thought to add a new globalDiscount field in which I send the global discount info, it works well except that the total amount of quotes does not take into account my new field and I do not have the opportunity to changed the grandTotalAmount calculation formula Is it possible to modify the formula for calculating standard fields?
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello,
    here you can find, how to override server-side calculation

    Comment

    • mkhalifa
      Member
      • Jan 2019
      • 48

      #3
      Thanks tanya

      Comment

      • mkhalifa
        Member
        • Jan 2019
        • 48

        #4
        Hi,

        Just for information, the path of the class \ Espo \ Modules \ Advanced \ Repositories \ Quote is not good I find the class rather under \ Espo \ Modules \ Sales \ Repositories \ Quote
        I have the Advanced module installed and Espo version: 5.5.6
        Thanks

        Comment

        • yuri
          Member
          • Mar 2014
          • 8440

          #5
          It's known cache issue. See: https://forum.espocrm.com/forum/exte...age4#post45103
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • mkhalifa
            Member
            • Jan 2019
            • 48

            #6

            Sorry but I did not understand! must I have the class quote.php In \ Espo \ Modules \ Sales \ Repositories \ Quote But not in \ Espo \ Modules \ Advanced \ Repositories \ Quote is a problem?

            Comment

            • yuri
              Member
              • Mar 2014
              • 8440

              #7
              Change change the path. It's old documentation.
              If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

              Comment

              • mkhalifa
                Member
                • Jan 2019
                • 48

                #8
                thanks

                Comment

                Working...