From f52ae35dc6eeb9b5cd56271d4a3443ec6d10de8d Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Fri, 6 Nov 2015 16:14:00 +0100 Subject: [PATCH] NEW FEATURE PROPOSAL: on propale, order or invoice creation from scratch, reload page after customer selection so its informations can be loaded --- htdocs/comm/propal.php | 13 ++++++++++++- htdocs/commande/card.php | 15 +++++++++++++-- htdocs/compta/facture.php | 11 +++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 08d4e31ec6b..5b60e0ec273 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1276,7 +1276,7 @@ if ($action == 'create') // Ref customer print '' . $langs->trans('RefCustomer') . ''; - print ''; + print ''; print ''; // Third party @@ -1290,6 +1290,17 @@ if ($action == 'create') } else { print ''; 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 ''; print ''; } print '' . "\n"; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4d7456af1fd..bbc255e0227 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1338,10 +1338,10 @@ if ($action == 'create' && $user->rights->commande->creer) // Reference client print '' . $langs->trans('RefCustomer') . ''; - if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER)) + if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER) && ! empty($origin) && ! empty($originid)) print ''; else - print ''; + print ''; print ''; // Client @@ -1355,6 +1355,17 @@ if ($action == 'create' && $user->rights->commande->creer) } else { print ''; print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1); + // reload page to retrieve customer informations + print ''; print ''; } print '' . "\n"; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 983331bd412..fd9f730fe09 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1959,6 +1959,17 @@ if ($action == 'create') { print ''; print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1); + // reload page to retrieve customer informations + print ''; print ''; } print '' . "\n";