many fixes to print

This commit is contained in:
Rushabh Mehta 2014-07-21 18:25:45 +05:30 committed by Anand Doshi
parent d82352eacc
commit 5b51cc86a9
38 changed files with 480 additions and 924 deletions

View File

@ -264,22 +264,6 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "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", "description": "Will be calculated automatically when you enter the details",
"fieldname": "net_total", "fieldname": "net_total",
@ -292,6 +276,22 @@
"print_hide": 1, "print_hide": 1,
"read_only": 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", "fieldname": "taxes",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -340,6 +340,59 @@
"permlevel": 0, "permlevel": 0,
"read_only": 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", "fieldname": "other_charges_added_import",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -409,6 +462,17 @@
"print_hide": 1, "print_hide": 1,
"read_only": 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", "fieldname": "outstanding_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -424,70 +488,6 @@
"read_only": 1, "read_only": 1,
"search_index": 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", "fieldname": "write_off_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -601,6 +601,7 @@
"label": "Supplier Address", "label": "Supplier Address",
"options": "Address", "options": "Address",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 0 "read_only": 0
}, },
{ {
@ -752,7 +753,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-19 15:50:50.898237", "modified": "2014-07-21 05:33:36.332474",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice", "name": "Purchase Invoice",

View File

@ -311,20 +311,6 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "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", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -337,6 +323,20 @@
"read_only": 1, "read_only": 1,
"reqd": 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", "fieldname": "taxes",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -445,70 +445,6 @@
"print_hide": 1, "print_hide": 1,
"read_only": 0 "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", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -569,6 +505,70 @@
"print_hide": 1, "print_hide": 1,
"read_only": 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", "fieldname": "advances",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -1188,7 +1188,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-19 16:01:19.720382", "modified": "2014-07-21 05:31:24.670731",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice", "name": "Sales Invoice",

View File

@ -721,11 +721,13 @@ def make_new_invoice(ref_wrapper, posting_date):
def send_notification(new_rv): def send_notification(new_rv):
"""Notify concerned persons about recurring invoice generation""" """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, frappe.sendmail(new_rv.notification_email_address,
subject="New Invoice : " + new_rv.name, 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): def notify_errors(inv, customer, owner):
from frappe.utils.user import get_system_managers from frappe.utils.user import get_system_managers

View File

@ -3,9 +3,9 @@
"doc_type": "Journal Voucher", "doc_type": "Journal Voucher",
"docstatus": 0, "docstatus": 0,
"doctype": "Print Format", "doctype": "Print Format",
"html": "<!-- p.big {line-height: 200%} .noborder td { border: 0px solid #fff; } -->\n<div style=\"position: relative;\">\n<h3><script>doc.company</script><br /> <br /> \n<hr />\nPAYMENT ADVICE</h3>\n<table class=\"noborder\" style=\"width: 100%;\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top;\" width=\"50%\">To :<br />\n<script type=\"text/javascript\">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</td>\n<td width=\"50%\">\n<table class=\"noborder\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"30%\">Voucher No :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.name\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Voucher Date :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.voucher_date)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Cheque No :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_no)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Cheque Date :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<br /> <strong>We are pleased to enclose our cheque in full/part Settlement of your under noted bills</strong> <br /> \n<hr />\n<table class=\"noborder\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"70%\">&nbsp;</td>\n<td width=\"15%\">Total :</td>\n<td class=\"pos_left\" width=\"15%\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\">Narration :\n<script type=\"text/javascript\">// <![CDATA[\nreplace_newlines(doc.remark)\n// ]]></script>\n<br /><br /><br /></td>\n</tr>\n</tbody>\n</table>\n<div style=\"position: absolute; top: 14cm; left: 0cm;\">Prepared By</div>\n<div style=\"position: absolute; top: 14cm; left: 5.5cm;\">Authorised Signatory</div>\n<div style=\"position: absolute; top: 14cm; left: 11cm;\">Received Payment as Above</div>\n<div style=\"position: absolute; top: 16.4cm; left: 5.9cm;\"><strong>_____________</strong></div>\n<div style=\"position: absolute; top: 16.7cm; left: 6cm;\"><strong>A/c Payee</strong></div>\n<div style=\"position: absolute; top: 16.7cm; left: 5.9cm;\"><strong>_____________</strong></div>\n<div style=\"position: absolute; top: 16.9cm; left: 12cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 17.9cm; left: 1cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 18.6cm; left: 1cm; width: 7cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount_in_words\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 19.7cm; left: 12cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</div>\n</div>", "html": "<div style=\"position: relative\">\n\n\t{% if letter_head and not no_letterhead %}{{ letter_head }}{%- endif -%}\n\t<h4>{{ _(\"Payment Advice\") }}</h4>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"To\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ doc.pay_to_recd_from }}</div>\n\t</div>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"Voucher No\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ doc.name }}</div>\n\t</div>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"Voucher Date\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ frappe.utils.formatdate(doc.voucher_date) }}</div>\n\t</div>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"Reference / Cheque No\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ doc.cheque_no }}</div>\n\t</div>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"Reference / Cheque Date\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ frappe.utils.formatdate(doc.cheque_date) }}</div>\n\t</div>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"Voucher Date\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ frappe.utils.formatdate(doc.voucher_date) }}</div>\n\t</div>\n\t<br>\n\t<p>{{ _(\"This amount is in full / part settlement of the listed bills\") }}:</p>\n\t<hr>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"Total Amount\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ \n\t \tfrappe.format_value(doc.total_amount, doc.meta.get_field(\"total_amount\"), doc) }}</div>\n\t</div>\n\t<div class=\"row\">\n\t <div class=\"col-sm-3\"><label>{{ _(\"References\") }}:</label></div>\n\t <div class=\"col-sm-9\">{{ doc.remark }}</div>\n\t</div>\n\n\t<div style=\"position: absolute; top: 14cm; left: 0cm;\">\n\t\tPrepared By</div>\n\t<div style=\"position: absolute; top: 14cm; left: 5.5cm;\">\n\t\tAuthorised Signatory</div>\n\t<div style=\"position: absolute; top: 14cm; left: 11cm;\">\n\t\tReceived Payment as Above</div>\n\t<div style=\"position: absolute; top: 16.4cm; left: 5.9cm;\">\n\t\t<strong>_____________</strong></div>\n\t<div style=\"position: absolute; top: 16.7cm; left: 6cm;\">\n\t\t<strong>A/C Payee</strong></div>\n\t<div style=\"position: absolute; top: 16.7cm; left: 5.9cm;\">\n\t\t<strong>_____________</strong></div>\n\t<div style=\"position: absolute; top: 16.9cm; left: 12cm;\">\n\t\t{{ frappe.utils.formatdate(doc.cheque_date) }}</div>\n\t<div style=\"position: absolute; top: 17.9cm; left: 1cm;\">\n\t\t{{ doc.pay_to_recd_from }}</div>\n\t<div style=\"position: absolute; top: 18.6cm; left: 1cm; width: 7cm;\">\n\t\t{{ doc.total_amount_in_words }}</div>\n\t<div style=\"position: absolute; top: 19.7cm; left: 12cm;\">\n\t\t{{ doc.total_amount }}</div>\n</div>",
"idx": 1, "idx": 1,
"modified": "2014-05-13 16:07:18.792349", "modified": "2014-07-21 08:53:57.749885",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Cheque Printing Format", "name": "Cheque Printing Format",

View File

@ -3,12 +3,13 @@
"doc_type": "Journal Voucher", "doc_type": "Journal Voucher",
"docstatus": 0, "docstatus": 0,
"doctype": "Print Format", "doctype": "Print Format",
"html": "<h3 align=\"center\"><script>doc.select_print_heading || \"Payment Receipt Note\"</script></h3>\n\n<table class='simpletable'>\n<tr>\n<td><b> Receipt No.: </b></td>\n<td><script>doc.name</script></td>\n</tr>\n<tr>\n<td><b> Date : </b></td>\n<td><script>date.str_to_user(doc.voucher_date)</script></td>\n</tr> \n<tr>\n<td><b> Remark: </b></td>\n<td><script> doc.remark </script></td>\n</tr>\n<tr>\n<td><b> Received From: </b></td>\n<td><b><script> doc.pay_to_recd_from </script></b></td>\n</tr>\n</table>\n<br>\n\n<div><b><script>doc.total_amount</script></b> </td></div><br>\n<div style=\"text-align:left\"><b><script>doc.total_amount_in_words</script></b></div><br>\n<br>\n<table class=\"noborder\">\n<tr>\n<td style = \"text-align = right;\"><h3>For <script>doc.company</script>,</h3><br><div>(Authorised Signatory)</div></td>\n</tr>\n</table>", "html": "<h3 class=\"text-center\">{{ doc.select_print_heading or _(\"Payment Receipt Note\") }}</h3>\n<hr>\n<div class=\"row\">\n <div class=\"col-sm-3\"><label>{{ _(\"Receipt No\") }}:</label></div>\n <div class=\"col-sm-9\">{{ doc.name }}</div>\n</div>\n<div class=\"row\">\n <div class=\"col-sm-3\"><label>{{ _(\"Received On\") }}:</label></div>\n <div class=\"col-sm-9\">{{ frappe.utils.formatdate(doc.voucher_date) }}</div>\n</div>\n<div class=\"row\">\n <div class=\"col-sm-3\"><label>{{ _(\"Remark\") }}:</label></div>\n <div class=\"col-sm-9\">{{ doc.remark }}</div>\n</div>\n<div class=\"row\">\n <div class=\"col-sm-3\"><label>{{ _(\"Received From\") }}:</label></div>\n <div class=\"col-sm-9\">{{ doc.pay_to_recd_from }}</div>\n</div>\n<div class=\"row\">\n <div class=\"col-sm-3\"><label>{{ _(\"Total Amount\") }}:</label></div>\n <div class=\"col-sm-9\">{{ doc.total_amount }}<br>{{ doc.total_amount_in_words }}</div>\n</div>\n<br>\n<p>\n{{ _(\"For\") }} {{ doc.company }},<br>\n<br>\n<br>\n<br>\n{{ _(\"Authorized Signatory\") }}</p>",
"idx": 1, "idx": 1,
"modified": "2014-05-13 16:07:19.144006", "modified": "2014-07-21 08:53:17.393966",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Payment Receipt Voucher", "name": "Payment Receipt Voucher",
"owner": "Administrator", "owner": "Administrator",
"print_format_type": "Server",
"standard": "Yes" "standard": "Yes"
} }

View File

@ -1,135 +0,0 @@
{%- if doc.letter_head -%}
{{ frappe.db.get_value("Letter Head", doc.letter_head, "content") }}
{%- endif -%}
<!-- Page Layout Settings -->
<div class='common page-header'>
<table class='header-table' cellspacing=0 style="width: 100%">
<thead>
<tr><td colspan="2"><h1>{{ doc.select_print_heading or 'Invoice' }}</h1></td></tr>
<tr><td colspan="2"><h3>{{ doc.name }}</h3></td></tr>
</thead>
<tbody>
<tr>
<td width=60%><table width=100% cellspacing=0><tbody>
<tr>
<td width=39%><b>Name</b></td>
<td>{{ doc.customer_name }}</td>
</tr>
<tr>
<td><b>Address</b></td>
<td>{{ doc.address_display.replace("\n", "<br>") }}</td>
</tr>
<tr>
<td><b>Contact</b></td>
<td>{{ doc.contact_display }}</td>
</tr>
</tbody></table></td>
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td>{{ utils.formatdate(doc.posting_date) }}</td>
</tr>
{%- if doc.convert_into_recurring_invoice and doc.recurring_id -%}
<tr>
<td width=40%><b>Invoice Period</b></td>
<td>{{ (utils.formatdate(doc.invoice_period_from_date)) +
' to ' + utils.formatdate(doc.invoice_period_to_date) }}</td>
</tr>
{%- endif -%}
<tr>
<td><b>Due Date</b></td>
<td>{{ utils.formatdate(doc.due_date) }}</td>
</tr>
</tbody></table></td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div class='common page-body'>
<!--
Page Body will contain
+ table 2
- Sales Invoice Data
-->
<table class="table table-bordered">
<tbody>
<tr>
<th>Sr</th>
<th>Item Name</th>
<th>Description</th>
<th>Qty</th>
<th>UoM</th>
<th>Basic Rate</th>
<th>Amount</th>
</tr>
{%- for row in doc.get({"doctype":"Sales Invoice Item"}) %}
<tr>
<td style="width: 3%;">{{ row.idx }}</td>
<td style="width: 20%;">{{ row.item_name }}</td>
<td style="width: 37%;">{{ row.description }}</td>
<td style="width: 5%; text-align: right;">{{ row.qty }}</td>
<td style="width: 5%;">{{ row.stock_uom }}</td>
<td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.rate, currency=doc.currency) }}</td>
<td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.amount, currency=doc.currency) }}</td>
</tr>
{% endfor -%}
</tbody>
</table>
</div>
<div class='common page-footer'>
<!--
Page Footer will contain
+ table 3
- Terms and Conditions
- Total Rounded Amount Calculation
- Total Rounded Amount in Words
-->
<table class='footer-table' width=100% cellspacing=0>
<thead>
</thead>
<tbody>
<tr>
<td width=60% style='padding-right: 10px;'>
<b>Terms, Conditions &amp; Other Information:</b><br />
{{ doc.terms }}
</td>
<td>
<table cellspacing=0 width=100%>
<tbody>
<tr>
<td>Net Total</td>
<td width=40% style="text-align: right;">{{
utils.fmt_money(doc.net_total_export, currency=doc.currency)
}}</td>
</tr>
{%- for charge in doc.get({"doctype":"Sales Taxes and Charges"}) -%}
{%- if not charge.included_in_print_rate -%}
<tr>
<td>{{ charge.description }}</td>
<td style="text-align: right;">{{ utils.fmt_money(charge.tax_amount / doc.conversion_rate, currency=doc.currency) }}</td>
</tr>
{%- endif -%}
{%- endfor -%}
<tr>
<td>Grand Total</td>
<td style="text-align: right;">{{ utils.fmt_money(doc.grand_total_export, currency=doc.currency) }}</td>
</tr>
<tr style='font-weight: bold'>
<td>Rounded Total</td>
<td style="text-align: right;">{{ utils.fmt_money(doc.rounded_total_export, currency=doc.currency) }}</td>
</tr>
</tbody>
</table>
<br /><b>In Words</b><br />
<i>{{ doc.in_words_export }}</i>
</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>

View File

@ -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"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -230,6 +230,24 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "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", "fieldname": "net_total_import",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -250,24 +268,6 @@
"permlevel": 0, "permlevel": 0,
"print_hide": 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", "fieldname": "taxes",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -316,63 +316,6 @@
"options": "icon-money", "options": "icon-money",
"permlevel": 0 "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", "fieldname": "other_charges_added",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -421,6 +364,17 @@
"print_hide": 1, "print_hide": 1,
"read_only": 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", "fieldname": "rounded_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -433,14 +387,60 @@
"read_only": 1 "read_only": 1
}, },
{ {
"description": "In Words will be visible once you save the Purchase Order.", "fieldname": "column_break4",
"fieldname": "in_words", "fieldtype": "Column Break",
"fieldtype": "Data", "oldfieldtype": "Column Break",
"label": "In Words (Company Currency)", "permlevel": 0,
"oldfieldname": "in_words", "print_hide": 0
"oldfieldtype": "Data", },
{
"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, "permlevel": 0,
"print_hide": 1, "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 "read_only": 1
}, },
{ {
@ -645,7 +645,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-23 07:55:50.372486", "modified": "2014-07-21 05:34:36.390448",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order", "name": "Purchase Order",

View File

@ -229,23 +229,6 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "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", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -259,6 +242,23 @@
"read_only": 1, "read_only": 1,
"reqd": 0 "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", "fieldname": "taxes",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -571,7 +571,7 @@
"icon": "icon-shopping-cart", "icon": "icon-shopping-cart",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-23 07:55:52.993616", "modified": "2014-07-21 05:30:30.367353",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Supplier Quotation", "name": "Supplier Quotation",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,13 @@ from erpnext.accounts.party import get_party_details
from erpnext.controllers.stock_controller import StockController from erpnext.controllers.stock_controller import StockController
class BuyingController(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): def validate(self):
super(BuyingController, self).validate() super(BuyingController, self).validate()
if getattr(self, "supplier", None) and not self.supplier_name: if getattr(self, "supplier", None) and not self.supplier_name:

View File

@ -11,6 +11,7 @@ from erpnext.controllers.stock_controller import StockController
class SellingController(StockController): class SellingController(StockController):
def __setup__(self): def __setup__(self):
if hasattr(self, "fname"):
self.table_print_templates = { self.table_print_templates = {
self.fname: "templates/print_formats/includes/item_grid.html", self.fname: "templates/print_formats/includes/item_grid.html",
"other_charges": "templates/print_formats/includes/taxes.html", "other_charges": "templates/print_formats/includes/taxes.html",

View File

@ -76,14 +76,8 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Letter Head", "label": "Letter Head",
"options": "Letter Head", "options": "Letter Head",
"permlevel": 0
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"width": "50%" "print_hide": 1
}, },
{ {
"fieldname": "fiscal_year", "fieldname": "fiscal_year",
@ -107,6 +101,13 @@
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
{ {
"fieldname": "month", "fieldname": "month",
"fieldtype": "Select", "fieldtype": "Select",
@ -123,8 +124,8 @@
}, },
{ {
"fieldname": "total_days_in_month", "fieldname": "total_days_in_month",
"fieldtype": "Data", "fieldtype": "Float",
"label": "Total Working Days In The Month", "label": "Working Days",
"oldfieldname": "total_days_in_month", "oldfieldname": "total_days_in_month",
"oldfieldtype": "Int", "oldfieldtype": "Int",
"permlevel": 0, "permlevel": 0,
@ -208,6 +209,12 @@
"reqd": 0, "reqd": 0,
"width": "50%" "width": "50%"
}, },
{
"fieldname": "html_21",
"fieldtype": "HTML",
"options": "<label>Earnings</label>",
"permlevel": 0
},
{ {
"fieldname": "earning_details", "fieldname": "earning_details",
"fieldtype": "Table", "fieldtype": "Table",
@ -225,6 +232,12 @@
"permlevel": 0, "permlevel": 0,
"width": "50%" "width": "50%"
}, },
{
"fieldname": "html_24",
"fieldtype": "HTML",
"options": "<label>Deductions</label>",
"permlevel": 0
},
{ {
"fieldname": "deduction_details", "fieldname": "deduction_details",
"fieldtype": "Table", "fieldtype": "Table",
@ -242,11 +255,14 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "column_break2", "fieldname": "column_break_25",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "permlevel": 0
"permlevel": 0, },
"width": "50%" {
"fieldname": "column_break_26",
"fieldtype": "Column Break",
"permlevel": 0
}, },
{ {
"fieldname": "arrear_amount", "fieldname": "arrear_amount",
@ -286,13 +302,6 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "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", "description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction",
"fieldname": "net_pay", "fieldname": "net_pay",
@ -326,7 +335,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-23 07:55:52.259962", "modified": "2014-07-21 07:58:08.033784",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Salary Slip", "name": "Salary Slip",

View File

@ -186,109 +186,14 @@ class SalarySlip(TransactionBase):
def send_mail_funct(self): def send_mail_funct(self):
from frappe.utils.email_lib import sendmail from frappe.utils.email_lib import sendmail
receiver = frappe.db.get_value("Employee", self.employee, "company_email") receiver = frappe.db.get_value("Employee", self.employee, "company_email")
if receiver: if receiver:
subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year) 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` sendmail([receiver], subject=subj, msg = _("Please see attachment"),
where parent = %s""", self.name) attachments={
ded_ret=frappe.db.sql("""select d_type, d_modified_amount from `tabSalary Slip Deduction` "fname": self.name + ".pdf",
where parent = %s""", self.name) "fcontent": frappe.get_print_format(self.doctype, self.name, as_pdf = True)
})
earn_table = ''
ded_table = ''
if earn_ret:
earn_table += "<table cellspacing=5px cellpadding=5px width='100%%'>"
for e in earn_ret:
if not e[1]:
earn_table += '<tr><td>%s</td><td align="right">0.00</td></tr>' % cstr(e[0])
else:
earn_table += '<tr><td>%s</td><td align="right">%s</td></tr>' \
% (cstr(e[0]), cstr(e[1]))
earn_table += '</table>'
if ded_ret:
ded_table += "<table cellspacing=5px cellpadding=5px width='100%%'>"
for d in ded_ret:
if not d[1]:
ded_table +='<tr><td">%s</td><td align="right">0.00</td></tr>' % cstr(d[0])
else:
ded_table +='<tr><td>%s</td><td align="right">%s</td></tr>' \
% (cstr(d[0]), cstr(d[1]))
ded_table += '</table>'
letter_head = frappe.db.get_value("Letter Head", {"is_default": 1, "disabled": 0},
"content")
msg = '''<div> %s <br>
<table cellspacing= "5" cellpadding="5" width = "100%%">
<tr>
<td width = "100%%" colspan = "2"><h4>Salary Slip</h4></td>
</tr>
<tr>
<td width = "50%%"><b>Employee Code : %s</b></td>
<td width = "50%%"><b>Employee Name : %s</b></td>
</tr>
<tr>
<td width = "50%%">Month : %s</td>
<td width = "50%%">Fiscal Year : %s</td>
</tr>
<tr>
<td width = "50%%">Department : %s</td>
<td width = "50%%">Branch : %s</td>
</tr>
<tr>
<td width = "50%%">Designation : %s</td>
</tr>
<tr>
<td width = "50%%">Bank Account No. : %s</td>
<td width = "50%%">Bank Name : %s</td>
</tr>
<tr>
<td width = "50%%">Arrear Amount : <b>%s</b></td>
<td width = "50%%">Payment days : %s</td>
</tr>
</table>
<table border="1px solid #CCC" width="100%%" cellpadding="0px" cellspacing="0px">
<tr>
<td colspan = 2 width = "50%%" bgcolor="#CCC" align="center">
<b>Earnings</b></td>
<td colspan = 2 width = "50%%" bgcolor="#CCC" align="center">
<b>Deductions</b></td>
</tr>
<tr>
<td colspan = 2 width = "50%%" valign= "top">%s</td>
<td colspan = 2 width = "50%%" valign= "top">%s</td>
</tr>
</table>
<table cellspacing= "5" cellpadding="5" width = '100%%'>
<tr>
<td width = '25%%'><b>Gross Pay :</b> </td>
<td width = '25%%' align='right'>%s</td>
<td width = '25%%'><b>Total Deduction :</b></td>
<td width = '25%%' align='right'> %s</td>
</tr>
<tr>
<tdwidth='25%%'><b>Net Pay : </b></td>
<td width = '25%%' align='right'><b>%s</b></td>
<td colspan = '2' width = '50%%'></td>
</tr>
<tr>
<td width='25%%'><b>Net Pay(in words) : </td>
<td colspan = '3' width = '50%%'>%s</b></td>
</tr>
</table></div>''' % (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)
else: else:
msgprint(_("Company Email ID not found, hence mail not sent")) msgprint(_("Company Email ID not found, hence mail not sent"))

View File

@ -1,5 +1,5 @@
{ {
"creation": "2013-02-22 01:27:48.000000", "creation": "2013-02-22 01:27:48",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
@ -19,18 +19,19 @@
"fieldname": "d_amount", "fieldname": "d_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"in_list_view": 1, "in_list_view": 1,
"label": "Amount", "label": "Default Amount",
"oldfieldname": "d_amount", "oldfieldname": "d_amount",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "d_modified_amount", "fieldname": "d_modified_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"in_list_view": 1, "in_list_view": 1,
"label": "Modified Amount", "label": "Amount",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0 "permlevel": 0
}, },
@ -39,14 +40,16 @@
"fieldtype": "Check", "fieldtype": "Check",
"in_list_view": 1, "in_list_view": 1,
"label": "Depends on LWP", "label": "Depends on LWP",
"permlevel": 0 "permlevel": 0,
"print_hide": 1
} }
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2013-12-20 19:23:42.000000", "modified": "2014-07-21 07:38:36.059879",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Salary Slip Deduction", "name": "Salary Slip Deduction",
"owner": "Administrator" "owner": "Administrator",
"permissions": []
} }

View File

@ -1,5 +1,5 @@
{ {
"creation": "2013-02-22 01:27:48.000000", "creation": "2013-02-22 01:27:48",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
@ -19,18 +19,19 @@
"fieldname": "e_amount", "fieldname": "e_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"in_list_view": 1, "in_list_view": 1,
"label": "Amount", "label": "Default Amount",
"oldfieldname": "e_amount", "oldfieldname": "e_amount",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "e_modified_amount", "fieldname": "e_modified_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"in_list_view": 1, "in_list_view": 1,
"label": "Modified Amount", "label": "Amount",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0 "permlevel": 0
}, },
@ -39,14 +40,16 @@
"fieldtype": "Check", "fieldtype": "Check",
"in_list_view": 1, "in_list_view": 1,
"label": "Depends on LWP", "label": "Depends on LWP",
"permlevel": 0 "permlevel": 0,
"print_hide": 1
} }
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2013-12-20 19:23:43.000000", "modified": "2014-07-21 07:39:01.262050",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Salary Slip Earning", "name": "Salary Slip Earning",
"owner": "Administrator" "owner": "Administrator",
"permissions": []
} }

View File

@ -313,19 +313,6 @@
"permlevel": 0, "permlevel": 0,
"read_only": 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", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -340,6 +327,19 @@
"reqd": 0, "reqd": 0,
"width": "100px" "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", "fieldname": "taxes",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -448,6 +448,55 @@
"print_hide": 1, "print_hide": 1,
"read_only": 0 "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", "fieldname": "grand_total_export",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -489,55 +538,6 @@
"read_only": 1, "read_only": 1,
"width": "200px" "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", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -827,7 +827,7 @@
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"max_attachments": 1, "max_attachments": 1,
"modified": "2014-06-23 07:55:51.859025", "modified": "2014-07-21 05:44:26.800041",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Quotation", "name": "Quotation",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -341,6 +341,11 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "column_break_33",
"fieldtype": "Column Break",
"permlevel": 0
},
{ {
"fieldname": "net_total_export", "fieldname": "net_total_export",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -349,11 +354,6 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "column_break_33",
"fieldtype": "Column Break",
"permlevel": 0
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -1009,7 +1009,7 @@
"idx": 1, "idx": 1,
"in_create": 0, "in_create": 0,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-07-10 02:45:47.673011", "modified": "2014-07-21 05:28:55.380728",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note", "name": "Delivery Note",

View File

@ -230,15 +230,18 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "net_total_import", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Net Total", "label": "Net Total (Company Currency)",
"oldfieldname": "net_total_import", "oldfieldname": "net_total",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 1,
"read_only": 1 "print_width": "150px",
"read_only": 1,
"reqd": 1,
"width": "150px"
}, },
{ {
"fieldname": "get_current_stock", "fieldname": "get_current_stock",
@ -255,18 +258,15 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "net_total", "fieldname": "net_total_import",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Net Total (Company Currency)", "label": "Net Total",
"oldfieldname": "net_total", "oldfieldname": "net_total_import",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 0,
"print_width": "150px", "read_only": 1
"read_only": 1,
"reqd": 1,
"width": "150px"
}, },
{ {
"description": "Add / Edit Taxes and Charges", "description": "Add / Edit Taxes and Charges",
@ -314,56 +314,6 @@
"options": "icon-money", "options": "icon-money",
"permlevel": 0 "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", "fieldname": "other_charges_added",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -430,6 +380,56 @@
"print_hide": 1, "print_hide": 1,
"read_only": 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", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -762,7 +762,7 @@
"icon": "icon-truck", "icon": "icon-truck",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-23 07:55:50.761516", "modified": "2014-07-21 05:43:28.156516",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt", "name": "Purchase Receipt",

View File

@ -12,9 +12,7 @@ frappe.pages['stock-balance'].onload = function(wrapper) {
new erpnext.StockBalance(wrapper); new erpnext.StockBalance(wrapper);
wrapper.appframe.add_module_icon("Stock");
wrapper.appframe.add_module_icon("Stock")
} }
erpnext.StockBalance = erpnext.StockAnalytics.extend({ erpnext.StockBalance = erpnext.StockAnalytics.extend({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{%- from "templates/print_formats/standard_macros.html" import print_value -%} {%- 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) -%} {%- set visible_columns = get_visible_columns(doc.get(df.fieldname), table_meta) -%}
<table class="table table-bordered"> <table class="table table-bordered">
@ -30,7 +30,7 @@
{{ frappe.format_value(row[field.fieldname], field, doc) }}</p> {{ frappe.format_value(row[field.fieldname], field, doc) }}</p>
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
<td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.stock_uom }}</td> <td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.uom or row.stock_uom }}</td>
<td style="width: 15%; text-align: right;">{{ <td style="width: 15%; text-align: right;">{{
frappe.format_value(row.rate, frappe.format_value(row.rate,
table_meta.get_field("rate"), doc) }}</td> table_meta.get_field("rate"), doc) }}</td>

View File

@ -6,8 +6,8 @@
<div class="row"> <div class="row">
<div class="col-md-4 text-right"> <div class="col-md-4 text-right">
<label>{{ charge.description }}</label></div> <label>{{ charge.description }}</label></div>
<div class="col-md-8"> <div class="col-md-8 text-right">
{{ format(charge.tax_amount / doc.conversion_rate, {{ frappe.format_value(charge.tax_amount / doc.conversion_rate,
table_meta.get_field("tax_amount"), doc) }} table_meta.get_field("tax_amount"), doc) }}
</div> </div>
</div> </div>