<commit_before>{{#em-form model=this submit_button=false }}
    {{partial 'inventory-basic'}}
    {{#if isNew}}
        <h3>Purchase information</h3>
        {{partial 'inv-purchase'}}
    {{else}}
            {{#if quantityDiscrepency}}
                <div class="alert alert-danger alert-dismissible" role="alert">
                    <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <p>
                        <span class="glyphicon glyphicon-warning-sign"></span>
                        The total quantity <strong>({{quantity}})</strong>, does not match the total quantity in the locations <strong>({{locationQuantityTotal}})</strong>.
                    </p>
                    <p>Please adjust the quantities on the appropriate location(s) to account for the difference of {{quantityDifferential}}.</p>
                </div>
            {{/if}}
            <h3>
                Purchases 
                {{#if canAddPurchase}}
                    <button class="btn btn-primary align-right" {{action "showAddPurchase" this}}><span class="octicon octicon-plus"></span> Add Purchase</button>
                {{/if}}
            </h3>
            <table class="table">
                <tr class="table-header">
                    <th>Date Received</th>
                    <th>Purchase Cost</th>
                    <th>Cost Per Unit</th>
                    <th>Original Quantity</th>
                    <th>Current Quantity</th>
                    <th>Gift In Kind</th>
                    <th>Serial/Lot Number</th>
                    <th>Expiration Date</th>
                    <th>Vendor</th>
                    <th>Invoice Number</th>
                </tr>
                {{#each purchases as |purchase|}}
                    <tr class={{if purchase.expired "warning"}}>
                        <td>{{date-format purchase.dateReceived}}</td>
                        <td>{{purchase.purchaseCost}}</td>
                        <td>{{purchase.costPerUnit}}</td>
                        <td>{{purchase.originalQuantity}}</td>
                        <td>{{purchase.currentQuantity}}</td>
                        <td>
                            {{#if purchase.giftInKind}}Y{{else}}N{{/if}}
                        </td>
                        <td>{{purchase.lotNumber}}</td>                
                        <td>{{date-format purchase.expirationDate}}</td>
                        <td>{{purchase.vendor}}</td>
                        <td>{{purchase.invoiceNo}}</td>
                    </tr>
                {{/each}}
            </table>
    {{/if}}
    {{#unless isNew}}
        <h3>Locations</h3>    
        <table class="table">
            <tr class="table-header">
                <th>Location</th>
                <th>Aisle Location</th>
                <th>Quantity</th>
                {{#if canAdjustLocation}}
                    <th>Action</th>
                {{/if}}
            </tr>
            {{#each locations as |location|}}
                {{#if quantity}}
                    <tr>
                        <td>{{location.location}}</td>
                        <td>{{location.aisleLocation}}</td>
                        <td>{{location.quantity}}</td>
                        {{#if canAdjustLocation}}
                            <td>
                                <button class="btn btn-primary neutral" {{action "showAdjustment" location}}>Adjust</button>
                                <button class="btn btn-primary neutral" {{action "showTransfer" location}}>Transfer</button>
                            </td>
                        {{/if}}
                    </tr>
                {{/if}}
            {{/each}}
        </table>
        {{#if showTransactions}}
            <h3>Transactions</h3>
            <table class="table">
                <tr class="table-header">
                    <th>Date Completed</th>
                    <th>Quantity</th><commit_msg>Fixed to not display empty locations<commit_after>{{#em-form model=this submit_button=false }}
    {{partial 'inventory-basic'}}
    {{#if isNew}}
        <h3>Purchase information</h3>
        {{partial 'inv-purchase'}}
    {{else}}
            {{#if quantityDiscrepency}}
                <div class="alert alert-danger alert-dismissible" role="alert">
                    <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <p>
                        <span class="glyphicon glyphicon-warning-sign"></span>
                        The total quantity <strong>({{quantity}})</strong>, does not match the total quantity in the locations <strong>({{locationQuantityTotal}})</strong>.
                    </p>
                    <p>Please adjust the quantities on the appropriate location(s) to account for the difference of {{quantityDifferential}}.</p>
                </div>
            {{/if}}
            <h3>
                Purchases 
                {{#if canAddPurchase}}
                    <button class="btn btn-primary align-right" {{action "showAddPurchase" this}}><span class="octicon octicon-plus"></span> Add Purchase</button>
                {{/if}}
            </h3>
            <table class="table">
                <tr class="table-header">
                    <th>Date Received</th>
                    <th>Purchase Cost</th>
                    <th>Cost Per Unit</th>
                    <th>Original Quantity</th>
                    <th>Current Quantity</th>
                    <th>Gift In Kind</th>
                    <th>Serial/Lot Number</th>
                    <th>Expiration Date</th>
                    <th>Vendor</th>
                    <th>Invoice Number</th>
                </tr>
                {{#each purchases as |purchase|}}
                    <tr class={{if purchase.expired "warning"}}>
                        <td>{{date-format purchase.dateReceived}}</td>
                        <td>{{purchase.purchaseCost}}</td>
                        <td>{{purchase.costPerUnit}}</td>
                        <td>{{purchase.originalQuantity}}</td>
                        <td>{{purchase.currentQuantity}}</td>
                        <td>
                            {{#if purchase.giftInKind}}Y{{else}}N{{/if}}
                        </td>
                        <td>{{purchase.lotNumber}}</td>                
                        <td>{{date-format purchase.expirationDate}}</td>
                        <td>{{purchase.vendor}}</td>
                        <td>{{purchase.invoiceNo}}</td>
                    </tr>
                {{/each}}
            </table>
    {{/if}}
    {{#unless isNew}}
        <h3>Locations</h3>    
        <table class="table">
            <tr class="table-header">
                <th>Location</th>
                <th>Aisle Location</th>
                <th>Quantity</th>
                {{#if canAdjustLocation}}
                    <th>Action</th>
                {{/if}}
            </tr>
            {{#each locations as |location|}}
                {{#if location.quantity}}
                    <tr>
                        <td>{{location.location}}</td>
                        <td>{{location.aisleLocation}}</td>
                        <td>{{location.quantity}}</td>
                        {{#if canAdjustLocation}}
                            <td>
                                <button class="btn btn-primary neutral" {{action "showAdjustment" location}}>Adjust</button>
                                <button class="btn btn-primary neutral" {{action "showTransfer" location}}>Transfer</button>
                            </td>
                        {{/if}}
                    </tr>
                {{/if}}
            {{/each}}
        </table>
        {{#if showTransactions}}
            <h3>Transactions</h3>
            <table class="table">
                <tr class="table-header">
                    <th>Date Completed</th>
                    <th>Quantity</th>
{'fraction_non_alphanumeric': 0.14523692003948668, 'fraction_numerical': 0.0019743336623889436, 'mean_word_length': 1.2297111416781292, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 219, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5605516', 'n_tokens_mistral': 2166, 'n_tokens_neox': 1960, 'n_words': 384}