Code cleanup calculating price total

One time initialization of totals with currency keys and removed the if()s from the loop.
Method comment and argument types
Different way of generating codes

The codes generated with uniqid() were too similar to each other, even if they were unique. I wanted more entropy.
Better table cell padding