mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
working on merging sales purchase return into stock entry
This commit is contained in:
14
accounts/doctype/pos_setting/test_pos_setting.py
Normal file
14
accounts/doctype/pos_setting/test_pos_setting.py
Normal 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",
|
||||
}]
|
||||
]
|
||||
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -297,7 +297,7 @@ class TestSalesInvoice(unittest.TestCase):
|
||||
])
|
||||
ps.insert()
|
||||
|
||||
test_dependencies = ["Journal Voucher"]
|
||||
test_dependencies = ["Journal Voucher", "POS Setting"]
|
||||
|
||||
test_records = [
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user