thirtybees / custompayments

Custom payment methods
Academic Free License v3.0
4 stars 8 forks source link

Carrier and group restriction don't work #4

Closed getdatakick closed 6 years ago

getdatakick commented 6 years ago

This pull request closes issue #3

There are two changes:

  1. added custom payment primary key to joins to custom_payment_method_carrier and custom_payment_method_group tables. This fixes the bug

  2. I replaced group by with distinct. The group by expression was not 100% correct and it fails under strict sql mode: only_full_group_by. This is not a problem for thirtybees because it uses forgiving sql mode, but it should be fixed anyway

    ERROR 1055 (42000): Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'thirtybees.cpml.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by