Merge remote-tracking branch 'upstream/version-15-hotfix' into mergify/bp/version-15-hotfix/pr-40050

This commit is contained in:
barredterra
2025-04-08 19:59:34 +02:00
70 changed files with 1295 additions and 924 deletions

View File

@@ -62,7 +62,7 @@ New passwords will be created for the ERPNext "Administrator" user, the MariaDB
## Learning and community
1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
1. [Frappe School](https://school.frappe.io) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext.
3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers.
4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users.

View File

@@ -374,8 +374,6 @@ def auto_reconcile_vouchers(
from_reference_date=None,
to_reference_date=None,
):
frappe.flags.auto_reconcile_vouchers = True
bank_transactions = get_bank_transactions(bank_account)
if len(bank_transactions) > 10:
@@ -404,6 +402,8 @@ def auto_reconcile_vouchers(
def start_auto_reconcile(
bank_transactions, from_date, to_date, filter_by_reference_date, from_reference_date, to_reference_date
):
frappe.flags.auto_reconcile_vouchers = True
reconciled, partially_reconciled = set(), set()
for transaction in bank_transactions:
linked_payments = get_linked_payments(

View File

@@ -2,27 +2,6 @@
// For license information, please see license.txt
frappe.ui.form.on("Bank Transaction", {
onload(frm) {
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
name: ["in", payment_doctypes],
},
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
setup: function (frm) {
frm.set_query("party_type", function () {
return {
@@ -37,6 +16,35 @@ frappe.ui.form.on("Bank Transaction", {
filters: { is_company_account: 1 },
};
});
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
name: ["in", payment_doctypes],
},
};
});
frm.set_query("payment_entry", "payment_entries", function () {
return {
filters: {
docstatus: ["!=", 2],
},
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
get_payment_doctypes: function () {

View File

@@ -220,6 +220,7 @@ def get_dunning_letter_text(dunning_type: str, doc: str | dict, language: str |
if not language:
language = doc.get("language")
letter_text = None
if language:
letter_text = frappe.db.get_value(
DOCTYPE, {"parent": dunning_type, "language": language}, FIELDS, as_dict=1

View File

@@ -249,16 +249,18 @@ class PaymentEntry(AccountsController):
reference_names.add(key)
def set_bank_account_data(self):
if self.bank_account:
bank_data = get_bank_account_details(self.bank_account)
if not self.bank_account:
return
field = "paid_from" if self.payment_type == "Pay" else "paid_to"
bank_data = get_bank_account_details(self.bank_account)
self.bank = bank_data.bank
self.bank_account_no = bank_data.bank_account_no
field = "paid_from" if self.payment_type == "Pay" else "paid_to"
if not self.get(field):
self.set(field, bank_data.account)
self.bank = bank_data.bank
self.bank_account_no = bank_data.bank_account_no
if not self.get(field):
self.set(field, bank_data.account)
def validate_payment_type_with_outstanding(self):
total_outstanding = sum(d.allocated_amount for d in self.get("references"))
@@ -276,15 +278,16 @@ class PaymentEntry(AccountsController):
if self.party_type in ("Customer", "Supplier"):
self.validate_allocated_amount_with_latest_data()
else:
fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.")
for d in self.get("references"):
if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(d.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
return
# Check for negative outstanding invoices as well
if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.")
for d in self.get("references"):
if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(d.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
# Check for negative outstanding invoices as well
if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
def validate_allocated_amount_as_per_payment_request(self):
"""
@@ -322,91 +325,89 @@ class PaymentEntry(AccountsController):
return False
def validate_allocated_amount_with_latest_data(self):
if self.references:
uniq_vouchers = set([(x.reference_doctype, x.reference_name) for x in self.references])
vouchers = [frappe._dict({"voucher_type": x[0], "voucher_no": x[1]}) for x in uniq_vouchers]
latest_references = get_outstanding_reference_documents(
{
"posting_date": self.posting_date,
"company": self.company,
"party_type": self.party_type,
"payment_type": self.payment_type,
"party": self.party,
"party_account": self.paid_from if self.payment_type == "Receive" else self.paid_to,
"get_outstanding_invoices": True,
"get_orders_to_be_billed": True,
"vouchers": vouchers,
"book_advance_payments_in_separate_party_account": self.book_advance_payments_in_separate_party_account,
},
validate=True,
)
if not self.references:
return
# Group latest_references by (voucher_type, voucher_no)
latest_lookup = {}
for d in latest_references:
d = frappe._dict(d)
latest_lookup.setdefault((d.voucher_type, d.voucher_no), frappe._dict())[d.payment_term] = d
uniq_vouchers = {(x.reference_doctype, x.reference_name) for x in self.references}
vouchers = [frappe._dict({"voucher_type": x[0], "voucher_no": x[1]}) for x in uniq_vouchers]
latest_references = get_outstanding_reference_documents(
{
"posting_date": self.posting_date,
"company": self.company,
"party_type": self.party_type,
"payment_type": self.payment_type,
"party": self.party,
"party_account": self.paid_from if self.payment_type == "Receive" else self.paid_to,
"get_outstanding_invoices": True,
"get_orders_to_be_billed": True,
"vouchers": vouchers,
"book_advance_payments_in_separate_party_account": self.book_advance_payments_in_separate_party_account,
},
validate=True,
)
for idx, d in enumerate(self.get("references"), start=1):
latest = latest_lookup.get((d.reference_doctype, d.reference_name)) or frappe._dict()
# Group latest_references by (voucher_type, voucher_no)
latest_lookup = {}
for d in latest_references:
d = frappe._dict(d)
latest_lookup.setdefault((d.voucher_type, d.voucher_no), frappe._dict())[d.payment_term] = d
# If term based allocation is enabled, throw
if (
d.payment_term is None or d.payment_term == ""
) and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name):
frappe.throw(
_(
"{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section"
).format(frappe.bold(d.reference_name), frappe.bold(idx))
)
for idx, d in enumerate(self.get("references"), start=1):
latest = latest_lookup.get((d.reference_doctype, d.reference_name)) or frappe._dict()
# if no payment template is used by invoice and has a custom term(no `payment_term`), then invoice outstanding will be in 'None' key
latest = latest.get(d.payment_term) or latest.get(None)
# The reference has already been fully paid
if not latest:
frappe.throw(
_("{0} {1} has already been fully paid.").format(
_(d.reference_doctype), d.reference_name
)
)
# The reference has already been partly paid
elif (
latest.outstanding_amount < latest.invoice_amount
and flt(d.outstanding_amount, d.precision("outstanding_amount"))
!= flt(latest.outstanding_amount, d.precision("outstanding_amount"))
and d.payment_term == ""
):
frappe.throw(
_(
"{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts."
).format(_(d.reference_doctype), d.reference_name)
)
# If term based allocation is enabled, throw
if (
d.payment_term is None or d.payment_term == ""
) and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name):
frappe.throw(
_(
"{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section"
).format(frappe.bold(d.reference_name), frappe.bold(idx))
)
fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.")
# if no payment template is used by invoice and has a custom term(no `payment_term`), then invoice outstanding will be in 'None' key
latest = latest.get(d.payment_term) or latest.get(None)
# The reference has already been fully paid
if not latest:
frappe.throw(
_("{0} {1} has already been fully paid.").format(_(d.reference_doctype), d.reference_name)
)
# The reference has already been partly paid
elif (
latest.outstanding_amount < latest.invoice_amount
and flt(d.outstanding_amount, d.precision("outstanding_amount"))
!= flt(latest.outstanding_amount, d.precision("outstanding_amount"))
and d.payment_term == ""
):
frappe.throw(
_(
"{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts."
).format(_(d.reference_doctype), d.reference_name)
)
if (
d.payment_term
and (
(flt(d.allocated_amount)) > 0
and latest.payment_term_outstanding
and (flt(d.allocated_amount) > flt(latest.payment_term_outstanding))
)
and self.term_based_allocation_enabled_for_reference(
d.reference_doctype, d.reference_name
)
):
frappe.throw(
_(
"Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3}"
).format(d.idx, d.allocated_amount, latest.payment_term_outstanding, d.payment_term)
)
fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.")
if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(latest.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
if (
d.payment_term
and (
(flt(d.allocated_amount)) > 0
and latest.payment_term_outstanding
and (flt(d.allocated_amount) > flt(latest.payment_term_outstanding))
)
and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name)
):
frappe.throw(
_(
"Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3}"
).format(d.idx, d.allocated_amount, latest.payment_term_outstanding, d.payment_term)
)
# Check for negative outstanding invoices as well
if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(latest.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(latest.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
# Check for negative outstanding invoices as well
if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(latest.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
def delink_advance_entry_references(self):
for reference in self.references:
@@ -479,47 +480,48 @@ class PaymentEntry(AccountsController):
reference_exchange_details: dict | None = None,
) -> None:
for d in self.get("references"):
if d.allocated_amount:
if update_ref_details_only_for and (
(d.reference_doctype, d.reference_name) not in update_ref_details_only_for
):
if not d.allocated_amount:
continue
if update_ref_details_only_for and (
(d.reference_doctype, d.reference_name) not in update_ref_details_only_for
):
continue
ref_details = get_reference_details(
d.reference_doctype,
d.reference_name,
self.party_account_currency,
self.party_type,
self.party,
)
# Only update exchange rate when the reference is Journal Entry
if (
reference_exchange_details
and d.reference_doctype == reference_exchange_details.reference_doctype
and d.reference_name == reference_exchange_details.reference_name
):
ref_details.update({"exchange_rate": reference_exchange_details.exchange_rate})
for field, value in ref_details.items():
if d.exchange_gain_loss:
# for cases where gain/loss is booked into invoice
# exchange_gain_loss is calculated from invoice & populated
# and row.exchange_rate is already set to payment entry's exchange rate
# refer -> `update_reference_in_payment_entry()` in utils.py
continue
ref_details = get_reference_details(
d.reference_doctype,
d.reference_name,
self.party_account_currency,
self.party_type,
self.party,
)
# Only update exchange rate when the reference is Journal Entry
if (
reference_exchange_details
and d.reference_doctype == reference_exchange_details.reference_doctype
and d.reference_name == reference_exchange_details.reference_name
):
ref_details.update({"exchange_rate": reference_exchange_details.exchange_rate})
for field, value in ref_details.items():
if d.exchange_gain_loss:
# for cases where gain/loss is booked into invoice
# exchange_gain_loss is calculated from invoice & populated
# and row.exchange_rate is already set to payment entry's exchange rate
# refer -> `update_reference_in_payment_entry()` in utils.py
continue
if field == "exchange_rate" or not d.get(field) or force:
d.db_set(field, value)
if field == "exchange_rate" or not d.get(field) or force:
d.db_set(field, value)
def validate_payment_type(self):
if self.payment_type not in ("Receive", "Pay", "Internal Transfer"):
frappe.throw(_("Payment Type must be one of Receive, Pay and Internal Transfer"))
def validate_party_details(self):
if self.party:
if not frappe.db.exists(self.party_type, self.party):
frappe.throw(_("{0} {1} does not exist").format(_(self.party_type), self.party))
if self.party and not frappe.db.exists(self.party_type, self.party):
frappe.throw(_("{0} {1} does not exist").format(_(self.party_type), self.party))
def set_exchange_rate(self, ref_doc=None):
self.set_source_exchange_rate(ref_doc)
@@ -529,12 +531,8 @@ class PaymentEntry(AccountsController):
if self.paid_from:
if self.paid_from_account_currency == self.company_currency:
self.source_exchange_rate = 1
else:
if ref_doc:
if self.paid_from_account_currency == ref_doc.currency:
self.source_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get(
"conversion_rate"
)
elif ref_doc and self.paid_from_account_currency == ref_doc.currency:
self.source_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get("conversion_rate")
if not self.source_exchange_rate:
self.source_exchange_rate = get_exchange_rate(
@@ -545,9 +543,8 @@ class PaymentEntry(AccountsController):
if self.paid_from_account_currency == self.paid_to_account_currency:
self.target_exchange_rate = self.source_exchange_rate
elif self.paid_to and not self.target_exchange_rate:
if ref_doc:
if self.paid_to_account_currency == ref_doc.currency:
self.target_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get("conversion_rate")
if ref_doc and self.paid_to_account_currency == ref_doc.currency:
self.target_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get("conversion_rate")
if not self.target_exchange_rate:
self.target_exchange_rate = get_exchange_rate(
@@ -578,63 +575,61 @@ class PaymentEntry(AccountsController):
elif d.reference_name:
if not frappe.db.exists(d.reference_doctype, d.reference_name):
frappe.throw(_("{0} {1} does not exist").format(d.reference_doctype, d.reference_name))
else:
ref_doc = frappe.get_doc(d.reference_doctype, d.reference_name)
if d.reference_doctype != "Journal Entry":
if self.party != ref_doc.get(scrub(self.party_type)):
frappe.throw(
_("{0} {1} is not associated with {2} {3}").format(
_(d.reference_doctype), d.reference_name, _(self.party_type), self.party
)
)
else:
self.validate_journal_entry()
ref_doc = frappe.get_doc(d.reference_doctype, d.reference_name)
if d.reference_doctype in frappe.get_hooks("invoice_doctypes"):
if self.party_type == "Customer":
ref_party_account = (
get_party_account_based_on_invoice_discounting(d.reference_name)
or ref_doc.debit_to
)
elif self.party_type == "Supplier":
ref_party_account = ref_doc.credit_to
elif self.party_type == "Employee":
ref_party_account = ref_doc.payable_account
if (
ref_party_account != self.party_account
and not self.book_advance_payments_in_separate_party_account
):
frappe.throw(
_("{0} {1} is associated with {2}, but Party Account is {3}").format(
_(d.reference_doctype),
d.reference_name,
ref_party_account,
self.party_account,
)
)
if ref_doc.doctype == "Purchase Invoice" and ref_doc.get("on_hold"):
frappe.throw(
_("{0} {1} is on hold").format(_(d.reference_doctype), d.reference_name),
title=_("Invalid Purchase Invoice"),
)
if ref_doc.docstatus != 1:
if d.reference_doctype != "Journal Entry":
if self.party != ref_doc.get(scrub(self.party_type)):
frappe.throw(
_("{0} {1} must be submitted").format(_(d.reference_doctype), d.reference_name)
_("{0} {1} is not associated with {2} {3}").format(
_(d.reference_doctype), d.reference_name, _(self.party_type), self.party
)
)
else:
self.validate_journal_entry()
if d.reference_doctype in frappe.get_hooks("invoice_doctypes"):
if self.party_type == "Customer":
ref_party_account = (
get_party_account_based_on_invoice_discounting(d.reference_name)
or ref_doc.debit_to
)
elif self.party_type == "Supplier":
ref_party_account = ref_doc.credit_to
elif self.party_type == "Employee":
ref_party_account = ref_doc.payable_account
if (
ref_party_account != self.party_account
and not self.book_advance_payments_in_separate_party_account
):
frappe.throw(
_("{0} {1} is associated with {2}, but Party Account is {3}").format(
_(d.reference_doctype),
d.reference_name,
ref_party_account,
self.party_account,
)
)
if ref_doc.doctype == "Purchase Invoice" and ref_doc.get("on_hold"):
frappe.throw(
_("{0} {1} is on hold").format(_(d.reference_doctype), d.reference_name),
title=_("Invalid Purchase Invoice"),
)
if ref_doc.docstatus != 1:
frappe.throw(
_("{0} {1} must be submitted").format(_(d.reference_doctype), d.reference_name)
)
def get_valid_reference_doctypes(self):
if self.party_type == "Customer":
return ("Sales Order", "Sales Invoice", "Journal Entry", "Dunning", "Payment Entry")
elif self.party_type in ["Shareholder", "Employee"]:
return ("Journal Entry",)
elif self.party_type == "Supplier":
return ("Purchase Order", "Purchase Invoice", "Journal Entry", "Payment Entry")
elif self.party_type == "Shareholder":
return ("Journal Entry",)
elif self.party_type == "Employee":
return ("Journal Entry",)
def validate_paid_invoices(self):
no_oustanding_refs = {}
@@ -700,37 +695,39 @@ class PaymentEntry(AccountsController):
invoice_paid_amount_map = {}
for ref in self.get("references"):
if ref.payment_term and ref.reference_name:
key = (ref.payment_term, ref.reference_name, ref.reference_doctype)
invoice_payment_amount_map.setdefault(key, 0.0)
invoice_payment_amount_map[key] += ref.allocated_amount
if not ref.payment_term or not ref.reference_name:
continue
if not invoice_paid_amount_map.get(key):
payment_schedule = frappe.get_all(
"Payment Schedule",
filters={"parent": ref.reference_name},
fields=[
"paid_amount",
"payment_amount",
"payment_term",
"discount",
"outstanding",
"discount_type",
],
)
for term in payment_schedule:
invoice_key = (term.payment_term, ref.reference_name, ref.reference_doctype)
invoice_paid_amount_map.setdefault(invoice_key, {})
invoice_paid_amount_map[invoice_key]["outstanding"] = term.outstanding
if not (term.discount_type and term.discount):
continue
key = (ref.payment_term, ref.reference_name, ref.reference_doctype)
invoice_payment_amount_map.setdefault(key, 0.0)
invoice_payment_amount_map[key] += ref.allocated_amount
if term.discount_type == "Percentage":
invoice_paid_amount_map[invoice_key]["discounted_amt"] = ref.total_amount * (
term.discount / 100
)
else:
invoice_paid_amount_map[invoice_key]["discounted_amt"] = term.discount
if not invoice_paid_amount_map.get(key):
payment_schedule = frappe.get_all(
"Payment Schedule",
filters={"parent": ref.reference_name},
fields=[
"paid_amount",
"payment_amount",
"payment_term",
"discount",
"outstanding",
"discount_type",
],
)
for term in payment_schedule:
invoice_key = (term.payment_term, ref.reference_name, ref.reference_doctype)
invoice_paid_amount_map.setdefault(invoice_key, {})
invoice_paid_amount_map[invoice_key]["outstanding"] = term.outstanding
if not (term.discount_type and term.discount):
continue
if term.discount_type == "Percentage":
invoice_paid_amount_map[invoice_key]["discounted_amt"] = ref.total_amount * (
term.discount / 100
)
else:
invoice_paid_amount_map[invoice_key]["discounted_amt"] = term.discount
for idx, (key, allocated_amount) in enumerate(invoice_payment_amount_map.items(), 1):
if not invoice_paid_amount_map.get(key):
@@ -977,14 +974,14 @@ class PaymentEntry(AccountsController):
applicable_tax = 0
base_applicable_tax = 0
for tax in self.get("taxes"):
if not tax.included_in_paid_amount:
amount = -1 * tax.tax_amount if tax.add_deduct_tax == "Deduct" else tax.tax_amount
base_amount = (
-1 * tax.base_tax_amount if tax.add_deduct_tax == "Deduct" else tax.base_tax_amount
)
if tax.included_in_paid_amount:
continue
applicable_tax += amount
base_applicable_tax += base_amount
amount = -1 * tax.tax_amount if tax.add_deduct_tax == "Deduct" else tax.tax_amount
base_amount = -1 * tax.base_tax_amount if tax.add_deduct_tax == "Deduct" else tax.base_tax_amount
applicable_tax += amount
base_applicable_tax += base_amount
self.paid_amount_after_tax = flt(
flt(self.paid_amount) + flt(applicable_tax), self.precision("paid_amount_after_tax")
@@ -1648,25 +1645,27 @@ class PaymentEntry(AccountsController):
def add_deductions_gl_entries(self, gl_entries):
for d in self.get("deductions"):
if d.amount:
account_currency = get_account_currency(d.account)
if account_currency != self.company_currency:
frappe.throw(_("Currency for {0} must be {1}").format(d.account, self.company_currency))
if not d.amount:
continue
gl_entries.append(
self.get_gl_dict(
{
"account": d.account,
"account_currency": account_currency,
"against": self.party or self.paid_from,
"debit_in_account_currency": d.amount,
"debit_in_transaction_currency": d.amount / self.transaction_exchange_rate,
"debit": d.amount,
"cost_center": d.cost_center,
},
item=d,
)
account_currency = get_account_currency(d.account)
if account_currency != self.company_currency:
frappe.throw(_("Currency for {0} must be {1}").format(d.account, self.company_currency))
gl_entries.append(
self.get_gl_dict(
{
"account": d.account,
"account_currency": account_currency,
"against": self.party or self.paid_from,
"debit_in_account_currency": d.amount,
"debit_in_transaction_currency": d.amount / self.transaction_exchange_rate,
"debit": d.amount,
"cost_center": d.cost_center,
},
item=d,
)
)
def get_party_account_for_taxes(self):
if self.payment_type == "Receive":

View File

@@ -1,9 +1,9 @@
import json
import frappe
from frappe import _, qb
from frappe import _
from frappe.model.document import Document
from frappe.query_builder.functions import Abs, Sum
from frappe.query_builder.functions import Sum
from frappe.utils import flt, nowdate
from frappe.utils.background_jobs import enqueue
@@ -12,7 +12,6 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_accounting_dimensions,
)
from erpnext.accounts.doctype.payment_entry.payment_entry import (
get_company_defaults,
get_payment_entry,
)
from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate
@@ -120,13 +119,13 @@ class PaymentRequest(Document):
title=_("Invalid Amount"),
)
existing_payment_request_amount = flt(
get_existing_payment_request_amount(self.reference_doctype, self.reference_name)
)
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if not hasattr(ref_doc, "order_type") or ref_doc.order_type != "Shopping Cart":
ref_amount = get_amount(ref_doc, self.payment_account)
if not ref_amount:
frappe.throw(_("Payment Entry is already created"))
existing_payment_request_amount = flt(get_existing_payment_request_amount(ref_doc))
if existing_payment_request_amount + flt(self.grand_total) > ref_amount:
frappe.throw(
@@ -544,6 +543,8 @@ def make_payment_request(**args):
gateway_account = get_gateway_details(args) or frappe._dict()
grand_total = get_amount(ref_doc, gateway_account.get("payment_account"))
if not grand_total:
frappe.throw(_("Payment Entry is already created"))
if args.loyalty_points and args.dt == "Sales Order":
from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points
@@ -554,19 +555,8 @@ def make_payment_request(**args):
frappe.db.set_value("Sales Order", args.dn, "loyalty_amount", loyalty_amount, update_modified=False)
grand_total = grand_total - loyalty_amount
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party")) if args.get("party_type") else ""
)
draft_payment_request = frappe.db.get_value(
"Payment Request",
{"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": 0},
)
# fetches existing payment request `grand_total` amount
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name)
existing_paid_amount = get_existing_paid_amount(ref_doc.doctype, ref_doc.name)
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc)
def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount):
grand_total -= existing_payment_request_amount
@@ -578,7 +568,7 @@ def make_payment_request(**args):
if args.order_type == "Shopping Cart":
# If Payment Request is in an advanced stage, then create for remaining amount.
if get_existing_payment_request_amount(
ref_doc.doctype, ref_doc.name, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"]
ref_doc, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"]
):
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
else:
@@ -587,14 +577,10 @@ def make_payment_request(**args):
else:
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
if existing_paid_amount:
if ref_doc.party_account_currency == ref_doc.currency:
if ref_doc.conversion_rate:
grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate)
else:
grand_total -= flt(existing_paid_amount)
else:
grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate)
draft_payment_request = frappe.db.get_value(
"Payment Request",
{"reference_doctype": ref_doc.doctype, "reference_name": ref_doc.name, "docstatus": 0},
)
if draft_payment_request:
frappe.db.set_value(
@@ -602,6 +588,11 @@ def make_payment_request(**args):
)
pr = frappe.get_doc("Payment Request", draft_payment_request)
else:
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party"))
if args.get("party_type")
else ""
)
pr = frappe.new_doc("Payment Request")
if not args.get("payment_request_type"):
@@ -675,22 +666,35 @@ def make_payment_request(**args):
def get_amount(ref_doc, payment_account=None):
"""get amount based on doctype"""
grand_total = 0
dt = ref_doc.doctype
if dt in ["Sales Order", "Purchase Order"]:
grand_total = flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)
grand_total = (flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)) - ref_doc.advance_paid
elif dt in ["Sales Invoice", "Purchase Invoice"]:
if not ref_doc.get("is_pos"):
if (
dt == "Sales Invoice"
and ref_doc.is_pos
and ref_doc.payments
and any(
[
payment.type == "Phone" and payment.account == payment_account
for payment in ref_doc.payments
]
)
):
grand_total = sum(
[
payment.amount
for payment in ref_doc.payments
if payment.type == "Phone" and payment.account == payment_account
]
)
else:
if ref_doc.party_account_currency == ref_doc.currency:
grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total)
grand_total = flt(ref_doc.outstanding_amount)
else:
grand_total = flt(
flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate
)
elif dt == "Sales Invoice":
for pay in ref_doc.payments:
if pay.type == "Phone" and pay.account == payment_account:
grand_total = pay.amount
break
grand_total = flt(flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate)
elif dt == "POS Invoice":
for pay in ref_doc.payments:
if pay.type == "Phone" and pay.account == payment_account:
@@ -699,10 +703,7 @@ def get_amount(ref_doc, payment_account=None):
elif dt == "Fees":
grand_total = ref_doc.outstanding_amount
if grand_total > 0:
return flt(grand_total, get_currency_precision())
else:
frappe.throw(_("Payment Entry is already created"))
return flt(grand_total, get_currency_precision()) if grand_total > 0 else 0
def get_irequest_status(payment_requests: None | list = None) -> list:
@@ -745,7 +746,7 @@ def cancel_old_payment_requests(ref_dt, ref_dn):
frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled")
def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list:
def get_existing_payment_request_amount(ref_doc, statuses: list | None = None) -> list:
"""
Return the total amount of Payment Requests against a reference document.
"""
@@ -753,9 +754,9 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None =
query = (
frappe.qb.from_(PR)
.select(Sum(PR.grand_total))
.where(PR.reference_doctype == ref_dt)
.where(PR.reference_name == ref_dn)
.select(Sum(PR.outstanding_amount))
.where(PR.reference_doctype == ref_doc.doctype)
.where(PR.reference_name == ref_doc.name)
.where(PR.docstatus == 1)
)
@@ -764,43 +765,12 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None =
response = query.run()
return response[0][0] if response[0] else 0
os_amount_in_transaction_currency = flt(response[0][0] if response[0] else 0)
if ref_doc.currency != ref_doc.party_account_currency:
os_amount_in_transaction_currency = flt(os_amount_in_transaction_currency / ref_doc.conversion_rate)
def get_existing_paid_amount(doctype, name):
PLE = frappe.qb.DocType("Payment Ledger Entry")
PER = frappe.qb.DocType("Payment Entry Reference")
query = (
frappe.qb.from_(PLE)
.left_join(PER)
.on(
(PLE.against_voucher_type == PER.reference_doctype)
& (PLE.against_voucher_no == PER.reference_name)
& (PLE.voucher_type == PER.parenttype)
& (PLE.voucher_no == PER.parent)
)
.select(
Abs(Sum(PLE.amount)).as_("total_amount"),
Abs(Sum(frappe.qb.terms.Case().when(PER.payment_request.isnotnull(), PLE.amount).else_(0))).as_(
"request_paid_amount"
),
)
.where(
(PLE.voucher_type.isin([doctype, "Journal Entry", "Payment Entry"]))
& (PLE.against_voucher_type == doctype)
& (PLE.against_voucher_no == name)
& (PLE.delinked == 0)
& (PLE.docstatus == 1)
& (PLE.amount < 0)
)
)
result = query.run()
ledger_amount = flt(result[0][0]) if result else 0
request_paid_amount = flt(result[0][1]) if result else 0
return ledger_amount - request_paid_amount
return os_amount_in_transaction_currency
def get_gateway_details(args): # nosemgrep

View File

@@ -313,6 +313,16 @@ class TestPaymentRequest(FrappeTestCase):
self.assertEqual(pr.outstanding_amount, 800)
self.assertEqual(pr.grand_total, 1000)
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
make_payment_request,
dt="Sales Order",
dn=so.name,
mute_email=1,
submit_doc=1,
return_doc=1,
)
# complete payment
pe = pr.create_payment_entry()
@@ -331,7 +341,7 @@ class TestPaymentRequest(FrappeTestCase):
# creating a more payment Request must not allowed
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
re.compile(r"Payment Entry is already created"),
make_payment_request,
dt="Sales Order",
dn=so.name,
@@ -361,6 +371,17 @@ class TestPaymentRequest(FrappeTestCase):
self.assertEqual(pr.party_account_currency, "INR")
self.assertEqual(pr.status, "Initiated")
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
make_payment_request,
dt="Purchase Invoice",
dn=pi.name,
mute_email=1,
submit_doc=1,
return_doc=1,
)
# to make partial payment
pe = pr.create_payment_entry(submit=False)
pe.paid_amount = 2000
@@ -389,7 +410,7 @@ class TestPaymentRequest(FrappeTestCase):
# creating a more payment Request must not allowed
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
re.compile(r"Payment Entry is already created"),
make_payment_request,
dt="Purchase Invoice",
dn=pi.name,

View File

@@ -124,6 +124,11 @@ class POSClosingEntry(StatusUpdater):
def on_submit(self):
consolidate_pos_invoices(closing_entry=self)
frappe.publish_realtime(
f"poe_{self.pos_opening_entry}_closed",
self,
docname=f"POS Opening Entry/{self.pos_opening_entry}",
)
def on_cancel(self):
unconsolidate_pos_invoices(closing_entry=self)

View File

@@ -196,6 +196,7 @@ class POSInvoice(SalesInvoice):
# run on validate method of selling controller
super(SalesInvoice, self).validate()
self.validate_pos_opening_entry()
self.validate_auto_set_posting_time()
self.validate_mode_of_payment()
self.validate_uom_is_integer("stock_uom", "stock_qty")
@@ -320,6 +321,18 @@ class POSInvoice(SalesInvoice):
_("Payment related to {0} is not completed").format(pay.mode_of_payment)
)
def validate_pos_opening_entry(self):
opening_entries = frappe.get_list(
"POS Opening Entry", filters={"pos_profile": self.pos_profile, "status": "Open", "docstatus": 1}
)
if len(opening_entries) == 0:
frappe.throw(
title=_("POS Opening Entry Missing"),
msg=_("No open POS Opening Entry found for POS Profile {0}.").format(
frappe.bold(self.pos_profile)
),
)
def validate_stock_availablility(self):
if self.is_return:
return

View File

@@ -26,6 +26,12 @@ class TestPOSInvoice(unittest.TestCase):
make_stock_entry(target="_Test Warehouse - _TC", item_code="_Test Item", qty=800, basic_rate=100)
frappe.db.sql("delete from `tabTax Rule`")
from erpnext.accounts.doctype.pos_closing_entry.test_pos_closing_entry import init_user_and_profile
from erpnext.accounts.doctype.pos_opening_entry.test_pos_opening_entry import create_opening_entry
cls.test_user, cls.pos_profile = init_user_and_profile()
create_opening_entry(cls.pos_profile, cls.test_user)
def tearDown(self):
if frappe.session.user != "Administrator":
frappe.set_user("Administrator")

View File

@@ -70,3 +70,6 @@ class POSOpeningEntry(StatusUpdater):
def on_submit(self):
self.set_status(update=True)
def on_cancel(self):
self.set_status(update=True)

View File

@@ -2094,7 +2094,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
1,
)
pi = make_pi_from_pr(pr.name)
self.assertEqual(pi.payment_schedule[0].payment_amount, 2500)
self.assertEqual(pi.payment_schedule[0].payment_amount, 1000)
automatically_fetch_payment_terms(enable=0)
frappe.db.set_value(

View File

@@ -267,8 +267,8 @@ class SalesInvoice(SellingController):
self.indicator_title = _("Paid")
def validate(self):
super().validate()
self.validate_auto_set_posting_time()
super().validate()
if not (self.is_pos or self.is_debit_note):
self.so_dn_required()

View File

@@ -4284,6 +4284,35 @@ class TestSalesInvoice(FrappeTestCase):
pos_return = make_sales_return(pos.name)
self.assertEqual(abs(pos_return.payments[0].amount), pos.payments[0].amount)
def test_create_return_invoice_for_self_update(self):
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.controllers.sales_and_purchase_return import make_return_doc
invoice = create_sales_invoice()
payment_entry = get_payment_entry(dt=invoice.doctype, dn=invoice.name)
payment_entry.reference_no = "test001"
payment_entry.reference_date = getdate()
payment_entry.save()
payment_entry.submit()
r_invoice = make_return_doc(invoice.doctype, invoice.name)
r_invoice.update_outstanding_for_self = 0
r_invoice.save()
self.assertEqual(r_invoice.update_outstanding_for_self, 1)
r_invoice.submit()
self.assertNotEqual(r_invoice.outstanding_amount, 0)
invoice.reload()
self.assertEqual(invoice.outstanding_amount, 0)
def test_prevents_fully_returned_invoice_with_zero_quantity(self):
from erpnext.controllers.sales_and_purchase_return import StockOverReturnError, make_return_doc

View File

@@ -164,7 +164,7 @@ frappe.query_reports["Accounts Payable"] = {
},
};
erpnext.utils.add_dimensions("Accounts Payable", 9);
erpnext.utils.add_dimensions("Accounts Payable", 10);
function get_party_type_options() {
let options = [];

View File

@@ -282,4 +282,4 @@
{% } %}
</tbody>
</table>
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
<p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>

View File

@@ -21,7 +21,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
def tearDown(self):
frappe.db.rollback()
def create_sales_invoice(self, no_payment_schedule=False, do_not_submit=False):
def create_sales_invoice(self, no_payment_schedule=False, do_not_submit=False, **args):
frappe.set_user("Administrator")
si = create_sales_invoice(
item=self.item,
@@ -34,6 +34,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
rate=100,
price_list_rate=100,
do_not_save=1,
**args,
)
if not no_payment_schedule:
si.append(
@@ -108,7 +109,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
self.assertEqual(expected_data[0], [row.invoiced, row.paid, row.credit_note])
pos_inv.cancel()
def test_accounts_receivable(self):
def test_accounts_receivable_with_payment(self):
filters = {
"company": self.company,
"based_on_payment_terms": 1,
@@ -145,11 +146,15 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
cr_note = self.create_credit_note(si.name, do_not_submit=True)
cr_note.update_outstanding_for_self = False
cr_note.save().submit()
# as the invoice partially paid and returning the full amount so the outstanding amount should be True
self.assertEqual(cr_note.update_outstanding_for_self, True)
report = execute(filters)
expected_data_after_credit_note = [100, 0, 0, 40, -40, self.debit_to]
expected_data_after_credit_note = [0, 0, 100, 0, -100, self.debit_to]
row = report[1][0]
row = report[1][-1]
self.assertEqual(
expected_data_after_credit_note,
[
@@ -162,6 +167,99 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
],
)
def test_accounts_receivable_without_payment(self):
filters = {
"company": self.company,
"based_on_payment_terms": 1,
"report_date": today(),
"range": "30, 60, 90, 120",
"show_remarks": True,
}
# check invoice grand total and invoiced column's value for 3 payment terms
si = self.create_sales_invoice()
report = execute(filters)
expected_data = [[100, 30, "No Remarks"], [100, 50, "No Remarks"], [100, 20, "No Remarks"]]
for i in range(3):
row = report[1][i - 1]
self.assertEqual(expected_data[i - 1], [row.invoice_grand_total, row.invoiced, row.remarks])
# check invoice grand total, invoiced, paid and outstanding column's value after credit note
cr_note = self.create_credit_note(si.name, do_not_submit=True)
cr_note.update_outstanding_for_self = False
cr_note.save().submit()
self.assertEqual(cr_note.update_outstanding_for_self, False)
report = execute(filters)
row = report[1]
self.assertTrue(len(row) == 0)
def test_accounts_receivable_with_partial_payment(self):
filters = {
"company": self.company,
"based_on_payment_terms": 1,
"report_date": today(),
"range": "30, 60, 90, 120",
"show_remarks": True,
}
# check invoice grand total and invoiced column's value for 3 payment terms
si = self.create_sales_invoice(qty=2)
report = execute(filters)
expected_data = [[200, 60, "No Remarks"], [200, 100, "No Remarks"], [200, 40, "No Remarks"]]
for i in range(3):
row = report[1][i - 1]
self.assertEqual(expected_data[i - 1], [row.invoice_grand_total, row.invoiced, row.remarks])
# check invoice grand total, invoiced, paid and outstanding column's value after payment
self.create_payment_entry(si.name)
report = execute(filters)
expected_data_after_payment = [[200, 60, 40, 20], [200, 100, 0, 100], [200, 40, 0, 40]]
for i in range(3):
row = report[1][i - 1]
self.assertEqual(
expected_data_after_payment[i - 1],
[row.invoice_grand_total, row.invoiced, row.paid, row.outstanding],
)
# check invoice grand total, invoiced, paid and outstanding column's value after credit note
cr_note = self.create_credit_note(si.name, do_not_submit=True)
cr_note.update_outstanding_for_self = False
cr_note.save().submit()
self.assertFalse(cr_note.update_outstanding_for_self)
report = execute(filters)
expected_data_after_credit_note = [
[200, 100, 0, 80, 20, self.debit_to],
[200, 40, 0, 0, 40, self.debit_to],
]
for i in range(2):
row = report[1][i - 1]
self.assertEqual(
expected_data_after_credit_note[i - 1],
[
row.invoice_grand_total,
row.invoiced,
row.paid,
row.credit_note,
row.outstanding,
row.party_account,
],
)
def test_cr_note_flag_to_update_self(self):
filters = {
"company": self.company,

View File

@@ -1,6 +1,3 @@
<div style="margin-bottom: 7px;">
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2>
<h4 class="text-center">{%= filters.account && (filters.account + ", "+filters.report_date) || "" %} {%= filters.company %}</h4>
<hr>
@@ -46,4 +43,4 @@
{% } %}
</tbody>
</table>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
<p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>

View File

@@ -67,5 +67,5 @@
</tbody>
</table>
<p class="text-right text-muted">
Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}
{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}
</p>

View File

@@ -79,4 +79,4 @@
{% } %}
</tbody>
</table>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
<p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>

View File

@@ -52,11 +52,6 @@ frappe.query_reports["General Ledger"] = {
frappe.query_report.set_filter_value("group_by", "Group by Voucher (Consolidated)");
},
},
{
fieldname: "against_voucher_no",
label: __("Against Voucher No"),
fieldtype: "Data",
},
{
fieldtype: "Break",
},
@@ -66,7 +61,7 @@ frappe.query_reports["General Ledger"] = {
fieldtype: "Autocomplete",
options: Object.keys(frappe.boot.party_account_types),
on_change: function () {
frappe.query_report.set_filter_value("party", "");
frappe.query_report.set_filter_value("party", []);
},
},
{

View File

@@ -224,9 +224,6 @@ def get_conditions(filters):
if filters.get("voucher_no"):
conditions.append("voucher_no=%(voucher_no)s")
if filters.get("against_voucher_no"):
conditions.append("against_voucher=%(against_voucher_no)s")
if filters.get("ignore_err"):
err_journals = frappe.db.get_all(
"Journal Entry",
@@ -490,9 +487,6 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, tot
data[key][rev_dr_or_cr] = 0
data[key][rev_dr_or_cr + "_in_account_currency"] = 0
if data[key].against_voucher and gle.against_voucher:
data[key].against_voucher += ", " + gle.against_voucher
from_date, to_date = getdate(filters.from_date), getdate(filters.to_date)
show_opening_entries = filters.get("show_opening_entries")
@@ -695,14 +689,6 @@ def get_columns(filters):
columns.extend(
[
{"label": _("Against Voucher Type"), "fieldname": "against_voucher_type", "width": 100},
{
"label": _("Against Voucher"),
"fieldname": "against_voucher",
"fieldtype": "Dynamic Link",
"options": "against_voucher_type",
"width": 100,
},
{"label": _("Supplier Invoice No"), "fieldname": "bill_no", "fieldtype": "Data", "width": 100},
]
)

View File

@@ -11,7 +11,7 @@ import erpnext
from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import (
add_sub_total_row,
add_total_row,
apply_group_by_conditions,
apply_order_by_conditions,
get_grand_total,
get_group_by_and_display_fields,
get_tax_accounts,
@@ -305,12 +305,6 @@ def apply_conditions(query, pi, pii, filters):
if filters.get("item_group"):
query = query.where(pii.item_group == filters.get("item_group"))
if not filters.get("group_by"):
query = query.orderby(pi.posting_date, order=Order.desc)
query = query.orderby(pii.item_group, order=Order.desc)
else:
query = apply_group_by_conditions(query, pi, pii, filters)
return query
@@ -372,7 +366,17 @@ def get_items(filters, additional_table_columns):
query = apply_conditions(query, pi, pii, filters)
return query.run(as_dict=True)
from frappe.desk.reportview import build_match_conditions
query, params = query.walk()
match_conditions = build_match_conditions("Sales Invoice")
if match_conditions:
query += " and " + match_conditions
query = apply_order_by_conditions(query, pi, pii, filters)
return frappe.db.sql(query, params, as_dict=True)
def get_aii_accounts():

View File

@@ -384,27 +384,24 @@ def apply_conditions(query, si, sii, filters, additional_conditions=None):
| (si.unrealized_profit_loss_account == filters.get("income_account"))
)
if not filters.get("group_by"):
query = query.orderby(si.posting_date, order=Order.desc)
query = query.orderby(sii.item_group, order=Order.desc)
else:
query = apply_group_by_conditions(query, si, sii, filters)
for key, value in (additional_conditions or {}).items():
query = query.where(si[key] == value)
return query
def apply_group_by_conditions(query, si, ii, filters):
if filters.get("group_by") == "Invoice":
query = query.orderby(ii.parent, order=Order.desc)
def apply_order_by_conditions(query, si, ii, filters):
if not filters.get("group_by"):
query += f" order by {si.posting_date} desc, {ii.item_group} desc"
elif filters.get("group_by") == "Invoice":
query += f" order by {ii.parent} desc"
elif filters.get("group_by") == "Item":
query = query.orderby(ii.item_code)
query += f" order by {ii.item_code}"
elif filters.get("group_by") == "Item Group":
query = query.orderby(ii.item_group)
query += f" order by {ii.item_group}"
elif filters.get("group_by") in ("Customer", "Customer Group", "Territory", "Supplier"):
query = query.orderby(si[frappe.scrub(filters.get("group_by"))])
filter_field = frappe.scrub(filters.get("group_by"))
query += f" order by {filter_field} desc"
return query
@@ -479,7 +476,17 @@ def get_items(filters, additional_query_columns, additional_conditions=None):
query = apply_conditions(query, si, sii, filters, additional_conditions)
return query.run(as_dict=True)
from frappe.desk.reportview import build_match_conditions
query, params = query.walk()
match_conditions = build_match_conditions("Sales Invoice")
if match_conditions:
query += " and " + match_conditions
query = apply_order_by_conditions(query, si, sii, filters)
return frappe.db.sql(query, params, as_dict=True)
def get_delivery_notes_against_sales_order(item_list):

View File

@@ -397,7 +397,6 @@ def get_invoices(filters, additional_query_columns):
pi.mode_of_payment,
)
.where(pi.docstatus == 1)
.orderby(pi.posting_date, pi.name, order=Order.desc)
)
if additional_query_columns:
@@ -421,8 +420,17 @@ def get_invoices(filters, additional_query_columns):
)
query = query.where(pi.credit_to.isin(party_account))
invoices = query.run(as_dict=True)
return invoices
from frappe.desk.reportview import build_match_conditions
query, params = query.walk()
match_conditions = build_match_conditions("Purchase Invoice")
if match_conditions:
query += " and " + match_conditions
query += " order by posting_date desc, name desc"
return frappe.db.sql(query, params, as_dict=True)
def get_conditions(filters, query, doctype):

View File

@@ -439,7 +439,6 @@ def get_invoices(filters, additional_query_columns):
si.company,
)
.where(si.docstatus == 1)
.orderby(si.posting_date, si.name, order=Order.desc)
)
if additional_query_columns:
@@ -457,8 +456,17 @@ def get_invoices(filters, additional_query_columns):
filters, query, doctype="Sales Invoice", child_doctype="Sales Invoice Item"
)
invoices = query.run(as_dict=True)
return invoices
from frappe.desk.reportview import build_match_conditions
query, params = query.walk()
match_conditions = build_match_conditions("Sales Invoice")
if match_conditions:
query += " and " + match_conditions
query += " order by posting_date desc, name desc"
return frappe.db.sql(query, params, as_dict=True)
def get_conditions(filters, query, doctype):

View File

@@ -1854,14 +1854,17 @@ def update_voucher_outstanding(voucher_type, voucher_no, account, party_type, pa
):
outstanding = voucher_outstanding[0]
ref_doc = frappe.get_doc(voucher_type, voucher_no)
outstanding_amount = flt(
outstanding["outstanding_in_account_currency"], ref_doc.precision("outstanding_amount")
)
# Didn't use db_set for optimisation purpose
ref_doc.outstanding_amount = outstanding["outstanding_in_account_currency"] or 0.0
ref_doc.outstanding_amount = outstanding_amount
frappe.db.set_value(
voucher_type,
voucher_no,
"outstanding_amount",
outstanding["outstanding_in_account_currency"] or 0.0,
outstanding_amount,
)
ref_doc.set_status(update=True)

View File

@@ -621,7 +621,7 @@
"doc_view": "List",
"label": "Learn Accounting",
"type": "URL",
"url": "https://frappe.school/courses/erpnext-accounting?utm_source=in_app"
"url": "https://school.frappe.io/lms/courses/erpnext-accounting?utm_source=in_app"
},
{
"label": "Chart of Accounts",
@@ -670,4 +670,4 @@
}
],
"title": "Accounting"
}
}

View File

@@ -22,15 +22,27 @@ frappe.listview_settings["Purchase Order"] = {
return [
__("To Receive and Bill"),
"orange",
"per_received,<,100|per_billed,<,100|status,!=,Closed",
"per_received,<,100|per_billed,<,100|status,!=,Closed|docstatus,=,1",
];
} else {
return [__("To Receive"), "orange", "per_received,<,100|per_billed,=,100|status,!=,Closed"];
return [
__("To Receive"),
"orange",
"per_received,<,100|per_billed,=,100|status,!=,Closed|docstatus,=,1",
];
}
} else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) < 100 && doc.status !== "Closed") {
return [__("To Bill"), "orange", "per_received,=,100|per_billed,<,100|status,!=,Closed"];
return [
__("To Bill"),
"orange",
"per_received,=,100|per_billed,<,100|status,!=,Closed|docstatus,=,1",
];
} else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) == 100 && doc.status !== "Closed") {
return [__("Completed"), "green", "per_received,=,100|per_billed,=,100|status,!=,Closed"];
return [
__("Completed"),
"green",
"per_received,=,100|per_billed,=,100|status,!=,Closed|docstatus,=,1",
];
}
},
onload: function (listview) {

View File

@@ -94,9 +94,6 @@
</script>
</head>
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h4 class="text-center">{%= filters.item %} </h4>
@@ -124,9 +121,7 @@
</tbody>
</table>
<h4 class="text-center"> Analysis Chart </h4>
<h4 class="text-center">{%= __("Analysis Chart") %}</h4>
<div id="chart_div"></div>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
<p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>

View File

@@ -537,7 +537,7 @@
"doc_view": "List",
"label": "Learn Procurement",
"type": "URL",
"url": "https://frappe.school/courses/procurement?utm_source=in_app"
"url": "https://school.frappe.io/lms/courses/procurement?utm_source=in_app"
},
{
"color": "Yellow",
@@ -572,4 +572,4 @@
}
],
"title": "Buying"
}
}

View File

@@ -165,6 +165,48 @@ class AccountsController(TransactionBase):
raise_exception=1,
)
def validate_against_voucher_outstanding(self):
from frappe.model.meta import get_meta
if not get_meta(self.doctype).has_field("outstanding_amount"):
return
if self.get("is_return") and self.return_against and not self.get("is_pos"):
against_voucher_outstanding = frappe.get_value(
self.doctype, self.return_against, "outstanding_amount"
)
document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note"
msg = ""
if self.get("update_outstanding_for_self"):
msg = (
"We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, "
"uncheck '{2}' checkbox. <br><br>Or"
).format(
frappe.bold(document_type),
get_link_to_form(self.doctype, self.get("return_against")),
frappe.bold(_("Update Outstanding for Self")),
)
elif not self.update_outstanding_for_self and (
abs(flt(self.rounded_total) or flt(self.grand_total)) > flt(against_voucher_outstanding)
):
self.update_outstanding_for_self = 1
msg = (
"The outstanding amount {} in {} is lesser than {}. Updating the outstanding to this invoice. <br><br>And"
).format(
against_voucher_outstanding,
get_link_to_form(self.doctype, self.get("return_against")),
flt(abs(self.outstanding_amount)),
)
if msg:
msg += " you can use {} tool to reconcile against {} later.".format(
get_link_to_form("Payment Reconciliation", "Payment Reconciliation"),
get_link_to_form(self.doctype, self.get("return_against")),
)
frappe.msgprint(_(msg))
def validate(self):
if not self.get("is_return") and not self.get("is_debit_note"):
self.validate_qty_is_not_zero()
@@ -193,6 +235,7 @@ class AccountsController(TransactionBase):
self.disable_tax_included_prices_for_internal_transfer()
self.set_incoming_rate()
self.init_internal_values()
self.validate_against_voucher_outstanding()
# Need to set taxes based on taxes_and_charges template
# before calculating taxes and totals
@@ -228,20 +271,6 @@ class AccountsController(TransactionBase):
)
)
if self.get("is_return") and self.get("return_against") and not self.get("is_pos"):
if self.get("update_outstanding_for_self"):
document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note"
frappe.msgprint(
_(
"We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, uncheck '{2}' checkbox. <br><br> Or you can use {3} tool to reconcile against {1} later."
).format(
frappe.bold(document_type),
get_link_to_form(self.doctype, self.get("return_against")),
frappe.bold(_("Update Outstanding for Self")),
get_link_to_form("Payment Reconciliation", "Payment Reconciliation"),
)
)
pos_check_field = "is_pos" if self.doctype == "Sales Invoice" else "is_paid"
if cint(self.allocate_advances_automatically) and not cint(self.get(pos_check_field)):
self.set_advances()
@@ -2328,7 +2357,9 @@ class AccountsController(TransactionBase):
and automatically_fetch_payment_terms
and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype)
):
self.fetch_payment_terms_from_order(po_or_so, doctype)
self.fetch_payment_terms_from_order(
po_or_so, doctype, grand_total, base_grand_total, automatically_fetch_payment_terms
)
if self.get("payment_terms_template"):
self.ignore_default_payment_terms_template = 1
elif self.get("payment_terms_template"):
@@ -2372,7 +2403,9 @@ class AccountsController(TransactionBase):
d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount")
)
else:
self.fetch_payment_terms_from_order(po_or_so, doctype)
self.fetch_payment_terms_from_order(
po_or_so, doctype, grand_total, base_grand_total, automatically_fetch_payment_terms
)
self.ignore_default_payment_terms_template = 1
def get_order_details(self):
@@ -2410,7 +2443,9 @@ class AccountsController(TransactionBase):
def linked_order_has_payment_schedule(self, po_or_so):
return frappe.get_all("Payment Schedule", filters={"parent": po_or_so})
def fetch_payment_terms_from_order(self, po_or_so, po_or_so_doctype):
def fetch_payment_terms_from_order(
self, po_or_so, po_or_so_doctype, grand_total, base_grand_total, automatically_fetch_payment_terms
):
"""
Fetch Payment Terms from Purchase/Sales Order on creating a new Purchase/Sales Invoice.
"""
@@ -2426,12 +2461,25 @@ class AccountsController(TransactionBase):
"invoice_portion": schedule.invoice_portion,
"mode_of_payment": schedule.mode_of_payment,
"description": schedule.description,
"payment_amount": schedule.payment_amount,
"base_payment_amount": schedule.base_payment_amount,
"outstanding": schedule.outstanding,
"paid_amount": schedule.paid_amount,
}
if automatically_fetch_payment_terms:
payment_schedule["payment_amount"] = flt(
grand_total * flt(payment_schedule["invoice_portion"]) / 100,
schedule.precision("payment_amount"),
)
payment_schedule["base_payment_amount"] = flt(
base_grand_total * flt(payment_schedule["invoice_portion"]) / 100,
schedule.precision("base_payment_amount"),
)
payment_schedule["outstanding"] = payment_schedule["payment_amount"]
else:
payment_schedule["base_payment_amount"] = flt(
schedule.base_payment_amount * self.get("conversion_rate"),
schedule.precision("base_payment_amount"),
)
if schedule.discount_type == "Percentage":
payment_schedule["discount_type"] = schedule.discount_type
payment_schedule["discount"] = schedule.discount

View File

@@ -898,3 +898,32 @@ def get_filtered_child_rows(doctype, txt, searchfield, start, page_len, filters)
)
return query.run(as_dict=False)
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_item_uom_query(doctype, txt, searchfield, start, page_len, filters):
if frappe.db.get_single_value("Stock Settings", "allow_uom_with_conversion_rate_defined_in_item"):
query_filters = {"parent": filters.get("item_code")}
if txt:
query_filters["uom"] = ["like", f"%{txt}%"]
return frappe.get_all(
"UOM Conversion Detail",
filters=query_filters,
fields=["uom", "conversion_factor"],
limit_start=start,
limit_page_length=page_len,
order_by="idx",
as_list=1,
)
return frappe.get_all(
"UOM",
filters={"name": ["like", f"%{txt}%"]},
fields=["name"],
limit_start=start,
limit_page_length=page_len,
as_list=1,
)

View File

@@ -774,7 +774,7 @@ class StockController(AccountsController):
if row.get("batch_no"):
update_values["batch_no"] = None
if row.serial_and_batch_bundle:
if row.get("serial_and_batch_bundle"):
update_values["serial_and_batch_bundle"] = None
frappe.db.set_value(
"Serial and Batch Bundle", row.serial_and_batch_bundle, {"is_cancelled": 1}
@@ -1631,6 +1631,8 @@ def is_reposting_pending():
def future_sle_exists(args, sl_entries=None, allow_force_reposting=True):
from erpnext.stock.utils import get_combine_datetime
if allow_force_reposting and frappe.db.get_single_value(
"Stock Reposting Settings", "do_reposting_for_each_stock_transaction"
):
@@ -1652,14 +1654,15 @@ def future_sle_exists(args, sl_entries=None, allow_force_reposting=True):
or_conditions = get_conditions_to_validate_future_sle(sl_entries)
args["posting_datetime"] = get_combine_datetime(args["posting_date"], args["posting_time"])
data = frappe.db.sql(
"""
select item_code, warehouse, count(name) as total_row
from `tabStock Ledger Entry` force index (item_warehouse)
from `tabStock Ledger Entry`
where
({})
and timestamp(posting_date, posting_time)
>= timestamp(%(posting_date)s, %(posting_time)s)
and posting_datetime >= %(posting_datetime)s
and voucher_no != %(voucher_no)s
and is_cancelled = 0
GROUP BY

View File

@@ -743,7 +743,9 @@ class SubcontractingController(StockController):
):
continue
if self.doctype == self.subcontract_data.order_doctype or self.backflush_based_on == "BOM":
if self.doctype == self.subcontract_data.order_doctype or (
self.backflush_based_on == "BOM" or self.is_return
):
for bom_item in self.__get_materials_from_bom(
row.item_code, row.bom, row.get("include_exploded_items")
):

View File

@@ -377,9 +377,7 @@ class calculate_taxes_and_totals:
self._calculate()
def calculate_taxes(self):
rounding_adjustment_computed = self.doc.get("is_consolidated") and self.doc.get("rounding_adjustment")
if not rounding_adjustment_computed:
self.doc.rounding_adjustment = 0
self.grand_total_diff = 0
# maintain actual tax rate based on idx
actual_tax_dict = dict(
@@ -446,9 +444,8 @@ class calculate_taxes_and_totals:
and self.discount_amount_applied
and self.doc.discount_amount
and self.doc.apply_discount_on == "Grand Total"
and not rounding_adjustment_computed
):
self.doc.rounding_adjustment = flt(
self.grand_total_diff = flt(
self.doc.grand_total - flt(self.doc.discount_amount) - tax.total,
self.doc.precision("rounding_adjustment"),
)
@@ -552,11 +549,11 @@ class calculate_taxes_and_totals:
return self.adjust_grand_total_for_inclusive_tax()
def adjust_grand_total_for_inclusive_tax(self):
# if fully inclusive taxes and diff
# if any inclusive taxes and diff
if self.doc.get("taxes") and any(cint(t.included_in_print_rate) for t in self.doc.get("taxes")):
last_tax = self.doc.get("taxes")[-1]
non_inclusive_tax_amount = sum(
flt(d.tax_amount_after_discount_amount)
self.get_tax_amount_if_for_valuation_or_deduction(d.tax_amount_after_discount_amount, d)
for d in self.doc.get("taxes")
if not d.included_in_print_rate
)
@@ -573,27 +570,23 @@ class calculate_taxes_and_totals:
diff = flt(diff, self.doc.precision("rounding_adjustment"))
if diff and abs(diff) <= (5.0 / 10 ** last_tax.precision("tax_amount")):
self.doc.grand_total_diff = diff
else:
self.doc.grand_total_diff = 0
self.grand_total_diff = diff
def calculate_totals(self):
if self.doc.get("taxes"):
self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt(
self.doc.get("grand_total_diff")
)
self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + self.grand_total_diff
else:
self.doc.grand_total = flt(self.doc.net_total)
if self.doc.get("taxes"):
self.doc.total_taxes_and_charges = flt(
self.doc.grand_total - self.doc.net_total - flt(self.doc.get("grand_total_diff")),
self.doc.grand_total - self.doc.net_total - self.grand_total_diff,
self.doc.precision("total_taxes_and_charges"),
)
else:
self.doc.total_taxes_and_charges = 0.0
self._set_in_company_currency(self.doc, ["total_taxes_and_charges", "rounding_adjustment"])
self._set_in_company_currency(self.doc, ["total_taxes_and_charges"])
if self.doc.doctype in [
"Quotation",
@@ -643,7 +636,9 @@ class calculate_taxes_and_totals:
if self.doc.meta.get_field("rounded_total"):
if self.doc.is_rounded_total_disabled():
self.doc.rounded_total = self.doc.base_rounded_total = 0
self.doc.rounded_total = 0
self.doc.base_rounded_total = 0
self.doc.rounding_adjustment = 0
return
self.doc.rounded_total = round_based_on_smallest_currency_fraction(
@@ -824,9 +819,12 @@ class calculate_taxes_and_totals:
if (
self.doc.is_return
and self.doc.return_against
and not self.doc.update_outstanding_for_self
and not self.doc.get("is_pos")
or self.is_internal_invoice()
):
# Do not calculate the outstanding amount for a return invoice if 'update_outstanding_for_self' is not enabled.
self.doc.outstanding_amount = 0
return
self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"])

View File

@@ -1496,11 +1496,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
fields = ["name", "item_name", "item_group", "description"]
fields.extend([field for field in searchfields if field not in ["name", "item_group", "description"]])
searchfields = searchfields + [
field
for field in [searchfield or "name", "item_code", "item_group", "item_name"]
if field not in searchfields
]
if not searchfields:
searchfields = ["name"]
query_filters = {"disabled": 0, "ifnull(end_of_life, '3099-12-31')": (">", today())}

View File

@@ -1616,7 +1616,7 @@ def create_job_card(work_order, row, enable_capacity_planning=False, auto_create
"posting_date": nowdate(),
"for_quantity": row.job_card_qty or work_order.get("qty", 0),
"operation_id": row.get("name"),
"bom_no": row.get("bom"),
"bom_no": row.get("bom") or work_order.bom_no,
"project": work_order.project,
"company": work_order.company,
"sequence_id": row.get("sequence_id"),

View File

@@ -336,7 +336,7 @@
"doc_view": "List",
"label": "Learn Manufacturing",
"type": "URL",
"url": "https://frappe.school/courses/manufacturing?utm_source=in_app"
"url": "https://school.frappe.io/lms/courses/manufacturing?utm_source=in_app"
},
{
"color": "Grey",
@@ -402,4 +402,4 @@
],
"title": "Manufacturing",
"type": "Workspace"
}
}

View File

@@ -210,7 +210,7 @@
"doc_view": "List",
"label": "Learn Project Management",
"type": "URL",
"url": "https://frappe.school/courses/project-management?utm_source=in_app"
"url": "https://school.frappe.io/lms/courses/project-management?utm_source=in_app"
},
{
"color": "Blue",
@@ -245,4 +245,4 @@
}
],
"title": "Projects"
}
}

View File

@@ -343,7 +343,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
calculate_taxes() {
var me = this;
this.frm.doc.rounding_adjustment = 0;
this.grand_total_diff = 0;
var actual_tax_dict = {};
// maintain actual tax rate based on idx
@@ -417,7 +417,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
// adjust Discount Amount loss in last tax iteration
if ((i == me.frm.doc["taxes"].length - 1) && me.discount_amount_applied
&& me.frm.doc.apply_discount_on == "Grand Total" && me.frm.doc.discount_amount) {
me.frm.doc.rounding_adjustment = flt(me.frm.doc.grand_total -
me.grand_total_diff = flt(me.frm.doc.grand_total -
flt(me.frm.doc.discount_amount) - tax.total, precision("rounding_adjustment"));
}
}
@@ -535,7 +535,8 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
adjust_grand_total_for_inclusive_tax() {
var me = this;
// if fully inclusive taxes and diff
// if any inclusive taxes and diff
if (this.frm.doc["taxes"] && this.frm.doc["taxes"].length) {
var any_inclusive_tax = false;
$.each(this.frm.doc.taxes || [], function(i, d) {
@@ -546,7 +547,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
var non_inclusive_tax_amount = frappe.utils.sum($.map(this.frm.doc.taxes || [],
function(d) {
if(!d.included_in_print_rate) {
return flt(d.tax_amount_after_discount_amount);
let tax_amount = d.category === "Valuation" ? 0 : d.tax_amount_after_discount_amount;
if (d.add_deduct_tax === "Deduct") tax_amount *= -1;
return tax_amount;
}
}
));
@@ -560,9 +563,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
diff = flt(diff, precision("rounding_adjustment"));
if ( diff && Math.abs(diff) <= (5.0 / Math.pow(10, precision("tax_amount", last_tax))) ) {
me.frm.doc.grand_total_diff = diff;
} else {
me.frm.doc.grand_total_diff = 0;
me.grand_total_diff = diff;
}
}
}
@@ -573,7 +574,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
var me = this;
var tax_count = this.frm.doc["taxes"] ? this.frm.doc["taxes"].length : 0;
this.frm.doc.grand_total = flt(tax_count
? this.frm.doc["taxes"][tax_count - 1].total + flt(this.frm.doc.grand_total_diff)
? this.frm.doc["taxes"][tax_count - 1].total + this.grand_total_diff
: this.frm.doc.net_total);
if(["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"].includes(this.frm.doc.doctype)) {
@@ -605,9 +606,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
}
this.frm.doc.total_taxes_and_charges = flt(this.frm.doc.grand_total - this.frm.doc.net_total
- flt(this.frm.doc.grand_total_diff), precision("total_taxes_and_charges"));
- this.grand_total_diff, precision("total_taxes_and_charges"));
this.set_in_company_currency(this.frm.doc, ["total_taxes_and_charges", "rounding_adjustment"]);
this.set_in_company_currency(this.frm.doc, ["total_taxes_and_charges"]);
// Round grand total as per precision
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "base_grand_total"]);
@@ -627,6 +628,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
if (cint(disable_rounded_total)) {
this.frm.doc.rounded_total = 0;
this.frm.doc.base_rounded_total = 0;
this.frm.doc.rounding_adjustment = 0;
return;
}

View File

@@ -150,6 +150,19 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
});
}
if (this.frm.fields_dict["items"].grid.get_field("uom")) {
this.frm.set_query("uom", "items", function(doc, cdt, cdn) {
let row = locals[cdt][cdn];
return {
query: "erpnext.controllers.queries.get_item_uom_query",
filters: {
"item_code": row.item_code
}
};
});
}
if(
this.frm.docstatus < 2
&& this.frm.fields_dict["payment_terms_template"]
@@ -238,6 +251,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
}
}
use_serial_batch_fields(frm, cdt, cdn) {
const item = locals[cdt][cdn];
if (!item.use_serial_batch_fields) {
frappe.model.set_value(cdt, cdn, "serial_no", "");
frappe.model.set_value(cdt, cdn, "batch_no", "");
frappe.model.set_value(cdt, cdn, "rejected_serial_no", "");
}
}
set_fields_onload_for_line_item() {
if (this.frm.is_new() && this.frm.doc?.items) {
this.frm.doc.items.forEach(item => {

View File

@@ -263,6 +263,10 @@ $.extend(erpnext.utils, {
fieldname: dimension["fieldname"],
label: __(dimension["doctype"]),
fieldtype: "MultiSelectList",
depends_on:
report_name === "Stock Balance"
? "eval:doc.show_dimension_wise_stock === 1"
: "",
get_data: function (txt) {
return frappe.db.get_link_options(dimension["doctype"], txt);
},

View File

@@ -91,7 +91,13 @@ erpnext.accounts.unreconcile_payment = {
read_only: 1,
options: "account_currency",
},
{ label: __("Currency"), fieldname: "account_currency", fieldtype: "Currency", read_only: 1 },
{
label: __("Currency"),
fieldname: "account_currency",
fieldtype: "Link",
options: "Currency",
read_only: 1,
},
];
let unreconcile_dialog_fields = [
{
@@ -121,10 +127,10 @@ erpnext.accounts.unreconcile_payment = {
};
let d = new frappe.ui.Dialog({
title: "UnReconcile Allocations",
title: __("UnReconcile Allocations"),
fields: unreconcile_dialog_fields,
size: "large",
primary_action_label: "UnReconcile",
primary_action_label: __("UnReconcile"),
primary_action(values) {
let selected_allocations = values.allocations.filter((x) => x.__checked);
if (selected_allocations.length > 0) {
@@ -138,7 +144,7 @@ erpnext.accounts.unreconcile_payment = {
);
d.hide();
} else {
frappe.msgprint("No Selection");
frappe.msgprint(__("No Selection"));
}
},
});

View File

@@ -18,7 +18,6 @@ frappe.ui.form.on("Customer", {
frm.add_fetch("lead_name", "company_name", "customer_name");
frm.add_fetch("default_sales_partner", "commission_rate", "default_commission_rate");
frm.set_query("customer_group", { is_group: 0 });
frm.set_query("default_price_list", { selling: 1 });
frm.set_query("account", "accounts", function (doc, cdt, cdn) {
let d = locals[cdt][cdn];

View File

@@ -15,7 +15,7 @@ def get_data():
"transactions": [
{"label": _("Pre Sales"), "items": ["Opportunity", "Quotation"]},
{"label": _("Orders"), "items": ["Sales Order", "Delivery Note", "Sales Invoice"]},
{"label": _("Payments"), "items": ["Payment Entry", "Bank Account"]},
{"label": _("Payments"), "items": ["Payment Entry", "Bank Account", "Dunning"]},
{
"label": _("Support"),
"items": ["Issue", "Maintenance Visit", "Installation Note", "Warranty Claim"],

View File

@@ -69,6 +69,8 @@ frappe.ui.form.on("Quotation", {
erpnext.selling.QuotationController = class QuotationController extends erpnext.selling.SellingController {
onload(doc, dt, dn) {
super.onload(doc, dt, dn);
this.frm.trigger("disable_customer_if_creating_from_opportunity");
}
party_name() {
var me = this;
@@ -373,6 +375,12 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
);
}
}
disable_customer_if_creating_from_opportunity(doc) {
if (doc.opportunity) {
this.frm.set_df_property("party_name", "read_only", 1);
}
}
};
cur_frm.script_manager.make(erpnext.selling.QuotationController);

View File

@@ -875,7 +875,7 @@ def make_material_request(source_name, target_doc=None):
"field_map": {
"name": "sales_order_item",
"parent": "sales_order",
"delivery_date": "required_by",
"delivery_date": "schedule_date",
"bom_no": "bom_no",
},
"condition": lambda item: not frappe.db.exists(

View File

@@ -23,10 +23,18 @@ frappe.listview_settings["Sales Order"] = {
} else if (!doc.skip_delivery_note && flt(doc.per_delivered) < 100) {
if (frappe.datetime.get_diff(doc.delivery_date) < 0) {
// not delivered & overdue
return [__("Overdue"), "red", "per_delivered,<,100|delivery_date,<,Today|status,!=,Closed"];
return [
__("Overdue"),
"red",
"per_delivered,<,100|delivery_date,<,Today|status,!=,Closed|docstatus,=,1",
];
} else if (flt(doc.grand_total) === 0) {
// not delivered (zeroount order)
return [__("To Deliver"), "orange", "per_delivered,<,100|grand_total,=,0|status,!=,Closed"];
return [
__("To Deliver"),
"orange",
"per_delivered,<,100|grand_total,=,0|status,!=,Closed|docstatus,=,1",
];
} else if (flt(doc.per_billed) < 100) {
// not delivered & not billed
return [

View File

@@ -149,6 +149,26 @@ erpnext.PointOfSale.Controller = class {
this.make_app();
},
});
frappe.realtime.on(`poe_${this.pos_opening}_closed`, (data) => {
const route = frappe.get_route_str();
if (data && route == "point-of-sale") {
frappe.dom.freeze();
frappe.msgprint({
title: __("POS Closed"),
indicator: "orange",
message: __("POS has been closed at {0}. Please refresh the page.", [
frappe.datetime.str_to_user(data.creation).bold(),
]),
primary_action_label: __("Refresh"),
primary_action: {
action() {
window.location.reload();
},
},
});
}
});
}
set_opening_entry_status() {

View File

@@ -639,7 +639,7 @@
"doc_view": "List",
"label": "Learn Sales Management",
"type": "URL",
"url": "https://frappe.school/courses/sales-management-course?utm_source=in_app"
"url": "https://school.frappe.io/lms/courses/sales-management-course?utm_source=in_app"
},
{
"label": "Point of Sale",
@@ -676,5 +676,6 @@
"type": "Dashboard"
}
],
"title": "Selling"
}
"title": "Selling",
"type": "Workspace"
}

View File

@@ -10,6 +10,14 @@ from frappe.model.document import Document
from frappe.utils import cint, comma_and, create_batch, get_link_to_form
from frappe.utils.background_jobs import get_job, is_job_enqueued
LEDGER_ENTRY_DOCTYPES = frozenset(
(
"GL Entry",
"Payment Ledger Entry",
"Stock Ledger Entry",
)
)
class TransactionDeletionRecord(Document):
# begin: auto-generated types
@@ -475,31 +483,31 @@ def get_doctypes_to_be_ignored():
@frappe.whitelist()
def is_deletion_doc_running(company: str | None = None, err_msg: str | None = None):
if company:
if running_deletion_jobs := frappe.db.get_all(
"Transaction Deletion Record",
filters={"docstatus": 1, "company": company, "status": "Running"},
):
if not err_msg:
err_msg = ""
frappe.throw(
title=_("Deletion in Progress!"),
msg=_("Transaction Deletion Document: {0} is running for this Company. {1}").format(
get_link_to_form("Transaction Deletion Record", running_deletion_jobs[0].name), err_msg
),
)
if not company:
return
running_deletion_job = frappe.db.get_value(
"Transaction Deletion Record",
{"docstatus": 1, "company": company, "status": "Running"},
"name",
)
if not running_deletion_job:
return
frappe.throw(
title=_("Deletion in Progress!"),
msg=_("Transaction Deletion Document: {0} is running for this Company. {1}").format(
get_link_to_form("Transaction Deletion Record", running_deletion_job), err_msg or ""
),
)
def check_for_running_deletion_job(doc, method=None):
# Check if DocType has 'company' field
if doc.doctype not in ("GL Entry", "Payment Ledger Entry", "Stock Ledger Entry"):
df = qb.DocType("DocField")
if (
qb.from_(df)
.select(df.parent)
.where((df.fieldname == "company") & (df.parent == doc.doctype))
.run()
):
is_deletion_doc_running(
doc.company, _("Cannot make any transactions until the deletion job is completed")
)
if doc.doctype in LEDGER_ENTRY_DOCTYPES or not doc.meta.has_field("company"):
return
is_deletion_doc_running(
doc.company, _("Cannot make any transactions until the deletion job is completed")
)

View File

@@ -182,7 +182,7 @@ def add_standard_navbar_items():
{
"item_label": "Frappe School",
"item_type": "Route",
"route": "https://frappe.school?utm_source=in_app",
"route": "https://frappe.io/school?utm_source=in_app",
"is_standard": 1,
},
{

View File

@@ -195,6 +195,7 @@ class DeprecatedBatchNoValuation:
@deprecated
def set_balance_value_for_non_batchwise_valuation_batches(self):
self.last_sle = self.get_last_sle_for_non_batch()
self.set_balance_value_from_sl_entries()
self.set_balance_value_from_bundle()
@@ -242,11 +243,10 @@ class DeprecatedBatchNoValuation:
for d in batch_data:
self.available_qty[d.batch_no] += flt(d.batch_qty)
last_sle = self.get_last_sle_for_non_batch()
for d in batch_data:
if self.available_qty.get(d.batch_no):
self.non_batchwise_balance_value[d.batch_no] += flt(last_sle.stock_value)
self.non_batchwise_balance_qty[d.batch_no] += flt(last_sle.qty_after_transaction)
self.non_batchwise_balance_value[d.batch_no] += flt(self.last_sle.stock_value)
self.non_batchwise_balance_qty[d.batch_no] += flt(self.last_sle.qty_after_transaction)
def get_last_sle_for_non_batch(self):
from erpnext.stock.utils import get_combine_datetime
@@ -285,60 +285,8 @@ class DeprecatedBatchNoValuation:
query = query.where(sle.name != self.sle.name)
data = query.run(as_dict=True)
return data[0] if data else {}
@deprecated
def get_last_sle_for_sabb_no_batchwise_valuation(self):
sabb = frappe.qb.DocType("Serial and Batch Bundle")
sabb_entry = frappe.qb.DocType("Serial and Batch Entry")
batch = frappe.qb.DocType("Batch")
posting_datetime = CombineDatetime(self.sle.posting_date, self.sle.posting_time)
timestamp_condition = CombineDatetime(sabb.posting_date, sabb.posting_time) < posting_datetime
if self.sle.creation:
timestamp_condition |= (
CombineDatetime(sabb.posting_date, sabb.posting_time) == posting_datetime
) & (sabb.creation < self.sle.creation)
query = (
frappe.qb.from_(sabb)
.inner_join(sabb_entry)
.on(sabb.name == sabb_entry.parent)
.inner_join(batch)
.on(sabb_entry.batch_no == batch.name)
.select(sabb.name)
.where(
(sabb.item_code == self.sle.item_code)
& (sabb.warehouse == self.sle.warehouse)
& (sabb_entry.batch_no.isnotnull())
& (sabb.is_cancelled == 0)
& (sabb.docstatus == 1)
)
.where(timestamp_condition)
.orderby(sabb.posting_date, order=Order.desc)
.orderby(sabb.posting_time, order=Order.desc)
.orderby(sabb.creation, order=Order.desc)
.limit(1)
)
if self.sle.voucher_detail_no:
query = query.where(sabb.voucher_detail_no != self.sle.voucher_detail_no)
query = query.where(sabb.voucher_type != "Pick List")
data = query.run(as_dict=True)
if not data:
return {}
sle = frappe.db.get_value(
"Stock Ledger Entry",
{"serial_and_batch_bundle": data[0].name},
["stock_value", "qty_after_transaction"],
as_dict=1,
)
return sle if sle else {}
return data[0] if data else frappe._dict()
@deprecated
def set_balance_value_from_bundle(self) -> None:
@@ -389,10 +337,9 @@ class DeprecatedBatchNoValuation:
for d in batch_data:
self.available_qty[d.batch_no] += flt(d.batch_qty)
last_sle = self.get_last_sle_for_sabb_no_batchwise_valuation()
if not last_sle:
if not self.last_sle:
return
for batch_no in self.available_qty:
self.non_batchwise_balance_value[batch_no] = flt(last_sle.stock_value)
self.non_batchwise_balance_qty[batch_no] = flt(last_sle.qty_after_transaction)
self.non_batchwise_balance_value[batch_no] = flt(self.last_sle.stock_value)
self.non_batchwise_balance_qty[batch_no] = flt(self.last_sle.qty_after_transaction)

View File

@@ -19,9 +19,9 @@ frappe.listview_settings["Delivery Note"] = {
} else if (doc.status === "Return Issued") {
return [__("Return Issued"), "grey", "status,=,Return Issued"];
} else if (flt(doc.per_billed, 2) < 100) {
return [__("To Bill"), "orange", "per_billed,<,100"];
return [__("To Bill"), "orange", "per_billed,<,100|docstatus,=,1"];
} else if (flt(doc.per_billed, 2) === 100) {
return [__("Completed"), "green", "per_billed,=,100"];
return [__("Completed"), "green", "per_billed,=,100|docstatus,=,1"];
}
},
onload: function (doclist) {

View File

@@ -1196,7 +1196,7 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0):
return out
def get_purchase_voucher_details(doctype, item_code, document_name):
def get_purchase_voucher_details(doctype, item_code, document_name=None):
parent_doc = frappe.qb.DocType(doctype)
child_doc = frappe.qb.DocType(doctype + " Item")
@@ -1215,9 +1215,11 @@ def get_purchase_voucher_details(doctype, item_code, document_name):
)
.where(parent_doc.docstatus == 1)
.where(child_doc.item_code == item_code)
.where(parent_doc.name != document_name)
)
if document_name:
query = query.where(parent_doc.name != document_name)
if doctype in ("Purchase Receipt", "Purchase Invoice"):
query = query.select(parent_doc.posting_date, parent_doc.posting_time)
query = query.orderby(

View File

@@ -13,7 +13,7 @@ frappe.listview_settings["Material Request"] = {
return [__("Completed"), "green"];
}
} else if (doc.docstatus == 1 && flt(doc.per_ordered, precision) == 0) {
return [__("Pending"), "orange", "per_ordered,=,0"];
return [__("Pending"), "orange", "per_ordered,=,0|docstatus,=,1"];
} else if (
doc.docstatus == 1 &&
flt(doc.per_ordered, precision) < 100 &&

View File

@@ -16,13 +16,13 @@ frappe.listview_settings["Purchase Receipt"] = {
} else if (doc.status === "Closed") {
return [__("Closed"), "green", "status,=,Closed"];
} else if (flt(doc.per_returned, 2) === 100) {
return [__("Return Issued"), "grey", "per_returned,=,100"];
return [__("Return Issued"), "grey", "per_returned,=,100|docstatus,=,1"];
} else if (flt(doc.grand_total) !== 0 && flt(doc.per_billed, 2) == 0) {
return [__("To Bill"), "orange", "per_billed,<,100"];
return [__("To Bill"), "orange", "per_billed,<,100|docstatus,=,1"];
} else if (flt(doc.per_billed, 2) > 0 && flt(doc.per_billed, 2) < 100) {
return [__("Partly Billed"), "yellow", "per_billed,<,100"];
return [__("Partly Billed"), "yellow", "per_billed,<,100|docstatus,=,1"];
} else if (flt(doc.grand_total) === 0 || flt(doc.per_billed, 2) === 100) {
return [__("Completed"), "green", "per_billed,=,100"];
return [__("Completed"), "green", "per_billed,=,100|docstatus,=,1"];
}
},

View File

@@ -197,8 +197,19 @@ class QualityInspection(Document):
self.quality_inspection_template = template
self.get_item_specification_details()
def on_update(self):
if (
frappe.db.get_single_value("Stock Settings", "action_if_quality_inspection_is_not_submitted")
== "Warn"
):
self.update_qc_reference()
def on_submit(self):
self.update_qc_reference()
if (
frappe.db.get_single_value("Stock Settings", "action_if_quality_inspection_is_not_submitted")
== "Stop"
):
self.update_qc_reference()
def on_cancel(self):
self.ignore_linked_doctypes = "Serial and Batch Bundle"
@@ -206,15 +217,15 @@ class QualityInspection(Document):
self.update_qc_reference()
def on_trash(self):
self.update_qc_reference()
self.update_qc_reference(remove_reference=True)
def validate_readings_status_mandatory(self):
for reading in self.readings:
if not reading.status:
frappe.throw(_("Row #{0}: Status is mandatory").format(reading.idx))
def update_qc_reference(self):
quality_inspection = self.name if self.docstatus == 1 else ""
def update_qc_reference(self, remove_reference=False):
quality_inspection = self.name if self.docstatus < 2 and not remove_reference else ""
if self.reference_type == "Job Card":
if self.reference_name:
@@ -244,7 +255,7 @@ class QualityInspection(Document):
)
)
if self.batch_no and self.docstatus == 1:
if self.batch_no and self.docstatus < 2:
query = query.where(child_doc.batch_no == self.batch_no)
if self.docstatus == 2: # if cancel, then remove qi link wherever same name

View File

@@ -2103,7 +2103,8 @@ def get_auto_batch_nos(kwargs):
filter_zero_near_batches(available_batches, kwargs)
if not kwargs.consider_negative_batches:
available_batches = list(filter(lambda x: x.qty > 0, available_batches))
precision = frappe.get_precision("Stock Ledger Entry", "actual_qty")
available_batches = [d for d in available_batches if flt(d.qty, precision) > 0]
if not qty:
return available_batches

View File

@@ -1907,6 +1907,59 @@ class TestStockEntry(FrappeTestCase):
self.assertEqual(sle.stock_value_difference, 100)
self.assertEqual(sle.stock_value, 100 * i)
def test_stock_entry_amount(self):
warehouse = "_Test Warehouse - _TC"
rm_item_code = "Test Stock Entry Amount 1"
make_item(rm_item_code, {"is_stock_item": 1})
fg_item_code = "Test Repack Stock Entry Amount 1"
make_item(fg_item_code, {"is_stock_item": 1})
make_stock_entry(
item_code=rm_item_code,
qty=1,
to_warehouse=warehouse,
basic_rate=200,
posting_date=nowdate(),
)
se = make_stock_entry(
item_code=rm_item_code,
qty=1,
purpose="Repack",
basic_rate=100,
do_not_save=True,
)
se.items[0].s_warehouse = warehouse
se.append(
"items",
{
"item_code": fg_item_code,
"qty": 1,
"t_warehouse": warehouse,
"uom": "Nos",
"conversion_factor": 1.0,
},
)
se.set_stock_entry_type()
se.submit()
self.assertEqual(se.items[0].amount, 200)
self.assertEqual(se.items[0].basic_amount, 200)
make_stock_entry(
item_code=rm_item_code,
qty=1,
to_warehouse=warehouse,
basic_rate=300,
posting_date=add_days(nowdate(), -1),
)
se.reload()
self.assertEqual(se.items[0].amount, 300)
self.assertEqual(se.items[0].basic_amount, 300)
def make_serialized_item(**args):
args = frappe._dict(args)

View File

@@ -22,6 +22,8 @@
"allow_to_edit_stock_uom_qty_for_sales",
"column_break_lznj",
"allow_to_edit_stock_uom_qty_for_purchase",
"section_break_ylhd",
"allow_uom_with_conversion_rate_defined_in_item",
"stock_validations_tab",
"section_break_9",
"over_delivery_receipt_allowance",
@@ -490,6 +492,17 @@
{
"fieldname": "column_break_wslv",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ylhd",
"fieldtype": "Section Break"
},
{
"default": "0",
"description": "If enabled, the system will allow selecting UOMs in sales and purchase transactions only if the conversion rate is set in the item master.",
"fieldname": "allow_uom_with_conversion_rate_defined_in_item",
"fieldtype": "Check",
"label": "Allow UOM with Conversion Rate Defined in Item"
}
],
"icon": "icon-cog",
@@ -497,7 +510,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-02-28 16:08:35.938840",
"modified": "2025-03-31 15:34:20.752065",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Settings",
@@ -518,7 +531,7 @@
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_field": "creation",
"sort_order": "ASC",
"states": [],
"track_changes": 1

View File

@@ -33,6 +33,7 @@ class StockSettings(Document):
allow_partial_reservation: DF.Check
allow_to_edit_stock_uom_qty_for_purchase: DF.Check
allow_to_edit_stock_uom_qty_for_sales: DF.Check
allow_uom_with_conversion_rate_defined_in_item: DF.Check
auto_create_serial_and_batch_bundle_for_outward: DF.Check
auto_indent: DF.Check
auto_insert_price_list_rate_if_missing: DF.Check

View File

@@ -406,16 +406,17 @@ class StockBalanceReport:
},
]
for dimension in get_inventory_dimensions():
columns.append(
{
"label": _(dimension.doctype),
"fieldname": dimension.fieldname,
"fieldtype": "Link",
"options": dimension.doctype,
"width": 110,
}
)
if self.filters.get("show_dimension_wise_stock"):
for dimension in get_inventory_dimensions():
columns.append(
{
"label": _(dimension.doctype),
"fieldname": dimension.fieldname,
"fieldtype": "Link",
"options": dimension.doctype,
"width": 110,
}
)
columns.extend(
[

View File

@@ -1238,7 +1238,11 @@ class update_entries_after:
stock_entry.db_update()
for d in stock_entry.items:
# Update only the row that matches the voucher_detail_no or the row containing the FG/Scrap Item.
if d.name == voucher_detail_no or (not d.s_warehouse and d.t_warehouse):
if (
d.name == voucher_detail_no
or (not d.s_warehouse and d.t_warehouse)
or stock_entry.purpose in ["Manufacture", "Repack"]
):
d.db_update()
def update_rate_on_delivery_and_sales_return(self, sle, outgoing_rate):

View File

@@ -802,7 +802,7 @@
"doc_view": "List",
"label": "Learn Inventory Management",
"type": "URL",
"url": "https://frappe.school/courses/inventory-management?utm_source=in_app"
"url": "https://school.frappe.io/lms/courses/inventory-management?utm_source=in_app"
},
{
"color": "Yellow",
@@ -850,4 +850,4 @@
}
],
"title": "Stock"
}
}

View File

@@ -475,7 +475,7 @@ def get_repeated(values):
def get_documents_with_active_service_level_agreement():
sla_doctypes = frappe.cache().hget("service_level_agreement", "active")
sla_doctypes = frappe.cache.get_value("doctypes_with_active_sla")
if sla_doctypes is None:
return set_documents_with_active_service_level_agreement()
@@ -484,20 +484,22 @@ def get_documents_with_active_service_level_agreement():
def set_documents_with_active_service_level_agreement():
active = [
active = frozenset(
sla.document_type for sla in frappe.get_all("Service Level Agreement", fields=["document_type"])
]
frappe.cache().hset("service_level_agreement", "active", active)
)
frappe.cache.set_value("doctypes_with_active_sla", active)
return active
def apply(doc, method=None):
# Applies SLA to document on validate
flags = frappe.local.flags
if (
frappe.flags.in_patch
or frappe.flags.in_migrate
or frappe.flags.in_install
or frappe.flags.in_setup_wizard
flags.in_patch
or flags.in_migrate
or flags.in_install
or flags.in_setup_wizard
or doc.doctype not in get_documents_with_active_service_level_agreement()
):
return

View File

@@ -40,7 +40,7 @@
<p>
<a href="/api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request?dn={{ doc.name }}&dt={{ doc.doctype }}&submit_doc=1&order_type=Shopping Cart"
class="btn btn-primary btn-sm" id="pay-for-order">
{{ _("Pay", null, "Amount") }} {{doc.get_formatted("grand_total") }}
{{ _("Pay", null, "Amount") }} {{ pay_amount }}
</a>
</p>
</div>

View File

@@ -6,6 +6,7 @@ from frappe import _
from erpnext.accounts.doctype.payment_request.payment_request import (
ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST,
get_amount,
)
@@ -50,11 +51,7 @@ def get_context(context):
)
context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points"))
context.show_pay_button = (
"payments" in frappe.get_installed_apps()
and frappe.db.get_single_value("Buying Settings", "show_pay_button")
and context.doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST
)
context.show_pay_button, context.pay_amount = get_payment_details(context.doc)
context.show_make_pi_button = False
if context.doc.get("supplier"):
# show Make Purchase Invoice button based on permission
@@ -67,3 +64,19 @@ def get_attachments(dt, dn):
fields=["name", "file_name", "file_url", "is_private"],
filters={"attached_to_name": dn, "attached_to_doctype": dt, "is_private": 0},
)
def get_payment_details(doc):
show_pay_button, amount = (
(
"payments" in frappe.get_installed_apps()
and frappe.db.get_single_value("Buying Settings", "show_pay_button")
and doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST
),
0,
)
if not show_pay_button:
return show_pay_button, amount
amount = get_amount(doc)
return bool(amount), amount

View File

@@ -309,7 +309,7 @@ BOM {0} does not belong to Item {1},Stückliste {0} gehört nicht zum Artikel {1
BOM {0} must be active,Stückliste {0} muss aktiv sein,
BOM {0} must be submitted,Stückliste {0} muss übertragen werden,
Balance,Saldo,
Balance (Dr - Cr),Balance (Dr - Cr),
Balance (Dr - Cr),Saldo (S - H),
Balance ({0}),Saldo ({0}),
Balance Qty,Bilanzmenge,
Balance Sheet,Bilanz,
@@ -508,9 +508,9 @@ Close Loan,Darlehen schließen,
Close the POS,Schließen Sie die Kasse,
Closed,Geschlossen,
Closed order cannot be cancelled. Unclose to cancel.,Geschlosser Auftrag kann nicht abgebrochen werden. Bitte wiedereröffnen um abzubrechen.,
Closing (Cr),Schlußstand (Haben),
Closing (Dr),Schlußstand (Soll),
Closing (Opening + Total),Schließen (Eröffnung + Gesamt),
Closing (Cr),Schlußstand (H),
Closing (Dr),Schlußstand (S),
Closing (Opening + Total),Schlußstand (Anfangssstand + Summe),
Closing Account {0} must be of type Liability / Equity,Abschlußkonto {0} muss vom Typ Verbindlichkeiten/Eigenkapital sein,
Closing Balance,Schlussbilanz,
Code,Code,
@@ -598,7 +598,7 @@ Course Code: ,Kurscode:,
Course Enrollment {0} does not exists,Die Kursanmeldung {0} existiert nicht,
Course Schedule,Kurstermine,
Course: ,Kurs:,
Cr,Haben,
Cr,H,
Create,Erstellen,
Create BOM,Stückliste anlegen,
Create Delivery Trip,Erstelle Auslieferungsfahrt,
@@ -647,8 +647,8 @@ Creating Fees,Gebühren anlegen,
Creating student groups,Erstelle Studentengruppen,
Creating {0} Invoice,{0} Rechnung erstellen,
Credit,Haben,
Credit ({0}),Guthaben ({0}),
Credit Account,Guthabenkonto,
Credit ({0}),Haben ({0}),
Credit Account,Haben-Konto,
Credit Balance,Verfügbarer Kredit,
Credit Card,Kreditkarte,
Credit Days cannot be a negative number,Kredit-Tage können keine negative Zahl sein,
@@ -712,14 +712,14 @@ Date of Transaction,Datum der Transaktion,
Day,Tag,
Debit,Soll,
Debit ({0}),Soll ({0}),
Debit Account,Sollkonto,
Debit Account,Soll-Konto,
Debit Note,Lastschrift,
Debit Note Amount,Lastschriftbetrag,
Debit Note Issued,Lastschrift ausgestellt am,
Debit To is required,Debit Um erforderlich,
Debit To is required,Forderungskonto ist erforderlich,
Debit and Credit not equal for {0} #{1}. Difference is {2}.,Soll und Haben nicht gleich für {0} #{1}. Unterschied ist {2}.,
Debtors,Schuldner,
Debtors ({0}),Schuldnern ({0}),
Debtors,Debitoren,
Debtors ({0}),Debitoren ({0}),
Declare Lost,Für verloren erklären,
Default Activity Cost exists for Activity Type - {0},Es gibt Standard-Aktivitätskosten für Aktivitätsart - {0},
Default BOM ({0}) must be active for this item or its template,Standardstückliste ({0}) muss für diesen Artikel oder dessen Vorlage aktiv sein,
@@ -1628,7 +1628,7 @@ Open Item {0},Offene-Posten {0},
Open Notifications,Offene Benachrichtigungen,
Open Orders,Offene Bestellungen,
Open a new ticket,Öffnen Sie ein neues Ticket,
Opening,Eröffnung,
Opening,Anfangssstand,
Opening (Cr),Anfangssstand (Haben),
Opening (Dr),Anfangsstand (Soll),
Opening Accounting Balance,Eröffnungsbilanz,
@@ -2215,8 +2215,8 @@ Retained Earnings,Gewinnrücklagen,
Retention Stock Entry,Vorratsbestandseintrag,
Retention Stock Entry already created or Sample Quantity not provided,Aufbewahrungsbestandseintrag bereits angelegt oder Musterbestand nicht bereitgestellt,
Return,Zurück,
Return / Credit Note,Return / Gutschrift,
Return / Debit Note,Return / Lastschrift,
Return / Credit Note,Rückgabe / Gutschrift,
Return / Debit Note,Rückgabe / Lastschrift,
Returns,Retouren,
Reverse Journal Entry,Buchungssatz umkehren,
Review Invitation Sent,Einladung überprüfen gesendet,
@@ -2826,7 +2826,7 @@ To {0} | {1} {2},An {0} | {1} {2},
Toggle Filters,Filter umschalten,
Too many columns. Export the report and print it using a spreadsheet application.,Zu viele Spalten. Exportieren Sie den Bericht und drucken Sie ihn mit einem Tabellenkalkulationsprogramm aus.,
Tools,Werkzeuge,
Total (Credit),Insgesamt (Credit),
Total (Credit),Insgesamt (Haben),
Total (Without Tax),Summe (ohne Steuern),
Total Achieved,Gesamtsumme erreicht,
Total Actual,Summe Tatsächlich,
@@ -2837,7 +2837,7 @@ Total Budget,Gesamtbudget; Gesamtetat,
Total Collected: {0},Gesammelt gesammelt: {0},
Total Commission,Gesamtprovision,
Total Contribution Amount: {0},Gesamtbeitragsbetrag: {0},
Total Credit/ Debit Amount should be same as linked Journal Entry,Der Gesamtkreditbetrag sollte identisch mit dem verknüpften Buchungssatz sein,
Total Credit/ Debit Amount should be same as linked Journal Entry,Der gesamte Soll-/ Habenbetrag sollte identisch mit dem verknüpften Buchungssatz sein,
Total Debit must be equal to Total Credit. The difference is {0},Gesamt-Soll muss gleich Gesamt-Haben sein. Die Differenz ist {0},
Total Invoiced Amount,Gesamtrechnungsbetrag,
Total Order Considered,Geschätzte Summe der Bestellungen,
@@ -2915,7 +2915,7 @@ Unable to find score starting at {0}. You need to have standing scores covering
Unable to find variable: ,Variable kann nicht gefunden werden:,
Unblock Invoice,Rechnung entsperren,
Uncheck all,Alle abwählen,
Unclosed Fiscal Years Profit / Loss (Credit),Offener Gewinn / Verlust (Kredit) des Geschäftsjahres,
Unclosed Fiscal Years Profit / Loss (Credit),Offener Gewinn / Verlust (Haben) des Geschäftsjahres,
Unit,Einheit,
Unit of Measure,Maßeinheit,
Unit of Measure {0} has been entered more than once in Conversion Factor Table,Die Mengeneinheit {0} wurde mehr als einmal in die Umrechnungsfaktortabelle eingetragen.,
@@ -3185,7 +3185,7 @@ on,Am,
{0} {1}: Cost Center is required for 'Profit and Loss' account {2}. Please set up a default Cost Center for the Company.,"{0} {1}: Kostenstelle ist erforderlich für ""Gewinn- und Verlust"" Konto {2}. Bitte erstellen Sie eine Standard-Kostenstelle für das Unternehmen.",
{0} {1}: Cost Center {2} does not belong to Company {3},{0} {1}: Kostenstelle {2} gehört nicht zu Unternehmen {3},
{0} {1}: Customer is required against Receivable account {2},{0} {1}: Für das Eingangskonto {2} ist ein Kunde erforderlich,
{0} {1}: Either debit or credit amount is required for {2},{0} {1}: Debit- oder Kreditbetrag ist für {2} erforderlich,
{0} {1}: Either debit or credit amount is required for {2},{0} {1}: Soll- oder Habenbetrag ist für {2} erforderlich,
{0} {1}: Supplier is required against Payable account {2},{0} {1}: Für das Kreditorenkonto ist ein Lieferant erforderlich {2},
{0}% Billed,{0}% berechnet,
{0}% Delivered,{0}% geliefert,
@@ -3408,7 +3408,7 @@ Do you want to submit the material request,Möchten Sie die Materialanfrage einr
Doctype,DocType,
Document {0} successfully uncleared,Dokument {0} wurde nicht erfolgreich gelöscht,
Download Template,Vorlage herunterladen,
Dr,Soll,
Dr,S,
Due Date,Fälligkeitsdatum,
Duplicate,Duplizieren,
Duplicate Project with Tasks,Projekt mit Aufgaben duplizieren,
@@ -3889,7 +3889,8 @@ Operation Id,Arbeitsgang-ID,
Partially ordered,teilweise geordnete,
Please select company first,Bitte wählen Sie zuerst die Firma aus,
Please select patient,Bitte wählen Sie Patient,
Printed On ,Gedruckt auf,
Printed On ,Gedruckt am,
Printed on {0},Gedruckt am {0},
Projected qty,Geplante Menge,
Sales person,Vertriebsmitarbeiter,
Serial No {0} Created,Seriennummer {0} Erstellt,
@@ -4338,9 +4339,9 @@ Auto Created,Automatisch erstellt,
Stock User,Lager-Benutzer,
Fiscal Year Company,Geschäftsjahr Unternehmen,
Debit Amount,Soll-Betrag,
Credit Amount,Guthaben-Summe,
Credit Amount,Haben-Betrag,
Debit Amount in Account Currency,Soll-Betrag in Kontowährung,
Credit Amount in Account Currency,(Gut)Haben-Betrag in Kontowährung,
Credit Amount in Account Currency,Haben-Betrag in Kontowährung,
Voucher Detail No,Belegdetail-Nr.,
Is Opening,Ist Eröffnungsbuchung,
Is Advance,Ist Anzahlung,
@@ -5699,13 +5700,13 @@ Is Master Data Processed,Werden Stammdaten verarbeitet?,
Is Master Data Imported,Werden Stammdaten importiert?,
Tally Creditors Account,Tally Gläubigerkonto,
Creditors Account set in Tally,Gläubigerkonto in Tally eingestellt,
Tally Debtors Account,Tally Debtors Account,
Tally Debtors Account,Tally Debitorenkonto,
Debtors Account set in Tally,Debitorenkonto in Tally eingestellt,
Tally Company,Tally Company,
Company Name as per Imported Tally Data,Firmenname gemäß Imported Tally Data,
Tally Company,Tally Unternehmen,
Company Name as per Imported Tally Data,Firmenname gemäß Importierten Tally-Daten,
Default UOM,Standard-UOM,
UOM in case unspecified in imported data,"UOM für den Fall, dass in importierten Daten nicht angegeben",
ERPNext Company,ERPNext Company,
ERPNext Company,ERPNext Unternehmen,
Your Company set in ERPNext,Ihr Unternehmen in ERPNext eingestellt,
Processed Files,Verarbeitete Dateien,
Parties,Parteien,
@@ -8845,7 +8846,6 @@ Column {0},Spalte {0},
Field Mapping,Feldzuordnung,
Not Specified,Keine Angabe,
Update Type,Aktualisierungsart,
Dr,Soll,
End Time,Endzeit,
Fetching...,Abrufen ...,
"It seems that there is an issue with the server's stripe configuration. In case of failure, the amount will get refunded to your account.","Es scheint, dass ein Problem mit der Stripe-Konfiguration des Servers vorliegt. Im Falle eines Fehlers wird der Betrag Ihrem Konto gutgeschrieben.",
@@ -11829,113 +11829,113 @@ will be,wird sein,
{} is a child company.,{} ist ein untergeordnetes Unternehmen.,
{} {} is already linked with another {},{} {} ist bereits mit einem anderen {} verknüpft,
{} {} is already linked with {} {},{} {} ist bereits mit {} {} verknüpft,
A Transaction Deletion Document: {0} is triggered for {0},Eine Transaktion Löschungsdokument: {0} wird für {0} ausgelöst,
About Us Settings,"Einstellungen zu ""Über uns""",
Allow Internal Transfers at Arm's Length Price,Interne Übertragungen zum Fremdvergleichspreis zulassen,
Asset decapitalized after Asset Capitalization {0} was submitted,"Vermögenswert freigegeben, nachdem Anlagenaktivierung {0} gebucht wurde",
Auto Email Report,Auto Email-Bericht,
Auto close Opportunity Replied after the no. of days mentioned above,Automatische Schließungschaltung antwortete nach der oben genannten Anzahl von Tagen,
Avg Rate (Balance Stock),Durchschnittliche Rate (Lagerbestand),
Billing Interval in Subscription Plan must be Month to follow calendar months,"Abrechnungsintervall im Abonnementplan muss ""Monat"" sein, um Kalendermonate zu folgen",
Bulk Update,Massen-Update,
Can't disable batch wise valuation for active batches.,Sie können die chargenweise Bewertung für aktive Chargen nicht deaktivieren.,
Can't disable batch wise valuation for items with FIFO valuation method.,Sie können die chargenweise Bewertung für Artikel mit FIFO-Bewertungsmethode nicht deaktivieren.,
Cannot disable batch wise valuation for FIFO valuation method.,Sie können die chargenweise Bewertung für die FIFO-Bewertungsmethode nicht deaktivieren.,
Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Mehrere Dokumente für ein Unternehmen können nicht in die Warteschlange gestellt werden. {0} ist bereits in die Warteschlange gestellt/wird für das Unternehmen ausgeführt: {1},
Contact Us Settings,Einstellungen zu „Kontaktieren Sie uns“,
Create Journal Entries,Buchungssätze erstellen,
Create a variant with the template image.,Eine Variante mit dem Vorlagenbild erstellen.,
Create in Draft Status,In Entwurfsstatus erstellen,
Custom delimiters,Benutzerdefinierte Trennzeichen,
Deleted Documents,Gelöschte Dokumente,
Delimiter options,Trennzeichenoptionen,
Dependent Task {0} is not a Template Task,Abhängige Aufgabe {0} ist keine Vorlage einer Aufgabe,
Depreciation Entry Posting Status,Buchungsstatus des Abschreibungseintrags,
Depreciation Schedule View,Ansicht Abschreibungsplan,
Depreciation cannot be calculated for fully depreciated assets,Für vollständig abgeschriebene Vermögensgegenstände kann keine Abschreibung berechnet werden,
Do Not Use Batch-wise Valuation,Keine chargenweise Bewertung verwenden,
Domain Settings,Domäneneinstellungen,
Email Domain,E-Mail-Domain,
Enable Immutable Ledger,Unveränderliches Hauptbuch aktivieren,
Enable it if users want to consider rejected materials to dispatch.,"Aktivieren Sie diese Option, wenn Benutzer zurückgewiesenes Material für den Versand berücksichtigen möchten.",
Excess Materials Consumed,Überschüssige Materialien verbraucht,
Excess Transfer,Überschuss-Übertragung,
FIFO Queue vs Qty After Transaction Comparison,Vergleich zwischen FIFO-Warteschlange und Menge nach Transaktion,
"For the {0}, the quantity is required to make the return entry","Für die {0} ist die Menge erforderlich, um die Retoure zu erstellen",
"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Falls aktiviert, wird der Artikelkurs bei internen Transfers nicht an den Bewertungskurs angepasst, aber die Buchhaltung verwendet weiterhin den Wertansatz.",
"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Falls aktiviert, verwendet das System die Bewertungsmethode des gleitenden Durchschnitts zur Berechnung des Wertansatzes für die chargenweisen Artikel und berücksichtigt nicht den individuellen chargenweisen Eingangskurs.",
Job Worker,Unterauftragnehmer,
Job Worker Address,Unterauftragnehmer Adresse,
Job Worker Address Details,Vorschau Adresse Unterauftragnehmer,
Job Worker Contact,Vertrag des Unterauftragnehmers,
Job Worker Delivery Note,Lieferschein des Unterauftragnehmers,
Job Worker Name,Name des Unterauftragnehmer,
Job Worker Warehouse,Lagerhaus des Unterauftragnehmers,
"Learn about <a href=""https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier."">Common Party</a>","Erfahren Sie mehr über die <a href=""https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier."">Verknüpfung von Kunden und Lieferanten</a>",
Notification,Benachrichtigung,
Notification Settings,Benachrichtigungseinstellungen,
Offsetting for Accounting Dimension,Verrechnung für Buchhaltungsdimension,
Only Include Allocated Payments,Nur zugeordnete Zahlungen einbeziehen,
Only one {0} entry can be created against the Work Order {1},Nur ein {0} Eintrag kann gegen den Arbeitsauftrag {1} erstellt werden,
Over Picking Allowance,Überkommissionierzugabe,
Over Transfer Allowance,Überschlusstransferzugabe,
Overbilling of {} ignored because you have {} role.,"Überhöhte Abrechnung von {} wurde ignoriert, weil Sie die Rolle {} haben.",
Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Job für Zahlungsabgleich: {0} läuft für diese Partei. Kann jetzt nicht abgleichen.,
Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"Eine Zahlungsanforderung, die aus einem Auftrag oder einer Bestellung erstellt wurde, wird im Entwurfsstatus sein. Wenn deaktiviert, wird das Dokument in ungespeichertem Zustand sein.",
Payment Request took too long to respond. Please try requesting for payment again.,"Zahlungsaufforderung hat zu lange gedauert, um zu antworten. Bitte versuchen Sie die Zahlung erneut anzufragen.",
Payment Terms Status for Sales Order,Status für Zahlungsbedingungen für Aufträge,
Pipeline By,Pipeline von,
Please enable Use Old Serial / Batch Fields to make_bundle,"Bitte aktivieren Sie ""Alte Serien-/Batchfelder verwenden"" für make_bundle",
Print Style,Druckstil,
Reconcile All Serial Nos / Batches,Alle Seriennummern/Chargen abgleichen,
Reset Company Default Values,Standardwerte des Unternehmens zurücksetzen,
Reset Raw Materials Table,Tabelle Rohstoffe zurücksetzen,
Return Against Subcontracting Receipt,Retoure gegen Unterauftragsbeleg,
Return Components,Komponenten zurückgeben,
Returned Against,Zurückgegeben gegen,
Returned exchange rate is neither integer not float.,Der zurückgegebene Wechselkurs ist weder Integer noch Float.,
Round Off Tax Amount,Steuerbetrag abrunden,
Rounding Loss Allowance,Rundungsverlusttoleranz,
Rounding Loss Allowance should be between 0 and 1,Rundungsverlusttoleranz muss zwischen 0 und 1 sein,
Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Zeile #{0}: Ausschusslager ist für den abgelehnten Artikel {1} obligatorisch,
Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,"Zeile #{0}: Sie können die Bestandsdimension '{1}' in der Bestandsabgleich nicht verwenden, um die Menge oder den Wertansatz zu ändern. Die Bestandsabgleich mit Bestandsdimensionen ist ausschließlich für die Durchführung von Eröffnungsbuchungen vorgesehen.",
Row {0}: Packed Qty must be equal to {1} Qty.,Zeile {0}: Verpackte Menge muss gleich der {1} Menge sein.,
Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Zeile {0}: Die Gesamtzahl der Abschreibungen kann nicht kleiner oder gleich der Anzahl der gebuchten Abschreibungen zu Beginn sein,
SCO Supplied Item,Artikel beigestellt für Unterauftrag,
SLA Fulfilled On Status,SLA erfüllt am Status,
SLA will be applied if {1} is set as {2}{3},"SLA wird angewendet, wenn {1} als {2}{3} eingestellt ist",
SMS Settings,SMS-Einstellungen,
SO Total Qty,Kd.-Auftr.-Gesamtmenge,
"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Auftrag {0} existiert bereits für die Kundenbestellung {1}. Um mehrere Verkaufsaufträge zuzulassen, aktivieren Sie {2} in {3}",
A Transaction Deletion Document: {0} is triggered for {0},Eine Transaktion Löschungsdokument: {0} wird für {0} ausgelöst,
About Us Settings,"Einstellungen zu ""Über uns""",
Allow Internal Transfers at Arm's Length Price,Interne Übertragungen zum Fremdvergleichspreis zulassen,
Asset decapitalized after Asset Capitalization {0} was submitted,"Vermögenswert freigegeben, nachdem Anlagenaktivierung {0} gebucht wurde",
Auto Email Report,Auto Email-Bericht,
Auto close Opportunity Replied after the no. of days mentioned above,Automatische Schließungschaltung antwortete nach der oben genannten Anzahl von Tagen,
Avg Rate (Balance Stock),Durchschnittliche Rate (Lagerbestand),
Billing Interval in Subscription Plan must be Month to follow calendar months,"Abrechnungsintervall im Abonnementplan muss ""Monat"" sein, um Kalendermonate zu folgen",
Bulk Update,Massen-Update,
Can't disable batch wise valuation for active batches.,Sie können die chargenweise Bewertung für aktive Chargen nicht deaktivieren.,
Can't disable batch wise valuation for items with FIFO valuation method.,Sie können die chargenweise Bewertung für Artikel mit FIFO-Bewertungsmethode nicht deaktivieren.,
Cannot disable batch wise valuation for FIFO valuation method.,Sie können die chargenweise Bewertung für die FIFO-Bewertungsmethode nicht deaktivieren.,
Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Mehrere Dokumente für ein Unternehmen können nicht in die Warteschlange gestellt werden. {0} ist bereits in die Warteschlange gestellt/wird für das Unternehmen ausgeführt: {1},
Contact Us Settings,Einstellungen zu „Kontaktieren Sie uns“,
Create Journal Entries,Buchungssätze erstellen,
Create a variant with the template image.,Eine Variante mit dem Vorlagenbild erstellen.,
Create in Draft Status,In Entwurfsstatus erstellen,
Custom delimiters,Benutzerdefinierte Trennzeichen,
Deleted Documents,Gelöschte Dokumente,
Delimiter options,Trennzeichenoptionen,
Dependent Task {0} is not a Template Task,Abhängige Aufgabe {0} ist keine Vorlage einer Aufgabe,
Depreciation Entry Posting Status,Buchungsstatus des Abschreibungseintrags,
Depreciation Schedule View,Ansicht Abschreibungsplan,
Depreciation cannot be calculated for fully depreciated assets,Für vollständig abgeschriebene Vermögensgegenstände kann keine Abschreibung berechnet werden,
Do Not Use Batch-wise Valuation,Keine chargenweise Bewertung verwenden,
Domain Settings,Domäneneinstellungen,
Email Domain,E-Mail-Domain,
Enable Immutable Ledger,Unveränderliches Hauptbuch aktivieren,
Enable it if users want to consider rejected materials to dispatch.,"Aktivieren Sie diese Option, wenn Benutzer zurückgewiesenes Material für den Versand berücksichtigen möchten.",
Excess Materials Consumed,Überschüssige Materialien verbraucht,
Excess Transfer,Überschuss-Übertragung,
FIFO Queue vs Qty After Transaction Comparison,Vergleich zwischen FIFO-Warteschlange und Menge nach Transaktion,
"For the {0}, the quantity is required to make the return entry","Für die {0} ist die Menge erforderlich, um die Retoure zu erstellen",
"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Falls aktiviert, wird der Artikelkurs bei internen Transfers nicht an den Bewertungskurs angepasst, aber die Buchhaltung verwendet weiterhin den Wertansatz.",
"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Falls aktiviert, verwendet das System die Bewertungsmethode des gleitenden Durchschnitts zur Berechnung des Wertansatzes für die chargenweisen Artikel und berücksichtigt nicht den individuellen chargenweisen Eingangskurs.",
Job Worker,Unterauftragnehmer,
Job Worker Address,Unterauftragnehmer Adresse,
Job Worker Address Details,Vorschau Adresse Unterauftragnehmer,
Job Worker Contact,Vertrag des Unterauftragnehmers,
Job Worker Delivery Note,Lieferschein des Unterauftragnehmers,
Job Worker Name,Name des Unterauftragnehmer,
Job Worker Warehouse,Lagerhaus des Unterauftragnehmers,
"Learn about <a href=""https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier."">Common Party</a>","Erfahren Sie mehr über die <a href=""https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier."">Verknüpfung von Kunden und Lieferanten</a>",
Notification,Benachrichtigung,
Notification Settings,Benachrichtigungseinstellungen,
Offsetting for Accounting Dimension,Verrechnung für Buchhaltungsdimension,
Only Include Allocated Payments,Nur zugeordnete Zahlungen einbeziehen,
Only one {0} entry can be created against the Work Order {1},Nur ein {0} Eintrag kann gegen den Arbeitsauftrag {1} erstellt werden,
Over Picking Allowance,Überkommissionierzugabe,
Over Transfer Allowance,Überschlusstransferzugabe,
Overbilling of {} ignored because you have {} role.,"Überhöhte Abrechnung von {} wurde ignoriert, weil Sie die Rolle {} haben.",
Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Job für Zahlungsabgleich: {0} läuft für diese Partei. Kann jetzt nicht abgleichen.,
Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"Eine Zahlungsanforderung, die aus einem Auftrag oder einer Bestellung erstellt wurde, wird im Entwurfsstatus sein. Wenn deaktiviert, wird das Dokument in ungespeichertem Zustand sein.",
Payment Request took too long to respond. Please try requesting for payment again.,"Zahlungsaufforderung hat zu lange gedauert, um zu antworten. Bitte versuchen Sie die Zahlung erneut anzufragen.",
Payment Terms Status for Sales Order,Status für Zahlungsbedingungen für Aufträge,
Pipeline By,Pipeline von,
Please enable Use Old Serial / Batch Fields to make_bundle,"Bitte aktivieren Sie ""Alte Serien-/Batchfelder verwenden"" für make_bundle",
Print Style,Druckstil,
Reconcile All Serial Nos / Batches,Alle Seriennummern/Chargen abgleichen,
Reset Company Default Values,Standardwerte des Unternehmens zurücksetzen,
Reset Raw Materials Table,Tabelle Rohstoffe zurücksetzen,
Return Against Subcontracting Receipt,Retoure gegen Unterauftragsbeleg,
Return Components,Komponenten zurückgeben,
Returned Against,Zurückgegeben gegen,
Returned exchange rate is neither integer not float.,Der zurückgegebene Wechselkurs ist weder Integer noch Float.,
Round Off Tax Amount,Steuerbetrag abrunden,
Rounding Loss Allowance,Rundungsverlusttoleranz,
Rounding Loss Allowance should be between 0 and 1,Rundungsverlusttoleranz muss zwischen 0 und 1 sein,
Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Zeile #{0}: Ausschusslager ist für den abgelehnten Artikel {1} obligatorisch,
Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,"Zeile #{0}: Sie können die Bestandsdimension '{1}' in der Bestandsabgleich nicht verwenden, um die Menge oder den Wertansatz zu ändern. Die Bestandsabgleich mit Bestandsdimensionen ist ausschließlich für die Durchführung von Eröffnungsbuchungen vorgesehen.",
Row {0}: Packed Qty must be equal to {1} Qty.,Zeile {0}: Verpackte Menge muss gleich der {1} Menge sein.,
Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Zeile {0}: Die Gesamtzahl der Abschreibungen kann nicht kleiner oder gleich der Anzahl der gebuchten Abschreibungen zu Beginn sein,
SCO Supplied Item,Artikel beigestellt für Unterauftrag,
SLA Fulfilled On Status,SLA erfüllt am Status,
SLA will be applied if {1} is set as {2}{3},"SLA wird angewendet, wenn {1} als {2}{3} eingestellt ist",
SMS Settings,SMS-Einstellungen,
SO Total Qty,Kd.-Auftr.-Gesamtmenge,
"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Auftrag {0} existiert bereits für die Kundenbestellung {1}. Um mehrere Verkaufsaufträge zuzulassen, aktivieren Sie {2} in {3}",
"Scorecard variables can be used, as well as:
{total_score} (the total score from that period),
{period_number} (the number of periods to present day)
","Variablen der Bewertung können verwendet werden, sowie:
{total_score} (die Gesamtpunktzahl aus diesem Zeitraum),
{period_number} (die Anzahl der Zeiträume bis zum heutigen Tag)
",
Select Accounting Dimension.,Buchhaltungsdimension auswählen,
Select Corrective Operation,Nacharbeit auswählen,
Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Wählen Sie Geburtsdatum. Damit wird das Alter der Mitarbeiter überprüft und die Einstellung von minderjährigen Mitarbeitern verhindert.,
"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",Wählen Sie Eintrittsdatum. Es wirkt sich auf die erste Gehaltsberechnung und die Zuteilung von Abwesenheiten auf Pro-rata-Basis aus.,
Select Dimension,Dimension auswählen,
Select Items for Quality Inspection,Artikel für die Qualitätsprüfung auswählen,
Select Job Worker Address,Unterauftragnehmer Adresse auswählen,
Service Expenses,Wartungsaufwand,
Service Level Agreement for {0} {1} already exists.,Service Level Agreement für {0} {1} existiert bereits.,
System Settings,Systemverwaltung,
Website Script,Webseiten-Skript,
Website Theme,Webseiten-Thema,
Workflow Action,Workflow-Aktion,
Workflow State,Workflow-Status,
{0} is not running. Cannot trigger events for this Document,{0} läuft nicht. Ereignisse für dieses Dokument können nicht ausgelöst werden,
"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" für ""SN-01"" bis ""SN-10""",
"<span class=""h4""><b>Masters &amp; Reports</b></span>","<span class=""h4""><b>Stammdaten &amp; Berichte</b></span>",
"<span class=""h4""><b>Quick Access</b></span>","<span class=""h4""><b>Schnellzugriff</b></span>",
"<span class=""h4""><b>Reports & Masters</b></span>","<span class=""h4""><b>Berichte & Stammdaten</b></span>",
"<span class=""h4""><b>Reports &amp; Masters</b></span>","<span class=""h4""><b>Berichte &amp; Stammdaten</b></span>",
"<span class=""h4""><b>Settings</b></span>","<span class=""h4""><b>Einstellungen</b></span>",
"<span class=""h4""><b>Shortcuts</b></span>","<span class=""h4""><b>Verknüpfungen</b></span>",
",
Select Accounting Dimension.,Buchhaltungsdimension auswählen,
Select Corrective Operation,Nacharbeit auswählen,
Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Wählen Sie Geburtsdatum. Damit wird das Alter der Mitarbeiter überprüft und die Einstellung von minderjährigen Mitarbeitern verhindert.,
"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",Wählen Sie Eintrittsdatum. Es wirkt sich auf die erste Gehaltsberechnung und die Zuteilung von Abwesenheiten auf Pro-rata-Basis aus.,
Select Dimension,Dimension auswählen,
Select Items for Quality Inspection,Artikel für die Qualitätsprüfung auswählen,
Select Job Worker Address,Unterauftragnehmer Adresse auswählen,
Service Expenses,Wartungsaufwand,
Service Level Agreement for {0} {1} already exists.,Service Level Agreement für {0} {1} existiert bereits.,
System Settings,Systemverwaltung,
Website Script,Webseiten-Skript,
Website Theme,Webseiten-Thema,
Workflow Action,Workflow-Aktion,
Workflow State,Workflow-Status,
{0} is not running. Cannot trigger events for this Document,{0} läuft nicht. Ereignisse für dieses Dokument können nicht ausgelöst werden,
"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" für ""SN-01"" bis ""SN-10""",
"<span class=""h4""><b>Masters &amp; Reports</b></span>","<span class=""h4""><b>Stammdaten &amp; Berichte</b></span>",
"<span class=""h4""><b>Quick Access</b></span>","<span class=""h4""><b>Schnellzugriff</b></span>",
"<span class=""h4""><b>Reports & Masters</b></span>","<span class=""h4""><b>Berichte & Stammdaten</b></span>",
"<span class=""h4""><b>Reports &amp; Masters</b></span>","<span class=""h4""><b>Berichte &amp; Stammdaten</b></span>",
"<span class=""h4""><b>Settings</b></span>","<span class=""h4""><b>Einstellungen</b></span>",
"<span class=""h4""><b>Shortcuts</b></span>","<span class=""h4""><b>Verknüpfungen</b></span>",
"<span class=""h4""><b>Your Shortcuts
@@ -11948,183 +11948,183 @@ Workflow State,Workflow-Status,
</b></span>",
"<span class=""h4""><b>Your Shortcuts</b></span>","<span class=""h4""><b>Ihre Verknüpfungen</b></span>",
<strong>Grand Total:</strong> {0},<strong>Gesamtsumme:</strong>{0},
<strong>Outstanding Amount:</strong> {0},<strong>Ausstehender Betrag:</strong> {0},
Against Customer Order {0},Gegen Kundenauftrag {0},
Against Supplier Invoice {0},Gegen Lieferantenrechnung {0},
Ageing Range,Alterungsbereich,
Allocate Payment Request,Zahlungsanfrage zuweisen,
Amount in party's bank account currency,Betrag in der Währung des Bankkontos des Beteiligten,
Amount in transaction currency,Betrag in Transaktionswährung,
BIN Qty,BIN Menge,
BOM and Production,Stückliste und Produktion,
Balance Stock Value,Bestandswert,
Base Cost Per Unit,Grundkosten pro Einheit,
Base Rate,Basispreis,
Base Tax Withholding Net Total,Basis-Steuereinbehalt-Nettosumme,
Base Total,Basis-Summe,
Base Total Billable Amount,Basis Gesamter abrechenbarer Betrag,
Batch Expiry Date,Ablaufdatum der Charge,
Bill for Rejected Quantity in Purchase Invoice,Rechnung für abgelehnte Menge in der Eingangsrechnung,
Calculate daily depreciation using total days in depreciation period,Tägliche Abschreibung anhand der Gesamttage im Abschreibungszeitraum berechnen,
Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Anrufplanzeile {0}: Das Zeitfenster Bis sollte immer vor dem Zeitfenster Von liegen.,
Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Es wurde kein Standardlager für den Artikel {0} gefunden. Bitte legen Sie eines im Artikelstamm oder in den Lagereinstellungen fest.,
Cannot {0} from {2} without any negative outstanding invoice,Kann nicht {0} von {2} ohne negative ausstehende Rechnung,
Cheques and Deposits Incorrectly cleared,Falsch verrechnete Schecks und Einzahlungen,
Columns are not according to template. Please compare the uploaded file with standard template,Die Spalten stimmen nicht mit der Vorlage überein. Bitte vergleichen Sie die hochgeladene Datei mit der Standardvorlage,
Company is mandatory,Unternehmen ist obligatorisch,
Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Das Fertigstellungsdatum kann nicht vor dem Ausfalldatum liegen. Bitte passen Sie die Daten entsprechend an.,
Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Verbrauchte Lagerartikel oder verbrauchte Vermögensgegenstand-Artikel sind für die Erstellung obligatorisch,
Convert to Item Based Reposting,Umstellung auf artikelbasiertes Umbuchen,
Create Workstation,Arbeitsplatz erstellen,
Creating Journal Entries...,Journaleinträge erstellen...,
Creating Purchase Invoices ...,Eingangsrechnungen erstellen ...,
Creating Sales Invoices ...,Ausgangsrechnungen erstellen ...,
Currency Exchange Settings Result,Währungsumtauscheinstellungen Ergebnis,
Deal Owner,Besitzer des Deals,
Decapitalized,Dekapitalisiert,
Dependant SLE Voucher Detail No,Unterhaltsberechtigter SLE Beleg Detail Nr.,
Disassemble,Demontage,
Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumente: {0} hat vertagte Einnahmen/Ausgaben aktiviert. Kann nicht erneut posten.,
Don't Reserve Sales Order Qty on Sales Return,Menge des Auftrags nicht bei der Rücksendung reservieren,
Enter Manually,Manuell eingeben,
Failed to post depreciation entries,Abschreibungsbuchungen fehlgeschlagen,
Filters missing,Filter fehlen,
"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Bei Retourenrechnungen mit Lagereffekt sind Artikel mit einer Menge von '0' nicht zulässig. Folgende Zeilen sind betroffen: {0},
"For the item {0}, the quantity should be {1} according to the BOM {2}.",Für den Artikel {0} sollte die Menge gemäß Stückliste {2} {1} betragen.,
"For the {0}, no stock is available for the return in the warehouse {1}.",Für {0} ist im Lager {1} kein Bestand für die Retoure verfügbar.,
Force-Fetch Subscription Updates,Abonnement-Updates erzwingen,
From Date is mandatory,Von-Datum ist obligatorisch,
From Prospect,Von Interessenten,
Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruttokaufbetrag zu niedrig: {0} kann nicht über {1} Zyklen mit einer Häufigkeit von {2} Abschreibungen abgeschrieben werden.,
If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Falls aktiviert, wird das System die Preisregel nicht auf den Lieferschein anwenden, der aus der Pickliste erstellt wird",
Impairment,Wertminderung,
Include Closed Orders,Geschlossene Aufträge/Bestellungen einbeziehen,
Invalid Allocated Amount,Ungültiger zugewiesener Betrag,
Invalid Amount,Ungültiger Betrag,
Is Standard,Ist Standard,
Item {0} does not exist.,Artikel {0} existiert nicht.,
Items {0} do not exist in the Item master.,Artikel {0} sind nicht im Artikelstamm vorhanden.,
Journal entries have been created,Journaleinträge wurden erstellt,
Net total calculation precision loss,Präzisionsverlust bei Berechnung der Nettosumme,
Only Deduct Tax On Excess Amount ,Nur den überschüssigen Betrag versteuern ,
Payment Ledger Entry,Zahlungsbucheintrag,
Payment Requests cannot be created against: {0},Zahlungsanforderungen können nicht erstellt werden für: {0},
Period Closing Entry For Current Period,Periodenabschlussbuchung für aktuelle Periode,
Provisional Account,Vorläufiges Konto,
Rate of Stock UOM,Einzelpreis der Lager-ME,
Raw Materials Consumption ,Rohstoffverbrauch ,
Recalculating Purchase Cost against this Project...,Neuberechnung der Anschaffungskosten für dieses Projekt...,
Reference DocType,Referenz DocType,
Round Tax Amount Row-wise,Steuerbetrag zeilenweise runden,
Rounding gain/loss Entry for Stock Transfer,Rundungsgewinn/-verlustbuchung für Umlagerung,
Row #{0}: Only {1} available to reserve for the Item {2},Zeile #{0}: Nur {1} zur Reservierung für den Artikel {2} verfügbar,
Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Zeile #{}: Die ursprüngliche Rechnung {} der Rechnungskorrektur {} ist nicht konsolidiert.,
Row {0}: Item {1} must be a subcontracted item.,Zeile {0}: Artikel {1} muss ein an Dritte vergebener Artikel sein.,
Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Zeile {0}: Bitte geben Sie einen gültigen Lieferschein Artikel oder verpackten Artikel an.,
Row {0}: Target Warehouse is mandatory for internal transfers,Zeile {0}: Ziellager ist für interne Transfers obligatorisch,
Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Zeile({0}): Ausstehender Betrag kann nicht größer sein als der tatsächliche ausstehende Betrag {1} in {2},
Rows with Same Account heads will be merged on Ledger,Zeilen mit denselben Konten werden im Hauptbuch zusammengefasst,
Select Warehouses to get Stock for Materials Planning,"Wählen Sie Lager aus, um Bestände für die Materialplanung zu erhalten",
Select an invoice to load summary data,"Wählen Sie eine Rechnung aus, um die Zusammenfassung zu laden",
Serial / Batch Bundle,Serien- / Chargenbündel,
Serial / Batch Bundle Missing,Serien- / Chargenbündel fehlt,
Serial No Range,Seriennummernbereich,
Serial and Batch Details,Serien- und Chargendetails,
Sets 'Accepted Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das Annahmelager fest.,
Sets 'Rejected Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das „Ausschusslager“ fest.,
Shelf Life in Days,Haltbarkeitsdauer in Tagen,
Show Disabled Warehouses,Deaktivierte Lager anzeigen,
Show GL Balance,Hauptbuchsaldo anzeigen,
Show Pay Button in Purchase Order Portal,Schaltfläche „Bezahlen“ im Bestellportal anzeigen,
Show Taxes as Table in Print,Steuern als Tabelle im Druck anzeigen,
Show net values in opening and closing columns,Nettowerte in Eröffnungs- und Abschlussspalten anzeigen,
Show with upcoming revenue/expense,Mit kommenden Einnahmen/Ausgaben anzeigen,
Something went wrong please try again,"Etwas ist schief gelaufen, bitte versuchen Sie es erneut",
South Africa VAT Account,Südafrika Mehrwertsteuer-Konto,
South Africa VAT Settings,Südafrika Mehrwertsteuer-Einstellungen,
Start Date should be lower than End Date,Das Startdatum muss vor dem Enddatum liegen,
Start Deletion,Löschen starten,
Start Time can't be greater than or equal to End Time for {0}.,Die Startzeit kann nicht größer oder gleich der Endzeit für {0} sein.,
Started a background job to create {1} {0},Hintergrundjob zum Erstellen von {1} {0} gestartet,
Status set to rejected as there are one or more rejected readings.,"Der Status wurde auf abgelehnt gesetzt, da es einen oder mehrere abgelehnte Messwerte gibt.",
Stock Consumed During Repair,Während der Reparatur verbrauchter Bestand,
Stock Consumption Details,Details zum Lagerverbrauch,
Stock Planning,Bestandsplanung,
Stock Reservation,Bestandsreservierung,
Stock Reservation Entries Cancelled,Bestandsreservierungen storniert,
Stock Reservation Entries Created,Bestandsreservierungen erstellt,
Stock Reservation Entry,Bestandsreservierungseintrag,
Stock Reservation Entry cannot be updated as it has been delivered.,"Der Bestandsreservierungseintrag kann nicht aktualisiert werden, da er bereits geliefert wurde.",
"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Ein anhand einer Kommissionierliste erstellter Bestandsreservierungseintrag kann nicht aktualisiert werden. Wenn Sie Änderungen vornehmen müssen, empfehlen wir, den vorhandenen Eintrag zu stornieren und einen neuen zu erstellen.",
Stock Reservation can only be created against {0}.,Bestandsreservierungen können nur gegen {0} erstellt werden.,
Stock Reserved Qty (in Stock UOM),Reservierter Bestand (in Lager-ME),
Stock Unreservation,Aufhebung der Bestandsreservierung,
Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,"Lagerbestände/Konten können nicht eingefroren werden, da die Verarbeitung rückwirkender Einträge noch läuft. Bitte versuchen Sie es später erneut.",
Supplied Item,Gelieferter Artikel,
Supplies subject to the reverse charge provision,"Lieferungen, die der Reverse-Charge-Regelung unterliegen",
Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Aufgabe {0} hängt von Aufgabe {1} ab. Bitte fügen Sie Aufgabe {1} zur Aufgabenliste hinzu.,
Tax Amount will be rounded on a row(items) level,Der Steuerbetrag wird auf (Artikel-)Zeilenebene gerundet,
Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Steuererstattungen für Touristen im Rahmen der Steuererstattungsregelung für Touristen,
</b></span>",
"<span class=""h4""><b>Your Shortcuts</b></span>","<span class=""h4""><b>Ihre Verknüpfungen</b></span>",
<strong>Grand Total:</strong> {0},<strong>Gesamtsumme:</strong>{0},
<strong>Outstanding Amount:</strong> {0},<strong>Ausstehender Betrag:</strong> {0},
Against Customer Order {0},Gegen Kundenauftrag {0},
Against Supplier Invoice {0},Gegen Lieferantenrechnung {0},
Ageing Range,Alterungsbereich,
Allocate Payment Request,Zahlungsanfrage zuweisen,
Amount in party's bank account currency,Betrag in der Währung des Bankkontos des Beteiligten,
Amount in transaction currency,Betrag in Transaktionswährung,
BIN Qty,BIN Menge,
BOM and Production,Stückliste und Produktion,
Balance Stock Value,Bestandswert,
Base Cost Per Unit,Grundkosten pro Einheit,
Base Rate,Basispreis,
Base Tax Withholding Net Total,Basis-Steuereinbehalt-Nettosumme,
Base Total,Basis-Summe,
Base Total Billable Amount,Basis Gesamter abrechenbarer Betrag,
Batch Expiry Date,Ablaufdatum der Charge,
Bill for Rejected Quantity in Purchase Invoice,Rechnung für abgelehnte Menge in der Eingangsrechnung,
Calculate daily depreciation using total days in depreciation period,Tägliche Abschreibung anhand der Gesamttage im Abschreibungszeitraum berechnen,
Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Anrufplanzeile {0}: Das Zeitfenster Bis sollte immer vor dem Zeitfenster Von liegen.,
Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Es wurde kein Standardlager für den Artikel {0} gefunden. Bitte legen Sie eines im Artikelstamm oder in den Lagereinstellungen fest.,
Cannot {0} from {2} without any negative outstanding invoice,Kann nicht {0} von {2} ohne negative ausstehende Rechnung,
Cheques and Deposits Incorrectly cleared,Falsch verrechnete Schecks und Einzahlungen,
Columns are not according to template. Please compare the uploaded file with standard template,Die Spalten stimmen nicht mit der Vorlage überein. Bitte vergleichen Sie die hochgeladene Datei mit der Standardvorlage,
Company is mandatory,Unternehmen ist obligatorisch,
Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Das Fertigstellungsdatum kann nicht vor dem Ausfalldatum liegen. Bitte passen Sie die Daten entsprechend an.,
Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Verbrauchte Lagerartikel oder verbrauchte Vermögensgegenstand-Artikel sind für die Erstellung obligatorisch,
Convert to Item Based Reposting,Umstellung auf artikelbasiertes Umbuchen,
Create Workstation,Arbeitsplatz erstellen,
Creating Journal Entries...,Journaleinträge erstellen...,
Creating Purchase Invoices ...,Eingangsrechnungen erstellen ...,
Creating Sales Invoices ...,Ausgangsrechnungen erstellen ...,
Currency Exchange Settings Result,Währungsumtauscheinstellungen Ergebnis,
Deal Owner,Besitzer des Deals,
Decapitalized,Dekapitalisiert,
Dependant SLE Voucher Detail No,Unterhaltsberechtigter SLE Beleg Detail Nr.,
Disassemble,Demontage,
Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumente: {0} hat vertagte Einnahmen/Ausgaben aktiviert. Kann nicht erneut posten.,
Don't Reserve Sales Order Qty on Sales Return,Menge des Auftrags nicht bei der Rücksendung reservieren,
Enter Manually,Manuell eingeben,
Failed to post depreciation entries,Abschreibungsbuchungen fehlgeschlagen,
Filters missing,Filter fehlen,
"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Bei Retourenrechnungen mit Lagereffekt sind Artikel mit einer Menge von '0' nicht zulässig. Folgende Zeilen sind betroffen: {0},
"For the item {0}, the quantity should be {1} according to the BOM {2}.",Für den Artikel {0} sollte die Menge gemäß Stückliste {2} {1} betragen.,
"For the {0}, no stock is available for the return in the warehouse {1}.",Für {0} ist im Lager {1} kein Bestand für die Retoure verfügbar.,
Force-Fetch Subscription Updates,Abonnement-Updates erzwingen,
From Date is mandatory,Von-Datum ist obligatorisch,
From Prospect,Von Interessenten,
Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruttokaufbetrag zu niedrig: {0} kann nicht über {1} Zyklen mit einer Häufigkeit von {2} Abschreibungen abgeschrieben werden.,
If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Falls aktiviert, wird das System die Preisregel nicht auf den Lieferschein anwenden, der aus der Pickliste erstellt wird",
Impairment,Wertminderung,
Include Closed Orders,Geschlossene Aufträge/Bestellungen einbeziehen,
Invalid Allocated Amount,Ungültiger zugewiesener Betrag,
Invalid Amount,Ungültiger Betrag,
Is Standard,Ist Standard,
Item {0} does not exist.,Artikel {0} existiert nicht.,
Items {0} do not exist in the Item master.,Artikel {0} sind nicht im Artikelstamm vorhanden.,
Journal entries have been created,Journaleinträge wurden erstellt,
Net total calculation precision loss,Präzisionsverlust bei Berechnung der Nettosumme,
Only Deduct Tax On Excess Amount ,Nur den überschüssigen Betrag versteuern ,
Payment Ledger Entry,Zahlungsbucheintrag,
Payment Requests cannot be created against: {0},Zahlungsanforderungen können nicht erstellt werden für: {0},
Period Closing Entry For Current Period,Periodenabschlussbuchung für aktuelle Periode,
Provisional Account,Vorläufiges Konto,
Rate of Stock UOM,Einzelpreis der Lager-ME,
Raw Materials Consumption ,Rohstoffverbrauch ,
Recalculating Purchase Cost against this Project...,Neuberechnung der Anschaffungskosten für dieses Projekt...,
Reference DocType,Referenz DocType,
Round Tax Amount Row-wise,Steuerbetrag zeilenweise runden,
Rounding gain/loss Entry for Stock Transfer,Rundungsgewinn/-verlustbuchung für Umlagerung,
Row #{0}: Only {1} available to reserve for the Item {2},Zeile #{0}: Nur {1} zur Reservierung für den Artikel {2} verfügbar,
Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Zeile #{}: Die ursprüngliche Rechnung {} der Rechnungskorrektur {} ist nicht konsolidiert.,
Row {0}: Item {1} must be a subcontracted item.,Zeile {0}: Artikel {1} muss ein an Dritte vergebener Artikel sein.,
Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Zeile {0}: Bitte geben Sie einen gültigen Lieferschein Artikel oder verpackten Artikel an.,
Row {0}: Target Warehouse is mandatory for internal transfers,Zeile {0}: Ziellager ist für interne Transfers obligatorisch,
Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Zeile({0}): Ausstehender Betrag kann nicht größer sein als der tatsächliche ausstehende Betrag {1} in {2},
Rows with Same Account heads will be merged on Ledger,Zeilen mit denselben Konten werden im Hauptbuch zusammengefasst,
Select Warehouses to get Stock for Materials Planning,"Wählen Sie Lager aus, um Bestände für die Materialplanung zu erhalten",
Select an invoice to load summary data,"Wählen Sie eine Rechnung aus, um die Zusammenfassung zu laden",
Serial / Batch Bundle,Serien- / Chargenbündel,
Serial / Batch Bundle Missing,Serien- / Chargenbündel fehlt,
Serial No Range,Seriennummernbereich,
Serial and Batch Details,Serien- und Chargendetails,
Sets 'Accepted Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das Annahmelager fest.,
Sets 'Rejected Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das „Ausschusslager“ fest.,
Shelf Life in Days,Haltbarkeitsdauer in Tagen,
Show Disabled Warehouses,Deaktivierte Lager anzeigen,
Show GL Balance,Hauptbuchsaldo anzeigen,
Show Pay Button in Purchase Order Portal,Schaltfläche „Bezahlen“ im Bestellportal anzeigen,
Show Taxes as Table in Print,Steuern als Tabelle im Druck anzeigen,
Show net values in opening and closing columns,Nettowerte in Eröffnungs- und Abschlussspalten anzeigen,
Show with upcoming revenue/expense,Mit kommenden Einnahmen/Ausgaben anzeigen,
Something went wrong please try again,"Etwas ist schief gelaufen, bitte versuchen Sie es erneut",
South Africa VAT Account,Südafrika Mehrwertsteuer-Konto,
South Africa VAT Settings,Südafrika Mehrwertsteuer-Einstellungen,
Start Date should be lower than End Date,Das Startdatum muss vor dem Enddatum liegen,
Start Deletion,Löschen starten,
Start Time can't be greater than or equal to End Time for {0}.,Die Startzeit kann nicht größer oder gleich der Endzeit für {0} sein.,
Started a background job to create {1} {0},Hintergrundjob zum Erstellen von {1} {0} gestartet,
Status set to rejected as there are one or more rejected readings.,"Der Status wurde auf abgelehnt gesetzt, da es einen oder mehrere abgelehnte Messwerte gibt.",
Stock Consumed During Repair,Während der Reparatur verbrauchter Bestand,
Stock Consumption Details,Details zum Lagerverbrauch,
Stock Planning,Bestandsplanung,
Stock Reservation,Bestandsreservierung,
Stock Reservation Entries Cancelled,Bestandsreservierungen storniert,
Stock Reservation Entries Created,Bestandsreservierungen erstellt,
Stock Reservation Entry,Bestandsreservierungseintrag,
Stock Reservation Entry cannot be updated as it has been delivered.,"Der Bestandsreservierungseintrag kann nicht aktualisiert werden, da er bereits geliefert wurde.",
"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Ein anhand einer Kommissionierliste erstellter Bestandsreservierungseintrag kann nicht aktualisiert werden. Wenn Sie Änderungen vornehmen müssen, empfehlen wir, den vorhandenen Eintrag zu stornieren und einen neuen zu erstellen.",
Stock Reservation can only be created against {0}.,Bestandsreservierungen können nur gegen {0} erstellt werden.,
Stock Reserved Qty (in Stock UOM),Reservierter Bestand (in Lager-ME),
Stock Unreservation,Aufhebung der Bestandsreservierung,
Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,"Lagerbestände/Konten können nicht eingefroren werden, da die Verarbeitung rückwirkender Einträge noch läuft. Bitte versuchen Sie es später erneut.",
Supplied Item,Gelieferter Artikel,
Supplies subject to the reverse charge provision,"Lieferungen, die der Reverse-Charge-Regelung unterliegen",
Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Aufgabe {0} hängt von Aufgabe {1} ab. Bitte fügen Sie Aufgabe {1} zur Aufgabenliste hinzu.,
Tax Amount will be rounded on a row(items) level,Der Steuerbetrag wird auf (Artikel-)Zeilenebene gerundet,
Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Steuererstattungen für Touristen im Rahmen der Steuererstattungsregelung für Touristen,
"Tax detail table fetched from item master as a string and stored in this field.
Used for Taxes and Charges","Steuerdetailtabelle, die aus dem Artikelstamm als Zeichenfolge abgerufen und in diesem Feld gespeichert wird.
Wird für Steuern und Gebühren verwendet",
"The Payment Request {0} is already paid, cannot process payment twice","Die Auszahlungsanforderung {0} ist bereits bezahlt, die Zahlung kann nicht zweimal verarbeitet werden",
The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Die Seriennummer in Zeile #{0}: {1} ist im Lager {2} nicht verfügbar.,
The Work Order is mandatory for Disassembly Order,Der Arbeitsauftrag ist obligatorisch für den Demontageauftrag,
The allocated amount is greater than the outstanding amount of Payment Request {0},Der zugewiesene Betrag ist größer als der ausstehende Betrag der Zahlungsanforderung {0},
The field {0} in row {1} is not set,Das Feld {0} in der Zeile {1} ist nicht gesetzt,
The following invalid Pricing Rules are deleted:,Die folgenden ungültigen Preisregeln werden gelöscht:,
The original invoice should be consolidated before or along with the return invoice.,Die Originalrechnung sollte vor oder zusammen mit der Erstattungsrechnung konsolidiert werden.,
"The sync has started in the background, please check the {0} list for new records.",Die Synchronisierung wurde im Hintergrund gestartet. Bitte überprüfen Sie die Liste {0} auf neue Datensätze.,
"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Die Benutzer mit dieser Rolle dürfen eine Lagerbewegungen erstellen/ändern, auch wenn die Transaktion eingefroren ist.",
There are no active Fiscal Years for which Demo Data can be generated.,"Es gibt keine aktiven Geschäftsjahre, für die Demodaten erstellt werden können.",
There were issues unlinking payment entry {0}.,Es gab Probleme bei der Aufhebung der Verknüpfung der Zahlung {0}.,
"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Diese Option ist standardmäßig aktiviert. Wenn Sie Materialien für Unterbaugruppen des Artikels, den Sie herstellen, planen möchten, lassen Sie diese Option aktiviert. Wenn Sie die Unterbaugruppen separat planen und herstellen, können Sie dieses Kontrollkästchen deaktivieren.",
To Date is mandatory,Bis Datum ist obligatorisch,
To Delivery Date,Bis Liefertermin,
To Due Date,Bis Fälligkeitsdatum,
To Reference Date,Bis Stichtag,
To cancel a {} you need to cancel the POS Closing Entry {}.,"Um einen {} zu stornieren, müssen Sie die POS-Abschlussbuchung {} stornieren.",
Total Incoming Value (Receipt),Gesamter eingehender Wert (Empfang),
Total Number of Booked Depreciations ,Gesamtzahl der gebuchten Abschreibungen ,
Total Operation Time,Gesamtbetriebszeit,
Total Other Charges,Sonstige Kosten insgesamt,
Total Purchase Amount,Gesamtkaufbetrag,
Total Purchase Cost has been updated,Die Gesamteinkaufskosten wurden aktualisiert,
UnReconcile,Zuordnung aufheben,
Unrealized Profit / Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers,
Unrealized Profit/Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers,
Validate Components Quantities Per BOM,Anzahl der Komponenten pro Stückliste überprüfen,
Validate Pricing Rule,Preisregel validieren,
Validate Stock on Save,Lagerbestand beim Speichern validieren,
Warning on Negative Stock,Warnung vor negativem Bestand,
You cannot create a {0} within the closed Accounting Period {1},Sie können innerhalb der abgeschlossenen Abrechnungsperiode {1} kein(e) {0} erstellen,
dated {0},von {0},
must be between 0 and 100,muss zwischen 0 und 100 liegen,
or its descendants,oder seine Nachkommen,
subscription is already cancelled.,abonnement ist bereits storniert.,
{0} Account not found against Customer {1}.,{0} Konto für Kunde {1} nicht gefunden.,
{0} Transaction(s) Reconciled,{0} Transaktion(en) Abgestimmt,
{0} cannot be zero,{0} kann nicht Null sein,
{0} is already running for {1},{0} läuft bereits für {1},
{0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar.,
Cannot {0} from {1} without any negative outstanding invoice,Kann nicht {0} von {1} ohne negative ausstehende Rechnung,
Common Code,Gemeinsamer Code,
Event,Ereignis,
Forecast,Prognose,
Wird für Steuern und Gebühren verwendet",
"The Payment Request {0} is already paid, cannot process payment twice","Die Auszahlungsanforderung {0} ist bereits bezahlt, die Zahlung kann nicht zweimal verarbeitet werden",
The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Die Seriennummer in Zeile #{0}: {1} ist im Lager {2} nicht verfügbar.,
The Work Order is mandatory for Disassembly Order,Der Arbeitsauftrag ist obligatorisch für den Demontageauftrag,
The allocated amount is greater than the outstanding amount of Payment Request {0},Der zugewiesene Betrag ist größer als der ausstehende Betrag der Zahlungsanforderung {0},
The field {0} in row {1} is not set,Das Feld {0} in der Zeile {1} ist nicht gesetzt,
The following invalid Pricing Rules are deleted:,Die folgenden ungültigen Preisregeln werden gelöscht:,
The original invoice should be consolidated before or along with the return invoice.,Die Originalrechnung sollte vor oder zusammen mit der Erstattungsrechnung konsolidiert werden.,
"The sync has started in the background, please check the {0} list for new records.",Die Synchronisierung wurde im Hintergrund gestartet. Bitte überprüfen Sie die Liste {0} auf neue Datensätze.,
"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Die Benutzer mit dieser Rolle dürfen eine Lagerbewegungen erstellen/ändern, auch wenn die Transaktion eingefroren ist.",
There are no active Fiscal Years for which Demo Data can be generated.,"Es gibt keine aktiven Geschäftsjahre, für die Demodaten erstellt werden können.",
There were issues unlinking payment entry {0}.,Es gab Probleme bei der Aufhebung der Verknüpfung der Zahlung {0}.,
"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Diese Option ist standardmäßig aktiviert. Wenn Sie Materialien für Unterbaugruppen des Artikels, den Sie herstellen, planen möchten, lassen Sie diese Option aktiviert. Wenn Sie die Unterbaugruppen separat planen und herstellen, können Sie dieses Kontrollkästchen deaktivieren.",
To Date is mandatory,Bis Datum ist obligatorisch,
To Delivery Date,Bis Liefertermin,
To Due Date,Bis Fälligkeitsdatum,
To Reference Date,Bis Stichtag,
To cancel a {} you need to cancel the POS Closing Entry {}.,"Um einen {} zu stornieren, müssen Sie die POS-Abschlussbuchung {} stornieren.",
Total Incoming Value (Receipt),Gesamter eingehender Wert (Empfang),
Total Number of Booked Depreciations ,Gesamtzahl der gebuchten Abschreibungen ,
Total Operation Time,Gesamtbetriebszeit,
Total Other Charges,Sonstige Kosten insgesamt,
Total Purchase Amount,Gesamtkaufbetrag,
Total Purchase Cost has been updated,Die Gesamteinkaufskosten wurden aktualisiert,
UnReconcile,Zuordnung aufheben,
Unrealized Profit / Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers,
Unrealized Profit/Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers,
Validate Components Quantities Per BOM,Anzahl der Komponenten pro Stückliste überprüfen,
Validate Pricing Rule,Preisregel validieren,
Validate Stock on Save,Lagerbestand beim Speichern validieren,
Warning on Negative Stock,Warnung vor negativem Bestand,
You cannot create a {0} within the closed Accounting Period {1},Sie können innerhalb der abgeschlossenen Abrechnungsperiode {1} kein(e) {0} erstellen,
dated {0},von {0},
must be between 0 and 100,muss zwischen 0 und 100 liegen,
or its descendants,oder seine Nachkommen,
subscription is already cancelled.,abonnement ist bereits storniert.,
{0} Account not found against Customer {1}.,{0} Konto für Kunde {1} nicht gefunden.,
{0} Transaction(s) Reconciled,{0} Transaktion(en) Abgestimmt,
{0} cannot be zero,{0} kann nicht Null sein,
{0} is already running for {1},{0} läuft bereits für {1},
{0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar.,
Cannot {0} from {1} without any negative outstanding invoice,Kann nicht {0} von {1} ohne negative ausstehende Rechnung,
Common Code,Gemeinsamer Code,
Event,Ereignis,
Forecast,Prognose,
"If <b>Enabled</b> - Reconciliation happens on the <b>Advance Payment posting date</b><br>
If <b>Disabled</b> - Reconciliation happens on oldest of 2 Dates: <b>Invoice Date</b> or the <b>Advance Payment posting date</b><br>
","Falls <b>aktiviert</b> - erfolgt der Abgleich am <b>Buchungsdatum der Vorauszahlung</b><br>
Falls <b>deaktiviert</b> - erfolgt der Abgleich am ältesten von 2 Daten: <b>Rechnungsdatum</b> oder <b>Buchungsdatum der Vorauszahlung</b><br>
",
Pay,Zahlen,Amount
Please set '{0}' in Company: {1},Bitte stellen Sie '{0}' in Unternehmen ein: {1},
Price is not set for the item.,Für den Artikel ist kein Preis festgelegt.,
Rate of Depreciation (%),Abschreibungssatz (%),
Rejected ,Abgelehnt ,
Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Zeile #{0}: Der zugewiesene Betrag kann nicht größer sein als der ausstehende Betrag der Zahlungsanforderung {1},
Section,Sektion,
Sending...,Senden...,
",
Pay,Zahlen,Amount
Please set '{0}' in Company: {1},Bitte stellen Sie '{0}' in Unternehmen ein: {1},
Price is not set for the item.,Für den Artikel ist kein Preis festgelegt.,
Rate of Depreciation (%),Abschreibungssatz (%),
Rejected ,Abgelehnt ,
Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Zeile #{0}: Der zugewiesene Betrag kann nicht größer sein als der ausstehende Betrag der Zahlungsanforderung {1},
Section,Sektion,
Sending...,Senden...,
Can't render this file because it is too large.