Purchase Order Failure

purchase-order-failure@0.9.0 Contract ^0.20.0 2f18e6da048d1c0260a2831c2c22cec0caf2ad7cd2457e4af89607a0cf121b06

Issues credits for late purchase orders. Purchase orders sent via DocuSign must have the text recipient tabs with the following tab labels and validations: deliveryDate with Date validation, actualPrice with Numbers validation and currencyCode with no validation.

Download Archive Open in Template Studio Open in VSCode Web

Purchase Order Failure

This clause emits a payment obligation for purchase orders that are received late. Purchase orders sent via DocuSign must have the "text" recipient tabs with the following tab labels and validations: deliveryDate with "Date" validation, actualPrice with "Numbers" validation and currencyCode with no validation.

Template Text

In the event that a Purchase Order Failure causes any Product to be delivered more than 1 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 5.0% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 2 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 10% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 10 days, after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 50% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". Any discount amount owing to "Buyer Corp" pursuant to this "Section 3.5(c)" shall be paid by paying "Buyer Corp" such amount via electronic money transfer. In case of 5 or more Purchase Order Failures in the past 60 days, then "Buyer Corp" shall be entitled to an additional 599.99 USD compensation.

In the event that a Purchase Order Failure causes any Product to be delivered more than 1 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 5.0% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 2 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 10% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 10 days, after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 50% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". Any discount amount owing to "Buyer Corp" pursuant to this "Section 3.5(c)" shall be paid by paying "Buyer Corp" such amount via electronic money transfer. In case of 5 or more Purchase Order Failures in the past 60 days, then "Buyer Corp" shall be entitled to an additional 599.99 USD compensation.
In the event that a Purchase Order Failure causes any Product to be delivered more than {{lateOne}} after the delivery date for such Product specified in the applicable Purchase Order therefore, {{buyer}} shall be entitled to receive a {{lateOnePercent}}% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to {{article}}. In the event that a Purchase Order Failure causes any Product to be delivered more than {{lateTwo}} after the delivery date for such Product specified in the applicable Purchase Order therefore, {{buyer}} shall be entitled to receive a {{lateTwoPercent}}% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to {{article}}. In the event that a Purchase Order Failure causes any Product to be delivered more than {{lateThree}}, after the delivery date for such Product specified in the applicable Purchase Order therefore, {{buyer}} shall be entitled to receive a {{lateThreePercent}}% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to {{article}}. Any discount amount owing to {{buyer}} pursuant to this {{thisSection}} shall be paid by paying {{buyer}} such amount via electronic money transfer. In case of {{maxFailures}} or more Purchase Order Failures in the past {{failureRange}}, then {{buyer}} shall be entitled to an additional {{repeatedFailureCompensation}} compensation.
{
    "$class": "com.docusign.clauses.PurchaseOrderFailure",
    "contractId": "cfff30af-3e3f-4aef-adbc-c0d7c144f44e",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Buyer Corp"
    },
    "lateOne": {
        "$class": "org.accordproject.time.Duration",
        "amount": 1,
        "unit": "days"
    },
    "lateTwo": {
        "$class": "org.accordproject.time.Duration",
        "amount": 2,
        "unit": "days"
    },
    "lateThree": {
        "$class": "org.accordproject.time.Duration",
        "amount": 10,
        "unit": "days"
    },
    "lateOnePercent": 5,
    "lateTwoPercent": 10,
    "lateThreePercent": 50,
    "article": "Article 5",
    "thisSection": "Section 3.5(c)",
    "maxFailures": 5,
    "failureRange": {
        "$class": "org.accordproject.time.Duration",
        "amount": 60,
        "unit": "days"
    },
    "repeatedFailureCompensation": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 599.99,
        "currencyCode": "USD"
    }
}

Template Model

namespace com.docusign.clauses

import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto
import org.accordproject.time.* from https://models.accordproject.org/v2.0/time.cto
import com.docusign.connect.DocuSignEnvelopeInformation from https://models.accordproject.org/docusign/connect.cto
import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money.cto

/**
 * Defines the data model for the Purchase Order Failure
 * template.
 */
asset PurchaseOrderFailure extends AccordContract {
  o AccordParty buyer

  o Duration lateOne
  o Duration lateTwo
  o Duration lateThree

  o Double lateOnePercent
  o Double lateTwoPercent
  o Double lateThreePercent

  o String article
  o String thisSection

  o Integer maxFailures
  o Duration failureRange
  o MonetaryAmount repeatedFailureCompensation
}

/**
 * Defines the state of the contract
 */
asset PurchaseOrderFailureState extends AccordContractState {
  o DateTime[] pastFailures
  o Integer nbPastFailures
}

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

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
com.docusign.clauses.PurchaseOrderFailureState
{
    "$class": "com.docusign.clauses.PurchaseOrderFailureState",
    "pastFailures": [
        "2020-01-29T19:49:10.759-05:00"
    ],
    "nbPastFailures": 44105,
    "stateId": "540c9771-42fa-11ea-8b78-dde257dbceb0"
}

Request Types

Type Sample JSON
com.docusign.connect.DocuSignEnvelopeInformation
{
    "$class": "com.docusign.connect.DocuSignEnvelopeInformation",
    "envelopeStatus": {
        "$class": "com.docusign.connect.EnvelopeStatus",
        "status": "Sent",
        "envelopeId": "In.",
        "created": "2020-01-29T19:49:10.758-05:00",
        "sent": "2020-01-29T19:49:10.758-05:00",
        "delivered": "2020-01-29T19:49:10.758-05:00",
        "signed": "2020-01-29T19:49:10.758-05:00",
        "completed": "2020-01-29T19:49:10.758-05:00",
        "declined": "2020-01-29T19:49:10.758-05:00",
        "email": "Id esse sunt duis nisi."
    },
    "recipients": [
        {
            "$class": "com.docusign.connect.Recipient",
            "status": "Signed",
            "email": "Ut in nisi.",
            "userName": "Et irure amet.",
            "sent": "2020-01-29T19:49:10.758-05:00",
            "delivered": "2020-01-29T19:49:10.758-05:00",
            "signed": "2020-01-29T19:49:10.758-05:00",
            "declined": "2020-01-29T19:49:10.758-05:00",
            "declineReason": "Labore esse.",
            "tabStatuses": [
                {
                    "$class": "com.docusign.connect.NumberTabStatus",
                    "tabName": "Excepteur do amet commodo enim.",
                    "tabValue": 195.163,
                    "tabType": "EnvelopeID",
                    "status": "Deserunt eu ea exercitation qui.",
                    "tabLabel": "Cupidatat.",
                    "originalValue": "Ullamco nisi labore.",
                    "signed": "2020-01-29T19:49:10.758-05:00",
                    "customTabType": "Formula"
                }
            ]
        }
    ],
    "customFields": [
        {
            "$class": "com.docusign.connect.CustomField",
            "name": "Ad eiusmod minim magna Lorem.",
            "value": "Eu fugiat reprehenderit magna."
        }
    ],
    "transactionId": "540c7060-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:10.758-05:00"
}

Response Types

Type Sample JSON
com.docusign.clauses.PurchaseOrderFailureResponse
{
    "$class": "com.docusign.clauses.PurchaseOrderFailureResponse",
    "penalty": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 41.228,
        "currencyCode": "SBD"
    },
    "transactionId": "540c9770-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:10.759-05:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 51.038,
        "currencyCode": "AOA"
    },
    "description": "Est.",
    "contract": "resource:com.docusign.clauses.PurchaseOrderFailure#3054",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#2772",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#0654",
    "deadline": "2020-01-29T19:49:10.759-05:00",
    "eventId": "540c9772-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:10.759-05:00"
}

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on GitHub.