mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
fix: pos recent order display customer code and name (#48379)
(cherry picked from commit 5f721f01d3)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -1063,21 +1063,31 @@
|
||||
justify-content: flex-end;
|
||||
padding-right: var(--padding-sm);
|
||||
|
||||
> .customer-name {
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
> .customer-section {
|
||||
margin-bottom: auto;
|
||||
|
||||
> .customer-email {
|
||||
font-size: var(--text-md);
|
||||
font-weight: 500;
|
||||
> .customer-name {
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
> .customer-code {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
||||
> .customer-email {
|
||||
font-size: var(--text-md);
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
> .cashier {
|
||||
font-size: var(--text-md);
|
||||
font-weight: 500;
|
||||
color: var(--gray-600);
|
||||
margin-top: auto;
|
||||
margin-top: var(--margin-md);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1085,7 +1095,6 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
|
||||
> .paid-amount {
|
||||
font-size: var(--text-2xl);
|
||||
|
||||
@@ -338,7 +338,7 @@ def create_opening_voucher(pos_profile, company, balance_details):
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_past_order_list(search_term, status, limit=20):
|
||||
fields = ["name", "grand_total", "currency", "customer", "posting_time", "posting_date"]
|
||||
fields = ["name", "grand_total", "currency", "customer", "customer_name", "posting_time", "posting_date"]
|
||||
invoice_list = []
|
||||
|
||||
if search_term and status:
|
||||
|
||||
@@ -106,7 +106,7 @@ erpnext.PointOfSale.PastOrderList = class {
|
||||
<svg class="mr-2" width="12" height="12" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>
|
||||
</svg>
|
||||
${frappe.ellipsis(invoice.customer, 20)}
|
||||
${frappe.ellipsis(invoice.customer_name, 20)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="invoice-total-status">
|
||||
|
||||
@@ -73,14 +73,18 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
||||
get_upper_section_html(doc) {
|
||||
const { status } = doc;
|
||||
let indicator_color = "";
|
||||
const is_customer_naming_by_customer_name = frappe.sys_defaults.cust_master_name !== "Customer Name";
|
||||
|
||||
["Paid", "Consolidated"].includes(status) && (indicator_color = "green");
|
||||
status === "Draft" && (indicator_color = "red");
|
||||
status === "Return" && (indicator_color = "grey");
|
||||
|
||||
return `<div class="left-section">
|
||||
<div class="customer-name">${doc.customer}</div>
|
||||
<div class="customer-email">${this.customer_email}</div>
|
||||
<div class="customer-section">
|
||||
<div class="customer-name">${doc.customer_name}</div>
|
||||
${is_customer_naming_by_customer_name ? `<div class="customer-code">${doc.customer}</div>` : ""}
|
||||
<div class="customer-email">${this.customer_email}</div>
|
||||
</div>
|
||||
<div class="cashier">${__("Sold by")}: ${doc.owner}</div>
|
||||
</div>
|
||||
<div class="right-section">
|
||||
|
||||
Reference in New Issue
Block a user