<commit_before><ul class="breadcrumb">
    <li><a href="" ui-sref="orders">All Orders</a></li>
    <li class="active">{{orderDetails.order.ID}}</li>
</ul>
<article>
    <header class="l-page-header">
        <h3 class="l-page-header__title">
            <small class="pull-right">Submitted on {{orderDetails.order.DateSubmitted | date}}</small>
            <span class="text-muted">Order:</span> {{orderDetails.order.ID}} <br>
            <span class="pull-right" ng-if="orderDetails.isMyOrder">
                <ordercloud-favorite-order current-user="base.currentUser" order="orderDetails.order"></ordercloud-favorite-order>
                <ordercloud-repeat-order original-order-id="orderDetails.order.ID" current-order-id="base.currentOrder.ID"></ordercloud-repeat-order>
            </span>
        </h3>
    </header>
    <ul class="nav nav-tabs">
        <li ng-class="{active: application.$state.is('orderDetail')}">
            <a href="" ui-sref="orderDetail"><i class="fa fa-cube"></i> <span>Details</span></a>
        </li>
        <li ui-sref-active="active" oc-if-roles="['ApprovalRuleAdmin', 'AddressReader']">
            <a href="" ui-sref=".approvals"><i class="fa fa-check-square-o"></i> Approvals</a>
        </li>
    </ul>
    <br>
    <div ui-view cg-busy="application.stateLoading('orderDetail')">
        <!--====== ORDER DETAILS ======-->

        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-8">
                        <b>Date {{orderDetails.order.DateSubmitted ? 'Submitted' : 'Created'}}: </b> {{(orderDetails.order.DateSubmitted || orderDetails.order.DateCreated) | date:'medium'}} <br>
                        <b>Status: </b> {{orderDetails.order.Status | humanize}} <br>
                        <b>Buyer Company: </b> {{orderDetails.order.FromCompany.Name}} <br>
                        <b>Created By: </b> {{orderDetails.order.FromUser.FirstName + ' ' + orderDetails.order.FromUser.LastName}} <br>
                        <b>Tracking Number: </b> {{orderDetails.shipments.Items[0].TrackingNumber || 'N/A'}} <br>
                        <div ng-if="orderDetails.order.Comments">
                            <b>Comments: </b> {{orderDetails.order.Comments}}
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <span>Subtotal</span> <span class="pull-right">{{orderDetails.order.Subtotal | currency}}</span> <br>
                        <span>Shipping</span> <span class="pull-right">{{orderDetails.order.ShippingCost | currency}}</span> <br>
                        <span>Tax</span> <span class="pull-right">{{orderDetails.order.TaxCost | currency}}</span>
                        <hr>
                        <b>Total <span class="pull-right">{{orderDetails.order.Total | currency}}</span></b>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6" ng-if="orderDetails.order.ShippingAddressID">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Shipping Address</h3>
                    </div>
                    <div class="panel-body">
                        <div ng-bind-html="orderDetails.lineItems.Items[0].ShippingAddress | address:'full'"></div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6" ng-if="orderDetails.order.BillingAddressID">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Billing Address</h3>
                    </div>
                    <div class="panel-body">
                        <div ng-bind-html="orderDetails.order.BillingAddress | address:'full'"></div>
                    </div>
                </div>
            </div>
        </div>

        <!--====== LINE ITEM LIST ======-->
        <div class="panel panel-default table-responsive">
            <table class="table table-striped table-bordered l-lineitem-table">
                <colgroup>
                    <col>
                    <col>
                    <col>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Product Name</th>
                        <th ng-if="!orderDetails.order.ShippingAddressID">Shipping Address</th>
                        <th>Quantity</th>
                        <th>Unit Price</th>
                        <th>Line Total</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="lineItem in orderDetails.lineItems.Items">
                        <td>{{lineItem.ProductID}}</td>
                        <td>
                            <a ui-sref="productDetail({productid: lineItem.ProductID})"> {{lineItem.Product.Name}}</a>
                            <ul ng-if="lineItem.Specs.length > 0">
                                <li ng-repeat="spec in lineItem.Specs">
                                    <small>{{spec.Name}}:</small>
                                    <small>{{spec.Value}}</small>
                                </li>
                            </ul>
                        </td>
                        <td ng-if="!orderDetails.order.ShippingAddressID">{{lineItem.ShippingAddress | address}}</td>
                        <td>{{lineItem.Quantity}}</td>
                        <td>{{lineItem.UnitPrice | currency}}</td>
                        <td>{{lineItem.LineTotal | currency}}</td>
                    </tr>
                </tbody>
            </table>
        </div>

        <!--====== LINE ITEM PAGINATION ======-->
        <ul uib-pagination
            class="pagination-sm pull-right hidden-xs"
            ng-if="orderDetails.lineItems.Meta.TotalPages > 1"
            total-items="orderDetails.lineItems.Meta.TotalCount"
            items-per-page="orderDetails.lineItems.Meta.PageSize"
            max-size="5"
            boundary-links="orderDetails.lineItems.Meta.TotalPages > 5"
            ng-model="orderDetails.lineItems.Meta.Page"
            ng-change="orderDetails.pageChanged()">
        </ul>
        <button type="button"
                class="btn btn-default btn-block btn-lg visible-xs"
                ng-show="orderDetails.lineItems.Meta.Page < orderDetails.lineItems.Meta.TotalPages"
                ng-click="orderDetails.loadMore()">Load More</button>
    </div>
</article><commit_msg>F51-616 refactor: add PO ID to order details view<commit_after><ul class="breadcrumb">
    <li><a href="" ui-sref="orders">All Orders</a></li>
    <li class="active">{{orderDetails.order.ID}}</li>
</ul>
<article>
    <header class="l-page-header">
        <h3 class="l-page-header__title">
            <small class="pull-right">Submitted on {{orderDetails.order.DateSubmitted | date}}</small>
            <span class="text-muted">Order:</span> {{orderDetails.order.ID}} <br>
            <span class="pull-right" ng-if="orderDetails.isMyOrder">
                <ordercloud-favorite-order current-user="base.currentUser" order="orderDetails.order"></ordercloud-favorite-order>
                <ordercloud-repeat-order original-order-id="orderDetails.order.ID" current-order-id="base.currentOrder.ID"></ordercloud-repeat-order>
            </span>
        </h3>
    </header>
    <ul class="nav nav-tabs">
        <li ng-class="{active: application.$state.is('orderDetail')}">
            <a href="" ui-sref="orderDetail"><i class="fa fa-cube"></i> <span>Details</span></a>
        </li>
        <li ui-sref-active="active" oc-if-roles="['ApprovalRuleAdmin', 'AddressReader']">
            <a href="" ui-sref=".approvals"><i class="fa fa-check-square-o"></i> Approvals</a>
        </li>
    </ul>
    <br>
    <div ui-view cg-busy="application.stateLoading('orderDetail')">
        <!--====== ORDER DETAILS ======-->

        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-8">
                        <b>Date {{orderDetails.order.DateSubmitted ? 'Submitted' : 'Created'}}: </b> {{(orderDetails.order.DateSubmitted || orderDetails.order.DateCreated) | date:'medium'}} <br>
                        <b>Status: </b> {{orderDetails.order.Status | humanize}} <br>
                        <b>Buyer Company: </b> {{orderDetails.order.FromCompany.Name}} <br>
                        <b>Created By: </b> {{orderDetails.order.FromUser.FirstName + ' ' + orderDetails.order.FromUser.LastName}} <br>
                        <b>Tracking Number: </b> {{orderDetails.shipments.Items[0].TrackingNumber || 'N/A'}} <br>
                        <b>PO ID: </b> {{orderDetails.order.xp.POID || '(N/A)'}} <br>
                        <div ng-if="orderDetails.order.Comments">
                            <b>Comments: </b> {{orderDetails.order.Comments}}
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <span>Subtotal</span> <span class="pull-right">{{orderDetails.order.Subtotal | currency}}</span> <br>
                        <span>Shipping</span> <span class="pull-right">{{orderDetails.order.ShippingCost | currency}}</span> <br>
                        <span>Tax</span> <span class="pull-right">{{orderDetails.order.TaxCost | currency}}</span>
                        <hr>
                        <b>Total <span class="pull-right">{{orderDetails.order.Total | currency}}</span></b>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6" ng-if="orderDetails.order.ShippingAddressID">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Shipping Address</h3>
                    </div>
                    <div class="panel-body">
                        <div ng-bind-html="orderDetails.lineItems.Items[0].ShippingAddress | address:'full'"></div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6" ng-if="orderDetails.order.BillingAddressID">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Billing Address</h3>
                    </div>
                    <div class="panel-body">
                        <div ng-bind-html="orderDetails.order.BillingAddress | address:'full'"></div>
                    </div>
                </div>
            </div>
        </div>

        <!--====== LINE ITEM LIST ======-->
        <div class="panel panel-default table-responsive">
            <table class="table table-striped table-bordered l-lineitem-table">
                <colgroup>
                    <col>
                    <col>
                    <col>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Product Name</th>
                        <th ng-if="!orderDetails.order.ShippingAddressID">Shipping Address</th>
                        <th>Quantity</th>
                        <th>Unit Price</th>
                        <th>Line Total</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="lineItem in orderDetails.lineItems.Items">
                        <td>{{lineItem.ProductID}}</td>
                        <td>
                            <a ui-sref="productDetail({productid: lineItem.ProductID})"> {{lineItem.Product.Name}}</a>
                            <ul ng-if="lineItem.Specs.length > 0">
                                <li ng-repeat="spec in lineItem.Specs">
                                    <small>{{spec.Name}}:</small>
                                    <small>{{spec.Value}}</small>
                                </li>
                            </ul>
                        </td>
                        <td ng-if="!orderDetails.order.ShippingAddressID">{{lineItem.ShippingAddress | address}}</td>
                        <td>{{lineItem.Quantity}}</td>
                        <td>{{lineItem.UnitPrice | currency}}</td>
                        <td>{{lineItem.LineTotal | currency}}</td>
                    </tr>
                </tbody>
            </table>
        </div>

        <!--====== LINE ITEM PAGINATION ======-->
        <ul uib-pagination
            class="pagination-sm pull-right hidden-xs"
            ng-if="orderDetails.lineItems.Meta.TotalPages > 1"
            total-items="orderDetails.lineItems.Meta.TotalCount"
            items-per-page="orderDetails.lineItems.Meta.PageSize"
            max-size="5"
            boundary-links="orderDetails.lineItems.Meta.TotalPages > 5"
            ng-model="orderDetails.lineItems.Meta.Page"
            ng-change="orderDetails.pageChanged()">
        </ul>
        <button type="button"
                class="btn btn-default btn-block btn-lg visible-xs"
                ng-show="orderDetails.lineItems.Meta.Page < orderDetails.lineItems.Meta.TotalPages"
                ng-click="orderDetails.loadMore()">Load More</button>
    </div>
</article>
{'fraction_non_alphanumeric': 0.15919447302660591, 'fraction_numerical': 0.002719388505071292, 'mean_word_length': 1.496697247706422, 'pattern_counts': {'":': 0, '<': 366, '<?xml version=': 0, '>': 370, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7317278', 'n_tokens_mistral': 3881, 'n_tokens_neox': 3618, 'n_words': 577}