Commit 06da89fd authored by Jack Stupple's avatar Jack Stupple

case insentive modifier categories

parent a3046ab6
......@@ -80,10 +80,10 @@ class CharacterMigration extends Migration
$amount = $_modifier['amount'];
$income_outgoing = 'outgoing';
if ($_category === 'Salary') {
if (strtolower($_category) === 'salary') {
$income_outgoing = 'income';
} else if (strpos($_category, 'Other') !== false) {
if ($_category == 'Other-Income') {
} else if (strpos(strtolower($_category), 'other') !== false) {
if (strtolower($_category) === 'other-income') {
$income_outgoing = 'income';
} else {
$income_outgoing = 'outgoing';
......@@ -139,16 +139,16 @@ class CharacterMigration extends Migration
$modifier->model_id = $answer->id;
$income_outgoing = 'outgoing';
if ($_modifier['category'] == 'Salary') {
if (strtolower($_modifier['category']) === 'salary') {
$income_outgoing = 'income';
} else if (strpos($_modifier['category'], 'Other') !== false) {
if ($_modifier['category'] === 'Other-Income') {
} else if (strpos(strtolower($_modifier['category']), 'other') !== false) {
if (strtolower($_modifier['category']) === 'other-income') {
$income_outgoing = 'income';
} else {
$income_outgoing = 'outgoing';
}
$_modifier['category'] = 'Other';
$_modifier['category'] = 'other';
}
$category = $this->getModifierCategory($_modifier['category'], $income_outgoing);
......@@ -212,10 +212,10 @@ class CharacterMigration extends Migration
$modifier->model_id = $roundup->id;
$income_outgoing = 'outgoing';
if ($_modifier['category'] === 'Salary') {
if (strtolower($_modifier['category']) === 'salary') {
$income_outgoing = 'income';
} else if (strpos($_modifier['category'], 'Other') !== false) {
if ($_modifier['category'] === 'Other-Income') {
} else if (strpos(strtolower($_modifier['category']), 'other') !== false) {
if (strtolower($_modifier['category']) === 'other-income') {
$income_outgoing = 'income';
} else {
$income_outgoing = 'outgoing';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment