[minor] fixed conflict while merging perpetual branch into master

This commit is contained in:
Nabin Hait
2013-09-24 14:36:55 +05:30
107 changed files with 2671 additions and 2122 deletions

View File

@@ -68,9 +68,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

View File

@@ -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

View File

@@ -267,17 +267,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):

View File

@@ -42,7 +42,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'):