Fix: Add social contributions in budget

This commit is contained in:
Laurent Destailleur 2008-07-31 17:48:14 +00:00
parent a2a9490392
commit 90c45ac373
4 changed files with 24 additions and 22 deletions

View File

@ -118,9 +118,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
// Ligne de titre tableau des ecritures
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Invoices").'</td>';
print '<td>'.$langs->trans("DateEcheance").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("ThirdParty").'</td>';
print '<td align="center">'.$langs->trans("DateEcheance").'</td>';
print '<td align="right">'.$langs->trans("Debit").'</td>';
print '<td align="right">'.$langs->trans("Credit").'</td>';
print '<td align="right" width="80">'.$langs->trans("BankBalance").'</td>';
@ -132,18 +132,12 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td align="left" colspan="5">'.$langs->trans("CurrentBalance").'</td>';
print '<td align="right" nowrap>&nbsp;</td>';
print '</tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td align="left" colspan="5">&nbsp;</td>';
print '<td align="right" nowrap>'.price($solde).'</td>';
print '</tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td align="left" colspan="5">'.$langs->trans("RemainderToPay").'</td>';
print '<td align="left" colspan="5">'.$langs->trans("RemainderToPay").':</td>';
print '<td align="right" nowrap>&nbsp;</td>';
print '</tr>';
@ -239,7 +233,6 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$num = sizeOf($tab_sqlobj);
$var=False;
//$num = $db->num_rows($result);
$i = 0;
while ($i < $num)
@ -266,7 +259,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$societestatic->id = $obj->socid;
$societestatic->nom = $obj->nom;
$refcomp=$societestatic->getNomUrl(0,'',24);
$refcomp=$societestatic->getNomUrl(1,'',24);
$paiement = -1*$facturefournstatic->getSommePaiement(); // Payment already done
}
@ -280,7 +273,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$societestatic->id = $obj->socid;
$societestatic->nom = $obj->nom;
$refcomp=$societestatic->getNomUrl(0,'',24);
$refcomp=$societestatic->getNomUrl(1,'',24);
$paiement = $facturestatic->getSommePaiement(); // Payment already done
}
@ -299,9 +292,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$solde += $total_ttc;
print "<tr $bc[$var]>";
print '<td>'.dolibarr_print_date($obj->dlr,"day")."</td>";
print "<td>".$ref."</td>";
print "<td>".$refcomp."</td>";
print '<td align="center">'.dolibarr_print_date($obj->dlr,"day")."</td>";
if ($obj->total_ttc < 0) { print "<td align=\"right\">".price($total_ttc)."</td><td>&nbsp;</td>"; };
if ($obj->total_ttc >= 0) { print "<td>&nbsp;</td><td align=\"right\">".price($total_ttc)."</td>"; };
print "<td align=\"right\">".price($solde)."</td>";
@ -314,6 +307,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
dolibarr_print_error($db);
}
// Solde actuel
$var=!$var;
print '<tr class="liste_total">';
print '<td align="left" colspan="5">'.$langs->trans("FutureBalance").'</td>';
print '<td align="right" nowrap>'.price($solde).'</td>';
print '</tr>';
print "</table>";
}

View File

@ -24,6 +24,7 @@ BalanceMinimalDesired=Minimum desired balance
InitialBankBalance=Initial balance
EndBankBalance=End balance
CurrentBalance=Current balance
FutureBalance=Future balance
ShowAllTimeBalance=Show balance from start
Reconciliation=Reconciliation
RIB=RIB
@ -112,6 +113,7 @@ ConfirmDeleteTransaction=Are you sure you want to delete this transaction ?
ThisWillAlsoDeleteBankRecord=This will also delete generated bank transactions
BankMovements=Movements
CashBudget=Cash budget
PlannedTransactions=Planned transactions
ExportDataset_banque_1=Bank transactions and account statement
TransactionOnTheOtherAccount=Transaction on the other account
TransactionWithOtherAccount=Account transfert

View File

@ -25,7 +25,7 @@ InitialBankBalance=Solde initial
EndBankBalance=Solde final
CurrentBalance=Solde actuel
FutureBalance=Solde futur
ShowAllTimeBalance=Afficher balance depuis debut
ShowAllTimeBalance=Afficher solde depuis debut
Reconciliation=Rapprochement
RIB=RIB
IBAN=Identifiant IBAN

View File

@ -50,6 +50,14 @@ function bank_prepare_head($obj)
$head[$h][2] = 'journal';
$h++;
// if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
// {
$head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$obj->id;
$head[$h][1] = $langs->trans("PlannedTransactions");
$head[$h][2] = 'cash';
$h++;
// }
$head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$obj->id;
$head[$h][1] = $langs->trans("IOMonthlyReporting");
$head[$h][2] = 'annual';
@ -60,14 +68,6 @@ function bank_prepare_head($obj)
$head[$h][2] = 'graph';
$h++;
// if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
// {
$head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$obj->id;
$head[$h][1] = $langs->trans("CashBudget");
$head[$h][2] = 'cash';
$h++;
// }
if ($obj->courant != 2)
{
$head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$obj->id;