SQL changes for bill creation