Skip to content

Commit

Permalink
New: Creation of contacts from third party page go back to third party.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 13, 2011
1 parent cc3da5d commit a6b82d8
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 32 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Expand Up @@ -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.
Expand Down
28 changes: 20 additions & 8 deletions htdocs/comm/fiche.php
Expand Up @@ -481,9 +481,14 @@
$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)
Expand Down Expand Up @@ -533,9 +538,14 @@
$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)
Expand Down Expand Up @@ -698,7 +708,9 @@
{
$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>';
}

Expand Down Expand Up @@ -860,7 +872,7 @@
{
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))
Expand Down
23 changes: 13 additions & 10 deletions htdocs/comm/prospect/fiche.php
Expand Up @@ -74,6 +74,8 @@

llxHeader();

$now = dol_now();

$form=new Form($db);
$formcompany=new FormCompany($db);

Expand Down Expand Up @@ -202,7 +204,7 @@


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;
Expand All @@ -221,7 +223,7 @@
/*
* Last proposals
*/
if ($conf->propal->enabled)
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$propal_static=new Propal($db);

Expand All @@ -244,16 +246,16 @@
$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);
Expand Down Expand Up @@ -282,8 +284,9 @@
}

print "</td></tr>";
print "</table>\n</div>\n";
print "</table>\n";

dol_fiche_end();

/*
* Barre d'action
Expand Down Expand Up @@ -320,7 +323,7 @@
{
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))
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture/class/facture.class.php
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions htdocs/compta/facture/stats/index.php
Expand Up @@ -51,6 +51,8 @@
* View
*/

$langs->load("bills");

$form=new Form($db);

llxHeader();
Expand Down
2 changes: 2 additions & 0 deletions htdocs/compta/facture/stats/month.php
Expand Up @@ -49,6 +49,8 @@
* View
*/

$langs->load("bills");

llxHeader();

if ($mode == 'customer')
Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/facture/fiche.php
Expand Up @@ -947,7 +947,7 @@
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)
Expand Down
32 changes: 22 additions & 10 deletions htdocs/fourn/fiche.php
Expand Up @@ -256,11 +256,18 @@
$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);
Expand Down Expand Up @@ -314,10 +321,15 @@
$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);
Expand Down Expand Up @@ -391,7 +403,7 @@
{
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))
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/fr_FR/other.lang
Expand Up @@ -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
Expand Down

0 comments on commit a6b82d8

Please sign in to comment.