Skip to content

Commit

Permalink
Merge pull request #335 from bigcapitalhq/big-128-inconsistency-in-cu…
Browse files Browse the repository at this point in the history
…rrency-display-on-the-quick-find-feature

fix(webapp): inconsistency in currency of universal search items
  • Loading branch information
abouolia authored Jan 29, 2024
2 parents 0da151f + a52f3a9 commit 0414c09
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class PurchaseInvoiceTransformer extends Transformer {
return [
'formattedBillDate',
'formattedDueDate',
'formattedAmount',
'formattedPaymentAmount',
'formattedBalance',
'formattedDueAmount',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function VendorCreditUniversalSearchSelectComponent({
openDrawer,
}) {
if (resourceType === RESOURCES_TYPES.VENDOR_CREDIT) {
openDrawer(DRAWERS.VENDOR_CREDIT_DETAIL_DRAWER, {
openDrawer(DRAWERS.VENDOR_CREDIT_DETAILS, {
vendorCreditId: resourceId,
});
onAction && onAction();
Expand Down Expand Up @@ -83,7 +83,7 @@ export function VendorCreditUniversalSearchItem(
}
label={
<>
<div class="amount">${item.reference.amount}</div>
<div class="amount">{item.reference.formatted_amount}</div>
<VendorCreditUniversalSearchStatus receipt={item.reference} />
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Icon } from '@/components';
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
import { highlightText } from '@/utils';
import { AbilitySubject, PaymentMadeAction } from '@/constants/abilityOption';
import { DRAWERS } from '@/constants/drawers';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function CreditNoteUniversalSearchItem(
}
label={
<>
<div class="amount">${item.reference.amount}</div>
<div class="amount">{item.reference.formatted_amount}</div>
<CreditNoteUniversalSearchStatus receipt={item.reference} />
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ export function InvoiceUniversalSearchItem(
<span class="bp4-text-muted">
{highlightText(item.reference.invoice_no, query)}{' '}
<Icon icon={'caret-right-16'} iconSize={16} />
{item.reference.formatted_invoice_date}
{item.reference.invoice_date_formatted}
</span>
</div>
}
label={
<>
<div class="amount">${item.reference.balance}</div>
<div class="amount">{item.reference.total_formatted}</div>
<InvoiceStatus customer={item.reference} />
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function ReceiptUniversalSearchItem(
}
label={
<>
<div class="amount">${item.reference.amount}</div>
<div class="amount">{item.reference.formatted_amount}</div>
<ReceiptStatus receipt={item.reference} />
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const VendorUniversalSearchSelectAction = withDrawerActions(
const vendorToSearch = (contact) => ({
id: contact.id,
text: contact.display_name,
label: contact.balance > 0 ? contact.formatted_balance + '' : '',
label: contact.formatted_balance,
reference: contact,
});

Expand Down

0 comments on commit 0414c09

Please sign in to comment.