function added in invoice lib to set invoice status due or inprocess