(self)
return optical_amount
Prepare amount string for ISR optical line
Prepare amount string for ISR optical line
Prepare amount string for ISR optical line
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
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