fix: use frappe.datetime.str_to_user (#45216)
* fix: default_datetime_format * fix: add_format_datetime * fix: update to str_to_user in point_of_sale/pos_controller.js Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> * fix: convert_to_str_to_user * fix: linters * fix: whitespace --------- Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
This commit is contained in:
@@ -155,7 +155,7 @@ erpnext.PointOfSale.Controller = class {
|
||||
this.page.set_title_sub(
|
||||
`<span class="indicator orange">
|
||||
<a class="text-muted" href="#Form/POS%20Opening%20Entry/${this.pos_opening}">
|
||||
Opened at ${moment(this.pos_opening_time).format("Do MMMM, h:mma")}
|
||||
Opened at ${frappe.datetime.str_to_user(this.pos_opening_time)}
|
||||
</a>
|
||||
</span>`
|
||||
);
|
||||
|
||||
@@ -988,8 +988,8 @@ erpnext.PointOfSale.ItemCart = class {
|
||||
.html(`${__("Last transacted")} ${__(elapsed_time)}`);
|
||||
|
||||
res.forEach((invoice) => {
|
||||
const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format(
|
||||
"Do MMMM, h:mma"
|
||||
const posting_datetime = frappe.datetime.str_to_user(
|
||||
invoice.posting_date + " " + invoice.posting_time
|
||||
);
|
||||
let indicator_color = {
|
||||
Paid: "green",
|
||||
|
||||
@@ -96,8 +96,8 @@ erpnext.PointOfSale.PastOrderList = class {
|
||||
}
|
||||
|
||||
get_invoice_html(invoice) {
|
||||
const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format(
|
||||
"Do MMMM, h:mma"
|
||||
const posting_datetime = frappe.datetime.str_to_user(
|
||||
invoice.posting_date + " " + invoice.posting_time
|
||||
);
|
||||
return `<div class="invoice-wrapper" data-invoice-name="${escape(invoice.name)}">
|
||||
<div class="invoice-name-date">
|
||||
|
||||
Reference in New Issue
Block a user