Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use the following procedure to define custom price calculations on resources and services.

By default, GoMeddo executes the Default Price Calculation. You can overwrite this behavior by implementing your own price calculation. This article explains how to do that.

1. Create your custom price calculator class

...

This method will be called whenever a reservation is saved, or whenever the reservation form gets re-rendered. You can control when the reservation form gets re-rendered, more on that in a bit. The B25.Util_PluginManager.ReservationPriceData object that gets passed along to the calculate method has two properties that will help you to make your own price calculation.

Name

Type

Purpose

reservation

B25__Reservation__c

Contains the reservation as it is at the moment the calculate method is called. It will have all the fields populated that are visible on the reservation form.

serviceCosts

Decimal

Contains the service costs as shown on the reservation form when you have the setting 'Services have a price' enabled.

In the calculate method you will be able to set any fields on the reservation property record, such as the B25__Subtotal__c field, in order to control the final price of the reservation, or to start an approval process.

...

Filter by label (Content by label)
page
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@101b6
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetruetype
labelsprice pricing calculation pricecalculation
cqllabel in ( "calculation" , "price" , "pricecalculation" , "pricing" ) and type = "page" and space = "BPD"labelsprice pricing calculation pricecalculation

Related issues