add hidden constant

This commit is contained in:
Christophe Battarel 2015-11-11 15:32:42 +01:00
parent f52ae35dc6
commit 0c40a6dda5
3 changed files with 33 additions and 27 deletions

View File

@ -1291,16 +1291,18 @@ if ($action == 'create')
print '<td colspan="2">';
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1);
// reload page to retrieve customer informations
print '<script type="text/javascript">
$(document).ready(function() {';
print '
$("#socid").change(function() {
var socid = $(this).val();
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&ref_client="+$("input[name=ref_client]").val();
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript">
$(document).ready(function() {
$("#socid").change(function() {
var socid = $(this).val();
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&ref_client="+$("input[name=ref_client]").val();
});
});
});
</script>';
</script>';
}
print '</td>';
}
print '</tr>' . "\n";

View File

@ -1356,16 +1356,18 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
// reload page to retrieve customer informations
print '<script type="text/javascript">
$(document).ready(function() {';
print '
$("#socid").change(function() {
var socid = $(this).val();
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&ref_client="+$("input[name=ref_client]").val();
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript">
$(document).ready(function() {
$("#socid").change(function() {
var socid = $(this).val();
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&ref_client="+$("input[name=ref_client]").val();
});
});
});
</script>';
</script>';
}
print '</td>';
}
print '</tr>' . "\n";

View File

@ -1960,16 +1960,18 @@ if ($action == 'create')
print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
// reload page to retrieve customer informations
print '<script type="text/javascript">
$(document).ready(function() {';
print '
$("#socid").change(function() {
var socid = $(this).val();
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid;
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript">
$(document).ready(function() {
$("#socid").change(function() {
var socid = $(this).val();
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid;
});
});
});
</script>';
</script>';
}
print '</td>';
}
print '</tr>' . "\n";