Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webapp): inconsistency in currency of universal search items #335

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading