Fix: Corrections plantage sur paiement charges sociales

This commit is contained in:
Laurent Destailleur 2004-06-13 20:56:04 +00:00
parent 836cfa8dee
commit eec68dcbb2
2 changed files with 14 additions and 6 deletions

View File

@ -100,8 +100,6 @@ else
$acct = new Account($db);
$acct->fetch($account);
print_titre('Rapprochement bancaire compte : <a href="account.php?account='.$account.'">'.$acct->label.'</a>');
print '<br>';
$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b WHERE rappro=0 AND fk_account=$account";
@ -115,9 +113,15 @@ if ($result)
$num = $db->num_rows();
if ($num == 0) {
print "<br>Pas de transactions saisies en attente de rapprochement, pour ce compte bancaire.<br>";
//print "<br>Pas ou plus de transactions saisies, en attente de rapprochement, pour ce compte bancaire.<br>";
header("Location: /compta/bank/account.php?account=".$account);
exit;
}
else {
print_titre('Rapprochement bancaire compte : <a href="account.php?account='.$account.'">'.$acct->label.'</a>');
print '<br>';
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="3">';
print "<tr class=\"liste_titre\">";
print "<td>Date</td><td>Description</TD>";
@ -207,6 +211,9 @@ if ($result)
if ($num != 0) {
print "</table>";
}
} else {
print "Erreur : ".$db->error()." : ".$sql."<br>\n";
}
print '<br>Dernier relevé : <a href="releve.php?account='.$account.'&amp;num='.$last_releve.'">'.$last_releve.'</a>';

View File

@ -148,12 +148,12 @@ if ($_GET["action"] == 'create')
print_titre("Emettre un paiement d'une charge");
print "<br>\n";
print "<form action=\"$PHP_SELF\" method=\"post\">\n";
print "<input type=\"hidden\" name=\"id\" value=\"$charge->id\">";
print '<input type="hidden" name="action" value="add_paiement">';
print '<table cellspacing="0" class="border" width="100%" cellpadding="2">';
print "<tr class=\"liste_titre\"><td colspan=\"3\">Charge</td>";
print '<tr><td>Numéro :</td><td colspan="2">';
@ -208,7 +208,7 @@ if ($_GET["action"] == 'create')
print "<tr><td>Compte à créditer :</td><td><select name=\"accountid\">\n";
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_account ORDER BY rowid";
$result = $db->query($sql);
if ($result)
{
@ -250,6 +250,7 @@ if ($_GET["action"] == 'create')
//
// if ($num > 0)
// {
$num = 1;
$i = 0;
print '<tr><td colspan="3">';
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';