Database Script updated...
Additions:
LOT OF TRIGGERS...
Triggers that do Everything related to restrictions of serials, invoices and others.
For more info read comments inside .sql