#NEWLINE# def is_fully_paid( self ) : #NEWLINE# #INDENT# total_paid = sum ( [ payment . total for payment in self . payments . filter ( status = 'confirmed' ) ] , Decimal ( ) ) #NEWLINE# total = self . get_total ( ) #NEWLINE# return ( total_paid >= total . gross )