add JS function for installment and cancel an item