{% extends 'freight/base.html' %} {% load i18n %} {% load humanize %} {% load static %} {% load freight_filters %} {% block details %}

Courier Contracts

Status Start Destination Rew.
M ISK
Coll.
M ISK
Vol.
K m3
Contract Check Issued
On
Expires
On
Issued
By
Notes Accepted
On
Accepted
By

Contract check:   = OK    = Errors    If they are errors you find them in the tooltip of icon    - = No contract check performed

Notes:      If icon is shown you can hover with the mouse over it to see the notes.

{% endblock %} {% block extra_javascript %} {% include 'bundles/datatables-js.html' %} {% endblock %} {% block extra_css %} {% include 'bundles/datatables-css.html' %} {% endblock %} {% block extra_script %} $(document).ready(function(){ $('#tab_contracts').DataTable({ ajax: { url: '{% url 'freight:contract_list_data' category %}', dataSrc: '', cache: false }, columns: [ { data: 'status' }, { data: 'start_location' }, { data: 'end_location' }, { data: 'reward' }, { data: 'collateral' }, { data: 'volume' }, { data: 'pricing_check' }, { data: 'date_issued' }, { data: 'date_expired' }, { data: 'issuer' }, { data: 'notes' }, { data: 'date_accepted' }, { data: 'acceptor' }, /* hidden columns for filter */ { data: 'route_name' } ], columnDefs: [ { "orderable": false, "targets": [ 6 ] }, { "visible": false, "targets": [ 13 ] }, ], order: [ [ 7, "desc" ] ], filterDropDown: { columns: [ { idx: 13, title: 'Route' }, { idx: 0 }, { idx: 9 }, { idx: 12 } ], bootstrap: true }, createdRow: function( row, data, dataIndex ) { if (data['is_in_progress']) { $(row).addClass('info'); } else if (data['is_failed']) { $(row).addClass('warning'); } else if (data['is_completed']) { $(row).addClass('success'); } }, }); }); {% endblock %}