Interface QapiRebateRecord

All Superinterfaces:
ApprovableColumns, CalculableObjectLineItemColumns, Map<String,SelectableExpression>, PersistedObjectColumns, PriceCalculableObjectLineItemColumns, Tables.Columns, Tables.Table

Table of the Rebate Records of one Rebate Record Set.

Rebate Records are created by the rebate logic for the line items of a Rebate Agreement. Most of their fields are copied from the line item. They are then recalculated during the validity of the agreement, approved, and exported to an external system to pay the rebate. One line item can have several records, for example one per payout period.

Example:


 def q = api.queryApi()
 def t = q.tables().rebateRecords(17)

 return q.source(t, [t.uniqueName(), t.sourceId(), t.payoutDate(), t.status()],
         t.payoutDate().lessOrEqual(new Date()))
         .stream { it.collect { it } }
 
Since:
14.0 - Caribou Lou
See Also:
  • Method Details

    • rebateRecordGroupUniqueName

      SelectableExpression rebateRecordGroupUniqueName()
      Records of one group can be approved together instead of one by one.
      Returns:
      the rebateRecordGroupUniqueName column (the unique name of the Rebate Record Group that the record belongs to) as a String expression
    • uniqueName

      SelectableExpression uniqueName()
      Returns:
      the uniqueName column (the unique name of the Rebate Record) as a String expression
    • sourceId

      Returns:
      the sourceId column (the unique name of the Rebate Agreement revision that the record was created from) as a String expression
      See Also:
    • lineId

      Returns:
      the lineId column (the line ID of the Rebate Agreement line item that the record was created from) as a String expression
      See Also:
    • name

      Returns:
      the name column (the name of the Rebate Record) as a String expression
    • description

      SelectableExpression description()
      Returns:
      the description column (the description of the Rebate Record) as a String expression
    • rebateRecordSetLabel

      SelectableExpression rebateRecordSetLabel()
      Returns:
      the rebateRecordSetLabel column (the label of the Rebate Record Set that the record belongs to) as a String expression
    • startDate

      Returns:
      the startDate column (the first day of validity of the record) as a DateOnly expression
      See Also:
    • endDate

      Returns:
      the endDate column (the last day of validity of the record) as a DateOnly expression
      See Also:
    • payoutDate

      SelectableExpression payoutDate()
      Returns:
      the payoutDate column (the date on which the rebate should be paid) as a DateOnly expression
    • rebateTypeUN

      SelectableExpression rebateTypeUN()
      The column is also accessible as the property rebateTypeUniqueName.
      Returns:
      the rebateTypeUN column (the unique name of the Rebate Type of the record, the same as on its line item) as a String expression
    • customerGroup

      SelectableExpression customerGroup()
      The value is a customer group object, not a String.
      Returns:
      the customerGroup column (the group of customers of the record) as a Pojo expression
    • productGroup

      SelectableExpression productGroup()
      The value is a product group object, not a String.
      Returns:
      the productGroup column (the group of products of the record) as a Pojo expression
    • seller

      The value is a seller reference object, not a String.
      Returns:
      the seller column (the seller of the record) as a Pojo expression
    • status

      The value is the name of one of the RebateRecordStatus values.
      Returns:
      the status column (the status of the Rebate Record) as an Enum expression
      See Also:
    • agreementStatus

      SelectableExpression agreementStatus()
      When a revision of the agreement is created, this value is set to SUPERSEDED or INVALIDATED on the records of the previous revision.
      Returns:
      the agreementStatus column (the status of the Rebate Agreement that the record was created from) as an Enum expression
      See Also:
    • rank

      Returns:
      the rank column (the rank of the record, set by the rebate logic) as an Integer expression
    • isManual

      Returns:
      the isManual column (whether the record was created manually as a copy of another record, rather than by the logic) as a Boolean expression
    • inputsJson

      SelectableExpression inputsJson()
      Returns:
      the inputsJson column (the inputs specific to the Rebate Record) as a String expression serialized as json
      See Also:
    • calculationBaseJson

      SelectableExpression calculationBaseJson()
      Returns:
      the calculationBaseJson column (the Datamart filter that defines the transactions the rebate is calculated and allocated on) as a String expression serialized as json
    • calculationStatus

      SelectableExpression calculationStatus()
      Returns:
      the calculationStatus column (the result of the last calculation of the record) as an Integer expression
      See Also:
    • agreementTermsJson

      SelectableExpression agreementTermsJson()
      Returns:
      the agreementTermsJson column (the inputs copied from the Rebate Agreement line item when the record was created) as a String expression serialized as json
      See Also:
    • formulaName

      SelectableExpression formulaName()
      Returns:
      the formulaName column (the unique name of the logic stored on the record) as a String expression
    • lastUpdateByName

      SelectableExpression lastUpdateByName()
      Returns:
      the lastUpdateByName column (the name of the user who last updated the record) as a String expression
      See Also:
    • createdByName

      SelectableExpression createdByName()
      Returns:
      the createdByName column (the name of the user who created the record) as a String expression
      See Also:
    • approvalState

      SelectableExpression approvalState()
      Typical values are APPROVED, AUTO_APPROVED and DENIED.
      Returns:
      the approvalState column (the approval state of the record) as an Enum expression
      See Also:
    • approvalDate

      SelectableExpression approvalDate()
      Returns:
      the approvalDate column (the date and time when the record was approved) as a DateTime expression
      See Also:
    • intgStatus

      SelectableExpression intgStatus()
      Returns:
      the intgStatus column (the status of the export of the record to an external system) as a String expression
      See Also:
    • intgStatusDetails

      SelectableExpression intgStatusDetails()
      Returns:
      the intgStatusDetails column (the details of the status of the export of the record to an external system) as a String expression
      See Also:
    • intgStatusErpReference

      SelectableExpression intgStatusErpReference()
      Returns:
      the intgStatusErpReference column (the reference of the record in the external Enterprise Resource Planning (ERP) system) as a String expression
      See Also:
    • calculationDate

      SelectableExpression calculationDate()
      Returns:
      the calculationDate column (the date and time when the last calculation of the record ended) as a DateTime expression
      See Also:
    • userGroupEdit

      SelectableExpression userGroupEdit()
      Returns:
      the userGroupEdit column (the user group whose members can edit the record) as a String expression
      See Also:
    • userGroupViewDetails

      SelectableExpression userGroupViewDetails()
      Returns:
      the userGroupViewDetails column (the user group whose members can view the details of the record) as a String expression
      See Also:
    • headerRebateTypeUniqueName

      SelectableExpression headerRebateTypeUniqueName()
      Returns:
      the headerRebateTypeUniqueName column (the unique name of the Rebate Agreement type of the record) as a String expression
    • externalRef

      SelectableExpression externalRef()
      Returns:
      the externalRef column (the external reference of the record) as a String expression
    • sourceIdNoRev

      SelectableExpression sourceIdNoRev()
      Returns:
      the sourceIdNoRev column (the unique name of the original Rebate Agreement, which stays the same for all its revisions) as a String expression
      See Also:
    • locked

      Returns:
      the locked column (whether the record is locked for editing because it is part of a calculation) as a Boolean expression