
<form id="registrospagos" style="display: none;margin-top: 5px;margin-left:20px ;">

    
    <div class="col-12">
        <span id="txt_seleccionados"></span>
    </div>
    <table class="table table-responsive-sm align-items-center table-flush table-hover table_minimize">
        <thead class="thead-light">
            <tr style="font-size: 13px">
                <th class="tabla1" scope="col" style="width:15%">#OC</th>
                <th class="tabla1" scope="col" style="width:15%">Abono</th>
                <th class="tabla1" scope="col" style="width:15%">Saldo</th>
            </tr>
        </thead>
        <tbody id="table_pagos">
            <?php if($traepagtxml){ 
                 $a=0;
                 $totalmonto=0;
                 $recordCount = count($traepagtxml);
                 foreach ($traepagtxml as $pagos) { 
                  
                  $totalmonto +=$pagos->abono;    
                  
                ?>
                
                <tr style="font-size: 11.5px">
                    <td><?php echo $pagos->id_oc ?></td>
                    <td><?php echo $pagos->abono ?></td>
                    <td><?php echo $pagos->saldo ?></td>
                 </tr>
            <?php  $a++; ?>
                <input type="hidden" id="odc<?php echo $a?>" name="odc<?php echo $a?>" value="<?php echo $pagos->id_oc ?>">
                <input type="hidden" id="rfc<?php echo $a?>" name="rfc<?php echo $a?>" value="<?php echo $pagos->rfc ?>">
                <input type="hidden" id="fobra<?php echo $a?>" name="fobra<?php echo $a?>" value="<?php echo $pagos->fobra ?>">
                <input type="hidden" id="id<?php echo $a?>" name="id<?php echo $a?>" value="<?php echo $pagos->id ?>">
            <?php    } ?>
                <input type="hidden" id="idUsuario" name="idUsuario" value="<?php echo $idusuario ?>">
                <input type="hidden" id="userrol" name="userrol" value="<?php echo $userrol ?>">
                <input type="hidden" id="tipodoc" name="tipodoc" value="cp">
                <input type="hidden" id="tipocomprobante" name="tipocomprobante" value="P">
                <input type="hidden" id="nombrearchi" name="nombrearchi" value="Complemento_pago">
                <input type="hidden" id="montooc" name="montooc" value="<?php echo $totalmonto ?>">
                <input type="hidden" id="montoxml" name="montoxml" value="">
                <input type="hidden" id="registros" name="registros" value="<?php echo $recordCount ?>">
            <?php } ?>

            Total monto $<input type="text" id="montototal" name="montototal" disabled  value="<?php echo number_format($totalmonto,2, '.', ',') ?>" >
        </tbody>
    </table>
</form>


