Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi 2012-03-01 17:55:13 +05:30
commit 232d725fd7
7 changed files with 11 additions and 14 deletions

View File

@ -177,7 +177,7 @@ class DocType:
#----------------------------------------------------------------------------
def make_single_entry(self,parent,d,le_map,cancel, merge_entries):
if self.get_val(le_map['account'], d, parent) and (self.get_val(le_map['debit'], d, parent) or self.get_val(le_map['credit'], d, parent)):
flist = ['account','cost_center','against','debit','credit','remarks','voucher_type','voucher_no','transaction_date','posting_date','fiscal_year','against_voucher','against_voucher_type','company','is_opening', 'aging_date']
flist = ['account','cost_center','against','debit','credit','remarks','voucher_type','voucher_no','posting_date','fiscal_year','against_voucher','against_voucher_type','company','is_opening', 'aging_date']
# Check budget before gl entry
#check budget only if account is expense account
@ -536,7 +536,6 @@ def create_new_invoice(prev_rv):
# update new rv
new_rv.doc.voucher_date = new_rv.doc.next_date
new_rv.doc.posting_date = new_rv.doc.next_date
new_rv.doc.aging_date = new_rv.doc.next_date
new_rv.doc.due_date = add_days(new_rv.doc.next_date, cint(date_diff(prev_rv.doc.due_date, prev_rv.doc.posting_date)))

View File

@ -533,7 +533,7 @@ class DocType(TransactionBase):
self.values.append({
'item_code' : d.item_code,
'warehouse' : wh,
'transaction_date' : self.doc.voucher_date,
'transaction_date' : getdate(self.doc.modified).strftime('%Y-%m-%d'),
'posting_date' : self.doc.posting_date,
'posting_time' : self.doc.posting_time,
'voucher_type' : 'Receivable Voucher',

View File

@ -66,7 +66,7 @@ for r in row_list:
for r in res:
if r[col_idx['Against Receivable']]:
dt=sql("select voucher_date, Aging_date from `tabReceivable Voucher` where name='%s'"%r[col_idx['Against Receivable']])
dt=sql("select date(modified), Aging_date from `tabReceivable Voucher` where name='%s'"%r[col_idx['Against Receivable']])
r.append('')
r.append(dt and cstr(dt[0][0]) or '')
r.append(dt and cstr(dt[0][1]) or '')
@ -103,4 +103,4 @@ for r in res:
r.append(val_l2)
r.append(val_l3)
r.append(val_l4)
r.append(val_l5_above)
r.append(val_l5_above)

View File

@ -66,7 +66,7 @@ for r in row_list:
for r in res:
if r[col_idx['Against Payable']]:
dt=sql("select voucher_date, aging_date from `tabPayable Voucher` where name='%s'"%r[col_idx['Against Payable']])
dt=sql("select date(modified), aging_date from `tabPayable Voucher` where name='%s'"%r[col_idx['Against Payable']])
r.append('')
r.append(dt and cstr(dt[0][0]) or '')
r.append(dt and cstr(dt[0][1]) or '')
@ -102,4 +102,4 @@ for r in res:
r.append(val_l2)
r.append(val_l3)
r.append(val_l4)
r.append(val_l5_above)
r.append(val_l5_above)

View File

@ -16,6 +16,4 @@
def execute():
import webnotes
webnotes.conn.sql("""
delete from __SessionCache
""")
webnotes.clear_cache()

View File

@ -33,10 +33,10 @@ def execute():
}
for d in del_flds:
webnotes.conn.sql("delete from `tabDocField` where fieldname in (%s) and parent = %s", (del_flds[d], d))
webnotes.conn.sql("delete from `tabDocField` where fieldname in (%s) and parent = '%s'"% (del_flds[d], d))
for d in del_labels:
webnotes.conn.sql("delete from `tabDocField` where label in (%s) and parent = %s", (del_labels[d], d))
webnotes.conn.sql("delete from `tabDocField` where label in (%s) and parent = '%s'"% (del_labels[d], d))
delete_doc('DocType', 'Update Delivery Date Detail')

View File

@ -60,7 +60,7 @@ elif based_on == 'Sales Partner':
if under == 'Receivable Voucher':
under_detail = 'RV'
dt = 'voucher_date'
dt = 'posting_date'
else:
under_detail = under
dt = "transaction_date"
@ -516,4 +516,4 @@ for r in res:
tot_target = 0
elif tl == 1:
out.append(r)
out.append(r)