New : Option to reload supplier order and invoice to retrieve payment terms & type
Add RELOAD_PAGE_ON_SUPPLIER_CHANGE
This commit is contained in:
parent
10bacda820
commit
399aea179f
@ -1445,6 +1445,19 @@ if ($action=='create')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $form->select_company((empty($socid)?'':$socid), 'socid', 's.fournisseur = 1', 'SelectThirdParty');
|
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>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -1446,6 +1446,19 @@ if ($action == 'create')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $form->select_company($societe->id, 'socid', 's.fournisseur = 1', 'SelectThirdParty');
|
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>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user