{% extends 'base.html' %} {% load humanize %} {% block title %}{{ contact.name }} - 3ncount{% endblock %} {% block page_title %}{{ contact.name }}{% endblock %} {% block page_actions %}
Edit Delete
{% endblock %} {% block content %}

Contact Information

{{ contact.name }}

{% if contact.contact_type == 'CUSTOMER' %} Customer {% elif contact.contact_type == 'SUPPLIER' %} Supplier {% else %} Both {% endif %}
{% if contact.email %} {% endif %} {% if contact.phone %} {% endif %} {% if contact.address %}
Address
{{ contact.address|linebreaks }}
{% endif %}

{% if contact.business_registration_no %}
SSM Registration No.
{{ contact.business_registration_no }}
{% endif %} {% if contact.tax_id %}
Tax ID
{{ contact.tax_id }}
{% endif %}
SST Registered
{% if contact.sst_registered %} Yes {% else %} No {% endif %}
{% if contact.notes %}
Notes
{{ contact.notes|linebreaks }}
{% endif %}

Financial Summary

{% if contact.contact_type == 'CUSTOMER' or contact.contact_type == 'BOTH' %}
Total Invoiced
RM {{ total_invoiced|floatformat:2|intcomma }}
Total Received
RM {{ total_received|floatformat:2|intcomma }}
{% endif %} {% if contact.contact_type == 'SUPPLIER' or contact.contact_type == 'BOTH' %}
Total Billed
RM {{ total_billed|floatformat:2|intcomma }}
Total Paid
RM {{ total_paid|floatformat:2|intcomma }}
{% endif %}
Direct Transactions
RM {{ total_transactions|floatformat:2|intcomma }}
Outstanding Balance
RM {{ outstanding|floatformat:2|intcomma }}

Direct Transactions

New Transaction
{% for transaction in transactions %} {% empty %} {% endfor %}
Date Reference Type Description Amount Status Actions
{{ transaction.date|date:"d/m/Y" }} {{ transaction.reference_no }} {% if transaction.transaction_type == 'INCOME' %} Income {% else %} Expense {% endif %} {{ transaction.description|truncatewords:8 }} RM {{ transaction.amount|floatformat:2|intcomma }} {% if transaction.is_paid %} Paid {% else %} Unpaid {% endif %}

No direct transactions yet.

Create First Transaction
{% if contact.contact_type == 'CUSTOMER' or contact.contact_type == 'BOTH' %}

Sales Invoices

New Invoice
{% for invoice in invoices %} {% empty %} {% endfor %}
Invoice # Date Due Date Total Paid Balance Status Actions
{{ invoice.invoice_number }} {{ invoice.invoice_date|date:"d/m/Y" }} {{ invoice.due_date|date:"d/m/Y" }} RM {{ invoice.total|floatformat:2|intcomma }} RM {{ invoice.get_amount_paid|floatformat:2|intcomma }} RM {{ invoice.get_balance_due|floatformat:2|intcomma }} {% if invoice.status == 'PAID' %} Paid {% elif invoice.status == 'PARTIAL' %} Partial {% elif invoice.status == 'OVERDUE' %} Overdue {% else %} {{ invoice.get_status_display }} {% endif %}

No invoices yet.

Create First Invoice
{% endif %} {% if contact.contact_type == 'SUPPLIER' or contact.contact_type == 'BOTH' %}

Purchase Bills

New Bill
{% for bill in bills %} {% empty %} {% endfor %}
Bill # Date Due Date Total Paid Balance Status Actions
{{ bill.bill_number }} {{ bill.bill_date|date:"d/m/Y" }} {{ bill.due_date|date:"d/m/Y" }} RM {{ bill.total|floatformat:2|intcomma }} RM {{ bill.get_amount_paid|floatformat:2|intcomma }} RM {{ bill.get_balance_due|floatformat:2|intcomma }} {% if bill.status == 'PAID' %} Paid {% elif bill.status == 'PARTIAL' %} Partial {% elif bill.status == 'OVERDUE' %} Overdue {% else %} {{ bill.get_status_display }} {% endif %}

No bills yet.

Create First Bill
{% endif %}

All Payment Records

Payments received from invoices and payments made for bills

{% for payment in all_payments %} {% empty %} {% endfor %}
Receipt # Date Document Type Method Amount Reference Actions
{{ payment.receipt_number }} {{ payment.payment_date|date:"d/m/Y" }} {% if payment.invoice %} {{ payment.invoice.invoice_number }} {% elif payment.bill %} {{ payment.bill.bill_number }} {% endif %} {% if payment.invoice %} Received {% else %} Made {% endif %} {{ payment.get_payment_method_display }} RM {{ payment.amount|floatformat:2|intcomma }} {{ payment.reference_number|default:"—" }}

No payment records yet.

{% endblock %}