forked from coral-erm/coral
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request coral-erm#503 from jeffnm/Issue_470_export_resourc…
…es_bug Issue 470 export resources bug
- Loading branch information
Showing
10 changed files
with
155 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
DROP PROCEDURE IF EXISTS add_missing_taxfield; | ||
|
||
CREATE DEFINER=CURRENT_USER PROCEDURE add_missing_taxfield(missing_taxfield TEXT charset utf8) | ||
BEGIN | ||
DECLARE colName TEXT; | ||
SELECT column_name INTO colName | ||
FROM information_schema.columns | ||
WHERE table_name='ResourcePayment' | ||
AND column_name=missing_taxfield; | ||
|
||
IF colName is null THEN | ||
SET @stmt=CONCAT('ALTER TABLE `ResourcePayment` ADD `',missing_taxfield,'` int(10) unsigned default NULL'); | ||
PREPARE stmt FROM @stmt; | ||
EXECUTE stmt; | ||
DEALLOCATE PREPARE stmt; | ||
END IF; | ||
END; | ||
|
||
CALL add_missing_taxfield('priceTaxExcluded'); | ||
CALL add_missing_taxfield('taxRate'); | ||
CALL add_missing_taxfield('priceTaxIncluded'); | ||
DROP PROCEDURE add_missing_taxfield; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters