mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
Merge pull request #335 from bigcapitalhq/big-128-inconsistency-in-currency-display-on-the-quick-find-feature
fix(webapp): inconsistency in currency of universal search items
This commit is contained in:
@@ -13,6 +13,7 @@ export class PurchaseInvoiceTransformer extends Transformer {
|
|||||||
return [
|
return [
|
||||||
'formattedBillDate',
|
'formattedBillDate',
|
||||||
'formattedDueDate',
|
'formattedDueDate',
|
||||||
|
'formattedAmount',
|
||||||
'formattedPaymentAmount',
|
'formattedPaymentAmount',
|
||||||
'formattedBalance',
|
'formattedBalance',
|
||||||
'formattedDueAmount',
|
'formattedDueAmount',
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function VendorCreditUniversalSearchSelectComponent({
|
|||||||
openDrawer,
|
openDrawer,
|
||||||
}) {
|
}) {
|
||||||
if (resourceType === RESOURCES_TYPES.VENDOR_CREDIT) {
|
if (resourceType === RESOURCES_TYPES.VENDOR_CREDIT) {
|
||||||
openDrawer(DRAWERS.VENDOR_CREDIT_DETAIL_DRAWER, {
|
openDrawer(DRAWERS.VENDOR_CREDIT_DETAILS, {
|
||||||
vendorCreditId: resourceId,
|
vendorCreditId: resourceId,
|
||||||
});
|
});
|
||||||
onAction && onAction();
|
onAction && onAction();
|
||||||
@@ -83,7 +83,7 @@ export function VendorCreditUniversalSearchItem(
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
<div class="amount">${item.reference.amount}</div>
|
<div class="amount">{item.reference.formatted_amount}</div>
|
||||||
<VendorCreditUniversalSearchStatus receipt={item.reference} />
|
<VendorCreditUniversalSearchStatus receipt={item.reference} />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { Icon } from '@/components';
|
|||||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||||
import { highlightText } from '@/utils';
|
import { highlightText } from '@/utils';
|
||||||
import { AbilitySubject, PaymentMadeAction } from '@/constants/abilityOption';
|
import { AbilitySubject, PaymentMadeAction } from '@/constants/abilityOption';
|
||||||
|
import { DRAWERS } from '@/constants/drawers';
|
||||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export function CreditNoteUniversalSearchItem(
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
<div class="amount">${item.reference.amount}</div>
|
<div class="amount">{item.reference.formatted_amount}</div>
|
||||||
<CreditNoteUniversalSearchStatus receipt={item.reference} />
|
<CreditNoteUniversalSearchStatus receipt={item.reference} />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,13 +83,13 @@ export function InvoiceUniversalSearchItem(
|
|||||||
<span class="bp4-text-muted">
|
<span class="bp4-text-muted">
|
||||||
{highlightText(item.reference.invoice_no, query)}{' '}
|
{highlightText(item.reference.invoice_no, query)}{' '}
|
||||||
<Icon icon={'caret-right-16'} iconSize={16} />
|
<Icon icon={'caret-right-16'} iconSize={16} />
|
||||||
{item.reference.formatted_invoice_date}
|
{item.reference.invoice_date_formatted}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
<div class="amount">${item.reference.balance}</div>
|
<div class="amount">{item.reference.total_formatted}</div>
|
||||||
<InvoiceStatus customer={item.reference} />
|
<InvoiceStatus customer={item.reference} />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export function ReceiptUniversalSearchItem(
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
<div class="amount">${item.reference.amount}</div>
|
<div class="amount">{item.reference.formatted_amount}</div>
|
||||||
<ReceiptStatus receipt={item.reference} />
|
<ReceiptStatus receipt={item.reference} />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const VendorUniversalSearchSelectAction = withDrawerActions(
|
|||||||
const vendorToSearch = (contact) => ({
|
const vendorToSearch = (contact) => ({
|
||||||
id: contact.id,
|
id: contact.id,
|
||||||
text: contact.display_name,
|
text: contact.display_name,
|
||||||
label: contact.balance > 0 ? contact.formatted_balance + '' : '',
|
label: contact.formatted_balance,
|
||||||
reference: contact,
|
reference: contact,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user