Fixed an issue with semantic check and also changed how the database accepts
amount of payment or debt.

Signed-off-by: yongzhez <yongzhe.zheng1@gmail.com>