From 85ff3bcd0419e7e7eb6b94e0e7589e9850ba94b0 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 22 Jul 2014 14:43:14 +0530 Subject: [PATCH] updated pos invoice --- erpnext/accounts/print_format/pos_invoice/__init__.py | 0 .../accounts/print_format/pos_invoice/pos_invoice.json | 6 +++--- erpnext/config/selling.py | 5 +++++ erpnext/templates/print_formats/includes/item_grid.html | 8 +++----- 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 erpnext/accounts/print_format/pos_invoice/__init__.py diff --git a/erpnext/accounts/print_format/pos_invoice/__init__.py b/erpnext/accounts/print_format/pos_invoice/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json index e565ab841a..83174b6c29 100644 --- a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json +++ b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json @@ -3,13 +3,13 @@ "doc_type": "Sales Invoice", "docstatus": 0, "doctype": "Print Format", - "html": "\n\t\n\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\n\n\t\n\t\t\n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t\n", + "html": "\n\n

\n\t{{ doc.company }}
\n\t{{ doc.select_print_heading or _(\"Invoice\") }}
\n

\n

\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}
\n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}\n

\n\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{%- for item in doc.entries -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endfor -%}\n\t\n
{{ _(\"Item\") }}{{ _(\"Qty\") }}{{ _(\"Rate\") }}
\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t
{{ item.item_name }}{%- endif -%}\n\t\t\t
{{ item.qty }}{{ item.amount }}
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t
\n\t\t\t\t{{ row.description }}\n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t
\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t
\n{% if doc.get(\"other_charges\", filters={\"included_in_print_rate\": 1}) %}\n
\n

Taxes Included:

\n\n\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\n
\n\t\t\t\t{{ row.description }}\n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t
\n{%- endif -%}\n
\n

{{ doc.terms or \"\" }}

\n

{{ _(\"Thank you, please visit again.\") }}

", "idx": 1, - "modified": "2014-05-26 06:29:57.220753", + "modified": "2014-07-22 02:08:26.603223", "modified_by": "Administrator", "module": "Accounts", "name": "POS Invoice", "owner": "Administrator", - "print_format_type": "Client", + "print_format_type": "Server", "standard": "Yes" } \ No newline at end of file diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py index c95f15aa83..1e5acadb53 100644 --- a/erpnext/config/selling.py +++ b/erpnext/config/selling.py @@ -57,6 +57,11 @@ def get_data(): "name": "SMS Center", "description":_("Send mass SMS to your contacts"), }, + { + "type": "doctype", + "name": "Newsletter", + "description": _("Newsletters to contacts, leads."), + }, ] }, { diff --git a/erpnext/templates/print_formats/includes/item_grid.html b/erpnext/templates/print_formats/includes/item_grid.html index e837966de6..e3be8c94dc 100644 --- a/erpnext/templates/print_formats/includes/item_grid.html +++ b/erpnext/templates/print_formats/includes/item_grid.html @@ -27,16 +27,14 @@ {%- if (field.fieldname not in std_fields) and (row[field.fieldname] not in (None, "")) -%}
{{ field.label }}: - {{ frappe.format_value(row[field.fieldname], field, doc) }}

+ {{ row.get_formatted(field.fieldname, doc) }}

{%- endif -%} {%- endfor -%} {{ row.qty }} {{ row.uom or row.stock_uom }} {{ - frappe.format_value(row.rate, - table_meta.get_field("rate"), doc) }} + row.get_formatted("rate", doc) }} {{ - frappe.format_value(row.amount, - table_meta.get_field("amount"), doc) }} + row.get_formatted("amount", doc) }} {%- endfor -%}