mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Miglioramento import FE
This commit is contained in:
parent
92640a4f96
commit
bcf29081fe
@ -145,7 +145,7 @@ if (!empty($righe)) {
|
|||||||
echo '
|
echo '
|
||||||
<h4>
|
<h4>
|
||||||
'.tr('Righe').'
|
'.tr('Righe').'
|
||||||
<button type="button" class="btn btn-info btn-sm pull-right" onclick="copy()"><i class="fa fa-copy"></i> '.tr('Copia dati contabili dalla prima riga').'</button>
|
<button type="button" class="btn btn-info btn-sm pull-right" onclick="copy()"><i class="fa fa-copy"></i> '.tr('Copia dati contabili dalla prima riga valorizzata').'</button>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
@ -199,16 +199,33 @@ if (!empty($righe)) {
|
|||||||
echo '
|
echo '
|
||||||
<script>
|
<script>
|
||||||
function copy(){
|
function copy(){
|
||||||
$iva = $("select[name^=iva").first().selectData();
|
var first_iva = null;
|
||||||
$conto = $("select[name^=conto").first().selectData();
|
var first_conto = null;
|
||||||
|
|
||||||
|
$("select[name^=iva").each( function(){
|
||||||
|
if( $(this).val() != "" && first_iva == null ){
|
||||||
|
first_iva = $(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("select[name^=conto").each( function(){
|
||||||
|
if( $(this).val() != "" && first_conto == null ){
|
||||||
|
first_conto = $(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if(first_iva) {
|
||||||
|
$iva = first_iva.selectData();
|
||||||
|
|
||||||
if($iva) {
|
|
||||||
$("select[name^=iva").each(function(){
|
$("select[name^=iva").each(function(){
|
||||||
$(this).selectSet($iva.id);
|
$(this).selectSet($iva.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conto) {
|
if(first_conto) {
|
||||||
|
$conto = first_conto.selectData();
|
||||||
|
|
||||||
$("select[name^=conto").each(function(){
|
$("select[name^=conto").each(function(){
|
||||||
$(this).selectSetNew($conto.id, $conto.text);
|
$(this).selectSetNew($conto.id, $conto.text);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user