Merge pull request #4146 from nabinhait/fix10
[fix] Multiple minor fixes
This commit is contained in:
commit
bc5ecfff06
@ -38,7 +38,7 @@ class ReceivablePayableReport(object):
|
|||||||
"width": 120
|
"width": 120
|
||||||
})
|
})
|
||||||
|
|
||||||
columns += [_("Age (Days)") + "::80"]
|
columns += [_("Age (Days)") + ":Int:80"]
|
||||||
|
|
||||||
if not "range1" in self.filters:
|
if not "range1" in self.filters:
|
||||||
self.filters["range1"] = "30"
|
self.filters["range1"] = "30"
|
||||||
|
@ -355,7 +355,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
item.net_amount = flt(item.net_amount + discount_amount_loss,
|
item.net_amount = flt(item.net_amount + discount_amount_loss,
|
||||||
item.precision("net_amount"))
|
item.precision("net_amount"))
|
||||||
|
|
||||||
item.net_rate = flt(item.net_amount / item.qty, item.precision("net_rate"))
|
item.net_rate = flt(item.net_amount / item.qty, item.precision("net_rate")) if item.qty else 0
|
||||||
|
|
||||||
self._set_in_company_currency(item, ["net_rate", "net_amount"])
|
self._set_in_company_currency(item, ["net_rate", "net_amount"])
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ def make_sales_invoice(source_name, target_doc=None):
|
|||||||
"parent": "sales_order",
|
"parent": "sales_order",
|
||||||
},
|
},
|
||||||
"postprocess": update_item,
|
"postprocess": update_item,
|
||||||
"condition": lambda doc: doc.base_amount==0 or doc.billed_amt < doc.amount
|
"condition": lambda doc: doc.qty and (doc.base_amount==0 or doc.billed_amt < doc.amount)
|
||||||
},
|
},
|
||||||
"Sales Taxes and Charges": {
|
"Sales Taxes and Charges": {
|
||||||
"doctype": "Sales Taxes and Charges",
|
"doctype": "Sales Taxes and Charges",
|
||||||
|
@ -200,8 +200,8 @@ class Item(WebsiteGenerator):
|
|||||||
self.set("reorder_levels", [])
|
self.set("reorder_levels", [])
|
||||||
|
|
||||||
if self.re_order_level or len(self.get("reorder_levels", {"material_request_type": "Purchase"})):
|
if self.re_order_level or len(self.get("reorder_levels", {"material_request_type": "Purchase"})):
|
||||||
if not self.is_purchase_item:
|
if not (self.is_purchase_item or self.is_pro_applicable):
|
||||||
frappe.throw(_("""To set reorder level, item must be a Purchase Item"""))
|
frappe.throw(_("""To set reorder level, item must be a Purchase Item or Prodcution Item"""))
|
||||||
|
|
||||||
def validate_warehouse_for_reorder(self):
|
def validate_warehouse_for_reorder(self):
|
||||||
warehouse = []
|
warehouse = []
|
||||||
|
Loading…
Reference in New Issue
Block a user