Merge pull request #1986 from anandpdoshi/rmehta-print-formats

Print Formats (by Rushabh)
This commit is contained in:
Anand Doshi
2014-07-25 13:58:18 +05:30
66 changed files with 890 additions and 1201 deletions

View File

@@ -14,6 +14,9 @@ install:
- sudo apt-get update - sudo apt-get update
- sudo apt-get purge -y mysql-common - sudo apt-get purge -y mysql-common
- sudo apt-get install mariadb-server mariadb-common libmariadbclient-dev - sudo apt-get install mariadb-server mariadb-common libmariadbclient-dev
- wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-precise-amd64.deb
- sudo dpkg -i wkhtmltox-0.12.1_linux-precise-amd64.deb
- CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@$develop && - CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@$develop &&
- pip install --editable . - pip install --editable .

View File

@@ -9,7 +9,7 @@ from __future__ import unicode_literals
import os, json import os, json
import ast import ast
from xml.etree import ElementTree as ET from xml.etree import ElementTree as ET
from frappe.utils.datautils import read_csv_content from frappe.utils.csvutils import read_csv_content
from frappe.utils import cstr from frappe.utils import cstr
import frappe import frappe

View File

@@ -1,6 +1,6 @@
{ {
"autoname": "JVD.######", "autoname": "JVD.######",
"creation": "2013-02-22 01:27:39.000000", "creation": "2013-02-22 01:27:39",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
@@ -31,6 +31,7 @@
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Cost Center", "options": "Cost Center",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"print_width": "180px", "print_width": "180px",
"search_index": 0, "search_index": 0,
"width": "180px" "width": "180px"
@@ -50,6 +51,7 @@
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -158,9 +160,10 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-02-03 12:44:31.000000", "modified": "2014-07-25 03:16:51.149899",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Journal Voucher Detail", "name": "Journal Voucher Detail",
"owner": "Administrator" "owner": "Administrator",
"permissions": []
} }

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
}, },
{ {
@@ -694,7 +695,7 @@
"oldfieldname": "due_date", "oldfieldname": "due_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 1,
"read_only": 0, "read_only": 0,
"search_index": 1 "search_index": 1
}, },
@@ -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-24 08:46:13.099099",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice", "name": "Purchase Invoice",

View File

@@ -109,7 +109,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount %", "label": "Discount %",
"permlevel": 0, "permlevel": 0,
@@ -421,7 +421,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:43:40.647183", "modified": "2014-07-24 05:50:20.570629",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice Item", "name": "Purchase Invoice Item",

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

@@ -342,7 +342,7 @@ class SalesInvoice(SellingController):
def validate_pos(self): def validate_pos(self):
if not self.cash_bank_account and flt(self.paid_amount): if not self.cash_bank_account and flt(self.paid_amount):
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry")) frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
if flt(self.paid_amount) + flt(self.write_off_amount) \ if flt(self.paid_amount) + flt(self.write_off_amount) \
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)): - 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""")) 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) where docstatus = 1 and name = %s""", d.sales_order)
if not submitted: if not submitted:
frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order)) frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order))
if d.delivery_note: if d.delivery_note:
submitted = frappe.db.sql("""select name from `tabDelivery Note` submitted = frappe.db.sql("""select name from `tabDelivery Note`
where docstatus = 1 and name = %s""", d.delivery_note) where docstatus = 1 and name = %s""", d.delivery_note)
@@ -721,15 +721,17 @@ 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_rv.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
recipients=get_system_managers() recipients=get_system_managers(only_name=True)
frappe.sendmail(recipients + [frappe.db.get_value("User", owner, "email")], frappe.sendmail(recipients + [frappe.db.get_value("User", owner, "email")],
subject="[Urgent] Error while creating recurring invoice for %s" % inv, subject="[Urgent] Error while creating recurring invoice for %s" % inv,

View File

@@ -103,7 +103,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount (%)", "label": "Discount (%)",
"oldfieldname": "adj_rate", "oldfieldname": "adj_rate",
@@ -448,7 +448,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:42:28.209942", "modified": "2014-07-24 05:53:05.889457",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice Item", "name": "Sales Invoice Item",

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

File diff suppressed because one or more lines are too long

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

@@ -167,7 +167,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount %", "label": "Discount %",
"permlevel": 0, "permlevel": 0,
@@ -466,7 +466,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:42:53.018610", "modified": "2014-07-24 05:49:51.099682",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order Item", "name": "Purchase Order Item",

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",
@@ -306,63 +306,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",
@@ -433,6 +376,63 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{
"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
},
{ {
"fieldname": "terms_section_break", "fieldname": "terms_section_break",
"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-24 05:16:47.062261",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Supplier Quotation", "name": "Supplier Quotation",

View File

@@ -95,7 +95,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount %", "label": "Discount %",
"permlevel": 0, "permlevel": 0,
@@ -346,7 +346,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:44:17.347236", "modified": "2014-07-24 05:45:04.371142",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Supplier Quotation Item", "name": "Supplier Quotation Item",

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

@@ -57,6 +57,11 @@ def get_data():
"name": "SMS Center", "name": "SMS Center",
"description":_("Send mass SMS to your contacts"), "description":_("Send mass SMS to your contacts"),
}, },
{
"type": "doctype",
"name": "Newsletter",
"description": _("Newsletters to contacts, leads."),
},
] ]
}, },
{ {

View File

@@ -4,13 +4,20 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe import _, msgprint from frappe import _, msgprint
from frappe.utils import flt, _round from frappe.utils import flt, rounded
from erpnext.setup.utils import get_company_currency from erpnext.setup.utils import get_company_currency
from erpnext.accounts.party import get_party_details 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:
@@ -111,10 +118,10 @@ class BuyingController(StockController):
self.precision("total_tax")) self.precision("total_tax"))
if self.meta.get_field("rounded_total"): if self.meta.get_field("rounded_total"):
self.rounded_total = _round(self.grand_total) self.rounded_total = rounded(self.grand_total)
if self.meta.get_field("rounded_total_import"): if self.meta.get_field("rounded_total_import"):
self.rounded_total_import = _round(self.grand_total_import) self.rounded_total_import = rounded(self.grand_total_import)
if self.meta.get_field("other_charges_added"): if self.meta.get_field("other_charges_added"):
self.other_charges_added = flt(sum([flt(d.tax_amount) for d in self.tax_doclist self.other_charges_added = flt(sum([flt(d.tax_amount) for d in self.tax_doclist
@@ -324,4 +331,4 @@ class BuyingController(StockController):
if d.meta.get_field("stock_qty") and not d.stock_qty: if d.meta.get_field("stock_qty") and not d.stock_qty:
if not d.conversion_factor: if not d.conversion_factor:
frappe.throw(_("Row {0}: Conversion Factor is mandatory")) frappe.throw(_("Row {0}: Conversion Factor is mandatory"))
d.stock_qty = flt(d.qty) * flt(d.conversion_factor) d.stock_qty = flt(d.qty) * flt(d.conversion_factor)

View File

@@ -3,13 +3,20 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe.utils import cint, flt, _round, cstr, comma_or from frappe.utils import cint, flt, rounded, cstr, comma_or
from erpnext.setup.utils import get_company_currency from erpnext.setup.utils import get_company_currency
from frappe import _, throw from frappe import _, throw
from erpnext.controllers.stock_controller import StockController from erpnext.controllers.stock_controller import StockController
class SellingController(StockController): class SellingController(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(SellingController, self).validate() super(SellingController, self).validate()
self.validate_max_discount() self.validate_max_discount()
@@ -142,6 +149,7 @@ class SellingController(StockController):
(1 + cumulated_tax_fraction), self.precision("base_amount", item)) (1 + cumulated_tax_fraction), self.precision("base_amount", item))
item.base_rate = flt(item.base_amount / item.qty, self.precision("base_rate", item)) item.base_rate = flt(item.base_amount / item.qty, self.precision("base_rate", item))
item.discount_percentage = flt(item.discount_percentage, self.precision("discount_percentage", item))
if item.discount_percentage == 100: if item.discount_percentage == 100:
item.base_price_list_rate = item.base_rate item.base_price_list_rate = item.base_rate
@@ -213,8 +221,8 @@ class SellingController(StockController):
self.net_total_export + flt(self.discount_amount), self.net_total_export + flt(self.discount_amount),
self.precision("other_charges_total_export")) self.precision("other_charges_total_export"))
self.rounded_total = _round(self.grand_total) self.rounded_total = rounded(self.grand_total)
self.rounded_total_export = _round(self.grand_total_export) self.rounded_total_export = rounded(self.grand_total_export)
def apply_discount_amount(self): def apply_discount_amount(self):
if self.discount_amount: if self.discount_amount:

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

@@ -4,7 +4,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, _round from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded
from frappe.model.naming import make_autoname from frappe.model.naming import make_autoname
from frappe import msgprint, _ from frappe import msgprint, _
@@ -152,7 +152,7 @@ class SalarySlip(TransactionBase):
self.gross_pay = flt(self.arrear_amount) + flt(self.leave_encashment_amount) self.gross_pay = flt(self.arrear_amount) + flt(self.leave_encashment_amount)
for d in self.get("earning_details"): for d in self.get("earning_details"):
if cint(d.e_depends_on_lwp) == 1: if cint(d.e_depends_on_lwp) == 1:
d.e_modified_amount = _round(flt(d.e_amount) * flt(self.payment_days) d.e_modified_amount = rounded(flt(d.e_amount) * flt(self.payment_days)
/ cint(self.total_days_in_month), 2) / cint(self.total_days_in_month), 2)
elif not self.payment_days: elif not self.payment_days:
d.e_modified_amount = 0 d.e_modified_amount = 0
@@ -164,7 +164,7 @@ class SalarySlip(TransactionBase):
self.total_deduction = 0 self.total_deduction = 0
for d in self.get('deduction_details'): for d in self.get('deduction_details'):
if cint(d.d_depends_on_lwp) == 1: if cint(d.d_depends_on_lwp) == 1:
d.d_modified_amount = _round(flt(d.d_amount) * flt(self.payment_days) d.d_modified_amount = rounded(flt(d.d_amount) * flt(self.payment_days)
/ cint(self.total_days_in_month), 2) / cint(self.total_days_in_month), 2)
elif not self.payment_days: elif not self.payment_days:
d.d_modified_amount = 0 d.d_modified_amount = 0
@@ -177,7 +177,7 @@ class SalarySlip(TransactionBase):
self.calculate_earning_total() self.calculate_earning_total()
self.calculate_ded_total() self.calculate_ded_total()
self.net_pay = flt(self.gross_pay) - flt(self.total_deduction) self.net_pay = flt(self.gross_pay) - flt(self.total_deduction)
self.rounded_total = _round(self.net_pay) self.rounded_total = rounded(self.net_pay)
def on_submit(self): def on_submit(self):
if(self.email_check == 1): if(self.email_check == 1):
@@ -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

@@ -7,7 +7,7 @@ from __future__ import unicode_literals
import frappe import frappe
from frappe.utils import cstr, add_days, date_diff from frappe.utils import cstr, add_days, date_diff
from frappe import _ from frappe import _
from frappe.utils.datautils import UnicodeWriter from frappe.utils.csvutils import UnicodeWriter
from frappe.model.document import Document from frappe.model.document import Document
class UploadAttendance(Document): class UploadAttendance(Document):
@@ -96,7 +96,7 @@ def upload():
if not frappe.has_permission("Attendance", "create"): if not frappe.has_permission("Attendance", "create"):
raise frappe.PermissionError raise frappe.PermissionError
from frappe.utils.datautils import read_csv_content_from_uploaded_file from frappe.utils.csvutils import read_csv_content_from_uploaded_file
from frappe.modules import scrub from frappe.modules import scrub
rows = read_csv_content_from_uploaded_file() rows = read_csv_content_from_uploaded_file()
@@ -110,7 +110,7 @@ def upload():
ret = [] ret = []
error = False error = False
from frappe.utils.datautils import check_record, import_doc from frappe.utils.csvutils import check_record, import_doc
for i, row in enumerate(rows[5:]): for i, row in enumerate(rows[5:]):
if not row: continue if not row: continue

View File

@@ -72,3 +72,4 @@ execute:frappe.db.sql("update `tabAccount` set root_type='Liability' where root_
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool") execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool")
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail") execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail")
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22 execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
erpnext.patches.v4_2.delete_old_print_formats

View File

View File

@@ -0,0 +1,23 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
old_formats = ("Sales Invoice", "Sales Invoice Spartan", "Sales Invoice Modern",
"Sales Invoice Classic",
"Sales Order Spartan", "Sales Order Modern", "Sales Order Classic",
"Purchase Order Spartan", "Purchase Order Modern", "Purchase Order Classic",
"Quotation Spartan", "Quotation Modern", "Quotation Classic",
"Delivery Note Spartan", "Delivery Note Modern", "Delivery Note Classic")
for fmt in old_formats:
# update property setter
for ps in frappe.db.sql_list("""select name from `tabProperty Setter`
where property_type='default_print_format' and value=%s""", fmt):
ps = frappe.get_doc("Property Setter", ps)
ps.value = "Standard"
ps.save(ignore_permissions = True)
frappe.delete_doc("Print Format", fmt)

View File

@@ -110,6 +110,7 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen", "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 1, "read_only": 1,
"reqd": 1 "reqd": 1
}, },
@@ -410,7 +411,7 @@
"icon": "icon-info-sign", "icon": "icon-info-sign",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-06-23 07:55:49.718301", "modified": "2014-07-24 08:55:09.807048",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Opportunity", "name": "Opportunity",

View File

@@ -0,0 +1,10 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('Opportunity')
class TestOpportunity(unittest.TestCase):
pass

View File

@@ -0,0 +1,13 @@
[
{
"doctype": "Opportunity",
"name": "_Test Opportunity 1",
"enquiry_from": "Lead",
"enquiry_type": "Sales",
"lead": "_T-Lead-00001",
"enquiry_details": [{
"item_name": "Test Item",
"description": "Some description"
}]
}
]

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",

View File

@@ -107,7 +107,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount (%)", "label": "Discount (%)",
"oldfieldname": "adj_rate", "oldfieldname": "adj_rate",
@@ -345,7 +345,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:41:40.811916", "modified": "2014-07-24 05:52:49.665788",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Quotation Item", "name": "Quotation Item",

View File

@@ -223,7 +223,8 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Currency and Price List", "label": "Currency and Price List",
"options": "icon-tag", "options": "icon-tag",
"permlevel": 0 "permlevel": 0,
"print_hide": 1
}, },
{ {
"fieldname": "currency", "fieldname": "currency",
@@ -341,6 +342,16 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "column_break_33a",
"fieldtype": "Column Break",
"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 +360,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",
@@ -469,50 +475,6 @@
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1
}, },
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"label": "Grand Total",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"reqd": 0,
"width": "150px"
},
{
"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,
"width": "150px"
},
{
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"width": "200px"
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"width": "50%"
},
{ {
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@@ -550,6 +512,50 @@
"read_only": 1, "read_only": 1,
"width": "200px" "width": "200px"
}, },
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"width": "50%"
},
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"label": "Grand Total",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"reqd": 0,
"width": "150px"
},
{
"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,
"width": "150px"
},
{
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"width": "200px"
},
{ {
"fieldname": "terms_section_break", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -883,7 +889,7 @@
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"modified": "2014-07-10 02:43:45.504009", "modified": "2014-07-16 16:32:16.459587",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order", "name": "Sales Order",

View File

@@ -101,7 +101,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount(%)", "label": "Discount(%)",
"oldfieldname": "adj_rate", "oldfieldname": "adj_rate",
@@ -431,7 +431,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-27 14:41:14.996650", "modified": "2014-07-24 05:55:46.672279",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order Item", "name": "Sales Order Item",

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,19 +341,6 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "net_total_export",
"fieldtype": "Currency",
"label": "Net Total",
"options": "currency",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "column_break_33",
"fieldtype": "Column Break",
"permlevel": 0
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@@ -369,6 +356,19 @@
"reqd": 0, "reqd": 0,
"width": "150px" "width": "150px"
}, },
{
"fieldname": "column_break_33",
"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",
@@ -479,56 +479,6 @@
"print_hide": 0, "print_hide": 0,
"read_only": 0 "read_only": 0
}, },
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"label": "Grand Total",
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
"reqd": 0,
"width": "150px"
},
{
"fieldname": "rounded_total_export",
"fieldtype": "Currency",
"label": "Rounded Total",
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
{
"description": "In Words (Export) will be visible once you save the Delivery Note.",
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"no_copy": 0,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{ {
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@@ -572,6 +522,56 @@
"read_only": 1, "read_only": 1,
"width": "200px" "width": "200px"
}, },
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"label": "Grand Total",
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
"reqd": 0,
"width": "150px"
},
{
"fieldname": "rounded_total_export",
"fieldtype": "Currency",
"label": "Rounded Total",
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
{
"description": "In Words (Export) will be visible once you save the Delivery Note.",
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"no_copy": 0,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
{ {
"fieldname": "terms_section_break", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -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-24 08:48:06.944540",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note", "name": "Delivery Note",

View File

@@ -109,7 +109,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount (%)", "label": "Discount (%)",
"oldfieldname": "adj_rate", "oldfieldname": "adj_rate",
@@ -429,7 +429,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:42:05.788579", "modified": "2014-07-24 05:56:00.218977",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note Item", "name": "Delivery Note Item",

View File

@@ -1,6 +1,6 @@
{ {
"autoname": "MREQD-.#####", "autoname": "MREQD-.#####",
"creation": "2013-02-22 01:28:02.000000", "creation": "2013-02-22 01:28:02",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
@@ -28,6 +28,7 @@
"oldfieldname": "item_name", "oldfieldname": "item_name",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"print_width": "100px", "print_width": "100px",
"reqd": 0, "reqd": 0,
"search_index": 1, "search_index": 1,
@@ -70,6 +71,21 @@
"reqd": 1, "reqd": 1,
"width": "80px" "width": "80px"
}, },
{
"fieldname": "uom",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Stock UOM",
"no_copy": 0,
"oldfieldname": "uom",
"oldfieldtype": "Link",
"options": "UOM",
"permlevel": 0,
"print_width": "70px",
"read_only": 1,
"reqd": 1,
"width": "70px"
},
{ {
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
@@ -89,21 +105,6 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "uom",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Stock UOM",
"no_copy": 0,
"oldfieldname": "uom",
"oldfieldtype": "Link",
"options": "UOM",
"permlevel": 0,
"print_width": "70px",
"read_only": 1,
"reqd": 1,
"width": "70px"
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "schedule_date", "fieldname": "schedule_date",
@@ -216,6 +217,7 @@
"oldfieldname": "ordered_qty", "oldfieldname": "ordered_qty",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -232,9 +234,10 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-02-03 11:35:26.000000", "modified": "2014-07-18 01:04:18.470761",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Material Request Item", "name": "Material Request Item",
"owner": "Administrator" "owner": "Administrator",
"permissions": []
} }

View File

@@ -109,7 +109,7 @@
"oldfieldname": "posting_date", "oldfieldname": "posting_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 0,
"print_width": "100px", "print_width": "100px",
"reqd": 1, "reqd": 1,
"search_index": 1, "search_index": 1,
@@ -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-24 08:49:12.407907",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt", "name": "Purchase Receipt",

View File

@@ -168,7 +168,7 @@
}, },
{ {
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Percent",
"in_list_view": 0, "in_list_view": 0,
"label": "Discount %", "label": "Discount %",
"permlevel": 0, "permlevel": 0,
@@ -545,7 +545,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2014-05-28 12:43:16.669040", "modified": "2014-07-24 05:56:12.997533",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt Item", "name": "Purchase Receipt Item",

View File

@@ -127,7 +127,7 @@
"oldfieldname": "posting_date", "oldfieldname": "posting_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
@@ -307,6 +307,7 @@
"fieldtype": "Check", "fieldtype": "Check",
"label": "Use Multi-Level BOM", "label": "Use Multi-Level BOM",
"permlevel": 0, "permlevel": 0,
"print_hide": 1,
"read_only": 0 "read_only": 0
}, },
{ {
@@ -453,7 +454,35 @@
"read_only": 0 "read_only": 0
}, },
{ {
"fieldname": "col4", "fieldname": "project_name",
"fieldtype": "Link",
"in_filter": 1,
"label": "Project Name",
"oldfieldname": "project_name",
"oldfieldtype": "Link",
"options": "Project",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": 0,
"fieldname": "remarks",
"fieldtype": "Text",
"hidden": 0,
"in_filter": 0,
"label": "Remarks",
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0
},
{
"fieldname": "col5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_width": "50%", "print_width": "50%",
@@ -468,35 +497,6 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "project_name",
"fieldtype": "Link",
"in_filter": 1,
"label": "Project Name",
"oldfieldname": "project_name",
"oldfieldtype": "Link",
"options": "Project",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
"in_filter": 0,
"label": "Print Heading",
"no_copy": 0,
"oldfieldname": "select_print_heading",
"oldfieldtype": "Link",
"options": "Print Heading",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0
},
{ {
"fieldname": "fiscal_year", "fieldname": "fiscal_year",
"fieldtype": "Link", "fieldtype": "Link",
@@ -508,14 +508,6 @@
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{
"fieldname": "col5",
"fieldtype": "Column Break",
"permlevel": 0,
"print_width": "50%",
"read_only": 0,
"width": "50%"
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "company", "fieldname": "company",
@@ -534,6 +526,24 @@
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0
}, },
{
"allow_on_submit": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
"in_filter": 0,
"label": "Print Heading",
"no_copy": 0,
"oldfieldname": "select_print_heading",
"oldfieldtype": "Link",
"options": "Print Heading",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "amended_from", "fieldname": "amended_from",
@@ -552,23 +562,6 @@
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0 "search_index": 0
},
{
"allow_on_submit": 0,
"fieldname": "remarks",
"fieldtype": "Text",
"hidden": 0,
"in_filter": 0,
"label": "Remarks",
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0
} }
], ],
"hide_heading": 0, "hide_heading": 0,
@@ -580,7 +573,7 @@
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2014-05-27 03:49:19.520247", "modified": "2014-07-24 08:52:33.496200",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Stock Entry", "name": "Stock Entry",

View File

@@ -302,6 +302,6 @@ class StockReconciliation(StockController):
@frappe.whitelist() @frappe.whitelist()
def upload(): def upload():
from frappe.utils.datautils import read_csv_content_from_uploaded_file from frappe.utils.csvutils import read_csv_content_from_uploaded_file
csv_content = read_csv_content_from_uploaded_file() csv_content = read_csv_content_from_uploaded_file()
return filter(lambda x: x and any(x), csv_content) return filter(lambda x: x and any(x), csv_content)

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

@@ -6,7 +6,7 @@
"Convert into Recurring" field in the invoice {{ name }}.</p> "Convert into Recurring" field in the invoice {{ name }}.</p>
<p><b>Please correct the invoice and make the invoice recurring again.</b></p> <p><b>Please correct the invoice and make the invoice recurring again.</b></p>
<hr> <hr>
<p><b>It is necessary to take this action today itself for the above mentioned recurring invoice \ <p><b>It is necessary to take this action today itself for the above mentioned recurring invoice
to be generated. If delayed, you will have to manually change the "Repeat on Day of Month" field \ to be generated. If delayed, you will have to manually change the "Repeat on Day of Month" field
of this invoice for generating the recurring invoice.</b></p> of this invoice for generating the recurring invoice.</b></p>
<p>[This email is autogenerated]</p> <p>[This email is autogenerated]</p>

View File

@@ -0,0 +1,44 @@
{%- from "templates/print_formats/standard_macros.html" import print_value -%}
{%- 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) -%}
<table class="table table-bordered">
<tbody>
<tr>
<th>{{ _("Sr") }}</th>
<th>{{ _("Item Name") }}</th>
<th>{{ _("Description") }}</th>
<th class="text-right">{{ _("Qty") }}</th>
<th class="text-right">{{ _("Rate") }}</th>
<th class="text-right">{{ _("Amount") }}</th>
</tr>
{%- for row in data -%}
<tr>
<td style="width: 3%;">{{ row.idx }}</td>
<td style="width: 20%;">
{{ row.item_name }}
{% if row.item_code != row.item_name -%}
<br>Item Code: {{ row.item_code}}
{%- endif %}
</td>
<td style="width: 37%;">
<div style="border: 0px;">{{ row.description }}
{%- for field in visible_columns -%}
{%- if (field.fieldname not in std_fields) and
(row[field.fieldname] not in (None, "", 0)) -%}
<br><strong>{{ _(field.label) }}:</strong>
{{ row.get_formatted(field.fieldname, doc) }}
{%- endif -%}
{%- endfor -%}
</div>
</td>
<td style="width: 10%; text-align: right;">{{ row.get_formatted("qty", doc) }}<br>
<small>{{ row.uom or row.stock_uom }}</small></td>
<td style="width: 15%; text-align: right;">{{
row.get_formatted("rate", doc) }}</td>
<td style="width: 15%; text-align: right;">{{
row.get_formatted("amount", doc) }}</td>
</tr>
{%- endfor -%}
</tbody>
</table>

View File

@@ -0,0 +1,17 @@
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6">
{%- for charge in data -%}
{%- if not charge.included_in_print_rate -%}
<div class="row">
<div class="col-md-4 text-right">
<label>{{ charge.description }}</label></div>
<div class="col-md-8 text-right">
{{ frappe.format_value(charge.tax_amount / doc.conversion_rate,
table_meta.get_field("tax_amount"), doc) }}
</div>
</div>
{%- endif -%}
{%- endfor -%}
</div>
</div>

View File

@@ -14,6 +14,10 @@ class Note(Document):
import re import re
self.name = re.sub("[%'\"#*?`]", "", self.title.strip()) self.name = re.sub("[%'\"#*?`]", "", self.title.strip())
def before_print(self):
self.print_heading = self.name
self.sub_heading = ""
def get_permission_query_conditions(user): def get_permission_query_conditions(user):
if not user: user = frappe.session.user if not user: user = frappe.session.user

View File

@@ -19,7 +19,7 @@ def get_doctypes():
@frappe.whitelist() @frappe.whitelist()
def upload(select_doctype=None, rows=None): def upload(select_doctype=None, rows=None):
from frappe.utils.datautils import read_csv_content_from_uploaded_file from frappe.utils.csvutils import read_csv_content_from_uploaded_file
from frappe.model.rename_doc import rename_doc from frappe.model.rename_doc import rename_doc
if not select_doctype: if not select_doctype: