I read that in order to change currency we need to delete all invoices. How do we do that? Are there any other ways to change the base currency? /Magnus
In fact, that is not necessary to delete all invoices. You can edit file amember/library/Am/Form/Standard.php and replace lines Code: if (Am_Di::getInstance()->db->selectCell("SELECT COUNT(*) FROM ?_invoice")) $currency->toggleFrozen(true); to Code: // if (Am_Di::getInstance()->db->selectCell("SELECT COUNT(*) FROM ?_invoice")) // $currency->toggleFrozen(true); then edit box will be unlocked and you will be able to change currency. It is blocked as changing currency in live system may (and will) have weak side effects. However, if your system has nothing but few test invoices, it is not a problem at all.
what effect does that have on invoices though, in case it's done on a live site? for example, I had amember set to one currency, imported all the users/invoices from v3, then I realized I needed to change the currency to the correct one. catastrophic consequences?
I am in Version 4.0 I do not see a Standard.php file in the directory amember/library/Am/Form/ even dropping one in has no effect,
I'm not sure that commenting out the lines works so much in the later versions... however, changing the code from 'true' to 'false' works - you can then reset the base currency and then revert back to 'true'. Change this: Code: if (Am_Di::getInstance()->db->selectCell("SELECT COUNT(*) FROM ?_invoice")) { $currency->toggleFrozen(true); To this: Code: if (Am_Di::getInstance()->db->selectCell("SELECT COUNT(*) FROM ?_invoice")) { $currency->toggleFrozen(false); Then make your currency change, and then revert back.