Merge pull request #31197 from frappe/version-13-hotfix

chore: weekly release for version-13
This commit is contained in:
Ankush Menat
2022-05-31 18:50:44 +05:30
committed by GitHub
40 changed files with 1412 additions and 837 deletions

View File

@@ -102,7 +102,9 @@ frappe.ui.form.on('POS Closing Entry', {
});
},
before_save: function(frm) {
before_save: async function(frm) {
frappe.dom.freeze(__('Processing Sales! Please Wait...'));
frm.set_value("grand_total", 0);
frm.set_value("net_total", 0);
frm.set_value("total_quantity", 0);
@@ -112,17 +114,23 @@ frappe.ui.form.on('POS Closing Entry', {
row.expected_amount = row.opening_amount;
}
for (let row of frm.doc.pos_transactions) {
frappe.db.get_doc("POS Invoice", row.pos_invoice).then(doc => {
frm.doc.grand_total += flt(doc.grand_total);
frm.doc.net_total += flt(doc.net_total);
frm.doc.total_quantity += flt(doc.total_qty);
refresh_payments(doc, frm);
refresh_taxes(doc, frm);
refresh_fields(frm);
set_html_data(frm);
});
const pos_inv_promises = frm.doc.pos_transactions.map(
row => frappe.db.get_doc("POS Invoice", row.pos_invoice)
);
const pos_invoices = await Promise.all(pos_inv_promises);
for (let doc of pos_invoices) {
frm.doc.grand_total += flt(doc.grand_total);
frm.doc.net_total += flt(doc.net_total);
frm.doc.total_quantity += flt(doc.total_qty);
refresh_payments(doc, frm);
refresh_taxes(doc, frm);
refresh_fields(frm);
set_html_data(frm);
}
frappe.dom.unfreeze();
}
});

View File

@@ -228,6 +228,7 @@ def set_gl_entries_by_account(
{additional_conditions}
and posting_date <= %(to_date)s
and {based_on} is not null
and is_cancelled = 0
order by {based_on}, posting_date""".format(
additional_conditions="\n".join(additional_conditions), based_on=based_on
),

View File

@@ -6,6 +6,7 @@
import frappe
from frappe import _
from frappe.utils import get_link_to_form
from frappe.website.website_generator import WebsiteGenerator
from erpnext.hr.doctype.staffing_plan.staffing_plan import (
@@ -33,26 +34,32 @@ class JobOpening(WebsiteGenerator):
self.staffing_plan = staffing_plan[0].name
self.planned_vacancies = staffing_plan[0].vacancies
elif not self.planned_vacancies:
planned_vacancies = frappe.db.sql(
"""
select vacancies from `tabStaffing Plan Detail`
where parent=%s and designation=%s""",
(self.staffing_plan, self.designation),
self.planned_vacancies = frappe.db.get_value(
"Staffing Plan Detail",
{"parent": self.staffing_plan, "designation": self.designation},
"vacancies",
)
self.planned_vacancies = planned_vacancies[0][0] if planned_vacancies else None
if self.staffing_plan and self.planned_vacancies:
staffing_plan_company = frappe.db.get_value("Staffing Plan", self.staffing_plan, "company")
lft, rgt = frappe.get_cached_value("Company", staffing_plan_company, ["lft", "rgt"])
designation_counts = get_designation_counts(self.designation, self.company)
designation_counts = get_designation_counts(self.designation, self.company, self.name)
current_count = designation_counts["employee_count"] + designation_counts["job_openings"]
if self.planned_vacancies <= current_count:
number_of_positions = frappe.db.get_value(
"Staffing Plan Detail",
{"parent": self.staffing_plan, "designation": self.designation},
"number_of_positions",
)
if number_of_positions <= current_count:
frappe.throw(
_(
"Job Openings for designation {0} already open or hiring completed as per Staffing Plan {1}"
).format(self.designation, self.staffing_plan)
"Job Openings for the designation {0} are already open or the hiring is complete as per the Staffing Plan {1}"
).format(
frappe.bold(self.designation), get_link_to_form("Staffing Plan", self.staffing_plan)
),
title=_("Vacancies fulfilled"),
)
def get_context(self, context):

View File

@@ -3,8 +3,77 @@
import unittest
# test_records = frappe.get_test_records('Job Opening')
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import add_days, getdate
from erpnext.hr.doctype.employee.test_employee import make_employee
from erpnext.hr.doctype.staffing_plan.test_staffing_plan import make_company
class TestJobOpening(unittest.TestCase):
pass
class TestJobOpening(FrappeTestCase):
def setUp(self):
frappe.db.delete("Staffing Plan")
frappe.db.delete("Staffing Plan Detail")
frappe.db.delete("Job Opening")
make_company("_Test Opening Company", "_TOC")
frappe.db.delete("Employee", {"company": "_Test Opening Company"})
def test_vacancies_fulfilled(self):
make_employee(
"test_job_opening@example.com", company="_Test Opening Company", designation="Designer"
)
staffing_plan = frappe.get_doc(
{
"doctype": "Staffing Plan",
"company": "_Test Opening Company",
"name": "Test",
"from_date": getdate(),
"to_date": add_days(getdate(), 10),
}
)
staffing_plan.append(
"staffing_details",
{"designation": "Designer", "vacancies": 1, "estimated_cost_per_position": 50000},
)
staffing_plan.insert()
staffing_plan.submit()
self.assertEqual(staffing_plan.staffing_details[0].number_of_positions, 2)
# allows creating 1 job opening as per vacancy
opening_1 = get_job_opening()
opening_1.insert()
# vacancies as per staffing plan already fulfilled via job opening and existing employee count
opening_2 = get_job_opening(job_title="Designer New")
self.assertRaises(frappe.ValidationError, opening_2.insert)
# allows updating existing job opening
opening_1.status = "Closed"
opening_1.save()
def get_job_opening(**args):
args = frappe._dict(args)
opening = frappe.db.exists("Job Opening", {"job_title": args.job_title or "Designer"})
if opening:
return frappe.get_doc("Job Opening", opening)
opening = frappe.get_doc(
{
"doctype": "Job Opening",
"job_title": "Designer",
"designation": "Designer",
"company": "_Test Opening Company",
"status": "Open",
}
)
opening.update(args)
return opening

View File

@@ -175,27 +175,24 @@ class StaffingPlan(Document):
@frappe.whitelist()
def get_designation_counts(designation, company):
def get_designation_counts(designation, company, job_opening=None):
if not designation:
return False
employee_counts = {}
company_set = get_descendants_of("Company", company)
company_set.append(company)
employee_counts["employee_count"] = frappe.db.get_value(
"Employee",
filters={"designation": designation, "status": "Active", "company": ("in", company_set)},
fieldname=["count(name)"],
employee_count = frappe.db.count(
"Employee", {"designation": designation, "status": "Active", "company": ("in", company_set)}
)
employee_counts["job_openings"] = frappe.db.get_value(
"Job Opening",
filters={"designation": designation, "status": "Open", "company": ("in", company_set)},
fieldname=["count(name)"],
)
filters = {"designation": designation, "status": "Open", "company": ("in", company_set)}
if job_opening:
filters["name"] = ("!=", job_opening)
return employee_counts
job_openings = frappe.db.count("Job Opening", filters)
return {"employee_count": employee_count, "job_openings": job_openings}
@frappe.whitelist()

View File

@@ -85,13 +85,16 @@ def _set_up():
make_company()
def make_company():
if frappe.db.exists("Company", "_Test Company 10"):
def make_company(name=None, abbr=None):
if not name:
name = "_Test Company 10"
if frappe.db.exists("Company", name):
return
company = frappe.new_doc("Company")
company.company_name = "_Test Company 10"
company.abbr = "_TC10"
company.company_name = name
company.abbr = abbr or "_TC10"
company.parent_company = "_Test Company 3"
company.default_currency = "INR"
company.country = "Pakistan"

View File

@@ -598,20 +598,18 @@ def check_effective_date(from_date, to_date, frequency, based_on_date_of_joining
return False
def get_salary_assignment(employee, date):
assignment = frappe.db.sql(
"""
select * from `tabSalary Structure Assignment`
where employee=%(employee)s
and docstatus = 1
and %(on_date)s >= from_date order by from_date desc limit 1""",
{
"employee": employee,
"on_date": date,
},
as_dict=1,
def get_salary_assignments(employee, payroll_period):
start_date, end_date = frappe.db.get_value(
"Payroll Period", payroll_period, ["start_date", "end_date"]
)
return assignment[0] if assignment else None
assignments = frappe.db.get_all(
"Salary Structure Assignment",
filters={"employee": employee, "docstatus": 1, "from_date": ["between", (start_date, end_date)]},
fields=["*"],
order_by="from_date",
)
return assignments
def get_sal_slip_total_benefit_given(employee, payroll_period, component=False):

View File

@@ -595,6 +595,46 @@
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Interview Type",
"link_count": 0,
"link_to": "Interview Type",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Interview Round",
"link_count": 0,
"link_to": "Interview Round",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Interview",
"link_count": 0,
"link_to": "Interview",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Interview Feedback",
"link_count": 0,
"link_to": "Interview Feedback",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
@@ -841,7 +881,7 @@
"type": "Link"
}
],
"modified": "2021-05-13 17:19:40.524444",
"modified": "2022-05-30 17:19:40.524444",
"modified_by": "Administrator",
"module": "HR",
"name": "HR",

View File

@@ -61,6 +61,8 @@ class Loan(AccountsController):
def on_submit(self):
self.link_loan_security_pledge()
# Interest accrual for backdated term loans
self.accrue_loan_interest()
def on_cancel(self):
self.unlink_loan_security_pledge()
@@ -180,6 +182,16 @@ class Loan(AccountsController):
self.db_set("maximum_loan_amount", maximum_loan_value)
def accrue_loan_interest(self):
from erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual import (
process_loan_interest_accrual_for_term_loans,
)
if getdate(self.repayment_start_date) < getdate() and self.is_term_loan:
process_loan_interest_accrual_for_term_loans(
posting_date=getdate(), loan_type=self.loan_type, loan=self.name
)
def unlink_loan_security_pledge(self):
pledges = frappe.get_all("Loan Security Pledge", fields=["name"], filters={"loan": self.name})
pledge_list = [d.name for d in pledges]

View File

@@ -93,6 +93,11 @@ frappe.ui.form.on("BOM", {
});
}
frm.add_custom_button(__("New Version"), function() {
let new_bom = frappe.model.copy_doc(frm.doc);
frappe.set_route("Form", "BOM", new_bom.name);
});
if(frm.doc.docstatus==1) {
frm.add_custom_button(__("Work Order"), function() {
frm.trigger("make_work_order");
@@ -331,7 +336,7 @@ frappe.ui.form.on("BOM", {
});
});
if (has_template_rm) {
if (has_template_rm && has_template_rm.length) {
dialog.fields_dict.items.grid.refresh();
}
},
@@ -467,7 +472,8 @@ var get_bom_material_detail = function(doc, cdt, cdn, scrap_items) {
"uom": d.uom,
"stock_uom": d.stock_uom,
"conversion_factor": d.conversion_factor,
"sourced_by_supplier": d.sourced_by_supplier
"sourced_by_supplier": d.sourced_by_supplier,
"do_not_explode": d.do_not_explode
},
callback: function(r) {
d = locals[cdt][cdn];
@@ -640,6 +646,13 @@ frappe.ui.form.on("BOM Operation", "workstation", function(frm, cdt, cdn) {
});
});
frappe.ui.form.on("BOM Item", {
do_not_explode: function(frm, cdt, cdn) {
get_bom_material_detail(frm.doc, cdt, cdn, false);
}
})
frappe.ui.form.on("BOM Item", "qty", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
d.stock_qty = d.qty * d.conversion_factor;

View File

@@ -22,6 +22,10 @@ from erpnext.stock.get_item_details import get_conversion_factor, get_price_list
form_grid_templates = {"items": "templates/form_grid/item_grid.html"}
class BOMRecursionError(frappe.ValidationError):
pass
class BOMTree:
"""Full tree representation of a BOM"""
@@ -250,6 +254,9 @@ class BOM(WebsiteGenerator):
for item in self.get("items"):
self.validate_bom_currency(item)
if item.do_not_explode:
item.bom_no = ""
ret = self.get_bom_material_detail(
{
"company": self.company,
@@ -263,8 +270,10 @@ class BOM(WebsiteGenerator):
"stock_uom": item.stock_uom,
"conversion_factor": item.conversion_factor,
"sourced_by_supplier": item.sourced_by_supplier,
"do_not_explode": item.do_not_explode,
}
)
for r in ret:
if not item.get(r):
item.set(r, ret[r])
@@ -321,6 +330,9 @@ class BOM(WebsiteGenerator):
"sourced_by_supplier": args.get("sourced_by_supplier", 0),
}
if args.get("do_not_explode"):
ret_item["bom_no"] = ""
return ret_item
def validate_bom_currency(self, item):
@@ -545,35 +557,27 @@ class BOM(WebsiteGenerator):
"""Check whether recursion occurs in any bom"""
def _throw_error(bom_name):
frappe.throw(_("BOM recursion: {0} cannot be parent or child of {0}").format(bom_name))
frappe.throw(
_("BOM recursion: {1} cannot be parent or child of {0}").format(self.name, bom_name),
exc=BOMRecursionError,
)
bom_list = self.traverse_tree()
child_items = (
frappe.get_all(
"BOM Item",
fields=["bom_no", "item_code"],
filters={"parent": ("in", bom_list), "parenttype": "BOM"},
)
or []
child_items = frappe.get_all(
"BOM Item",
fields=["bom_no", "item_code"],
filters={"parent": ("in", bom_list), "parenttype": "BOM"},
)
child_bom = {d.bom_no for d in child_items}
child_items_codes = {d.item_code for d in child_items}
for item in child_items:
if self.name == item.bom_no:
_throw_error(self.name)
if self.item == item.item_code and item.bom_no:
# Same item but with different BOM should not be allowed.
# Same item can appear recursively once as long as it doesn't have BOM.
_throw_error(item.bom_no)
if self.name in child_bom:
_throw_error(self.name)
if self.item in child_items_codes:
_throw_error(self.item)
bom_nos = (
frappe.get_all(
"BOM Item", fields=["parent"], filters={"bom_no": self.name, "parenttype": "BOM"}
)
or []
)
if self.name in {d.parent for d in bom_nos}:
if self.name in {d.bom_no for d in self.items}:
_throw_error(self.name)
def traverse_tree(self, bom_list=None):

View File

@@ -10,7 +10,7 @@ from frappe.tests.utils import FrappeTestCase
from frappe.utils import cstr, flt
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
from erpnext.manufacturing.doctype.bom.bom import item_query
from erpnext.manufacturing.doctype.bom.bom import BOMRecursionError, item_query
from erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool import update_cost
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import (
@@ -259,43 +259,36 @@ class TestBOM(FrappeTestCase):
def test_bom_recursion_1st_level(self):
"""BOM should not allow BOM item again in child"""
item_code = "_Test BOM Recursion"
make_item(item_code, {"is_stock_item": 1})
item_code = make_item(properties={"is_stock_item": 1}).name
bom = frappe.new_doc("BOM")
bom.item = item_code
bom.append("items", frappe._dict(item_code=item_code))
with self.assertRaises(frappe.ValidationError) as err:
bom.save()
with self.assertRaises(BOMRecursionError):
bom.items[0].bom_no = bom.name
bom.save()
self.assertTrue("recursion" in str(err.exception).lower())
frappe.delete_doc("BOM", bom.name, ignore_missing=True)
def test_bom_recursion_transitive(self):
item1 = "_Test BOM Recursion"
item2 = "_Test BOM Recursion 2"
make_item(item1, {"is_stock_item": 1})
make_item(item2, {"is_stock_item": 1})
item1 = make_item(properties={"is_stock_item": 1}).name
item2 = make_item(properties={"is_stock_item": 1}).name
bom1 = frappe.new_doc("BOM")
bom1.item = item1
bom1.append("items", frappe._dict(item_code=item2))
bom1.save()
bom1.submit()
bom2 = frappe.new_doc("BOM")
bom2.item = item2
bom2.append("items", frappe._dict(item_code=item1))
bom2.save()
with self.assertRaises(frappe.ValidationError) as err:
bom2.items[0].bom_no = bom1.name
bom1.items[0].bom_no = bom2.name
with self.assertRaises(BOMRecursionError):
bom1.save()
bom2.save()
bom2.submit()
self.assertTrue("recursion" in str(err.exception).lower())
bom1.cancel()
frappe.delete_doc("BOM", bom1.name, ignore_missing=True, force=True)
frappe.delete_doc("BOM", bom2.name, ignore_missing=True, force=True)
def test_bom_with_process_loss_item(self):
fg_item_non_whole, fg_item_whole, bom_item = create_process_loss_bom_items()
@@ -501,6 +494,24 @@ class TestBOM(FrappeTestCase):
bom.submit()
self.assertEqual(bom.items[0].rate, 42)
def test_exclude_exploded_items_from_bom(self):
bom_no = get_default_bom()
new_bom = frappe.copy_doc(frappe.get_doc("BOM", bom_no))
for row in new_bom.items:
if row.item_code == "_Test Item Home Desktop Manufactured":
self.assertTrue(row.bom_no)
row.do_not_explode = True
new_bom.docstatus = 0
new_bom.save()
new_bom.load_from_db()
for row in new_bom.items:
if row.item_code == "_Test Item Home Desktop Manufactured" and row.do_not_explode:
self.assertFalse(row.bom_no)
new_bom.delete()
def get_default_bom(item_code="_Test FG Item 2"):
return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1})

View File

@@ -10,6 +10,7 @@
"item_name",
"operation",
"column_break_3",
"do_not_explode",
"bom_no",
"source_warehouse",
"allow_alternative_item",
@@ -73,6 +74,7 @@
"fieldtype": "Column Break"
},
{
"depends_on": "eval:!doc.do_not_explode",
"fieldname": "bom_no",
"fieldtype": "Link",
"in_filter": 1,
@@ -284,18 +286,25 @@
"fieldname": "sourced_by_supplier",
"fieldtype": "Check",
"label": "Sourced by Supplier"
},
{
"default": "0",
"fieldname": "do_not_explode",
"fieldtype": "Check",
"label": "Do Not Explode"
}
],
"idx": 1,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-10-08 14:19:37.563300",
"modified": "2022-01-24 16:57:57.020232",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Item",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
"sort_order": "DESC",
"states": []
}

View File

@@ -34,8 +34,7 @@ def get_data(filters):
if filters.get(field):
query_filters[field] = ("in", filters.get(field))
query_filters["report_date"] = (">=", filters.get("from_date"))
query_filters["report_date"] = ("<=", filters.get("to_date"))
query_filters["report_date"] = ["between", [filters.get("from_date"), filters.get("to_date")]]
return frappe.get_all(
"Quality Inspection", fields=fields, filters=query_filters, order_by="report_date asc"

View File

@@ -33,7 +33,9 @@ class EmployeeTaxExemptionDeclaration(Document):
self.total_declared_amount += flt(d.amount)
def set_total_exemption_amount(self):
self.total_exemption_amount = get_total_exemption_amount(self.declarations)
self.total_exemption_amount = flt(
get_total_exemption_amount(self.declarations), self.precision("total_exemption_amount")
)
def calculate_hra_exemption(self):
self.salary_structure_hra, self.annual_hra_exemption, self.monthly_hra_exemption = 0, 0, 0
@@ -41,9 +43,18 @@ class EmployeeTaxExemptionDeclaration(Document):
hra_exemption = calculate_annual_eligible_hra_exemption(self)
if hra_exemption:
self.total_exemption_amount += hra_exemption["annual_exemption"]
self.salary_structure_hra = hra_exemption["hra_amount"]
self.annual_hra_exemption = hra_exemption["annual_exemption"]
self.monthly_hra_exemption = hra_exemption["monthly_exemption"]
self.total_exemption_amount = flt(
self.total_exemption_amount, self.precision("total_exemption_amount")
)
self.salary_structure_hra = flt(
hra_exemption["hra_amount"], self.precision("salary_structure_hra")
)
self.annual_hra_exemption = flt(
hra_exemption["annual_exemption"], self.precision("annual_hra_exemption")
)
self.monthly_hra_exemption = flt(
hra_exemption["monthly_exemption"], self.precision("monthly_hra_exemption")
)
@frappe.whitelist()

View File

@@ -4,25 +4,28 @@
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import add_months, getdate
import erpnext
from erpnext.hr.doctype.employee.test_employee import make_employee
from erpnext.hr.utils import DuplicateDeclarationError
class TestEmployeeTaxExemptionDeclaration(unittest.TestCase):
class TestEmployeeTaxExemptionDeclaration(FrappeTestCase):
def setUp(self):
make_employee("employee@taxexepmtion.com")
make_employee("employee1@taxexepmtion.com")
create_payroll_period()
make_employee("employee@taxexemption.com", company="_Test Company")
make_employee("employee1@taxexemption.com", company="_Test Company")
create_payroll_period(company="_Test Company")
create_exemption_category()
frappe.db.sql("""delete from `tabEmployee Tax Exemption Declaration`""")
frappe.db.delete("Employee Tax Exemption Declaration")
frappe.db.delete("Salary Structure Assignment")
def test_duplicate_category_in_declaration(self):
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexepmtion.com"}, "name"),
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name"),
"company": erpnext.get_default_company(),
"payroll_period": "_Test Payroll Period",
"currency": erpnext.get_default_currency(),
@@ -46,7 +49,7 @@ class TestEmployeeTaxExemptionDeclaration(unittest.TestCase):
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexepmtion.com"}, "name"),
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name"),
"company": erpnext.get_default_company(),
"payroll_period": "_Test Payroll Period",
"currency": erpnext.get_default_currency(),
@@ -68,7 +71,7 @@ class TestEmployeeTaxExemptionDeclaration(unittest.TestCase):
duplicate_declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexepmtion.com"}, "name"),
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name"),
"company": erpnext.get_default_company(),
"payroll_period": "_Test Payroll Period",
"currency": erpnext.get_default_currency(),
@@ -83,7 +86,7 @@ class TestEmployeeTaxExemptionDeclaration(unittest.TestCase):
)
self.assertRaises(DuplicateDeclarationError, duplicate_declaration.insert)
duplicate_declaration.employee = frappe.get_value(
"Employee", {"user_id": "employee1@taxexepmtion.com"}, "name"
"Employee", {"user_id": "employee1@taxexemption.com"}, "name"
)
self.assertTrue(duplicate_declaration.insert)
@@ -91,7 +94,7 @@ class TestEmployeeTaxExemptionDeclaration(unittest.TestCase):
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexepmtion.com"}, "name"),
"employee": frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name"),
"company": erpnext.get_default_company(),
"payroll_period": "_Test Payroll Period",
"currency": erpnext.get_default_currency(),
@@ -112,6 +115,298 @@ class TestEmployeeTaxExemptionDeclaration(unittest.TestCase):
self.assertEqual(declaration.total_exemption_amount, 100000)
def test_india_hra_exemption(self):
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
setup_hra_exemption_prerequisites("Monthly")
employee = frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name")
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": employee,
"company": "_Test Company",
"payroll_period": "_Test Payroll Period",
"currency": "INR",
"monthly_house_rent": 50000,
"rented_in_metro_city": 1,
"declarations": [
dict(
exemption_sub_category="_Test Sub Category",
exemption_category="_Test Category",
amount=80000,
),
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
amount=60000,
),
],
}
).insert()
# Monthly HRA received = 3000
# should set HRA exemption as per actual annual HRA because that's the minimum
self.assertEqual(declaration.monthly_hra_exemption, 3000)
self.assertEqual(declaration.annual_hra_exemption, 36000)
# 100000 Standard Exemption + 36000 HRA exemption
self.assertEqual(declaration.total_exemption_amount, 136000)
# reset
frappe.flags.country = current_country
def test_india_hra_exemption_with_daily_payroll_frequency(self):
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
setup_hra_exemption_prerequisites("Daily")
employee = frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name")
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": employee,
"company": "_Test Company",
"payroll_period": "_Test Payroll Period",
"currency": "INR",
"monthly_house_rent": 170000,
"rented_in_metro_city": 1,
"declarations": [
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
amount=60000,
),
],
}
).insert()
# Daily HRA received = 3000
# should set HRA exemption as per (rent - 10% of Basic Salary), that's the minimum
self.assertEqual(declaration.monthly_hra_exemption, 17916.67)
self.assertEqual(declaration.annual_hra_exemption, 215000)
# 50000 Standard Exemption + 215000 HRA exemption
self.assertEqual(declaration.total_exemption_amount, 265000)
# reset
frappe.flags.country = current_country
def test_india_hra_exemption_with_weekly_payroll_frequency(self):
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
setup_hra_exemption_prerequisites("Weekly")
employee = frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name")
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": employee,
"company": "_Test Company",
"payroll_period": "_Test Payroll Period",
"currency": "INR",
"monthly_house_rent": 170000,
"rented_in_metro_city": 1,
"declarations": [
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
amount=60000,
),
],
}
).insert()
# Weekly HRA received = 3000
# should set HRA exemption as per actual annual HRA because that's the minimum
self.assertEqual(declaration.monthly_hra_exemption, 13000)
self.assertEqual(declaration.annual_hra_exemption, 156000)
# 50000 Standard Exemption + 156000 HRA exemption
self.assertEqual(declaration.total_exemption_amount, 206000)
# reset
frappe.flags.country = current_country
def test_india_hra_exemption_with_fortnightly_payroll_frequency(self):
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
setup_hra_exemption_prerequisites("Fortnightly")
employee = frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name")
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": employee,
"company": "_Test Company",
"payroll_period": "_Test Payroll Period",
"currency": "INR",
"monthly_house_rent": 170000,
"rented_in_metro_city": 1,
"declarations": [
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
amount=60000,
),
],
}
).insert()
# Fortnightly HRA received = 3000
# should set HRA exemption as per actual annual HRA because that's the minimum
self.assertEqual(declaration.monthly_hra_exemption, 6500)
self.assertEqual(declaration.annual_hra_exemption, 78000)
# 50000 Standard Exemption + 78000 HRA exemption
self.assertEqual(declaration.total_exemption_amount, 128000)
# reset
frappe.flags.country = current_country
def test_india_hra_exemption_with_bimonthly_payroll_frequency(self):
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
setup_hra_exemption_prerequisites("Bimonthly")
employee = frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name")
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": employee,
"company": "_Test Company",
"payroll_period": "_Test Payroll Period",
"currency": "INR",
"monthly_house_rent": 50000,
"rented_in_metro_city": 1,
"declarations": [
dict(
exemption_sub_category="_Test Sub Category",
exemption_category="_Test Category",
amount=80000,
),
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
amount=60000,
),
],
}
).insert()
# Bimonthly HRA received = 3000
# should set HRA exemption as per actual annual HRA because that's the minimum
self.assertEqual(declaration.monthly_hra_exemption, 1500)
self.assertEqual(declaration.annual_hra_exemption, 18000)
# 100000 Standard Exemption + 18000 HRA exemption
self.assertEqual(declaration.total_exemption_amount, 118000)
# reset
frappe.flags.country = current_country
def test_india_hra_exemption_with_multiple_salary_structure_assignments(self):
from erpnext.payroll.doctype.salary_slip.test_salary_slip import create_tax_slab
from erpnext.payroll.doctype.salary_structure.test_salary_structure import (
create_salary_structure_assignment,
make_salary_structure,
)
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
employee = make_employee("employee@taxexemption2.com", company="_Test Company")
payroll_period = create_payroll_period(name="_Test Payroll Period", company="_Test Company")
create_tax_slab(
payroll_period,
allow_tax_exemption=True,
currency="INR",
effective_date=getdate("2019-04-01"),
company="_Test Company",
)
frappe.db.set_value(
"Company", "_Test Company", {"basic_component": "Basic Salary", "hra_component": "HRA"}
)
# salary structure with base 50000, HRA 3000
make_salary_structure(
"Monthly Structure for HRA Exemption 1",
"Monthly",
employee=employee,
company="_Test Company",
currency="INR",
payroll_period=payroll_period.name,
from_date=payroll_period.start_date,
)
# salary structure with base 70000, HRA = base * 0.2 = 14000
salary_structure = make_salary_structure(
"Monthly Structure for HRA Exemption 2",
"Monthly",
employee=employee,
company="_Test Company",
currency="INR",
payroll_period=payroll_period.name,
from_date=payroll_period.start_date,
dont_submit=True,
)
for component_row in salary_structure.earnings:
if component_row.salary_component == "HRA":
component_row.amount = 0
component_row.amount_based_on_formula = 1
component_row.formula = "base * 0.2"
break
salary_structure.submit()
create_salary_structure_assignment(
employee,
salary_structure.name,
from_date=add_months(payroll_period.start_date, 6),
company="_Test Company",
currency="INR",
payroll_period=payroll_period.name,
base=70000,
allow_duplicate=True,
)
declaration = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Declaration",
"employee": employee,
"company": "_Test Company",
"payroll_period": payroll_period.name,
"currency": "INR",
"monthly_house_rent": 50000,
"rented_in_metro_city": 1,
"declarations": [
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
amount=60000,
),
],
}
).insert()
# Monthly HRA received = 50000 * 6 months + 70000 * 6 months
# should set HRA exemption as per actual annual HRA because that's the minimum
self.assertEqual(declaration.monthly_hra_exemption, 8500)
self.assertEqual(declaration.annual_hra_exemption, 102000)
# 50000 Standard Exemption + 102000 HRA exemption
self.assertEqual(declaration.total_exemption_amount, 152000)
# reset
frappe.flags.country = current_country
def create_payroll_period(**args):
args = frappe._dict(args)
@@ -163,3 +458,33 @@ def create_exemption_category():
"is_active": 1,
}
).insert()
def setup_hra_exemption_prerequisites(frequency, employee=None):
from erpnext.payroll.doctype.salary_slip.test_salary_slip import create_tax_slab
from erpnext.payroll.doctype.salary_structure.test_salary_structure import make_salary_structure
payroll_period = create_payroll_period(name="_Test Payroll Period", company="_Test Company")
if not employee:
employee = frappe.get_value("Employee", {"user_id": "employee@taxexemption.com"}, "name")
create_tax_slab(
payroll_period,
allow_tax_exemption=True,
currency="INR",
effective_date=getdate("2019-04-01"),
company="_Test Company",
)
make_salary_structure(
f"{frequency} Structure for HRA Exemption",
frequency,
employee=employee,
company="_Test Company",
currency="INR",
payroll_period=payroll_period,
)
frappe.db.set_value(
"Company", "_Test Company", {"basic_component": "Basic Salary", "hra_component": "HRA"}
)

View File

@@ -31,7 +31,9 @@ class EmployeeTaxExemptionProofSubmission(Document):
self.total_actual_amount += flt(d.amount)
def set_total_exemption_amount(self):
self.exemption_amount = get_total_exemption_amount(self.tax_exemption_proofs)
self.exemption_amount = flt(
get_total_exemption_amount(self.tax_exemption_proofs), self.precision("exemption_amount")
)
def calculate_hra_exemption(self):
self.monthly_hra_exemption, self.monthly_house_rent, self.total_eligible_hra_exemption = 0, 0, 0
@@ -39,6 +41,13 @@ class EmployeeTaxExemptionProofSubmission(Document):
hra_exemption = calculate_hra_exemption_for_period(self)
if hra_exemption:
self.exemption_amount += hra_exemption["total_eligible_hra_exemption"]
self.monthly_hra_exemption = hra_exemption["monthly_exemption"]
self.monthly_house_rent = hra_exemption["monthly_house_rent"]
self.total_eligible_hra_exemption = hra_exemption["total_eligible_hra_exemption"]
self.exemption_amount = flt(self.exemption_amount, self.precision("exemption_amount"))
self.monthly_hra_exemption = flt(
hra_exemption["monthly_exemption"], self.precision("monthly_hra_exemption")
)
self.monthly_house_rent = flt(
hra_exemption["monthly_house_rent"], self.precision("monthly_house_rent")
)
self.total_eligible_hra_exemption = flt(
hra_exemption["total_eligible_hra_exemption"], self.precision("total_eligible_hra_exemption")
)

View File

@@ -4,22 +4,26 @@
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase
from erpnext.hr.doctype.employee.test_employee import make_employee
from erpnext.payroll.doctype.employee_tax_exemption_declaration.test_employee_tax_exemption_declaration import (
create_exemption_category,
create_payroll_period,
setup_hra_exemption_prerequisites,
)
class TestEmployeeTaxExemptionProofSubmission(unittest.TestCase):
def setup(self):
make_employee("employee@proofsubmission.com")
create_payroll_period()
class TestEmployeeTaxExemptionProofSubmission(FrappeTestCase):
def setUp(self):
make_employee("employee@proofsubmission.com", company="_Test Company")
create_payroll_period(company="_Test Company")
create_exemption_category()
frappe.db.sql("""delete from `tabEmployee Tax Exemption Proof Submission`""")
frappe.db.delete("Employee Tax Exemption Proof Submission")
frappe.db.delete("Salary Structure Assignment")
def test_exemption_amount_lesser_than_category_max(self):
declaration = frappe.get_doc(
proof = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Proof Submission",
"employee": frappe.get_value("Employee", {"user_id": "employee@proofsubmission.com"}, "name"),
@@ -34,8 +38,8 @@ class TestEmployeeTaxExemptionProofSubmission(unittest.TestCase):
],
}
)
self.assertRaises(frappe.ValidationError, declaration.save)
declaration = frappe.get_doc(
self.assertRaises(frappe.ValidationError, proof.save)
proof = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Proof Submission",
"payroll_period": "Test Payroll Period",
@@ -50,11 +54,11 @@ class TestEmployeeTaxExemptionProofSubmission(unittest.TestCase):
],
}
)
self.assertTrue(declaration.save)
self.assertTrue(declaration.submit)
self.assertTrue(proof.save)
self.assertTrue(proof.submit)
def test_duplicate_category_in_proof_submission(self):
declaration = frappe.get_doc(
proof = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Proof Submission",
"employee": frappe.get_value("Employee", {"user_id": "employee@proofsubmission.com"}, "name"),
@@ -74,4 +78,59 @@ class TestEmployeeTaxExemptionProofSubmission(unittest.TestCase):
],
}
)
self.assertRaises(frappe.ValidationError, declaration.save)
self.assertRaises(frappe.ValidationError, proof.save)
def test_india_hra_exemption(self):
# set country
current_country = frappe.flags.country
frappe.flags.country = "India"
employee = frappe.get_value("Employee", {"user_id": "employee@proofsubmission.com"}, "name")
setup_hra_exemption_prerequisites("Monthly", employee)
payroll_period = frappe.db.get_value(
"Payroll Period", "_Test Payroll Period", ["start_date", "end_date"], as_dict=True
)
proof = frappe.get_doc(
{
"doctype": "Employee Tax Exemption Proof Submission",
"employee": employee,
"company": "_Test Company",
"payroll_period": "_Test Payroll Period",
"currency": "INR",
"house_rent_payment_amount": 600000,
"rented_in_metro_city": 1,
"rented_from_date": payroll_period.start_date,
"rented_to_date": payroll_period.end_date,
"tax_exemption_proofs": [
dict(
exemption_sub_category="_Test Sub Category",
exemption_category="_Test Category",
type_of_proof="Test Proof",
amount=100000,
),
dict(
exemption_sub_category="_Test1 Sub Category",
exemption_category="_Test Category",
type_of_proof="Test Proof",
amount=50000,
),
],
}
).insert()
self.assertEqual(proof.monthly_house_rent, 50000)
# Monthly HRA received = 3000
# should set HRA exemption as per actual annual HRA because that's the minimum
self.assertEqual(proof.monthly_hra_exemption, 3000)
self.assertEqual(proof.total_eligible_hra_exemption, 36000)
# total exemptions + house rent payment amount
self.assertEqual(proof.total_actual_amount, 750000)
# 100000 Standard Exemption + 36000 HRA exemption
self.assertEqual(proof.exemption_amount, 136000)
# reset
frappe.flags.country = current_country

View File

@@ -90,9 +90,8 @@
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"options": "Draft\nUnpaid\nPaid",
"read_only": 1,
"reqd": 1
"options": "Draft\nUnpaid\nPaid\nSubmitted\nCancelled",
"read_only": 1
},
{
"depends_on": "eval: doc.pay_via_salary_slip == 0",
@@ -196,7 +195,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2020-11-02 18:21:11.971488",
"modified": "2022-05-27 13:56:14.349183",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Gratuity",

View File

@@ -0,0 +1,12 @@
frappe.listview_settings["Gratuity"] = {
get_indicator: function(doc) {
let status_color = {
"Draft": "red",
"Submitted": "blue",
"Cancelled": "red",
"Paid": "green",
"Unpaid": "orange",
};
return [__(doc.status), status_color[doc.status], "status,=,"+doc.status];
}
};

View File

@@ -4,58 +4,68 @@
import unittest
import frappe
from frappe.utils import add_days, flt, get_datetime, getdate
from frappe.tests.utils import FrappeTestCase
from frappe.utils import add_days, add_months, floor, flt, get_datetime, get_first_day, getdate
from erpnext.hr.doctype.employee.test_employee import make_employee
from erpnext.hr.doctype.expense_claim.test_expense_claim import get_payable_account
from erpnext.hr.doctype.holiday_list.test_holiday_list import set_holiday_list
from erpnext.payroll.doctype.gratuity.gratuity import get_last_salary_slip
from erpnext.payroll.doctype.salary_slip.test_salary_slip import (
make_deduction_salary_component,
make_earning_salary_component,
make_employee_salary_slip,
make_holiday_list,
)
from erpnext.payroll.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.regional.united_arab_emirates.setup import create_gratuity_rule
test_dependencies = ["Salary Component", "Salary Slip", "Account"]
class TestGratuity(unittest.TestCase):
@classmethod
def setUpClass(cls):
class TestGratuity(FrappeTestCase):
def setUp(self):
frappe.db.delete("Gratuity")
frappe.db.delete("Salary Slip")
frappe.db.delete("Additional Salary", {"ref_doctype": "Gratuity"})
make_earning_salary_component(setup=True, test_tax=True, company_list=["_Test Company"])
make_deduction_salary_component(setup=True, test_tax=True, company_list=["_Test Company"])
make_holiday_list()
def setUp(self):
frappe.db.sql("DELETE FROM `tabGratuity`")
frappe.db.sql("DELETE FROM `tabAdditional Salary` WHERE ref_doctype = 'Gratuity'")
@set_holiday_list("Salary Slip Test Holiday List", "_Test Company")
def test_get_last_salary_slip_should_return_none_for_new_employee(self):
new_employee = make_employee("new_employee@salary.com", company="_Test Company")
salary_slip = get_last_salary_slip(new_employee)
assert salary_slip is None
self.assertIsNone(salary_slip)
def test_check_gratuity_amount_based_on_current_slab_and_additional_salary_creation(self):
employee, sal_slip = create_employee_and_get_last_salary_slip()
@set_holiday_list("Salary Slip Test Holiday List", "_Test Company")
def test_gratuity_based_on_current_slab_via_additional_salary(self):
"""
Range | Fraction
5-0 | 1
"""
doj = add_days(getdate(), -(6 * 365))
relieving_date = getdate()
employee = make_employee(
"test_employee_gratuity@salary.com",
company="_Test Company",
date_of_joining=doj,
relieving_date=relieving_date,
)
sal_slip = create_salary_slip("test_employee_gratuity@salary.com")
rule = get_gratuity_rule("Rule Under Unlimited Contract on termination (UAE)")
gratuity = create_gratuity(pay_via_salary_slip=1, employee=employee, rule=rule.name)
# work experience calculation
date_of_joining, relieving_date = frappe.db.get_value(
"Employee", employee, ["date_of_joining", "relieving_date"]
)
employee_total_workings_days = (
get_datetime(relieving_date) - get_datetime(date_of_joining)
).days
employee_total_workings_days = (get_datetime(relieving_date) - get_datetime(doj)).days
experience = floor(employee_total_workings_days / rule.total_working_days_per_year)
self.assertEqual(gratuity.current_work_experience, experience)
experience = employee_total_workings_days / rule.total_working_days_per_year
gratuity.reload()
from math import floor
self.assertEqual(floor(experience), gratuity.current_work_experience)
# amount Calculation
# amount calculation
component_amount = frappe.get_all(
"Salary Detail",
filters={
@@ -65,20 +75,44 @@ class TestGratuity(unittest.TestCase):
"salary_component": "Basic Salary",
},
fields=["amount"],
limit=1,
)
""" 5 - 0 fraction is 1 """
gratuity_amount = component_amount[0].amount * experience
gratuity.reload()
self.assertEqual(flt(gratuity_amount, 2), flt(gratuity.amount, 2))
# additional salary creation (Pay via salary slip)
self.assertTrue(frappe.db.exists("Additional Salary", {"ref_docname": gratuity.name}))
def test_check_gratuity_amount_based_on_all_previous_slabs(self):
employee, sal_slip = create_employee_and_get_last_salary_slip()
# gratuity should be marked "Paid" on the next salary slip submission
salary_slip = make_salary_slip("Test Gratuity", employee=employee)
salary_slip.posting_date = getdate()
salary_slip.insert()
salary_slip.submit()
gratuity.reload()
self.assertEqual(gratuity.status, "Paid")
@set_holiday_list("Salary Slip Test Holiday List", "_Test Company")
def test_gratuity_based_on_all_previous_slabs_via_payment_entry(self):
"""
Range | Fraction
0-1 | 0
1-5 | 0.7
5-0 | 1
"""
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
doj = add_days(getdate(), -(6 * 365))
relieving_date = getdate()
employee = make_employee(
"test_employee_gratuity@salary.com",
company="_Test Company",
date_of_joining=doj,
relieving_date=relieving_date,
)
sal_slip = create_salary_slip("test_employee_gratuity@salary.com")
rule = get_gratuity_rule("Rule Under Limited Contract (UAE)")
set_mode_of_payment_account()
@@ -87,22 +121,11 @@ class TestGratuity(unittest.TestCase):
)
# work experience calculation
date_of_joining, relieving_date = frappe.db.get_value(
"Employee", employee, ["date_of_joining", "relieving_date"]
)
employee_total_workings_days = (
get_datetime(relieving_date) - get_datetime(date_of_joining)
).days
employee_total_workings_days = (get_datetime(relieving_date) - get_datetime(doj)).days
experience = floor(employee_total_workings_days / rule.total_working_days_per_year)
self.assertEqual(gratuity.current_work_experience, experience)
experience = employee_total_workings_days / rule.total_working_days_per_year
gratuity.reload()
from math import floor
self.assertEqual(floor(experience), gratuity.current_work_experience)
# amount Calculation
# amount calculation
component_amount = frappe.get_all(
"Salary Detail",
filters={
@@ -112,36 +135,22 @@ class TestGratuity(unittest.TestCase):
"salary_component": "Basic Salary",
},
fields=["amount"],
limit=1,
)
""" range | Fraction
0-1 | 0
1-5 | 0.7
5-0 | 1
"""
gratuity_amount = ((0 * 1) + (4 * 0.7) + (1 * 1)) * component_amount[0].amount
gratuity.reload()
self.assertEqual(flt(gratuity_amount, 2), flt(gratuity.amount, 2))
self.assertEqual(gratuity.status, "Unpaid")
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
pe = get_payment_entry("Gratuity", gratuity.name)
pe.reference_no = "123467"
pe.reference_date = getdate()
pe.submit()
pay_entry = get_payment_entry("Gratuity", gratuity.name)
pay_entry.reference_no = "123467"
pay_entry.reference_date = getdate()
pay_entry.save()
pay_entry.submit()
gratuity.reload()
self.assertEqual(gratuity.status, "Paid")
self.assertEqual(flt(gratuity.paid_amount, 2), flt(gratuity.amount, 2))
def tearDown(self):
frappe.db.sql("DELETE FROM `tabGratuity`")
frappe.db.sql("DELETE FROM `tabAdditional Salary` WHERE ref_doctype = 'Gratuity'")
def get_gratuity_rule(name):
rule = frappe.db.exists("Gratuity Rule", name)
@@ -151,7 +160,6 @@ def get_gratuity_rule(name):
rule.applicable_earnings_component = []
rule.append("applicable_earnings_component", {"salary_component": "Basic Salary"})
rule.save()
rule.reload()
return rule
@@ -206,23 +214,17 @@ def create_account():
).insert(ignore_permissions=True)
def create_employee_and_get_last_salary_slip():
employee = make_employee("test_employee@salary.com", company="_Test Company")
frappe.db.set_value("Employee", employee, "relieving_date", getdate())
frappe.db.set_value("Employee", employee, "date_of_joining", add_days(getdate(), -(6 * 365)))
def create_salary_slip(employee):
if not frappe.db.exists("Salary Slip", {"employee": employee}):
salary_slip = make_employee_salary_slip("test_employee@salary.com", "Monthly")
posting_date = get_first_day(add_months(getdate(), -1))
salary_slip = make_employee_salary_slip(
employee, "Monthly", "Test Gratuity", posting_date=posting_date
)
salary_slip.start_date = posting_date
salary_slip.end_date = None
salary_slip.submit()
salary_slip = salary_slip.name
else:
salary_slip = get_last_salary_slip(employee)
if not frappe.db.get_value("Employee", "test_employee@salary.com", "holiday_list"):
from erpnext.payroll.doctype.salary_slip.test_salary_slip import make_holiday_list
make_holiday_list()
frappe.db.set_value(
"Company", "_Test Company", "default_holiday_list", "Salary Slip Test Holiday List"
)
return employee, salary_slip
return salary_slip

View File

@@ -30,6 +30,9 @@ from erpnext.loan_management.doctype.loan_repayment.loan_repayment import (
calculate_amounts,
create_repayment_entry,
)
from erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual import (
process_loan_interest_accrual_for_term_loans,
)
from erpnext.payroll.doctype.additional_salary.additional_salary import get_additional_salaries
from erpnext.payroll.doctype.employee_benefit_application.employee_benefit_application import (
get_benefit_component_amount,
@@ -117,10 +120,10 @@ class SalarySlip(TransactionBase):
self.update_payment_status_for_gratuity()
def update_payment_status_for_gratuity(self):
add_salary = frappe.db.get_all(
additional_salary = frappe.db.get_all(
"Additional Salary",
filters={
"payroll_date": ("BETWEEN", [self.start_date, self.end_date]),
"payroll_date": ("between", [self.start_date, self.end_date]),
"employee": self.employee,
"ref_doctype": "Gratuity",
"docstatus": 1,
@@ -129,10 +132,10 @@ class SalarySlip(TransactionBase):
limit=1,
)
if len(add_salary):
if additional_salary:
status = "Paid" if self.docstatus == 1 else "Unpaid"
if add_salary[0].name in [data.additional_salary for data in self.earnings]:
frappe.db.set_value("Gratuity", add_salary.ref_docname, "status", status)
if additional_salary[0].name in [entry.additional_salary for entry in self.earnings]:
frappe.db.set_value("Gratuity", additional_salary[0].ref_docname, "status", status)
def on_cancel(self):
self.set_status()
@@ -1405,9 +1408,9 @@ class SalarySlip(TransactionBase):
self.total_loan_repayment += payment.total_payment
def get_loan_details(self):
return frappe.get_all(
loan_details = frappe.get_all(
"Loan",
fields=["name", "interest_income_account", "loan_account", "loan_type"],
fields=["name", "interest_income_account", "loan_account", "loan_type", "is_term_loan"],
filters={
"applicant": self.employee,
"docstatus": 1,
@@ -1416,6 +1419,15 @@ class SalarySlip(TransactionBase):
},
)
if loan_details:
for loan in loan_details:
if loan.is_term_loan:
process_loan_interest_accrual_for_term_loans(
posting_date=self.posting_date, loan_type=loan.loan_type, loan=loan.name
)
return loan_details
def make_loan_repayment_entry(self):
payroll_payable_account = get_payroll_payable_account(self.company, self.payroll_entry)
for loan in self.loans:

View File

@@ -999,7 +999,7 @@ class TestSalarySlip(unittest.TestCase):
return [no_of_days_in_month[1], no_of_holidays_in_month]
def make_employee_salary_slip(user, payroll_frequency, salary_structure=None):
def make_employee_salary_slip(user, payroll_frequency, salary_structure=None, posting_date=None):
from erpnext.payroll.doctype.salary_structure.test_salary_structure import make_salary_structure
if not salary_structure:
@@ -1010,7 +1010,11 @@ def make_employee_salary_slip(user, payroll_frequency, salary_structure=None):
)
salary_structure_doc = make_salary_structure(
salary_structure, payroll_frequency, employee=employee.name, company=employee.company
salary_structure,
payroll_frequency,
employee=employee.name,
company=employee.company,
from_date=posting_date,
)
salary_slip_name = frappe.db.get_value(
"Salary Slip", {"employee": frappe.db.get_value("Employee", {"user_id": user})}
@@ -1020,7 +1024,7 @@ def make_employee_salary_slip(user, payroll_frequency, salary_structure=None):
salary_slip = make_salary_slip(salary_structure_doc.name, employee=employee.name)
salary_slip.employee_name = employee.employee_name
salary_slip.payroll_frequency = payroll_frequency
salary_slip.posting_date = nowdate()
salary_slip.posting_date = posting_date or nowdate()
salary_slip.insert()
else:
salary_slip = frappe.get_doc("Salary Slip", salary_slip_name)

View File

@@ -253,6 +253,7 @@ def make_salary_slip(
source_name,
target_doc=None,
employee=None,
posting_date=None,
as_print=False,
print_format=None,
for_preview=0,
@@ -277,6 +278,9 @@ def make_salary_slip(
"Department", target.department, "payroll_cost_center"
)
if posting_date:
target.posting_date = posting_date
target.run_method("process_salary_structure", for_preview=for_preview)
doc = get_mapped_doc(

View File

@@ -208,9 +208,12 @@ def create_salary_structure_assignment(
company=None,
currency=erpnext.get_default_currency(),
payroll_period=None,
base=None,
allow_duplicate=False,
):
if frappe.db.exists("Salary Structure Assignment", {"employee": employee}):
if not allow_duplicate and frappe.db.exists(
"Salary Structure Assignment", {"employee": employee}
):
frappe.db.sql("""delete from `tabSalary Structure Assignment` where employee=%s""", (employee))
if not payroll_period:
@@ -223,7 +226,7 @@ def create_salary_structure_assignment(
salary_structure_assignment = frappe.new_doc("Salary Structure Assignment")
salary_structure_assignment.employee = employee
salary_structure_assignment.base = 50000
salary_structure_assignment.base = base or 50000
salary_structure_assignment.variable = 5000
if not from_date:

View File

@@ -11,7 +11,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
if (!invoice_eligible) return;
const { doctype, irn, irn_cancelled, ewaybill, eway_bill_cancelled, name, __unsaved } = frm.doc;
const { doctype, irn, irn_cancelled, ewaybill, eway_bill_cancelled, name, qrcode_image, __unsaved } = frm.doc;
const add_custom_button = (label, action) => {
if (!frm.custom_buttons[label]) {
@@ -175,27 +175,44 @@ erpnext.setup_einvoice_actions = (doctype) => {
}
if (irn && !irn_cancelled) {
const action = () => {
const dialog = frappe.msgprint({
title: __("Generate QRCode"),
message: __("Generate and attach QR Code using IRN?"),
primary_action: {
action: function() {
frappe.call({
method: 'erpnext.regional.india.e_invoice.utils.generate_qrcode',
args: { doctype, docname: name },
freeze: true,
callback: () => frm.reload_doc() || dialog.hide(),
error: () => dialog.hide()
});
let is_qrcode_attached = false;
if (qrcode_image && frm.attachments) {
let attachments = frm.attachments.get_attachments();
if (attachments.length != 0) {
for (let i = 0; i < attachments.length; i++) {
if (attachments[i].file_url == qrcode_image) {
is_qrcode_attached = true;
break;
}
},
}
}
}
if (!is_qrcode_attached) {
const action = () => {
if (frm.doc.__unsaved) {
frappe.throw(__('Please save the document to generate QRCode.'));
}
const dialog = frappe.msgprint({
title: __("Generate QRCode"),
message: __("Generate and attach QR Code using IRN?"),
primary_action: {
action: function() {
frappe.call({
method: 'erpnext.regional.india.e_invoice.utils.generate_qrcode',
args: { doctype, docname: name },
freeze: true,
callback: () => frm.reload_doc() || dialog.hide(),
error: () => dialog.hide()
});
}
},
primary_action_label: __('Yes')
});
dialog.show();
};
add_custom_button(__("Generate QRCode"), action);
}
}
}
});
};

View File

@@ -1009,13 +1009,32 @@ class GSPConnector:
return failed
def fetch_and_attach_qrcode_from_irn(self):
qrcode = self.get_qrcode_from_irn(self.invoice.irn)
if qrcode:
qrcode_file = self.create_qr_code_file(qrcode)
frappe.db.set_value("Sales Invoice", self.invoice.name, "qrcode_image", qrcode_file.file_url)
frappe.msgprint(_("QR Code attached to the invoice"), alert=True)
is_qrcode_file_attached = self.invoice.qrcode_image and frappe.db.exists(
"File",
{
"attached_to_doctype": "Sales Invoice",
"attached_to_name": self.invoice.name,
"file_url": self.invoice.qrcode_image,
"attached_to_field": "qrcode_image",
},
)
if not is_qrcode_file_attached:
if self.invoice.signed_qr_code:
self.attach_qrcode_image()
frappe.db.set_value(
"Sales Invoice", self.invoice.name, "qrcode_image", self.invoice.qrcode_image
)
frappe.msgprint(_("QR Code attached to the invoice."), alert=True)
else:
qrcode = self.get_qrcode_from_irn(self.invoice.irn)
if qrcode:
qrcode_file = self.create_qr_code_file(qrcode)
frappe.db.set_value("Sales Invoice", self.invoice.name, "qrcode_image", qrcode_file.file_url)
frappe.msgprint(_("QR Code attached to the invoice."), alert=True)
else:
frappe.msgprint(_("QR Code not found for the IRN"), alert=True)
else:
frappe.msgprint(_("QR Code not found for the IRN"), alert=True)
frappe.msgprint(_("QR Code is already Attached"), indicator="green", alert=True)
def get_qrcode_from_irn(self, irn):
import requests
@@ -1280,7 +1299,6 @@ class GSPConnector:
def attach_qrcode_image(self):
qrcode = self.invoice.signed_qr_code
qr_image = io.BytesIO()
url = qrcreate(qrcode, error="L")
url.png(qr_image, scale=2, quiet_zone=1)

View File

@@ -1,15 +1,25 @@
import json
import math
import re
import frappe
from frappe import _
from frappe.model.utils import get_fetch_values
from frappe.utils import cint, cstr, date_diff, flt, getdate, nowdate
from frappe.utils import (
add_days,
cint,
cstr,
date_diff,
flt,
get_link_to_form,
getdate,
month_diff,
)
from six import string_types
from erpnext.controllers.accounts_controller import get_taxes_and_charges
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
from erpnext.hr.utils import get_salary_assignment
from erpnext.hr.utils import get_salary_assignments
from erpnext.payroll.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.regional.india import number_state_mapping, state_numbers, states
@@ -360,45 +370,57 @@ def calculate_annual_eligible_hra_exemption(doc):
basic_component, hra_component = frappe.db.get_value(
"Company", doc.company, ["basic_component", "hra_component"]
)
if not (basic_component and hra_component):
frappe.throw(_("Please mention Basic and HRA component in Company"))
annual_exemption, monthly_exemption, hra_amount = 0, 0, 0
frappe.throw(
_("Please set Basic and HRA component in Company {0}").format(
get_link_to_form("Company", doc.company)
)
)
annual_exemption = monthly_exemption = hra_amount = basic_amount = 0
if hra_component and basic_component:
assignment = get_salary_assignment(doc.employee, nowdate())
if assignment:
hra_component_exists = frappe.db.exists(
"Salary Detail",
{
"parent": assignment.salary_structure,
"salary_component": hra_component,
"parentfield": "earnings",
"parenttype": "Salary Structure",
},
)
assignments = get_salary_assignments(doc.employee, doc.payroll_period)
if hra_component_exists:
basic_amount, hra_amount = get_component_amt_from_salary_slip(
doc.employee, assignment.salary_structure, basic_component, hra_component
)
if hra_amount:
if doc.monthly_house_rent:
annual_exemption = calculate_hra_exemption(
assignment.salary_structure,
basic_amount,
hra_amount,
doc.monthly_house_rent,
doc.rented_in_metro_city,
)
if annual_exemption > 0:
monthly_exemption = annual_exemption / 12
else:
annual_exemption = 0
elif doc.docstatus == 1:
if not assignments and doc.docstatus == 1:
frappe.throw(
_("Salary Structure must be submitted before submission of Tax Ememption Declaration")
_("Salary Structure must be submitted before submission of {0}").format(doc.doctype)
)
assignment_dates = [assignment.from_date for assignment in assignments]
for idx, assignment in enumerate(assignments):
if has_hra_component(assignment.salary_structure, hra_component):
basic_salary_amt, hra_salary_amt = get_component_amt_from_salary_slip(
doc.employee,
assignment.salary_structure,
basic_component,
hra_component,
assignment.from_date,
)
to_date = get_end_date_for_assignment(assignment_dates, idx, doc.payroll_period)
frequency = frappe.get_value(
"Salary Structure", assignment.salary_structure, "payroll_frequency"
)
basic_amount += get_component_pay(frequency, basic_salary_amt, assignment.from_date, to_date)
hra_amount += get_component_pay(frequency, hra_salary_amt, assignment.from_date, to_date)
if hra_amount:
if doc.monthly_house_rent:
annual_exemption = calculate_hra_exemption(
assignment.salary_structure,
basic_amount,
hra_amount,
doc.monthly_house_rent,
doc.rented_in_metro_city,
)
if annual_exemption > 0:
monthly_exemption = annual_exemption / 12
else:
annual_exemption = 0
return frappe._dict(
{
"hra_amount": hra_amount,
@@ -408,10 +430,44 @@ def calculate_annual_eligible_hra_exemption(doc):
)
def get_component_amt_from_salary_slip(employee, salary_structure, basic_component, hra_component):
salary_slip = make_salary_slip(
salary_structure, employee=employee, for_preview=1, ignore_permissions=True
def has_hra_component(salary_structure, hra_component):
return frappe.db.exists(
"Salary Detail",
{
"parent": salary_structure,
"salary_component": hra_component,
"parentfield": "earnings",
"parenttype": "Salary Structure",
},
)
def get_end_date_for_assignment(assignment_dates, idx, payroll_period):
end_date = None
try:
end_date = assignment_dates[idx + 1]
end_date = add_days(end_date, -1)
except IndexError:
pass
if not end_date:
end_date = frappe.db.get_value("Payroll Period", payroll_period, "end_date")
return end_date
def get_component_amt_from_salary_slip(
employee, salary_structure, basic_component, hra_component, from_date
):
salary_slip = make_salary_slip(
salary_structure,
employee=employee,
for_preview=1,
ignore_permissions=True,
posting_date=from_date,
)
basic_amt, hra_amt = 0, 0
for earning in salary_slip.earnings:
if earning.salary_component == basic_component:
@@ -424,36 +480,37 @@ def get_component_amt_from_salary_slip(employee, salary_structure, basic_compone
def calculate_hra_exemption(
salary_structure, basic, monthly_hra, monthly_house_rent, rented_in_metro_city
salary_structure, annual_basic, annual_hra, monthly_house_rent, rented_in_metro_city
):
# TODO make this configurable
exemptions = []
frequency = frappe.get_value("Salary Structure", salary_structure, "payroll_frequency")
# case 1: The actual amount allotted by the employer as the HRA.
exemptions.append(get_annual_component_pay(frequency, monthly_hra))
actual_annual_rent = monthly_house_rent * 12
annual_basic = get_annual_component_pay(frequency, basic)
exemptions.append(annual_hra)
# case 2: Actual rent paid less 10% of the basic salary.
actual_annual_rent = monthly_house_rent * 12
exemptions.append(flt(actual_annual_rent) - flt(annual_basic * 0.1))
# case 3: 50% of the basic salary, if the employee is staying in a metro city (40% for a non-metro city).
exemptions.append(annual_basic * 0.5 if rented_in_metro_city else annual_basic * 0.4)
# return minimum of 3 cases
return min(exemptions)
def get_annual_component_pay(frequency, amount):
def get_component_pay(frequency, amount, from_date, to_date):
days = date_diff(to_date, from_date) + 1
if frequency == "Daily":
return amount * 365
return amount * days
elif frequency == "Weekly":
return amount * 52
return amount * math.floor(days / 7)
elif frequency == "Fortnightly":
return amount * 26
return amount * math.floor(days / 14)
elif frequency == "Monthly":
return amount * 12
return amount * month_diff(to_date, from_date)
elif frequency == "Bimonthly":
return amount * 6
return amount * (month_diff(to_date, from_date) / 2)
def validate_house_rent_dates(doc):

View File

@@ -54,5 +54,35 @@ frappe.ui.form.on("Naming Series", {
frm.events.get_doc_and_prefix(frm);
}
});
}
},
naming_series_to_check(frm) {
frappe.call({
method: "preview_series",
doc: frm.doc,
callback: function(r) {
if (!r.exc) {
frm.set_value("preview", r.message);
} else {
frm.set_value("preview", __("Failed to generate preview of series"));
}
}
});
},
add_series(frm) {
const series = frm.doc.naming_series_to_check;
if (!series) {
frappe.show_alert(__("Please type a valid series."));
return;
}
if (!frm.doc.set_options.includes(series)) {
const current_series = frm.doc.set_options;
frm.set_value("set_options", `${current_series}\n${series}`);
} else {
frappe.show_alert(__("Series already added to transaction."));
}
},
});

View File

@@ -1,360 +1,132 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2013-01-25 11:35:08",
"custom": 0,
"description": "Set prefix for numbering series on your transactions",
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 0,
"actions": [],
"creation": "2022-05-26 03:12:49.087648",
"description": "Set prefix for numbering series on your transactions",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"setup_series",
"select_doc_for_series",
"help_html",
"naming_series_to_check",
"preview",
"add_series",
"set_options",
"user_must_always_select",
"update",
"column_break_13",
"update_series",
"prefix",
"current_value",
"update_series_start"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Set prefix for numbering series on your transactions",
"fieldname": "setup_series",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Setup Series",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"description": "Set prefix for numbering series on your transactions",
"fieldname": "setup_series",
"fieldtype": "Section Break",
"label": "Setup Series"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "select_doc_for_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Transaction",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"fieldname": "select_doc_for_series",
"fieldtype": "Select",
"label": "Select Transaction"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "select_doc_for_series",
"fieldname": "help_html",
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Help HTML",
"length": 0,
"no_copy": 0,
"options": "<div class=\"well\">\nEdit list of Series in the box below. Rules:\n<ul>\n<li>Each Series Prefix on a new line.</li>\n<li>Allowed special characters are \"/\" and \"-\"</li>\n<li>Optionally, set the number of digits in the series using dot (.) followed by hashes (#). For example, \".####\" means that the series will have four digits. Default is five digits.</li>\n</ul>\nExamples:<br>\nINV-<br>\nINV-10-<br>\nINVK-<br>\nINV-.####<br>\n</div>",
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"depends_on": "select_doc_for_series",
"fieldname": "help_html",
"fieldtype": "HTML",
"label": "Help HTML",
"options": "<div class=\"well\">\n Edit list of Series in the box below. Rules:\n <ul>\n <li>Each Series Prefix on a new line.</li>\n <li>Allowed special characters are \"/\" and \"-\"</li>\n <li>\n Optionally, set the number of digits in the series using dot (.)\n followed by hashes (#). For example, \".####\" means that the series\n will have four digits. Default is five digits.\n </li>\n <li>\n You can also use variables in the series name by putting them\n between (.) dots\n <br>\n Support Variables:\n <ul>\n <li><code>.YYYY.</code> - Year in 4 digits</li>\n <li><code>.YY.</code> - Year in 2 digits</li>\n <li><code>.MM.</code> - Month</li>\n <li><code>.DD.</code> - Day of month</li>\n <li><code>.WW.</code> - Week of the year</li>\n <li><code>.FY.</code> - Fiscal Year</li>\n <li>\n <code>.{fieldname}.</code> - fieldname on the document e.g.\n <code>branch</code>\n </li>\n </ul>\n </li>\n </ul>\n Examples:\n <ul>\n <li>INV-</li>\n <li>INV-10-</li>\n <li>INVK-</li>\n <li>INV-.YYYY.-.{branch}.-.MM.-.####</li>\n </ul>\n</div>\n<br>\n"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "select_doc_for_series",
"fieldname": "set_options",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series List for this Transaction",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"depends_on": "select_doc_for_series",
"fieldname": "set_options",
"fieldtype": "Text",
"label": "Series List for this Transaction"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "select_doc_for_series",
"description": "Check this if you want to force the user to select a series before saving. There will be no default if you check this.",
"fieldname": "user_must_always_select",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "User must always select",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"default": "0",
"depends_on": "select_doc_for_series",
"description": "Check this if you want to force the user to select a series before saving. There will be no default if you check this.",
"fieldname": "user_must_always_select",
"fieldtype": "Check",
"label": "User must always select"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "select_doc_for_series",
"fieldname": "update",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"depends_on": "select_doc_for_series",
"fieldname": "update",
"fieldtype": "Button",
"label": "Update"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Change the starting / current sequence number of an existing series.",
"fieldname": "update_series",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Series",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"description": "Change the starting / current sequence number of an existing series.",
"fieldname": "update_series",
"fieldtype": "Section Break",
"label": "Update Series"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "prefix",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Prefix",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"fieldname": "prefix",
"fieldtype": "Select",
"label": "Prefix"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "This is the number of the last created transaction with this prefix",
"fieldname": "current_value",
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Current Value",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
},
"description": "This is the number of the last created transaction with this prefix",
"fieldname": "current_value",
"fieldtype": "Int",
"label": "Current Value"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "update_series_start",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Series Number",
"length": 0,
"no_copy": 0,
"options": "update_series_start",
"permlevel": 0,
"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,
"set_only_once": 0,
"unique": 0
"fieldname": "update_series_start",
"fieldtype": "Button",
"label": "Update Series Number",
"options": "update_series_start"
},
{
"fieldname": "naming_series_to_check",
"fieldtype": "Data",
"label": "Try a naming Series"
},
{
"default": " ",
"fieldname": "preview",
"fieldtype": "Text",
"label": "Preview of generated names",
"read_only": 1
},
{
"fieldname": "column_break_13",
"fieldtype": "Column Break"
},
{
"fieldname": "add_series",
"fieldtype": "Button",
"label": "Add this Series"
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 1,
"icon": "fa fa-sort-by-order",
"idx": 1,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2017-08-17 03:41:37.685910",
"modified_by": "Administrator",
"module": "Setup",
"name": "Naming Series",
"owner": "Administrator",
],
"hide_toolbar": 1,
"icon": "fa fa-sort-by-order",
"idx": 1,
"issingle": 1,
"links": [],
"modified": "2022-05-26 06:06:42.109504",
"modified_by": "Administrator",
"module": "Setup",
"name": "Naming Series",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"create": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 1,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"track_changes": 0,
"track_seen": 0
],
"read_only": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -6,7 +6,7 @@ import frappe
from frappe import _, msgprint, throw
from frappe.core.doctype.doctype.doctype import validate_series
from frappe.model.document import Document
from frappe.model.naming import parse_naming_series
from frappe.model.naming import make_autoname, parse_naming_series
from frappe.permissions import get_doctypes_with_read
from frappe.utils import cint, cstr
@@ -206,6 +206,35 @@ class NamingSeries(Document):
prefix = parse_naming_series(parts)
return prefix
@frappe.whitelist()
def preview_series(self) -> str:
"""Preview what the naming series will generate."""
generated_names = []
series = self.naming_series_to_check
if not series:
return ""
try:
doc = self._fetch_last_doc_if_available()
for _count in range(3):
generated_names.append(make_autoname(series, doc=doc))
except Exception as e:
if frappe.message_log:
frappe.message_log.pop()
return _("Failed to generate names from the series") + f"\n{str(e)}"
# Explcitly rollback in case any changes were made to series table.
frappe.db.rollback() # nosemgrep
return "\n".join(generated_names)
def _fetch_last_doc_if_available(self):
"""Fetch last doc for evaluating naming series with fields."""
try:
return frappe.get_last_doc(self.select_doc_for_series)
except Exception:
return None
def set_by_naming_series(
doctype, fieldname, naming_series, hide_name_field=True, make_mandatory=1

View File

@@ -0,0 +1,35 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from frappe.tests.utils import FrappeTestCase
from erpnext.setup.doctype.naming_series.naming_series import NamingSeries
class TestNamingSeries(FrappeTestCase):
def setUp(self):
self.ns: NamingSeries = frappe.get_doc("Naming Series")
def tearDown(self):
frappe.db.rollback()
def test_naming_preview(self):
self.ns.select_doc_for_series = "Sales Invoice"
self.ns.naming_series_to_check = "AXBZ.####"
serieses = self.ns.preview_series().split("\n")
self.assertEqual(["AXBZ0001", "AXBZ0002", "AXBZ0003"], serieses)
self.ns.naming_series_to_check = "AXBZ-.{currency}.-"
serieses = self.ns.preview_series().split("\n")
def test_get_transactions(self):
naming_info = self.ns.get_transactions()
self.assertIn("Sales Invoice", naming_info["transactions"])
existing_naming_series = frappe.get_meta("Sales Invoice").get_field("naming_series").options
for series in existing_naming_series.split("\n"):
self.assertIn(series, naming_info["prefixes"])

View File

@@ -87,20 +87,29 @@ def get_batch_naming_series():
class Batch(Document):
def autoname(self):
"""Generate random ID for batch if not specified"""
if not self.batch_id:
create_new_batch, batch_number_series = frappe.db.get_value(
"Item", self.item, ["create_new_batch", "batch_number_series"]
)
if create_new_batch:
if batch_number_series:
self.batch_id = make_autoname(batch_number_series, doc=self)
elif batch_uses_naming_series():
self.batch_id = self.get_name_from_naming_series()
else:
self.batch_id = get_name_from_hash()
if self.batch_id:
self.name = self.batch_id
return
create_new_batch, batch_number_series = frappe.db.get_value(
"Item", self.item, ["create_new_batch", "batch_number_series"]
)
if not create_new_batch:
frappe.throw(_("Batch ID is mandatory"), frappe.MandatoryError)
while not self.batch_id:
if batch_number_series:
self.batch_id = make_autoname(batch_number_series, doc=self)
elif batch_uses_naming_series():
self.batch_id = self.get_name_from_naming_series()
else:
frappe.throw(_("Batch ID is mandatory"), frappe.MandatoryError)
self.batch_id = get_name_from_hash()
# User might have manually created a batch with next number
if frappe.db.exists("Batch", self.batch_id):
self.batch_id = None
self.name = self.batch_id

View File

@@ -8,6 +8,8 @@ from frappe.utils import cint, flt
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.stock.doctype.batch.batch import UnableToSelectBatchError, get_batch_no, get_batch_qty
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt
from erpnext.stock.get_item_details import get_item_details
@@ -19,11 +21,13 @@ class TestBatch(FrappeTestCase):
)
@classmethod
def make_batch_item(cls, item_name):
def make_batch_item(cls, item_name=None):
from erpnext.stock.doctype.item.test_item import make_item
if not frappe.db.exists(item_name):
if not frappe.db.exists("Item", item_name):
return make_item(item_name, dict(has_batch_no=1, create_new_batch=1, is_stock_item=1))
else:
return frappe.get_doc("Item", item_name)
def test_purchase_receipt(self, batch_qty=100):
"""Test automated batch creation from Purchase Receipt"""
@@ -237,7 +241,7 @@ class TestBatch(FrappeTestCase):
if not use_naming_series:
frappe.set_value("Stock Settings", "Stock Settings", "use_naming_series", 0)
def make_new_batch(self, item_name, batch_id=None, do_not_insert=0):
def make_new_batch(self, item_name=None, batch_id=None, do_not_insert=0):
batch = frappe.new_doc("Batch")
item = self.make_batch_item(item_name)
batch.item = item.name
@@ -300,6 +304,26 @@ class TestBatch(FrappeTestCase):
details = get_item_details(args)
self.assertEqual(details.get("price_list_rate"), 400)
def test_autocreation_of_batches(self):
"""
Test if auto created batch no excludes existing batch numbers
"""
item_code = make_item(
properties={
"has_batch_no": 1,
"batch_number_series": "BATCHEXISTING.###",
"create_new_batch": 1,
}
).name
manually_created_batch = self.make_new_batch(item_code, batch_id="BATCHEXISTING001").name
pr_1 = make_purchase_receipt(item_code=item_code, qty=1, batch_no=manually_created_batch)
pr_2 = make_purchase_receipt(item_code=item_code, qty=1)
self.assertNotEqual(pr_1.items[0].batch_no, pr_2.items[0].batch_no)
self.assertEqual("BATCHEXISTING002", pr_2.items[0].batch_no)
def create_batch(item_code, rate, create_item_price_for_batch):
pi = make_purchase_invoice(

View File

@@ -108,8 +108,6 @@
"terms_section_break",
"tc_name",
"terms",
"bill_no",
"bill_date",
"more_info",
"status",
"amended_from",
@@ -868,24 +866,6 @@
"oldfieldname": "terms",
"oldfieldtype": "Text Editor"
},
{
"fieldname": "bill_no",
"fieldtype": "Data",
"hidden": 1,
"label": "Bill No",
"oldfieldname": "bill_no",
"oldfieldtype": "Data",
"print_hide": 1
},
{
"fieldname": "bill_date",
"fieldtype": "Date",
"hidden": 1,
"label": "Bill Date",
"oldfieldname": "bill_date",
"oldfieldtype": "Date",
"print_hide": 1
},
{
"collapsible": 1,
"fieldname": "more_info",
@@ -1169,7 +1149,7 @@
"idx": 261,
"is_submittable": 1,
"links": [],
"modified": "2022-04-26 13:41:32.625197",
"modified": "2022-05-27 15:59:18.550583",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",

View File

@@ -1507,6 +1507,7 @@ def make_purchase_receipt(**args):
"conversion_factor": args.conversion_factor or 1.0,
"stock_qty": flt(qty) * (flt(args.conversion_factor) or 1.0),
"serial_no": args.serial_no,
"batch_no": args.batch_no,
"stock_uom": args.stock_uom or "_Test UOM",
"uom": uom,
"cost_center": args.cost_center

View File

@@ -1,89 +1,98 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Warehouse", {
onload: function(frm) {
frm.set_query("default_in_transit_warehouse", function() {
setup: function (frm) {
frm.set_query("default_in_transit_warehouse", function (doc) {
return {
filters:{
'warehouse_type' : 'Transit',
'is_group': 0,
'company': frm.doc.company
}
filters: {
warehouse_type: "Transit",
is_group: 0,
company: doc.company,
},
};
});
frm.set_query("parent_warehouse", function () {
return {
filters: {
is_group: 1,
},
};
});
frm.set_query("account", function (doc) {
return {
filters: {
is_group: 0,
account_type: "Stock",
company: doc.company,
},
};
});
},
refresh: function(frm) {
frm.toggle_display('warehouse_name', frm.doc.__islocal);
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
refresh: function (frm) {
frm.toggle_display("warehouse_name", frm.doc.__islocal);
frm.toggle_display(
["address_html", "contact_html"],
!frm.doc.__islocal
);
if(!frm.doc.__islocal) {
if (!frm.doc.__islocal) {
frappe.contacts.render_address_and_contact(frm);
} else {
frappe.contacts.clear_address_and_contact(frm);
}
frm.add_custom_button(__("Stock Balance"), function() {
frappe.set_route("query-report", "Stock Balance", {"warehouse": frm.doc.name});
frm.add_custom_button(__("Stock Balance"), function () {
frappe.set_route("query-report", "Stock Balance", {
warehouse: frm.doc.name,
});
});
if (cint(frm.doc.is_group) == 1) {
frm.add_custom_button(__('Group to Non-Group'),
function() { convert_to_group_or_ledger(frm); }, 'fa fa-retweet', 'btn-default')
} else if (cint(frm.doc.is_group) == 0) {
if(frm.doc.__onload && frm.doc.__onload.account) {
frm.add_custom_button(__("General Ledger"), function() {
frm.add_custom_button(
frm.doc.is_group
? __("Convert to Ledger", null, "Warehouse")
: __("Convert to Group", null, "Warehouse"),
function () {
convert_to_group_or_ledger(frm);
},
);
if (!frm.doc.is_group && frm.doc.__onload && frm.doc.__onload.account) {
frm.add_custom_button(
__("General Ledger", null, "Warehouse"),
function () {
frappe.route_options = {
"account": frm.doc.__onload.account,
"company": frm.doc.company
}
account: frm.doc.__onload.account,
company: frm.doc.company,
};
frappe.set_route("query-report", "General Ledger");
});
}
frm.add_custom_button(__('Non-Group to Group'),
function() { convert_to_group_or_ledger(frm); }, 'fa fa-retweet', 'btn-default')
}
frm.toggle_enable(['is_group', 'company'], false);
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Warehouse'};
frm.fields_dict['parent_warehouse'].get_query = function(doc) {
return {
filters: {
"is_group": 1,
}
}
);
}
frm.fields_dict['account'].get_query = function(doc) {
return {
filters: {
"is_group": 0,
"account_type": "Stock",
"company": frm.doc.company
}
}
}
}
frm.toggle_enable(["is_group", "company"], false);
frappe.dynamic_link = {
doc: frm.doc,
fieldname: "name",
doctype: "Warehouse",
};
},
});
function convert_to_group_or_ledger(frm){
function convert_to_group_or_ledger(frm) {
frappe.call({
method:"erpnext.stock.doctype.warehouse.warehouse.convert_to_group_or_ledger",
method: "erpnext.stock.doctype.warehouse.warehouse.convert_to_group_or_ledger",
args: {
docname: frm.doc.name,
is_group: frm.doc.is_group
is_group: frm.doc.is_group,
},
callback: function(){
callback: function () {
frm.refresh();
}
})
},
});
}

View File

@@ -1,19 +0,0 @@
import unittest
import frappe
from frappe.contacts.address_and_contact import filter_dynamic_link_doctypes
class TestSearch(unittest.TestCase):
# Search for the word "cond", part of the word "conduire" (Lead) in french.
def test_contact_search_in_foreign_language(self):
try:
frappe.local.lang_full_dict = None # reset cached translations
frappe.local.lang = "fr"
output = filter_dynamic_link_doctypes(
"DocType", "cond", "name", 0, 20, {"fieldtype": "HTML", "fieldname": "contact_html"}
)
result = [["found" for x in y if x == "Lead"] for y in output]
self.assertTrue(["found"] in result)
finally:
frappe.local.lang = "en"

View File

@@ -1174,7 +1174,7 @@ Group by Party,Gruppieren nach Parteien,
Group by Voucher,Gruppieren nach Beleg,
Group by Voucher (Consolidated),Gruppieren nach Beleg (konsolidiert),
Group node warehouse is not allowed to select for transactions,Gruppenknoten Lager ist nicht für Transaktionen zu wählen erlaubt,
Group to Non-Group,Gruppe an konzernfremde,
Convert to Ledger,In Lagerbuch umwandeln,Warehouse
Group your students in batches,Gruppieren Sie Ihre Schüler in den Reihen,
Groups,Gruppen,
Guardian1 Email ID,Guardian1 E-Mail-ID,
@@ -1729,7 +1729,6 @@ Non GST Inward Supplies,Nicht GST Inward Supplies,
Non Profit,Gemeinnützig,
Non Profit (beta),Non-Profit (Beta),
Non-GST outward supplies,Nicht-GST-Lieferungen nach außen,
Non-Group to Group,Non-Group-Gruppe,
None,Keiner,
None of the items have any change in quantity or value.,Keiner der Artikel hat irgendeine Änderung bei Mengen oder Kosten.,
Nos,Stk,
Can't render this file because it is too large.

View File

@@ -175,7 +175,7 @@ Airline,Compagnie aérienne,
All Accounts,Tous les comptes,
All Addresses.,Toutes les adresses.,
All Assessment Groups,Tous les Groupes d'Évaluation,
All BOMs,Toutes les LDM,
All BOMs,Toutes les nomenclatures,
All Contacts.,Tous les contacts.,
All Customer Groups,Tous les Groupes Client,
All Day,Toute la Journée,
@@ -330,16 +330,16 @@ Avg Daily Outgoing,Moy Quotidienne Sortante,
Avg. Buying Price List Rate,Moyenne de la liste de prix d'achat,
Avg. Selling Price List Rate,Prix moyen de la liste de prix de vente,
Avg. Selling Rate,Moy. Taux de vente,
BOM,LDM (Liste de Matériaux),
BOM Browser,Explorateur LDM,
BOM No,LDM,
BOM Rate,Taux LDM,
BOM Stock Report,Rapport de Stock de LDM,
BOM and Manufacturing Quantity are required,LDM et quantité de production sont nécessaires,
BOM does not contain any stock item,LDM ne contient aucun article en stock,
BOM {0} does not belong to Item {1},LDM {0} nappartient pas à l'article {1},
BOM {0} must be active,LDM {0} doit être active,
BOM {0} must be submitted,LDM {0} doit être soumise,
BOM,Nomenclature,
BOM Browser,Explorateur Nomenclature,
BOM No,Nomenclature,
BOM Rate,Valeur nomenclature,
BOM Stock Report,Rapport de Stock des nomenclatures,
BOM and Manufacturing Quantity are required,Nomenclature et quantité de production sont nécessaires,
BOM does not contain any stock item,Nomenclature ne contient aucun article en stock,
BOM {0} does not belong to Item {1},Nomenclature {0} nappartient pas à l'article {1},
BOM {0} must be active,Nomenclature {0} doit être active,
BOM {0} must be submitted,Nomenclature {0} doit être soumise,
Balance,Solde,
Balance (Dr - Cr),Balance (Dr - Cr),
Balance ({0}),Solde ({0}),
@@ -386,8 +386,8 @@ Beginner,Débutant,
Bill,Facture,
Bill Date,Date de la Facture,
Bill No,Numéro de facture,
Bill of Materials,Liste de Matériaux,
Bill of Materials (BOM),Liste de Matériaux (LDM),
Bill of Materials,Nomenclatures,
Bill of Materials (BOM),Nomenclature,
Billable Hours,Heures facturables,
Billed,Facturé,
Billed Amount,Montant facturé,
@@ -404,14 +404,14 @@ Birthday Reminder,Rappel d'anniversaire,
Black,Noir,
Blanket Orders from Costumers.,Commandes provisoires de clients.,
Block Invoice,Bloquer la facture,
Boms,Listes de Matériaux,
Boms,Nomenclatures,
Bonus Payment Date cannot be a past date,La date de paiement du bonus ne peut pas être une date passée,
Both Trial Period Start Date and Trial Period End Date must be set,La date de début de la période d&#39;essai et la date de fin de la période d&#39;essai doivent être définies,
Both Warehouse must belong to same Company,Les deux Entrepôt doivent appartenir à la même Société,
Branch,Branche,
Broadcasting,Radio/Télévision,
Brokerage,Courtage,
Browse BOM,Parcourir la LDM,
Browse BOM,Parcourir la nomenclature,
Budget Against,Budget Pour,
Budget List,Liste budgétaire,
Budget Variance Report,Rapport dÉcarts de Budget,
@@ -467,7 +467,7 @@ Cannot convert Cost Center to ledger as it has child nodes,Conversion impossible
Cannot covert to Group because Account Type is selected.,Conversion impossible en Groupe car le Type de Compte est sélectionné.,
Cannot create Retention Bonus for left Employees,Impossible de créer une prime de fidélisation pour les employés ayant quitté l'entreprise,
Cannot create a Delivery Trip from Draft documents.,Impossible de créer un voyage de livraison à partir de documents brouillons.,
Cannot deactivate or cancel BOM as it is linked with other BOMs,Désactivation ou annulation de la LDM impossible car elle est liée avec d'autres LDMs,
Cannot deactivate or cancel BOM as it is linked with other BOMs,Désactivation ou annulation de la nomenclature impossible car elle est liée avec d'autres nomenclatures,
"Cannot declare as lost, because Quotation has been made.","Impossible de déclarer comme perdu, parce que le Devis a été fait.",
Cannot deduct when category is for 'Valuation' or 'Valuation and Total',Déduction impossible lorsque la catégorie est pour 'Évaluation' ou 'Vaulation et Total',
Cannot deduct when category is for 'Valuation' or 'Vaulation and Total',Vous ne pouvez pas déduire lorsqu'une catégorie est pour 'Évaluation' ou 'Évaluation et Total',
@@ -722,7 +722,7 @@ Currency of the price list {0} must be {1} or {2},La devise de la liste de prix
Currency should be same as Price List Currency: {0},La devise doit être la même que la devise de la liste de prix: {0},
Current,Actuel,
Current Assets,Actifs Actuels,
Current BOM and New BOM can not be same,La LDM actuelle et la nouvelle LDM ne peuvent être pareilles,
Current BOM and New BOM can not be same,La nomenclature actuelle et la nouvelle nomenclature ne peuvent être pareilles,
Current Job Openings,Offres d'Emploi Actuelles,
Current Liabilities,Dettes Actuelles,
Current Qty,Qté actuelle,
@@ -780,9 +780,9 @@ Debtors ({0}),Débiteurs ({0}),
Declare Lost,Déclarer perdu,
Deduction,Déduction,
Default Activity Cost exists for Activity Type - {0},Un Coût dActivité par défault existe pour le Type dActivité {0},
Default BOM ({0}) must be active for this item or its template,LDM par défaut ({0}) doit être actif pour ce produit ou son modèle,
Default BOM for {0} not found,LDM par défaut {0} introuvable,
Default BOM not found for Item {0} and Project {1},La LDM par défaut n'a pas été trouvée pour l'Article {0} et le Projet {1},
Default BOM ({0}) must be active for this item or its template,Nomenclature par défaut ({0}) doit être actif pour ce produit ou son modèle,
Default BOM for {0} not found,Nomenclature par défaut {0} introuvable,
Default BOM not found for Item {0} and Project {1},La nomenclature par défaut n'a pas été trouvée pour l'Article {0} et le Projet {1},
Default Letter Head,En-Tête de Courrier par Défaut,
Default Tax Template,Modèle de Taxes par Défaut,
Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You will need to create a new Item to use a different Default UOM.,LUnité de Mesure par Défaut pour lArticle {0} ne peut pas être modifiée directement parce que vous avez déjà fait une (des) transaction (s) avec une autre unité de mesure. Vous devez créer un nouvel article pour utiliser une UDM par défaut différente.,
@@ -1023,7 +1023,7 @@ Fees,Honoraires,
Female,Féminin,
Fetch Data,Récupérer des données,
Fetch Subscription Updates,Vérifier les mises à jour des abonnements,
Fetch exploded BOM (including sub-assemblies),Récupérer la LDM éclatée (y compris les sous-ensembles),
Fetch exploded BOM (including sub-assemblies),Récupérer la nomenclature éclatée (y compris les sous-ensembles),
Fetching records......,Récupération des enregistrements ......,
Field Name,Nom du Champ,
Fieldname,Nom du Champ,
@@ -1135,7 +1135,7 @@ Get Employees,Obtenir des employés,
Get Invocies,Obtenir des invocies,
Get Invoices,Obtenir des factures,
Get Invoices based on Filters,Obtenir les factures en fonction des filtres,
Get Items from BOM,Obtenir les Articles depuis LDM,
Get Items from BOM,Obtenir les Articles depuis nomenclature,
Get Items from Healthcare Services,Obtenir des articles des services de santé,
Get Items from Prescriptions,Obtenir des articles des prescriptions,
Get Items from Product Bundle,Obtenir les Articles du Produit Groupé,
@@ -1425,8 +1425,8 @@ Last Order Date,Date de la dernière commande,
Last Purchase Price,Dernier prix d'achat,
Last Purchase Rate,Dernier Prix d'Achat,
Latest,Dernier,
Latest price updated in all BOMs,Prix les plus récents mis à jour dans toutes les LDMs,
Lead,Conduire,
Latest price updated in all BOMs,Prix les plus récents mis à jour dans toutes les nomenclatures,
Lead,Prospect,
Lead Count,Nombre de Prospects,
Lead Owner,Responsable du Prospect,
Lead Owner cannot be same as the Lead,Le Responsable du Prospect ne peut pas être identique au Prospect,
@@ -1655,7 +1655,7 @@ Net Total,Total net,
Net pay cannot be negative,Salaire Net ne peut pas être négatif,
New Account Name,Nouveau Nom de Compte,
New Address,Nouvelle adresse,
New BOM,Nouvelle LDM,
New BOM,Nouvelle nomenclature,
New Batch ID (Optional),Nouveau Numéro de Lot (Optionnel),
New Batch Qty,Nouvelle Qté de Lot,
New Company,Nouvelle Société,
@@ -1689,7 +1689,7 @@ No Item with Serial No {0},Aucun Article avec le N° de Série {0},
No Items available for transfer,Aucun article disponible pour le transfert,
No Items selected for transfer,Aucun article sélectionné pour le transfert,
No Items to pack,Pas dArticles à emballer,
No Items with Bill of Materials to Manufacture,Aucun Article avec une Liste de Matériel à Produire,
No Items with Bill of Materials to Manufacture,Aucun Article avec une nomenclature à Produire,
No Items with Bill of Materials.,Aucun article avec nomenclature.,
No Permission,Aucune autorisation,
No Remarks,Aucune Remarque,
@@ -1777,7 +1777,7 @@ Online Auctions,Enchères en ligne,
Only Leave Applications with status 'Approved' and 'Rejected' can be submitted,Seules les Demandes de Congés avec le statut 'Appouvée' ou 'Rejetée' peuvent être soumises,
"Only the Student Applicant with the status ""Approved"" will be selected in the table below.",Seul les candidatures étudiantes avec le statut «Approuvé» seront sélectionnées dans le tableau ci-dessous.,
Only users with {0} role can register on Marketplace,Seuls les utilisateurs ayant le rôle {0} peuvent s'inscrire sur Marketplace,
Open BOM {0},Ouvrir LDM {0},
Open BOM {0},Ouvrir nomenclature {0},
Open Item {0},Ouvrir l'Article {0},
Open Notifications,Notifications ouvertes,
Open Orders,Commandes ouvertes,
@@ -2015,9 +2015,9 @@ Please save the patient first,Veuillez d'abord enregistrer le patient,
Please save the report again to rebuild or update,Veuillez enregistrer le rapport à nouveau pour reconstruire ou mettre à jour,
"Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row","Veuillez sélectionner le Montant Alloué, le Type de Facture et le Numéro de Facture dans au moins une ligne",
Please select Apply Discount On,Veuillez sélectionnez Appliquer Remise Sur,
Please select BOM against item {0},Veuillez sélectionner la liste de matériaux (LDM) pour l'article {0},
Please select BOM for Item in Row {0},Veuillez sélectionnez une LDM pour lArticle à la Ligne {0},
Please select BOM in BOM field for Item {0},Veuillez sélectionner une LDM dans le champ LDM pour lArticle {0},
Please select BOM against item {0},Veuillez sélectionner la nomenclature pour l'article {0},
Please select BOM for Item in Row {0},Veuillez sélectionnez une nomenclature pour lArticle à la Ligne {0},
Please select BOM in BOM field for Item {0},Veuillez sélectionner une nomenclature dans le champ nomenclature pour lArticle {0},
Please select Category first,Veuillez dabord sélectionner une Catégorie,
Please select Charge Type first,Veuillez dabord sélectionner le Type de Facturation,
Please select Company,Veuillez sélectionner une Société,
@@ -2044,7 +2044,7 @@ Please select Qty against item {0},Veuillez sélectionner Qté par rapport à l'
Please select Sample Retention Warehouse in Stock Settings first,Veuillez d'abord définir un entrepôt de stockage des échantillons dans les paramètres de stock,
Please select Start Date and End Date for Item {0},Veuillez sélectionner la Date de Début et Date de Fin pour l'Article {0},
Please select Student Admission which is mandatory for the paid student applicant,Veuillez sélectionner obligatoirement une Admission d'Étudiant pour la candidature étudiante payée,
Please select a BOM,Veuillez sélectionner une LDM,
Please select a BOM,Veuillez sélectionner une nomenclature,
Please select a Batch for Item {0}. Unable to find a single batch that fulfills this requirement,Veuillez sélectionner un Lot pour l'Article {0}. Impossible de trouver un seul lot satisfaisant à cette exigence,
Please select a Company,Veuillez sélectionner une Société,
Please select a batch,Veuillez sélectionner un lot,
@@ -2273,8 +2273,8 @@ Quantity to Manufacture must be greater than 0.,La quantité à produire doit ê
Quantity to Produce,Quantité à produire,
Quantity to Produce can not be less than Zero,La quantité à produire ne peut être inférieure à zéro,
Query Options,Options de Requête,
Queued for replacing the BOM. It may take a few minutes.,En file d'attente pour remplacer la LDM. Cela peut prendre quelques minutes.,
Queued for updating latest price in all Bill of Materials. It may take a few minutes.,Mise à jour des prix les plus récents dans toutes les Listes de Matériaux en file d'attente. Cela peut prendre quelques minutes.,
Queued for replacing the BOM. It may take a few minutes.,En file d'attente pour remplacer la nomenclature. Cela peut prendre quelques minutes.,
Queued for updating latest price in all Bill of Materials. It may take a few minutes.,Mise à jour des prix les plus récents dans toutes les nomenclatures en file d'attente. Cela peut prendre quelques minutes.,
Quick Journal Entry,Écriture Rapide dans le Journal,
Quot Count,Compte de Devis,
Quot/Lead %,Devis / Prospects %,
@@ -2354,7 +2354,7 @@ Reorder Level,Niveau de réapprovisionnement,
Reorder Qty,Qté de Réapprovisionnement,
Repeat Customer Revenue,Revenus de Clients Récurrents,
Repeat Customers,Clients Récurrents,
Replace BOM and update latest price in all BOMs,Remplacer la LDM et actualiser les prix les plus récents dans toutes les LDMs,
Replace BOM and update latest price in all BOMs,Remplacer la nomenclature et actualiser les prix les plus récents dans toutes les nomenclatures,
Replied,Répondu,
Replies,réponses,
Report,Rapport,
@@ -2466,11 +2466,11 @@ Row {0}: Advance against Supplier must be debit,Ligne {0} : LAvance du Fourni
Row {0}: Allocated amount {1} must be less than or equals to Payment Entry amount {2},Ligne {0} : Le montant alloué {1} doit être inférieur ou égal au montant du Paiement {2},
Row {0}: Allocated amount {1} must be less than or equals to invoice outstanding amount {2},Ligne {0} : Le montant alloué {1} doit être inférieur ou égal au montant restant sur la Facture {2},
Row {0}: An Reorder entry already exists for this warehouse {1},Ligne {0} : Une écriture de Réapprovisionnement existe déjà pour cet entrepôt {1},
Row {0}: Bill of Materials not found for the Item {1},Ligne {0} : Liste de Matériaux non trouvée pour lArticle {1},
Row {0}: Bill of Materials not found for the Item {1},Ligne {0} : Nomenclature non trouvée pour lArticle {1},
Row {0}: Conversion Factor is mandatory,Ligne {0} : Le Facteur de Conversion est obligatoire,
Row {0}: Cost center is required for an item {1},Ligne {0}: le Centre de Coûts est requis pour un article {1},
Row {0}: Credit entry can not be linked with a {1},Ligne {0} : LÉcriture de crédit ne peut pas être liée à un {1},
Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2},Ligne {0} : La devise de la LDM #{1} doit être égale à la devise sélectionnée {2},
Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2},Ligne {0} : La devise de la nomenclature #{1} doit être égale à la devise sélectionnée {2},
Row {0}: Debit entry can not be linked with a {1},Ligne {0} : LÉcriture de Débit ne peut pas être lié à un {1},
Row {0}: Depreciation Start Date is required,Ligne {0}: la date de début de l'amortissement est obligatoire,
Row {0}: Enter location for the asset item {1},Ligne {0}: entrez la localisation de l'actif {1},
@@ -2490,7 +2490,7 @@ Row {0}: Please set the Mode of Payment in Payment Schedule,Ligne {0}: Veuillez
Row {0}: Please set the correct code on Mode of Payment {1},Ligne {0}: définissez le code correct sur le mode de paiement {1}.,
Row {0}: Qty is mandatory,Ligne {0} : Qté obligatoire,
Row {0}: Quality Inspection rejected for item {1},Ligne {0}: le contrôle qualité a été rejeté pour l'élément {1}.,
Row {0}: UOM Conversion Factor is mandatory,Ligne {0} : Facteur de Conversion LDM est obligatoire,
Row {0}: UOM Conversion Factor is mandatory,Ligne {0} : Facteur de Conversion nomenclature est obligatoire,
Row {0}: select the workstation against the operation {1},Ligne {0}: sélectionnez le poste de travail en fonction de l'opération {1},
Row {0}: {1} Serial numbers required for Item {2}. You have provided {3}.,Ligne {0}: {1} Numéros de série requis pour l'article {2}. Vous en avez fourni {3}.,
Row {0}: {1} must be greater than 0,Ligne {0}: {1} doit être supérieure à 0,
@@ -2587,8 +2587,8 @@ See past quotations,Voir les citations passées,
Select,Sélectionner,
Select Alternate Item,Sélectionnez un autre élément,
Select Attribute Values,Sélectionner les valeurs d'attribut,
Select BOM,Sélectionner LDM,
Select BOM and Qty for Production,Sélectionner la LDM et la Qté pour la Production,
Select BOM,Sélectionner une nomenclature,
Select BOM and Qty for Production,Sélectionner la nomenclature et la Qté pour la Production,
"Select BOM, Qty and For Warehouse","Sélectionner une nomenclature, une quantité et un entrepôt",
Select Batch,Sélectionnez le Lot,
Select Batch Numbers,Sélectionnez les Numéros de Lot,
@@ -2760,7 +2760,7 @@ Source and target warehouse cannot be same for row {0},L'entrepôt source et des
Source and target warehouse must be different,Entrepôt source et destination doivent être différents,
Source of Funds (Liabilities),Source des Fonds (Passif),
Source warehouse is mandatory for row {0},Entrepôt source est obligatoire à la ligne {0},
Specified BOM {0} does not exist for Item {1},La LDM {0} spécifiée n'existe pas pour l'Article {1},
Specified BOM {0} does not exist for Item {1},La nomenclature {0} spécifiée n'existe pas pour l'Article {1},
Split,Fractionner,
Split Batch,Lot Fractionné,
Split Issue,Diviser le ticket,
@@ -2888,11 +2888,11 @@ Supplies made to UIN holders,Fournitures faites aux titulaires de l'UIN,
Supplies made to Unregistered Persons,Fournitures faites à des personnes non inscrites,
Suppliies made to Composition Taxable Persons,Suppleies à des personnes assujetties à la composition,
Supply Type,Type d'approvisionnement,
Support,Soutien,
Support Analytics,Analyse du Support,
Support Settings,Paramètres du Support,
Support Tickets,Billets de Support,
Support queries from customers.,Demande de support des clients,
Support,"Assistance/Support",
Support Analytics,Analyse de l'assistance,
Support Settings,Paramètres du module Assistance,
Support Tickets,Ticket d'assistance,
Support queries from customers.,Demande d'assistance des clients,
Susceptible,Sensible,
Sync has been temporarily disabled because maximum retries have been exceeded,La synchronisation a été temporairement désactivée car les tentatives maximales ont été dépassées,
Syntax error in condition: {0},Erreur de syntaxe dans la condition: {0},
@@ -2965,7 +2965,7 @@ The name of the institute for which you are setting up this system.,Le nom de l'
The name of your company for which you are setting up this system.,Le nom de l'entreprise pour laquelle vous configurez ce système.,
The number of shares and the share numbers are inconsistent,Le nombre d'actions dans les transactions est incohérent avec le nombre total d'actions,
The payment gateway account in plan {0} is different from the payment gateway account in this payment request,Le compte passerelle de paiement dans le plan {0} est différent du compte passerelle de paiement dans cette requête de paiement.,
The selected BOMs are not for the same item,Les LDMs sélectionnées ne sont pas pour le même article,
The selected BOMs are not for the same item,Les nomenclatures sélectionnées ne sont pas pour le même article,
The selected item cannot have Batch,Larticle sélectionné ne peut pas avoir de Lot,
The seller and the buyer cannot be the same,Le vendeur et l'acheteur ne peuvent pas être les mêmes,
The shareholder does not belong to this company,L'actionnaire n'appartient pas à cette société,
@@ -3150,7 +3150,7 @@ Transporter Name,Nom du transporteur,
Travel,Déplacement,
Travel Expenses,Frais de Déplacement,
Tree Type,Type d'Arbre,
Tree of Bill of Materials,Arbre des Listes de Matériaux,
Tree of Bill of Materials,Arbre des Nomenclatures,
Tree of Item Groups.,Arbre de Groupes dArticles .,
Tree of Procedures,Arbre de procédures,
Tree of Quality Procedures.,Arbre de la qualité des procédures.,
@@ -3305,7 +3305,7 @@ Wire Transfer,Virement,
WooCommerce Products,Produits WooCommerce,
Work In Progress,Travaux en cours,
Work Order,Ordre de travail,
Work Order already created for all items with BOM,Ordre de travail déjà créé pour tous les articles avec une LDM,
Work Order already created for all items with BOM,Ordre de travail déjà créé pour tous les articles avec une nomenclature,
Work Order cannot be raised against a Item Template,Un ordre de travail ne peut pas être créé pour un modèle d'article,
Work Order has been {0},L'ordre de travail a été {0},
Work Order not created,Ordre de travail non créé,
@@ -3326,7 +3326,7 @@ You are not authorized to add or update entries before {0},Vous n'êtes pas auto
You are not authorized to approve leaves on Block Dates,Vous n'êtes pas autorisé à approuver les congés sur les Dates Bloquées,
You are not authorized to set Frozen value,Vous n'êtes pas autorisé à définir des valeurs gelées,
You are not present all day(s) between compensatory leave request days,Vous n'êtes pas présent(e) tous les jours vos demandes de congé compensatoire,
You can not change rate if BOM mentioned agianst any item,Vous ne pouvez pas modifier le taux si la LDM est mentionnée pour un article,
You can not change rate if BOM mentioned agianst any item,Vous ne pouvez pas modifier le taux si la nomenclature est mentionnée pour un article,
You can not enter current voucher in 'Against Journal Entry' column,Vous ne pouvez pas entrer le bon actuel dans la colonne 'Pour l'Écriture de Journal',
You can only have Plans with the same billing cycle in a Subscription,Vous ne pouvez avoir que des plans ayant le même cycle de facturation dans le même abonnement,
You can only redeem max {0} points in this order.,Vous pouvez uniquement échanger un maximum de {0} points dans cet commande.,
@@ -5502,7 +5502,7 @@ Blanket Order,Commande avec limites,
Blanket Order Rate,Prix unitaire de commande avec limites,
Returned Qty,Qté Retournée,
Purchase Order Item Supplied,Article Fourni du Bon de Commande,
BOM Detail No,N° de Détail LDM,
BOM Detail No,N° de Détail de la nomenclature,
Stock Uom,UDM du Stock,
Raw Material Item Code,Code dArticle de Matière Première,
Supplied Qty,Qté Fournie,
@@ -5600,7 +5600,6 @@ Call Log,Journal d&#39;appel,
Received By,Reçu par,
Caller Information,Informations sur l&#39;appelant,
Contact Name,Nom du Contact,
Lead ,Conduire,
Lead Name,Nom du Prospect,
Ringing,Sonnerie,
Missed,Manqué,
@@ -7183,7 +7182,7 @@ Blanket Order Item,Article de commande avec limites,
Ordered Quantity,Quantité Commandée,
Item to be manufactured or repacked,Article à produire ou à réemballer,
Quantity of item obtained after manufacturing / repacking from given quantities of raw materials,Quantité d'article obtenue après production / reconditionnement des quantités données de matières premières,
Set rate of sub-assembly item based on BOM,Définir le prix des articles de sous-assemblage en fonction de la LDM,
Set rate of sub-assembly item based on BOM,Définir le prix des articles de sous-assemblage en fonction de la nomenclature,
Allow Alternative Item,Autoriser un article alternatif,
Item UOM,UDM de l'Article,
Conversion Rate,Taux de Conversion,
@@ -7214,33 +7213,33 @@ Website Specifications,Spécifications du Site Web,
Show Items,Afficher les Articles,
Show Operations,Afficher Opérations,
Website Description,Description du Site Web,
BOM Explosion Item,Article Eclaté LDM,
BOM Explosion Item,Article Eclaté en nomenclature,
Qty Consumed Per Unit,Qté Consommée Par Unité,
Include Item In Manufacturing,Inclure l&#39;article dans la fabrication,
BOM Item,Article LDM,
BOM Item,Article de la nomenclature,
Item operation,Opération de l'article,
Rate & Amount,Taux et Montant,
Basic Rate (Company Currency),Taux de Base (Devise de la Société ),
Scrap %,% de Rebut,
Original Item,Article original,
BOM Operation,Opération LDM,
BOM Operation,Opération de la nomenclature (gamme),
Operation Time ,Durée de l&#39;opération,
In minutes,En minutes,
Batch Size,Taille du lot,
Base Hour Rate(Company Currency),Taux Horaire de Base (Devise de la Société),
Operating Cost(Company Currency),Coût d'Exploitation (Devise Société),
BOM Scrap Item,Article Mis au Rebut LDM,
BOM Scrap Item,Article Mis au Rebut dans la nomenclature,
Basic Amount (Company Currency),Montant de Base (Devise de la Société),
BOM Update Tool,Outil de mise à jour de LDM,
"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM.\nIt also updates latest price in all the BOMs.","Remplacez une LDM particulière dans toutes les LDM où elles est utilisée. Cela remplacera le lien vers l'ancienne LDM, mettra à jour les coûts et régénérera le tableau ""Article Explosé de LDM"" selon la nouvelle LDM. Cela mettra également à jour les prix les plus récents dans toutes les LDMs.",
Replace BOM,Remplacer la LDM,
Current BOM,LDM Actuelle,
The BOM which will be replaced,La LDM qui sera remplacée,
The new BOM after replacement,La nouvelle LDM après remplacement,
BOM Update Tool,Outil de mise à jour des Nomenclatures,
"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM.\nIt also updates latest price in all the BOMs.","Remplacez une nomenclature particulière dans toutes les nomenclatures où elles est utilisée. Cela remplacera le lien vers l'ancienne nomenclature, mettra à jour les coûts et régénérera le tableau ""Article Explosé de nomenclature"" selon la nouvelle nomenclature. Cela mettra également à jour les prix les plus récents dans toutes les nomenclatures.",
Replace BOM,Remplacer la nomenclature,
Current BOM,nomenclature Actuelle,
The BOM which will be replaced,La nomenclature qui sera remplacée,
The new BOM after replacement,La nouvelle nomenclature après remplacement,
Replace,Remplacer,
Update latest price in all BOMs,Mettre à jour le prix le plus récent dans toutes les LDMs,
BOM Website Item,Article de LDM du Site Internet,
BOM Website Operation,Opération de LDM du Site Internet,
Update latest price in all BOMs,Mettre à jour le prix le plus récent dans toutes les nomenclatures,
BOM Website Item,Article de nomenclature du Site Internet,
BOM Website Operation,Opération de nomenclature du Site Internet,
Operation Time,Heure de l'Opération,
PO-JOB.#####,PO-JOB. #####,
Timing Detail,Détail du timing,
@@ -7272,7 +7271,7 @@ Default Scrap Warehouse,Entrepôt de rebut par défaut,
Overproduction Percentage For Sales Order,Pourcentage de surproduction pour les commandes client,
Overproduction Percentage For Work Order,Pourcentage de surproduction pour les ordres de travail,
Other Settings,Autres Paramètres,
Update BOM Cost Automatically,Mettre à jour automatiquement le coût de la LDM,
Update BOM Cost Automatically,Mettre à jour automatiquement le coût de la nomenclature,
Material Request Plan Item,Article du plan de demande de matériel,
Material Request Type,Type de Demande de Matériel,
Material Issue,Sortie de Matériel,
@@ -7312,7 +7311,7 @@ MFG-WO-.YYYY.-,MFG-WO-.YYYY.-,
Item To Manufacture,Article à produire,
Material Transferred for Manufacturing,Matériel Transféré pour la Production,
Manufactured Qty,Qté Produite,
Use Multi-Level BOM,Utiliser LDM à Plusieurs Niveaux,
Use Multi-Level BOM,Utiliser les nomenclatures à plusieurs niveaux,
Plan material for sub-assemblies,Plan de matériaux pour les sous-ensembles,
Skip Material Transfer to WIP Warehouse,Ignorer le transfert de matériel vers l'entrepôt WIP,
Check if material transfer entry is not required,Vérifiez si une un transfert de matériel n'est pas requis,
@@ -7685,7 +7684,7 @@ Collected Amount,Montant collecté,
Expected Amount,Montant prévu,
POS Closing Voucher Invoices,Factures du bon de clôture du PDV,
Quantity of Items,Quantité d'articles,
"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**. \n\nThe package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.\n\nNote: BOM = Bill of Materials","Regroupement d' **Articles** dans un autre **Article**. Ceci est utile si vous regroupez certains **Articles** dans un lot et que vous maintenez l'inventaire des **Articles** du lot et non de l'**Article** composé. L'**Article** composé aura ""Article En Stock"" à ""Non"" et ""Article À Vendre"" à ""Oui"". Exemple : Si vous vendez des Ordinateurs Portables et Sacs à Dos séparément et qu'il y a un prix spécial si le client achète les deux, alors l'Ordinateur Portable + le Sac à Dos sera un nouveau Produit Groupé. Remarque: LDM = Liste\nDes Matériaux",
"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**. \n\nThe package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.\n\nNote: BOM = Bill of Materials","Regroupement d' **Articles** dans un autre **Article**. Ceci est utile si vous regroupez certains **Articles** dans un lot et que vous maintenez l'inventaire des **Articles** du lot et non de l'**Article** composé. L'**Article** composé aura ""Article En Stock"" à ""Non"" et ""Article À Vendre"" à ""Oui"". Exemple : Si vous vendez des Ordinateurs Portables et Sacs à Dos séparément et qu'il y a un prix spécial si le client achète les deux, alors l'Ordinateur Portable + le Sac à Dos sera un nouveau Produit Groupé.",
Parent Item,Article Parent,
List items that form the package.,Liste des articles qui composent le paquet.,
SAL-QTN-.YYYY.-,SAL-QTN-. AAAA.-,
@@ -8089,7 +8088,7 @@ Customer Items,Articles du clients,
Inspection Criteria,Critères d'Inspection,
Inspection Required before Purchase,Inspection Requise avant Achat,
Inspection Required before Delivery,Inspection Requise avant Livraison,
Default BOM,LDM par Défaut,
Default BOM,Nomenclature par Défaut,
Supply Raw Materials for Purchase,Fournir les Matières Premières pour l'Achat,
If subcontracted to a vendor,Si sous-traité à un fournisseur,
Customer Code,Code Client,
@@ -8295,7 +8294,7 @@ Delivery Note No,Bon de Livraison N°,
Sales Invoice No,N° de la Facture de Vente,
Purchase Receipt No,N° du Reçu d'Achat,
Inspection Required,Inspection obligatoire,
From BOM,De LDM,
From BOM,Depuis la nomenclature,
For Quantity,Pour la Quantité,
As per Stock UOM,Selon UDM du Stock,
Including items for sub assemblies,Incluant les articles pour des sous-ensembles,
@@ -8316,7 +8315,7 @@ Basic Rate (as per Stock UOM),Taux de base (comme lUDM du Stock),
Basic Amount,Montant de Base,
Additional Cost,Frais Supplémentaire,
Serial No / Batch,N° de Série / Lot,
BOM No. for a Finished Good Item,N° dArticle Produit Fini LDM,
BOM No. for a Finished Good Item, de nomenclature pour un dArticle (Produit Fini),
Material Request used to make this Stock Entry,Demande de Matériel utilisée pour réaliser cette Écriture de Stock,
Subcontracted Item,Article sous-traité,
Against Stock Entry,Contre entrée de stock,
@@ -8456,9 +8455,9 @@ Bank Remittance,Virement bancaire,
Batch Item Expiry Status,Statut d'Expiration d'Article du Lot,
Batch-Wise Balance History,Historique de Balance des Lots,
BOM Explorer,Explorateur de nomenclature,
BOM Search,Recherche LDM,
BOM Stock Calculated,Stock calculé par liste de matériaux (LDM),
BOM Variance Report,Rapport de variance par liste de matériaux (LDM),
BOM Search,Recherche nomenclature,
BOM Stock Calculated,Stock calculé par nomenclature,
BOM Variance Report,Rapport de variance par nomenclature,
Campaign Efficiency,Efficacité des Campagnes,
Cash Flow,Flux de Trésorerie,
Completed Work Orders,Ordres de travail terminés,
@@ -9874,3 +9873,7 @@ Convert Item Description to Clean HTML in Transactions,Convertir les description
Have Default Naming Series for Batch ID?,Nom de série par défaut pour les Lots ou Séries
"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units","Le pourcentage de quantité que vous pourrez réceptionner en plus de la quantité commandée. Par exemple, vous avez commandé 100 unités, votre pourcentage de dépassement est de 10%, vous pourrez réceptionner 110 unités"
Unit Of Measure (UOM),Unité de mesure (UDM),
Allowed Items,Articles autorisés
Party Specific Item,Restriction d'article disponible
Restrict Items Based On,Type de critére de restriction
Based On Value,critére de restriction
Can't render this file because it is too large.