def inserir_informacoes_pj(self, cnpj, ie):
        if cnpj:
            txt = ObjectValue(attribute_name='pessoa_jur_info.format_cnpj',
                              top=0.3 * cm,
                              left=8.1 * cm,
                              width=4 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT_BOLD,
                'fontSize': 10,
                'leading': 10
            }
            self.elements.append(txt)

        if ie:

            txt = ObjectValue(attribute_name='pessoa_jur_info.format_ie',
                              top=0.3 * cm,
                              left=13 * cm,
                              width=6.4 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT_BOLD,
                'fontSize': 10,
                'leading': 10
            }
            self.elements.append(txt)
示例#2
0
    def inserir_informacoes_pf(self):
        txt = ObjectValue(
            attribute_name='fornecedor.pessoa_fis_info.format_cpf',
            top=0.3 * cm,
            left=8.1 * cm,
            width=4 * cm,
            height=0.5 * cm)
        txt.style = {
            'fontName': REPORT_FONT_BOLD,
            'fontSize': 10,
            'leading': 10
        }
        self.elements.append(txt)

        txt = ObjectValue(
            attribute_name='fornecedor.pessoa_fis_info.format_rg',
            top=0.3 * cm,
            left=13 * cm,
            width=6.4 * cm,
            height=0.5 * cm)
        txt.style = {
            'fontName': REPORT_FONT_BOLD,
            'fontSize': 10,
            'leading': 10
        }
        self.elements.append(txt)
    def inserir_informacoes_endereco(self, endereco, municipio, uf, cep):
        if endereco:
            self.ender_info = True
            txt = ObjectValue(attribute_name='endereco_padrao.format_endereco',
                              display_format='Endereço: %s',
                              top=1.1 * cm,
                              left=0.3 * cm,
                              width=19.4 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT,
                'fontSize': 10,
                'leading': 10
            }
            self.elements.append(txt)

        if municipio:
            txt = ObjectValue(attribute_name='endereco_padrao.municipio',
                              display_format='Cidade: %s',
                              top=1.6 * cm,
                              left=0.3 * cm,
                              width=8 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT,
                'fontSize': 10,
                'leading': 10
            }
            self.elements.append(txt)

        if uf:
            txt = ObjectValue(attribute_name='endereco_padrao.uf',
                              display_format='UF: %s',
                              top=1.6 * cm,
                              left=8.1 * cm,
                              width=4 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT,
                'fontSize': 10,
                'leading': 10
            }
            self.elements.append(txt)

        if cep:
            txt = ObjectValue(attribute_name='endereco_padrao.cep',
                              display_format='CEP: %s',
                              top=1.6 * cm,
                              left=13 * cm,
                              width=19.4 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT,
                'fontSize': 10,
                'leading': 10
            }
            self.elements.append(txt)
 def inserir_data_entrega(self, data_entrega):
     if data_entrega:
         txt = ObjectValue(attribute_name='format_data_entrega', display_format='Data de entrega: %s',
                           top=2.05 * cm, left=0 * cm, width=19.4 * cm, height=0.5 * cm)
         txt.style = {'fontName': REPORT_FONT_BOLD,
                      'fontSize': 9, 'alignment': TA_CENTER, 'leading': 9}
         self.elements.append(txt)
 def inserir_data_emissao(self, data_emissao):
     if data_emissao:
         txt = ObjectValue(attribute_name='format_data_emissao', display_format='Data: %s',
                           top=1.45 * cm, left=0 * cm, width=19.4 * cm, height=0.5 * cm)
     else:
         txt = SystemField(expression='Data: %(now:%d/%m/%Y)s',
                           top=1.45 * cm, left=0 * cm, width=19.4 * cm, height=0.5 * cm)
     txt.style = {'fontName': REPORT_FONT_BOLD,
                  'fontSize': 9, 'alignment': TA_CENTER, 'leading': 9}
     self.elements.append(txt)
    def inserir_informacoes_email(self):
        if not self.ender_info:
            top = 1.1 * cm
        else:
            top = 2.1 * cm

        txt = ObjectValue(attribute_name='cliente.email_padrao.email', display_format='Email: %s',
                          top=top, left=8.1 * cm, width=11.3 * cm, height=0.5 * cm)
        txt.style = {'fontName': REPORT_FONT, 'fontSize': 10, 'leading': 10}
        self.elements.append(txt)
    def __init__(self):
        super(DadosCliente, self).__init__()
        self.ender_info = False
        self.elements = []
        txt = ObjectValue(attribute_name='cliente.nome_razao_social',
                          top=0.3 * cm, left=0.3 * cm, width=8 * cm, height=0.5 * cm)
        txt.style = {'fontName': REPORT_FONT_BOLD,
                     'fontSize': 12, 'leading': 12}
        self.elements.append(txt)

        self.height = 2.7 * cm
        def __init__(self):
            super(DadosPagamento.band_detail, self).__init__()

            txt = ObjectValue(attribute_name='indice_parcela',
                              top=0 * cm, left=0 * cm, width=4 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='format_vencimento', top=0 *
                              cm, left=4.1 * cm, width=4.1 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='format_valor_parcela',
                              top=0 * cm, left=8.3 * cm, width=4.5 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)

            self.height = 0.6 * cm
示例#9
0
    def inserir_informacoes_telefone(self):
        if not self.ender_info:
            top = 1.1 * cm
        else:
            top = 2.1 * cm

        txt = ObjectValue(attribute_name='fornecedor.telefone_padrao.telefone',
                          display_format='Tel: %s',
                          top=top,
                          left=0.3 * cm,
                          width=8 * cm,
                          height=0.5 * cm)
        txt.style = {'fontName': REPORT_FONT, 'fontSize': 10, 'leading': 10}
        self.elements.append(txt)
    def inserir_nome_razao_social(self, nome_razao_social):
        if nome_razao_social:
            txt = ObjectValue(attribute_name='nome_razao_social',
                              top=0.3 * cm,
                              left=0.3 * cm,
                              width=8 * cm,
                              height=0.5 * cm)
            txt.style = {
                'fontName': REPORT_FONT_BOLD,
                'fontSize': 12,
                'leading': 12
            }
            self.elements.append(txt)

            self.height = 2.7 * cm
示例#11
0
    def inserir_vendedor(self):
        self.elements.append(
            Line(top=2.5 * cm,
                 bottom=2.5 * cm,
                 left=0 * cm,
                 right=19.4 * cm,
                 stroke_width=0.3))

        txt = ObjectValue(attribute_name='vendedor',
                          display_format='Vendedor: %s',
                          top=2.6 * cm,
                          left=0.5 * cm,
                          width=19.4 * cm,
                          height=2 * cm)
        txt.style = {'fontName': REPORT_FONT, 'fontSize': 9, 'leading': 9}
        self.elements.append(txt)
        def __init__(self):
            super(DadosProdutos.band_detail, self).__init__()

            txt = ObjectValue(attribute_name='produto.codigo', top=0 *
                              cm, left=0 * cm, width=2.1 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='produto.descricao', top=0 *
                              cm, left=2.1 * cm, width=4.8 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='produto.format_unidade',
                              top=0 * cm, left=6.9 * cm, width=1.5 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='format_quantidade', top=0 *
                              cm, left=8.4 * cm, width=1.9 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='format_valor_unit', top=0 *
                              cm, left=10.3 * cm, width=3.5 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='format_desconto', top=0 *
                              cm, left=13.8 * cm, width=2.4 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)
            txt = ObjectValue(attribute_name='format_total', top=0 *
                              cm, left=16.2 * cm, width=3.2 * cm, height=0.5 * cm)
            txt.style = {'fontName': REPORT_FONT, 'fontSize': 9,
                         'alignment': TA_CENTER, 'leading': 9}
            self.elements.append(txt)