This commit is contained in:
Florian HENRY 2015-12-21 13:09:22 +01:00
parent b179a193dd
commit 8006baf592
10 changed files with 256 additions and 97 deletions

View File

@ -27,6 +27,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
// Langs
$langs->load("accountancy");
@ -41,12 +42,24 @@ $piece_num = GETPOST("piece_num");
$mesg = '';
$numero_compte = GETPOST('numero_compte');
$account_number = GETPOST('account_number');
$code_tiers = GETPOST('code_tiers');
if ($code_tiers==-1) {
$code_tiers=null;
}
$label_compte = GETPOST('label_compte');
$debit = price2num(GETPOST('debit'));
$credit = price2num(GETPOST('credit'));
$save=GETPOST('save');
if (!empty($save)) {
$action='add';
}
$update=GETPOST('update');
if (!empty($update)) {
$action='confirm_update';
}
if ($action == "confirm_update") {
$error = 0;
@ -63,7 +76,7 @@ if ($action == "confirm_update") {
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
$book->numero_compte = $numero_compte;
$book->numero_compte = $account_number;
$book->code_tiers = $code_tiers;
$book->label_compte = $label_compte;
$book->debit = $debit;
@ -92,15 +105,15 @@ if ($action == "confirm_update") {
else if ($action == "add") {
$error = 0;
if ((intval($debit) != 0) && (intval($credit) != 0)) {
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$error ++;
}
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$error ++;
}
if (empty($error)) {
$book = new BookKeeping($db);
$book->numero_compte = $numero_compte;
$book->numero_compte = $account_number;
$book->code_tiers = $code_tiers;
$book->label_compte = $label_compte;
$book->debit = $debit;
@ -113,11 +126,12 @@ else if ($action == "add") {
$book->fk_doc = GETPOST('fk_doc');
$book->fk_docdet = GETPOST('fk_docdet');
if (! empty($debit)) {
if (floatval($debit) != 0.0) {
$book->montant = $debit;
$book->sens = 'D';
}
if (! empty($credit)) {
if (floatval($credit) != 0.0) {
$book->montant = $credit;
$book->sens = 'C';
}
@ -179,6 +193,7 @@ else if ($action == "confirm_create") {
llxHeader();
$html = new Form($db);
$formventilation = new FormVentilation($db);
/*
* Confirmation to delete the command
@ -281,9 +296,21 @@ if ($action == 'create') {
} else {
print load_fiche_titre($langs->trans("ListeMvts"));
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n";
print '<input type="hidden" name="doc_ref" value="' . $book->doc_ref . '">' . "\n";
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
print "<table class=\"noborder\" width=\"100%\">";
if (count($book->linesmvt) > 0) {
$total_debit=0;
$total_credit=0;
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Numerocompte"));
@ -301,21 +328,26 @@ if ($action == 'create') {
$var = ! $var;
print "<tr $bc[$var]>";
$total_debit+=$line->debit;
$total_credit+=$line->credit;
if ($action == 'update' && $line->id == $id) {
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
print '<input type="hidden" name="action" value="confirm_update">' . "\n";
print '<td><input type="text" size="6" name="numero_compte" value="' . $line->numero_compte . '"/></td>';
print '<td><input type="text" size="15" name="code_tiers" value="' . $line->code_tiers . '"/></td>';
print '<td>';
print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1,'');
print '</td>';
print '<td>';
print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers',1);
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="6" name="debit" value="' . price($line->debit) . '"/></td>';
print '<td><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>';
print '<td>' . $line->montant . '</td>';
print '<td>' . $line->sens . '</td>';
print '<td>';
print '<input type="submit" class="button" value="' . $langs->trans("Update") . '">';
print '</form>';
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
print '</td>';
} else {
print '<td>' . $line->numero_compte . '</td>';
@ -327,10 +359,10 @@ if ($action == 'create') {
print '<td>' . $line->sens . '</td>';
print '<td>';
print '<a href="./card.php?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
print '<a href="./card.php?action=update&amp;id=' . $line->id . '&amp;piece_num=' . $line->piece_num . '">';
print img_edit();
print '</a>&nbsp;';
print '<a href="./card.php?action=delete&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
print '<a href="./card.php?action=delete&amp;id=' . $line->id . '&amp;piece_num=' . $line->piece_num . '">';
print img_delete();
print '</a>';
@ -339,34 +371,32 @@ if ($action == 'create') {
print "</tr>\n";
}
if ($total_debit!=$total_credit) {
setEventMessages(null, array('MvtNotCorrectlyBalanced',$total_credit,$total_debit),'errors');
}
if ($action == "" || $action == 'add') {
$var = ! $var;
print "<tr $bc[$var]>";
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
print '<input type="hidden" name="action" value="add">' . "\n";
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n";
print '<input type="hidden" name="doc_ref" value="' . $book->doc_ref . '">' . "\n";
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
print '<td><input type="text" size="6" name="numero_compte" value="' . $numero_compte . '"/></td>';
print '<td><input type="text" size="15" name="code_tiers" value="' . $code_tiers . '"/></td>';
print '<td>';
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
print '</td>';
print '<td>';
print $formventilation->select_auxaccount($code_tiers, 'code_tiers',1);
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></td>';
print '<td><input type="text" size="6" name="debit" value="' . price($debit) . '"/></td>';
print '<td><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
print '<td></td>';
print '<td></td>';
print '<td><input type="submit" class="button" value="' . $langs->trans("Save") . '"></td>';
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '"></td>';
print '</tr>';
}
print '</table>';
print '</form>';
}
}
}
else {
} else {
print load_fiche_titre($langs->trans("NoRecords"));
}
}

View File

@ -19,18 +19,17 @@
*/
/**
* \file htdocs/accountancy/bookkeeping/list.php
* \ingroup Accounting Expert
* \brief List operation of book keeping
* \file htdocs/accountancy/bookkeeping/list.php
* \ingroup Accounting Expert
* \brief List operation of book keeping
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
// Langs
$langs->load("accountancy");
@ -58,11 +57,11 @@ $formother = new FormOther($db);
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search_doc_type="";
$search_doc_ref="";
$search_account="";
$search_thirdparty="";
$search_journal="";
$search_piece_num = "";
$search_doc_ref = "";
$search_account = "";
$search_thirdparty = "";
$search_journal = "";
}
/*
@ -80,8 +79,7 @@ if ($action == 'delbookkeeping') {
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
elseif ($action == 'delbookkeepingyear') {
} elseif ($action == 'delbookkeepingyear') {
$delyear = GETPOST('delyear', 'int');
@ -93,8 +91,7 @@ elseif ($action == 'delbookkeepingyear') {
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
elseif ($action == 'delbookkeepingyear') {
} elseif ($action == 'delbookkeepingyear') {
$delyear = GETPOST('delyear', 'int');
@ -106,7 +103,7 @@ elseif ($action == 'delbookkeepingyear') {
setEventMessages($object->error, $object->errors, 'errors');
}
}
}// Export
} // Export
else if ($action == 'export_csv') {
header('Content-Type: text/csv');
@ -118,19 +115,55 @@ else if ($action == 'export_csv') {
setEventMessages($object->error, $object->errors, 'errors');
}
foreach ( $object->linesexport as $line ) {
print $line->id . ',';
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $line->code_journal . '",';
print '"' . $line->numero_compte . '",';
print '"' . substr($line->code_journal, 0, 2) . '",';
print '"' . substr($line->doc_ref, 0, 40) . '",';
print '"' . $line->num_piece . '",';
print '"' . $line->montant . '",';
print '"' . $line->sens . '",';
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $conf->currency . '",';
print "\n";
// Model classic Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) {
foreach ( $object->linesexport as $line ) {
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $line->code_journal . '",';
print '"' . $line->numero_compte . '",';
print '"' . substr($line->code_journal, 0, 2) . '",';
print '"' . substr($line->doc_ref, 0, 40) . '",';
print '"' . $line->num_piece . '",';
print '"' . $line->debit . '",';
print '"' . $line->credit . '",';
print '"' . $conf->currency . '",';
print "\n";
}
}
// Model cegid Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
foreach ( $object->linesexport as $line ) {
print $line->id . ',';
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $line->code_journal . '",';
print '"' . $line->numero_compte . '",';
print '"' . substr($line->code_journal, 0, 2) . '",';
print '"' . substr($line->doc_ref, 0, 40) . '",';
print '"' . $line->num_piece . '",';
print '"' . $line->montant . '",';
print '"' . $line->sens . '",';
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $conf->currency . '",';
print "\n";
}
}
// Model Coala Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 3) {
foreach ( $object->linesexport as $line ) {
print $line->id . ',';
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $line->code_journal . '",';
print '"' . $line->numero_compte . '",';
print '"' . substr($line->code_journal, 0, 2) . '",';
print '"' . substr($line->doc_ref, 0, 40) . '",';
print '"' . $line->num_piece . '",';
print '"' . $line->montant . '",';
print '"' . $line->sens . '",';
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
print '"' . $conf->currency . '",';
print "\n";
}
}
}
@ -138,16 +171,16 @@ else {
llxHeader('', $langs->trans("Bookkeeping"));
/*
* List
*/
/*
* List
*/
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
if (dol_strlen(trim($search_doc_type))) {
$sql .= " WHERE bk.doc_type LIKE '%" . $search_doc_type . "%'";
$sql .= " WHERE bk.piece_num LIKE '%" . $search_piece_num . "%'";
if (dol_strlen(trim($search_doc_ref))) {
$sql .= " AND bk.doc_ref LIKE '%" . $search_doc_ref . "%'";
@ -177,20 +210,20 @@ else {
print_barre_liste($langs->trans("Bookkeeping"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num);
/*print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="delbookkeeping">';
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
print '</form>';*/
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="delbookkeeping">';
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
print '</form>';*/
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="delbookkeepingyear">';
print $formother->select_year(GETPOST('delyear'),'delyear');
print $formother->select_year(GETPOST('delyear'), 'delyear');
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
@ -204,7 +237,7 @@ else {
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "bk.doc_type", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "bk.piece_num", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "bk.doc_date", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder);
@ -215,12 +248,12 @@ else {
print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "bk.montant", "", "", 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "bk.sens", "", "", 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "bk.code_journal", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="GET">';
print '<td><input type="text" name="search_doc_type" size="8" value="' . $search_doc_type . '"></td>';
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
print '<td><input type="text" name="search_doc_type" size="8" value="' . $search_piece_num . '"></td>';
print '<td>&nbsp;</td>';
print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
print '<td><input type="text" name="search_account" size="8" value="' . $search_account . '"></td>';
@ -232,9 +265,9 @@ else {
print '<td>&nbsp;</td>';
print '<td><input type="text" name="search_journal" size="3" value="' . $search_journal . '"></td>';
print '<td align="right" colspan="2" class="liste_titre">';
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" name="button_search" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
print '&nbsp;';
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" name="button_removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print '</td>';
print '</form>';
print '</tr>';
@ -247,7 +280,16 @@ else {
print "<tr $bc[$var]>";
print '<td>' . $obj->doc_type . '</td>';
/* if ($old_piecenum!=$obj->piece_num) {
$total_debit=0;
$total_credit=0;
} else {
$total_debit+=$obj->debit;
$total_credit+=$obj->credit;
}
*/
print '<td>' . $obj->piece_num . '</td>';
print '<td align="center">' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
print '<td>' . length_accountg($obj->numero_compte) . '</td>';
@ -260,19 +302,23 @@ else {
print '<td>' . $obj->code_journal . '</td>';
print '<td align="center"><a href="./card.php?piece_num=' . $obj->piece_num . '">' . img_edit() . '</a></td>';
print "</tr>\n";
//$old_piecenum= $obj->piece_num;
$i ++;
}
print "</table>";
print '<div class="tabsAction">';
print '<a class="butAction" href="./card.php?action=create">'.$langs->trans("NewAccountingMvt").'</a>';
print '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>';
print '</div>';
$db->free($resql);
} else {
dol_print_error($db);
}
llxFooter();
}
llxFooter();
$db->close();

View File

@ -265,4 +265,81 @@ class FormVentilation extends Form
$this->db->free($resql);
return $out;
}
/**
* Return list of auxilary thirdparty accounts
*
* @param string $selectid Preselected pcg_type
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
*
* @return string String with HTML select
*/
function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $event = array()) {
global $conf;
$out = '';
$aux_account = array ();
// Auxiliary customer account
$sql = "SELECT DISTINCT code_compta, nom ";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe";
$sql .= " ORDER BY code_compta";
dol_syslog(get_class($this) . "::select_auxaccount", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
while ( $obj = $this->db->fetch_object($resql) ) {
if (! empty($obj->code_compta)) {
$aux_account[$obj->code_compta] = $obj->code_compta . ' (' . $obj->nom . ')';
}
}
} else {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(get_class($this) . "::select_pcgsubtype " . $this->error, LOG_ERR);
return - 1;
}
$this->db->free($resql);
// Auxiliary supplier account
$sql = "SELECT DISTINCT code_compta_fournisseur, nom ";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe";
$sql .= " ORDER BY code_compta";
dol_syslog(get_class($this) . "::select_auxaccount", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
while ( $obj = $this->db->fetch_object($resql) ) {
if (! empty($obj->code_compta_fournisseur)) {
$aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur . ' (' . $obj->nom . ')';
}
}
} else {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(get_class($this) . "::select_pcgsubtype " . $this->error, LOG_ERR);
return - 1;
}
$this->db->free($resql);
//Build select
if (count($aux_account) > 0) {
$out .= ajax_combobox($htmlname, $event);
$out .= '<select id="' . $htmlname . '" class="flat" name="' . $htmlname . '">';
if ($showempty)
$out .= '<option value="-1"></option>';
foreach ( $aux_account as $key => $val ) {
if (($selectid != '') && $selectid == $key) {
$out .= '<option value="' . $key . '" selected>' . $val . '</option>';
} else {
$out .= '<option value="' . $key . '">' . $val . '</option>';
}
}
$out .= '</select>';
}
return $out;
}
}

View File

@ -72,7 +72,7 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
$offset = $limit * $page;
if (! $sortfield)
$sortfield = "f.facnumber";
$sortfield = "f.datef, f.facnumber, l.rowid";
if (! $sortorder) {
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {

View File

@ -355,7 +355,7 @@ if ($action == 'writebookkeeping')
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->doc_type = 'banque';
$bookkeeping->doc_type = 'bank';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_bank"];
$bookkeeping->label_compte = $tabcompany[$key]['name'];
@ -675,6 +675,7 @@ else
print "</table>";
llxFooter();
}
llxFooter();
$db->close();

View File

@ -5,7 +5,7 @@
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -487,7 +487,9 @@ if ($action == 'export_csv')
}
print "</table>";
// End of page
llxFooter();
}
llxFooter();
$db->close();

View File

@ -531,6 +531,7 @@ if ($action == 'export_csv')
print "</table>";
llxFooter();
}
llxFooter();
$db->close();

View File

@ -571,5 +571,5 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4108, 'Mitarbeitervorsorgekasse', 1,1,'TAXATMVK' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4109, 'Familienlastenausgleichsfond', 1,1,'TAXATFLAF' ,'41');
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(255) NOT NULL;
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(300) NOT NULL;

View File

@ -22,7 +22,7 @@ CREATE TABLE llx_accounting_bookkeeping
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
doc_date date NOT NULL,
doc_type varchar(30) NOT NULL, -- facture_client/reglement_client/facture_fournisseur/reglement_fournisseur
doc_ref varchar(255) NOT NULL, -- facture_client/reglement_client/... reference number
doc_ref varchar(300) NOT NULL, -- facture_client/reglement_client/... reference number
fk_doc integer NOT NULL, -- facture_client/reglement_client/... rowid
fk_docdet integer NOT NULL, -- facture_client/reglement_client/... line rowid
code_tiers varchar(24), -- code tiers

View File

@ -169,3 +169,5 @@ Param=Additionnal parameters
EnabledProduct=In Product
EnabledTiers=In Tiers
EnabledVat=In Vat
MvtNotCorrectlyBalanced=Mouvement not correctly balanced. Credit = %s. Debit = %s