Merge pull request #2673 from nabinhait/fix1

Multiple fixes
This commit is contained in:
Nabin Hait 2015-02-03 18:32:19 +05:30
commit 06d81822fd
2 changed files with 14 additions and 12 deletions

View File

@ -405,7 +405,7 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
# Hence the first condition is an "OR"
return frappe.db.sql("""select tabAccount.name from `tabAccount`
where (tabAccount.report_type = "Profit and Loss"
or tabAccount.account_type = "Expense Account")
or tabAccount.account_type in ("Expense Account", "Fixed Asset"))
and tabAccount.group_or_ledger="Ledger"
and tabAccount.docstatus!=2
and ifnull(tabAccount.master_type, "")=""

View File

@ -6,17 +6,19 @@
<table class="table table-bordered">
<tbody>
<tr>
<th style="width: 3%">{{ _("Sr") }}</th>
<th style="width: 57%">{{ _("Item") }}</th>
<th style="width: 10%;" class="text-right">{{ _(data[0].meta.get_label("qty")) }}</th>
{% if not hide_rate -%}
<th style="width: 15%;" class="text-right">{{ _(data[0].meta.get_label("rate")) }}</th>
{%- endif %}
{% if not hide_amount -%}
<th style="width: 15%;" class="text-right">{{ _(data[0].meta.get_label("amount")) }}</th>
{%- endif %}
</tr>
{% if data|length -%}
<tr>
<th style="width: 3%">{{ _("Sr") }}</th>
<th style="width: 57%">{{ _("Item") }}</th>
<th style="width: 10%;" class="text-right">{{ _(data[0].meta.get_label("qty")) }}</th>
{% if not hide_rate -%}
<th style="width: 15%;" class="text-right">{{ _(data[0].meta.get_label("rate")) }}</th>
{%- endif %}
{% if not hide_amount -%}
<th style="width: 15%;" class="text-right">{{ _(data[0].meta.get_label("amount")) }}</th>
{%- endif %}
</tr>
{%- endif %}
{%- for row in data -%}
<tr>
<td>{{ row.idx }}</td>