Fix reload of page
This commit is contained in:
parent
267ef1986d
commit
76e0d1d4e6
@ -2247,10 +2247,9 @@ if ($action == 'create') {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#fac_rec").change(function() {
|
$("#fac_rec").change(function() {
|
||||||
console.log("We have changed the template invoice - Reload page");
|
console.log("We have changed the template invoice - Reload page");
|
||||||
var fac_rec = $(this).val();
|
// reload page
|
||||||
var socid = $(\'#socid\').val();
|
$("input[name=action]").val("create");
|
||||||
// For template invoice change, we must reuse data of template, not input already done, so we call a GET with action=create, not a POST submit.
|
$("form[name=add]").submit();
|
||||||
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&fac_rec="+fac_rec;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user