Qual: Simplification. Plus d'affichage du bouton gnrer doc en double.

Fix: Ordre de tri des paiments incorrect
This commit is contained in:
Laurent Destailleur 2007-12-02 16:15:53 +00:00
parent 6d57849be2
commit 409cd5dbfe
8 changed files with 4 additions and 63 deletions

View File

@ -113,7 +113,9 @@ if ($resql)
print "<td>$obj->df</td>\n";
print '<td align="center">'.$obj->cc.'</td>';
print '<td><a href="index.php?action=builddoc&amp;page='.$page.'&amp;month='.$obj->month.'&amp;year='.$obj->year.'">'.img_file_new().'</a></td>';
print '<td>';
print '<a href="index.php?action=builddoc&amp;page='.$page.'&amp;month='.$obj->month.'&amp;year='.$obj->year.'">'.img_file_new().'</a>';
print '</td>';
$name = "actions-".$obj->month."-".$obj->year.".pdf";
$relativepath= $name;

View File

@ -1589,19 +1589,6 @@ if ($_GET['propalid'] > 0)
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&amp;action=modif">'.$langs->trans('Edit').'</a>';
}
// Build PDF
if ($user->rights->propale->creer)
{
if ($propal->statut < 2)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&amp;action=builddoc">'.$langs->trans("BuildPDF").'</a>';
}
else
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&amp;action=builddoc">'.$langs->trans("RebuildPDF").'</a>';
}
}
// Send
if ($propal->statut == 1 && $user->rights->propale->envoyer)
{

View File

@ -1691,18 +1691,6 @@ else
}
}
// Build PDF
if ($user->rights->commande->creer && $commande->statut < 3)
{
print '<a class="butAction" href="fiche.php?id='.$commande->id.'&amp;action=builddoc">'.$langs->trans("BuildPDF").'</a>';
}
// ReBuild PDF
if ($user->rights->commande->creer && $commande->statut >= 3)
{
print '<a class="butAction" href="fiche.php?id='.$commande->id.'&amp;action=builddoc">'.$langs->trans("RebuildPDF").'</a>';
}
// Send
if ($commande->statut > 0)
{

View File

@ -410,11 +410,6 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
print "<a class=\"butAction\" href=\"fiche.php?rowid=$don->id&action=set_payed\">".$langs->trans("ClassifyPayed")."</a>";
}
if ($don->statut == 2 || $don->statut == 3)
{
print ' <a class="butAction" href="fiche.php?rowid='.$don->id.'&amp;action=builddoc">'.$langs->trans('BuildDonationReceipt').'</a>';
}
if ($don->statut == 0)
{
print "<a class=\"butActionDelete\" href=\"fiche.php?rowid=$don->id&action=delete\">".$langs->trans("Delete")."</a>";

View File

@ -2002,7 +2002,7 @@ else
$sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p, '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf';
$sql.= ' WHERE pf.fk_facture = '.$fac->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid';
$sql.= ' ORDER BY dp DESC';
$sql.= ' ORDER BY dp, tms';
$result = $db->query($sql);
if ($result)
@ -2648,21 +2648,6 @@ else
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=valid">'.$langs->trans('Validate').'</a>';
}
}
else
{
// Générer
if ($fac->statut >= 1 && $user->rights->facture->creer)
{
if ($fac->paye == 0)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=builddoc">'.$langs->trans('BuildPDF').'</a>';
}
else
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=builddoc">'.$langs->trans('RebuildPDF').'</a>';
}
}
}
// Envoyer
if (($fac->statut == 1 || $fac->statut == 2) && $user->rights->facture->envoyer)

View File

@ -636,11 +636,6 @@ else
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&amp;action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
}
if ($user->rights->expedition->lire && ($expedition->statut > 0))
{
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&amp;action=builddoc">'.$langs->trans('BuildPDF').'</a>';
}
if ($expedition->brouillon && $user->rights->expedition->supprimer)
{
print '<a class="butActionDelete" href="fiche.php?id='.$expedition->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';

View File

@ -796,15 +796,6 @@ else
}
}
// Build PDF
if ($commande->statut > 0)
{
if ($user->rights->fournisseur->commande->creer)
{
print '<a class="butAction" href="fiche.php?id='.$commande->id.'&amp;action=builddoc">'.$langs->trans("BuildPDF").'</a>';
}
}
print "</div>";
}

View File

@ -536,8 +536,6 @@ else
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&amp;action=valid">'.$langs->trans("Validate").'</a>';
}
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&amp;action=builddoc">'.$langs->trans('BuildPDF').'</a>';
if ($livraison->brouillon && $user->rights->expedition->livraison->supprimer)
{
if ($conf->expedition_bon->enabled)