mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 18:45:20 +00:00
This commit is contained in:
@@ -121,17 +121,11 @@ class AccountsController(TransactionBase):
|
||||
from frappe.model import default_fields
|
||||
tax_master = frappe.bean(tax_master_doctype, self.doc.fields.get(tax_master_field))
|
||||
|
||||
for i, tax in enumerate(tax_master.doclist.get({"parentfield": tax_parentfield})):
|
||||
for i, tax in enumerate(tax_master.get(tax_parentfield)):
|
||||
for fieldname in default_fields:
|
||||
tax.fields[fieldname] = None
|
||||
|
||||
tax.fields.update({
|
||||
"doctype": tax_doctype,
|
||||
"parentfield": tax_parentfield,
|
||||
"idx": i+1
|
||||
})
|
||||
|
||||
self.doclist.append(tax)
|
||||
tax.set(fieldname, None)
|
||||
|
||||
self.append(tax_parentfield, tax)
|
||||
|
||||
def get_other_charges(self):
|
||||
self.set("other_charges", [])
|
||||
@@ -410,9 +404,8 @@ class AccountsController(TransactionBase):
|
||||
|
||||
self.set(parentfield, [])
|
||||
for d in res:
|
||||
self.doclist.append({
|
||||
self.append(parentfield, {
|
||||
"doctype": child_doctype,
|
||||
"parentfield": parentfield,
|
||||
"journal_voucher": d.jv_no,
|
||||
"jv_detail_no": d.jv_detail_no,
|
||||
"remarks": d.remark,
|
||||
|
||||
@@ -230,7 +230,6 @@ class BuyingController(StockController):
|
||||
for item in bom_items:
|
||||
required_qty = flt(item.qty_consumed_per_unit) * flt(d.qty) * flt(d.conversion_factor)
|
||||
rm_doclist = {
|
||||
"parentfield": raw_material_table,
|
||||
"doctype": self.doc.doctype + " Item Supplied",
|
||||
"reference_name": d.name,
|
||||
"bom_detail_no": item.name,
|
||||
@@ -248,7 +247,7 @@ class BuyingController(StockController):
|
||||
"description": item.description,
|
||||
})
|
||||
|
||||
self.doclist.append(rm_doclist)
|
||||
self.append(raw_material_table, rm_doclist)
|
||||
|
||||
raw_materials_cost += required_qty * flt(item.rate)
|
||||
|
||||
|
||||
@@ -59,9 +59,8 @@ class SellingController(StockController):
|
||||
shipping_amount = condition.shipping_amount
|
||||
break
|
||||
|
||||
self.doclist.append({
|
||||
self.append("other_charges", {
|
||||
"doctype": "Sales Taxes and Charges",
|
||||
"parentfield": "other_charges",
|
||||
"charge_type": "Actual",
|
||||
"account_head": shipping_rule.doc.account,
|
||||
"cost_center": shipping_rule.doc.cost_center,
|
||||
|
||||
Reference in New Issue
Block a user