mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 11:44:11 +00:00
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>
(cherry picked from commit cd3f03696e)
Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com>
This commit is contained in:
@@ -155,7 +155,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
this.page.set_title_sub(
|
this.page.set_title_sub(
|
||||||
`<span class="indicator orange">
|
`<span class="indicator orange">
|
||||||
<a class="text-muted" href="#Form/POS%20Opening%20Entry/${this.pos_opening}">
|
<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>
|
</a>
|
||||||
</span>`
|
</span>`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -988,8 +988,8 @@ erpnext.PointOfSale.ItemCart = class {
|
|||||||
.html(`${__("Last transacted")} ${__(elapsed_time)}`);
|
.html(`${__("Last transacted")} ${__(elapsed_time)}`);
|
||||||
|
|
||||||
res.forEach((invoice) => {
|
res.forEach((invoice) => {
|
||||||
const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format(
|
const posting_datetime = frappe.datetime.str_to_user(
|
||||||
"Do MMMM, h:mma"
|
invoice.posting_date + " " + invoice.posting_time
|
||||||
);
|
);
|
||||||
let indicator_color = {
|
let indicator_color = {
|
||||||
Paid: "green",
|
Paid: "green",
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ erpnext.PointOfSale.PastOrderList = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_invoice_html(invoice) {
|
get_invoice_html(invoice) {
|
||||||
const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format(
|
const posting_datetime = frappe.datetime.str_to_user(
|
||||||
"Do MMMM, h:mma"
|
invoice.posting_date + " " + invoice.posting_time
|
||||||
);
|
);
|
||||||
return `<div class="invoice-wrapper" data-invoice-name="${escape(invoice.name)}">
|
return `<div class="invoice-wrapper" data-invoice-name="${escape(invoice.name)}">
|
||||||
<div class="invoice-name-date">
|
<div class="invoice-name-date">
|
||||||
|
|||||||
Reference in New Issue
Block a user