Merge branch 'hotfix'
This commit is contained in:
commit
50312b54a0
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '8.11.1'
|
__version__ = '8.11.2'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -732,7 +732,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
input = input.toLowerCase();
|
input = input.toLowerCase();
|
||||||
item = this.get_item(item.value);
|
item = this.get_item(item.value);
|
||||||
return item.searchtext.includes(input)
|
result = item ? item.searchtext.includes(input) : '';
|
||||||
|
if(!result) {
|
||||||
|
me.prepare_customer_mapper(input);
|
||||||
|
} else {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
item: function (item, input) {
|
item: function (item, input) {
|
||||||
var d = this.get_item(item.value);
|
var d = this.get_item(item.value);
|
||||||
@ -753,6 +758,9 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
this.party_field.$input
|
this.party_field.$input
|
||||||
.on('input', function (e) {
|
.on('input', function (e) {
|
||||||
|
if(me.customers_mapper.length <= 1) {
|
||||||
|
me.prepare_customer_mapper(e.target.value);
|
||||||
|
}
|
||||||
me.party_field.awesomeplete.list = me.customers_mapper;
|
me.party_field.awesomeplete.list = me.customers_mapper;
|
||||||
})
|
})
|
||||||
.on('awesomplete-select', function (e) {
|
.on('awesomplete-select', function (e) {
|
||||||
@ -793,24 +801,56 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
prepare_customer_mapper: function() {
|
prepare_customer_mapper: function(key) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
var customer_data = '';
|
||||||
|
|
||||||
this.customers_mapper = this.customers.map(function (c) {
|
if (key) {
|
||||||
contact = me.contacts[c.name];
|
key = key.toLowerCase().trim();
|
||||||
return {
|
var re = new RegExp('%', 'g');
|
||||||
label: c.name,
|
var reg = new RegExp(key.replace(re, '\\w*\\s*[a-zA-Z0-9]*'));
|
||||||
value: c.name,
|
|
||||||
customer_name: c.customer_name,
|
customer_data = $.grep(this.customers, function(data) {
|
||||||
customer_group: c.customer_group,
|
contact = me.contacts[data.name];
|
||||||
territory: c.territory,
|
if(reg.test(data.name.toLowerCase())
|
||||||
phone: contact ? contact["phone"] : '',
|
|| reg.test(data.customer_name.toLowerCase())
|
||||||
mobile_no: contact ? contact["mobile_no"] : '',
|
|| (contact && reg.test(contact["mobile_no"]))
|
||||||
email_id: contact ? contact["email_id"] : '',
|
|| (contact && reg.test(contact["phone"]))
|
||||||
searchtext: ['customer_name', 'customer_group', 'value',
|
|| (data.customer_group && reg.test(data.customer_group.toLowerCase()))){
|
||||||
'label', 'email_id', 'phone', 'mobile_no']
|
return data;
|
||||||
.map(key => c[key]).join(' ')
|
}
|
||||||
.toLowerCase()
|
})
|
||||||
|
} else {
|
||||||
|
customer_data = this.customers;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.customers_mapper = [];
|
||||||
|
|
||||||
|
customer_data.forEach(function (c, index) {
|
||||||
|
if(index < 30) {
|
||||||
|
contact = me.contacts[c.name];
|
||||||
|
if(contact && !c['phone']) {
|
||||||
|
c["phone"] = contact["phone"];
|
||||||
|
c["email_id"] = contact["email_id"];
|
||||||
|
c["mobile_no"] = contact["mobile_no"];
|
||||||
|
}
|
||||||
|
|
||||||
|
me.customers_mapper.push({
|
||||||
|
label: c.name,
|
||||||
|
value: c.name,
|
||||||
|
customer_name: c.customer_name,
|
||||||
|
customer_group: c.customer_group,
|
||||||
|
territory: c.territory,
|
||||||
|
phone: contact ? contact["phone"] : '',
|
||||||
|
mobile_no: contact ? contact["mobile_no"] : '',
|
||||||
|
email_id: contact ? contact["email_id"] : '',
|
||||||
|
searchtext: ['customer_name', 'customer_group', 'name', 'value',
|
||||||
|
'label', 'email_id', 'phone', 'mobile_no']
|
||||||
|
.map(key => c[key]).join(' ')
|
||||||
|
.toLowerCase()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -99,7 +99,8 @@ def get_actual_details(name, filters):
|
|||||||
where
|
where
|
||||||
b.name = ba.parent
|
b.name = ba.parent
|
||||||
and b.docstatus = 1
|
and b.docstatus = 1
|
||||||
and ba.account=gl.account
|
and ba.account=gl.account
|
||||||
|
and b.{budget_against} = gl.{budget_against}
|
||||||
and gl.fiscal_year=%s
|
and gl.fiscal_year=%s
|
||||||
and b.{budget_against}=%s
|
and b.{budget_against}=%s
|
||||||
and exists(select name from `tab{tab}` where name=gl.{budget_against} and {cond})
|
and exists(select name from `tab{tab}` where name=gl.{budget_against} and {cond})
|
||||||
|
@ -49,7 +49,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
|
|
||||||
row += [
|
row += [
|
||||||
d.credit_to, d.mode_of_payment, d.project, d.company, d.purchase_order,
|
d.credit_to, d.mode_of_payment, d.project, d.company, d.purchase_order,
|
||||||
purchase_receipt, expense_account, d.qty, d.stock_uom, d.base_net_rate, d.base_net_amount
|
purchase_receipt, expense_account, d.stock_qty, d.stock_uom, d.base_net_rate, d.base_net_amount
|
||||||
]
|
]
|
||||||
|
|
||||||
total_tax = 0
|
total_tax = 0
|
||||||
@ -81,7 +81,7 @@ def get_columns(additional_table_columns):
|
|||||||
_("Mode of Payment") + ":Link/Mode of Payment:80", _("Project") + ":Link/Project:80",
|
_("Mode of Payment") + ":Link/Mode of Payment:80", _("Project") + ":Link/Project:80",
|
||||||
_("Company") + ":Link/Company:100", _("Purchase Order") + ":Link/Purchase Order:100",
|
_("Company") + ":Link/Company:100", _("Purchase Order") + ":Link/Purchase Order:100",
|
||||||
_("Purchase Receipt") + ":Link/Purchase Receipt:100", _("Expense Account") + ":Link/Account:140",
|
_("Purchase Receipt") + ":Link/Purchase Receipt:100", _("Expense Account") + ":Link/Account:140",
|
||||||
_("Qty") + ":Float:120", _("Stock UOM") + "::100",
|
_("Stock Qty") + ":Float:120", _("Stock UOM") + "::100",
|
||||||
_("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
|
_("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ def get_items(filters, additional_query_columns):
|
|||||||
pi_item.name, pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
|
pi_item.name, pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
|
||||||
pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name,
|
pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name,
|
||||||
pi_item.item_group, pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt,
|
pi_item.item_group, pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt,
|
||||||
pi_item.po_detail, pi_item.expense_account, pi_item.qty, pi_item.stock_uom,
|
pi_item.po_detail, pi_item.expense_account, pi_item.stock_qty, pi_item.stock_uom,
|
||||||
pi_item.base_net_rate, pi_item.base_net_amount,
|
pi_item.base_net_rate, pi_item.base_net_amount,
|
||||||
pi.supplier_name, pi.mode_of_payment {0}
|
pi.supplier_name, pi.mode_of_payment {0}
|
||||||
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item
|
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item
|
||||||
|
@ -49,7 +49,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
row += [
|
row += [
|
||||||
d.customer_group, d.debit_to, ", ".join(mode_of_payments.get(d.parent, [])),
|
d.customer_group, d.debit_to, ", ".join(mode_of_payments.get(d.parent, [])),
|
||||||
d.territory, d.project, d.company, d.sales_order,
|
d.territory, d.project, d.company, d.sales_order,
|
||||||
delivery_note, d.income_account, d.cost_center, d.qty, d.stock_uom,
|
delivery_note, d.income_account, d.cost_center, d.stock_qty, d.stock_uom,
|
||||||
d.base_net_rate, d.base_net_amount
|
d.base_net_rate, d.base_net_amount
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ def get_columns(additional_table_columns):
|
|||||||
_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
|
_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
|
||||||
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
|
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
|
||||||
_("Income Account") + ":Link/Account:140", _("Cost Center") + ":Link/Cost Center:140",
|
_("Income Account") + ":Link/Account:140", _("Cost Center") + ":Link/Cost Center:140",
|
||||||
_("Qty") + ":Float:120", _("Stock UOM") + "::100",
|
_("Stock Qty") + ":Float:120", _("Stock UOM") + "::100",
|
||||||
_("Rate") + ":Currency/currency:120",
|
_("Rate") + ":Currency/currency:120",
|
||||||
_("Amount") + ":Currency/currency:120"
|
_("Amount") + ":Currency/currency:120"
|
||||||
]
|
]
|
||||||
@ -118,7 +118,7 @@ def get_items(filters, additional_query_columns):
|
|||||||
si.customer, si.remarks, si.territory, si.company, si.base_net_total,
|
si.customer, si.remarks, si.territory, si.company, si.base_net_total,
|
||||||
si_item.item_code, si_item.item_name, si_item.item_group, si_item.sales_order,
|
si_item.item_code, si_item.item_name, si_item.item_group, si_item.sales_order,
|
||||||
si_item.delivery_note, si_item.income_account, si_item.cost_center,
|
si_item.delivery_note, si_item.income_account, si_item.cost_center,
|
||||||
si_item.qty, si_item.stock_uom, si_item.base_net_rate, si_item.base_net_amount,
|
si_item.stock_qty, si_item.stock_uom, si_item.base_net_rate, si_item.base_net_amount,
|
||||||
si.customer_name, si.customer_group, si_item.so_detail, si.update_stock {0}
|
si.customer_name, si.customer_group, si_item.so_detail, si.update_stock {0}
|
||||||
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
|
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
|
||||||
where si.name = si_item.parent and si.docstatus = 1 %s
|
where si.name = si_item.parent and si.docstatus = 1 %s
|
||||||
|
@ -38,7 +38,7 @@ get_help_messages = "erpnext.utilities.activation.get_help_messages"
|
|||||||
on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
|
on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
|
||||||
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
|
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
|
||||||
|
|
||||||
treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory', "BOM"]
|
treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory']
|
||||||
|
|
||||||
# website
|
# website
|
||||||
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
|
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
|
||||||
|
@ -376,19 +376,20 @@ class ProductionPlanningTool(Document):
|
|||||||
else:
|
else:
|
||||||
bom_wise_item_details[d.item_code] = d
|
bom_wise_item_details[d.item_code] = d
|
||||||
|
|
||||||
if include_sublevel:
|
if include_sublevel and d.default_bom:
|
||||||
if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs)
|
if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs)
|
||||||
or (d.default_material_request_type == "Manufacture")):
|
or (d.default_material_request_type == "Manufacture")):
|
||||||
|
|
||||||
my_qty = 0
|
my_qty = 0
|
||||||
projected_qty = self.get_item_projected_qty(d.item_code)
|
projected_qty = self.get_item_projected_qty(d.item_code)
|
||||||
|
|
||||||
if self.create_material_requests_for_all_required_qty:
|
if self.create_material_requests_for_all_required_qty:
|
||||||
my_qty = d.qty
|
my_qty = d.qty
|
||||||
elif (bom_wise_item_details[d.item_code].qty - d.qty) < projected_qty:
|
|
||||||
my_qty = bom_wise_item_details[d.item_code].qty - projected_qty
|
|
||||||
else:
|
else:
|
||||||
my_qty = d.qty
|
total_required_qty = flt(bom_wise_item_details.get(d.item_code, frappe._dict()).qty)
|
||||||
|
if (total_required_qty - d.qty) < projected_qty:
|
||||||
|
my_qty = total_required_qty - projected_qty
|
||||||
|
else:
|
||||||
|
my_qty = d.qty
|
||||||
|
|
||||||
if my_qty > 0:
|
if my_qty > 0:
|
||||||
self.get_subitems(bom_wise_item_details,
|
self.get_subitems(bom_wise_item_details,
|
||||||
@ -483,14 +484,15 @@ class ProductionPlanningTool(Document):
|
|||||||
return items_to_be_requested
|
return items_to_be_requested
|
||||||
|
|
||||||
def get_item_projected_qty(self,item):
|
def get_item_projected_qty(self,item):
|
||||||
|
conditions = ""
|
||||||
|
if self.purchase_request_for_warehouse:
|
||||||
|
conditions = " and warehouse='{0}'".format(frappe.db.escape(self.purchase_request_for_warehouse))
|
||||||
|
|
||||||
item_projected_qty = frappe.db.sql("""
|
item_projected_qty = frappe.db.sql("""
|
||||||
select ifnull(sum(projected_qty),0) as qty
|
select ifnull(sum(projected_qty),0) as qty
|
||||||
from `tabBin`
|
from `tabBin`
|
||||||
where item_code = %(item_code)s and warehouse=%(warehouse)s
|
where item_code = %(item_code)s {conditions}
|
||||||
""", {
|
""".format(conditions=conditions), { "item_code": item }, as_dict=1)
|
||||||
"item_code": item,
|
|
||||||
"warehouse": self.purchase_request_for_warehouse
|
|
||||||
}, as_dict=1)
|
|
||||||
|
|
||||||
return item_projected_qty[0].qty
|
return item_projected_qty[0].qty
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@ from frappe.model.mapper import get_mapped_doc
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
# for converting student batch into student group
|
# for converting student batch into student group
|
||||||
for doctype in ["Student Group", "Student Group Student", "Student Group Instructor", "Student Attendance", "Student"]:
|
for doctype in ["Student Group", "Student Group Student",
|
||||||
|
"Student Group Instructor", "Student Attendance", "Student", "Student Batch Name"]:
|
||||||
frappe.reload_doc("schools", "doctype", frappe.scrub(doctype))
|
frappe.reload_doc("schools", "doctype", frappe.scrub(doctype))
|
||||||
|
|
||||||
if frappe.db.table_exists("Student Batch"):
|
if frappe.db.table_exists("Student Batch"):
|
||||||
@ -39,8 +40,10 @@ def execute():
|
|||||||
student.update({"group_roll_number": i+1})
|
student.update({"group_roll_number": i+1})
|
||||||
doc.extend("students", student_list)
|
doc.extend("students", student_list)
|
||||||
|
|
||||||
instructor_list = frappe.db.sql('''select instructor, instructor_name from `tabStudent Batch Instructor`
|
instructor_list = None
|
||||||
where parent=%s''', (doc.student_group_name), as_dict=1)
|
if frappe.db.table_exists("Student Batch Instructor"):
|
||||||
|
instructor_list = frappe.db.sql('''select instructor, instructor_name from `tabStudent Batch Instructor`
|
||||||
|
where parent=%s''', (doc.student_group_name), as_dict=1)
|
||||||
if instructor_list:
|
if instructor_list:
|
||||||
doc.extend("instructors", instructor_list)
|
doc.extend("instructors", instructor_list)
|
||||||
doc.save()
|
doc.save()
|
||||||
|
@ -54,8 +54,6 @@ def create_hsn_codes(data, code_field):
|
|||||||
hsn_code.name = d[code_field]
|
hsn_code.name = d[code_field]
|
||||||
hsn_code.db_insert()
|
hsn_code.db_insert()
|
||||||
|
|
||||||
frappe.db.commit()
|
|
||||||
|
|
||||||
def add_custom_roles_for_reports():
|
def add_custom_roles_for_reports():
|
||||||
for report_name in ('GST Sales Register', 'GST Purchase Register',
|
for report_name in ('GST Sales Register', 'GST Purchase Register',
|
||||||
'GST Itemised Sales Register', 'GST Itemised Purchase Register'):
|
'GST Itemised Sales Register', 'GST Itemised Purchase Register'):
|
||||||
@ -80,7 +78,8 @@ def add_print_formats():
|
|||||||
|
|
||||||
def make_custom_fields():
|
def make_custom_fields():
|
||||||
hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC',
|
hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC',
|
||||||
fieldtype='Data', options='item_code.gst_hsn_code', insert_after='description', print_hide=1)
|
fieldtype='Data', options='item_code.gst_hsn_code', insert_after='description',
|
||||||
|
allow_on_submit=1, print_hide=1)
|
||||||
invoice_gst_fields = [
|
invoice_gst_fields = [
|
||||||
dict(fieldname='gst_section', label='GST Details', fieldtype='Section Break',
|
dict(fieldname='gst_section', label='GST Details', fieldtype='Section Break',
|
||||||
insert_after='select_print_heading', print_hide=1, collapsible=1),
|
insert_after='select_print_heading', print_hide=1, collapsible=1),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"align_labels_left": 0,
|
"align_labels_right": 0,
|
||||||
"creation": "2017-07-04 16:26:21.120187",
|
"creation": "2017-07-04 16:26:21.120187",
|
||||||
"custom_format": 0,
|
"custom_format": 0,
|
||||||
"disabled": 0,
|
"disabled": 0,
|
||||||
@ -7,10 +7,10 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Print Format",
|
"doctype": "Print Format",
|
||||||
"font": "Default",
|
"font": "Default",
|
||||||
"format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"<div class=\\\"print-heading\\\">\\n\\t<h2>\\n\\t\\tTAX INVOICE<br>\\n\\t\\t<small>{{ doc.name }}</small>\\n\\t</h2>\\n</div>\\n<h2 class=\\\"text-center\\\">\\n\\t{% if doc.invoice_copy -%}\\n\\t\\t<small>{{ doc.invoice_copy }}</small>\\n\\t{% endif -%}\\n</h2>\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company\", \"label\": \"Company\"}, {\"print_hide\": 0, \"fieldname\": \"company_address_display\", \"label\": \"Company Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"posting_date\", \"label\": \"Date\"}, {\"print_hide\": 0, \"fieldname\": \"due_date\", \"label\": \"Payment Due Date\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"options\": \"<hr>\", \"fieldname\": \"_custom_html\", \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"customer_name\", \"label\": \"Customer Name\"}, {\"print_hide\": 0, \"fieldname\": \"address_display\", \"label\": \"Address\"}, {\"print_hide\": 0, \"fieldname\": \"contact_display\", \"label\": \"Contact\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"shipping_address\", \"label\": \"Shipping Address\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"item_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"200px\"}, {\"print_hide\": 0, \"fieldname\": \"gst_hsn_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"serial_no\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"qty\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"uom\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"rate\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"items\", \"label\": \"Items\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"total\", \"label\": \"Total\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"300px\"}], \"print_hide\": 0, \"fieldname\": \"taxes\", \"label\": \"Sales Taxes and Charges\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"grand_total\", \"label\": \"Grand Total\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\", \"label\": \"Rounded Total\"}, {\"print_hide\": 0, \"fieldname\": \"in_words\", \"label\": \"In Words\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"other_charges_calculation\", \"align\": \"left\", \"label\": \"Tax Breakup\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Terms\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"terms\", \"label\": \"Terms and Conditions Details\"}]",
|
"format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"<div class=\\\"print-heading\\\">\\n\\t<h2>\\n\\t\\tTAX INVOICE<br>\\n\\t\\t<small>{{ doc.name }}</small>\\n\\t</h2>\\n</div>\\n<h2 class=\\\"text-center\\\">\\n\\t{% if doc.invoice_copy -%}\\n\\t\\t<small>{{ doc.invoice_copy }}</small>\\n\\t{% endif -%}\\n</h2>\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company\", \"label\": \"Company\"}, {\"print_hide\": 0, \"fieldname\": \"company_address_display\", \"label\": \"Company Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"posting_date\", \"label\": \"Date\"}, {\"print_hide\": 0, \"fieldname\": \"due_date\", \"label\": \"Payment Due Date\"}, {\"print_hide\": 0, \"fieldname\": \"reverse_charge\", \"label\": \"Reverse Charge\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"options\": \"<hr>\", \"fieldname\": \"_custom_html\", \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"customer_name\", \"label\": \"Customer Name\"}, {\"print_hide\": 0, \"fieldname\": \"address_display\", \"label\": \"Address\"}, {\"print_hide\": 0, \"fieldname\": \"contact_display\", \"label\": \"Contact\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"shipping_address\", \"label\": \"Shipping Address\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"item_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"200px\"}, {\"print_hide\": 0, \"fieldname\": \"gst_hsn_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"serial_no\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"qty\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"uom\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"rate\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"items\", \"label\": \"Items\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"total\", \"label\": \"Total\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"300px\"}], \"print_hide\": 0, \"fieldname\": \"taxes\", \"label\": \"Sales Taxes and Charges\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"grand_total\", \"label\": \"Grand Total\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\", \"label\": \"Rounded Total\"}, {\"print_hide\": 0, \"fieldname\": \"in_words\", \"label\": \"In Words\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"other_charges_calculation\", \"align\": \"left\", \"label\": \"Tax Breakup\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Terms\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"terms\", \"label\": \"Terms and Conditions Details\"}]",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"line_breaks": 0,
|
"line_breaks": 0,
|
||||||
"modified": "2017-08-29 13:58:58.503343",
|
"modified": "2017-09-11 14:56:25.303797",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Regional",
|
"module": "Regional",
|
||||||
"name": "GST Tax Invoice",
|
"name": "GST Tax Invoice",
|
||||||
|
@ -240,7 +240,8 @@ def has_duplicate_serial_no(sn, sle):
|
|||||||
|
|
||||||
status = False
|
status = False
|
||||||
if sn.purchase_document_no:
|
if sn.purchase_document_no:
|
||||||
if sle.voucher_type in ['Purchase Receipt', 'Stock Entry']:
|
if sle.voucher_type in ['Purchase Receipt', 'Stock Entry'] and \
|
||||||
|
sn.delivery_document_type not in ['Purchase Receipt', 'Stock Entry']:
|
||||||
status = True
|
status = True
|
||||||
|
|
||||||
if status and sle.voucher_type == 'Stock Entry' and \
|
if status and sle.voucher_type == 'Stock Entry' and \
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
{% if tax_details %}
|
{% if tax_details %}
|
||||||
<td class='text-right'>
|
<td class='text-right'>
|
||||||
{% if tax_details.tax_rate or not tax_details.tax_amount %}
|
{% if tax_details.tax_rate or not tax_details.tax_amount %}
|
||||||
({{ tax_details.tax_rate }}%)<br>
|
({{ tax_details.tax_rate }}%)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ frappe.utils.fmt_money(tax_details.tax_amount, None, company_currency) }}
|
{{ frappe.utils.fmt_money(tax_details.tax_amount, None, company_currency) }}
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user