Example #1
0
    def status_financeiro(obj):
        sf = sit_finan_fornecedor(obj.pk)
        cf = cor_finan()

        if sf[0] == 'I':
            return format_html('<span style="color: {0};"><b>{1}</b></span>', cf[2][0], sf[1])
        else:
            return format_html('<span style="color: {0};"><b>{1}</b></span>', cf[1][0], sf[1])
Example #2
0
    def status_financeiro(obj):
        url = reverse('admin:pessoal_cliente_changelist')
        sf = sit_finan_cliente(obj.pk)
        cf = cor_finan()

        if sf[0] == 'I':
            return format_html('<a href="{0}detalhes_financeiros/{1}" style="text-decoration:none;"><span style="color: {2};"><b>{3}</b></span></a>', url, obj.pk, cf[2][0], sf[1])
        else:
            return format_html('<a href="{0}detalhes_financeiros/{1}" style=" text-decoration:none;"><span style="color: {2};"><b>{3}</b></span></a>', url, obj.pk, cf[1][0], sf[1])
Example #3
0
    def status_financeiro(obj):
        sf = sit_finan_fornecedor(obj.pk)
        cf = cor_finan()

        if sf[0] == 'I':
            return format_html('<span style="color: {0};"><b>{1}</b></span>',
                               cf[2][0], sf[1])
        else:
            return format_html('<span style="color: {0};"><b>{1}</b></span>',
                               cf[1][0], sf[1])
Example #4
0
    def status_financeiro(obj):
        url = reverse('admin:pessoal_cliente_changelist')
        sf = sit_finan_cliente(obj.pk)
        cf = cor_finan()

        if sf[0] == 'I':
            return format_html(
                '<a href="{0}detalhes_financeiros/{1}" style="text-decoration:none;"><span style="color: {2};"><b>{3}</b></span></a>',
                url, obj.pk, cf[2][0], sf[1])
        else:
            return format_html(
                '<a href="{0}detalhes_financeiros/{1}" style=" text-decoration:none;"><span style="color: {2};"><b>{3}</b></span></a>',
                url, obj.pk, cf[1][0], sf[1])