New: Creation of contacts from third party page go back to third party.

This commit is contained in:
Laurent Destailleur 2011-06-13 15:14:11 +00:00
parent cc3da5d0a3
commit a6b82d843b
9 changed files with 64 additions and 32 deletions

View File

@ -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.

View File

@ -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))

View File

@ -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))

View File

@ -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);

View File

@ -51,6 +51,8 @@ $mode=GETPOST("mode")?GETPOST("mode"):'customer';
* View
*/
$langs->load("bills");
$form=new Form($db);
llxHeader();

View File

@ -49,6 +49,8 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"];
* View
*/
$langs->load("bills");
llxHeader();
if ($mode == 'customer')

View File

@ -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)

View File

@ -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))

View File

@ -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