fix(ux): allow translations (#28455)
* Translation * Translations Co-authored-by: xdlumertz <alexandrelumertz@gmail>
This commit is contained in:
parent
69a17b9e51
commit
cdaf0a04cf
@ -339,7 +339,7 @@ class PaymentEntry(AccountsController):
|
|||||||
for k, v in no_oustanding_refs.items():
|
for k, v in no_oustanding_refs.items():
|
||||||
frappe.msgprint(
|
frappe.msgprint(
|
||||||
_("{} - {} now have {} as they had no outstanding amount left before submitting the Payment Entry.")
|
_("{} - {} now have {} as they had no outstanding amount left before submitting the Payment Entry.")
|
||||||
.format(k, frappe.bold(", ".join(d.reference_name for d in v)), frappe.bold("negative outstanding amount"))
|
.format(_(k), frappe.bold(", ".join(d.reference_name for d in v)), frappe.bold(_("negative outstanding amount")))
|
||||||
+ "<br><br>" + _("If this is undesirable please cancel the corresponding Payment Entry."),
|
+ "<br><br>" + _("If this is undesirable please cancel the corresponding Payment Entry."),
|
||||||
title=_("Warning"), indicator="orange")
|
title=_("Warning"), indicator="orange")
|
||||||
|
|
||||||
@ -611,7 +611,7 @@ class PaymentEntry(AccountsController):
|
|||||||
|
|
||||||
if not total_negative_outstanding:
|
if not total_negative_outstanding:
|
||||||
frappe.throw(_("Cannot {0} {1} {2} without any negative outstanding invoice")
|
frappe.throw(_("Cannot {0} {1} {2} without any negative outstanding invoice")
|
||||||
.format(self.payment_type, ("to" if self.party_type=="Customer" else "from"),
|
.format(_(self.payment_type), (_("to") if self.party_type=="Customer" else _("from")),
|
||||||
self.party_type), InvalidPaymentEntry)
|
self.party_type), InvalidPaymentEntry)
|
||||||
|
|
||||||
elif paid_amount - additional_charges > total_negative_outstanding:
|
elif paid_amount - additional_charges > total_negative_outstanding:
|
||||||
@ -1092,7 +1092,7 @@ def get_outstanding_reference_documents(args):
|
|||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
frappe.msgprint(_("No outstanding invoices found for the {0} {1} which qualify the filters you have specified.")
|
frappe.msgprint(_("No outstanding invoices found for the {0} {1} which qualify the filters you have specified.")
|
||||||
.format(args.get("party_type").lower(), frappe.bold(args.get("party"))))
|
.format(_(args.get("party_type")).lower(), frappe.bold(args.get("party"))))
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
@ -728,7 +728,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
"account": self.stock_received_but_not_billed,
|
"account": self.stock_received_but_not_billed,
|
||||||
"against": self.supplier,
|
"against": self.supplier,
|
||||||
"debit": flt(item.item_tax_amount, item.precision("item_tax_amount")),
|
"debit": flt(item.item_tax_amount, item.precision("item_tax_amount")),
|
||||||
"remarks": self.remarks or "Accounting Entry for Stock",
|
"remarks": self.remarks or _("Accounting Entry for Stock"),
|
||||||
"cost_center": self.cost_center,
|
"cost_center": self.cost_center,
|
||||||
"project": item.project or self.project
|
"project": item.project or self.project
|
||||||
}, item=item)
|
}, item=item)
|
||||||
@ -936,7 +936,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
"cost_center": tax.cost_center,
|
"cost_center": tax.cost_center,
|
||||||
"against": self.supplier,
|
"against": self.supplier,
|
||||||
"credit": valuation_tax[tax.name],
|
"credit": valuation_tax[tax.name],
|
||||||
"remarks": self.remarks or "Accounting Entry for Stock"
|
"remarks": self.remarks or _("Accounting Entry for Stock")
|
||||||
}, item=tax))
|
}, item=tax))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@ -978,7 +978,7 @@ frappe.ui.form.on('Sales Invoice', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frm.doc.is_debit_note) {
|
if (frm.doc.is_debit_note) {
|
||||||
frm.set_df_property('return_against', 'label', 'Adjustment Against');
|
frm.set_df_property('return_against', 'label', __('Adjustment Against'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frappe.boot.active_domains.includes("Healthcare")) {
|
if (frappe.boot.active_domains.includes("Healthcare")) {
|
||||||
@ -988,10 +988,10 @@ frappe.ui.form.on('Sales Invoice', {
|
|||||||
if (cint(frm.doc.docstatus==0) && cur_frm.page.current_view_name!=="pos" && !frm.doc.is_return) {
|
if (cint(frm.doc.docstatus==0) && cur_frm.page.current_view_name!=="pos" && !frm.doc.is_return) {
|
||||||
frm.add_custom_button(__('Healthcare Services'), function() {
|
frm.add_custom_button(__('Healthcare Services'), function() {
|
||||||
get_healthcare_services_to_invoice(frm);
|
get_healthcare_services_to_invoice(frm);
|
||||||
},"Get Items From");
|
},__("Get Items From"));
|
||||||
frm.add_custom_button(__('Prescriptions'), function() {
|
frm.add_custom_button(__('Prescriptions'), function() {
|
||||||
get_drugs_to_invoice(frm);
|
get_drugs_to_invoice(frm);
|
||||||
},"Get Items From");
|
},__("Get Items From"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -134,7 +134,7 @@ class StockController(AccountsController):
|
|||||||
"against": expense_account,
|
"against": expense_account,
|
||||||
"cost_center": item_row.cost_center,
|
"cost_center": item_row.cost_center,
|
||||||
"project": item_row.project or self.get('project'),
|
"project": item_row.project or self.get('project'),
|
||||||
"remarks": self.get("remarks") or "Accounting Entry for Stock",
|
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
|
||||||
"debit": flt(sle.stock_value_difference, precision),
|
"debit": flt(sle.stock_value_difference, precision),
|
||||||
"is_opening": item_row.get("is_opening") or self.get("is_opening") or "No",
|
"is_opening": item_row.get("is_opening") or self.get("is_opening") or "No",
|
||||||
}, warehouse_account[sle.warehouse]["account_currency"], item=item_row))
|
}, warehouse_account[sle.warehouse]["account_currency"], item=item_row))
|
||||||
@ -143,7 +143,7 @@ class StockController(AccountsController):
|
|||||||
"account": expense_account,
|
"account": expense_account,
|
||||||
"against": warehouse_account[sle.warehouse]["account"],
|
"against": warehouse_account[sle.warehouse]["account"],
|
||||||
"cost_center": item_row.cost_center,
|
"cost_center": item_row.cost_center,
|
||||||
"remarks": self.get("remarks") or "Accounting Entry for Stock",
|
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
|
||||||
"credit": flt(sle.stock_value_difference, precision),
|
"credit": flt(sle.stock_value_difference, precision),
|
||||||
"project": item_row.get("project") or self.get("project"),
|
"project": item_row.get("project") or self.get("project"),
|
||||||
"is_opening": item_row.get("is_opening") or self.get("is_opening") or "No"
|
"is_opening": item_row.get("is_opening") or self.get("is_opening") or "No"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user