Merge branch 'develop' of https://github.com/frappe/erpnext into new-translations
This commit is contained in:
commit
45ce5b07b4
@ -207,7 +207,7 @@ def get_customers_list(pos_profile={}):
|
||||
if pos_profile.get('customer_groups'):
|
||||
# Get customers based on the customer groups defined in the POS profile
|
||||
for d in pos_profile.get('customer_groups'):
|
||||
customer_groups.extend([d.name for d in get_child_nodes('Customer Group', d.customer_group)])
|
||||
customer_groups.extend([d.get('name') for d in get_child_nodes('Customer Group', d.get('customer_group'))])
|
||||
cond = "customer_group in (%s)" % (', '.join(['%s'] * len(customer_groups)))
|
||||
|
||||
return frappe.db.sql(""" select name, customer_name, customer_group,
|
||||
@ -387,7 +387,9 @@ def get_pricing_rule_data(doc):
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def make_invoice(doc_list={}, email_queue_list={}, customers_list={}):
|
||||
def make_invoice(pos_profile, doc_list={}, email_queue_list={}, customers_list={}):
|
||||
import json
|
||||
|
||||
if isinstance(doc_list, string_types):
|
||||
doc_list = json.loads(doc_list)
|
||||
|
||||
@ -421,7 +423,8 @@ def make_invoice(doc_list={}, email_queue_list={}, customers_list={}):
|
||||
name_list.append(name)
|
||||
|
||||
email_queue = make_email_queue(email_queue_list)
|
||||
customers = get_customers_list()
|
||||
pos_profile = json.loads(pos_profile)
|
||||
customers = get_customers_list(pos_profile)
|
||||
return {
|
||||
'invoice': name_list,
|
||||
'email_queue': email_queue,
|
||||
|
@ -1769,6 +1769,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice",
|
||||
freeze: true,
|
||||
args: {
|
||||
pos_profile: me.pos_profile_data,
|
||||
doc_list: me.si_docs,
|
||||
email_queue_list: me.email_queue_list,
|
||||
customers_list: me.customers_list
|
||||
|
@ -54,8 +54,8 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
||||
'description': d.description,
|
||||
'invoice': d.parent,
|
||||
'posting_date': d.posting_date,
|
||||
'customer': d.supplier,
|
||||
'customer_name': d.supplier_name
|
||||
'supplier': d.supplier,
|
||||
'supplier_name': d.supplier_name
|
||||
}
|
||||
|
||||
if additional_query_columns:
|
||||
|
@ -35,11 +35,13 @@ erpnext.doctypes_with_dimensions.forEach((doctype) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (frm.doc.items && frm.doc.items.length) {
|
||||
if (frm.doc.items && frm.doc.items.length && frm.doc.docstatus === 0
|
||||
&& (!frm.doc.items[0][dimension['fieldname']])) {
|
||||
frm.doc.items[0][dimension['fieldname']] = erpnext.default_dimensions[frm.doc.company][dimension['document_type']];
|
||||
}
|
||||
|
||||
if (frm.doc.accounts && frm.doc.accounts.length) {
|
||||
if (frm.doc.accounts && frm.doc.accounts.length && frm.doc.docstatus === 0
|
||||
&& (!frm.doc.items[0][dimension['fieldname']])) {
|
||||
frm.doc.accounts[0][dimension['fieldname']] = erpnext.default_dimensions[frm.doc.company][dimension['document_type']];
|
||||
}
|
||||
}
|
||||
|
@ -13,9 +13,9 @@ def execute(filters=None):
|
||||
dict(fieldtype='Data', label='GST Category', fieldname="gst_category", width=120),
|
||||
dict(fieldtype='Data', label='Export Type', fieldname="export_type", width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', fieldname="ecommerce_gstin", width=130),
|
||||
dict(fieldtype='Data', label='HSN Code', fieldname="hsn_code", width=120),
|
||||
dict(fieldtype='Data', label='Supplier Invoice No', fieldname="supplier_invoice_no", width=120),
|
||||
dict(fieldtype='Date', label='Supplier Invoice Date', fieldname="supplier_invoice_date", width=100)
|
||||
dict(fieldtype='Data', label='HSN Code', fieldname="gst_hsn_code", width=120),
|
||||
dict(fieldtype='Data', label='Supplier Invoice No', fieldname="bill_no", width=120),
|
||||
dict(fieldtype='Date', label='Supplier Invoice Date', fieldname="bill_date", width=100)
|
||||
], additional_query_columns=[
|
||||
'supplier_gstin',
|
||||
'company_gstin',
|
||||
|
4
erpnext/regional/turkey/setup.py
Normal file
4
erpnext/regional/turkey/setup.py
Normal file
@ -0,0 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
def setup(company=None, patch=True):
|
||||
pass
|
@ -424,8 +424,13 @@ def install_country_fixtures(company):
|
||||
company_doc = frappe.get_doc("Company", company)
|
||||
path = frappe.get_app_path('erpnext', 'regional', frappe.scrub(company_doc.country))
|
||||
if os.path.exists(path.encode("utf-8")):
|
||||
frappe.get_attr("erpnext.regional.{0}.setup.setup"
|
||||
.format(frappe.scrub(company_doc.country)))(company_doc, False)
|
||||
try:
|
||||
module_name = "erpnext.regional.{0}.setup.setup".format(frappe.scrub(company_doc.country))
|
||||
frappe.get_attr(module_name)(company_doc, False)
|
||||
except Exception as e:
|
||||
frappe.log_error(str(e), frappe.get_traceback())
|
||||
frappe.throw(_("Failed to setup defaults for country {0}. Please contact support@erpnext.com").format(frappe.bold(company_doc.country)))
|
||||
|
||||
|
||||
def update_company_current_month_sales(company):
|
||||
current_month_year = formatdate(today(), "MM-yyyy")
|
||||
|
@ -190,6 +190,9 @@ class StockReconciliation(StockController):
|
||||
has_serial_no = True
|
||||
self.get_sle_for_serialized_items(row, sl_entries)
|
||||
else:
|
||||
if row.serial_no or row.batch_no:
|
||||
frappe.throw(_("Row #{0}: Item {1} is not a Serialized/Batched Item. It cannot have a Serial No/Batch No against it.") \
|
||||
.format(row.idx, frappe.bold(row.item_code)))
|
||||
previous_sle = get_previous_sle({
|
||||
"item_code": row.item_code,
|
||||
"warehouse": row.warehouse,
|
||||
|
Loading…
x
Reference in New Issue
Block a user