From f9f5bd3e71b6a9f4e3a34098bc2acae688aaaa63 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 12 Oct 2003 18:16:07 +0000 Subject: [PATCH] Suppression code inutile --- htdocs/compta/facture/fiche-rec.php | 173 ++-------------------------- 1 file changed, 12 insertions(+), 161 deletions(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index e011306322c..b2ebd8534d8 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -95,7 +95,7 @@ if ($action == 'create') print ''; print ''; - print ''; + print '
'; $facture->fetch_client(); @@ -141,7 +141,7 @@ if ($action == 'create') $num = $db->num_rows(); $i = 0; $total = 0; - echo '
'; + echo '
'; if ($num) { print ""; @@ -264,7 +264,7 @@ else /* * Facture */ - print "
"; + print '
'; print ""; print "'; @@ -339,69 +339,25 @@ else */ if ($user->societe_id == 0 && $fac->paye == 0) { - print "

Client"; print ''.$soc->nom.'
"; + print '

'; if ($fac->statut == 0 && $user->rights->facture->supprimer) { print ""; } - elseif ($fac->statut == 1 && abs($resteapayer) > 0 && $user->rights->facture->envoyer) - { - print ""; - } else { print ""; } - if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->paiement) - { - print ""; - } - else - { - print ""; - } + + print ""; + - if ($fac->statut == 1 && abs($resteapayer) == 0 && $fac->paye == 0) - { - if ($user->rights->facture->paiement) - { - print ""; - } - else - { - print ''; - } - } - elseif ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->envoyer) - { - print ""; - } - else - { - print ''; - } - - if ($fac->statut == 0 && $fac->total_ht > 0) - { - print ''; - } - elseif ($fac->statut == 1 && $fac->paye == 0) - { - if ($user->rights->facture->creer) - { - print ""; - } - else - { - print ''; - } - } - else - { - print ''; - } + + print ''; + print ''; + print "
[Supprimer][Envoyer]-[Emettre un paiement]--[Classer 'Payée']-[Envoyer une relance]--Générer la facture----
"; } print "

\n"; @@ -409,112 +365,7 @@ else /* * * - */ - if ($action == 'presend') - { - $replytoname = $user->fullname; - $from_name = $replytoname; - - $replytomail = $user->email; - $from_mail = $replytomail; - - print "

\n"; - print ''; - print ''; - - print "

Envoyer la facture par mail"; - print ""; - print '"; - print ""; - print ""; - print "
Destinataire'; - - $form = new Form($db); - $form->select_array("destinataire",$soc->contact_email_array()); - - print "email\">
Expéditeur$from_name$from_mail
Reply-to$replytoname$replytomail
"; - - print "

"; - } - - if ($action == 'prerelance') - { - $replytoname = $user->fullname; - $from_name = $replytoname; - - $replytomail = $user->email; - $from_mail = $replytomail; - - print "
\n"; - print ''; - print ''; - print ''; - - print_titre("Envoyer une relance"); - print ""; - print '"; - print ""; - print ""; - print "
Destinataire'; - - $form = new Form($db); - $form->select_array("destinataire",$soc->contact_email_array()); - - print "email\">
Expéditeur$from_name$from_mail
Reply-to$replytoname$replytomail
"; - - print "
"; - } - - /* - * Propales - */ - - $sql = "SELECT ".$db->pdate("p.datep")." as dp, p.price, p.ref, p.rowid as propalid"; - $sql .= " FROM llx_propal as p, llx_fa_pr as fp WHERE fp.fk_propal = p.rowid AND fp.fk_facture = $facid"; - - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows(); - if ($num) - { - $i = 0; $total = 0; - print "

"; - if ($num >1) - { - print_titre("Propositions commerciales associées"); - } - else - { - print_titre("Proposition commerciale associée"); - } - - print ''; - print ''; - print ""; - print ""; - print ''; - print "\n"; - - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - print "\n"; - print ''; - print ""; - $total = $total + $objp->price; - $i++; - } - print "\n"; - print "
NuméroDatePrix
propalid\">$objp->ref".strftime("%d %B %Y",$objp->dp)."'.price($objp->price).'
Total : ".price($total)." ".MAIN_MONNAIE." HT
"; - } - } else { - print $db->error(); - } + */ } else {