From 5b51cc86a960cb5fe307a15546bac51b894e1860 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 21 Jul 2014 18:25:45 +0530 Subject: [PATCH] many fixes to print --- .../purchase_invoice/purchase_invoice.json | 163 ++++++++--------- .../doctype/sales_invoice/sales_invoice.json | 158 ++++++++--------- .../doctype/sales_invoice/sales_invoice.py | 12 +- .../__init__.py | 0 .../cheque_printing_format.json | 4 +- .../payment_receipt_voucher/__init__.py | 0 .../payment_receipt_voucher.json | 5 +- .../sales_invoice/sales_invoice.html | 135 -------------- .../sales_invoice/sales_invoice.json | 14 -- .../sales_invoice_classic.json | 15 -- .../sales_invoice_modern.json | 15 -- .../sales_invoice_spartan.json | 15 -- .../purchase_order/purchase_order.json | 164 +++++++++--------- .../supplier_quotation.json | 36 ++-- .../purchase_order_classic.json | 15 -- .../purchase_order_modern.json | 15 -- .../purchase_order_spartan.json | 15 -- erpnext/controllers/buying_controller.py | 9 +- erpnext/controllers/selling_controller.py | 9 +- .../hr/doctype/salary_slip/salary_slip.json | 51 +++--- erpnext/hr/doctype/salary_slip/salary_slip.py | 107 +----------- .../salary_slip_deduction.json | 15 +- .../salary_slip_earning.json | 15 +- .../selling/doctype/quotation/quotation.json | 126 +++++++------- .../quotation_classic/quotation_classic.json | 15 -- .../quotation_modern/quotation_modern.json | 15 -- .../quotation_spartan/quotation_spartan.json | 15 -- .../sales_order_classic.json | 15 -- .../sales_order_modern.json | 15 -- .../sales_order_spartan.json | 15 -- .../doctype/delivery_note/delivery_note.json | 12 +- .../purchase_receipt/purchase_receipt.json | 132 +++++++------- .../stock/page/stock_balance/stock_balance.js | 4 +- .../delivery_note_classic.json | 15 -- .../delivery_note_modern.json | 15 -- .../delivery_note_spartan.json | 15 -- .../print_formats/includes/item_grid.html | 4 +- .../print_formats/includes/taxes.html | 4 +- 38 files changed, 480 insertions(+), 924 deletions(-) rename erpnext/accounts/print_format/{sales_invoice => cheque_printing_format}/__init__.py (100%) create mode 100644 erpnext/accounts/print_format/payment_receipt_voucher/__init__.py delete mode 100644 erpnext/accounts/print_format/sales_invoice/sales_invoice.html delete mode 100644 erpnext/accounts/print_format/sales_invoice/sales_invoice.json delete mode 100644 erpnext/accounts/print_format/sales_invoice_classic/sales_invoice_classic.json delete mode 100644 erpnext/accounts/print_format/sales_invoice_modern/sales_invoice_modern.json delete mode 100644 erpnext/accounts/print_format/sales_invoice_spartan/sales_invoice_spartan.json delete mode 100644 erpnext/buying/print_format/purchase_order_classic/purchase_order_classic.json delete mode 100644 erpnext/buying/print_format/purchase_order_modern/purchase_order_modern.json delete mode 100644 erpnext/buying/print_format/purchase_order_spartan/purchase_order_spartan.json delete mode 100644 erpnext/selling/print_format/quotation_classic/quotation_classic.json delete mode 100644 erpnext/selling/print_format/quotation_modern/quotation_modern.json delete mode 100644 erpnext/selling/print_format/quotation_spartan/quotation_spartan.json delete mode 100644 erpnext/selling/print_format/sales_order_classic/sales_order_classic.json delete mode 100644 erpnext/selling/print_format/sales_order_modern/sales_order_modern.json delete mode 100644 erpnext/selling/print_format/sales_order_spartan/sales_order_spartan.json delete mode 100644 erpnext/stock/print_format/delivery_note_classic/delivery_note_classic.json delete mode 100644 erpnext/stock/print_format/delivery_note_modern/delivery_note_modern.json delete mode 100644 erpnext/stock/print_format/delivery_note_spartan/delivery_note_spartan.json diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 8eb3b0907e..1de3aa601d 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -264,22 +264,6 @@ "fieldtype": "Section Break", "permlevel": 0 }, - { - "fieldname": "net_total_import", - "fieldtype": "Currency", - "label": "Net Total", - "oldfieldname": "net_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "column_break_28", - "fieldtype": "Column Break", - "permlevel": 0 - }, { "description": "Will be calculated automatically when you enter the details", "fieldname": "net_total", @@ -292,6 +276,22 @@ "print_hide": 1, "read_only": 1 }, + { + "fieldname": "column_break_28", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "fieldname": "net_total_import", + "fieldtype": "Currency", + "label": "Net Total", + "oldfieldname": "net_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, { "fieldname": "taxes", "fieldtype": "Section Break", @@ -340,6 +340,59 @@ "permlevel": 0, "read_only": 0 }, + { + "fieldname": "other_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added (Company Currency)", + "oldfieldname": "other_charges_added", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "other_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted (Company Currency)", + "oldfieldname": "other_charges_deducted", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "description": "In Words will be visible once you save the Purchase Invoice.", + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break8", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "width": "50%" + }, { "fieldname": "other_charges_added_import", "fieldtype": "Currency", @@ -409,6 +462,17 @@ "print_hide": 1, "read_only": 1 }, + { + "fieldname": "total_tax", + "fieldtype": "Currency", + "label": "Total Tax (Company Currency)", + "oldfieldname": "total_tax", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "fieldname": "outstanding_amount", "fieldtype": "Currency", @@ -424,70 +488,6 @@ "read_only": 1, "search_index": 1 }, - { - "fieldname": "column_break8", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "width": "50%" - }, - { - "fieldname": "total_tax", - "fieldtype": "Currency", - "label": "Total Tax (Company Currency)", - "oldfieldname": "total_tax", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "other_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added (Company Currency)", - "oldfieldname": "other_charges_added", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "other_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted (Company Currency)", - "oldfieldname": "other_charges_deducted", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "description": "In Words will be visible once you save the Purchase Invoice.", - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, { "fieldname": "write_off_amount", "fieldtype": "Currency", @@ -601,6 +601,7 @@ "label": "Supplier Address", "options": "Address", "permlevel": 0, + "print_hide": 1, "read_only": 0 }, { @@ -752,7 +753,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-06-19 15:50:50.898237", + "modified": "2014-07-21 05:33:36.332474", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index a07b69d09f..4c3d8a34e9 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -311,20 +311,6 @@ "fieldtype": "Section Break", "permlevel": 0 }, - { - "fieldname": "net_total_export", - "fieldtype": "Currency", - "label": "Net Total", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "column_break_32", - "fieldtype": "Column Break", - "permlevel": 0 - }, { "fieldname": "net_total", "fieldtype": "Currency", @@ -337,6 +323,20 @@ "read_only": 1, "reqd": 1 }, + { + "fieldname": "column_break_32", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "fieldname": "net_total_export", + "fieldtype": "Currency", + "label": "Net Total", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, { "fieldname": "taxes", "fieldtype": "Section Break", @@ -445,70 +445,6 @@ "print_hide": 1, "read_only": 0 }, - { - "fieldname": "grand_total_export", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "oldfieldname": "grand_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "rounded_total_export", - "fieldtype": "Currency", - "label": "Rounded Total", - "oldfieldname": "rounded_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "in_words_export", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_export", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "gross_profit", - "fieldtype": "Currency", - "label": "Gross Profit", - "oldfieldname": "gross_profit", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "gross_profit_percent", - "fieldtype": "Float", - "label": "Gross Profit (%)", - "oldfieldname": "gross_profit_percent", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break5", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "width": "50%" - }, { "fieldname": "grand_total", "fieldtype": "Currency", @@ -569,6 +505,70 @@ "print_hide": 1, "read_only": 1 }, + { + "fieldname": "column_break5", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "width": "50%" + }, + { + "fieldname": "grand_total_export", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "oldfieldname": "grand_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "rounded_total_export", + "fieldtype": "Currency", + "label": "Rounded Total", + "oldfieldname": "rounded_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, + { + "fieldname": "in_words_export", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_export", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, + { + "fieldname": "gross_profit", + "fieldtype": "Currency", + "label": "Gross Profit", + "oldfieldname": "gross_profit", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "gross_profit_percent", + "fieldtype": "Float", + "label": "Gross Profit (%)", + "oldfieldname": "gross_profit_percent", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "fieldname": "advances", "fieldtype": "Section Break", @@ -1188,7 +1188,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-06-19 16:01:19.720382", + "modified": "2014-07-21 05:31:24.670731", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 0f6737cc87..671bb54f82 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -342,7 +342,7 @@ class SalesInvoice(SellingController): def validate_pos(self): if not self.cash_bank_account and flt(self.paid_amount): frappe.throw(_("Cash or Bank Account is mandatory for making payment entry")) - + if flt(self.paid_amount) + flt(self.write_off_amount) \ - flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)): frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total""")) @@ -434,7 +434,7 @@ class SalesInvoice(SellingController): where docstatus = 1 and name = %s""", d.sales_order) if not submitted: frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order)) - + if d.delivery_note: submitted = frappe.db.sql("""select name from `tabDelivery Note` where docstatus = 1 and name = %s""", d.delivery_note) @@ -721,11 +721,13 @@ def make_new_invoice(ref_wrapper, posting_date): def send_notification(new_rv): """Notify concerned persons about recurring invoice generation""" - - from frappe.core.doctype.print_format.print_format import get_html frappe.sendmail(new_rv.notification_email_address, subject="New Invoice : " + new_rv.name, - message = get_html(new_rv, new_rv, "Sales Invoice")) + message = _("Please find attached Sales Invoice #{0}").format(new_rw.name), + attachments = { + "fname": new_rv.name + ".pdf", + "fcontent": frappe.get_print_format(new_rv.doctype, new_rv.name, as_pdf=True) + }) def notify_errors(inv, customer, owner): from frappe.utils.user import get_system_managers diff --git a/erpnext/accounts/print_format/sales_invoice/__init__.py b/erpnext/accounts/print_format/cheque_printing_format/__init__.py similarity index 100% rename from erpnext/accounts/print_format/sales_invoice/__init__.py rename to erpnext/accounts/print_format/cheque_printing_format/__init__.py diff --git a/erpnext/accounts/print_format/cheque_printing_format/cheque_printing_format.json b/erpnext/accounts/print_format/cheque_printing_format/cheque_printing_format.json index 7aec5060ea..4bafe8530a 100755 --- a/erpnext/accounts/print_format/cheque_printing_format/cheque_printing_format.json +++ b/erpnext/accounts/print_format/cheque_printing_format/cheque_printing_format.json @@ -3,9 +3,9 @@ "doc_type": "Journal Voucher", "docstatus": 0, "doctype": "Print Format", - "html": "\n
\n



\n
\nPAYMENT ADVICE

\n\n\n\n\n\n\n\n
To :
\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Voucher No :\n\n
Voucher Date :\n\n
Cheque No :\n\n
Cheque Date :\n\n
\n
\n
We are pleased to enclose our cheque in full/part Settlement of your under noted bills
\n
\n\n\n\n\n\n\n\n\n\n\n\n
 Total :\n\n
Narration :\n\n


\n
Prepared By
\n
Authorised Signatory
\n
Received Payment as Above
\n
_____________
\n
A/c Payee
\n
_____________
\n
\n\n
\n
\n\n
\n
\n\n
\n
\n\n
\n
", + "html": "
\n\n\t{% if letter_head and not no_letterhead %}{{ letter_head }}{%- endif -%}\n\t

{{ _(\"Payment Advice\") }}

\n\t
\n\t
\n\t
{{ doc.pay_to_recd_from }}
\n\t
\n\t
\n\t
\n\t
{{ doc.name }}
\n\t
\n\t
\n\t
\n\t
{{ frappe.utils.formatdate(doc.voucher_date) }}
\n\t
\n\t
\n\t
\n\t
{{ doc.cheque_no }}
\n\t
\n\t
\n\t
\n\t
{{ frappe.utils.formatdate(doc.cheque_date) }}
\n\t
\n\t
\n\t
\n\t
{{ frappe.utils.formatdate(doc.voucher_date) }}
\n\t
\n\t
\n\t

{{ _(\"This amount is in full / part settlement of the listed bills\") }}:

\n\t
\n\t
\n\t
\n\t
{{ \n\t \tfrappe.format_value(doc.total_amount, doc.meta.get_field(\"total_amount\"), doc) }}
\n\t
\n\t
\n\t
\n\t
{{ doc.remark }}
\n\t
\n\n\t
\n\t\tPrepared By
\n\t
\n\t\tAuthorised Signatory
\n\t
\n\t\tReceived Payment as Above
\n\t
\n\t\t_____________
\n\t
\n\t\tA/C Payee
\n\t
\n\t\t_____________
\n\t
\n\t\t{{ frappe.utils.formatdate(doc.cheque_date) }}
\n\t
\n\t\t{{ doc.pay_to_recd_from }}
\n\t
\n\t\t{{ doc.total_amount_in_words }}
\n\t
\n\t\t{{ doc.total_amount }}
\n
", "idx": 1, - "modified": "2014-05-13 16:07:18.792349", + "modified": "2014-07-21 08:53:57.749885", "modified_by": "Administrator", "module": "Accounts", "name": "Cheque Printing Format", diff --git a/erpnext/accounts/print_format/payment_receipt_voucher/__init__.py b/erpnext/accounts/print_format/payment_receipt_voucher/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json index 0a26c085ed..9a9398df8d 100755 --- a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json +++ b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json @@ -3,12 +3,13 @@ "doc_type": "Journal Voucher", "docstatus": 0, "doctype": "Print Format", - "html": "

\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n
Receipt No.:
Date :
Remark:
Received From:
\n
\n\n

\n

\n
\n\n\n\n\n

For ,


(Authorised Signatory)
", + "html": "

{{ doc.select_print_heading or _(\"Payment Receipt Note\") }}

\n
\n
\n
\n
{{ doc.name }}
\n
\n
\n
\n
{{ frappe.utils.formatdate(doc.voucher_date) }}
\n
\n
\n
\n
{{ doc.remark }}
\n
\n
\n
\n
{{ doc.pay_to_recd_from }}
\n
\n
\n
\n
{{ doc.total_amount }}
{{ doc.total_amount_in_words }}
\n
\n
\n

\n{{ _(\"For\") }} {{ doc.company }},
\n
\n
\n
\n{{ _(\"Authorized Signatory\") }}

", "idx": 1, - "modified": "2014-05-13 16:07:19.144006", + "modified": "2014-07-21 08:53:17.393966", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Receipt Voucher", "owner": "Administrator", + "print_format_type": "Server", "standard": "Yes" } \ No newline at end of file diff --git a/erpnext/accounts/print_format/sales_invoice/sales_invoice.html b/erpnext/accounts/print_format/sales_invoice/sales_invoice.html deleted file mode 100644 index 8dc39f9482..0000000000 --- a/erpnext/accounts/print_format/sales_invoice/sales_invoice.html +++ /dev/null @@ -1,135 +0,0 @@ -{%- if doc.letter_head -%} - {{ frappe.db.get_value("Letter Head", doc.letter_head, "content") }} -{%- endif -%} - - -
- - - - - - - - - - - - - {%- for row in doc.get({"doctype":"Sales Invoice Item"}) %} - - - - - - - - - - {% endfor -%} - -
SrItem NameDescriptionQtyUoMBasic RateAmount
{{ row.idx }}{{ row.item_name }}{{ row.description }}{{ row.qty }}{{ row.stock_uom }}{{ utils.fmt_money(row.rate, currency=doc.currency) }}{{ utils.fmt_money(row.amount, currency=doc.currency) }}
-
- diff --git a/erpnext/accounts/print_format/sales_invoice/sales_invoice.json b/erpnext/accounts/print_format/sales_invoice/sales_invoice.json deleted file mode 100644 index 37baa1ce46..0000000000 --- a/erpnext/accounts/print_format/sales_invoice/sales_invoice.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "creation": "2013-03-21 15:24:28", - "doc_type": "Sales Invoice", - "docstatus": 0, - "doctype": "Print Format", - "idx": 1, - "modified": "2014-05-13 17:51:43.245831", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Invoice", - "owner": "Administrator", - "print_format_type": "Server", - "standard": "Yes" -} diff --git a/erpnext/accounts/print_format/sales_invoice_classic/sales_invoice_classic.json b/erpnext/accounts/print_format/sales_invoice_classic/sales_invoice_classic.json deleted file mode 100644 index 7297a768e9..0000000000 --- a/erpnext/accounts/print_format/sales_invoice_classic/sales_invoice_classic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:27", - "doc_type": "Sales Invoice", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.241986", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Invoice Classic", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/accounts/print_format/sales_invoice_modern/sales_invoice_modern.json b/erpnext/accounts/print_format/sales_invoice_modern/sales_invoice_modern.json deleted file mode 100644 index c1c6a62f79..0000000000 --- a/erpnext/accounts/print_format/sales_invoice_modern/sales_invoice_modern.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:27", - "doc_type": "Sales Invoice", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.249479", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Invoice Modern", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/accounts/print_format/sales_invoice_spartan/sales_invoice_spartan.json b/erpnext/accounts/print_format/sales_invoice_spartan/sales_invoice_spartan.json deleted file mode 100644 index 7d90d7295c..0000000000 --- a/erpnext/accounts/print_format/sales_invoice_spartan/sales_invoice_spartan.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:27", - "doc_type": "Sales Invoice", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.275094", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Invoice Spartan", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 14693c434f..61646d1af4 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -230,6 +230,24 @@ "fieldtype": "Section Break", "permlevel": 0 }, + { + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "no_copy": 1, + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "reqd": 0 + }, + { + "fieldname": "column_break_26", + "fieldtype": "Column Break", + "permlevel": 0 + }, { "fieldname": "net_total_import", "fieldtype": "Currency", @@ -250,24 +268,6 @@ "permlevel": 0, "print_hide": 0 }, - { - "fieldname": "column_break_26", - "fieldtype": "Column Break", - "permlevel": 0 - }, - { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "no_copy": 1, - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "reqd": 0 - }, { "fieldname": "taxes", "fieldtype": "Section Break", @@ -316,63 +316,6 @@ "options": "icon-money", "permlevel": 0 }, - { - "fieldname": "other_charges_added_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Added", - "no_copy": 0, - "oldfieldname": "other_charges_added_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "report_hide": 0 - }, - { - "fieldname": "other_charges_deducted_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted", - "no_copy": 0, - "oldfieldname": "other_charges_deducted_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "report_hide": 0 - }, - { - "fieldname": "grand_total_import", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "no_copy": 0, - "oldfieldname": "grand_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1, - "report_hide": 0 - }, - { - "fieldname": "in_words_import", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_import", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "column_break4", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0 - }, { "fieldname": "other_charges_added", "fieldtype": "Currency", @@ -421,6 +364,17 @@ "print_hide": 1, "read_only": 1 }, + { + "description": "In Words will be visible once you save the Purchase Order.", + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "fieldname": "rounded_total", "fieldtype": "Currency", @@ -433,14 +387,60 @@ "read_only": 1 }, { - "description": "In Words will be visible once you save the Purchase Order.", - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", + "fieldname": "column_break4", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0 + }, + { + "fieldname": "other_charges_added_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Added", + "no_copy": 0, + "oldfieldname": "other_charges_added_import", + "oldfieldtype": "Currency", + "options": "currency", "permlevel": 0, "print_hide": 1, + "read_only": 1, + "report_hide": 0 + }, + { + "fieldname": "other_charges_deducted_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted", + "no_copy": 0, + "oldfieldname": "other_charges_deducted_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "report_hide": 0 + }, + { + "fieldname": "grand_total_import", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "no_copy": 0, + "oldfieldname": "grand_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, + "report_hide": 0 + }, + { + "fieldname": "in_words_import", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_import", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, "read_only": 1 }, { @@ -645,7 +645,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-06-23 07:55:50.372486", + "modified": "2014-07-21 05:34:36.390448", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json index 955aa6857c..fa0a9f38cd 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json @@ -229,23 +229,6 @@ "fieldtype": "Section Break", "permlevel": 0 }, - { - "fieldname": "net_total_import", - "fieldtype": "Currency", - "label": "Net Total", - "no_copy": 0, - "oldfieldname": "net_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "column_break_24", - "fieldtype": "Column Break", - "permlevel": 0 - }, { "fieldname": "net_total", "fieldtype": "Currency", @@ -259,6 +242,23 @@ "read_only": 1, "reqd": 0 }, + { + "fieldname": "column_break_24", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "fieldname": "net_total_import", + "fieldtype": "Currency", + "label": "Net Total", + "no_copy": 0, + "oldfieldname": "net_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, { "fieldname": "taxes", "fieldtype": "Section Break", @@ -571,7 +571,7 @@ "icon": "icon-shopping-cart", "idx": 1, "is_submittable": 1, - "modified": "2014-06-23 07:55:52.993616", + "modified": "2014-07-21 05:30:30.367353", "modified_by": "Administrator", "module": "Buying", "name": "Supplier Quotation", diff --git a/erpnext/buying/print_format/purchase_order_classic/purchase_order_classic.json b/erpnext/buying/print_format/purchase_order_classic/purchase_order_classic.json deleted file mode 100644 index b5a72647cf..0000000000 --- a/erpnext/buying/print_format/purchase_order_classic/purchase_order_classic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2012-04-17 11:29:12", - "doc_type": "Purchase Order", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.158692", - "modified_by": "Administrator", - "module": "Buying", - "name": "Purchase Order Classic", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/buying/print_format/purchase_order_modern/purchase_order_modern.json b/erpnext/buying/print_format/purchase_order_modern/purchase_order_modern.json deleted file mode 100644 index ee0d9d5396..0000000000 --- a/erpnext/buying/print_format/purchase_order_modern/purchase_order_modern.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2012-04-17 11:29:12", - "doc_type": "Purchase Order", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.183637", - "modified_by": "Administrator", - "module": "Buying", - "name": "Purchase Order Modern", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/buying/print_format/purchase_order_spartan/purchase_order_spartan.json b/erpnext/buying/print_format/purchase_order_spartan/purchase_order_spartan.json deleted file mode 100644 index 851543a720..0000000000 --- a/erpnext/buying/print_format/purchase_order_spartan/purchase_order_spartan.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2012-04-17 11:29:12", - "doc_type": "Purchase Order", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.195456", - "modified_by": "Administrator", - "module": "Buying", - "name": "Purchase Order Spartan", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index acb00245e6..02eaa03288 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -11,6 +11,13 @@ from erpnext.accounts.party import get_party_details from erpnext.controllers.stock_controller import StockController class BuyingController(StockController): + def __setup__(self): + if hasattr(self, "fname"): + self.table_print_templates = { + self.fname: "templates/print_formats/includes/item_grid.html", + "other_charges": "templates/print_formats/includes/taxes.html", + } + def validate(self): super(BuyingController, self).validate() if getattr(self, "supplier", None) and not self.supplier_name: @@ -324,4 +331,4 @@ class BuyingController(StockController): if d.meta.get_field("stock_qty") and not d.stock_qty: if not d.conversion_factor: frappe.throw(_("Row {0}: Conversion Factor is mandatory")) - d.stock_qty = flt(d.qty) * flt(d.conversion_factor) \ No newline at end of file + d.stock_qty = flt(d.qty) * flt(d.conversion_factor) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 6bbdfadd3d..315af0ea99 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -11,10 +11,11 @@ from erpnext.controllers.stock_controller import StockController class SellingController(StockController): def __setup__(self): - self.table_print_templates = { - self.fname: "templates/print_formats/includes/item_grid.html", - "other_charges": "templates/print_formats/includes/taxes.html", - } + if hasattr(self, "fname"): + self.table_print_templates = { + self.fname: "templates/print_formats/includes/item_grid.html", + "other_charges": "templates/print_formats/includes/taxes.html", + } def validate(self): super(SellingController, self).validate() diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 5d2f028e9c..88a7ef2ae9 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -76,14 +76,8 @@ "fieldtype": "Link", "label": "Letter Head", "options": "Letter Head", - "permlevel": 0 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", "permlevel": 0, - "width": "50%" + "print_hide": 1 }, { "fieldname": "fiscal_year", @@ -107,6 +101,13 @@ "permlevel": 0, "reqd": 1 }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "width": "50%" + }, { "fieldname": "month", "fieldtype": "Select", @@ -123,8 +124,8 @@ }, { "fieldname": "total_days_in_month", - "fieldtype": "Data", - "label": "Total Working Days In The Month", + "fieldtype": "Float", + "label": "Working Days", "oldfieldname": "total_days_in_month", "oldfieldtype": "Int", "permlevel": 0, @@ -208,6 +209,12 @@ "reqd": 0, "width": "50%" }, + { + "fieldname": "html_21", + "fieldtype": "HTML", + "options": "", + "permlevel": 0 + }, { "fieldname": "earning_details", "fieldtype": "Table", @@ -225,6 +232,12 @@ "permlevel": 0, "width": "50%" }, + { + "fieldname": "html_24", + "fieldtype": "HTML", + "options": "", + "permlevel": 0 + }, { "fieldname": "deduction_details", "fieldtype": "Table", @@ -242,11 +255,14 @@ "permlevel": 0 }, { - "fieldname": "column_break2", + "fieldname": "column_break_25", "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "width": "50%" + "permlevel": 0 + }, + { + "fieldname": "column_break_26", + "fieldtype": "Column Break", + "permlevel": 0 }, { "fieldname": "arrear_amount", @@ -286,13 +302,6 @@ "permlevel": 0, "read_only": 1 }, - { - "fieldname": "column_break3", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "width": "50%" - }, { "description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction", "fieldname": "net_pay", @@ -326,7 +335,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-06-23 07:55:52.259962", + "modified": "2014-07-21 07:58:08.033784", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 3f4b5e3080..946588f5bc 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -186,109 +186,14 @@ class SalarySlip(TransactionBase): def send_mail_funct(self): from frappe.utils.email_lib import sendmail + receiver = frappe.db.get_value("Employee", self.employee, "company_email") if receiver: subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year) - earn_ret=frappe.db.sql("""select e_type, e_modified_amount from `tabSalary Slip Earning` - where parent = %s""", self.name) - ded_ret=frappe.db.sql("""select d_type, d_modified_amount from `tabSalary Slip Deduction` - where parent = %s""", self.name) - - earn_table = '' - ded_table = '' - if earn_ret: - earn_table += "" - - for e in earn_ret: - if not e[1]: - earn_table += '' % cstr(e[0]) - else: - earn_table += '' \ - % (cstr(e[0]), cstr(e[1])) - earn_table += '
%s0.00
%s%s
' - - if ded_ret: - - ded_table += "" - - for d in ded_ret: - if not d[1]: - ded_table +='%s' % cstr(d[0]) - else: - ded_table +='' \ - % (cstr(d[0]), cstr(d[1])) - ded_table += '
0.00
%s%s
' - - letter_head = frappe.db.get_value("Letter Head", {"is_default": 1, "disabled": 0}, - "content") - - msg = '''
%s
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Salary Slip

Employee Code : %sEmployee Name : %s
Month : %sFiscal Year : %s
Department : %sBranch : %s
Designation : %s
Bank Account No. : %sBank Name : %s
Arrear Amount : %sPayment days : %s
- - - - - - - - - -
- Earnings - Deductions
%s%s
- - - - - - - - - Net Pay : - - - - - - - -
Gross Pay : %sTotal Deduction : %s
%s
Net Pay(in words) : %s
''' % (cstr(letter_head), cstr(self.employee), - cstr(self.employee_name), cstr(self.month), cstr(self.fiscal_year), - cstr(self.department), cstr(self.branch), cstr(self.designation), - cstr(self.bank_account_no), cstr(self.bank_name), - cstr(self.arrear_amount), cstr(self.payment_days), earn_table, ded_table, - cstr(flt(self.gross_pay)), cstr(flt(self.total_deduction)), - cstr(flt(self.net_pay)), cstr(self.total_in_words)) - - sendmail([receiver], subject=subj, msg = msg) + sendmail([receiver], subject=subj, msg = _("Please see attachment"), + attachments={ + "fname": self.name + ".pdf", + "fcontent": frappe.get_print_format(self.doctype, self.name, as_pdf = True) + }) else: msgprint(_("Company Email ID not found, hence mail not sent")) diff --git a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json index ae07c2c523..1833129459 100644 --- a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json +++ b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json @@ -1,5 +1,5 @@ { - "creation": "2013-02-22 01:27:48.000000", + "creation": "2013-02-22 01:27:48", "docstatus": 0, "doctype": "DocType", "fields": [ @@ -19,18 +19,19 @@ "fieldname": "d_amount", "fieldtype": "Currency", "in_list_view": 1, - "label": "Amount", + "label": "Default Amount", "oldfieldname": "d_amount", "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, + "print_hide": 1, "read_only": 1 }, { "fieldname": "d_modified_amount", "fieldtype": "Currency", "in_list_view": 1, - "label": "Modified Amount", + "label": "Amount", "options": "Company:company:default_currency", "permlevel": 0 }, @@ -39,14 +40,16 @@ "fieldtype": "Check", "in_list_view": 1, "label": "Depends on LWP", - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 } ], "idx": 1, "istable": 1, - "modified": "2013-12-20 19:23:42.000000", + "modified": "2014-07-21 07:38:36.059879", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip Deduction", - "owner": "Administrator" + "owner": "Administrator", + "permissions": [] } \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json index eae64473a3..b3dfa2b177 100644 --- a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json +++ b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json @@ -1,5 +1,5 @@ { - "creation": "2013-02-22 01:27:48.000000", + "creation": "2013-02-22 01:27:48", "docstatus": 0, "doctype": "DocType", "fields": [ @@ -19,18 +19,19 @@ "fieldname": "e_amount", "fieldtype": "Currency", "in_list_view": 1, - "label": "Amount", + "label": "Default Amount", "oldfieldname": "e_amount", "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, + "print_hide": 1, "read_only": 1 }, { "fieldname": "e_modified_amount", "fieldtype": "Currency", "in_list_view": 1, - "label": "Modified Amount", + "label": "Amount", "options": "Company:company:default_currency", "permlevel": 0 }, @@ -39,14 +40,16 @@ "fieldtype": "Check", "in_list_view": 1, "label": "Depends on LWP", - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 } ], "idx": 1, "istable": 1, - "modified": "2013-12-20 19:23:43.000000", + "modified": "2014-07-21 07:39:01.262050", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip Earning", - "owner": "Administrator" + "owner": "Administrator", + "permissions": [] } \ No newline at end of file diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index bdd27c4cc7..87943646c7 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -313,19 +313,6 @@ "permlevel": 0, "read_only": 0 }, - { - "fieldname": "net_total_export", - "fieldtype": "Currency", - "label": "Net Total", - "options": "currency", - "permlevel": 0, - "read_only": 1 - }, - { - "fieldname": "column_break_28", - "fieldtype": "Column Break", - "permlevel": 0 - }, { "fieldname": "net_total", "fieldtype": "Currency", @@ -340,6 +327,19 @@ "reqd": 0, "width": "100px" }, + { + "fieldname": "column_break_28", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "fieldname": "net_total_export", + "fieldtype": "Currency", + "label": "Net Total", + "options": "currency", + "permlevel": 0, + "read_only": 1 + }, { "fieldname": "taxes", "fieldtype": "Section Break", @@ -448,6 +448,55 @@ "print_hide": 1, "read_only": 0 }, + { + "fieldname": "grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "no_copy": 0, + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "reqd": 0, + "width": "200px" + }, + { + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "no_copy": 0, + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "width": "200px" + }, + { + "description": "In Words will be visible once you save the Quotation.", + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "no_copy": 0, + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "width": "200px" + }, + { + "fieldname": "column_break3", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "width": "50%" + }, { "fieldname": "grand_total_export", "fieldtype": "Currency", @@ -489,55 +538,6 @@ "read_only": 1, "width": "200px" }, - { - "fieldname": "column_break3", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "width": "50%" - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "no_copy": 0, - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "reqd": 0, - "width": "200px" - }, - { - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "no_copy": 0, - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "width": "200px" - }, - { - "description": "In Words will be visible once you save the Quotation.", - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "no_copy": 0, - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "width": "200px" - }, { "fieldname": "terms_section_break", "fieldtype": "Section Break", @@ -827,7 +827,7 @@ "idx": 1, "is_submittable": 1, "max_attachments": 1, - "modified": "2014-06-23 07:55:51.859025", + "modified": "2014-07-21 05:44:26.800041", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/print_format/quotation_classic/quotation_classic.json b/erpnext/selling/print_format/quotation_classic/quotation_classic.json deleted file mode 100644 index 97d84eb63b..0000000000 --- a/erpnext/selling/print_format/quotation_classic/quotation_classic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:51", - "doc_type": "Quotation", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.203008", - "modified_by": "Administrator", - "module": "Selling", - "name": "Quotation Classic", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/selling/print_format/quotation_modern/quotation_modern.json b/erpnext/selling/print_format/quotation_modern/quotation_modern.json deleted file mode 100644 index d0db3b4531..0000000000 --- a/erpnext/selling/print_format/quotation_modern/quotation_modern.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:51", - "doc_type": "Quotation", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.221414", - "modified_by": "Administrator", - "module": "Selling", - "name": "Quotation Modern", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/selling/print_format/quotation_spartan/quotation_spartan.json b/erpnext/selling/print_format/quotation_spartan/quotation_spartan.json deleted file mode 100644 index 7532e91bdd..0000000000 --- a/erpnext/selling/print_format/quotation_spartan/quotation_spartan.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:51", - "doc_type": "Quotation", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.233782", - "modified_by": "Administrator", - "module": "Selling", - "name": "Quotation Spartan", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/selling/print_format/sales_order_classic/sales_order_classic.json b/erpnext/selling/print_format/sales_order_classic/sales_order_classic.json deleted file mode 100644 index 7fbfed4214..0000000000 --- a/erpnext/selling/print_format/sales_order_classic/sales_order_classic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:51", - "doc_type": "Sales Order", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.286220", - "modified_by": "Administrator", - "module": "Selling", - "name": "Sales Order Classic", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/selling/print_format/sales_order_modern/sales_order_modern.json b/erpnext/selling/print_format/sales_order_modern/sales_order_modern.json deleted file mode 100644 index 011bbc7634..0000000000 --- a/erpnext/selling/print_format/sales_order_modern/sales_order_modern.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:51", - "doc_type": "Sales Order", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.295735", - "modified_by": "Administrator", - "module": "Selling", - "name": "Sales Order Modern", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/selling/print_format/sales_order_spartan/sales_order_spartan.json b/erpnext/selling/print_format/sales_order_spartan/sales_order_spartan.json deleted file mode 100644 index ce08e7cc1c..0000000000 --- a/erpnext/selling/print_format/sales_order_spartan/sales_order_spartan.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:30:51", - "doc_type": "Sales Order", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.303303", - "modified_by": "Administrator", - "module": "Selling", - "name": "Sales Order Spartan", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 9b43a71934..89cbc94bf0 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -341,6 +341,11 @@ "fieldtype": "Section Break", "permlevel": 0 }, + { + "fieldname": "column_break_33", + "fieldtype": "Column Break", + "permlevel": 0 + }, { "fieldname": "net_total_export", "fieldtype": "Currency", @@ -349,11 +354,6 @@ "permlevel": 0, "read_only": 1 }, - { - "fieldname": "column_break_33", - "fieldtype": "Column Break", - "permlevel": 0 - }, { "fieldname": "net_total", "fieldtype": "Currency", @@ -1009,7 +1009,7 @@ "idx": 1, "in_create": 0, "is_submittable": 1, - "modified": "2014-07-10 02:45:47.673011", + "modified": "2014-07-21 05:28:55.380728", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index 4ea3864258..66a954318f 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -230,15 +230,18 @@ "permlevel": 0 }, { - "fieldname": "net_total_import", + "fieldname": "net_total", "fieldtype": "Currency", - "label": "Net Total", - "oldfieldname": "net_total_import", + "label": "Net Total (Company Currency)", + "oldfieldname": "net_total", "oldfieldtype": "Currency", - "options": "currency", + "options": "Company:company:default_currency", "permlevel": 0, - "print_hide": 0, - "read_only": 1 + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "reqd": 1, + "width": "150px" }, { "fieldname": "get_current_stock", @@ -255,18 +258,15 @@ "permlevel": 0 }, { - "fieldname": "net_total", + "fieldname": "net_total_import", "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", + "label": "Net Total", + "oldfieldname": "net_total_import", "oldfieldtype": "Currency", - "options": "Company:company:default_currency", + "options": "currency", "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "reqd": 1, - "width": "150px" + "print_hide": 0, + "read_only": 1 }, { "description": "Add / Edit Taxes and Charges", @@ -314,56 +314,6 @@ "options": "icon-money", "permlevel": 0 }, - { - "fieldname": "other_charges_added_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Added", - "oldfieldname": "other_charges_added_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "other_charges_deducted_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted", - "oldfieldname": "other_charges_deducted_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "grand_total_import", - "fieldtype": "Currency", - "label": "Grand Total", - "oldfieldname": "grand_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "in_words_import", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_import", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "read_only": 1 - }, - { - "fieldname": "column_break3", - "fieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", - "width": "50%" - }, { "fieldname": "other_charges_added", "fieldtype": "Currency", @@ -430,6 +380,56 @@ "print_hide": 1, "read_only": 1 }, + { + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", + "width": "50%" + }, + { + "fieldname": "other_charges_added_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Added", + "oldfieldname": "other_charges_added_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "other_charges_deducted_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted", + "oldfieldname": "other_charges_deducted_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "grand_total_import", + "fieldtype": "Currency", + "label": "Grand Total", + "oldfieldname": "grand_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, + { + "fieldname": "in_words_import", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_import", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 1 + }, { "fieldname": "terms_section_break", "fieldtype": "Section Break", @@ -762,7 +762,7 @@ "icon": "icon-truck", "idx": 1, "is_submittable": 1, - "modified": "2014-06-23 07:55:50.761516", + "modified": "2014-07-21 05:43:28.156516", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", diff --git a/erpnext/stock/page/stock_balance/stock_balance.js b/erpnext/stock/page/stock_balance/stock_balance.js index 0503c8bb27..1083414725 100644 --- a/erpnext/stock/page/stock_balance/stock_balance.js +++ b/erpnext/stock/page/stock_balance/stock_balance.js @@ -12,9 +12,7 @@ frappe.pages['stock-balance'].onload = function(wrapper) { new erpnext.StockBalance(wrapper); - - wrapper.appframe.add_module_icon("Stock") - + wrapper.appframe.add_module_icon("Stock"); } erpnext.StockBalance = erpnext.StockAnalytics.extend({ diff --git a/erpnext/stock/print_format/delivery_note_classic/delivery_note_classic.json b/erpnext/stock/print_format/delivery_note_classic/delivery_note_classic.json deleted file mode 100644 index 1304fdec26..0000000000 --- a/erpnext/stock/print_format/delivery_note_classic/delivery_note_classic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:31:11", - "doc_type": "Delivery Note", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.088869", - "modified_by": "Administrator", - "module": "Stock", - "name": "Delivery Note Classic", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/stock/print_format/delivery_note_modern/delivery_note_modern.json b/erpnext/stock/print_format/delivery_note_modern/delivery_note_modern.json deleted file mode 100644 index c523fba3c4..0000000000 --- a/erpnext/stock/print_format/delivery_note_modern/delivery_note_modern.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:31:11", - "doc_type": "Delivery Note", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.122031", - "modified_by": "Administrator", - "module": "Stock", - "name": "Delivery Note Modern", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/stock/print_format/delivery_note_spartan/delivery_note_spartan.json b/erpnext/stock/print_format/delivery_note_spartan/delivery_note_spartan.json deleted file mode 100644 index 2d6ef68e12..0000000000 --- a/erpnext/stock/print_format/delivery_note_spartan/delivery_note_spartan.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "creation": "2013-04-19 13:31:11", - "doc_type": "Delivery Note", - "docstatus": 0, - "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n", - "idx": 1, - "modified": "2014-05-13 16:07:19.136421", - "modified_by": "Administrator", - "module": "Stock", - "name": "Delivery Note Spartan", - "owner": "Administrator", - "print_format_type": "Client", - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/templates/print_formats/includes/item_grid.html b/erpnext/templates/print_formats/includes/item_grid.html index f9d3c1f5e8..e837966de6 100644 --- a/erpnext/templates/print_formats/includes/item_grid.html +++ b/erpnext/templates/print_formats/includes/item_grid.html @@ -1,5 +1,5 @@ {%- from "templates/print_formats/standard_macros.html" import print_value -%} -{%- set std_fields = ("item_code", "item_name", "description", "qty", "rate", "amount", "stock_uom") -%} +{%- set std_fields = ("item_code", "item_name", "description", "qty", "rate", "amount", "stock_uom", "uom") -%} {%- set visible_columns = get_visible_columns(doc.get(df.fieldname), table_meta) -%} @@ -30,7 +30,7 @@ {{ frappe.format_value(row[field.fieldname], field, doc) }}

{%- endif -%} {%- endfor -%} - + diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html index e23b49cb9b..56a086f32b 100644 --- a/erpnext/templates/print_formats/includes/taxes.html +++ b/erpnext/templates/print_formats/includes/taxes.html @@ -6,8 +6,8 @@
-
- {{ format(charge.tax_amount / doc.conversion_rate, +
+ {{ frappe.format_value(charge.tax_amount / doc.conversion_rate, table_meta.get_field("tax_amount"), doc) }}
{{ row.qty }} {{ row.stock_uom }}{{ row.qty }} {{ row.uom or row.stock_uom }} {{ frappe.format_value(row.rate, table_meta.get_field("rate"), doc) }}