<commit_before>﻿@model ReviewOrderViewModel

<section id="line-items" class="ui-corner-all display-form">

    <header class="ui-corner-top ui-widget-header">Line Items</header>

    <div class="section-contents">
    <table>
        <thead>
            <tr>
                <th>Qty.</th>
                <th>Unit</th>
                <th>Catalog #</th>
                <th>Description</th>
                <th>Commodity</th>
                <th>Unit $</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var line in Model.Order.LineItems)
            {
                <tr class="row-item">
                    <td>@line.Quantity</td>
                    <td>@line.Unit</td>
                    <td>@(string.IsNullOrWhiteSpace(line.CatalogNumber) ? "n/a" : line.CatalogNumber)</td>
                    <td>@line.Description</td>
                    <td>@(line.Commodity != null ? line.Commodity.Name : "n/a")</td>
                    <td>@line.UnitPrice</td>
                </tr>
                              
                if (Model.Order.HasLineSplits)
                {
                    <tr>
                        <td colspan="6">
                            <div class="row-split ui-corner-all @(line.UnitPrice * line.Quantity != line.Splits.Sum(a => a.Amount) ? "row-split-prob" : string.Empty)">
                                <table>
                                    <thead>
                                        <tr><td colspan="4">Line Item Split</td></tr>
                                    </thead>
                                    <tbody>
                                        @foreach (var split in line.Splits)
                                        {  
                                            <tr>
                                                <td>@(string.IsNullOrWhiteSpace(split.Account) ? "n/a" : split.Account)</td>
                                                <td>@(string.IsNullOrWhiteSpace(split.SubAccount) ? "n/a" : split.SubAccount)</td>
                                                <td>@(string.IsNullOrWhiteSpace(split.Project) ? "n/a" : split.Project)</td>
                                                <td>@split.Amount</td>
                                            </tr>
                                        }
                                    </tbody>
                                </table>

                            </div>
                        </td>
                    </tr>                    
                }


                if (!string.IsNullOrWhiteSpace(line.Notes) || !string.IsNullOrWhiteSpace(line.Url))
                {
                    <tr>
                        <td colspan="5" class="extra-info">
                            @if (!string.IsNullOrWhiteSpace(line.Url))
                            {
                                <div class="line-url"><strong>Url:</strong> <a href="@line.Url">@line.Url</a></div>    
                            }
                            @if (!string.IsNullOrWhiteSpace(line.Notes))
                            {
                                <div class="line-notes"><strong>Notes:</strong> @line.Notes</div>    
                            }
                            
                        </td>
                    </tr>
                }
            }
        </tbody>
        <tfoot>
            <tr class="item-footer">
                <td colspan="4">&nbsp;</td>
                <td class="label">Subtotal:</td>
                <td>@string.Format("${0:f}", Model.Order.TotalFromDb)</td>
            </tr>
            <tr class="item-footer">
                <td colspan="4">&nbsp;</td>
                <td class="label">Estimated Shipping:</td>
                <td>@string.Format("${0:f}", Model.Order.ShippingAmount)</td>            
            </tr>
            <tr class="item-footer">
                <td colspan="4"></td>
                <td class="label">Estimated Tax:</td><commit_msg>Added commidity codes to the review page, shows [id] name<commit_after>﻿@model ReviewOrderViewModel

<section id="line-items" class="ui-corner-all display-form">

    <header class="ui-corner-top ui-widget-header">Line Items</header>

    <div class="section-contents">
    <table>
        <thead>
            <tr>
                <th>Qty.</th>
                <th>Unit</th>
                <th>Catalog #</th>
                <th>Description</th>
                <th>Commodity</th>
                <th>Unit $</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var line in Model.Order.LineItems)
            {
                <tr class="row-item">
                    <td>@line.Quantity</td>
                    <td>@line.Unit</td>
                    <td>@(string.IsNullOrWhiteSpace(line.CatalogNumber) ? "n/a" : line.CatalogNumber)</td>
                    <td>@line.Description</td>
                    <td>@(line.Commodity != null ? line.Commodity.Name : "n/a")</td>
                    <td>@line.UnitPrice</td>
                </tr>
                              
                if (Model.Order.HasLineSplits)
                {
                    <tr>
                        <td colspan="6">
                            <div class="row-split ui-corner-all @(line.UnitPrice * line.Quantity != line.Splits.Sum(a => a.Amount) ? "row-split-prob" : string.Empty)">
                                <table>
                                    <thead>
                                        <tr><td colspan="4">Line Item Split</td></tr>
                                    </thead>
                                    <tbody>
                                        @foreach (var split in line.Splits)
                                        {  
                                            <tr>
                                                <td>@(string.IsNullOrWhiteSpace(split.Account) ? "n/a" : split.Account)</td>
                                                <td>@(string.IsNullOrWhiteSpace(split.SubAccount) ? "n/a" : split.SubAccount)</td>
                                                <td>@(string.IsNullOrWhiteSpace(split.Project) ? "n/a" : split.Project)</td>
                                                <td>@split.Amount</td>
                                            </tr>
                                        }
                                    </tbody>
                                </table>

                            </div>
                        </td>
                    </tr>                    
                }


                if (line.Commodity != null || !string.IsNullOrWhiteSpace(line.Notes) || !string.IsNullOrWhiteSpace(line.Url))
                {
                    <tr>
                        <td colspan="5" class="extra-info">
                            @if (line.Commodity != null)
                            {
                                <div class="line-commodity"><strong>Commodity:</strong> @string.Format("[{0}] {1}", line.Commodity.Id, line.Commodity.Name)</div>
                            }
                            @if (!string.IsNullOrWhiteSpace(line.Url))
                            {
                                <div class="line-url"><strong>Url:</strong> <a href="@line.Url">@line.Url</a></div>    
                            }
                            @if (!string.IsNullOrWhiteSpace(line.Notes))
                            {
                                <div class="line-notes"><strong>Notes:</strong> @line.Notes</div>    
                            }
                        </td>
                    </tr>
                }
            }
        </tbody>
        <tfoot>
            <tr class="item-footer">
                <td colspan="4">&nbsp;</td>
                <td class="label">Subtotal:</td>
                <td>@string.Format("${0:f}", Model.Order.TotalFromDb)</td>
            </tr>
            <tr class="item-footer">
                <td colspan="4">&nbsp;</td>
                <td class="label">Estimated Shipping:</td>
                <td>@string.Format("${0:f}", Model.Order.ShippingAmount)</td>            
            </tr>
            <tr class="item-footer">
                <td colspan="4"></td>
                <td class="label">Estimated Tax:</td>
{'fraction_non_alphanumeric': 0.13424359594006766, 'fraction_numerical': 0.0021749637506041568, 'mean_word_length': 0.8705084745762712, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 207, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 40, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1079708', 'n_tokens_mistral': 2110, 'n_tokens_neox': 1998, 'n_words': 293}