[fix] Shipment in portal. Fixes #4291

This commit is contained in:
Anand Doshi 2015-11-26 18:22:03 +05:30
parent f942d97a18
commit 4b12740e8d
2 changed files with 3 additions and 4 deletions

View File

@ -64,7 +64,7 @@ website_route_rules = [
{"from_route": "/shipments", "to_route": "Delivery Note"},
{"from_route": "/shipments/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Delivery Notes",
"doctype": "Delivery Note",
"parents": [{"title": _("Shipments"), "name": "shipments"}]
}
}

View File

@ -46,15 +46,14 @@
</div>
<div class="col-sm-2 col-xs-3 text-right">
{{ d.qty }}
{% if d.delivered_qty != None %}
{% if d.delivered_qty is defined and d.delivered_qty != None %}
<p class="text-muted small">{{
_("Delivered: {0}").format(d.delivered_qty) }}</p>
{% endif %}
</div>
<div class="col-sm-2 col-xs-3 text-right">
{{ d.get_formatted("amount") }}
<!-- output of get_formatted("rate") is unicode, to replace unicode use
_("text {0}").decode("utf8").format(val) -->
{# output of get_formatted("rate") is unicode, to replace unicode use _("text {0}").decode("utf8").format(val) #}
<p class="text-muted small">{{
_("Rate: {0}").decode("utf8").format(d.get_formatted("rate")) }}</p>
</div>