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,9 +1291,10 @@ if ($action == 'create')
print '<td colspan="2">'; print '<td colspan="2">';
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1); 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 // reload page to retrieve customer informations
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript"> print '<script type="text/javascript">
$(document).ready(function() {'; $(document).ready(function() {
print '
$("#socid").change(function() { $("#socid").change(function() {
var socid = $(this).val(); var socid = $(this).val();
// reload page // reload page
@ -1301,6 +1302,7 @@ if ($action == 'create')
}); });
}); });
</script>'; </script>';
}
print '</td>'; print '</td>';
} }
print '</tr>' . "\n"; print '</tr>' . "\n";

View File

@ -1356,9 +1356,10 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<td colspan="2">'; print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1); print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
// reload page to retrieve customer informations // reload page to retrieve customer informations
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript"> print '<script type="text/javascript">
$(document).ready(function() {'; $(document).ready(function() {
print '
$("#socid").change(function() { $("#socid").change(function() {
var socid = $(this).val(); var socid = $(this).val();
// reload page // reload page
@ -1366,6 +1367,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}); });
}); });
</script>'; </script>';
}
print '</td>'; print '</td>';
} }
print '</tr>' . "\n"; print '</tr>' . "\n";

View File

@ -1960,9 +1960,10 @@ if ($action == 'create')
print '<td colspan="2">'; print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1); print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
// reload page to retrieve customer informations // reload page to retrieve customer informations
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript"> print '<script type="text/javascript">
$(document).ready(function() {'; $(document).ready(function() {
print '
$("#socid").change(function() { $("#socid").change(function() {
var socid = $(this).val(); var socid = $(this).val();
// reload page // reload page
@ -1970,6 +1971,7 @@ if ($action == 'create')
}); });
}); });
</script>'; </script>';
}
print '</td>'; print '</td>';
} }
print '</tr>' . "\n"; print '</tr>' . "\n";