[sales taxes and charges] renamed field cost_center_other_charges to cost_center
This commit is contained in:
parent
90dad5c5b5
commit
aeef7bd910
@ -725,7 +725,7 @@ class DocType(SellingController):
|
|||||||
"against": self.doc.debit_to,
|
"against": self.doc.debit_to,
|
||||||
"credit": flt(tax.tax_amount),
|
"credit": flt(tax.tax_amount),
|
||||||
"remarks": self.doc.remarks,
|
"remarks": self.doc.remarks,
|
||||||
"cost_center": tax.cost_center_other_charges
|
"cost_center": tax.cost_center
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:41",
|
"creation": "2013-02-22 01:27:41",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-04-17 14:05:18",
|
"modified": "2013-04-17 14:05:50",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -50,7 +50,7 @@
|
|||||||
{
|
{
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "cost_center_other_charges",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
"oldfieldname": "cost_center_other_charges",
|
"oldfieldname": "cost_center_other_charges",
|
||||||
|
@ -140,7 +140,7 @@ cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query =
|
|||||||
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND tabAccount.account_type in ("Tax", "Chargeable", "Income Account") AND tabAccount.company = "'+doc.company+'" AND tabAccount.name LIKE "%s"'
|
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND tabAccount.account_type in ("Tax", "Chargeable", "Income Account") AND tabAccount.company = "'+doc.company+'" AND tabAccount.name LIKE "%s"'
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict['other_charges'].grid.get_field("cost_center_other_charges").get_query = function(doc) {
|
cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = function(doc) {
|
||||||
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
|
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
for dt, fieldname in \
|
webnotes.reload_doc("Stock", "DocType", "Delivery Note Item")
|
||||||
(("Journal Voucher Detail", "cost_center"),
|
for dt in ("Journal Voucher Detail", "Sales Taxes and Charges",
|
||||||
("Sales Taxes and Charges", "cost_center_other_charges"),
|
"Purchase Taxes and Charges", "Delivery Note Item",
|
||||||
("Purchase Taxes and Charges", "cost_center"), ("Delivery Note Item", "cost_center"),
|
"Purchase Invoice Item", "Sales Invoice Item"):
|
||||||
("Purchase Invoice Item", "cost_center"), ("Sales Invoice Item", "cost_center")):
|
webnotes.conn.sql_ddl("""alter table `tab%s` alter `cost_center` drop default""" \
|
||||||
webnotes.conn.sql_ddl("""alter table `tab%s` alter `%s` drop default""" % (dt, fieldname))
|
% (dt,))
|
||||||
webnotes.reload_doc(webnotes.conn.get_value("DocType", dt, "module"), "DocType", dt)
|
webnotes.reload_doc(webnotes.conn.get_value("DocType", dt, "module"), "DocType", dt)
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
import webnotes
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
webnotes.reload_doc("Accounts", "DocType", "Sales Taxes and Charges")
|
||||||
|
webnotes.conn.sql("""update `tabSales Taxes and Charges`
|
||||||
|
set cost_center = cost_center_other_charges""")
|
||||||
|
webnotes.conn.sql_ddl("""alter table `tabSales Taxes and Charges`
|
||||||
|
drop column cost_center_other_charges""")
|
||||||
|
|
@ -244,5 +244,6 @@ patch_list = [
|
|||||||
"patches.april_2013.p06_update_file_size",
|
"patches.april_2013.p06_update_file_size",
|
||||||
"patches.april_2013.p05_fixes_in_reverse_modules",
|
"patches.april_2013.p05_fixes_in_reverse_modules",
|
||||||
"execute:webnotes.delete_doc('DocType Mapper', 'Delivery Note-Packing Slip')",
|
"execute:webnotes.delete_doc('DocType Mapper', 'Delivery Note-Packing Slip')",
|
||||||
|
"patches.april_2013.p07_rename_cost_center_other_charges",
|
||||||
"patches.april_2013.p06_default_cost_center",
|
"patches.april_2013.p06_default_cost_center",
|
||||||
]
|
]
|
@ -36,9 +36,8 @@ def boot_session(bootinfo):
|
|||||||
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']:
|
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']:
|
||||||
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
|
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
|
||||||
|
|
||||||
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center,
|
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
|
||||||
cost_center as 'cost_center_other_charges' from `tabCompany`""",
|
from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
|
||||||
as_dict=1, update={"doctype":":Company"})
|
|
||||||
|
|
||||||
def get_letter_heads():
|
def get_letter_heads():
|
||||||
"""load letter heads with startup"""
|
"""load letter heads with startup"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user