From 9bdbe27037ba9d76ce03a618667606f56f95df2d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 18 May 2003 15:20:55 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20mise=20=E0=20jour=20du=20compte=20banca?= =?UTF-8?q?ire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/paiement.php3 | 127 +++++++++++++++++------------------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/htdocs/compta/paiement.php3 b/htdocs/compta/paiement.php3 index cd12731ca47..67773137d29 100644 --- a/htdocs/compta/paiement.php3 +++ b/htdocs/compta/paiement.php3 @@ -21,7 +21,7 @@ */ require("./pre.inc.php3"); require("../paiement.class.php"); -llxHeader(); +require("./bank/account.class.php"); $db = new Db(); @@ -34,10 +34,14 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } - -if ($action == 'add') { - $datepaye = $db->idate(mktime(12, 0 , 0, $pmonth, $pday, $pyear)); - +/* + * Traitement des action + */ +/* +if ($action == 'add') +{ + $datepaye = $db->idate(mktime(12, 0 , 0, $remonth, $reday, $reyear)); + print $reday; $paiement = new Paiement($db); $paiement->facid = $facid; @@ -50,9 +54,23 @@ if ($action == 'add') { $paiement->create(); - $action = ''; + $label = "Réglement facture N°"; -} elseif ($action == 'create') { + $acc = new Account($db, $HTTP_POST_VARS["accountid"]); + $acc->addline($datepaye, $paiementid, $label, $amount, $num_paiement); + + $action = ''; +} +*/ +/* + * Affichage + */ + +llxHeader(); + + +if ($action == 'create') +{ $sql = "SELECT s.nom,s.idp, f.amount, f.total, f.facnumber"; $sql .= " FROM societe as s, llx_facture as f WHERE f.fk_soc = s.idp"; @@ -71,80 +89,34 @@ if ($action == 'add') { print ''; print ''; - print ""; + print "\n"; - print ""; - print ""; + print "\n"; + print "\n"; print ""; $sql = "SELECT sum(p.amount) FROM llx_paiement as p WHERE p.fk_facture = $facid;"; $result = $db->query($sql); - if ($result) { - $sumpayed = $db->result(0,0); - $db->free(); - } + if ($result) + { + $sumpayed = $db->result(0,0); + $db->free(); + } print ''; - + print ""; - print ""; print "facnumber\">"; print "idp\">"; print "nom\">"; - $strmonth[1] = "Janvier"; - $strmonth[2] = "Février"; - $strmonth[3] = "Mars"; - $strmonth[4] = "Avril"; - $strmonth[5] = "Mai"; - $strmonth[6] = "Juin"; - $strmonth[7] = "Juillet"; - $strmonth[8] = "Août"; - $strmonth[9] = "Septembre"; - $strmonth[10] = "Octobre"; - $strmonth[11] = "Novembre"; - $strmonth[12] = "Décembre"; - print ""; - - print "'; - - $author = $GLOBALS["REMOTE_USER"]; - print "\n"; + print_date_select(); + print ""; + print ""; print "\n"; + print "'; + + print "\n"; + + print "\n"; print "\n"; print "\n";
Facture
Facture
Numéro :$obj->facnumber
Société :$obj->nom
Numéro :$obj->facnumber
Société :$obj->nom
Montant :".price($obj->total)." euros TTC
Déjà payé'.price($sumpayed).' euros TTC
Paiement
Date :"; - $cday = date("d", time()); - print ""; - $cmonth = date("n", time()); - print ""; - - print "Commentaires :
"; - print '
Commentaires
Type :
"; + print ""; + print "
"; + print '
Compte à créditer :"; print "
Numéro :
Num du cheque ou virement
 Reste à payer : ".price($total - $sumpayed)." euros TTC
Montant :