mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-16 18:24:10 +00:00
This commit is contained in:
@@ -342,20 +342,14 @@ class AccountsController(TransactionBase):
|
||||
|
||||
def _cleanup(self):
|
||||
for tax in self.tax_doclist:
|
||||
for fieldname in ("grand_total_for_current_item",
|
||||
"tax_amount_for_current_item",
|
||||
"tax_fraction_for_current_item",
|
||||
"grand_total_fraction_for_current_item"):
|
||||
if fieldname in tax.fields:
|
||||
del tax.get(fieldname)
|
||||
|
||||
tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail)
|
||||
|
||||
def _set_in_company_currency(self, item, print_field, base_field):
|
||||
"""set values in base currency"""
|
||||
item.set(base_field, flt((flt(item.get(print_field),)
|
||||
self.precision(print_field, item)) * self.conversion_rate),
|
||||
value_in_company_currency = flt(self.conversion_rate *
|
||||
flt(item.get(print_field), self.precision(print_field, item)),
|
||||
self.precision(base_field, item))
|
||||
item.set(base_field, value_in_company_currency)
|
||||
|
||||
def calculate_total_advance(self, parenttype, advance_parentfield):
|
||||
if self.doctype == parenttype and self.docstatus < 2:
|
||||
|
||||
@@ -147,18 +147,6 @@ class BuyingController(StockController):
|
||||
self.outstanding_amount = flt(self.total_amount_to_pay - self.total_advance,
|
||||
self.precision("outstanding_amount"))
|
||||
|
||||
def _cleanup(self):
|
||||
super(BuyingController, self)._cleanup()
|
||||
|
||||
if not self.meta.get_field("item_tax_amount", parentfield=self.fname):
|
||||
for item in self.item_doclist:
|
||||
del item.get("item_tax_amount")
|
||||
|
||||
if not self.meta.get_field("tax_amount_after_discount_amount",
|
||||
parentfield=self.other_fname):
|
||||
for tax in self.tax_doclist:
|
||||
del tax.get("tax_amount_after_discount_amount")
|
||||
|
||||
# update valuation rate
|
||||
def update_valuation_rate(self, parentfield):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user