Skip to content

Commit

Permalink
fix(cash): remove fault SQL exception handlers
Browse files Browse the repository at this point in the history
This commit removes problematic SQL exception handlers from the
CalculateCashInvoiceBalances() stored procedure.  All exception handling
should be done with the `db.transaction()` framework ... having these
extra handler in the SQL code led to confusing error messages when
strict mode throws exceptions.

With these exceptions removed, and the Vanga database re-created, the
issues posting USD cash payments disappears.

Closes Third-Culture-Software#1445.
  • Loading branch information
Jonathan Niles committed Apr 10, 2017
1 parent f15a5cf commit 0cedf89
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions server/models/procedures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,6 @@ BEGIN
DECLARE enterpriseCurrencyId INT;
DECLARE currentExchangeRate DECIMAL(19,4);

DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK;
DECLARE EXIT HANDLER FOR SQLWARNING ROLLBACK;

-- copy cash payment values into working variables
SELECT cash.date, cash.currency_id, enterprise.id, enterprise.currency_id, cash.debtor_uuid
INTO cashDate, cashCurrencyId, cashEnterpriseId, enterpriseCurrencyId, cashDebtorUuid
Expand Down

0 comments on commit 0cedf89

Please sign in to comment.