Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #112 from andersdd/22490

[#22490] Fix error in api.vendor UPDATE rule for default account
  • Loading branch information...
commit 692cb01ba83a636231ab53d591dc8d8ad3bee1db 2 parents 5397b4b + 9642d1f
@gpazo gpazo authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 dbscripts/api/views/vendor.sql
View
6 dbscripts/api/views/vendor.sql
@@ -300,9 +300,9 @@ UPDATE vendinfo SET
NEW.address_change ),
vend_match=NEW.matching_vo_po_amounts,
vend_taxzone_id=getTaxZoneId(NEW.default_tax_zone),
- vend_accnt_id=COALESCE(getGLAccntId(NEW.default_dist_gl_account), -1),
- vend_expcat_id=COALESCE(getExpCatId(NEW.default_dist_expense_category), -1),
- vend_tax_id=COALESCE(getTaxId(NEW.default_dist_tax_code), -1)
+ vend_accnt_id=COALESCE(getGLAccntId(NULLIF(NEW.default_dist_gl_account, 'N/A')), -1),
+ vend_expcat_id=COALESCE(getExpCatId(NULLIF(NEW.default_dist_expense_category, 'N/A')), -1),
+ vend_tax_id=COALESCE(getTaxId(NULLIF(NEW.default_dist_tax_code, 'N/A')), -1)
WHERE vend_id=getVendId(OLD.vendor_number);
CREATE OR REPLACE RULE "_DELETE" AS
Please sign in to comment.
Something went wrong with that request. Please try again.