Set Price Quote as INVOICED

Hi,
Is there a way to change a price quote status to INVOICED? using code, not manually.