mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge branch develop into dimensions
This commit is contained in:
@@ -321,7 +321,7 @@ def set_discount_amount(rate, item_details):
|
|||||||
def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None):
|
def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None):
|
||||||
from erpnext.accounts.doctype.pricing_rule.utils import get_apply_on_and_items
|
from erpnext.accounts.doctype.pricing_rule.utils import get_apply_on_and_items
|
||||||
for d in pricing_rules.split(','):
|
for d in pricing_rules.split(','):
|
||||||
if not d: continue
|
if not d or not frappe.db.exists("Pricing Rule", d): continue
|
||||||
pricing_rule = frappe.get_doc('Pricing Rule', d)
|
pricing_rule = frappe.get_doc('Pricing Rule', d)
|
||||||
|
|
||||||
if pricing_rule.price_or_product_discount == 'Price':
|
if pricing_rule.price_or_product_discount == 'Price':
|
||||||
|
|||||||
@@ -480,10 +480,10 @@ def apply_pricing_rule(doc, pr_doc, item_row, value, do_not_validate=False):
|
|||||||
rule_applied = {}
|
rule_applied = {}
|
||||||
|
|
||||||
for item in doc.get("items"):
|
for item in doc.get("items"):
|
||||||
if not item.pricing_rules:
|
|
||||||
item.pricing_rules = item_row.pricing_rules
|
|
||||||
|
|
||||||
if item.get(apply_on) in items:
|
if item.get(apply_on) in items:
|
||||||
|
if not item.pricing_rules:
|
||||||
|
item.pricing_rules = item_row.pricing_rules
|
||||||
|
|
||||||
for field in ['discount_percentage', 'discount_amount', 'rate']:
|
for field in ['discount_percentage', 'discount_amount', 'rate']:
|
||||||
if not pr_doc.get(field): continue
|
if not pr_doc.get(field): continue
|
||||||
|
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
if self.filters.based_on_payment_terms:
|
if self.filters.based_on_payment_terms:
|
||||||
columns.append({
|
columns.append({
|
||||||
"label": "Payment Term",
|
"label": _("Payment Term"),
|
||||||
"fieldname": "payment_term",
|
"fieldname": "payment_term",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"width": 120
|
"width": 120
|
||||||
})
|
})
|
||||||
columns.append({
|
columns.append({
|
||||||
"label": "Invoice Grand Total",
|
"label": _("Invoice Grand Total"),
|
||||||
"fieldname": "invoice_grand_total",
|
"fieldname": "invoice_grand_total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
@@ -83,7 +83,7 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
for label in ("Invoiced Amount", "Paid Amount", credit_or_debit_note, "Outstanding Amount"):
|
for label in ("Invoiced Amount", "Paid Amount", credit_or_debit_note, "Outstanding Amount"):
|
||||||
columns.append({
|
columns.append({
|
||||||
"label": label,
|
"label": _(label),
|
||||||
"fieldname": frappe.scrub(label),
|
"fieldname": frappe.scrub(label),
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ frappe.ui.form.on("Purchase Order", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query("expense_account", "items", function() {
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.get_expense_account",
|
||||||
|
filters: {'company': frm.doc.company}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
|||||||
@@ -60,6 +60,13 @@ def get_data():
|
|||||||
"description": _("Import Data from CSV / Excel files."),
|
"description": _("Import Data from CSV / Excel files."),
|
||||||
"onboard": 1,
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Chart of Accounts Importer",
|
||||||
|
"labe": _("Chart Of Accounts Importer"),
|
||||||
|
"description": _("Import Chart Of Accounts from CSV / Excel files"),
|
||||||
|
"onboard": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Letter Head",
|
"name": "Letter Head",
|
||||||
|
|||||||
@@ -11,4 +11,6 @@ from frappe.model.document import Document
|
|||||||
class Vehicle(Document):
|
class Vehicle(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if getdate(self.start_date) > getdate(self.end_date):
|
if getdate(self.start_date) > getdate(self.end_date):
|
||||||
frappe.throw(_("Insurance Start date should be less than Insurance End date"))
|
frappe.throw(_("Insurance Start date should be less than Insurance End date"))
|
||||||
|
if getdate(self.carbon_check_date) > getdate():
|
||||||
|
frappe.throw(_("Last carbon check date cannot be a future date"))
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 ">
|
<div class="col-sm-6 ">
|
||||||
<div class ="row multimode-payments">
|
<div class ="row multimode-payments" style = "margin-right:10px">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 payment-toolbar">
|
<div class="col-sm-6 payment-toolbar">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"add_total_row": 1,
|
"add_total_row": 0,
|
||||||
"creation": "2018-09-21 12:46:29.451048",
|
"creation": "2018-09-21 12:46:29.451048",
|
||||||
"disable_prepared_report": 0,
|
"disable_prepared_report": 0,
|
||||||
"disabled": 0,
|
"disabled": 0,
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2019-02-12 14:30:40.043652",
|
"modified": "2019-05-24 05:37:02.866139",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Analytics",
|
"name": "Sales Analytics",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ frappe.ui.form.on("Purchase Receipt", {
|
|||||||
frm.custom_make_buttons = {
|
frm.custom_make_buttons = {
|
||||||
'Stock Entry': 'Return',
|
'Stock Entry': 'Return',
|
||||||
'Purchase Invoice': 'Invoice'
|
'Purchase Invoice': 'Invoice'
|
||||||
}
|
};
|
||||||
|
|
||||||
frm.set_query("asset", "items", function() {
|
frm.set_query("asset", "items", function() {
|
||||||
return {
|
return {
|
||||||
@@ -18,7 +18,15 @@ frappe.ui.form.on("Purchase Receipt", {
|
|||||||
"purchase_receipt": frm.doc.name
|
"purchase_receipt": frm.doc.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
frm.set_query("expense_account", "items", function() {
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.get_expense_account",
|
||||||
|
filters: {'company': frm.doc.company}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
erpnext.queries.setup_queries(frm, "Warehouse", function() {
|
erpnext.queries.setup_queries(frm, "Warehouse", function() {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Document",
|
"document_type": "Document",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"barcode",
|
"barcode",
|
||||||
"section_break_2",
|
"section_break_2",
|
||||||
@@ -78,6 +79,10 @@
|
|||||||
"batch_no",
|
"batch_no",
|
||||||
"column_break_48",
|
"column_break_48",
|
||||||
"rejected_serial_no",
|
"rejected_serial_no",
|
||||||
|
"section_break_50",
|
||||||
|
"project",
|
||||||
|
"expense_account",
|
||||||
|
"cost_center",
|
||||||
"col_break5",
|
"col_break5",
|
||||||
"allow_zero_valuation_rate",
|
"allow_zero_valuation_rate",
|
||||||
"bom",
|
"bom",
|
||||||
@@ -771,18 +776,17 @@
|
|||||||
"label": "Material Request Item"
|
"label": "Material Request Item"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "accounting_dimensions_section",
|
"fieldname": "expense_account",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Link",
|
||||||
"label": "Accounting Dimensions"
|
"hidden": 1,
|
||||||
},
|
"label": "Expense Account",
|
||||||
{
|
"options": "Account",
|
||||||
"fieldname": "dimension_col_break",
|
"read_only": 1
|
||||||
"fieldtype": "Column Break"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2019-05-25 22:01:46.674368",
|
"modified": "2019-05-30 18:09:21.648599",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Purchase Receipt Item",
|
"name": "Purchase Receipt Item",
|
||||||
|
|||||||
Reference in New Issue
Block a user