mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
fix(translations): Incorrect syntax
This commit is contained in:
@@ -1044,8 +1044,8 @@ class SalesInvoice(SellingController):
|
|||||||
frappe.throw(_("Serial Numbers in row {0} does not match with Delivery Note").format(item.idx))
|
frappe.throw(_("Serial Numbers in row {0} does not match with Delivery Note").format(item.idx))
|
||||||
|
|
||||||
if item.serial_no and cint(item.qty) != len(si_serial_nos):
|
if item.serial_no and cint(item.qty) != len(si_serial_nos):
|
||||||
frappe.throw(_("Row {0}: {1} Serial numbers required for Item {2}. You have provided {3}.".format(
|
frappe.throw(_("Row {0}: {1} Serial numbers required for Item {2}. You have provided {3}.").format(
|
||||||
item.idx, item.qty, item.item_code, len(si_serial_nos))))
|
item.idx, item.qty, item.item_code, len(si_serial_nos)))
|
||||||
|
|
||||||
def validate_serial_against_sales_invoice(self):
|
def validate_serial_against_sales_invoice(self):
|
||||||
""" check if serial number is already used in other sales invoice """
|
""" check if serial number is already used in other sales invoice """
|
||||||
|
|||||||
@@ -500,8 +500,8 @@ class BuyingController(StockController):
|
|||||||
item_row = item_row.as_dict()
|
item_row = item_row.as_dict()
|
||||||
for fieldname in field_list:
|
for fieldname in field_list:
|
||||||
if flt(item_row[fieldname]) < 0:
|
if flt(item_row[fieldname]) < 0:
|
||||||
frappe.throw(_("Row #{0}: {1} can not be negative for item {2}".format(item_row['idx'],
|
frappe.throw(_("Row #{0}: {1} can not be negative for item {2}").format(item_row['idx'],
|
||||||
frappe.get_meta(item_row.doctype).get_label(fieldname), item_row['item_code'])))
|
frappe.get_meta(item_row.doctype).get_label(fieldname), item_row['item_code']))
|
||||||
|
|
||||||
def check_for_on_hold_or_closed_status(self, ref_doctype, ref_fieldname):
|
def check_for_on_hold_or_closed_status(self, ref_doctype, ref_fieldname):
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ class HotelRoomReservation(Document):
|
|||||||
+ d.qty + self.rooms_booked.get(d.item)
|
+ d.qty + self.rooms_booked.get(d.item)
|
||||||
total_rooms = self.get_total_rooms(d.item)
|
total_rooms = self.get_total_rooms(d.item)
|
||||||
if total_rooms < rooms_booked:
|
if total_rooms < rooms_booked:
|
||||||
frappe.throw(_("Hotel Rooms of type {0} are unavailable on {1}".format(d.item,
|
frappe.throw(_("Hotel Rooms of type {0} are unavailable on {1}").format(d.item,
|
||||||
frappe.format(day, dict(fieldtype="Date")))), exc=HotelRoomUnavailableError)
|
frappe.format(day, dict(fieldtype="Date"))), exc=HotelRoomUnavailableError)
|
||||||
|
|
||||||
self.rooms_booked[d.item] += rooms_booked
|
self.rooms_booked[d.item] += rooms_booked
|
||||||
|
|
||||||
@@ -74,8 +74,8 @@ class HotelRoomReservation(Document):
|
|||||||
net_rate += day_rate[0][0]
|
net_rate += day_rate[0][0]
|
||||||
else:
|
else:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Please set Hotel Room Rate on {}".format(
|
_("Please set Hotel Room Rate on {}").format(
|
||||||
frappe.format(day, dict(fieldtype="Date")))), exc=HotelRoomPricingNotSetError)
|
frappe.format(day, dict(fieldtype="Date"))), exc=HotelRoomPricingNotSetError)
|
||||||
d.rate = net_rate
|
d.rate = net_rate
|
||||||
d.amount = net_rate * flt(d.qty)
|
d.amount = net_rate * flt(d.qty)
|
||||||
self.net_total += d.amount
|
self.net_total += d.amount
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ class DailyWorkSummary(Document):
|
|||||||
|
|
||||||
return dict(replies=replies,
|
return dict(replies=replies,
|
||||||
original_message=dws_group.message,
|
original_message=dws_group.message,
|
||||||
title=_('Work Summary for {0}'.format(
|
title=_('Work Summary for {0}').format(
|
||||||
global_date_format(self.creation)
|
global_date_format(self.creation)
|
||||||
)),
|
),
|
||||||
did_not_reply=', '.join(did_not_reply) or '',
|
did_not_reply=', '.join(did_not_reply) or '',
|
||||||
did_not_reply_title=_('No replies from'))
|
did_not_reply_title=_('No replies from'))
|
||||||
|
|
||||||
|
|||||||
@@ -550,9 +550,9 @@ def validate_sales_invoice(doc):
|
|||||||
|
|
||||||
for fieldname in reqd_fields:
|
for fieldname in reqd_fields:
|
||||||
if not doc.get(fieldname):
|
if not doc.get(fieldname):
|
||||||
frappe.throw(_('{} is required to generate e-Way Bill JSON'.format(
|
frappe.throw(_('{} is required to generate e-Way Bill JSON').format(
|
||||||
doc.meta.get_label(fieldname)
|
doc.meta.get_label(fieldname)
|
||||||
)))
|
))
|
||||||
|
|
||||||
if len(doc.company_gstin) < 15:
|
if len(doc.company_gstin) < 15:
|
||||||
frappe.throw(_('You must be a registered supplier to generate e-Way Bill'))
|
frappe.throw(_('You must be a registered supplier to generate e-Way Bill'))
|
||||||
|
|||||||
@@ -719,9 +719,9 @@ def get_company_gstin_number(company):
|
|||||||
if gstin:
|
if gstin:
|
||||||
return gstin[0]["gstin"]
|
return gstin[0]["gstin"]
|
||||||
else:
|
else:
|
||||||
frappe.throw(_("Please set valid GSTIN No. in Company Address for company {0}".format(
|
frappe.throw(_("Please set valid GSTIN No. in Company Address for company {0}").format(
|
||||||
frappe.bold(company)
|
frappe.bold(company)
|
||||||
)))
|
))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def download_json_file():
|
def download_json_file():
|
||||||
|
|||||||
Reference in New Issue
Block a user