parameters: (self)
return_statement: return optical_amount
docstring: Prepare amount string for ISR optical line
docstring_summary: Prepare amount string for ISR optical line
docstring_tokens: Prepare amount string for ISR optical line
function: def _get_l10n_ch_isr_optical_amount(self):
          """Prepare amount string for ISR optical line"""
          self.ensure_one()
          currency_code = None
          if self.currency_id.name == 'CHF':
              currency_code = '01'
          elif self.currency_id.name == 'EUR':
              currency_code = '03'
          units, cents = float_split_str(self.amount_residual, 2)
          amount_to_display = units + cents
          amount_ref = amount_to_display.zfill(10)
          optical_amount = currency_code + amount_ref
          optical_amount = mod10r(optical_amount)
          return optical_amount
function_tokens: def _get_l10n_ch_isr_optical_amount ( self ) : self . ensure_one ( ) currency_code = None if self . currency_id . name == 'CHF' : currency_code = '01' elif self . currency_id . name == 'EUR' : currency_code = '03' units , cents = float_split_str ( self . amount_residual , 2 ) amount_to_display = units + cents amount_ref = amount_to_display . zfill ( 10 ) optical_amount = currency_code + amount_ref optical_amount = mod10r ( optical_amount ) return optical_amount