NEW:add hidden option to auto load input line extrafield into new lines

This commit is contained in:
Florian HENRY 2021-02-08 19:56:34 +01:00
parent d41edfc812
commit b6b736c402
2 changed files with 9 additions and 1 deletions

View File

@ -705,6 +705,14 @@ if (!empty($usemargins) && $user->rights->margins->creer)
} ?>
<?php
} ?>
<?php
if (!empty($conf->global->PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES)) { ?>
jQuery.each(data.array_options, function( key, value ) {
console.log('div[class$="det'+key.replace('options_','_extras_')+'"] > #'+key);
jQuery('div[class$="det'+key.replace('options_','_extras_')+'"] > #'+key).val(value);
});
<?php
}?>
},
'json'
);

View File

@ -192,7 +192,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
'tva_tx' => $outtva_tx,
'qty' => $outqty,
'discount' => $outdiscount,
'array_option'=>$object->array_options);
'array_options'=>$object->array_options);
}
echo json_encode($outjson);