<% if(!_.isEmpty(opportunityData)){ %> <% if(newOpportunityRow === true) { %> <% opportunityPercentage = '' %> <% if(opportunityData.get('opportunity_stage_id') != 0 && opportunityData.get('opportunity_stage_id') != 1 && opportunityData.get('opportunity_stage_id') != '100') { %> <% opportunityPercentage = ' '+opportunityData.get('opportunity_stage_id')+ '%' %> <% } %> <%= opportunityData.get('opportunity_name') %> <%= opportunityCreatedAt %> <%= expectedCloseDate %> <%= opportunityStages[opportunityData.get('opportunity_stage_id')] + opportunityPercentage %> <%= currencySymbol + parseInt(opportunityData.get('opportunity_value'), 10) %>
<%= _.isUndefined(i18n['OR'])?'OR':i18n['OR'] %>
<% } %> <% if(!_.isEmpty(opportunityData.get('quote_id'))) { %> <% _.each(opportunityData.get('opportunityQuoteInfo'), function(oppData){ %> <%= oppData.title %> <% createdAt = moment(oppData.created_at, 'YYYY-MM-DD HH:mm:ss').format('DD MMMM YYYY') %> <%= (createdAt !== 'Invalid date') ? createdAt : '' %> <% expiredAt = moment(oppData.expired_at, 'YYYY-MM-DD HH:mm:ss').format('DD MMMM YYYY') %> <%= (expiredAt !== 'Invalid date') ? expiredAt : '' %> <% if (oppData.cartStatus === 'partial') {%> <%= oppData.cartStatus %> <% } else { %> <%= oppData.status %> <% } %> <%= accounting.formatMoney(oppData.cartTotal, JSON.parse(moneyFormat)) %> <%= oppData.quoteOwnerName %> <% }) %> <% } %> <% } %>