def get_address_street_component(self): if self.street_number and self.street_name: from htk.utils.enums import enum_to_str unit_base = '%s %s' if self.unit_type == AddressUnitType.HASH.value: unit_type = '#' unit_base = '%s%s' elif self.unit_type > 0: unit_type = enum_to_str(AddressUnitType(self.unit_type)) else: unit_type = '' street_component = ' '.join( filter( lambda x: x.strip() != '', [ self.street_number, self.street_name, unit_base % (unit_type, self.unit,), ] ) ) else: street_component = self.street return street_component
def get_address_street_component(self): if self.street_number and self.street_name: from htk.utils.enums import enum_to_str unit_type = enum_to_str(AddressUnitType(self.unit_type)) if self.unit_type > 0 else '' street_component = ' '.join( filter( lambda x: x.strip() != '', [ self.street_number, self.street_name, unit_type, self.unit, ] ) ) else: street_component = self.street return street_component
def get_address_street_component(self): if self.street_number and self.street_name: from htk.utils.enums import enum_to_str unit_base = '%s %s' if self.unit_type == AddressUnitType.HASH.value: unit_type = '#' unit_base = '%s%s' elif self.unit_type > 0: unit_type = enum_to_str(AddressUnitType(self.unit_type)) else: unit_type = '' street_component = ' '.join( filter(lambda x: x.strip() != '', [ self.street_number, self.street_name, unit_base % ( unit_type, self.unit, ), ])) else: street_component = self.street return street_component
def get_payment_terms(self): from htk.apps.cpq.enums import InvoicePaymentTerm invoice_payment_term = InvoicePaymentTerm(self.payment_terms) str_value = enum_to_str(invoice_payment_term) return str_value
def get_invoice_type(self): from htk.apps.cpq.enums import InvoiceType invoice_type = InvoiceType(self.invoice_type) str_value = enum_to_str(invoice_type) return str_value
def get_payment_terms(self): # HTK Imports from htk.apps.cpq.enums import InvoicePaymentTerm invoice_payment_term = InvoicePaymentTerm(self.payment_terms) str_value = enum_to_str(invoice_payment_term) return str_value
def get_invoice_type(self): # HTK Imports from htk.apps.cpq.enums import InvoiceType invoice_type = InvoiceType(self.invoice_type) str_value = enum_to_str(invoice_type) return str_value