Fixed #4628 and #4590 - Illegal mix of collations for operation error when searching on some languages

This commit is contained in:
snipe 2018-01-20 03:08:27 -08:00
parent dfb2b9b569
commit 86c0194e9a
4 changed files with 3 additions and 7 deletions

View file

@ -181,8 +181,7 @@ class Accessory extends SnipeModel
})->orWhere('accessories.name', 'LIKE', '%'.$search.'%')
->orWhere('accessories.model_number', 'LIKE', '%'.$search.'%')
->orWhere('accessories.order_number', 'LIKE', '%'.$search.'%')
->orWhere('accessories.purchase_cost', 'LIKE', '%'.$search.'%')
->orWhere('accessories.purchase_date', 'LIKE', '%'.$search.'%');
->orWhere('accessories.purchase_cost', '=', $search);
}
});
}

View file

@ -827,7 +827,6 @@ class Asset extends Depreciable
->orWhere('assets.asset_tag', 'LIKE', '%'.$search.'%')
->orWhere('assets.serial', 'LIKE', '%'.$search.'%')
->orWhere('assets.order_number', 'LIKE', '%'.$search.'%')
->orWhere('assets.purchase_date', 'LIKE', '%'.$search.'%')
->orWhere('assets.purchase_cost', 'LIKE', '%'.$search.'%')
->orWhere('assets.notes', 'LIKE', '%'.$search.'%');
}

View file

@ -144,8 +144,7 @@ class Component extends SnipeModel
})->orWhere('components.name', 'LIKE', '%'.$search.'%')
->orWhere('components.order_number', 'LIKE', '%'.$search.'%')
->orWhere('components.serial', 'LIKE', '%'.$search.'%')
->orWhere('components.purchase_cost', 'LIKE', '%'.$search.'%')
->orWhere('components.purchase_date', 'LIKE', '%'.$search.'%');
->orWhere('components.purchase_cost', 'LIKE', '%'.$search.'%');
}
});
}

View file

@ -186,8 +186,7 @@ class Consumable extends SnipeModel
});
})->orWhere('consumables.name', 'LIKE', '%'.$search.'%')
->orWhere('consumables.order_number', 'LIKE', '%'.$search.'%')
->orWhere('consumables.purchase_cost', 'LIKE', '%'.$search.'%')
->orWhere('consumables.purchase_date', 'LIKE', '%'.$search.'%');
->orWhere('consumables.purchase_cost', 'LIKE', '%'.$search.'%');
}
});
}