Skip to content
Snippets Groups Projects
Commit b949468b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #4210 from IonAgorria/pricesel-fix

Price expression selector fix
parents 4d11c8b7 57102aef
Branches
Tags
No related merge requests found
......@@ -231,7 +231,7 @@ print '<script type="text/javascript">
window.location = "'.str_replace('dynamic_price/editor.php', $tab.'.php', $_SERVER["PHP_SELF"]).'?id='.$id.($tab == 'price' ? '&action=edit_price' : '').'";
}
function on_change() {
window.location = "'.$_SERVER["PHP_SELF"].'?id='.$id.'&tab='.$tab.'&eid=" + $("#expression_selection").attr("value");
window.location = "'.$_SERVER["PHP_SELF"].'?id='.$id.'&tab='.$tab.'&eid=" + $("#expression_selection").val();
}
</script>';
......
......@@ -467,7 +467,7 @@ if ($id > 0 || $ref)
window.location = "'.DOL_URL_ROOT.'/product/dynamic_price/editor.php?id='.$id.'&tab=fournisseurs&eid=" + $("#eid").attr("value");
}
function on_change() {
if ($("#eid").attr("value") == 0) {
if ($("#eid").val() == 0) {
jQuery("#price_numeric").show();
} else {
jQuery("#price_numeric").hide();
......
......@@ -841,13 +841,13 @@ if ($action == 'edit_price' && $object->getRights()->creer)
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#expression_editor").click(function() {
window.location = "<?php echo DOL_URL_ROOT ?>/product/dynamic_price/editor.php?id=<?php echo $id ?>&tab=price&eid=" + $("#eid").attr("value");
window.location = "<?php echo DOL_URL_ROOT ?>/product/dynamic_price/editor.php?id=<?php echo $id ?>&tab=price&eid=" + $("#eid").val();
});
jQuery("#eid").change(on_change);
on_change();
});
function on_change() {
if ($("#eid").attr("value") == 0) {
if ($("#eid").val() == 0) {
jQuery("#price_numeric").show();
} else {
jQuery("#price_numeric").hide();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment