parameters: (self)
return_statement: return ('''
              SELECT
                  (CASE WHEN move.move_type IN ('out_refund', 'in_refund') THEN -1 ELSE 1 END) * move.amount_total AS amount_total,
                  move.currency_id AS currency,
                  move.move_type,
                  move.invoice_date,
                  move.company_id
              FROM account_move move
              WHERE move.journal_id = %(journal_id)s
              AND move.state = 'draft'
              AND move.payment_state in ('not_paid', 'partial')
              AND move.move_type IN ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt');
          ''', {'journal_id': self.id})
docstring: Returns a tuple containing as its first element the SQL query used to
          gather the bills in draft state data, and the arguments
          dictionary to use to run it as its second.
docstring_summary: Returns a tuple containing as its first element the SQL query used to
          gather the bills in draft state data, and the arguments
          dictionary to use to run it as its second.
docstring_tokens: Returns a tuple containing as its first element the SQL query used to gather the bills in draft state data and the arguments dictionary to use to run it as its second .
function: def _get_draft_bills_query(self):
          """
          Returns a tuple containing as its first element the SQL query used to
          gather the bills in draft state data, and the arguments
          dictionary to use to run it as its second.
          """
          return ('''
              SELECT
                  (CASE WHEN move.move_type IN ('out_refund', 'in_refund') THEN -1 ELSE 1 END) * move.amount_total AS amount_total,
                  move.currency_id AS currency,
                  move.move_type,
                  move.invoice_date,
                  move.company_id
              FROM account_move move
              WHERE move.journal_id = %(journal_id)s
              AND move.state = 'draft'
              AND move.payment_state in ('not_paid', 'partial')
              AND move.move_type IN ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt');
          ''', {'journal_id': self.id})
function_tokens: def _get_draft_bills_query ( self ) : return ( '''
              SELECT
                  (CASE WHEN move.move_type IN ('out_refund', 'in_refund') THEN -1 ELSE 1 END) * move.amount_total AS amount_total,
                  move.currency_id AS currency,
                  move.move_type,
                  move.invoice_date,
                  move.company_id
              FROM account_move move
              WHERE move.journal_id = %(journal_id)s
              AND move.state = 'draft'
              AND move.payment_state in ('not_paid', 'partial')
              AND move.move_type IN ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt');
          ''' , { 'journal_id' : self . id } )