Late Delivery and Penalty with currency conversion

Author: Accord Project

latedeliveryandpenalty-currency-conversion@0.2.0 Contract ^0.22.0 399768486d30a1f8a0cb15280b9e083df4fa5cee979f7207f6039f7d9b796d9b

A sample Late Delivery And Penalty clause with currency conversion.

Download Archive Download Compiled Archive Open in Template Studio

Template Text

Late Delivery and Penalty.

In case of delayed delivery except for Force Majeure cases, "Dan" (the Seller) shall pay to "Steve" (the Buyer) for every 2 days of delay penalty amounting to 10.5% of the total value of the Equipment whose delivery has been delayed. Any fractional part of a days is to be considered a full days. The total amount of penalty shall not however, exceed 55% of the total value of the Equipment involved in late delivery. If the delay is more than 15 days, the Buyer is entitled to terminate this Contract. All Equipment values are based on EUR and all penalty payments will be paid in USD at its equivalent amount in EUR. The conversion rate between the currencies is based upon "the prevailing exchange rate at a major United States bank".

## Late Delivery and Penalty.

In case of delayed delivery except for Force Majeure cases,
"Dan" (the Seller) shall pay to "Steve" (the Buyer) for every 2 days
of delay penalty amounting to 10.5% of the total value of the Equipment
whose delivery has been delayed. Any fractional part of a days is to be
considered a full days. The total amount of penalty shall not however,
exceed 55% of the total value of the Equipment involved in late delivery.
If the delay is more than 15 days, the Buyer is entitled to terminate this Contract.
All Equipment values are based on EUR and all penalty payments will be paid in USD at its equivalent amount in EUR. The conversion rate between the currencies is based upon "the prevailing exchange rate at a major United States bank".
## Late Delivery and Penalty.

In case of delayed delivery{{#if forceMajeure}} except for Force Majeure cases,{{/if}}
{{seller}} (the Seller) shall pay to {{buyer}} (the Buyer) for every {{penaltyDuration}}
of delay penalty amounting to {{penaltyPercentage}}% of the total value of the Equipment
whose delivery has been delayed. Any fractional part of a {{fractionalPart}} is to be
considered a full {{fractionalPart}}. The total amount of penalty shall not however,
exceed {{capPercentage}}% of the total value of the Equipment involved in late delivery.
If the delay is more than {{termination}}, the Buyer is entitled to terminate this Contract.
All Equipment values are based on {{fromCurrency}} and all penalty payments will be paid in {{toCurrency}} at its equivalent amount in {{fromCurrency}}. The conversion rate between the currencies is based upon {{conversionSource}}.
{
    "$class": "org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyContract",
    "buyer": "resource:org.accordproject.party.Party#Steve",
    "seller": "resource:org.accordproject.party.Party#Dan",
    "forceMajeure": true,
    "penaltyDuration": {
        "$class": "org.accordproject.time.Duration",
        "amount": 2,
        "unit": "days"
    },
    "penaltyPercentage": 10.5,
    "capPercentage": 55,
    "termination": {
        "$class": "org.accordproject.time.Duration",
        "amount": 15,
        "unit": "days"
    },
    "fractionalPart": "days",
    "conversionSource": "the prevailing exchange rate at a major United States bank",
    "fromCurrency": "EUR",
    "toCurrency": "USD",
    "contractId": "00945cbe-e8ec-43aa-ab2b-3ceefd8ebb28",
    "$identifier": "00945cbe-e8ec-43aa-ab2b-3ceefd8ebb28"
}

Template Model

namespace org.accordproject.latedeliveryandpenalty

import org.accordproject.contract.* from https://models.accordproject.org/accordproject/contract.cto
import org.accordproject.party.* from https://models.accordproject.org/accordproject/party.cto
import org.accordproject.runtime.* from https://models.accordproject.org/accordproject/runtime.cto
import org.accordproject.obligation.* from https://models.accordproject.org/accordproject/obligation.cto
import org.accordproject.time.* from https://models.accordproject.org/time@0.2.0.cto
import org.accordproject.money.CurrencyCode from https://models.accordproject.org/money@0.2.0.cto

/**
 * Defines the data model for the LateDeliveryAndPenalty template.
 * This defines the structure of the abstract syntax tree that the parser for the template
 * must generate from input source text.
 */
asset LateDeliveryAndPenaltyContract extends Contract {
  /**
   * The buyer
   */
  --> Party buyer

  /**
   * The seller
   */
  --> Party seller

  /**
   * Does the clause include a force majeure provision?
   */
  o Boolean forceMajeure

  /**
   * For every penaltyDuration that the goods are late
   */
  o Duration penaltyDuration

  /**
   * Seller pays the buyer penaltyPercentage % of the value of the goods
   */
  o Double penaltyPercentage

  /**
   * Up to capPercentage % of the value of the goods
   */
  o Double capPercentage

  /**
   * If the goods are >= termination late then the buyer may terminate the contract
   */
  o Duration termination

  /**
   * Fractional part of a ... is considered a whole ...
   */
  o TemporalUnit fractionalPart

  /**
   * Adding new currency related fields
   */

  /**
   * Where are the currency versions coming from?
   */
  o String conversionSource

  /**
   * The currency that the goods are valued in
   */
  o CurrencyCode fromCurrency

  /**
   * The currency to be used for the penalty
   */
  o CurrencyCode toCurrency
}

/**
 * Represents a currency conversion pair and exchange rate
 */
concept CurrencyConversion {
   o CurrencyCode from
   o CurrencyCode to
   o Double rate
}

/**
 * Defines the input data required by the template
 */
transaction LateDeliveryAndPenaltyRequest extends Request {

  /**
   * Are we in a force majeure situation? 
   */
  o Boolean forceMajeure

  /**
   * What was the agreed delivery date for the goods?
   */
  o DateTime agreedDelivery

  /**
   * If the goods have been delivered, when where they delivered?
   */
  o DateTime deliveredAt optional

  /**
   * What is the value of the goods?
   */
  o Double goodsValue

  /**
   * What is the exchange rate?
   */
  /*o Double exchangeValue*/
  o CurrencyConversion currencyConversion
}

/**
 * Defines the output data for the template
 */
transaction LateDeliveryAndPenaltyResponse extends Response {
  /**
   * The penalty to be paid by the seller
   */
  o Double penalty

  /**
   * Whether the buyer may terminate the contract 
   */
  o Boolean buyerMayTerminate
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.runtime.State
{
    "$class": "org.accordproject.runtime.State",
    "$identifier": "82b83b60-a77b-11eb-9770-7ddd576a12c2"
}

Request Types

Type Sample JSON
org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest
{
    "$class": "org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest",
    "forceMajeure": false,
    "agreedDelivery": "2021-04-27T13:10:48.085-04:00",
    "deliveredAt": "2021-04-27T13:10:48.085-04:00",
    "goodsValue": 87.97,
    "currencyConversion": {
        "$class": "org.accordproject.latedeliveryandpenalty.CurrencyConversion",
        "from": "NPR",
        "to": "XAU",
        "rate": 18.415
    },
    "$timestamp": "2021-04-27T13:10:48.085-04:00"
}

Response Types

Type Sample JSON
org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyResponse
{
    "$class": "org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyResponse",
    "penalty": 97.625,
    "buyerMayTerminate": true,
    "$timestamp": "2021-04-27T13:10:48.086-04:00"
}

Events Types

Type Sample JSON
org.accordproject.obligation.PaymentObligation
{
    "$class": "org.accordproject.obligation.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 238.831,
        "currencyCode": "KGS"
    },
    "description": "Et elit reprehenderit.",
    "$identifier": "82b83b61-a77b-11eb-9770-7ddd576a12c2",
    "contract": "resource:org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyContract#7886",
    "promisor": "resource:org.accordproject.party.Party#7018",
    "promisee": "resource:org.accordproject.party.Party#8592",
    "deadline": "2021-04-27T13:10:48.086-04:00",
    "$timestamp": "2021-04-27T13:10:48.086-04:00"
}

Technical Integration

Please refer to the Accord Project documentation for how to use a template or integrate it within your application.

View the Latest code for this template on GitHub.