Merge pull request #6352 from philippe-opendsi/develop

NEW Option to reload supplier order and invoice create  page
This commit is contained in:
Laurent Destailleur 2017-02-02 01:23:53 +01:00 committed by GitHub
commit 672e81d466
2 changed files with 26 additions and 0 deletions

View File

@ -1445,6 +1445,19 @@ if ($action=='create')
else
{
print $form->select_company((empty($socid)?'':$socid), 'socid', 's.fournisseur = 1', 'SelectThirdParty');
// reload page to retrieve customer informations
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_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>';
}
}
print '</td>';

View File

@ -1446,6 +1446,19 @@ if ($action == 'create')
else
{
print $form->select_company($societe->id, 'socid', 's.fournisseur = 1', 'SelectThirdParty');
// reload page to retrieve supplier informations
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_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>';
}
}
print '</td></tr>';