@if (vendor) {
} @if (vendor) {
{{ vendor.name }}

@if (vendor.email) { {{ vendor.email }} } @if (vendor.website) { {{ vendor.website }} } @if (vendor.code) { {{ vendor.code }} } @if (vendor.tags?.length) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.TAG_COUNT' | translate : { count: vendor.tags.length } }} }

@if (summary) {
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.TOTAL_SPENT' | translate }}
@if (summary.totals) { {{ summary.totals }} @if (currencies.length > 1) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.ACROSS_CURRENCIES' | translate : { count: currencies.length } }} } @else if (currencies.length === 1) { {{ 'EXPENSE_VIEW.CURRENCY_HINT' | translate : { currency: currencies[0] } }} } } @else { — }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.EXPENSE_COUNT' | translate }}
{{ summary.count }} @if (summary.firstExpenseDate) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.SINCE' | translate : { date: (summary.firstExpenseDate | dateFormat) } }} }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.AVERAGE_EXPENSE' | translate }}
@if (summary.average) { {{ summary.average }} {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.PER_EXPENSE' | translate }} } @else { — }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.LAST_EXPENSE' | translate }}
@if (summary.lastExpenseDate) { {{ summary.lastExpenseDate | dateFormat }} @if (daysSinceLast !== null) { @if (daysSinceLast === 0) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.TODAY' | translate }} } @else if (daysSinceLast === 1) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.ONE_DAY_AGO' | translate }} } @else { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.DAYS_AGO' | translate : { count: daysSinceLast } }} } } } @else { — }
} @else {
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.PAYMENT_TERMS' | translate }}
@if (vendor.paymentTermsDays !== null && vendor.paymentTermsDays !== undefined) { {{ vendor.paymentTermsDays }} } @else { — }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.LEAD_TIME' | translate }}
@if (vendor.leadTimeDays !== null && vendor.leadTimeDays !== undefined) { {{ vendor.leadTimeDays }} } @else { — }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.MINIMUM_ORDER' | translate }}
@if (minimumOrder) { {{ minimumOrder }} } @else { — }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.CURRENCY' | translate }}
@if (vendor.currency) { {{ vendor.currency }} } @else { — }
}
@if (expenses) {
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.SPEND' | translate }}
@if (chart.currency) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.SPEND_CAPTION' | translate : { currency: chart.currency, count: chartMonths } }} }
@if (chart.bars.length) {
@for (option of chartKindOptions; track option.kind) { }
@for (months of chartMonthOptions; track months) { {{ 'EXPENSE_VIEW.LAST_MONTHS' | translate : { count: months } }} }
}
@if (chart.bars.length) { @if (chart.otherCurrencies.length) {

{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.OTHER_CURRENCIES' | translate : { currencies: chart.otherCurrencies.join(', ') } }}

} } @else {

{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.NO_EXPENSES' | translate }}

}
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.RECENT_EXPENSES' | translate }}
@if (expenses.length) { {{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.RECENT_CAPTION' | translate : { shown: recentExpenses.length, total: expenses.length } }} }
{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.OPEN_EXPENSES' | translate }}
@if (recentExpenses.length) { } @else {

{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.NO_EXPENSES' | translate }}

}
} @else {

{{ 'ORGANIZATIONS_PAGE.VENDOR_VIEW.EXPENSES_HIDDEN' | translate }}

}
}