Reply
Ubiquiti Employee
Posts: 3,535
Registered: ‎12-10-2015
Kudos: 1257
Solutions: 272

New UCRM version 2.13.4 released!

Hi all,

new UCRM hotfix release is now available with several fixes and improvements.

 

Feature requests

please add a new one or upvote an existing one in  UCRM Feature Requests

 

Changelog

2.13.4 (2018-10-03)

Fixed

  • Fixed possible duplicate payments from PayPal and Stripe which could have been created in some rare cases.
  • API security fix. After removing API key, a previously authenticated API user was able to continue using API until the session expired.
  • Fixed client's API endpoints. Now, client leads are included, leads can be recognized and filtered by isLead attribute.
  • Missing attributes added to API docs.
  • Fixed Client CSV import issues when the CSV contains 0% tax.
  • Fixed possibly failing payment delete and client action.
  • Fixed surcharge quantity calculation in invoice preview in the New Service form.
  • UI fixes.

Changed

  • Elasticsearch index is created after UCRM boot which is completed faster now.
reply Hit Reply and let us know what do you think

Please let us know what you like or dislike about the latest improvements. Thank you for your feedback!

New Member
Posts: 42
Registered: ‎03-01-2018
Kudos: 3

Re: New UCRM version 2.13.4 released!

Buenos dias.
Me gustaria que por favor agregaran para pagos en payu o otros medios de pago como PSE para Colombia.
Por favor de manera Urgente.
Gracias

New Member
Posts: 42
Registered: ‎03-01-2018
Kudos: 3

Re: New UCRM version 2.13.4 released!

Adicional a ello un cliente realizo un pago via mercadoPago y el pago no se acredito en la version 2.13.4 lo que no pasaba en la version anterior.
Por favor revisar ese tema.
Gracias

New Member
Posts: 3
Registered: ‎06-07-2018
Kudos: 5

Re: New UCRM version 2.13.4 released!

Hi!

 

We are looking forward for a quick change on the payment report. 

https://community.ubnt.com/t5/UCRM-Feature-Requests/Relationship-of-payments-to-cashier/idi-p/238149...

 

Please let us know if it is possible.

 

Thanks!

 

Vero

Ubiquiti Employee
Posts: 3,535
Registered: ‎12-10-2015
Kudos: 1257
Solutions: 272

Re: New UCRM version 2.13.4 released!

@Felipe9603 please recheck the MercadoPago configuration. Go through the setup guide described in the UCRM in-app help section. Also, you might probably find some error messages in your MercadoPago account related to that payment. If so, please send them to us.

@vero_airmac yes, it's possible, this task will be scheduled in our scope soon.
New Member
Posts: 42
Registered: ‎03-01-2018
Kudos: 3

Re: New UCRM version 2.13.4 released!

[ Edited ]

 

Member
Posts: 129
Registered: ‎02-10-2013
Kudos: 142

Re: New UCRM version 2.13.4 released!

[ Edited ]

Upgrade fails due to non-unique Stripe ID index.

 

11:50:28 ERROR [console] Error thrown while running command "doctrine:migrations:migrate -e prod --no-debug --no-interaction --quiet". Message: "An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_81C977SANITIZED ON payment_stripe (stripe_id)':

SQLSTATE[23505]: Unique violation: 7 ERROR: could not create unique index "uniq_81c977SANITIZED"
DETAIL: Key (stripe_id)=(ch_1Bl9La2NI9EcpguSANITIZED) is duplicated." ["exception" => Doctrine\DBAL\Exception\UniqueConstraintViolationException { …},"command" => "doctrine:migrations:migrate -e prod --no-debug --no-interaction --quiet","message" => """ An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_81C97SANITIZED ON payment_stripe (stripe_id)':\n \n SQLSTATE[23505]: Unique violation: 7 ERROR: could not create unique index "uniq_81c9SANITIZED"\n DETAIL: Key (stripe_id)=(ch_1Bl9La2NI9EcpguSANITIZED) is duplicated. """] []

In AbstractPostgreSQLDriver.php line 67:

An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_81CSANITIZED 
B1098 ON payment_stripe (stripe_id)':

SQLSTATE[23505]: Unique violation: 7 ERROR: could not create unique index
"uniq_81c97SANITIZED"
DETAIL: Key (stripe_id)=(ch_1Bl9La2NI9EcpguSANITIZED) is duplicated.

In PDOConnection.php line 106:

SQLSTATE[23505]: Unique violation: 7 ERROR: could not create unique index
"uniq_81c9SANITIZED"
DETAIL: Key (stripe_id)=(ch_1Bl9La2NI9EcpguSANITIZED) is duplicated.

In PDOConnection.php line 104:

SQLSTATE[23505]: Unique violation: 7 ERROR: could not create unique index
"uniq_81c977SANITIZED"
DETAIL: Key (stripe_id)=(ch_1Bl9La2NI9Ecpgu8SANITIZED) is duplicated.

doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<version>]

Fri Oct 5 15:50:28 UTC 2018 --- Migration failed.
Fri Oct 5 15:50:28 UTC 2018 --- Database backup will be restored.
Fri Oct 5 15:50:28 UTC 2018 --- UCRM will be reverted to version 2.13.3

Highlighted
Ubiquiti Employee
Posts: 3,535
Registered: ‎12-10-2015
Kudos: 1257
Solutions: 272

Re: New UCRM version 2.13.4 released!

Hi @dynamicpbx

 

This issue is related to this fix in the latest version:

2.13.4 (2018-10-03)

Fixed

  • Fixed possible duplicate payments from PayPal and Stripe which could have been created in some rare cases.

 

Unfortunately, some payment from PayPal or Stripe might have been created twice in UCRM due to some rare cases when the payment gateway didn't receive the confirmation from UCRM (because of UCRM upgrade started, or the UCRM server shut down just before sending that confirmation, or any other connection reasons). As of v. 2.13.4. this is fixed and it cannot happen again but the previously created duplicate payments must be removed manually.

 

How to fix this:

Run this CLI command to find the duplicate Stripe payments in your UCRM, then delete the duplicate payment in UCRM.

 

 

sudo docker exec -t ucrm_web_app_1 bash -c 'export PGPASSWORD="${POSTGRES_PASSWORD}" && psql -d "${POSTGRES_DB}" -h "${POSTGRES_HOST}" -p "${POSTGRES_PORT}" -U "${POSTGRES_USER}" -t -c "select client_id, customer, amount, stripe_id, count(*) from payment_stripe group by client_id, customer, amount, stripe_id having count(*) > 1;"'

Then, feel free to upgrade UCRM again. If there is no longer any duplicate payment, the upgrade will succeed.

 

Sorry for these inconveniences. Please, let us know in case of any problems with the fix. 

 

New Member
Posts: 8
Registered: ‎04-05-2013

Re: New UCRM version 2.13.4 released!

What about running the following SQL statement to clean up the duplicate data?

 

  DELETE FROM payment_stripe a USING payment_stripe b WHERE a.payment_stripe_id < b.payment_stripe_id AND a.client_id = b.client_id AND a.customer = b.customer AND a.amount = b.amount AND a.stripe_id = b.stripe_id;

 

 

------------------------------------------------------------------------------------------------------------------------

 docker exec -t ucrm_web_app_1 bash -c 'export PGPASSWORD="${POSTGRES_PASSWORD}" && psql -d "${POSTGRES_DB}" -h "${POSTGRES_HOST}" -p "${POSTGRES_PORT}" -U "${POSTGRES_USER}" -t -c "select client_id, customer, amount, stripe_id, count(*) from payment_stripe group by client_id, customer, amount, stripe_id having count(*) > 1 order by client_id, customer, amount, stripe_id;"'

New Member
Posts: 8
Registered: ‎04-05-2013

Re: New UCRM version 2.13.4 released!

 docker exec -t ucrm_web_app_1 bash -c 'export PGPASSWORD="${POSTGRES_PASSWORD}" && psql -d "${POSTGRES_DB}" -h "${POSTGRES_HOST}" -p "${POSTGRES_PORT}" -U "${POSTGRES_USER}" -t -c "DELETE FROM payment_stripe a USING payment_stripe b WHERE a.payment_stripe_id < b.payment_stripe_id AND a.client_id = b.client_id AND a.customer = b.customer AND a.amount = b.amount AND a.stripe_id = b.stripe_id;"'

Ubiquiti Employee
Posts: 3,535
Registered: ‎12-10-2015
Kudos: 1257
Solutions: 272

Re: New UCRM version 2.13.4 released!

NO. Although this technically deletes the duplicate payment, it can corrupt the remaining database entities. Please, never modify your data directly in the database. Do this action manually in the UI, which always handles other entities correctly (e.g. updates the client's account balance, set an invoice as unpaid etc..)
Reply