From a6b82d843b85bbbce715dfba79e42bb02b3c3bb3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Jun 2011 15:14:11 +0000 Subject: [PATCH] New: Creation of contacts from third party page go back to third party. --- ChangeLog | 3 +- htdocs/comm/fiche.php | 28 +++++++++++----- htdocs/comm/prospect/fiche.php | 23 +++++++------ htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/compta/facture/stats/index.php | 2 ++ htdocs/compta/facture/stats/month.php | 2 ++ htdocs/fourn/facture/fiche.php | 2 +- htdocs/fourn/fiche.php | 32 +++++++++++++------ htdocs/langs/fr_FR/other.lang | 2 +- 9 files changed, 64 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ee416c091064..f4cbc34da215c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,7 +19,8 @@ For users: saved clicks again). - When creating a contract, sales representative are preset to user. This save 4 clicks. - - Can edit several fields in bank transaction line page into one update. + - Can edit several fields in bank transaction line page into one update. + - Creation of contacts from third party page go back to third party. - New: Enhance donation module. Add a status "canceled". - New: Add filters on statistics page reports. - New: Usage of Jquery Notify to show result or error messages on action. diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 26c74ae950381..78a8a37ed231a 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -481,9 +481,14 @@ $var=true; $num = $db->num_rows($resql); - print ''; - print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')
'; - print ''; + if ($num > 0) + { + print ''; + print ''; + print ''; + print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; + print ''; + } $i = 0; while ($i < $num && $i < $MAXLIST) @@ -533,9 +538,14 @@ $var=true; $num = $db->num_rows($resql); - print ''; - print '
'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')
'; - print ''; + if ($num > 0) + { + print ''; + print ''; + print ''; + print '
'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; + print ''; + } $i = 0; while ($i < $num && $i < $MAXLIST) @@ -698,7 +708,9 @@ { $tableaushown=1; print ''; - print '
'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' ('.$num.')
'; + print ''; + print ''; + print '
'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; print ''; } @@ -860,7 +872,7 @@ { print '
'; // List of contacts - show_contacts($conf,$langs,$db,$objsoc); + show_contacts($conf,$langs,$db,$objsoc,$_SERVER["PHP_SELF"].'?socid='.$objsoc->id); } if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB)) diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index ce1c8f9366f18..6f2820db4cccc 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -74,6 +74,8 @@ llxHeader(); +$now = dol_now(); + $form=new Form($db); $formcompany=new FormCompany($db); @@ -202,7 +204,7 @@ print "\n"; - print ''; + print ''; // Nbre max d'elements des petites listes $MAXLIST=5; @@ -221,7 +223,7 @@ /* * Last proposals */ - if ($conf->propal->enabled) + if ($conf->propal->enabled && $user->rights->propale->lire) { $propal_static=new Propal($db); @@ -244,16 +246,16 @@ $var=true; $i = 0; $num = $db->num_rows($resql); + if ($num > 0) { - $tableaushown=1; - print ''; - print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')
'; - print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; + print ''; } - $now = dol_now(); - while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); @@ -282,8 +284,9 @@ } print ""; - print "\n\n"; + print "\n"; + dol_fiche_end(); /* * Barre d'action @@ -320,7 +323,7 @@ { print '
'; // List of contacts - show_contacts($conf,$langs,$db,$societe); + show_contacts($conf,$langs,$db,$societe,$_SERVER["PHP_SELF"].'?socid='.$societe->id); } if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB)) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 83c1207ca6c37..68ad9970d6425 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -160,7 +160,7 @@ function create($user,$notrigger=0,$forceduedate=0) dol_syslog("Facture::Create user=".$user->id); // Check parameters - if (empty($date) || empty($user->id)) + if (empty($this->date) || empty($user->id)) { $this->error="ErrorBadParameter"; dol_syslog("Facture::create Try to create an invoice with an empty parameter (user, date, ...)", LOG_ERR); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 4b38bac4a47bd..78c3e2b9dd51c 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -51,6 +51,8 @@ * View */ +$langs->load("bills"); + $form=new Form($db); llxHeader(); diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php index 3fcdfdd3cf890..b6eb0f32635c9 100644 --- a/htdocs/compta/facture/stats/month.php +++ b/htdocs/compta/facture/stats/month.php @@ -49,6 +49,8 @@ * View */ +$langs->load("bills"); + llxHeader(); if ($mode == 'customer') diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 43470eda132f9..62fafb2893f9c 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -947,7 +947,7 @@ print ''.$langs->trans('Ref').''.$langs->trans('Draft').''; // Third party - print ''.$langs->trans('Company').''; + print ''.$langs->trans('ThirdParty').''; print ''; if ($_REQUEST['socid'] > 0) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 2ae68ac69cf94..a8aa38a722ef4 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -256,11 +256,18 @@ $i = 0 ; $num = $db->num_rows($resql); print ''; - print ''; - print ''; + + if ($num > 0) + { + print ''; + print ''; + } + while ($i < $num && $i <= $MAXLIST) { $obj = $db->fetch_object($resql); @@ -314,10 +321,15 @@ $i = 0 ; $num = $db->num_rows($resql); print '
'; - print ''; - print '
'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')
'; - print '
'; + print ''; + print ''; + print ''; + print '
'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; + print '
'; - print ''; - print ''; + if ($num > 0) + { + print ''; + print ''; + } while ($i < min($num,$MAXLIST)) { $obj = $db->fetch_object($resql); @@ -391,7 +403,7 @@ { print '
'; // List of contacts - show_contacts($conf,$langs,$db,$societe); + show_contacts($conf,$langs,$db,$societe,$_SERVER["PHP_SELF"].'?socid='.$societe->id); } if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB)) diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index f56b8ea5df4d7..4c39cfda75ed7 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -18,7 +18,7 @@ ErrorLoginHasNoEmail=Cet utilisateur n'a pas d'email. Impossible de continuer. ErrorBadValueForCode=Mauvaise valeur saisie pour le code. Réessayez avec une nouvelle valeur... SecurityCode=Code sécurité Calendar=Calendrier -AddTrip=Créer déplacement +AddTrip=Créer note de frais Tools=Outils ToolsDesc=Cet espace est dédié au regroupement d'outils divers non disponibles dans les autres entrées du menu.

La liste de ces outils est accessible par le menu sur le côté. Birthday=Anniversaire
'; - print '
'.$langs->trans('LastSuppliersBills',($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans('AllBills').' ('.$num.')
'; - print '
'; + print ''; + print ''; + print '
'.$langs->trans('LastSuppliersBills',($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans('AllBills').' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; + print '