mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into wsgi
Conflicts: accounts/doctype/account/account.py accounts/doctype/gl_entry/gl_entry.py accounts/doctype/period_closing_voucher/period_closing_voucher.py stock/doctype/delivery_note/delivery_note.py stock/doctype/landed_cost_wizard/landed_cost_wizard.py stock/doctype/purchase_receipt/purchase_receipt.py stock/doctype/stock_ledger/stock_ledger.py stock/doctype/warehouse/warehouse.py stock/stock_ledger.py
This commit is contained in:
@@ -67,9 +67,9 @@ class DocType(TransactionBase):
|
||||
ac_bean.ignore_permissions = True
|
||||
ac_bean.insert()
|
||||
|
||||
msgprint("Account Head: %s created" % ac_bean.doc.name)
|
||||
msgprint(_("Account Head") + ": " + ac_bean.doc.name + _(" created"))
|
||||
else :
|
||||
msgprint("Please Select Company under which you want to create account head")
|
||||
msgprint(_("Please Select Company under which you want to create account head"))
|
||||
|
||||
def update_credit_days_limit(self):
|
||||
webnotes.conn.sql("""update tabAccount set credit_days = %s, credit_limit = %s
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-10 11:45:37",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-10 10:52:20",
|
||||
"modified": "2013-09-19 10:38:58",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -158,10 +158,77 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "communication_history",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Communication History",
|
||||
"label": "Communication",
|
||||
"options": "icon-comments",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"default": "__user",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "lead_owner",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Lead Owner",
|
||||
"oldfieldname": "lead_owner",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Profile",
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.__islocal",
|
||||
"description": "Date on which the lead was last contacted",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "last_contact_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Last Contact Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "last_contact_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break123",
|
||||
"fieldtype": "Column Break",
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"description": "Your sales person who will contact the lead in future",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_by",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"label": "Next Contact By",
|
||||
"oldfieldname": "contact_by",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Profile",
|
||||
"print_hide": 0,
|
||||
"reqd": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"description": "Your sales person will get a reminder on this date to contact the lead",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_date",
|
||||
"fieldtype": "Date",
|
||||
"in_filter": 1,
|
||||
"label": "Next Contact Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "contact_date",
|
||||
"oldfieldtype": "Date",
|
||||
"reqd": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "sec_break123",
|
||||
"fieldtype": "Section Break",
|
||||
"options": "Simple"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"doctype": "DocField",
|
||||
@@ -274,18 +341,6 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nClient\nChannel Partner\nConsultant"
|
||||
},
|
||||
{
|
||||
"default": "__user",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "lead_owner",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Lead Owner",
|
||||
"oldfieldname": "lead_owner",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Profile",
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "market_segment",
|
||||
@@ -347,49 +402,6 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Quotation Lost Reason"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"description": "Your sales person who will contact the lead in future",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_by",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"label": "Next Contact By",
|
||||
"oldfieldname": "contact_by",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Profile",
|
||||
"print_hide": 0,
|
||||
"reqd": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"description": "Your sales person will get a reminder on this date to contact the lead",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_date",
|
||||
"fieldtype": "Date",
|
||||
"in_filter": 1,
|
||||
"label": "Next Contact Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "contact_date",
|
||||
"oldfieldtype": "Date",
|
||||
"reqd": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.__islocal",
|
||||
"description": "Date on which the lead was last contacted",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "last_contact_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Last Contact Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "last_contact_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "company",
|
||||
|
||||
@@ -140,7 +140,7 @@ class DocType(TransactionBase):
|
||||
for p in getlist(obj.doclist, 'packing_details'):
|
||||
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
|
||||
# the packing details table's qty is already multiplied with parent's qty
|
||||
il.append({
|
||||
il.append(webnotes._dict({
|
||||
'warehouse': p.warehouse,
|
||||
'reserved_warehouse': reserved_warehouse,
|
||||
'item_code': p.item_code,
|
||||
@@ -150,9 +150,9 @@ class DocType(TransactionBase):
|
||||
'batch_no': cstr(p.batch_no).strip(),
|
||||
'serial_no': cstr(p.serial_no).strip(),
|
||||
'name': d.name
|
||||
})
|
||||
}))
|
||||
else:
|
||||
il.append({
|
||||
il.append(webnotes._dict({
|
||||
'warehouse': d.warehouse,
|
||||
'reserved_warehouse': reserved_warehouse,
|
||||
'item_code': d.item_code,
|
||||
@@ -162,7 +162,7 @@ class DocType(TransactionBase):
|
||||
'batch_no': cstr(d.batch_no).strip(),
|
||||
'serial_no': cstr(d.serial_no).strip(),
|
||||
'name': d.name
|
||||
})
|
||||
}))
|
||||
return il
|
||||
|
||||
def get_already_delivered_qty(self, dn, so, so_detail):
|
||||
@@ -311,7 +311,8 @@ class DocType(TransactionBase):
|
||||
acc_head = webnotes.conn.sql("select name from `tabAccount` where company = '%s' and master_name = '%s'"%(obj.doc.company, obj.doc.customer))
|
||||
if acc_head:
|
||||
tot_outstanding = 0
|
||||
dbcr = webnotes.conn.sql("select sum(debit), sum(credit) from `tabGL Entry` where account = '%s' and ifnull(is_cancelled, 'No')='No'" % acc_head[0][0])
|
||||
dbcr = webnotes.conn.sql("""select sum(debit), sum(credit) from `tabGL Entry`
|
||||
where account = %s""", acc_head[0][0])
|
||||
if dbcr:
|
||||
tot_outstanding = flt(dbcr[0][0])-flt(dbcr[0][1])
|
||||
|
||||
@@ -336,7 +337,6 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
|
||||
return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle
|
||||
where item_code = '%(item_code)s'
|
||||
and warehouse = '%(warehouse)s'
|
||||
and ifnull(is_cancelled, 'No') = 'No'
|
||||
and batch_no like '%(txt)s'
|
||||
and exists(select * from `tabBatch`
|
||||
where name = sle.batch_no
|
||||
|
||||
@@ -266,17 +266,19 @@ class DocType(SellingController):
|
||||
|
||||
|
||||
def update_stock_ledger(self, update_stock, is_stopped = 0):
|
||||
from stock.utils import update_bin
|
||||
for d in self.get_item_list(is_stopped):
|
||||
if webnotes.conn.get_value("Item", d['item_code'], "is_stock_item") == "Yes":
|
||||
args = {
|
||||
"item_code": d['item_code'],
|
||||
"warehouse": d['reserved_warehouse'],
|
||||
"reserved_qty": flt(update_stock) * flt(d['reserved_qty']),
|
||||
"posting_date": self.doc.transaction_date,
|
||||
"voucher_type": self.doc.doctype,
|
||||
"voucher_no": self.doc.name,
|
||||
"is_amended": self.doc.amended_from and 'Yes' or 'No'
|
||||
}
|
||||
get_obj('Warehouse', d['reserved_warehouse']).update_bin(args)
|
||||
update_bin(args)
|
||||
|
||||
|
||||
def get_item_list(self, is_stopped):
|
||||
|
||||
@@ -41,7 +41,7 @@ class DocType:
|
||||
for d in rec:
|
||||
rec_list += d[0] + ' - ' + d[1] + '\n'
|
||||
self.doc.receiver_list = rec_list
|
||||
webnotes.errprint(rec_list)
|
||||
|
||||
def get_receiver_nos(self):
|
||||
receiver_nos = []
|
||||
for d in self.doc.receiver_list.split('\n'):
|
||||
|
||||
@@ -27,7 +27,7 @@ def get_product_info(item_code):
|
||||
else:
|
||||
in_stock = -1
|
||||
|
||||
price = price_list and webnotes.conn.sql("""select ip.ref_rate, pl.ref_currency from
|
||||
price = price_list and webnotes.conn.sql("""select ip.ref_rate, pl.currency from
|
||||
`tabItem Price` ip, `tabPrice List` pl where ip.parent = pl.name and
|
||||
ip.item_code=%s and ip.parent=%s""",
|
||||
(item_code, price_list), as_dict=1) or []
|
||||
@@ -36,10 +36,10 @@ def get_product_info(item_code):
|
||||
qty = 0
|
||||
|
||||
if price:
|
||||
price["formatted_price"] = fmt_money(price["ref_rate"], currency=price["ref_currency"])
|
||||
price["formatted_price"] = fmt_money(price["ref_rate"], currency=price["currency"])
|
||||
|
||||
price["ref_currency"] = not cint(webnotes.conn.get_default("hide_currency_symbol")) \
|
||||
and (webnotes.conn.get_value("Currency", price.ref_currency, "symbol") or price.ref_currency) \
|
||||
price["currency"] = not cint(webnotes.conn.get_default("hide_currency_symbol")) \
|
||||
and (webnotes.conn.get_value("Currency", price.currency, "symbol") or price.currency) \
|
||||
or ""
|
||||
|
||||
if webnotes.session.user != "Guest":
|
||||
|
||||
Reference in New Issue
Block a user