New: Support a backtopage parameter on contact creation page
This commit is contained in:
parent
7e70ea08a9
commit
469a163f3c
@ -35,6 +35,7 @@ For developers:
|
|||||||
- New: External modules can overwrite all default language files by
|
- New: External modules can overwrite all default language files by
|
||||||
forcing priority on langs directories on its own lang directory.
|
forcing priority on langs directories on its own lang directory.
|
||||||
- New: External modules can show export list with an "enabled" condition.
|
- New: External modules can show export list with an "enabled" condition.
|
||||||
|
- New: Support a backtopage parameter on contact creation page
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.0 compared to 2.9 *****
|
***** ChangeLog for 3.0 compared to 2.9 *****
|
||||||
|
|||||||
@ -290,7 +290,7 @@ if ($_GET['action'] == 'new')
|
|||||||
$sql.= " AND ba.entity = ".$conf->entity;
|
$sql.= " AND ba.entity = ".$conf->entity;
|
||||||
$sql.= " AND b.fk_bordereau = 0";
|
$sql.= " AND b.fk_bordereau = 0";
|
||||||
$sql.= " AND b.amount > 0";
|
$sql.= " AND b.amount > 0";
|
||||||
$sql.= " ORDER BY b.emetteur ASC, b.rowid ASC";
|
$sql.= $db->order("b.dateo,b.rowid","ASC");
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -319,11 +319,11 @@ if ($_GET['action'] == 'new')
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("DateChequeReceived")." </td>\n";
|
print '<td style="min-width: 120px">'.$langs->trans("DateChequeReceived")." </td>\n";
|
||||||
print '<td width="120">'.$langs->trans("ChequeNumber")."</td>\n";
|
print '<td style="min-width: 120px">'.$langs->trans("ChequeNumber")."</td>\n";
|
||||||
print '<td>'.$langs->trans("CheckTransmitter")."</td>\n";
|
print '<td style="min-width: 200px">'.$langs->trans("CheckTransmitter")."</td>\n";
|
||||||
print '<td>'.$langs->trans("Bank")."</td>\n";
|
print '<td style="min-width: 200px">'.$langs->trans("Bank")."</td>\n";
|
||||||
print '<td align="right">'.$langs->trans("Amount")."</td>\n";
|
print '<td align="right" width="100px">'.$langs->trans("Amount")."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -336,7 +336,7 @@ if ($_GET['action'] == 'new')
|
|||||||
$accounts[$objp->bid] += 1;
|
$accounts[$objp->bid] += 1;
|
||||||
|
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td width="120">'.dol_print_date($value["date"],'day').'</td>';
|
print '<td>'.dol_print_date($value["date"],'day').'</td>';
|
||||||
print '<td>'.$value["numero"]."</td>\n";
|
print '<td>'.$value["numero"]."</td>\n";
|
||||||
print '<td>'.$value["emetteur"]."</td>\n";
|
print '<td>'.$value["emetteur"]."</td>\n";
|
||||||
print '<td>'.$value["banque"]."</td>\n";
|
print '<td>'.$value["banque"]."</td>\n";
|
||||||
|
|||||||
@ -177,7 +177,9 @@ else
|
|||||||
if (! $error && $id > 0)
|
if (! $error && $id > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
Header("Location: fiche.php?id=".$id);
|
if (GETPOST('backtopage')) $url=GETPOST('backtopage');
|
||||||
|
else $url='fiche.php?id='.$id;
|
||||||
|
Header("Location: ".$url);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -385,9 +387,7 @@ else
|
|||||||
// When used in standard mode
|
// When used in standard mode
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
/*
|
// Confirm deleting contact
|
||||||
* Confirmation de la suppression du contact
|
|
||||||
*/
|
|
||||||
if ($user->rights->societe->contact->supprimer)
|
if ($user->rights->societe->contact->supprimer)
|
||||||
{
|
{
|
||||||
if ($_GET["action"] == 'delete')
|
if ($_GET["action"] == 'delete')
|
||||||
@ -411,9 +411,7 @@ else
|
|||||||
$_GET["id"]=0;
|
$_GET["id"]=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Show tabs
|
||||||
* Affichage onglets
|
|
||||||
*/
|
|
||||||
$head = contact_prepare_head($object);
|
$head = contact_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("ContactsAddresses"), 0, 'contact');
|
dol_fiche_head($head, 'card', $langs->trans("ContactsAddresses"), 0, 'contact');
|
||||||
@ -469,6 +467,8 @@ else
|
|||||||
print '<form method="post" name="formsoc" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" name="formsoc" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
print '<input type="hidden" name="backtopage" value="'.GETPOST("backtopage").'">';
|
||||||
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
|
|||||||
@ -106,6 +106,7 @@ Enabled=Enabled
|
|||||||
Disable=Disable
|
Disable=Disable
|
||||||
Disabled=Disabled
|
Disabled=Disabled
|
||||||
Add=Add
|
Add=Add
|
||||||
|
AddLink=Add link
|
||||||
Update=Update
|
Update=Update
|
||||||
AddActionToDo=Add action to do
|
AddActionToDo=Add action to do
|
||||||
AddActionDone=Add action done
|
AddActionDone=Add action done
|
||||||
|
|||||||
@ -105,6 +105,7 @@ Disable=Désactiver
|
|||||||
Disabled=Désactivé
|
Disabled=Désactivé
|
||||||
Create=Créer
|
Create=Créer
|
||||||
Add=Ajouter
|
Add=Ajouter
|
||||||
|
AddLink=Lier
|
||||||
Update=Modifier
|
Update=Modifier
|
||||||
AddActionToDo=Ajouter action à faire
|
AddActionToDo=Ajouter action à faire
|
||||||
AddActionDone=Ajouter action faite
|
AddActionDone=Ajouter action faite
|
||||||
|
|||||||
@ -242,24 +242,10 @@ else
|
|||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
if ( $soc->client == 1 )
|
$url=$_SERVER["PHP_SELF"]."?socid=".$soc->id;
|
||||||
{
|
if (($soc->client == 1 || $soc->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/fiche.php?socid=".$soc->id;
|
||||||
Header("Location: ".DOL_URL_ROOT."/comm/fiche.php?socid=".$soc->id);
|
else if ($soc->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/fiche.php?socid=".$soc->id;
|
||||||
return;
|
Header("Location: ".$url);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( $soc->fournisseur == 1 )
|
|
||||||
{
|
|
||||||
Header("Location: ".DOL_URL_ROOT."/fourn/fiche.php?socid=".$soc->id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$soc->id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user