<% let heading; if (ob.paymentNumber > 1) { heading = ob.polyT('orderDetail.summaryTab.payment.paymentHeading', { paymentNumber: ob.paymentNumber, }); } else { heading = ob.polyT('orderDetail.summaryTab.payment.firstPaymentHeading'); } %>

<%= heading %>

<% if (ob.timestamp) { %> <%= ob.moment(ob.timestamp).format('lll') %> <% } %>
<% let statusIconClass = 'clrTEm'; // full payment let statusIcon = 'ion-ios-checkmark-empty'; // full payment if (ob.amountShort > 0) { // partial payment statusIconClass = 'clrTErr'; statusIcon = 'ion-ios-close-empty'; } %>
<% const priceFrag = ob.currencyMod.pairedCurrency( ob.value, ob.currencyMod.getServerCurrency().code, ob.userCurrency ); let infoLine = ''; if (ob.payee) { infoLine = ob.polyT(`orderDetail.summaryTab.payment.amountTo`, { currencyPairing: priceFrag, payeeName: ob.payee, }); } else { // payee has not been set yet. It'll be set when the relevant profile is returned // asynchronously infoLine = priceFrag; } %>
<%= infoLine %>
<% let confirmationsText; if (ob.confirmations < 10000) { confirmationsText = ob.polyT('orderDetail.summaryTab.payment.confirmationsCount', { smart_count: ob.confirmations, }); } else { confirmationsText = ob.polyT('orderDetail.summaryTab.payment.veryManyConfirmationsCount', { countText: ob.abbrNum(ob.confirmations), }); } %>
<%= confirmationsText %>
<% let subText = ob.polyT('orderDetail.summaryTab.payment.paidInFull'); if (ob.amountShort > 0) { subText = ob.polyT('orderDetail.summaryTab.payment.underpaidAmountShort', { amountShort: ob.upToFixed(ob.amountShort, 8), }); } %>
<%= subText %>
<% if (ob.showAcceptRejectButtons || ob.showCancelButton) { %>
<% if (ob.showAcceptRejectButtons) { %>
<% if (ob.rejectInProgress) { %> <% // including invisible cancel link to properly space the spinner %> <%= ob.spinner({ className: 'spinnerSm center' }) %> <% } else { %>
<%= ob.polyT('orderDetail.summaryTab.payment.rejectBtn') %>
<%= ob.polyT('orderDetail.summaryTab.payment.rejectConfirm.title') %>

<%= ob.polyT('orderDetail.summaryTab.payment.rejectConfirm.body', { cur: ob.currencyMod.getServerCurrency().name }) %>


<% } %> <%= ob.processingButton({ className: `btn clrBAttGrad clrBrDec1 clrTOnEmph tx5b js-acceptOrder ${ob.acceptInProgress ? 'processing' : ''} ${ob.rejectInProgress ? 'disabled' : ''}`, btnText: ob.polyT('orderDetail.summaryTab.payment.acceptBtn') }) %>
<% } else if (ob.showCancelButton) { %> <% if (ob.cancelInProgress) { %> <% // including invisible cancel link to properly space the spinner %> <%= ob.spinner({ className: 'spinnerSm center' }) %> <% } else { %> <%= ob.polyT('orderDetail.summaryTab.payment.cancelBtn') %> <% } %> <% } %>
<% } %>