Late Delivery and Penalty with currency conversion

Author: Accord Project

latedeliveryandpenalty-currency-conversion@0.1.0 Contract ^0.21.0 6041946978c514ff833e365f432c8aaa6353f816b490fd37a7f6a7da79e072ff

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": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Steve"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "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": "103b8f4a-1719-41a1-b96d-c80e4c07b4d6"
}

Template Model

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace org.accordproject.money

/**
 * Represents an amount of Cryptocurrency
 */
concept CryptoMonetaryAmount {
  o Double doubleValue
  o CryptoCurrencyCode cryptoCurrencyCode
}

/**
 * Cyptocurrency codes. From https://en.wikipedia.org/wiki/List_of_cryptocurrencies
 */
enum CryptoCurrencyCode {
  o ADA
  o BCH
  o BTC
  o DASH
  o EOS
  o ETC
  o ETH
  o LTC
  o NEO
  o XLM
  o XMR
  o XRP
  o ZEC
}

/**
 * Represents an amount of money
 */
concept MonetaryAmount {
  o Double doubleValue // convert to fixed-point?
  o CurrencyCode currencyCode
}

/**
 * ISO 4217 codes. From https://en.wikipedia.org/wiki/ISO_4217
 * https://www.currency-iso.org/en/home/tables/table-a1.html
 */
enum CurrencyCode {
o AED
o AFN
o ALL
o AMD
o ANG
o AOA
o ARS
o AUD
o AWG
o AZN
o BAM
o BBD
o BDT
o BGN
o BHD
o BIF
o BMD
o BND
o BOB
o BOV
o BRL
o BSD
o BTN
o BWP
o BYN
o BZD
o CAD
o CDF
o CHE
o CHF
o CHW
o CLF
o CLP
o CNY
o COP
o COU
o CRC
o CUC
o CUP
o CVE
o CZK
o DJF
o DKK
o DOP
o DZD
o EGP
o ERN
o ETB
o EUR
o FJD
o FKP
o GBP
o GEL
o GHS
o GIP
o GMD
o GNF
o GTQ
o GYD
o HKD
o HNL
o HRK
o HTG
o HUF
o IDR
o ILS
o INR
o IQD
o IRR
o ISK
o JMD
o JOD
o JPY
o KES
o KGS
o KHR
o KMF
o KPW
o KRW
o KWD
o KYD
o KZT
o LAK
o LBP
o LKR
o LRD
o LSL
o LYD
o MAD
o MDL
o MGA
o MKD
o MMK
o MNT
o MOP
o MRU
o MUR
o MVR
o MWK
o MXN
o MXV
o MYR
o MZN
o NAD
o NGN
o NIO
o NOK
o NPR
o NZD
o OMR
o PAB
o PEN
o PGK
o PHP
o PKR
o PLN
o PYG
o QAR
o RON
o RSD
o RUB
o RWF
o SAR
o SBD
o SCR
o SDG
o SEK
o SGD
o SHP
o SLL
o SOS
o SRD
o SSP
o STN
o SVC
o SYP
o SZL
o THB
o TJS
o TMT
o TND
o TOP
o TRY
o TTD
o TWD
o TZS
o UAH
o UGX
o USD
o USN
o UYI
o UYU
o UZS
o VEF
o VND
o VUV
o WST
o XAF
o XAG
o XAU
o XBA
o XBB
o XBC
o XBD
o XCD
o XDR
o XOF
o XPD
o XPF
o XPT
o XSU
o XTS
o XUA
o XXX
o YER
o ZAR
o ZMW
o ZWL
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "8f113071-9a7d-11eb-93e3-8fd7aa2e27a9"
}

Request Types

Type Sample JSON
org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest
{
    "$class": "org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest",
    "forceMajeure": false,
    "agreedDelivery": "2021-04-11T04:22:42.675+00:00",
    "deliveredAt": "2021-04-11T04:22:42.675+00:00",
    "goodsValue": 215.551,
    "currencyConversion": {
        "$class": "org.accordproject.latedeliveryandpenalty.CurrencyConversion",
        "from": "MDL",
        "to": "CHF",
        "rate": 157.476
    },
    "transactionId": "8f109430-9a7d-11eb-93e3-8fd7aa2e27a9",
    "timestamp": "2021-04-11T04:22:42.675+00:00"
}

Response Types

Type Sample JSON
org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyResponse
{
    "$class": "org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyResponse",
    "penalty": 122.424,
    "buyerMayTerminate": true,
    "transactionId": "8f113070-9a7d-11eb-93e3-8fd7aa2e27a9",
    "timestamp": "2021-04-11T04:22:42.679+00:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 150.894,
        "currencyCode": "SYP"
    },
    "description": "Deserunt id amet tempor laborum.",
    "contract": "resource:org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyContract#3637",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#1935",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#3025",
    "deadline": "2021-04-11T04:22:42.680+00:00",
    "eventId": "8f115780-9a7d-11eb-93e3-8fd7aa2e27a9",
    "timestamp": "2021-04-11T04:22:42.680+00: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.