NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


{% load mathfilters %}
{% load custom_tags %}
{% load humanize %}



{% block dashboard_content %}



<style>
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
}
th {
background-color: #f2f2f2;
text-align: left;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #f1f1f1;
}
</style>

<h2>Sales Outstanding Report ({{ selected_party.party_name }})</h2>

<table>
<thead>
<tr>
<th>Branch</th>
<th>Job No.</th>
<th>Job Type</th>
<th>E-Bill No.</th>
<th>Date</th>
<th>Customer Invoice No.</th>
<th>Party Branch</th>
<th>Invoice Amount</th>
<th>Rec. Amount</th>
<th>Balance Amount</th>
<th>Due Days</th>
</tr>
</thead>
<tbody>
{% for i in advance_amount %}
<tr style="background-color:#c6e0b4;">
<td></td>
<td>Advance Amount / On Account</td>
<td></td>
<td>{{ i.voucher_no }}</td>
<td>{{ i.voucher_date|date:"Y-m-d" }}</td>
<td></td>
<td>{{ i.party_address.branch }}</td>
<td align="right" data-order="0">-</td>
<td align="right" data-order="{{ i.advance_amount|floatformat:2 }}">
{{ i.advance_amount|floatformat:0|floatformat:2 }}
</td>
<td align="right" data-order="-{{ i.advance_amount|floatformat:2 }}">
{{ i.advance_amount|floatformat:0|floatformat:2 }}
</td>
<td>0</td>
</tr>
{% endfor %}

{% for i in journals %}
{% if i.dr_cr == 'Credit' %}
<tr style="background-color:#c6e0b4;">
<td></td>
<td>JOURNAL ADJUSTED</td>
<td></td>
<td>{{ i.journal_entry.id }}</td>
<td>{{ i.journal_entry.date|date:"Y-m-d" }}</td>
<td></td>
<td></td>
<td align="right" data-order="0">-</td>
<td align="right" data-order="{{ i.amount|floatformat:2 }}">
{{ i.amount|floatformat:0|floatformat:2 }}
</td>
<td align="right" data-order="-{{ i.amount|floatformat:2 }}">
{{ i.amount|floatformat:0|floatformat:2 }}
</td>
<td>0</td>
</tr>
{% endif %}
{% endfor %}

{% for i in credit_notes %}
<tr style="background-color:#ffe699;">
<td>{{ i.company_type.branch_name }}</td>
<td>{{ i.job_no.job_no }}</td>
<td>{{ i.job_no.module }}</td>
<td>{{ i.final_invoice_no }}</td>
<td>{{ i.einvoice_date|date:"Y-m-d" }}</td>
<td></td>
<td>{{ i.bill_to_address.branch }}</td>
<td align="right" data-order="0">-</td>
<td align="right" data-order="{{ i.net_amount|floatformat:2 }}">
{{ i.net_amount|floatformat:0|floatformat:2 }}
</td>
<td align="right" data-order="-{{ i.net_amount|floatformat:2 }}">
{{ i.net_amount|floatformat:0|floatformat:2 }}
</td>
<td>0</td>
</tr>
{% endfor %}

{% for data in invoices_list %}
{% if data.invoice.due_date %}
{% if data.invoice.due_date|days_until <= 0 and data.invoice.pending_amount > 0 %}
<tr class="overdue_column">
{% else %}
<tr>
{% endif %}
{% else %}
<tr>
{% endif %}

<td style="color: black!important;">
<input type="hidden" id="party_index_{{ forloop.counter }}" name="index_{{ forloop.counter }}" value="{{ data.id }}">
{{ data.invoice.company_type.branch_name }}
</td>
<td style="color: black!important;">{{ data.invoice.job_no.job_no }}</td>
<td style="color: black!important;">{{ data.invoice.job_no.module }}</td>
{% if data.invoice.final_invoice_no %}
<td style="color: black!important;">
<a style="color: black!important;" href="{% url 'dashboard:recievable_invoice_pdf' id=data.invoice.id %}" target="_blank">
{{ data.invoice.final_invoice_no }}
</a>
</td>
{% else %}
<td style="color: black!important;">
<a style="color: black!important;" href="{% url 'dashboard:recievable_invoice_pdf' id=data.invoice.id %}" target="_blank">
{{ data.invoice.invoice_no }}
</a>
</td>
{% endif %}
<td style="color: black!important;" align="center">{{ data.invoice.einvoice_date|date:'Y-m-d' }}</td>
<td style="color: black!important;">
{% for i in data.invoice.job_no.job_invoice.all %}
{{ i.invoice_no }},
{% endfor %}
</td>
<td style="color: black!important;">{{ data.invoice.bill_to_address.branch }}</td>
<td style="color: black!important;" align="right" data-order="{{ data.net_amount|floatformat:2 }}">
{{ data.net_amount|floatformat:0|floatformat:2 }}
</td>
<td align="right" data-order="{{ data.recieved_amount|floatformat:2 }}">
<!-- Button trigger modal -->
<a href="#" style="color: black!important;" data-toggle="modal" data-target="#viewModal{{ forloop.counter }}">
{{ data.recieved_amount|floatformat:0|floatformat:2 }}
</a>
</td>
<td style="color: black!important;" align="right" data-order="{{ data.balance_amount|floatformat:2 }}">
{{ data.balance_amount|floatformat:0|floatformat:2 }}
</td>
<td style="color: black!important;">
{% if data.invoice.due_date %}
{{ data.invoice.due_date|days_until }}
{% else %}
0
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="6"></td>
<td class="text-right">Total</td>
<td class="text-right"></td>
<td class="text-right"></td>
<td class="text-right"></td>
</tr>
</tfoot>
</table>
{% endblock %}

{% block js %}
<script src="https://cdn.datatables.net/plug-ins/1.13.4/api/sum().js"></script>

<script>
var selected_ids = [];
$(document).ready(function () {
jQuery.fn.dataTable.Api.register('sum()', function () {
return this.flatten().reduce(function (a, b) {
var x = parseFloat(a);
var y = parseFloat($(b).attr('data-order'));
return parseFloat(x + y).toFixed(2);
}, 0);
});

let table = new DataTable('#invoice_table', {
dom: 'BQlfrtip',
order: [[4, 'desc']],
columnDefs: [
{ "type": "date", "targets": [4], "displayFormat": 'dddd D MMMM YYYY' }
],
buttons: [
{
extend: 'collection',
text: 'Export',
buttons: [
{
extend: 'copy',
footer: true,
header: true,
exportOptions: {
format: {
body: function (data, row, column, node) {
data = data.replace(/&gt;/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
.replace(/&#163;/g, '£')
.replace(/&#39;/g, "'")
.replace(/&#10;/g, 'n');
data = data.replace(/<[^>]*>/g, ' ');
return data.replace(/s+/g, ' ');
}
}
}
},
{
extend: 'excel',
footer: true,
header: true,
exportOptions: {
format: {
body: function (data, row, column, node) {
data = data.replace(/&gt;/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
.replace(/&#163;/g, '£')
.replace(/&#39;/g, "'")
.replace(/&#10;/g, 'n');
data = data.replace(/<[^>]*>/g, ' ');
return data.replace(/s+/g, ' ');
}
}
}
},
{
extend: 'csv',
footer: true,
header: true,
exportOptions: {
format: {
body: function (data, row, column, node) {
data = data.replace(/&gt;/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
.replace(/&#163;/g, '£')
.replace(/&#39;/g, "'")
.replace(/&#10;/g, 'n');
data = data.replace(/<[^>]*>/g, ' ');
return data.replace(/s+/g, ' ');
}
}
}
},
{
extend: 'pdf',
footer: true,
header: true,
orientation: 'landscape',
exportOptions: {
format: {
body: function (data, row, column, node) {
data = data.replace(/&gt;/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
.replace(/&#163;/g, '£')
.replace(/&#39;/g, "'")
.replace(/&#10;/g, 'n');
data = data.replace(/<[^>]*>/g, ' ');
return data.replace(/s+/g, ' ');
}
}
}
}
]
}
],
lengthMenu: [
[10, 25, 50, -1],
[10, 25, 50, 'All']
],
drawCallback: function () {
var api = this.api();
var list = [7, 8, 9];
list.forEach(item => {
$(api.table().column(item).footer()).html(
api.column(item, { page: 'current' }).nodes().sum()
);
});
}
});

document.querySelector('.dtsb-title').style.display = 'none';
});

</script>
{% endblock %}

     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.