<commit_before><!--
~ This program was produced for the U.S. Agency for International Development. It was prepared by the USAID | DELIVER PROJECT, Task Order 4. It is part of a project which utilizes code originally licensed under the terms of the Mozilla Public License (MPL) v2 and therefore is licensed under MPL v2 or later.
~
~ This program is free software: you can redistribute it and/or modify it under the terms of the Mozilla Public License as published by the Mozilla Foundation, either version 2 of the License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public License for more details.
~
~ You should have received a copy of the Mozilla Public License along with this program. If not, see http://www.mozilla.org/MPL/
-->
<!DOCTYPE html>
<style>
    table td.disabled, .rnr-table .table-bordered td.disabled {
    background-color: #F0F0F0;

    }
    .rnr-table .table-bordered td.col-lot, .rnr-table .table-bordered td.col-available{
    padding-left:10px !important;
    padding-right:10px !important;

    }

    .rnr-table .table-bordered td.last-row {
    border-bottom: 1px solid #ccc !important;
    padding-bottom:4px !important;
    }
</style>
<div>
    <h2><span openlmis-message="label.vaccine.stock.adjustment"></span></h2>
    <!--{{programProduct}}-->
    <div class="info-box padding2px">
        <div class="requisition-head-block">
            <div class="row-fluid">
                <div class="span8" style="padding: 10px;">
                    <div class="row-fluid">
                        <div class="span4">
                            <strong id='facilityLabel' openlmis-message="label.facility"> </strong>:&nbsp;<span
                                id='facility' ng-bind="homeFacility.name"></span>
                        </div>
                        <div class="span4">
                            <strong id="orderDateTimeLabel"
                                    openlmis-message="label.stock.adjustment.date.reported"> </strong>:&nbsp;
                            <span id="orderCreatedDate" ng-bind="date | date:'dd-MM-yyyy'"></span>
                        </div>
                    </div>
                    <!--<div class="row-fluid">-->
                    <!--<div class="span4">-->

                    <!--</div>-->
                    <!--<div class="span4">-->
                    <!--<strong id="lastAdjustmentDateTimeLabel" openlmis-message="label.stock.adjustment.date.lastrepoted"> </strong>:&nbsp;-->
                    <!--<span id="lastAdjustmentDate" ng-bind="date | date:'dd-MM-yyyy'"></span>-->
                    <!--</div>-->
                    <!--</div>-->

                </div>
                <div class="span4">

                </div>
            </div>
        </div>
    </div>
    <hr/>
    <div class="rnr-table" ng-form="adjustmentForm">

        <table id="podTable" class="table table-bordered" fixed-table-header>
            <thead>
            <tr>
                <th class="col-product "><span openlmis-message="label.products"></span></th>
                <th class="col-lot"><span openlmis-message="label.stock.batch"></span></th>
                <th class="col-available"><span openlmis-message="label.stock.onhand"></span></th>
                <th class="col-count"><span openlmis-message="label.stock.physical.count"></span></th>
                <th class="col-count"><span openlmis-message="label.stock.vvm"></span></th>
                <th style="min-width:5px !important" class="col-skip"><span openlmis-message="label.skip"></span></th>
                <th class="col-reason"><span openlmis-message="label.stock.adjustment.reasons"></span></th>
                <th class="col-affected"><span openlmis-message="label.stock.amount.affected"></span></th>
                <th class="col-validation"><span openlmis-message="label.stock.validation"></span></th>
            </tr>
            </thead>
            <tbody ng-repeat="stock in stockCardsToDisplay">
            <tr>
                <td class="productCategory" id="vaccine" colspan="9">
                    {{stock.productCategory}}
                </td>
            </tr>
            <tr ng-repeat-start="c in stock.stockCards" style="border-bottom:2px solid #333">
                <td rowspan="{{c.lotsOnHand.length}}" class="col-product cell-input last-row disabled">
                    <span class="cell-text" ng-bind="c.product.primaryName"></span>
                </td>
                <td class="col-lot cell-input  disabled" ng-class="{'last-row':c.lotsOnHand.length===1}">
                    <span ng-bind="c.lotsOnHand[0].lot.lotCode"></span>
                </td>
                <td class="col-available cell-input number disabled" ng-class="{'last-row':c.lotsOnHand.length===1}">
                    {{c.lotsOnHand[0].quantityOnHand | number}}
                </td>
                <td class="col-count cell-input col-general"
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped,'last-row':c.lotsOnHand.length===1}">
                    <input name="physical-count_0" ng-required="!c.lotsOnHand[0].isSkipped"
                           ng-disabled="c.lotsOnHand[0].isSkipped" ng-model="c.lotsOnHand[0].quantity" maxlength="8"
                           type="text"/>
                </td>
                <td class="col-count cell-input col-general"
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped, 'last-row':c.lotsOnHand.length===1}">
                    <select style="max-width:130px !important;min-width:130px !important" ui-select2
                            ng-options="i.value as i.name for i in vvmStatuses" name="vvm_0"
                            ng-disabled="c.lotsOnHand[0].isSkipped" ng-model="c.lotsOnHand[0].vvmStatus" maxlength="8"
                            type="text">
                        <option value="">--VVM Status--</option>
                    </select>
                </td>
                <td class="col-skip cell-input "
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped, 'last-row':c.lotsOnHand.length===1}">
                    <input
                        style="margin-left:10px" type="checkbox" ng-model="c.lotsOnHand[0].isSkipped"/></td>
                <td class="col-reason cell-input "
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped, 'last-row':c.lotsOnHand.length===1}">
                    <a ng-hide="c.lotsOnHand[0].isSkipped" href id="lossesAndAdjustmentLink_0"
                       ng-click="showAdjustmentReason(c.lotsOnHand[0])" class="rnr-adjustment">
                        <span class="adjustment-value" ng-bind="c.lotsOnHand[0].totalAdjustments"></span>
                    </a>
                </td>
                <td class="col-affected cell-input col-general number cell-text disabled"
                    ng-class="{'last-row':c.lotsOnHand.length===1}"><span
                        ng-show="(c.lotsOnHand[0].quantity !==undefined && c.lotsOnHand[0].quantity !=='') && !c.lotsOnHand[0].isSkipped ">{{c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand | number}}</span>
                </td>
                <td class="col-validation cell-input disabled" ng-class="{'last-row':c.lotsOnHand.length===1}">
                    <div ng-show="!c.lotsOnHand[0].isSkipped && (c.lotsOnHand[0].quantity !==undefined && c.lotsOnHand[0].quantity !=='')">
                        <span ng-show="c.lotsOnHand[0].quantity != undefined && (c.lotsOnHand[0].totalAdjustments === (c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand))"
                              class="icon-ok-sign green" style="margin-left:20px"></span>
                        <span ng-show='((c.lotsOnHand[0].quantity !=="" || c.lotsOnHand[0].quantity != undefined)  && (c.lotsOnHand[0].totalAdjustments != (c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand)))'
                              class="icon-remove red" style="margin-left:20px"></span>
                        <input ng-model="c.lotsOnHand[0].valid" name="validator_{{c.$index}}_0" type="hidden"
                               ng-required="!c.lotsOnHand[0].isSkipped && ((c.lotsOnHand[0].quantity !=='' || c.lotsOnHand[0].quantity !== undefined)  && (c.lotsOnHand[0].totalAdjustments !== (c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand)))"/>
                    </div>

                </td>
            </tr>
            <tr ng-repeat-end ng-repeat="lot in c.lotsOnHand" ng-show="!$first">
                <td class="col-lot  cell-input disabled" ng-class="{'last-row':$last}">
                    <span ng-bind="lot.lot.lotCode"></span></td>
                <td class="col-available cell-input col-general number disabled" ng-class="{'last-row':$last}">
                    {{lot.quantityOnHand | number}}
                </td>
                <td ng-class="{'last-row':$last,'disabled':lot.isSkipped}" class="col-count cell-input col-general ">
                    <input name="physical-count_{{lot.$index}}" ng-required="!lot.isSkipped" ng-disabled="lot.isSkipped"
                           ng-model="lot.quantity" maxlength="5" type="text"/>
                </td>
                <td ng-class="{'last-row':$last,'disabled':lot.isSkipped}" class="col-count cell-input col-general ">
                    <select style="max-width:130px !important;min-width:130px !important" ui-select2
                            ng-options="i.value as i.name for i in vvmStatuses" name="vvm_{{lot.$index}}"
                            ng-disabled="lot.isSkipped"
                            ng-model="lot.vvmStatus" maxlength="5" type="text">
                        <option value="">--VVM Status--</option>
                    </select>
                </td>
                <td ng-class="{'last-row':$last, 'disabled':lot.isSkipped}" class="col-skip cell-input ">
                    <input style="margin-left:10px" type="checkbox" ng-model="lot.isSkipped"/></td>
                <td ng-class="{'last-row':$last, 'disabled':lot.isSkipped}" class="col-reason cell-input ">
                    <a ng-hide="lot.isSkipped" href id="lossesAndAdjustmentLink_{{$index}}"
                       ng-click="showAdjustmentReason(lot)" class="rnr-adjustment">
                        <span ng-init="lot.totalAdjustments=0" class="adjustment-value"
                              ng-bind="lot.totalAdjustments"></span>
                    </a>
                </td>
                <td class="col-affected cell-input number cell-text disabled" ng-class="{'last-row':$last}"><span
                        ng-show="(lot.quantity !==undefined && lot.quantity !=='') && !lot.isSkipped ">{{lot.quantity - lot.quantityOnHand | number}}</span>
                </td>
                <td class="col-validation cell-input cell-text disabled" ng-class="{'last-row':$last}">
                    <div ng-show="!lot.isSkipped && (lot.quantity !==undefined && lot.quantity !=='')">
                        <span ng-show="lot.totalAdjustments === (lot.quantity - lot.quantityOnHand)"
                              class="icon-ok-sign green" style="margin-left:20px"></span>
                        <span ng-show="!(lot.totalAdjustments === (lot.quantity - lot.quantityOnHand))"
                              class="icon-remove red" style="margin-left:20px"></span>
                        <input ng-model="lot.valid" name="validator_{{$index}}_0" type="hidden"
                               ng-required="!lot.isSkipped && ((lot.quantity !=='' || lot.quantity !== undefined)  && (lot.totalAdjustments !== (lot.quantity - lot.quantityOnHand)))"/>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

</div>
<div id="popupModel" modal="adjustmentReasonsDialogModal">
    <div class="modal-header">
        <h3 openlmis-message="label.stock.add.adjustment.reasons"></h3>
    </div>
<commit_msg>Add minor change to adjustment Ui<commit_after><!--
~ This program was produced for the U.S. Agency for International Development. It was prepared by the USAID | DELIVER PROJECT, Task Order 4. It is part of a project which utilizes code originally licensed under the terms of the Mozilla Public License (MPL) v2 and therefore is licensed under MPL v2 or later.
~
~ This program is free software: you can redistribute it and/or modify it under the terms of the Mozilla Public License as published by the Mozilla Foundation, either version 2 of the License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public License for more details.
~
~ You should have received a copy of the Mozilla Public License along with this program. If not, see http://www.mozilla.org/MPL/
-->
<!DOCTYPE html>
<style>
    table td.disabled, .rnr-table .table-bordered td.disabled {
    background-color: #F0F0F0;

    }
    .rnr-table .table-bordered td.col-lot, .rnr-table .table-bordered td.col-available{
    padding-left:10px !important;
    padding-right:10px !important;

    }

    .rnr-table .table-bordered td.last-row {
    border-bottom: 1px solid #ccc !important;
    padding-bottom:4px !important;
    }
</style>
<div>
    <h2><span openlmis-message="label.vaccine.stock.adjustment"></span></h2>
    <!--{{programProduct}}-->
    <div class="info-box padding2px">
        <div class="requisition-head-block">
            <div class="row-fluid">
                <div class="span8" style="padding: 10px;">
                    <div class="row-fluid">
                        <div class="span4">
                            <strong id='facilityLabel' openlmis-message="label.facility"> </strong>:&nbsp;<span
                                id='facility' ng-bind="homeFacility.name"></span>
                        </div>
                        <div class="span4">
                            <strong id="orderDateTimeLabel"
                                    openlmis-message="label.stock.adjustment.date.reported"> </strong>:&nbsp;
                            <span id="orderCreatedDate" ng-bind="date | date:'dd-MM-yyyy'"></span>
                        </div>
                    </div>
                    <!--<div class="row-fluid">-->
                    <!--<div class="span4">-->

                    <!--</div>-->
                    <!--<div class="span4">-->
                    <!--<strong id="lastAdjustmentDateTimeLabel" openlmis-message="label.stock.adjustment.date.lastrepoted"> </strong>:&nbsp;-->
                    <!--<span id="lastAdjustmentDate" ng-bind="date | date:'dd-MM-yyyy'"></span>-->
                    <!--</div>-->
                    <!--</div>-->

                </div>
                <div class="span4">

                </div>
            </div>
        </div>
    </div>
    <hr/>
    <div class="rnr-table" ng-form="adjustmentForm">

        <table id="podTable" class="table table-bordered" fixed-table-header>
            <thead>
            <tr>
                <th class="col-product "><span openlmis-message="label.products"></span></th>
                <th class="col-lot"><span openlmis-message="label.stock.batch"></span></th>
                <th class="col-available"><span openlmis-message="label.stock.onhand"></span></th>
                <th class="col-count"><span openlmis-message="label.stock.physical.count"></span></th>
                <th class="col-count"><span openlmis-message="label.stock.vvm"></span></th>
                <th style="min-width:5px !important" class="col-skip"><span openlmis-message="label.skip"></span></th>
                <th class="col-reason"><span openlmis-message="label.stock.adjustment.reasons"></span></th>
                <th class="col-affected"><span openlmis-message="label.stock.amount.affected"></span></th>
                <th class="col-validation"><span openlmis-message="label.stock.validation"></span></th>
            </tr>
            </thead>
            <tbody ng-repeat="stock in stockCardsToDisplay">
            <tr>
                <td class="productCategory" id="vaccine" colspan="9">
                    {{stock.productCategory}}
                </td>
            </tr>
            <tr ng-repeat-start="c in stock.stockCards" style="border-bottom:2px solid #333">
                <td rowspan="{{c.lotsOnHand.length}}" class="col-product cell-input last-row disabled">
                    <span class="cell-text" ng-bind="c.product.primaryName"></span>
                </td>
                <td class="col-lot cell-input  disabled" ng-class="{'last-row':c.lotsOnHand.length===1}">
                    <span ng-bind="c.lotsOnHand[0].lot.lotCode"></span>
                </td>
                <td class="col-available cell-input number disabled" ng-class="{'last-row':c.lotsOnHand.length===1}">
                    {{c.lotsOnHand[0].quantityOnHand | number}}
                </td>
                <td class="col-count cell-input col-general"
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped,'last-row':c.lotsOnHand.length===1}">
                    <input name="physical-count_0" ng-required="!c.lotsOnHand[0].isSkipped"
                           ng-disabled="c.lotsOnHand[0].isSkipped" ng-model="c.lotsOnHand[0].quantity" maxlength="8"
                           type="text"/>
                </td>
                <td class="col-count cell-input col-general"
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped, 'last-row':c.lotsOnHand.length===1}">
                    <select style="max-width:130px !important;min-width:130px !important" ui-select2
                            ng-options="i.value as i.name for i in vvmStatuses" name="vvm_0"
                            ng-disabled="c.lotsOnHand[0].isSkipped" ng-model="c.lotsOnHand[0].vvmStatus" maxlength="8"
                            type="text">
                        <option value="">--VVM Status--</option>
                    </select>
                </td>
                <td class="col-skip cell-input "
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped, 'last-row':c.lotsOnHand.length===1}">
                    <input ng-disabled="c.lotsOnHand[0].quantity !==undefined && c.lotsOnHand[0].quantity !==''"
                           style="margin-left:10px" type="checkbox" ng-model="c.lotsOnHand[0].isSkipped"/></td>
                <td class="col-reason cell-input "
                    ng-class="{'disabled':c.lotsOnHand[0].isSkipped,'':!c.lotsOnHand[0].isSkipped, 'last-row':c.lotsOnHand.length===1}">
                    <a ng-hide="c.lotsOnHand[0].isSkipped" href id="lossesAndAdjustmentLink_0"
                       ng-click="showAdjustmentReason(c.lotsOnHand[0])" class="rnr-adjustment">
                        <span class="adjustment-value" ng-bind="c.lotsOnHand[0].totalAdjustments"></span>
                    </a>
                </td>
                <td class="col-affected cell-input col-general number cell-text disabled"
                    ng-class="{'last-row':c.lotsOnHand.length===1}"><span
                        ng-show="(c.lotsOnHand[0].quantity !==undefined && c.lotsOnHand[0].quantity !=='') && !c.lotsOnHand[0].isSkipped ">{{c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand | number}}</span>
                </td>
                <td class="col-validation cell-input disabled" ng-class="{'last-row':c.lotsOnHand.length===1}">
                    <div ng-show="!c.lotsOnHand[0].isSkipped && (c.lotsOnHand[0].quantity !==undefined && c.lotsOnHand[0].quantity !=='')">
                        <span ng-show="c.lotsOnHand[0].quantity != undefined && (c.lotsOnHand[0].totalAdjustments === (c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand))"
                              class="icon-ok-sign green" style="margin-left:20px"></span>
                        <span ng-show='((c.lotsOnHand[0].quantity !=="" || c.lotsOnHand[0].quantity != undefined)  && (c.lotsOnHand[0].totalAdjustments != (c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand)))'
                              class="icon-remove red" style="margin-left:20px"></span>
                        <input ng-model="c.lotsOnHand[0].valid" name="validator_{{c.$index}}_0" type="hidden"
                               ng-required="!c.lotsOnHand[0].isSkipped && ((c.lotsOnHand[0].quantity !=='' || c.lotsOnHand[0].quantity !== undefined)  && (c.lotsOnHand[0].totalAdjustments !== (c.lotsOnHand[0].quantity - c.lotsOnHand[0].quantityOnHand)))"/>
                    </div>

                </td>
            </tr>
            <tr ng-repeat-end ng-repeat="lot in c.lotsOnHand" ng-show="!$first">
                <td class="col-lot  cell-input disabled" ng-class="{'last-row':$last}">
                    <span ng-bind="lot.lot.lotCode"></span></td>
                <td class="col-available cell-input col-general number disabled" ng-class="{'last-row':$last}">
                    {{lot.quantityOnHand | number}}
                </td>
                <td ng-class="{'last-row':$last,'disabled':lot.isSkipped}" class="col-count cell-input col-general ">
                    <input name="physical-count_{{lot.$index}}" ng-required="!lot.isSkipped" ng-disabled="lot.isSkipped"
                           ng-model="lot.quantity" maxlength="5" type="text"/>
                </td>
                <td ng-class="{'last-row':$last,'disabled':lot.isSkipped}" class="col-count cell-input col-general ">
                    <select style="max-width:130px !important;min-width:130px !important" ui-select2
                            ng-options="i.value as i.name for i in vvmStatuses" name="vvm_{{lot.$index}}"
                            ng-disabled="lot.isSkipped"
                            ng-model="lot.vvmStatus" maxlength="5" type="text">
                        <option value="">--VVM Status--</option>
                    </select>
                </td>
                <td ng-class="{'last-row':$last, 'disabled':lot.isSkipped}" class="col-skip cell-input ">
                    <input ng-disabled="lot.quantity !==undefined && lot.quantity !==''" style="margin-left:10px"
                           type="checkbox" ng-model="lot.isSkipped"/></td>
                <td ng-class="{'last-row':$last, 'disabled':lot.isSkipped}" class="col-reason cell-input ">
                    <a ng-hide="lot.isSkipped" href id="lossesAndAdjustmentLink_{{$index}}"
                       ng-click="showAdjustmentReason(lot)" class="rnr-adjustment">
                        <span ng-init="lot.totalAdjustments=0" class="adjustment-value"
                              ng-bind="lot.totalAdjustments"></span>
                    </a>
                </td>
                <td class="col-affected cell-input number cell-text disabled" ng-class="{'last-row':$last}"><span
                        ng-show="(lot.quantity !==undefined && lot.quantity !=='') && !lot.isSkipped ">{{lot.quantity - lot.quantityOnHand | number}}</span>
                </td>
                <td class="col-validation cell-input cell-text disabled" ng-class="{'last-row':$last}">
                    <div ng-show="!lot.isSkipped && (lot.quantity !==undefined && lot.quantity !=='')">
                        <span ng-show="lot.totalAdjustments === (lot.quantity - lot.quantityOnHand)"
                              class="icon-ok-sign green" style="margin-left:20px"></span>
                        <span ng-show="!(lot.totalAdjustments === (lot.quantity - lot.quantityOnHand))"
                              class="icon-remove red" style="margin-left:20px"></span>
                        <input ng-model="lot.valid" name="validator_{{$index}}_0" type="hidden"
                               ng-required="!lot.isSkipped && ((lot.quantity !=='' || lot.quantity !== undefined)  && (lot.totalAdjustments !== (lot.quantity - lot.quantityOnHand)))"/>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

</div>
<div id="popupModel" modal="adjustmentReasonsDialogModal">
    <div class="modal-header">
        <h3 openlmis-message="label.stock.add.adjustment.reasons"></h3>
    </div>

{'fraction_non_alphanumeric': 0.16659891048052689, 'fraction_numerical': 0.009756890804130417, 'mean_word_length': 1.9845911186605192, 'pattern_counts': {'":': 0, '<': 385, '<?xml version=': 0, '>': 385, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2021249', 'n_tokens_mistral': 7507, 'n_tokens_neox': 7118, 'n_words': 1231}