Qual: Simplification. Plus d'affichage du bouton générer doc en double.
Fix: Ordre de tri des paiments incorrect
This commit is contained in:
parent
6d57849be2
commit
409cd5dbfe
@ -113,7 +113,9 @@ if ($resql)
|
|||||||
print "<td>$obj->df</td>\n";
|
print "<td>$obj->df</td>\n";
|
||||||
print '<td align="center">'.$obj->cc.'</td>';
|
print '<td align="center">'.$obj->cc.'</td>';
|
||||||
|
|
||||||
print '<td><a href="index.php?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_file_new().'</a></td>';
|
print '<td>';
|
||||||
|
print '<a href="index.php?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_file_new().'</a>';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
$name = "actions-".$obj->month."-".$obj->year.".pdf";
|
$name = "actions-".$obj->month."-".$obj->year.".pdf";
|
||||||
$relativepath= $name;
|
$relativepath= $name;
|
||||||
|
|||||||
@ -1589,19 +1589,6 @@ if ($_GET['propalid'] > 0)
|
|||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=modif">'.$langs->trans('Edit').'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&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.'&action=builddoc">'.$langs->trans("BuildPDF").'</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=builddoc">'.$langs->trans("RebuildPDF").'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
if ($propal->statut == 1 && $user->rights->propale->envoyer)
|
if ($propal->statut == 1 && $user->rights->propale->envoyer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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.'&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.'&action=builddoc">'.$langs->trans("RebuildPDF").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
if ($commande->statut > 0)
|
if ($commande->statut > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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>";
|
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.'&action=builddoc">'.$langs->trans('BuildDonationReceipt').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($don->statut == 0)
|
if ($don->statut == 0)
|
||||||
{
|
{
|
||||||
print "<a class=\"butActionDelete\" href=\"fiche.php?rowid=$don->id&action=delete\">".$langs->trans("Delete")."</a>";
|
print "<a class=\"butActionDelete\" href=\"fiche.php?rowid=$don->id&action=delete\">".$langs->trans("Delete")."</a>";
|
||||||
|
|||||||
@ -2002,7 +2002,7 @@ else
|
|||||||
$sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
|
$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.= ' 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.= ' 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);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -2648,21 +2648,6 @@ else
|
|||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=valid">'.$langs->trans('Validate').'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&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.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=builddoc">'.$langs->trans('RebuildPDF').'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Envoyer
|
// Envoyer
|
||||||
if (($fac->statut == 1 || $fac->statut == 2) && $user->rights->facture->envoyer)
|
if (($fac->statut == 1 || $fac->statut == 2) && $user->rights->facture->envoyer)
|
||||||
|
|||||||
@ -636,11 +636,6 @@ else
|
|||||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&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.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($expedition->brouillon && $user->rights->expedition->supprimer)
|
if ($expedition->brouillon && $user->rights->expedition->supprimer)
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="fiche.php?id='.$expedition->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
print '<a class="butActionDelete" href="fiche.php?id='.$expedition->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
|
|||||||
@ -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.'&action=builddoc">'.$langs->trans("BuildPDF").'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -536,8 +536,6 @@ else
|
|||||||
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=valid">'.$langs->trans("Validate").'</a>';
|
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=valid">'.$langs->trans("Validate").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
|
||||||
|
|
||||||
if ($livraison->brouillon && $user->rights->expedition->livraison->supprimer)
|
if ($livraison->brouillon && $user->rights->expedition->livraison->supprimer)
|
||||||
{
|
{
|
||||||
if ($conf->expedition_bon->enabled)
|
if ($conf->expedition_bon->enabled)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user