本文整理汇总了Python中stock.doctype.purchase_receipt.test_purchase_receipt.set_perpetual_inventory函数的典型用法代码示例。如果您正苦于以下问题:Python set_perpetual_inventory函数的具体用法?Python set_perpetual_inventory怎么用?Python set_perpetual_inventory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_perpetual_inventory函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_sales_invoice_gl_entry_without_aii
def test_sales_invoice_gl_entry_without_aii(self):
self.clear_stock_account_balance()
set_perpetual_inventory(0)
si = webnotes.bean(copy=test_records[1])
si.insert()
si.submit()
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
order by account asc""", si.doc.name, as_dict=1)
self.assertTrue(gl_entries)
expected_values = sorted([
[si.doc.debit_to, 630.0, 0.0],
[test_records[1][1]["income_account"], 0.0, 500.0],
[test_records[1][2]["account_head"], 0.0, 80.0],
[test_records[1][3]["account_head"], 0.0, 50.0],
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
# cancel
si.cancel()
gle = webnotes.conn.sql("""select * from `tabGL Entry`
where voucher_type='Sales Invoice' and voucher_no=%s""", si.doc.name)
self.assertFalse(gle)
开发者ID:Jdfkat,项目名称:erpnext,代码行数:32,代码来源:test_sales_invoice.py
示例2: test_gl_entries_with_auto_accounting_for_stock
def test_gl_entries_with_auto_accounting_for_stock(self):
set_perpetual_inventory(1)
self.assertEqual(cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")), 1)
pi = webnotes.bean(copy=test_records[1])
pi.run_method("calculate_taxes_and_totals")
pi.insert()
pi.submit()
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
order by account asc""", pi.doc.name, as_dict=1)
self.assertTrue(gl_entries)
expected_values = sorted([
["_Test Supplier - _TC", 0, 720],
["Stock Received But Not Billed - _TC", 750.0, 0],
["_Test Account Shipping Charges - _TC", 100.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
["Expenses Included In Valuation - _TC", 0, 250.0],
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
set_perpetual_inventory(0)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:28,代码来源:test_purchase_invoice.py
示例3: test_planned_qty
def test_planned_qty(self):
set_perpetual_inventory(0)
webnotes.conn.sql("delete from `tabStock Ledger Entry`")
webnotes.conn.sql("""delete from `tabBin`""")
webnotes.conn.sql("""delete from `tabGL Entry`""")
pro_bean = webnotes.bean(copy = test_records[0])
pro_bean.insert()
pro_bean.submit()
from stock.doctype.stock_entry.test_stock_entry import test_records as se_test_records
mr1 = webnotes.bean(copy = se_test_records[0])
mr1.insert()
mr1.submit()
mr2 = webnotes.bean(copy = se_test_records[0])
mr2.doclist[1].item_code = "_Test Item Home Desktop 100"
mr2.insert()
mr2.submit()
stock_entry = make_stock_entry(pro_bean.doc.name, "Manufacture/Repack")
stock_entry = webnotes.bean(stock_entry)
stock_entry.doc.fg_completed_qty = 4
stock_entry.doc.posting_date = "2013-05-12"
stock_entry.doc.fiscal_year = "_Test Fiscal Year 2013"
stock_entry.run_method("get_items")
stock_entry.submit()
self.assertEqual(webnotes.conn.get_value("Production Order", pro_bean.doc.name,
"produced_qty"), 4)
self.assertEqual(webnotes.conn.get_value("Bin", {"item_code": "_Test FG Item",
"warehouse": "_Test Warehouse 1 - _TC"}, "planned_qty"), 6)
return pro_bean.doc.name
开发者ID:RanjithP,项目名称:erpnext,代码行数:35,代码来源:test_production_order.py
示例4: test_gl_entries_with_aia_for_non_stock_items
def test_gl_entries_with_aia_for_non_stock_items(self):
set_perpetual_inventory()
self.assertEqual(cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")), 1)
pi = webnotes.bean(copy=test_records[1])
pi.doclist[1].item_code = "_Test Non Stock Item"
pi.doclist[1].expense_head = "_Test Account Cost for Goods Sold - _TC"
pi.doclist.pop(2)
pi.doclist.pop(3)
pi.run_method("calculate_taxes_and_totals")
pi.insert()
pi.submit()
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
order by account asc""", pi.doc.name, as_dict=1)
self.assertTrue(gl_entries)
expected_values = sorted([
["_Test Supplier - _TC", 0, 620],
["_Test Account Cost for Goods Sold - _TC", 500.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
set_perpetual_inventory(0)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:29,代码来源:test_purchase_invoice.py
示例5: test_gl_entries_without_auto_accounting_for_stock
def test_gl_entries_without_auto_accounting_for_stock(self):
set_perpetual_inventory(0)
self.assertTrue(not cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")))
wrapper = webnotes.bean(copy=test_records[0])
wrapper.run_method("calculate_taxes_and_totals")
wrapper.insert()
wrapper.submit()
wrapper.load_from_db()
dl = wrapper.doclist
expected_gl_entries = {
"_Test Supplier - _TC": [0, 1512.30],
"_Test Account Cost for Goods Sold - _TC": [1250, 0],
"_Test Account Shipping Charges - _TC": [100, 0],
"_Test Account Excise Duty - _TC": [140, 0],
"_Test Account Education Cess - _TC": [2.8, 0],
"_Test Account S&H Education Cess - _TC": [1.4, 0],
"_Test Account CST - _TC": [29.88, 0],
"_Test Account VAT - _TC": [156.25, 0],
"_Test Account Discount - _TC": [0, 168.03],
}
gl_entries = webnotes.conn.sql("""select account, debit, credit from `tabGL Entry`
where voucher_type = 'Purchase Invoice' and voucher_no = %s""", dl[0].name, as_dict=1)
for d in gl_entries:
self.assertEqual([d.debit, d.credit], expected_gl_entries.get(d.account))
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:26,代码来源:test_purchase_invoice.py
示例6: test_material_receipt_gl_entry
def test_material_receipt_gl_entry(self):
self._clear_stock_account_balance()
set_perpetual_inventory()
mr = webnotes.bean(copy=test_records[0])
mr.insert()
mr.submit()
stock_in_hand_account = webnotes.conn.get_value("Account", {"account_type": "Warehouse",
"master_name": mr.doclist[1].t_warehouse})
self.check_stock_ledger_entries("Stock Entry", mr.doc.name,
[["_Test Item", "_Test Warehouse - _TC", 50.0]])
self.check_gl_entries("Stock Entry", mr.doc.name,
sorted([
[stock_in_hand_account, 5000.0, 0.0],
["Stock Adjustment - _TC", 0.0, 5000.0]
])
)
mr.cancel()
self.assertFalse(webnotes.conn.sql("""select * from `tabStock Ledger Entry`
where voucher_type='Stock Entry' and voucher_no=%s""", mr.doc.name))
self.assertFalse(webnotes.conn.sql("""select * from `tabGL Entry`
where voucher_type='Stock Entry' and voucher_no=%s""", mr.doc.name))
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:28,代码来源:test_stock_entry.py
示例7: test_repack_no_change_in_valuation
def test_repack_no_change_in_valuation(self):
self._clear_stock_account_balance()
set_perpetual_inventory()
self._insert_material_receipt()
repack = webnotes.bean(copy=test_records[3])
repack.insert()
repack.submit()
self.check_stock_ledger_entries(
"Stock Entry",
repack.doc.name,
[
["_Test Item", "_Test Warehouse - _TC", -50.0],
["_Test Item Home Desktop 100", "_Test Warehouse - _TC", 1],
],
)
gl_entries = webnotes.conn.sql(
"""select account, debit, credit
from `tabGL Entry` where voucher_type='Stock Entry' and voucher_no=%s
order by account desc""",
repack.doc.name,
as_dict=1,
)
self.assertFalse(gl_entries)
set_perpetual_inventory(0)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:29,代码来源:test_stock_entry.py
示例8: test_sales_invoice_gl_entry_with_aii_non_stock_item
def test_sales_invoice_gl_entry_with_aii_non_stock_item(self):
self.clear_stock_account_balance()
set_perpetual_inventory()
si_copy = webnotes.copy_doclist(test_records[1])
si_copy[1]["item_code"] = "_Test Non Stock Item"
si = webnotes.bean(si_copy)
si.insert()
si.submit()
gl_entries = webnotes.conn.sql(
"""select account, debit, credit
from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
order by account asc""",
si.doc.name,
as_dict=1,
)
self.assertTrue(gl_entries)
expected_values = sorted(
[
[si.doc.debit_to, 630.0, 0.0],
[test_records[1][1]["income_account"], 0.0, 500.0],
[test_records[1][2]["account_head"], 0.0, 80.0],
[test_records[1][3]["account_head"], 0.0, 50.0],
]
)
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
set_perpetual_inventory(0)
开发者ID:RanjithP,项目名称:erpnext,代码行数:32,代码来源:test_sales_invoice.py
示例9: test_warehouse_user
def test_warehouse_user(self):
set_perpetual_inventory(0)
from stock.utils import UserNotAllowedForWarehouse
webnotes.bean("Profile", "[email protected]").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
webnotes.bean("Profile", "[email protected]").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
webnotes.session.user = "[email protected]"
st1 = webnotes.bean(copy=test_records[0])
st1.doc.company = "_Test Company 1"
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
self.assertRaises(UserNotAllowedForWarehouse, st1.submit)
webnotes.session.user = "[email protected]"
st1 = webnotes.bean(copy=test_records[0])
st1.doc.company = "_Test Company 1"
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
st1.submit()
webnotes.session.user = "Administrator"
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:25,代码来源:test_stock_entry.py
示例10: test_material_issue_gl_entry
def test_material_issue_gl_entry(self):
self._clear_stock_account_balance()
set_perpetual_inventory()
self._insert_material_receipt()
mi = webnotes.bean(copy=test_records[1])
mi.insert()
mi.submit()
self.check_stock_ledger_entries("Stock Entry", mi.doc.name,
[["_Test Item", "_Test Warehouse - _TC", -40.0]])
stock_in_hand_account = webnotes.conn.get_value("Account", {"account_type": "Warehouse",
"master_name": mi.doclist[1].s_warehouse})
self.check_gl_entries("Stock Entry", mi.doc.name,
sorted([
[stock_in_hand_account, 0.0, 4000.0],
["Stock Adjustment - _TC", 4000.0, 0.0]
])
)
mi.cancel()
self.assertFalse(webnotes.conn.sql("""select * from `tabStock Ledger Entry`
where voucher_type='Stock Entry' and voucher_no=%s""", mi.doc.name))
self.assertFalse(webnotes.conn.sql("""select * from `tabGL Entry`
where voucher_type='Stock Entry' and voucher_no=%s""", mi.doc.name))
self.assertEquals(webnotes.conn.get_value("Bin", {"warehouse": mi.doclist[1].s_warehouse,
"item_code": mi.doclist[1].item_code}, "actual_qty"), 50)
self.assertEquals(webnotes.conn.get_value("Bin", {"warehouse": mi.doclist[1].s_warehouse,
"item_code": mi.doclist[1].item_code}, "stock_value"), 5000)
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:35,代码来源:test_stock_entry.py
示例11: test_pos_gl_entry_with_aii
def test_pos_gl_entry_with_aii(self):
self.clear_stock_account_balance()
set_perpetual_inventory()
self._insert_purchase_receipt()
self._insert_pos_settings()
pos = webnotes.copy_doclist(test_records[1])
pos[0]["is_pos"] = 1
pos[0]["update_stock"] = 1
pos[0]["posting_time"] = "12:05"
pos[0]["cash_bank_account"] = "_Test Account Bank Account - _TC"
pos[0]["paid_amount"] = 600.0
si = webnotes.bean(copy=pos)
si.insert()
si.submit()
# check stock ledger entries
sle = webnotes.conn.sql("""select * from `tabStock Ledger Entry`
where voucher_type = 'Sales Invoice' and voucher_no = %s""",
si.doc.name, as_dict=1)[0]
self.assertTrue(sle)
self.assertEquals([sle.item_code, sle.warehouse, sle.actual_qty],
["_Test Item", "_Test Warehouse - _TC", -1.0])
# check gl entries
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
order by account asc, debit asc""", si.doc.name, as_dict=1)
self.assertTrue(gl_entries)
# print gl_entries
stock_in_hand = webnotes.conn.get_value("Account", {"master_name": "_Test Warehouse - _TC"})
expected_gl_entries = sorted([
[si.doc.debit_to, 630.0, 0.0],
[pos[1]["income_account"], 0.0, 500.0],
[pos[2]["account_head"], 0.0, 80.0],
[pos[3]["account_head"], 0.0, 50.0],
[stock_in_hand, 0.0, 75.0],
[pos[1]["expense_account"], 75.0, 0.0],
[si.doc.debit_to, 0.0, 600.0],
["_Test Account Bank Account - _TC", 600.0, 0.0]
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_gl_entries[i][0], gle.account)
self.assertEquals(expected_gl_entries[i][1], gle.debit)
self.assertEquals(expected_gl_entries[i][2], gle.credit)
si.cancel()
gle = webnotes.conn.sql("""select * from `tabGL Entry`
where voucher_type='Sales Invoice' and voucher_no=%s""", si.doc.name)
self.assertFalse(gle)
self.assertFalse(get_stock_and_account_difference([stock_in_hand]))
set_perpetual_inventory(0)
开发者ID:Jdfkat,项目名称:erpnext,代码行数:59,代码来源:test_sales_invoice.py
示例12: test_delivery_note_gl_entry
def test_delivery_note_gl_entry(self):
self.clear_stock_account_balance()
set_perpetual_inventory()
self.assertEqual(cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")), 1)
webnotes.conn.set_value("Item", "_Test Item", "valuation_method", "FIFO")
_insert_purchase_receipt()
dn = webnotes.bean(copy=test_records[0])
dn.doclist[1].expense_account = "Cost of Goods Sold - _TC"
dn.doclist[1].cost_center = "Main - _TC"
stock_in_hand_account = webnotes.conn.get_value("Account",
{"master_name": dn.doclist[1].warehouse})
from accounts.utils import get_balance_on
prev_bal = get_balance_on(stock_in_hand_account, dn.doc.posting_date)
dn.insert()
dn.submit()
gl_entries = get_gl_entries("Delivery Note", dn.doc.name)
self.assertTrue(gl_entries)
expected_values = {
stock_in_hand_account: [0.0, 375.0],
"Cost of Goods Sold - _TC": [375.0, 0.0]
}
for i, gle in enumerate(gl_entries):
self.assertEquals([gle.debit, gle.credit], expected_values.get(gle.account))
# check stock in hand balance
bal = get_balance_on(stock_in_hand_account, dn.doc.posting_date)
self.assertEquals(bal, prev_bal - 375.0)
# back dated purchase receipt
pr = webnotes.bean(copy=pr_test_records[0])
pr.doc.posting_date = "2013-01-01"
pr.doclist[1].import_rate = 100
pr.doclist[1].amount = 100
pr.insert()
pr.submit()
gl_entries = get_gl_entries("Delivery Note", dn.doc.name)
self.assertTrue(gl_entries)
expected_values = {
stock_in_hand_account: [0.0, 666.65],
"Cost of Goods Sold - _TC": [666.65, 0.0]
}
for i, gle in enumerate(gl_entries):
self.assertEquals([gle.debit, gle.credit], expected_values.get(gle.account))
dn.cancel()
self.assertFalse(get_gl_entries("Delivery Note", dn.doc.name))
set_perpetual_inventory(0)
开发者ID:SoniaBrogi,项目名称:erpnext,代码行数:55,代码来源:test_delivery_note.py
示例13: test_si_gl_entry_with_aii_and_update_stock_with_warehouse_but_no_account
def test_si_gl_entry_with_aii_and_update_stock_with_warehouse_but_no_account(self):
self.clear_stock_account_balance()
set_perpetual_inventory()
webnotes.delete_doc("Account", "_Test Warehouse No Account - _TC")
# insert purchase receipt
from stock.doctype.purchase_receipt.test_purchase_receipt import test_records \
as pr_test_records
pr = webnotes.bean(copy=pr_test_records[0])
pr.doc.naming_series = "_T-Purchase Receipt-"
pr.doclist[1].warehouse = "_Test Warehouse No Account - _TC"
pr.run_method("calculate_taxes_and_totals")
pr.insert()
pr.submit()
si_doclist = webnotes.copy_doclist(test_records[1])
si_doclist[0]["update_stock"] = 1
si_doclist[0]["posting_time"] = "12:05"
si_doclist[1]["warehouse"] = "_Test Warehouse No Account - _TC"
si = webnotes.bean(copy=si_doclist)
si.insert()
si.submit()
# check stock ledger entries
sle = webnotes.conn.sql("""select * from `tabStock Ledger Entry`
where voucher_type = 'Sales Invoice' and voucher_no = %s""",
si.doc.name, as_dict=1)[0]
self.assertTrue(sle)
self.assertEquals([sle.item_code, sle.warehouse, sle.actual_qty],
["_Test Item", "_Test Warehouse No Account - _TC", -1.0])
# check gl entries
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
order by account asc, debit asc""", si.doc.name, as_dict=1)
self.assertTrue(gl_entries)
expected_gl_entries = sorted([
[si.doc.debit_to, 630.0, 0.0],
[si_doclist[1]["income_account"], 0.0, 500.0],
[si_doclist[2]["account_head"], 0.0, 80.0],
[si_doclist[3]["account_head"], 0.0, 50.0],
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_gl_entries[i][0], gle.account)
self.assertEquals(expected_gl_entries[i][1], gle.debit)
self.assertEquals(expected_gl_entries[i][2], gle.credit)
si.cancel()
gle = webnotes.conn.sql("""select * from `tabGL Entry`
where voucher_type='Sales Invoice' and voucher_no=%s""", si.doc.name)
self.assertFalse(gle)
set_perpetual_inventory(0)
开发者ID:Jdfkat,项目名称:erpnext,代码行数:55,代码来源:test_sales_invoice.py
示例14: test_jv_against_stock_account
def test_jv_against_stock_account(self):
from stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
set_perpetual_inventory()
jv = webnotes.bean(copy=test_records[0])
jv.doclist[1].account = "_Test Warehouse - _TC"
jv.insert()
from accounts.general_ledger import StockAccountInvalidTransaction
self.assertRaises(StockAccountInvalidTransaction, jv.submit)
set_perpetual_inventory(0)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:12,代码来源:test_journal_voucher.py
示例15: test_warehouse_company_validation
def test_warehouse_company_validation(self):
set_perpetual_inventory(0)
self._clear_stock_account_balance()
webnotes.bean("Profile", "[email protected]").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
webnotes.session.user = "[email protected]"
from stock.utils import InvalidWarehouseCompany
st1 = webnotes.bean(copy=test_records[0])
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
self.assertRaises(InvalidWarehouseCompany, st1.submit)
webnotes.session.user = "Administrator"
开发者ID:Jdfkat,项目名称:erpnext,代码行数:14,代码来源:test_stock_entry.py
示例16: test_material_transfer_gl_entry
def test_material_transfer_gl_entry(self):
self._clear_stock_account_balance()
set_perpetual_inventory()
self._insert_material_receipt()
mtn = webnotes.bean(copy=test_records[2])
mtn.insert()
mtn.submit()
self.check_stock_ledger_entries(
"Stock Entry",
mtn.doc.name,
[["_Test Item", "_Test Warehouse - _TC", -45.0], ["_Test Item", "_Test Warehouse 1 - _TC", 45.0]],
)
stock_in_hand_account = webnotes.conn.get_value(
"Account", {"account_type": "Warehouse", "master_name": mtn.doclist[1].s_warehouse}
)
fixed_asset_account = webnotes.conn.get_value(
"Account", {"account_type": "Warehouse", "master_name": mtn.doclist[1].t_warehouse}
)
self.check_gl_entries(
"Stock Entry",
mtn.doc.name,
sorted([[stock_in_hand_account, 0.0, 4500.0], [fixed_asset_account, 4500.0, 0.0]]),
)
mtn.cancel()
self.assertFalse(
webnotes.conn.sql(
"""select * from `tabStock Ledger Entry`
where voucher_type='Stock Entry' and voucher_no=%s""",
mtn.doc.name,
)
)
self.assertFalse(
webnotes.conn.sql(
"""select * from `tabGL Entry`
where voucher_type='Stock Entry' and voucher_no=%s""",
mtn.doc.name,
)
)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:46,代码来源:test_stock_entry.py
示例17: test_delivery_note_no_gl_entry
def test_delivery_note_no_gl_entry(self):
self.clear_stock_account_balance()
set_perpetual_inventory(0)
self.assertEqual(cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")), 0)
_insert_purchase_receipt()
dn = webnotes.bean(copy=test_records[0])
dn.insert()
dn.submit()
stock_value, stock_value_difference = webnotes.conn.get_value("Stock Ledger Entry",
{"voucher_type": "Delivery Note", "voucher_no": dn.doc.name,
"item_code": "_Test Item"}, ["stock_value", "stock_value_difference"])
self.assertEqual(stock_value, 0)
self.assertEqual(stock_value_difference, -375)
self.assertFalse(get_gl_entries("Delivery Note", dn.doc.name))
开发者ID:Anirudh887,项目名称:erpnext,代码行数:18,代码来源:test_delivery_note.py
示例18: test_repack_with_change_in_valuation
def test_repack_with_change_in_valuation(self):
self._clear_stock_account_balance()
set_perpetual_inventory()
self._insert_material_receipt()
repack = webnotes.bean(copy=test_records[3])
repack.doclist[2].incoming_rate = 6000
repack.insert()
repack.submit()
stock_in_hand_account = webnotes.conn.get_value(
"Account", {"account_type": "Warehouse", "master_name": repack.doclist[2].t_warehouse}
)
self.check_gl_entries(
"Stock Entry",
repack.doc.name,
sorted([[stock_in_hand_account, 1000.0, 0.0], ["Stock Adjustment - _TC", 0.0, 1000.0]]),
)
set_perpetual_inventory(0)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:21,代码来源:test_stock_entry.py
示例19: tearDown
def tearDown(self):
set_perpetual_inventory(0)
if hasattr(self, "old_default_company"):
webnotes.conn.set_default("company", self.old_default_company)
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:4,代码来源:test_stock_entry.py
注:本文中的stock.doctype.purchase_receipt.test_purchase_receipt.set_perpetual_inventory函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论