working on merging sales purchase return into stock entry

This commit is contained in:
Anand Doshi
2013-03-13 12:57:04 +05:30
parent f55922e962
commit 71bed3116f
14 changed files with 365 additions and 48 deletions

View File

@@ -0,0 +1,14 @@
test_records = [
[{
"doctype": "POS Setting",
"name": "_Test POS Setting",
"currency": "INR",
"conversion_rate": 1.0,
"price_list_name": "_Test Price List",
"company": "_Test Company",
"warehouse": "_Test Warehouse",
"cash_bank_account": "_Test Account Bank Account - _TC",
"income_account": "Sales - _TC",
"cost_center": "_Test Cost Center - _TC",
}]
]

View File

@@ -47,6 +47,7 @@ class DocType(SellingController):
def validate(self):
super(DocType, self).validate()
self.validate_posting_time()
self.so_dn_required()
self.validate_proj_cust()
sales_com_obj = get_obj('Sales Common')
@@ -636,10 +637,9 @@ class DocType(SellingController):
# Reduce actual qty from warehouse
self.make_sl_entry( d, d['warehouse'], - flt(d['qty']) , 0, update_stock)
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
def get_actual_qty(self,args):
args = eval(args)
actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], args['warehouse']), as_dict=1)

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-29 17:54:09",
"creation": "2013-03-12 11:56:25",
"docstatus": 0,
"modified": "2013-01-29 18:22:52",
"modified": "2013-03-12 14:31:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -77,7 +77,6 @@
"print_hide": 1
},
{
"default": "1",
"depends_on": "eval:doc.is_pos==1",
"doctype": "DocField",
"fieldname": "update_stock",

View File

@@ -297,7 +297,7 @@ class TestSalesInvoice(unittest.TestCase):
])
ps.insert()
test_dependencies = ["Journal Voucher"]
test_dependencies = ["Journal Voucher", "POS Setting"]
test_records = [
[