[merge] [minor] merged with master for serial_no updatess

This commit is contained in:
Nabin Hait
2013-08-20 11:28:38 +05:30
40 changed files with 810 additions and 761 deletions

View File

@@ -1,10 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
def execute():
import webnotes
from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'serial_no')
webnotes.conn.sql("update `tabSerial No` set sle_exists = 1")

View File

@@ -0,0 +1,5 @@
import webnotes
def execute():
webnotes.conn.sql("""update `tabSerial No` set status = 'Not Available' where status='Not In Store'""")
webnotes.conn.sql("""update `tabSerial No` set status = 'Available' where status='In Store'""")

View File

@@ -13,7 +13,7 @@ def execute():
where account = %s and voucher_type = 'Sales Invoice' and voucher_no = %s
and ifnull(is_cancelled, 'No') = 'No' limit 1""", (r.debit_to, r.name), as_dict=1)
if gle:
diff = round((flt(r.grand_total) - flt(gle[0]['debit'])), 2)
diff = flt((flt(r.grand_total) - flt(gle[0]['debit'])), 2)
if abs(diff) == 0.01:
# print r.name, r.grand_total, gle[0]['debit'], diff

View File

@@ -39,7 +39,7 @@ def execute():
status = 'Not in Use'
if sle and flt(sle[0]['actual_qty']) > 0:
status = 'In Store'
status = 'Available'
elif sle and flt(sle[0]['actual_qty']) < 0:
status = 'Delivered'

View File

@@ -22,7 +22,6 @@ patch_list = [
"patches.april_2012.update_role_in_address",
"patches.april_2012.update_permlevel_in_address",
"patches.april_2012.update_appraisal_permission",
"patches.april_2012.serial_no_fixes",
"patches.april_2012.repost_stock_for_posting_time",
"patches.may_2012.cleanup_property_setter",
"patches.may_2012.rename_prev_doctype",
@@ -255,6 +254,8 @@ patch_list = [
"patches.august_2013.p01_hr_settings",
"patches.august_2013.p02_rename_price_list",
"patches.august_2013.p03_pos_setting_replace_customer_account",
"patches.august_2013.p05_update_serial_no_status",
"patches.august_2013.p05_employee_birthdays",
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16",
"execute:webnotes.delete_doc('DocType', 'Stock Ledger')",
]