nullable added to some fields
default integer value for payment_terms

Because sending an empty string to a integer column is not allowed with
MySQL in STRICT_TRANS_TABLE mode.
simpler short conditionnal

“Since PHP 5.3, it is possible to leave out the middle part of the
ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1
evaluates to TRUE, and expr3 otherwise.”
http://php.net/manual/en/language.operators.comparison.php
3 constants taken from config
Hardcoded urls removed in mail templates