Automatic credit note creation