Purchase Order Failure

Author: Accord Project

purchase-order-failure@0.9.1 Contract ^0.20.10 c60857f151e5bd0ec5bf7cfac5a020302e7a691309d20bdb3d1887337f76f28a

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

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": "76c82b84-1ac5-4fe5-9fda-51186d65efa7",
    "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-04-10T16:42:49.117-04:00"
    ],
    "nbPastFailures": 27967,
    "stateId": "d73f04d1-7b6b-11ea-b280-c173749a9e96"
}

Request Types

Type Sample JSON
com.docusign.connect.DocuSignEnvelopeInformation
{
    "$class": "com.docusign.connect.DocuSignEnvelopeInformation",
    "envelopeStatus": {
        "$class": "com.docusign.connect.EnvelopeStatus",
        "status": "Created",
        "envelopeId": "Aliquip non consequat.",
        "created": "2020-04-10T16:42:49.115-04:00",
        "sent": "2020-04-10T16:42:49.115-04:00",
        "delivered": "2020-04-10T16:42:49.115-04:00",
        "signed": "2020-04-10T16:42:49.115-04:00",
        "completed": "2020-04-10T16:42:49.115-04:00",
        "declined": "2020-04-10T16:42:49.115-04:00",
        "email": "Eiusmod irure id."
    },
    "recipients": [
        {
            "$class": "com.docusign.connect.Recipient",
            "status": "Completed",
            "email": "Fugiat.",
            "userName": "Lorem.",
            "sent": "2020-04-10T16:42:49.115-04:00",
            "delivered": "2020-04-10T16:42:49.115-04:00",
            "signed": "2020-04-10T16:42:49.115-04:00",
            "declined": "2020-04-10T16:42:49.115-04:00",
            "declineReason": "Cupidatat ad.",
            "tabStatuses": [
                {
                    "$class": "com.docusign.connect.NumberTabStatus",
                    "tabName": "Anim esse minim ex cupidatat.",
                    "tabValue": 157.406,
                    "tabType": "FirstName",
                    "status": "Elit ipsum eu ea elit.",
                    "tabLabel": "Nostrud reprehenderit aliqua id.",
                    "originalValue": "Dolore consequat nostrud occaecat do.",
                    "signed": "2020-04-10T16:42:49.115-04:00",
                    "customTabType": "Note"
                }
            ]
        }
    ],
    "customFields": [
        {
            "$class": "com.docusign.connect.CustomField",
            "name": "Nulla aliqua in ea.",
            "value": "Incididunt id sit excepteur fugiat."
        }
    ],
    "transactionId": "d73eb6b0-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:42:49.115-04:00"
}

Response Types

Type Sample JSON
com.docusign.clauses.PurchaseOrderFailureResponse
{
    "$class": "com.docusign.clauses.PurchaseOrderFailureResponse",
    "penalty": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 233.869,
        "currencyCode": "KWD"
    },
    "transactionId": "d73f04d0-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:42:49.117-04:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 128.393,
        "currencyCode": "STN"
    },
    "description": "Id Lorem labore exercitation.",
    "contract": "resource:com.docusign.clauses.PurchaseOrderFailure#8618",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#8749",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#7594",
    "deadline": "2020-04-10T16:42:49.118-04:00",
    "eventId": "d73f2be0-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:42:49.118-04: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.