Merge pull request #7003 from KanchanChauhan/workstation-fix
[Fix]Workstation holiday list
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index d0fec44..b9846c8 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.1.13'
+__version__ = '7.1.15'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/asset/asset.js b/erpnext/accounts/doctype/asset/asset.js
index 8ff4b83..664ed4d 100644
--- a/erpnext/accounts/doctype/asset/asset.js
+++ b/erpnext/accounts/doctype/asset/asset.js
@@ -28,6 +28,7 @@
refresh: function(frm) {
frappe.ui.form.trigger("Asset", "is_existing_asset");
frm.toggle_display("next_depreciation_date", frm.doc.docstatus < 1);
+ frm.events.make_schedules_editable(frm);
if (frm.doc.docstatus==1) {
if (frm.doc.status=='Submitted' && !frm.doc.is_existing_asset && !frm.doc.purchase_invoice) {
@@ -141,6 +142,22 @@
frm.toggle_enable("supplier", frm.doc.is_existing_asset);
frm.toggle_reqd("next_depreciation_date", !frm.doc.is_existing_asset);
},
+
+ opening_accumulated_depreciation: function(frm) {
+ erpnext.asset.set_accululated_depreciation(frm);
+ },
+
+ depreciation_method: function(frm) {
+ frm.events.make_schedules_editable(frm);
+ },
+
+ make_schedules_editable: function(frm) {
+ var is_editable = frm.doc.depreciation_method==="Manual" ? true : false;
+ frm.toggle_enable("schedules", is_editable);
+ frm.fields_dict["schedules"].grid.toggle_enable("schedule_date", is_editable);
+ frm.fields_dict["schedules"].grid.toggle_enable("depreciation_amount", is_editable);
+ }
+
});
frappe.ui.form.on('Depreciation Schedule', {
@@ -159,9 +176,25 @@
}
})
}
+ },
+
+ depreciation_amount: function(frm, cdt, cdn) {
+ erpnext.asset.set_accululated_depreciation(frm);
}
+
})
+erpnext.asset.set_accululated_depreciation = function(frm) {
+ if(frm.doc.depreciation_method != "Manual") return;
+
+ accumulated_depreciation = flt(frm.doc.opening_accumulated_depreciation);
+ $.each(frm.doc.schedules || [], function(i, row) {
+ accumulated_depreciation += flt(row.depreciation_amount);
+ frappe.model.set_value(row.doctype, row.name,
+ "accumulated_depreciation_amount", accumulated_depreciation);
+ })
+}
+
erpnext.asset.make_purchase_invoice = function(frm) {
frappe.call({
args: {
diff --git a/erpnext/accounts/doctype/asset/asset.json b/erpnext/accounts/doctype/asset/asset.json
index d3a88fb..95d9b48 100644
--- a/erpnext/accounts/doctype/asset/asset.json
+++ b/erpnext/accounts/doctype/asset/asset.json
@@ -516,7 +516,7 @@
"columns": 0,
"fieldname": "value_after_depreciation",
"fieldtype": "Currency",
- "hidden": 0,
+ "hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
@@ -580,7 +580,7 @@
"label": "Depreciation Method",
"length": 0,
"no_copy": 0,
- "options": "\nStraight Line\nDouble Declining Balance",
+ "options": "\nStraight Line\nDouble Declining Balance\nManual",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -750,7 +750,7 @@
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
- "read_only": 1,
+ "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
@@ -797,7 +797,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-03 14:58:53.710357",
+ "modified": "2016-11-18 15:59:19.774500",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset",
diff --git a/erpnext/accounts/doctype/asset/asset.py b/erpnext/accounts/doctype/asset/asset.py
index da73218..9caac07 100644
--- a/erpnext/accounts/doctype/asset/asset.py
+++ b/erpnext/accounts/doctype/asset/asset.py
@@ -18,6 +18,7 @@
self.set_missing_values()
self.validate_asset_values()
self.make_depreciation_schedule()
+ self.set_accumulated_depreciation()
self.validate_expected_value_after_useful_life()
# Validate depreciation related accounts
get_depreciation_accounts(self)
@@ -48,7 +49,7 @@
for field, value in item_details.items():
if not self.get(field):
self.set(field, value)
-
+
self.value_after_depreciation = (flt(self.gross_purchase_amount) -
flt(self.opening_accumulated_depreciation))
@@ -87,9 +88,10 @@
frappe.throw(_("Please set Next Depreciation Date"))
def make_depreciation_schedule(self):
- self.schedules = []
+ if self.depreciation_method != 'Manual':
+ self.schedules = []
+
if not self.get("schedules") and self.next_depreciation_date:
- accumulated_depreciation = flt(self.opening_accumulated_depreciation)
value_after_depreciation = flt(self.value_after_depreciation)
number_of_pending_depreciations = cint(self.total_number_of_depreciations) - \
@@ -100,18 +102,21 @@
n * cint(self.frequency_of_depreciation))
depreciation_amount = self.get_depreciation_amount(value_after_depreciation)
-
- accumulated_depreciation += flt(depreciation_amount)
value_after_depreciation -= flt(depreciation_amount)
self.append("schedules", {
"schedule_date": schedule_date,
- "depreciation_amount": depreciation_amount,
- "accumulated_depreciation_amount": accumulated_depreciation
+ "depreciation_amount": depreciation_amount
})
+
+ def set_accumulated_depreciation(self):
+ accumulated_depreciation = flt(self.opening_accumulated_depreciation)
+ for d in self.get("schedules"):
+ accumulated_depreciation += flt(d.depreciation_amount)
+ d.accumulated_depreciation_amount = accumulated_depreciation
def get_depreciation_amount(self, depreciable_value):
- if self.depreciation_method == "Straight Line":
+ if self.depreciation_method in ("Straight Line", "Manual"):
depreciation_amount = (flt(self.value_after_depreciation) -
flt(self.expected_value_after_useful_life)) / (cint(self.total_number_of_depreciations) -
cint(self.number_of_depreciations_booked))
@@ -126,16 +131,15 @@
return depreciation_amount
def validate_expected_value_after_useful_life(self):
- if self.depreciation_method == "Double Declining Balance":
- accumulated_depreciation_after_full_schedule = \
- max([d.accumulated_depreciation_amount for d in self.get("schedules")])
-
- asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
- flt(accumulated_depreciation_after_full_schedule))
-
- if self.expected_value_after_useful_life < asset_value_after_full_schedule:
- frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
- .format(asset_value_after_full_schedule))
+ accumulated_depreciation_after_full_schedule = \
+ max([d.accumulated_depreciation_amount for d in self.get("schedules")])
+
+ asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
+ flt(accumulated_depreciation_after_full_schedule))
+
+ if self.expected_value_after_useful_life < asset_value_after_full_schedule:
+ frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
+ .format(asset_value_after_full_schedule))
def validate_cancellation(self):
if self.status not in ("Submitted", "Partially Depreciated", "Fully Depreciated"):
diff --git a/erpnext/accounts/doctype/asset/test_asset.py b/erpnext/accounts/doctype/asset/test_asset.py
index b409ec3..51496b9 100644
--- a/erpnext/accounts/doctype/asset/test_asset.py
+++ b/erpnext/accounts/doctype/asset/test_asset.py
@@ -119,6 +119,30 @@
for d in asset.get("schedules")]
self.assertEqual(schedules, expected_schedules)
+
+ def test_schedule_for_manual_method(self):
+ asset = frappe.get_doc("Asset", "Macbook Pro 1")
+ asset.depreciation_method = "Manual"
+ asset.schedules = []
+ for schedule_date, amount in [["2020-12-31", 40000], ["2021-06-30", 30000], ["2021-10-31", 20000]]:
+ asset.append("schedules", {
+ "schedule_date": schedule_date,
+ "depreciation_amount": amount
+ })
+ asset.save()
+
+ self.assertEqual(asset.status, "Draft")
+
+ expected_schedules = [
+ ["2020-12-31", 40000, 40000],
+ ["2021-06-30", 30000, 70000],
+ ["2021-10-31", 20000, 90000]
+ ]
+
+ schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount]
+ for d in asset.get("schedules")]
+
+ self.assertEqual(schedules, expected_schedules)
def test_depreciation(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 85d3187..f1ccd9f 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -46,6 +46,12 @@
callback: function(r, rt) {
frm.refresh_field("payment_entries");
frm.refresh_fields();
+
+ $(frm.fields_dict.payment_entries.wrapper).find("[data-fieldname=amount]").each(function(i,v){
+ if (i !=0){
+ $(v).addClass("text-right")
+ }
+ })
}
});
}
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index a56170d..abc6eba 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import flt, getdate, nowdate
+from frappe.utils import flt, getdate, nowdate, fmt_money
from frappe import msgprint, _
from frappe.model.document import Document
@@ -26,8 +26,8 @@
select
"Journal Entry" as payment_document, t1.name as payment_entry,
t1.cheque_no as cheque_number, t1.cheque_date,
- abs(t2.debit_in_account_currency - t2.credit_in_account_currency) as amount,
- t1.posting_date, t2.against_account, t1.clearance_date
+ t2.debit_in_account_currency as debit, t2.credit_in_account_currency as credit,
+ t1.posting_date, t2.against_account, t1.clearance_date, t2.account_currency
from
`tabJournal Entry` t1, `tabJournal Entry Account` t2
where
@@ -36,21 +36,23 @@
and ifnull(t1.is_opening, 'No') = 'No' {0}
order by t1.posting_date ASC, t1.name DESC
""".format(condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
-
+
payment_entries = frappe.db.sql("""
select
"Payment Entry" as payment_document, name as payment_entry,
reference_no as cheque_number, reference_date as cheque_date,
- if(paid_from=%s, paid_amount, received_amount) as amount,
- posting_date, party as against_account, clearance_date
+ if(paid_from=%(account)s, paid_amount, "") as credit,
+ if(paid_from=%(account)s, "", received_amount) as debit,
+ posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
+ if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
from `tabPayment Entry`
where
- (paid_from=%s or paid_to=%s) and docstatus=1
- and posting_date >= %s and posting_date <= %s {0}
+ (paid_from=%(account)s or paid_to=%(account)s) and docstatus=1
+ and posting_date >= %(from)s and posting_date <= %(to)s {0}
order by
posting_date ASC, name DESC
""".format(condition),
- (self.bank_account, self.bank_account, self.bank_account, self.from_date, self.to_date), as_dict=1)
+ {"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1)
entries = sorted(list(payment_entries)+list(journal_entries),
key=lambda k: k['posting_date'] or getdate(nowdate()))
@@ -60,6 +62,11 @@
for d in entries:
row = self.append('payment_entries', {})
+
+ d.amount = fmt_money(d.debit if d.debit else d.credit, 2, d.account_currency) + " " + (_("Dr") if d.debit else _("Cr"))
+ d.pop("credit")
+ d.pop("debit")
+ d.pop("account_currency")
row.update(d)
self.total_amount += flt(d.amount)
diff --git a/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json b/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json
index 0f30fee..2e4af26 100644
--- a/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json
+++ b/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json
@@ -40,14 +40,14 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 0,
+ "columns": 1,
"fieldname": "payment_entry",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"label": "Payment Entry",
"length": 0,
"no_copy": 0,
@@ -69,7 +69,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 3,
+ "columns": 2,
"fieldname": "against_account",
"fieldtype": "Data",
"hidden": 0,
@@ -99,7 +99,7 @@
"collapsible": 0,
"columns": 2,
"fieldname": "amount",
- "fieldtype": "Currency",
+ "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -110,7 +110,7 @@
"no_copy": 0,
"oldfieldname": "debit",
"oldfieldtype": "Currency",
- "options": "account_currency",
+ "options": "",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
@@ -151,7 +151,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 0,
+ "columns": 2,
"fieldname": "posting_date",
"fieldtype": "Date",
"hidden": 0,
@@ -178,7 +178,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 3,
+ "columns": 1,
"fieldname": "cheque_number",
"fieldtype": "Data",
"hidden": 0,
@@ -267,7 +267,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-08-26 01:51:36.123941",
+ "modified": "2016-11-17 11:39:00.308624",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Detail",
diff --git a/erpnext/accounts/doctype/depreciation_schedule/depreciation_schedule.json b/erpnext/accounts/doctype/depreciation_schedule/depreciation_schedule.json
index 57c14b7..1fadf5e 100644
--- a/erpnext/accounts/doctype/depreciation_schedule/depreciation_schedule.json
+++ b/erpnext/accounts/doctype/depreciation_schedule/depreciation_schedule.json
@@ -10,11 +10,13 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "schedule_date",
"fieldtype": "Date",
"hidden": 0,
@@ -29,7 +31,8 @@
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
- "read_only": 1,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -40,6 +43,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "depreciation_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -55,7 +59,8 @@
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
- "read_only": 1,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -66,6 +71,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
@@ -80,6 +86,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -90,6 +97,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "accumulated_depreciation_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -106,8 +114,9 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -116,6 +125,8 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.docstatus==1",
"fieldname": "journal_entry",
"fieldtype": "Link",
"hidden": 0,
@@ -132,6 +143,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -142,7 +154,8 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
- "depends_on": "eval:(!doc.journal_entry && doc.schedule_date <= get_today())",
+ "columns": 0,
+ "depends_on": "eval:(doc.docstatus==1 && !doc.journal_entry && doc.schedule_date <= get_today())",
"fieldname": "make_depreciation_entry",
"fieldtype": "Button",
"hidden": 0,
@@ -158,6 +171,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -175,7 +189,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:27:59.603924",
+ "modified": "2016-11-18 16:42:19.543657",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Depreciation Schedule",
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 7b9bf16..d4f8edb 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -60,7 +60,14 @@
self.setup_party_account_field()
self.make_gl_entries(cancel=1)
self.update_advance_paid()
-
+ self.delink_advance_entry_references()
+
+ def delink_advance_entry_references(self):
+ for reference in self.references:
+ if reference.reference_doctype in ("Sales Invoice", "Purchase Invoice"):
+ doc = frappe.get_doc(reference.reference_doctype, reference.reference_name)
+ doc.delink_advance_entries(self.name)
+
def set_missing_values(self):
if self.payment_type == "Internal Transfer":
for field in ("party", "party_balance", "total_allocated_amount",
diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index e82d55e..d8c9b04 100644
--- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -460,7 +460,7 @@
pi.load_from_db()
#check outstanding after advance allocation
- self.assertEqual(flt(pi.outstanding_amount), flt(pi.grand_total - pi.total_advance, pi.precision("outstanding_amount")))
+ self.assertEqual(flt(pi.outstanding_amount), flt(pi.grand_total - pi.total_advance))
#added to avoid Document has been modified exception
jv = frappe.get_doc("Journal Entry", jv.name)
@@ -468,7 +468,54 @@
pi.load_from_db()
#check outstanding after advance cancellation
- self.assertEqual(flt(pi.outstanding_amount), flt(pi.grand_total + pi.total_advance, pi.precision("outstanding_amount")))
+ self.assertEqual(flt(pi.outstanding_amount), flt(pi.grand_total + pi.total_advance))
+
+ def test_outstanding_amount_after_advance_payment_entry_cancelation(self):
+ pe = frappe.get_doc({
+ "doctype": "Payment Entry",
+ "payment_type": "Pay",
+ "party_type": "Supplier",
+ "party": "_Test Supplier",
+ "company": "_Test Company",
+ "paid_from_account_currency": "INR",
+ "paid_to_account_currency": "INR",
+ "source_exchange_rate": 1,
+ "target_exchange_rate": 1,
+ "reference_no": "1",
+ "reference_date": nowdate(),
+ "received_amount": 300,
+ "paid_amount": 300,
+ "paid_from": "_Test Cash - _TC",
+ "paid_to": "_Test Payable - _TC"
+ })
+ pe.insert()
+ pe.submit()
+
+ pi = frappe.copy_doc(test_records[0])
+ pi.is_pos = 0
+ pi.append("advances", {
+ "doctype": "Purchase Invoice Advance",
+ "reference_type": "Payment Entry",
+ "reference_name": pe.name,
+ "advance_amount": 300,
+ "allocated_amount": 300,
+ "remarks": pe.remarks
+ })
+ pi.insert()
+ pi.submit()
+
+ pi.load_from_db()
+
+ #check outstanding after advance allocation
+ self.assertEqual(flt(pi.outstanding_amount), flt(pi.grand_total - pi.total_advance))
+
+ #added to avoid Document has been modified exception
+ pe = frappe.get_doc("Payment Entry", pe.name)
+ pe.cancel()
+
+ pi.load_from_db()
+ #check outstanding after advance cancellation
+ self.assertEqual(flt(pi.outstanding_amount), flt(pi.grand_total + pi.total_advance))
def unlink_payment_on_cancel_of_invoice(enable=1):
accounts_settings = frappe.get_doc("Accounts Settings")
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 9b4306e..4cd66f5 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -20,6 +20,13 @@
erpnext.queries.setup_queries(this.frm, "Warehouse", function() {
return erpnext.queries.warehouse(me.frm.doc);
});
+
+ if(this.frm.doc.__islocal && this.frm.doc.is_pos) {
+ //Load pos profile data on the invoice if the default value of Is POS is 1
+
+ me.frm.script_manager.trigger("is_pos");
+ me.frm.refresh_fields();
+ }
},
refresh: function(doc, dt, dn) {
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index 12b90ed..511eeaa 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -1013,6 +1013,53 @@
si.load_from_db()
#check outstanding after advance cancellation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total + si.total_advance, si.precision("outstanding_amount")))
+
+ def test_outstanding_amount_after_advance_payment_entry_cancelation(self):
+ pe = frappe.get_doc({
+ "doctype": "Payment Entry",
+ "payment_type": "Receive",
+ "party_type": "Customer",
+ "party": "_Test Customer",
+ "company": "_Test Company",
+ "paid_from_account_currency": "INR",
+ "paid_to_account_currency": "INR",
+ "source_exchange_rate": 1,
+ "target_exchange_rate": 1,
+ "reference_no": "1",
+ "reference_date": nowdate(),
+ "received_amount": 300,
+ "paid_amount": 300,
+ "paid_from": "_Test Receivable - _TC",
+ "paid_to": "_Test Cash - _TC"
+ })
+ pe.insert()
+ pe.submit()
+
+ si = frappe.copy_doc(test_records[0])
+ si.is_pos = 0
+ si.append("advances", {
+ "doctype": "Sales Invoice Advance",
+ "reference_type": "Payment Entry",
+ "reference_name": pe.name,
+ "advance_amount": 300,
+ "allocated_amount": 300,
+ "remarks": pe.remarks
+ })
+ si.insert()
+ si.submit()
+
+ si.load_from_db()
+
+ #check outstanding after advance allocation
+ self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total - si.total_advance, si.precision("outstanding_amount")))
+
+ #added to avoid Document has been modified exception
+ pe = frappe.get_doc("Payment Entry", pe.name)
+ pe.cancel()
+
+ si.load_from_db()
+ #check outstanding after advance cancellation
+ self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total + si.total_advance, si.precision("outstanding_amount")))
def create_sales_invoice(**args):
si = frappe.new_doc("Sales Invoice")
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
index dd1609a..23d2a31 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
@@ -8,7 +8,7 @@
<thead>
<tr>
<th style="width: 15%">{%= __("Posting Date") %}</th>
- <th style="width: 15%">{%= __("Journal Entry") %}</th>
+ <th style="width: 15%">{%= __("Payment Entry") %}</th>
<th style="width: 40%">{%= __("Reference") %}</th>
<th style="width: 15%; text-align: right;">{%= __("Debit") %}</th>
<th style="width: 15%; text-align: right;">{%= __("Credit") %}</th>
@@ -19,10 +19,10 @@
{% if (data[i]["posting_date"]) { %}
<tr>
<td>{%= dateutil.str_to_user(data[i]["posting_date"]) %}</td>
- <td>{%= data[i]["journal_entry"] %}</td>
+ <td>{%= data[i]["payment_entry"] %}</td>
<td>{%= __("Against") %}: {%= data[i]["against_account"] %}
- {% if (data[i]["reference"]) { %}
- <br>{%= __("Reference") %}: {%= data[i]["reference"] %}
+ {% if (data[i]["reference_no"]) { %}
+ <br>{%= __("Reference") %}: {%= data[i]["reference_no"] %}
{% if (data[i]["ref_date"]) { %}
<br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i]["ref_date"]) %}
{% } %}
@@ -38,7 +38,7 @@
<tr>
<td></td>
<td></td>
- <td>{%= data[i]["journal_entry"] %}</td>
+ <td>{%= data[i]["payment_entry"] %}</td>
<td style="text-align: right">{%= format_currency(data[i]["debit"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit"]) %}</td>
</tr>
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
index 8ed338e..95b7ff7 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -129,7 +129,7 @@
reference_no, reference_date as ref_date,
if(paid_to=%(account)s, received_amount, 0) as debit,
if(paid_from=%(account)s, paid_amount, 0) as credit,
- posting_date, party as against_account, clearance_date,
+ posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
from `tabPayment Entry`
where
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.html b/erpnext/accounts/report/cash_flow/cash_flow.html
new file mode 100644
index 0000000..40ba20c
--- /dev/null
+++ b/erpnext/accounts/report/cash_flow/cash_flow.html
@@ -0,0 +1 @@
+{% include "accounts/report/financial_statements.html" %}
\ No newline at end of file
diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.html b/erpnext/accounts/report/profitability_analysis/profitability_analysis.html
new file mode 100644
index 0000000..40ba20c
--- /dev/null
+++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.html
@@ -0,0 +1 @@
+{% include "accounts/report/financial_statements.html" %}
\ No newline at end of file
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index 6da496b..98390ff 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -32,12 +32,13 @@
# searches for active employees
def employee_query(doctype, txt, searchfield, start, page_len, filters):
+ conditions = []
return frappe.db.sql("""select name, employee_name from `tabEmployee`
where status = 'Active'
and docstatus < 2
and ({key} like %(txt)s
or employee_name like %(txt)s)
- {mcond}
+ {fcond} {mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, employee_name), locate(%(_txt)s, employee_name), 99999),
@@ -45,6 +46,7 @@
name, employee_name
limit %(start)s, %(page_len)s""".format(**{
'key': searchfield,
+ 'fcond': get_filters_cond(doctype, filters, conditions),
'mcond': get_match_cond(doctype)
}), {
'txt': "%%%s%%" % txt,
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 68e9155..60cd68c 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -164,14 +164,18 @@
frappe.throw(_("Maxiumm discount for Item {0} is {1}%").format(d.item_code, discount))
def validate_selling_price(self):
+ def throw_message(item_name, rate, ref_rate_field):
+ frappe.throw(_("""Selling price for item {0} is lower than its {1}. Selling price should be atleast {2}""")
+ .format(item_name, ref_rate_field, rate))
+
if not frappe.db.get_single_value("Selling Settings", "validate_selling_price"):
return
for it in self.get("items"):
- last_purchase_rate, is_stock_item = frappe.db.get_value("Item", it.name, ["last_purchase_rate", "is_stock_item"])
+ last_purchase_rate, is_stock_item = frappe.db.get_value("Item", it.item_code, ["last_purchase_rate", "is_stock_item"])
if flt(it.base_rate) < flt(last_purchase_rate):
- throw(it.name, last_purchase_rate, "last purchase rate")
+ throw_message(it.item_name, last_purchase_rate, "last purchase rate")
last_valuation_rate = frappe.db.sql("""
SELECT valuation_rate FROM `tabStock Ledger Entry` WHERE item_code = %s
@@ -182,9 +186,6 @@
if is_stock_item and flt(it.base_rate) < flt(last_valuation_rate):
throw_message(it.name, last_valuation_rate, "valuation rate")
- def throw_message(item_name, rate, ref_rate_field):
- frappe.throw(_("""Selling price for item {0} is lower than its {1}. Selling price should be atleast {2}""")
- .format(item_name, ref_rate_field, rate))
def get_item_list(self):
il = []
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py
index 3554669..2077982 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.py
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.py
@@ -22,7 +22,7 @@
sal_struct = frappe.db.sql("""
select name from `tabSalary Structure`
- where docstatus != 2 and company = %(company)s and
+ where docstatus != 2 and is_active = 'Yes' and company = %(company)s and
ifnull(salary_slip_based_on_timesheet,0) = %(salary_slip_based_on_timesheet)s""",
{"company": self.company, "salary_slip_based_on_timesheet":self.salary_slip_based_on_timesheet})
@@ -51,8 +51,8 @@
def get_joining_releiving_condition(self):
cond = """
- and ifnull(t1.date_of_joining, '0000-00-00') <= '%(from_date)s'
- and ifnull(t1.relieving_date, '2199-12-31') >= '%(to_date)s'
+ and ifnull(t1.date_of_joining, '0000-00-00') <= '%(to_date)s'
+ and ifnull(t1.relieving_date, '2199-12-31') >= '%(from_date)s'
""" % {"from_date": self.from_date, "to_date": self.to_date}
return cond
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index 334e8a5..c5df2e6 100755
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -28,7 +28,15 @@
type: "deduction"
}
}
- })
+ });
+ frm.set_query("employee", "employees", function(doc) {
+ return {
+ query: "erpnext.controllers.queries.employee_query",
+ filters: {
+ company: doc.company
+ }
+ }
+ });
},
refresh: function(frm) {
@@ -182,11 +190,3 @@
calculate_totals(frm.doc);
}
})
-
-frappe.ui.form.on('Salary Structure Employee', {
- onload: function(frm) {
- frm.set_query("employee","employees", function(doc,cdt,cdn) {
- return{ query: "erpnext.controllers.queries.employee_query" }
- })
- }
-});
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
index 8d844cd..d9f3082 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
@@ -816,7 +816,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-08-17 05:35:34.331954",
+ "modified": "2016-11-16 05:35:34.331954",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Planning Tool",
diff --git a/erpnext/patches/v7_0/fix_duplicate_icons.py b/erpnext/patches/v7_0/fix_duplicate_icons.py
index 3e762f7..f6d227d 100644
--- a/erpnext/patches/v7_0/fix_duplicate_icons.py
+++ b/erpnext/patches/v7_0/fix_duplicate_icons.py
@@ -6,6 +6,8 @@
def execute():
'''hide new style icons if old ones are set'''
+ frappe.reload_doc('desk', 'doctype', 'desktop_icon')
+
reload_doctypes_for_schools_icons()
sync_desktop_icons()
diff --git a/erpnext/patches/v7_1/update_missing_salary_component_type.py b/erpnext/patches/v7_1/update_missing_salary_component_type.py
index f0e3f6a..25624f5 100644
--- a/erpnext/patches/v7_1/update_missing_salary_component_type.py
+++ b/erpnext/patches/v7_1/update_missing_salary_component_type.py
@@ -9,6 +9,8 @@
'''
def execute():
+ frappe.reload_doc("accounts", "doctype", "salary_component_account")
+
for s in frappe.db.sql('''select name, type, salary_component_abbr from `tabSalary Component`
where ifnull(type, "")="" or ifnull(salary_component_abbr, "") = ""''', as_dict=1):
@@ -43,4 +45,4 @@
component.salary_component_abbr = abbr
- component.save()
\ No newline at end of file
+ component.save()
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.json b/erpnext/schools/doctype/student_applicant/student_applicant.json
index e60a54e..5c6e276 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.json
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.json
@@ -920,7 +920,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-10-10 06:19:19.319038",
+ "modified": "2016-11-17 10:26:13.225135",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Applicant",
@@ -947,27 +947,6 @@
"share": 1,
"submit": 1,
"write": 1
- },
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 1,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 0,
- "role": "Guest",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
- "write": 0
}
],
"quick_entry": 1,
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index a04c652..59fdf70 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -66,27 +66,41 @@
});
}
+ if(this.frm.fields_dict["packed_items"].grid.get_field('batch_no')) {
+ this.frm.set_query("batch_no", "packed_items", function(doc, cdt, cdn) {
+ return me.set_query_for_batch(doc, cdt, cdn)
+ });
+ }
+
if(this.frm.fields_dict["items"].grid.get_field('batch_no')) {
this.frm.set_query("batch_no", "items", function(doc, cdt, cdn) {
- var item = frappe.get_doc(cdt, cdn);
- if(!item.item_code) {
- frappe.throw(__("Please enter Item Code to get batch no"));
- } else {
- filters = {
- 'item_code': item.item_code,
- 'posting_date': me.frm.doc.posting_date || frappe.datetime.nowdate(),
- }
- if(item.warehouse) filters["warehouse"] = item.warehouse
-
- return {
- query : "erpnext.controllers.queries.get_batch_no",
- filters: filters
- }
- }
+ return me.set_query_for_batch(doc, cdt, cdn)
});
}
},
+ set_query_for_batch: function(doc, cdt, cdn) {
+ // Show item's batches in the dropdown of batch no
+
+ var me = this;
+ var item = frappe.get_doc(cdt, cdn);
+
+ if(!item.item_code) {
+ frappe.throw(__("Please enter Item Code to get batch no"));
+ } else {
+ filters = {
+ 'item_code': item.item_code,
+ 'posting_date': me.frm.doc.posting_date || frappe.datetime.nowdate(),
+ }
+ if(item.warehouse) filters["warehouse"] = item.warehouse
+
+ return {
+ query : "erpnext.controllers.queries.get_batch_no",
+ filters: filters
+ }
+ }
+ },
+
refresh: function() {
this._super();
this.frm.toggle_display("customer_name",
diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py
index 2078eeb..09affe0 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.py
+++ b/erpnext/stock/doctype/packed_item/packed_item.py
@@ -16,7 +16,7 @@
def get_product_bundle_items(item_code):
return frappe.db.sql("""select t1.item_code, t1.qty, t1.uom, t1.description
from `tabProduct Bundle Item` t1, `tabProduct Bundle` t2
- where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1)
+ where t2.new_item_code=%s and t1.parent = t2.name order by t1.idx""", item_code, as_dict=1)
def get_packing_item_details(item):
return frappe.db.sql("""select item_name, description, stock_uom from `tabItem`
diff --git a/erpnext/templates/includes/order/order_macros.html b/erpnext/templates/includes/order/order_macros.html
index 70a1fd8..e77b8b4 100644
--- a/erpnext/templates/includes/order/order_macros.html
+++ b/erpnext/templates/includes/order/order_macros.html
@@ -4,7 +4,7 @@
<div class="row item_name_and_description">
<div class="col-xs-4 col-sm-2 order-image-col">
<div class="order-image">
- {{ product_image_square(d.image) }}
+ {{ product_image_square(d.thumbnail or d.image) }}
</div>
</div>
<div class="col-xs-8 col-sm-10">
@@ -18,7 +18,7 @@
<div class="row item_name_dropdown">
<div class="col-xs-4 col-sm-4 order-image-col">
<div class="order-image">
- {{ product_image_square(d.image) }}
+ {{ product_image_square(d.thumbnail or d.image) }}
</div>
</div>
<div class="col-xs-8 col-sm-8">
diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv
index cbec0e7..bd580f2 100644
--- a/erpnext/translations/fr.csv
+++ b/erpnext/translations/fr.csv
@@ -420,7 +420,7 @@
DocType: Account,Cost of Goods Sold,Coût des marchandises vendues
DocType: Purchase Invoice,Yearly,Annuel
apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +226,Please enter Cost Center,S'il vous plaît entrer Centre de coûts
-DocType: Journal Entry Account,Sales Order,Bon de commande
+DocType: Journal Entry Account,Sales Order,Commande client
apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py +68,Avg. Selling Rate,Moy. Taux de vente
DocType: Assessment,Examiner Name,Nom de l'examinateur
apps/erpnext/erpnext/utilities/transaction_base.py +149,Quantity cannot be a fraction in row {0},La quantité ne peut pas être une fraction à la ligne {0}
@@ -722,7 +722,7 @@
#### Description of Columns
-1. Calculation Type:
+1. Calculation Type:
- This can be on **Net Total** (that is the sum of basic amount).
- **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.
- **Actual** (as mentioned).
@@ -733,19 +733,19 @@
6. Amount: Tax amount.
7. Total: Cumulative total to this point.
8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row).
-9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.","Modèle de la taxe standard qui peut être appliqué à toutes les opérations de vente. Ce modèle peut contenir la liste des chefs d'impôt ainsi que d'autres chefs dépenses / revenus comme le ""port"", ""assurance"", ""Manipulation"", etc.
+9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.","Modèle de la taxe standard qui peut être appliqué à toutes les opérations de vente. Ce modèle peut contenir la liste des chefs d'impôt ainsi que d'autres chefs dépenses / revenus comme le ""port"", ""assurance"", ""Manipulation"", etc.
- #### Remarque
+ #### Remarque
Le taux d'imposition vous définir ici sera le taux d'imposition standard pour tous les articles ** **. Se il ya ** ** Articles qui ont des taux différents, ils doivent être ajoutés dans le ** Impôt de l'article ** ** table dans le Point ** maître.
- #### Description des colonnes
+ #### Description des colonnes
- 1. Type de calcul:
+ 1. Type de calcul:
- Cela peut être le ** Net Total ** (ce est la somme de montant de base).
- ** Sur Rang Précédent Total / Montant ** (pour les taxes ou frais cumulatifs). Si vous sélectionnez cette option, la taxe sera appliquée en pourcentage de la rangée précédente (dans la table d'impôt) montant ou totale.
- ** ** Réelles (comme mentionné).
- 2. Compte chef: Le grand livre de compte en vertu de laquelle cette taxe sera réservé
+ 2. Compte chef: Le grand livre de compte en vertu de laquelle cette taxe sera réservé
3. Centre de Coût: Si la taxe / redevance est un revenu (comme le transport) ou dépenses qu'elle doit être réservé contre un centre de coûts.
4. Description: Description de la taxe (qui sera imprimée sur les factures / guillemets).
5. Taux: Le taux d'imposition.
@@ -941,7 +941,7 @@
Please enter a valid Invoice","Row {0}: Invoice {1} est invalide, il pourrait être annulé / n'existe pas. \ S'il vous plaît entrer une facture valide"
apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +105,Row {0}: Payment against Sales/Purchase Order should always be marked as advance,Row {0}: Paiement contre Ventes / bon de commande doit toujours être marqué comme avance
apps/erpnext/erpnext/setup/setup_wizard/industry_type.py +16,Chemical,chimique
-apps/erpnext/erpnext/schools/doctype/grading_structure/grading_structure.py +24,"The intervals for Grade Code {0} overlaps with the grade intervals for other grades.
+apps/erpnext/erpnext/schools/doctype/grading_structure/grading_structure.py +24,"The intervals for Grade Code {0} overlaps with the grade intervals for other grades.
Please check intervals {0} and {1} and try again",Les intervalles de code grade {0} chevauchements avec les intervalles de qualité pour les autres grades. S'il vous plaît vérifier les intervalles {0} et {1} et essayez à nouveau
apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py +694,All items have already been transferred for this Production Order.,Tous les éléments ont déjà été transférés pour cet ordre de production.
DocType: Process Payroll,Select Payroll Year and Month,Sélectionnez paie Année et mois
@@ -2171,7 +2171,7 @@
#### Description of Columns
-1. Calculation Type:
+1. Calculation Type:
- This can be on **Net Total** (that is the sum of basic amount).
- **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.
- **Actual** (as mentioned).
@@ -2183,19 +2183,19 @@
7. Total: Cumulative total to this point.
8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row).
9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.
-10. Add or Deduct: Whether you want to add or deduct the tax.","Modèle de la taxe standard qui peut être appliqué à toutes les opérations d'achat. Ce modèle peut contenir la liste des chefs d'impôt ainsi que d'autres chefs de dépenses comme ""Expédition"", ""assurance"", ""Manipulation"", etc.
+10. Add or Deduct: Whether you want to add or deduct the tax.","Modèle de la taxe standard qui peut être appliqué à toutes les opérations d'achat. Ce modèle peut contenir la liste des chefs d'impôt ainsi que d'autres chefs de dépenses comme ""Expédition"", ""assurance"", ""Manipulation"", etc.
- #### Remarque
+ #### Remarque
Le taux d'imposition que vous définissez ici sera le taux d'imposition standard pour tous les articles ** **. Se il ya ** ** Articles qui ont des taux différents, ils doivent être ajoutés dans le ** Impôt de l'article ** ** table dans le Point ** maître.
- #### Description des colonnes
+ #### Description des colonnes
- 1. Type de calcul:
+ 1. Type de calcul:
- Cela peut être le ** Net Total ** (ce est la somme de montant de base).
- ** Sur Rang Précédent Total / Montant ** (pour les taxes ou frais cumulatifs). Si vous sélectionnez cette option, la taxe sera appliquée en pourcentage de la rangée précédente (dans la table d'impôt) montant ou totale.
- ** ** Réelles (comme mentionné).
- 2. Compte chef: Le grand livre de compte en vertu de laquelle cette taxe sera réservé
+ 2. Compte chef: Le grand livre de compte en vertu de laquelle cette taxe sera réservé
3. Centre de Coût: Si la taxe / redevance est un revenu (comme le transport) ou dépenses qu'elle doit être réservé contre un centre de coûts.
4. Description: Description de la taxe (qui sera imprimée sur les factures / guillemets).
5. Taux: Le taux d'imposition.
@@ -2389,7 +2389,7 @@
1. Ways of addressing disputes, indemnity, liability, etc.
1. Address and Contact of your Company.","Conditions d'utilisation standard qui peuvent être ajoutés aux ventes et achats.
- Exemples:
+ Exemples:
1. Validité de l'offre.
1. Conditions de paiement (à l'avance, à crédit, une partie avance etc).
@@ -2398,7 +2398,7 @@
1. Garantie cas échéant.
1. Politique de retour.
1. Conditions d'expédition, le cas échéant.
- 1. Façons de différends adressage, indemnisation, la responsabilité, etc.
+ 1. Façons de différends adressage, indemnisation, la responsabilité, etc.
1. Adresse et contact de votre société."
DocType: Attendance,Leave Type,Type de Congé
apps/erpnext/erpnext/controllers/stock_controller.py +173,Expense / Difference account ({0}) must be a 'Profit or Loss' account,Dépenses / compte de la différence ({0}) doit être un compte «de résultat»
@@ -3384,7 +3384,7 @@
apps/erpnext/erpnext/setup/setup_wizard/industry_type.py +15,Brokerage,courtage
DocType: Address,Postal Code,Code Postal
DocType: Production Order Operation,"in Minutes
-Updated via 'Time Log'","Mise à jour en quelques minutes
+Updated via 'Time Log'","Mise à jour en quelques minutes
via 'Log Time'"
DocType: Customer,From Lead,Du prospect
apps/erpnext/erpnext/config/manufacturing.py +13,Orders released for production.,Commandes validé pour la production.
@@ -3564,7 +3564,7 @@
apps/erpnext/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +34,Bank Statement balance as per General Ledger,Solde du relevé bancaire que par General Ledger
DocType: Job Applicant,Applicant Name,Nom du demandeur
DocType: Authorization Rule,Customer / Item Name,Client / Nom d'article
-DocType: Product Bundle,"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**.
+DocType: Product Bundle,"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**.
The package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"".
@@ -3711,17 +3711,17 @@
{% if phone %}Phone: {{ phone }}<br>{% endif -%}
{% if fax %}Fax: {{ fax }}<br>{% endif -%}
{% if email_id %}Email: {{ email_id }}<br>{% endif -%}
-</code></pre>","<H4> Modèle par défaut </ h4>
- <p> <a Utilise href=""http://jinja.pocoo.org/docs/templates/""> Jinja Templating </a> et tous les champs d'adresse ( y compris les champs personnalisés le cas échéant) sera disponible </ p>
- <pre> <code> {{address_line1}} & lt; br & gt;
- {% si address_line2%} {{address_line2}} & lt; br & gt; { % endif -%}
- {{ville}} & lt; br & gt;
- {% si l'état%} {{}} Etat & lt; br & gt; {% endif -%} {% if
- code PIN%} PIN: {{code PIN}} & lt; br & gt; {% endif -%}
- {{pays}} & lt; br & gt;
- {% si le téléphone%} Téléphone: {{téléphone}} & lt; br & gt; { % endif -%}
- {% if télécopieur%} Fax: {{fax}} & lt; br & gt; {% endif -%}
- {% si email_id%} Email: {{email_id}} & lt; br & gt ; {% endif -%}
+</code></pre>","<H4> Modèle par défaut </ h4>
+ <p> <a Utilise href=""http://jinja.pocoo.org/docs/templates/""> Jinja Templating </a> et tous les champs d'adresse ( y compris les champs personnalisés le cas échéant) sera disponible </ p>
+ <pre> <code> {{address_line1}} & lt; br & gt;
+ {% si address_line2%} {{address_line2}} & lt; br & gt; { % endif -%}
+ {{ville}} & lt; br & gt;
+ {% si l'état%} {{}} Etat & lt; br & gt; {% endif -%} {% if
+ code PIN%} PIN: {{code PIN}} & lt; br & gt; {% endif -%}
+ {{pays}} & lt; br & gt;
+ {% si le téléphone%} Téléphone: {{téléphone}} & lt; br & gt; { % endif -%}
+ {% if télécopieur%} Fax: {{fax}} & lt; br & gt; {% endif -%}
+ {% si email_id%} Email: {{email_id}} & lt; br & gt ; {% endif -%}
</ code> </ pre>"
DocType: Salary Detail,Default Amount,Montant par défaut
apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +93,Warehouse not found in the system,Entrepôt pas trouvé dans le système
@@ -3914,7 +3914,7 @@
apps/erpnext/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +80,Year start date or end date is overlapping with {0}. To avoid please set company,Année de début ou de fin chevauche avec {0}. Pour éviter s'il vous plaît définir la société
apps/erpnext/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py +157,Start date should be less than end date for Item {0},La date de début doit être inférieure à la date de fin de l'article {0}
DocType: Item,"Example: ABCD.#####
-If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Exemple:. ABCD #####
+If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Exemple:. ABCD #####
Si la série est réglé et n ° de série ne est pas mentionné dans les transactions, le numéro de série, puis automatique sera créé sur la base de cette série. Si vous voulez toujours de mentionner explicitement numéros de série pour ce produit. laissez ce champ vide."
DocType: Upload Attendance,Upload Attendance,Chargez fréquentation
apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.js +113,BOM and Manufacturing Quantity are required,BOM et fabrication Quantité sont nécessaires
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index f85edfd..051334c 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -126,11 +126,11 @@
return ret
- def delink_advance_entries(self, jv):
+ def delink_advance_entries(self, linked_doc_name):
total_allocated_amount = 0
for adv in self.advances:
consider_for_total_advance = True
- if adv.reference_name == jv:
+ if adv.reference_name == linked_doc_name:
frappe.db.sql("""delete from `tab{0} Advance`
where name = %s""".format(self.doctype), adv.name)
consider_for_total_advance = False