clean and update code
This commit is contained in:
parent
1dd39a4c5c
commit
365ed9c5de
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file accounting/bookkeeping/thirdparty_lettrage.php
|
* \file accountancy/bookkeeping/thirdparty_lettrage.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Onglet de gestion de parametrages des ventilations
|
* \brief Onglet de gestion de parametrages des ventilations
|
||||||
*/
|
*/
|
||||||
@ -82,8 +82,9 @@ $socid = GETPOST("socid", 'int');
|
|||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
$object->id = $socid;
|
$object->id = $socid;
|
||||||
$result = $object->fetch($socid);
|
$result = $object->fetch($socid);
|
||||||
if ($result < 0) {
|
if ($result < 0)
|
||||||
setEventMessage($object->error, 'errors');
|
{
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -252,7 +253,6 @@ if ($resql) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var = false;
|
|
||||||
$solde = 0;
|
$solde = 0;
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
while ( $obj = $db->fetch_object($resql) ) {
|
while ( $obj = $db->fetch_object($resql) ) {
|
||||||
@ -261,11 +261,10 @@ if ($resql) {
|
|||||||
$tmp = $obj->lettering_code;
|
$tmp = $obj->lettering_code;
|
||||||
|
|
||||||
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
|
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
|
||||||
$var = ! $var;
|
|
||||||
|
|
||||||
$solde += ($obj->credit - $obj->debit);
|
$solde += ($obj->credit - $obj->debit);
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if (empty($obj->lettering_code)) {
|
if (empty($obj->lettering_code)) {
|
||||||
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
||||||
@ -293,14 +292,13 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
print '<td colspan="4">Mouvement totaux</td>' . "\n";
|
print '<td colspan="4">Mouvement totaux</td>' . "\n";
|
||||||
print '<td><strong>' . price($debit) . '</strong></td>';
|
print '<td><strong>' . price($debit) . '</strong></td>';
|
||||||
print '<td><strong>' . price($credit) . '</strong></td>';
|
print '<td><strong>' . price($credit) . '</strong></td>';
|
||||||
print '<td colspan="5"></td>';
|
print '<td colspan="5"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="9">Solde Comptable</td>' . "\n";
|
print '<td colspan="9">Solde Comptable</td>' . "\n";
|
||||||
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
|
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
|
||||||
print '<td colspan="5"></td>';
|
print '<td colspan="5"></td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user