bug fix in clear unallocated advances
This commit is contained in:
parent
6270869374
commit
613cb6a9f9
@ -18,8 +18,6 @@ from __future__ import unicode_literals
|
|||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
from webnotes.utils import flt, fmt_money
|
from webnotes.utils import flt, fmt_money
|
||||||
from webnotes.model import db_exists
|
|
||||||
from webnotes.model.wrapper import copy_doclist
|
|
||||||
from webnotes import msgprint
|
from webnotes import msgprint
|
||||||
|
|
||||||
sql = webnotes.conn.sql
|
sql = webnotes.conn.sql
|
||||||
|
@ -20,6 +20,7 @@ import unittest
|
|||||||
import webnotes
|
import webnotes
|
||||||
import webnotes.model
|
import webnotes.model
|
||||||
from webnotes.utils import nowdate
|
from webnotes.utils import nowdate
|
||||||
|
from webnotes.test_runner import make_test_records
|
||||||
|
|
||||||
from stock.doctype.purchase_receipt import test_purchase_receipt
|
from stock.doctype.purchase_receipt import test_purchase_receipt
|
||||||
|
|
||||||
@ -34,15 +35,15 @@ def load_data():
|
|||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
|
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "Excise Duty",
|
webnotes.insert({"doctype": "Account", "account_name": "Excise Duty",
|
||||||
"parent_account": "Tax Assets - %s" % abbr, "company": company,
|
"parent_account": "_Test Tax Assets - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
|
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "Education Cess",
|
webnotes.insert({"doctype": "Account", "account_name": "Education Cess",
|
||||||
"parent_account": "Tax Assets - %s" % abbr, "company": company,
|
"parent_account": "_Test Tax Assets - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
|
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "S&H Education Cess",
|
webnotes.insert({"doctype": "Account", "account_name": "S&H Education Cess",
|
||||||
"parent_account": "Tax Assets - %s" % abbr, "company": company,
|
"parent_account": "_Test Tax Assets - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
|
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "CST",
|
webnotes.insert({"doctype": "Account", "account_name": "CST",
|
||||||
@ -94,61 +95,66 @@ purchase_invoice_doclist = [
|
|||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "Actual",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "Actual",
|
||||||
"account_head": "Shipping Charges - %s" % abbr, "rate": 100, "tax_amount": 100,
|
"account_head": "Shipping Charges - %s" % abbr, "rate": 100, "tax_amount": 100,
|
||||||
"category": "Valuation and Total", "parentfield": "other_charges",
|
"category": "Valuation and Total", "parentfield": "purchase_tax_details",
|
||||||
"cost_center": "Default Cost Center - %s" % abbr
|
"cost_center": "Default Cost Center - %s" % abbr, "add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Net Total",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Net Total",
|
||||||
"account_head": "Customs Duty - %s" % abbr, "rate": 10, "tax_amount": 125.00,
|
"account_head": "Customs Duty - %s" % abbr, "rate": 10, "tax_amount": 125.00,
|
||||||
"category": "Valuation", "parentfield": "other_charges",
|
"category": "Valuation", "parentfield": "purchase_tax_details",
|
||||||
"cost_center": "Default Cost Center - %s" % abbr
|
"cost_center": "Default Cost Center - %s" % abbr, "add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Net Total",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Net Total",
|
||||||
"account_head": "Excise Duty - %s" % abbr, "rate": 12, "tax_amount": 140.00,
|
"account_head": "Excise Duty - %s" % abbr, "rate": 12, "tax_amount": 140.00,
|
||||||
"category": "Total", "parentfield": "other_charges"
|
"category": "Total", "parentfield": "purchase_tax_details", "add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Amount",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Amount",
|
||||||
"account_head": "Education Cess - %s" % abbr, "rate": 2, "row_id": 3, "tax_amount": 2.80,
|
"account_head": "Education Cess - %s" % abbr, "rate": 2, "row_id": 3, "tax_amount": 2.80,
|
||||||
"category": "Total", "parentfield": "other_charges"
|
"category": "Total", "parentfield": "purchase_tax_details", "add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Amount",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Amount",
|
||||||
"account_head": "S&H Education Cess - %s" % abbr, "rate": 1, "row_id": 3,
|
"account_head": "S&H Education Cess - %s" % abbr, "rate": 1, "row_id": 3,
|
||||||
"tax_amount": 1.4, "category": "Total", "parentfield": "other_charges"
|
"tax_amount": 1.4, "category": "Total", "parentfield": "purchase_tax_details",
|
||||||
|
"add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Total",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Total",
|
||||||
"account_head": "CST - %s" % abbr, "rate": 2, "row_id": 5, "tax_amount": 29.88,
|
"account_head": "CST - %s" % abbr, "rate": 2, "row_id": 5, "tax_amount": 29.88,
|
||||||
"category": "Total", "parentfield": "other_charges",
|
"category": "Total", "parentfield": "purchase_tax_details",
|
||||||
"cost_center": "Default Cost Center - %s" % abbr
|
"cost_center": "Default Cost Center - %s" % abbr, "add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Net Total",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Net Total",
|
||||||
"account_head": "VAT - Test - %s" % abbr, "rate": 12.5, "tax_amount": 156.25,
|
"account_head": "VAT - Test - %s" % abbr, "rate": 12.5, "tax_amount": 156.25,
|
||||||
"category": "Total", "parentfield": "other_charges"
|
"category": "Total", "parentfield": "purchase_tax_details", "add_deduct_tax": "Add"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Total",
|
"doctype": "Purchase Taxes and Charges", "charge_type": "On Previous Row Total",
|
||||||
"account_head": "Discount - %s" % abbr, "rate": -10, "row_id": 7, "tax_amount": -168.03,
|
"account_head": "Discount - %s" % abbr, "rate": 10, "row_id": 7, "tax_amount": 168.03,
|
||||||
"category": "Total", "parentfield": "other_charges",
|
"category": "Total", "parentfield": "purchase_tax_details",
|
||||||
"cost_center": "Default Cost Center - %s" % abbr
|
"cost_center": "Default Cost Center - %s" % abbr, "add_deduct_tax": "Deduct"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
class TestPurchaseReceipt(unittest.TestCase):
|
class TestPurchaseInvoice(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
webnotes.conn.begin()
|
webnotes.conn.begin()
|
||||||
load_data()
|
load_data()
|
||||||
# webnotes.conn.set_value("Global Defaults", None, "automatic_inventory_accounting", 1)
|
# webnotes.conn.set_value("Global Defaults", None, "automatic_inventory_accounting", 1)
|
||||||
|
self.load_test_data()
|
||||||
|
|
||||||
|
def load_test_data(self):
|
||||||
|
make_test_records("Company")
|
||||||
|
|
||||||
|
|
||||||
def test_gl_entries(self):
|
def test_gl_entries(self):
|
||||||
from webnotes.model.doclist import DocList
|
wrapper = webnotes.model_wrapper(purchase_invoice_doclist).insert()
|
||||||
controller = webnotes.insert(DocList(purchase_invoice_doclist))
|
wrapper.submit()
|
||||||
controller.submit()
|
wrapper.load_from_db()
|
||||||
controller.load_from_db()
|
dl = wrapper.doclist
|
||||||
dl = controller.doclist
|
|
||||||
|
|
||||||
expected_gl_entries = {
|
expected_gl_entries = {
|
||||||
"East Wind Inc. - %s" % abbr : [0, 1512.30],
|
"East Wind Inc. - %s" % abbr : [0, 1512.30],
|
||||||
@ -165,6 +171,76 @@ class TestPurchaseReceipt(unittest.TestCase):
|
|||||||
where voucher_type = 'Purchase Invoice' and voucher_no = %s""", dl[0].name, as_dict=1)
|
where voucher_type = 'Purchase Invoice' and voucher_no = %s""", dl[0].name, as_dict=1)
|
||||||
for d in gl_entries:
|
for d in gl_entries:
|
||||||
self.assertEqual([d.debit, d.credit], expected_gl_entries.get(d.account))
|
self.assertEqual([d.debit, d.credit], expected_gl_entries.get(d.account))
|
||||||
|
|
||||||
|
def test_purchase_invoice_calculation(self):
|
||||||
|
test_doclist = [] + purchase_invoice_doclist
|
||||||
|
for doc in test_doclist:
|
||||||
|
if doc["doctype"] == "Purchase Taxes and Charges":
|
||||||
|
del doc["tax_amount"]
|
||||||
|
|
||||||
|
wrapper = webnotes.model_wrapper(test_doclist).insert()
|
||||||
|
wrapper.load_from_db()
|
||||||
|
|
||||||
|
# tax amounts
|
||||||
|
expected_values = [
|
||||||
|
["Shipping Charges - %s" % abbr, 100, 1350],
|
||||||
|
["Customs Duty - %s" % abbr, 125, 1350],
|
||||||
|
["Excise Duty - %s" % abbr, 140, 1490],
|
||||||
|
["Education Cess - %s" % abbr, 2.8, 1492.8],
|
||||||
|
["S&H Education Cess - %s" % abbr, 1.4, 1494.2],
|
||||||
|
["CST - %s" % abbr, 29.88, 1524.08],
|
||||||
|
["VAT - Test - %s" % abbr, 156.25, 1680.33],
|
||||||
|
["Discount - %s" % abbr, 168.03, 1512.30],
|
||||||
|
]
|
||||||
|
|
||||||
|
for i, tax in enumerate(wrapper.doclist.get({"parentfield": "purchase_tax_details"})):
|
||||||
|
self.assertEqual(tax.account_head, expected_values[i][0])
|
||||||
|
self.assertEqual(tax.tax_amount, expected_values[i][1])
|
||||||
|
self.assertEqual(tax.total, expected_values[i][2])
|
||||||
|
|
||||||
|
expected_values = [
|
||||||
|
["Home Desktop 100", 90],
|
||||||
|
["Home Desktop 200", 135]
|
||||||
|
]
|
||||||
|
for i, item in enumerate(wrapper.doclist.get({"parentfield": "entries"})):
|
||||||
|
self.assertEqual(item.item_code, expected_values[i][0])
|
||||||
|
self.assertEqual(item.item_tax_amount, expected_values[i][1])
|
||||||
|
|
||||||
|
|
||||||
|
# def test_purchase_invoice_calculation(self):
|
||||||
|
# from webnotes.model.doclist import DocList
|
||||||
|
# wrapper = webnotes.insert(DocList(purchase_invoice_doclist))
|
||||||
|
# wrapper.load_from_db()
|
||||||
|
# dl = wrapper.doclist
|
||||||
|
#
|
||||||
|
# # test net total
|
||||||
|
# self.assertEqual(dl[0].net_total, 1250)
|
||||||
|
#
|
||||||
|
# # test tax amounts and totals
|
||||||
|
# expected_values = [
|
||||||
|
# ["Shipping Charges - %s" % abbr, 100, 1350],
|
||||||
|
# ["Customs Duty - %s" % abbr, 125, 1350],
|
||||||
|
# ["Excise Duty - %s" % abbr, 140, 1490],
|
||||||
|
# ["Education Cess - %s" % abbr, 2.8, 1492.8],
|
||||||
|
# ["S&H Education Cess - %s" % abbr, 1.4, 1494.2],
|
||||||
|
# ["CST - %s" % abbr, 29.88, 1524.08],
|
||||||
|
# ["VAT - Test - %s" % abbr, 156.25, 1680.33],
|
||||||
|
# ["Discount - %s" % abbr, -168.03, 1512.30],
|
||||||
|
# ]
|
||||||
|
# for i, tax in enumerate(dl.get({"parentfield": "taxes_and_charges"})):
|
||||||
|
# # print tax.account_head, tax.tax_amount, tax.total
|
||||||
|
# self.assertEqual(tax.account_head, expected_values[i][0])
|
||||||
|
# self.assertEqual(tax.tax_amount, expected_values[i][1])
|
||||||
|
# self.assertEqual(tax.total, expected_values[i][2])
|
||||||
|
#
|
||||||
|
# # test item tax amount
|
||||||
|
# expected_values = [
|
||||||
|
# ["Home Desktop 100", 90],
|
||||||
|
# ["Home Desktop 200", 135]
|
||||||
|
# ]
|
||||||
|
# for i, item in enumerate(dl.get({"parentfield": "purchase_invoice_items"})):
|
||||||
|
# self.assertEqual(item.item_code, expected_values[i][0])
|
||||||
|
# self.assertEqual(item.valuation_tax_amount, expected_values[i][1])
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
webnotes.conn.rollback()
|
webnotes.conn.rollback()
|
@ -32,16 +32,16 @@ def load_data():
|
|||||||
|
|
||||||
# create customer group
|
# create customer group
|
||||||
webnotes.insert({"doctype": "Customer Group",
|
webnotes.insert({"doctype": "Customer Group",
|
||||||
"customer_group_name": "Default Customer Group",
|
"customer_group_name": "_Test Customer Group",
|
||||||
"parent_customer_group": "All Customer Groups", "is_group": "No"})
|
"parent_customer_group": "All Customer Groups", "is_group": "No"})
|
||||||
|
|
||||||
# create customer
|
# create customer
|
||||||
webnotes.insert({"doctype": "Customer", "customer_name": "West Wind Inc.",
|
webnotes.insert({"doctype": "Customer", "customer_name": "West Wind Inc.",
|
||||||
"customer_type": "Company", "territory": "Default",
|
"customer_type": "Company", "territory": "Default",
|
||||||
"customer_group": "Default Customer Group", "company": company,
|
"customer_group": "_Test Customer Group", "company": company,
|
||||||
"credit_days": 50, "credit_limit": 0})
|
"credit_days": 50, "credit_limit": 0})
|
||||||
|
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "Sales",
|
webnotes.insert({"doctype": "Account", "account_name": "_Test Account Sales",
|
||||||
"parent_account": "Income - %s" % abbr, "company": company,
|
"parent_account": "Income - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
|
|
||||||
@ -93,15 +93,15 @@ sales_invoice_doclist = [
|
|||||||
"doctype": "Sales Invoice Item", "warehouse": "Default Warehouse",
|
"doctype": "Sales Invoice Item", "warehouse": "Default Warehouse",
|
||||||
"item_code": "Home Desktop 100", "qty": 10, "basic_rate": 50, "amount": 500,
|
"item_code": "Home Desktop 100", "qty": 10, "basic_rate": 50, "amount": 500,
|
||||||
"parentfield": "entries", "so_detail": None, "dn_detail": None,
|
"parentfield": "entries", "so_detail": None, "dn_detail": None,
|
||||||
"uom": "Nos", "item_tax_rate": json.dumps({"Excise Duty - %s" % abbr: 10}),
|
"stock_uom": "Nos", "item_tax_rate": json.dumps({"Excise Duty - %s" % abbr: 10}),
|
||||||
"income_account": "Sales - %s" % abbr,
|
"income_account": "_Test Account Sales - %s" % abbr,
|
||||||
"cost_center": "Default Cost Center - %s" % abbr
|
"cost_center": "Default Cost Center - %s" % abbr
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Sales Invoice Item", "warehouse": "Default Warehouse",
|
"doctype": "Sales Invoice Item", "warehouse": "Default Warehouse",
|
||||||
"item_code": "Home Desktop 200", "qty": 5, "basic_rate": 150, "amount": 750,
|
"item_code": "Home Desktop 200", "qty": 5, "basic_rate": 150, "amount": 750,
|
||||||
"so_detail": None, "dn_detail": None,
|
"so_detail": None, "dn_detail": None,
|
||||||
"parentfield": "entries", "uom": "Nos", "income_account": "Sales - %s" % abbr,
|
"parentfield": "entries", "stock_uom": "Nos", "income_account": "_Test Account Sales - %s" % abbr,
|
||||||
"cost_center": "Default Cost Center - %s" % abbr
|
"cost_center": "Default Cost Center - %s" % abbr
|
||||||
},
|
},
|
||||||
# taxes
|
# taxes
|
||||||
@ -211,7 +211,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
expected_gl_entries = {
|
expected_gl_entries = {
|
||||||
"West Wind Inc. - %s" % abbr : [1627.05, 0.0],
|
"West Wind Inc. - %s" % abbr : [1627.05, 0.0],
|
||||||
"Sales - %s" % abbr: [0.0, 1250.00],
|
"_Test Account Sales - %s" % abbr: [0.0, 1250.00],
|
||||||
"Shipping Charges - %s" % abbr: [0.0, 100],
|
"Shipping Charges - %s" % abbr: [0.0, 100],
|
||||||
"Customs Duty - %s" % abbr: [0, 125.0],
|
"Customs Duty - %s" % abbr: [0, 125.0],
|
||||||
"Excise Duty - %s" % abbr: [0, 140],
|
"Excise Duty - %s" % abbr: [0, 140],
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.utils import flt
|
from webnotes.utils import flt
|
||||||
from webnotes.model.doc import addchild
|
|
||||||
from utilities.transaction_base import TransactionBase
|
from utilities.transaction_base import TransactionBase
|
||||||
|
|
||||||
class AccountsController(TransactionBase):
|
class AccountsController(TransactionBase):
|
||||||
@ -47,15 +46,13 @@ class AccountsController(TransactionBase):
|
|||||||
|
|
||||||
return stock_in_hand
|
return stock_in_hand
|
||||||
|
|
||||||
def clear_unallocated_advances(self, parenttype, parentfield):
|
def clear_unallocated_advances(self, childtype, parentfield):
|
||||||
for d in self.doclist:
|
self.doclist.remove_items({"parentfield": parentfield, "allocated_amount": ["in", [0, None, ""]]})
|
||||||
if d.parentfield == parentfield and flt(d.allocated_amount) == 0:
|
|
||||||
self.doclist.remove(d)
|
|
||||||
|
|
||||||
webnotes.conn.sql("""delete from `tab%s` where parent = %s
|
webnotes.conn.sql("""delete from `tab%s` where parentfield=%s and parent = %s
|
||||||
and ifnull(allocated_amount, 0) = 0""" % (parenttype, '%s'), self.doc.name)
|
and ifnull(allocated_amount, 0) = 0""" % (childtype, '%s', '%s'), (parentfield, self.doc.name))
|
||||||
|
|
||||||
def get_advances(self, account_head, parenttype, parentfield, dr_or_cr):
|
def get_advances(self, account_head, child_doctype, parentfield, dr_or_cr):
|
||||||
res = webnotes.conn.sql("""select t1.name as jv_no, t1.remark,
|
res = webnotes.conn.sql("""select t1.name as jv_no, t1.remark,
|
||||||
t2.%s as amount, t2.name as jv_detail_no
|
t2.%s as amount, t2.name as jv_detail_no
|
||||||
from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
|
from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
|
||||||
@ -68,9 +65,12 @@ class AccountsController(TransactionBase):
|
|||||||
|
|
||||||
self.doclist = self.doc.clear_table(self.doclist, parentfield)
|
self.doclist = self.doc.clear_table(self.doclist, parentfield)
|
||||||
for d in res:
|
for d in res:
|
||||||
add = addchild(self.doc, parentfield, parenttype, self.doclist)
|
self.doclist.append({
|
||||||
add.journal_voucher = d.jv_no
|
"doctype": child_doctype,
|
||||||
add.jv_detail_no = d.jv_detail_no
|
"parentfield": parentfield,
|
||||||
add.remarks = d.remark
|
"journal_voucher": d.jv_no,
|
||||||
add.advance_amount = flt(d.amount)
|
"jv_detail_no": d.jv_detail_no,
|
||||||
add.allocate_amount = 0
|
"remarks": d.remark,
|
||||||
|
"advance_amount": flt(d.amount),
|
||||||
|
"allocate_amount": 0
|
||||||
|
})
|
@ -83,4 +83,7 @@ class BuyingController(AccountsController):
|
|||||||
self.doc.in_words = money_in_words(self.doc.grand_total, company_currency)
|
self.doc.in_words = money_in_words(self.doc.grand_total, company_currency)
|
||||||
if self.meta.get_field("in_words_import"):
|
if self.meta.get_field("in_words_import"):
|
||||||
self.doc.in_words_import = money_in_words(self.doc.grand_total_import,
|
self.doc.in_words_import = money_in_words(self.doc.grand_total_import,
|
||||||
self.doc.currency)
|
self.doc.currency)
|
||||||
|
|
||||||
|
def calculate_taxes_and_totals(self):
|
||||||
|
pass
|
@ -19,4 +19,12 @@ import webnotes
|
|||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, d, dl):
|
def __init__(self, d, dl):
|
||||||
self.doc, self.doclist = d, dl
|
self.doc, self.doclist = d, dl
|
||||||
|
|
||||||
|
|
||||||
|
test_records = [
|
||||||
|
[{
|
||||||
|
"doctype": "Supplier Type",
|
||||||
|
"supplier_type": "_Test Supplier Type",
|
||||||
|
}]
|
||||||
|
]
|
@ -56,7 +56,7 @@ def load_data():
|
|||||||
webnotes.insert({"doctype": "Cost Center", "group_or_ledger": "Ledger",
|
webnotes.insert({"doctype": "Cost Center", "group_or_ledger": "Ledger",
|
||||||
"cost_center_name": "Default Cost Center",
|
"cost_center_name": "Default Cost Center",
|
||||||
"parent_cost_center": "Root - %s" % abbr,
|
"parent_cost_center": "Root - %s" % abbr,
|
||||||
"company_name": company, "company_abbr": abbr})
|
"company_name": company})
|
||||||
|
|
||||||
# create account heads for taxes
|
# create account heads for taxes
|
||||||
|
|
||||||
@ -67,11 +67,11 @@ def load_data():
|
|||||||
webnotes.insert({"doctype": "Account", "account_name": "Customs Duty",
|
webnotes.insert({"doctype": "Account", "account_name": "Customs Duty",
|
||||||
"parent_account": "Stock Expenses - %s" % abbr, "company": company,
|
"parent_account": "Stock Expenses - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "Tax Assets",
|
webnotes.insert({"doctype": "Account", "account_name": "_Test Tax Assets",
|
||||||
"parent_account": "Current Assets - %s" % abbr, "company": company,
|
"parent_account": "Current Assets - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Group"})
|
"group_or_ledger": "Group"})
|
||||||
webnotes.insert({"doctype": "Account", "account_name": "VAT - Test",
|
webnotes.insert({"doctype": "Account", "account_name": "VAT - Test",
|
||||||
"parent_account": "Tax Assets - %s" % abbr, "company": company,
|
"parent_account": "_Test Tax Assets - %s" % abbr, "company": company,
|
||||||
"group_or_ledger": "Ledger"})
|
"group_or_ledger": "Ledger"})
|
||||||
|
|
||||||
# create BOM
|
# create BOM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user