Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12717

Eca createPaymentFromOrder failed if payment already exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 22.01.01
    • 22.01.01
    • accounting
    • None

    Description

      Groovy migration

      Before migration  was

       

      <if-not-empty field="orderPaymentPrefAndPayments">
        <log level="info" message="Payment not created for order ${orderHeader.orderId}, at least a single payment already exists"/>
        <return/>
      </if-not-empty> )

       

      After migration is

       

      if (from("OrderPaymentPrefAndPayment")
              .where([EntityCondition.makeCondition("orderId", orderHeader.orderId),
                      EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")])
              .queryCount() > 1) {
          return error("Payment not created for order ${orderHeader.orderId}, at least a single payment already exists")
      }
      

      queryCount() > 1 had to be queryCount() > 0
      return error had to be return failure

       

      Attachments

        1. OFBIZ-12717.patch
          1.0 kB
          Marie-Aline Pantais

        Activity

          People

            jleroux Jacques Le Roux
            malinepantais Marie-Aline Pantais
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: