diff --git a/ChangeLog b/ChangeLog index 2ee416c0910642cbe7950a16aef8357ad6452b00..f4cbc34da215c7dd677c77b98142d3fbea5ce954 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 26c74ae950381f7c732f12d90a085d42f4236fd9..78a8a37ed231a909f0cd1f9daa4ef203b6ea5294 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -481,9 +481,14 @@ if ($socid > 0) $var=true; $num = $db->num_rows($resql); - print '<tr class="liste_titre">'; - print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$objsoc->id.'">'.$langs->trans("AllPropals").' ('.$num.')</a></td></tr></table></td>'; - print '</tr>'; + if ($num > 0) + { + print '<tr class="liste_titre">'; + print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$objsoc->id.'">'.$langs->trans("AllPropals").' ('.$num.')</a></td>'; + print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$objsoc->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; + print '</tr></table></td>'; + print '</tr>'; + } $i = 0; while ($i < $num && $i < $MAXLIST) @@ -533,9 +538,14 @@ if ($socid > 0) $var=true; $num = $db->num_rows($resql); - print '<tr class="liste_titre">'; - print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllOrders").' ('.$num.')</a></td></tr></table></td>'; - print '</tr>'; + if ($num > 0) + { + print '<tr class="liste_titre">'; + print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllOrders").' ('.$num.')</a></td>'; + print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$objsoc->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; + print '</tr></table></td>'; + print '</tr>'; + } $i = 0; while ($i < $num && $i < $MAXLIST) @@ -698,7 +708,9 @@ if ($socid > 0) { $tableaushown=1; print '<tr class="liste_titre">'; - print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture.php?socid='.$objsoc->id.'">'.$langs->trans("AllBills").' ('.$num.')</a></td></tr></table></td>'; + print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture.php?socid='.$objsoc->id.'">'.$langs->trans("AllBills").' ('.$num.')</a></td>'; + print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$objsoc->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; + print '</tr></table></td>'; print '</tr>'; } @@ -860,7 +872,7 @@ if ($socid > 0) { print '<br>'; // 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 ce1c8f9366f18c124ddf9cab6a00c56b951f4353..6f2820db4cccc8fa2f076465d666833629cd7387 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -74,6 +74,8 @@ if ($_POST["action"] == 'setprospectlevel' && $user->rights->societe->creer) llxHeader(); +$now = dol_now(); + $form=new Form($db); $formcompany=new FormCompany($db); @@ -202,7 +204,7 @@ if ($socid > 0) print "</td>\n"; - print '<td valign="top" width="50%" class="notopnoleft">'; + print '<td valign="top" width="50%" class="notopnoleftnoright">'; // Nbre max d'elements des petites listes $MAXLIST=5; @@ -221,7 +223,7 @@ if ($socid > 0) /* * Last proposals */ - if ($conf->propal->enabled) + if ($conf->propal->enabled && $user->rights->propale->lire) { $propal_static=new Propal($db); @@ -244,16 +246,16 @@ if ($socid > 0) $var=true; $i = 0; $num = $db->num_rows($resql); + if ($num > 0) { - $tableaushown=1; - print '<tr class="liste_titre">'; - print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$societe->id.'">'.$langs->trans("AllPropals").' ('.$num.')</a></td></tr></table></td>'; - print '</tr>'; + print '<tr class="liste_titre">'; + print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$societe->id.'">'.$langs->trans("AllPropals").' ('.$num.')</a></td>'; + print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$societe->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; + print '</tr></table></td>'; + print '</tr>'; } - $now = dol_now(); - while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); @@ -282,8 +284,9 @@ if ($socid > 0) } print "</td></tr>"; - print "</table>\n</div>\n"; + print "</table>\n"; + dol_fiche_end(); /* * Barre d'action @@ -320,7 +323,7 @@ if ($socid > 0) { print '<br>'; // 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 83c1207ca6c3725bc437af1c6b2fd9326d70d808..68ad9970d64255e80e507fb61b1a1e07f48da763 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -160,7 +160,7 @@ class Facture extends CommonObject 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 4b38bac4a47bdbca59b7c55cb1c829b474a96e52..78c3e2b9dd51cb00919ddd4ce7c53bf4f705feb5 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -51,6 +51,8 @@ $mode=GETPOST("mode")?GETPOST("mode"):'customer'; * 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 3fcdfdd3cf89050435cea81210d937eed7369a12..b6eb0f32635c934152fd3f074e4d499e1afca3e2 100644 --- a/htdocs/compta/facture/stats/month.php +++ b/htdocs/compta/facture/stats/month.php @@ -49,6 +49,8 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"]; * View */ +$langs->load("bills"); + llxHeader(); if ($mode == 'customer') diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 43470eda132f9ae88509ef6db2faec282799066d..62fafb2893f9c1d9d346dd3883af0e30590ccf78 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -947,7 +947,7 @@ if ($_GET['action'] == 'create') print '<tr><td>'.$langs->trans('Ref').'</td><td>'.$langs->trans('Draft').'</td></tr>'; // Third party - print '<tr><td class="fieldrequired">'.$langs->trans('Company').'</td>'; + print '<tr><td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>'; print '<td>'; if ($_REQUEST['socid'] > 0) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 2ae68ac69cf94077afd7882f3b709dd0cbf76114..a8aa38a722ef48a6e0894996f76859dca4d83875 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -256,11 +256,18 @@ if ( $societe->fetch($socid) ) $i = 0 ; $num = $db->num_rows($resql); print '<table class="noborder" width="100%">'; - print '<tr class="liste_titre">'; - print '<td colspan="3">'; - print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).'</td>'; - print '<td align="right"><a href="commande/liste.php?socid='.$societe->id.'">'.$langs->trans("AllOrders").' ('.$num.')</td></tr></table>'; - print '</td></tr>'; + + if ($num > 0) + { + print '<tr class="liste_titre">'; + print '<td colspan="3">'; + print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).'</td>'; + print '<td align="right"><a href="commande/liste.php?socid='.$societe->id.'">'.$langs->trans("AllOrders").' ('.$num.')</td>'; + print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?mode=supplier&socid='.$societe->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; + print '</tr></table>'; + print '</td></tr>'; + } + while ($i < $num && $i <= $MAXLIST) { $obj = $db->fetch_object($resql); @@ -314,10 +321,15 @@ if ( $societe->fetch($socid) ) $i = 0 ; $num = $db->num_rows($resql); print '<table class="noborder" width="100%">'; - print '<tr class="liste_titre">'; - print '<td colspan="4">'; - print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills',($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="facture/index.php?socid='.$societe->id.'">'.$langs->trans('AllBills').' ('.$num.')</td></tr></table>'; - print '</td></tr>'; + if ($num > 0) + { + print '<tr class="liste_titre">'; + print '<td colspan="4">'; + print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills',($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="facture/index.php?socid='.$societe->id.'">'.$langs->trans('AllBills').' ('.$num.')</td>'; + print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?mode=supplier&socid='.$societe->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; + print '</tr></table>'; + print '</td></tr>'; + } while ($i < min($num,$MAXLIST)) { $obj = $db->fetch_object($resql); @@ -391,7 +403,7 @@ if ( $societe->fetch($socid) ) { print '<br>'; // 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 f56b8ea5df4d7d40b45fdc7a28e43d6ef38528cb..4c39cfda75ed7ce6c5b661fbfe1516b11a865a34 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.<br><br>La liste de ces outils est accessible par le menu sur le côté. Birthday=Anniversaire