Merge branch 'master' of github.com:webnotes/erpnext into responsive
Conflicts: accounts/doctype/sales_invoice/sales_invoice.py accounts/doctype/sales_invoice_item/sales_invoice_item.txt buying/doctype/supplier_quotation/supplier_quotation.js patches/patch_list.py
This commit is contained in:
commit
15db6c4659
@ -50,6 +50,7 @@ cur_frm.fields_dict.voucher_no.get_query = function(doc) {
|
|||||||
where against_voucher_type = '%(dt)s' \
|
where against_voucher_type = '%(dt)s' \
|
||||||
and against_voucher = gle.voucher_no \
|
and against_voucher = gle.voucher_no \
|
||||||
and voucher_no != gle.voucher_no \
|
and voucher_no != gle.voucher_no \
|
||||||
|
and account = gle.account \
|
||||||
and ifnull(is_cancelled, 'No') = 'No') != \
|
and ifnull(is_cancelled, 'No') = 'No') != \
|
||||||
abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0)) \
|
abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0)) \
|
||||||
ORDER BY gle.posting_date DESC, gle.voucher_no DESC LIMIT 50",
|
ORDER BY gle.posting_date DESC, gle.voucher_no DESC LIMIT 50",
|
||||||
|
@ -147,7 +147,7 @@ cur_frm.cscript.account_head = function(doc, cdt, cdn) {
|
|||||||
d.account_head = '';
|
d.account_head = '';
|
||||||
}
|
}
|
||||||
else if(d.account_head && d.charge_type) {
|
else if(d.account_head && d.charge_type) {
|
||||||
arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}";
|
arg = "{'charge_type' : '" + d.charge_type + "', 'account_head' : '" + d.account_head + "'}";
|
||||||
get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1);
|
get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1);
|
||||||
}
|
}
|
||||||
refresh_field('account_head',d.name,'purchase_tax_details');
|
refresh_field('account_head',d.name,'purchase_tax_details');
|
||||||
|
@ -26,11 +26,11 @@ sql = webnotes.conn.sql
|
|||||||
|
|
||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, doc, doclist=[]):
|
def __init__(self, doc, doclist=[]):
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
|
|
||||||
# Get Tax Rate if account type is Tax
|
# Get Tax Rate if account type is Tax
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
def get_rate(self, arg):
|
def get_rate(self, arg):
|
||||||
return get_obj('Purchase Common').get_rate(arg, self)
|
return get_obj('Purchase Common').get_rate(arg, self)
|
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"creation": "2013-04-19 11:00:07",
|
"creation": "2013-06-04 11:02:19",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-05-22 12:07:00",
|
"modified": "2013-06-26 14:34:00",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -243,7 +243,8 @@
|
|||||||
"oldfieldname": "serial_no",
|
"oldfieldname": "serial_no",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0
|
"read_only": 0,
|
||||||
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
|
@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Purchase Invoice"
|
conditions = get_columns(filters, "Purchase Invoice")
|
||||||
conditions = get_columns(filters, trans)
|
|
||||||
data = get_data(filters, conditions)
|
data = get_data(filters, conditions)
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -40,9 +40,10 @@ def execute(filters=None):
|
|||||||
# invoice details
|
# invoice details
|
||||||
purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", [])))
|
purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", [])))
|
||||||
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
|
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
|
||||||
|
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
|
||||||
|
|
||||||
row = [inv.name, inv.posting_date, inv.supplier, inv.credit_to,
|
row = [inv.name, inv.posting_date, inv.supplier, inv.credit_to,
|
||||||
account_map.get(inv.credit_to), inv.project_name, inv.bill_no, inv.bill_date,
|
account_map.get(inv.credit_to), ", ".join(project_name), inv.bill_no, inv.bill_date,
|
||||||
inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)]
|
inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)]
|
||||||
|
|
||||||
# map expense values
|
# map expense values
|
||||||
@ -105,11 +106,10 @@ def get_conditions(filters):
|
|||||||
|
|
||||||
def get_invoices(filters):
|
def get_invoices(filters):
|
||||||
conditions = get_conditions(filters)
|
conditions = get_conditions(filters)
|
||||||
return webnotes.conn.sql("""select pi.name, pi.posting_date, pi.credit_to,
|
return webnotes.conn.sql("""select name, posting_date, credit_to,
|
||||||
pii.project_name, pi.supplier, pi.bill_no, pi.bill_date, pi.remarks, pi.net_total,
|
supplier, bill_no, bill_date, remarks, net_total,
|
||||||
pi.total_tax, pi.grand_total, pi.outstanding_amount
|
total_tax, grand_total, outstanding_amount
|
||||||
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pii
|
from `tabPurchase Invoice` where docstatus = 1 %s
|
||||||
where pii.parent = pi.name and pi.docstatus = 1 %s
|
|
||||||
order by posting_date desc, name desc""" % conditions, filters, as_dict=1)
|
order by posting_date desc, name desc""" % conditions, filters, as_dict=1)
|
||||||
|
|
||||||
|
|
||||||
@ -138,8 +138,8 @@ def get_invoice_tax_map(invoice_list):
|
|||||||
return invoice_tax_map
|
return invoice_tax_map
|
||||||
|
|
||||||
def get_invoice_po_pr_map(invoice_list):
|
def get_invoice_po_pr_map(invoice_list):
|
||||||
pi_items = webnotes.conn.sql("""select parent, purchase_order, purchase_receipt
|
pi_items = webnotes.conn.sql("""select parent, purchase_order, purchase_receipt,
|
||||||
from `tabPurchase Invoice Item` where parent in (%s)
|
project_name from `tabPurchase Invoice Item` where parent in (%s)
|
||||||
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
|
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
|
||||||
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
|
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
|
||||||
|
|
||||||
@ -151,6 +151,9 @@ def get_invoice_po_pr_map(invoice_list):
|
|||||||
if d.purchase_receipt:
|
if d.purchase_receipt:
|
||||||
invoice_po_pr_map.setdefault(d.parent, webnotes._dict()).setdefault(
|
invoice_po_pr_map.setdefault(d.parent, webnotes._dict()).setdefault(
|
||||||
"purchase_receipt", []).append(d.purchase_receipt)
|
"purchase_receipt", []).append(d.purchase_receipt)
|
||||||
|
if d.project_name:
|
||||||
|
invoice_po_pr_map.setdefault(d.parent, webnotes._dict()).setdefault(
|
||||||
|
"project_name", []).append(d.project_name)
|
||||||
|
|
||||||
return invoice_po_pr_map
|
return invoice_po_pr_map
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Sales Invoice"
|
conditions = get_columns(filters, "Sales Invoice")
|
||||||
conditions = get_columns(filters, trans)
|
|
||||||
data = get_data(filters, conditions)
|
data = get_data(filters, conditions)
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Purchase Order"
|
conditions = get_columns(filters, "Purchase Order")
|
||||||
conditions = get_columns(filters, trans)
|
|
||||||
data = get_data(filters, conditions)
|
data = get_data(filters, conditions)
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -71,7 +71,7 @@ class AccountsController(TransactionBase):
|
|||||||
ret = get_item_details(args)
|
ret = get_item_details(args)
|
||||||
for fieldname, value in ret.items():
|
for fieldname, value in ret.items():
|
||||||
if self.meta.get_field(fieldname, parentfield=self.fname) and \
|
if self.meta.get_field(fieldname, parentfield=self.fname) and \
|
||||||
not item.fields.get(fieldname):
|
item.fields.get(fieldname) is None:
|
||||||
item.fields[fieldname] = value
|
item.fields[fieldname] = value
|
||||||
|
|
||||||
def set_taxes(self, tax_doctype, tax_parentfield, tax_master_field):
|
def set_taxes(self, tax_doctype, tax_parentfield, tax_master_field):
|
||||||
|
@ -243,10 +243,9 @@ patch_list = [
|
|||||||
"execute:webnotes.delete_doc('DocType', 'System Console')",
|
"execute:webnotes.delete_doc('DocType', 'System Console')",
|
||||||
"patches.june_2013.p03_buying_selling_for_price_list",
|
"patches.june_2013.p03_buying_selling_for_price_list",
|
||||||
"patches.june_2013.p04_fix_event_for_lead_oppty_project",
|
"patches.june_2013.p04_fix_event_for_lead_oppty_project",
|
||||||
|
"patches.june_2013.p05_remove_search_criteria_reports",
|
||||||
"patches.june_2013.p05_remove_unused_doctypes",
|
"patches.june_2013.p05_remove_unused_doctypes",
|
||||||
"patches.june_2013.p06_drop_unused_tables",
|
"patches.june_2013.p06_drop_unused_tables",
|
||||||
"patches.june_2013.p08_shopping_cart_settings",
|
|
||||||
"patches.june_2013.p05_remove_search_criteria_reports",
|
|
||||||
"patches.june_2013.p07_taxes_price_list_for_territory",
|
"patches.june_2013.p07_taxes_price_list_for_territory",
|
||||||
"patches.june_2013.p08_shopping_cart_settings",
|
"patches.june_2013.p08_shopping_cart_settings",
|
||||||
"patches.june_2013.p09_update_global_defaults",
|
"patches.june_2013.p09_update_global_defaults",
|
||||||
|
@ -35,11 +35,12 @@ class DocType:
|
|||||||
def create_receiver_list(self):
|
def create_receiver_list(self):
|
||||||
rec, where_clause = '', ''
|
rec, where_clause = '', ''
|
||||||
if self.doc.send_to == 'All Customer Contact':
|
if self.doc.send_to == 'All Customer Contact':
|
||||||
where_clause = self.doc.customer and " and customer = '%s'" % self.doc.customer or " and ifnull(is_customer, 0) = 1"
|
where_clause = self.doc.customer and " and customer = '%s'" % self.doc.customer or " and ifnull(customer, '') != ''"
|
||||||
if self.doc.send_to == 'All Supplier Contact':
|
if self.doc.send_to == 'All Supplier Contact':
|
||||||
where_clause = self.doc.supplier and " and ifnull(is_supplier, 0) = 1 and supplier = '%s'" % self.doc.supplier or " and ifnull(is_supplier, 0) = 1"
|
where_clause = self.doc.supplier and " and ifnull(is_supplier, 0) = 1 and supplier = '%s'" % self.doc.supplier or " and ifnull(supplier, '') != ''"
|
||||||
if self.doc.send_to == 'All Sales Partner Contact':
|
if self.doc.send_to == 'All Sales Partner Contact':
|
||||||
where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_aprtner = '%s'" % self.doc.sales_partner or " and ifnull(is_sales_partner, 0) = 1"
|
where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_partner = '%s'" % self.doc.sales_partner or " and ifnull(sales_partner, '') != ''"
|
||||||
|
|
||||||
if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']:
|
if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']:
|
||||||
rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
|
rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
|
||||||
elif self.doc.send_to == 'All Lead (Open)':
|
elif self.doc.send_to == 'All Lead (Open)':
|
||||||
|
@ -21,8 +21,7 @@ from controllers.trends import get_columns, get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Quotation"
|
conditions = get_columns(filters, "Quotation")
|
||||||
conditions = get_columns(filters, trans)
|
|
||||||
data = get_data(filters, conditions)
|
data = get_data(filters, conditions)
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Sales Order"
|
conditions = get_columns(filters, "Sales Order")
|
||||||
conditions = get_columns(filters, trans)
|
|
||||||
data = get_data(filters, conditions)
|
data = get_data(filters, conditions)
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -21,8 +21,7 @@ from controllers.trends import get_columns,get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Delivery Note"
|
conditions = get_columns(filters, "Delivery Note")
|
||||||
conditions = get_columns(filters, trans)
|
|
||||||
data = get_data(filters, conditions)
|
data = get_data(filters, conditions)
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -21,11 +21,7 @@ from controllers.trends import get_columns,get_data
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters ={}
|
if not filters: filters ={}
|
||||||
data = []
|
data = []
|
||||||
trans = "Purchase Receipt"
|
conditions = get_columns(filters, "Purchase Receipt")
|
||||||
conditions = get_columns(filters, trans)
|
data = get_data(filters, conditions)
|
||||||
data = get_data(filters, tab, conditions)
|
|
||||||
|
|
||||||
if not data :
|
|
||||||
webnotes.msgprint("Data not found for selected criterias")
|
|
||||||
|
|
||||||
return conditions["columns"], data
|
return conditions["columns"], data
|
@ -20,14 +20,16 @@ import webnotes
|
|||||||
def delete_transactions():
|
def delete_transactions():
|
||||||
print "Deleting transactions..."
|
print "Deleting transactions..."
|
||||||
|
|
||||||
trans = ['Timesheet', 'Task', 'Support Ticket', 'Stock Reconciliation', 'Stock Ledger Entry',
|
trans = ['Task', 'Support Ticket', 'Stock Reconciliation', 'Stock Ledger Entry',
|
||||||
'Stock Entry', 'Sales Order', 'Salary Slip','Sales Invoice', 'Quotation',
|
'Stock Entry', 'Sales Order', 'Salary Slip','Sales Invoice', 'Quotation',
|
||||||
'Quality Inspection', 'Purchase Receipt', 'Purchase Order', 'Production Order',
|
'Quality Inspection', 'Purchase Receipt', 'Purchase Order', 'Production Order',
|
||||||
'POS Setting', 'Period Closing Voucher', 'Purchase Invoice', 'Maintenance Visit',
|
'POS Setting', 'Period Closing Voucher', 'Purchase Invoice', 'Maintenance Visit',
|
||||||
'Maintenance Schedule', 'Leave Application', 'Leave Allocation', 'Lead', 'Journal Voucher',
|
'Maintenance Schedule', 'Leave Application', 'Leave Allocation', 'Lead', 'Journal Voucher',
|
||||||
'Installation Note', 'Material Request', 'GL Entry', 'Expense Claim', 'Opportunity',
|
'Installation Note', 'Material Request', 'GL Entry', 'Expense Claim', 'Opportunity',
|
||||||
'Delivery Note', 'Customer Issue', 'Bin', 'Authorization Rule', 'Attendance', 'C-Form',
|
'Delivery Note', 'Customer Issue', 'Bin', 'Authorization Rule', 'Attendance', 'C-Form',
|
||||||
'Appraisal', 'Installation Note', 'Communication']
|
'Appraisal', 'Installation Note', 'Communication', "Supplier Quotation", "Newsletter",
|
||||||
|
"Job Applicant", "Web Page", "Website Slideshow", "Blog Post", "Blog Category", "Blogger",
|
||||||
|
"Time Log", "Time Log Batch", "Workflow"]
|
||||||
for d in trans:
|
for d in trans:
|
||||||
for t in webnotes.conn.sql("select options from tabDocField where parent='%s' and fieldtype='Table'" % d):
|
for t in webnotes.conn.sql("select options from tabDocField where parent='%s' and fieldtype='Table'" % d):
|
||||||
webnotes.conn.sql("delete from `tab%s`" % (t))
|
webnotes.conn.sql("delete from `tab%s`" % (t))
|
||||||
@ -66,6 +68,7 @@ def delete_masters():
|
|||||||
'Item Group': ['All Item Groups', 'Default'],
|
'Item Group': ['All Item Groups', 'Default'],
|
||||||
'Item': '',
|
'Item': '',
|
||||||
'Holiday List': '',
|
'Holiday List': '',
|
||||||
|
'Activity Type': '',
|
||||||
'Grade': '',
|
'Grade': '',
|
||||||
'Feed': '',
|
'Feed': '',
|
||||||
'Expense Claim Type': ['Travel', 'Medical', 'Calls', 'Food', 'Others'],
|
'Expense Claim Type': ['Travel', 'Medical', 'Calls', 'Food', 'Others'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user