Merge pull request #7563 from aspangaro/7.0-label_operation_on_general_ledger
Fix : problems on accountancy & presentation
This commit is contained in:
commit
86e751bd45
@ -569,7 +569,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print_liste_field_titre("AccountAccountingShort");
|
print_liste_field_titre("AccountAccountingShort");
|
||||||
print_liste_field_titre("SubledgerAccount");
|
print_liste_field_titre("SubledgerAccount");
|
||||||
print_liste_field_titre("Labelcompte");
|
print_liste_field_titre("LabelAccount");
|
||||||
print_liste_field_titre("Label");
|
print_liste_field_titre("Label");
|
||||||
print_liste_field_titre("Debit", "", "", "", "", 'align="right"');
|
print_liste_field_titre("Debit", "", "", "", "", 'align="right"');
|
||||||
print_liste_field_titre("Credit", "", "", "", "", 'align="right"');
|
print_liste_field_titre("Credit", "", "", "", "", 'align="right"');
|
||||||
|
|||||||
@ -98,8 +98,8 @@ $form = new Form($db);
|
|||||||
|
|
||||||
|
|
||||||
if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
|
if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
|
||||||
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -134,67 +134,67 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
|||||||
$param = '';
|
$param = '';
|
||||||
$filter = array ();
|
$filter = array ();
|
||||||
if (! empty($search_date_start)) {
|
if (! empty($search_date_start)) {
|
||||||
$filter['t.doc_date>='] = $search_date_start;
|
$filter['t.doc_date>='] = $search_date_start;
|
||||||
$tmp=dol_getdate($search_date_start);
|
$tmp=dol_getdate($search_date_start);
|
||||||
$param .= '&date_startmonth=' . $tmp['mon'] . '&date_startday=' . $tmp['mday'] . '&date_startyear=' . $tmp['year'];
|
$param .= '&date_startmonth=' . $tmp['mon'] . '&date_startday=' . $tmp['mday'] . '&date_startyear=' . $tmp['year'];
|
||||||
}
|
}
|
||||||
if (! empty($search_date_end)) {
|
if (! empty($search_date_end)) {
|
||||||
$filter['t.doc_date<='] = $search_date_end;
|
$filter['t.doc_date<='] = $search_date_end;
|
||||||
$tmp=dol_getdate($search_date_end);
|
$tmp=dol_getdate($search_date_end);
|
||||||
$param .= '&date_endmonth=' . $tmp['mon'] . '&date_endday=' . $tmp['mday'] . '&date_endyear=' . $tmp['year'];
|
$param .= '&date_endmonth=' . $tmp['mon'] . '&date_endday=' . $tmp['mday'] . '&date_endyear=' . $tmp['year'];
|
||||||
}
|
}
|
||||||
if (! empty($search_doc_date)) {
|
if (! empty($search_doc_date)) {
|
||||||
$filter['t.doc_date'] = $search_doc_date;
|
$filter['t.doc_date'] = $search_doc_date;
|
||||||
$tmp=dol_getdate($search_doc_date);
|
$tmp=dol_getdate($search_doc_date);
|
||||||
$param .= '&doc_datemonth=' . $tmp['mon'] . '&doc_dateday=' . $tmp['mday'] . '&doc_dateyear=' . $tmp['year'];
|
$param .= '&doc_datemonth=' . $tmp['mon'] . '&doc_dateday=' . $tmp['mday'] . '&doc_dateyear=' . $tmp['year'];
|
||||||
}
|
}
|
||||||
if (! empty($search_doc_type)) {
|
if (! empty($search_doc_type)) {
|
||||||
$filter['t.doc_type'] = $search_doc_type;
|
$filter['t.doc_type'] = $search_doc_type;
|
||||||
$param .= '&search_doc_type=' . $search_doc_type;
|
$param .= '&search_doc_type=' . $search_doc_type;
|
||||||
}
|
}
|
||||||
if (! empty($search_doc_ref)) {
|
if (! empty($search_doc_ref)) {
|
||||||
$filter['t.doc_ref'] = $search_doc_ref;
|
$filter['t.doc_ref'] = $search_doc_ref;
|
||||||
$param .= '&search_doc_ref=' . $search_doc_ref;
|
$param .= '&search_doc_ref=' . $search_doc_ref;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_code)) {
|
if (! empty($search_accountancy_code)) {
|
||||||
$filter['t.numero_compte'] = $search_accountancy_code;
|
$filter['t.numero_compte'] = $search_accountancy_code;
|
||||||
$param .= '&search_accountancy_code=' . $search_accountancy_code;
|
$param .= '&search_accountancy_code=' . $search_accountancy_code;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_code_start)) {
|
if (! empty($search_accountancy_code_start)) {
|
||||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||||
$param .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
$param .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_code_end)) {
|
if (! empty($search_accountancy_code_end)) {
|
||||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||||
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_aux_code)) {
|
if (! empty($search_accountancy_aux_code)) {
|
||||||
$filter['t.subledger_account'] = $search_accountancy_aux_code;
|
$filter['t.subledger_account'] = $search_accountancy_aux_code;
|
||||||
$param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
|
$param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_aux_code_start)) {
|
if (! empty($search_accountancy_aux_code_start)) {
|
||||||
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
|
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
|
||||||
$param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
|
$param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_aux_code_end)) {
|
if (! empty($search_accountancy_aux_code_end)) {
|
||||||
$filter['t.subledger_account<='] = $search_accountancy_aux_code_end;
|
$filter['t.subledger_account<='] = $search_accountancy_aux_code_end;
|
||||||
$param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
|
$param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
|
||||||
}
|
}
|
||||||
if (! empty($search_mvt_label)) {
|
if (! empty($search_mvt_label)) {
|
||||||
$filter['t.label_operation'] = $search_mvt_label;
|
$filter['t.label_operation'] = $search_mvt_label;
|
||||||
$param .= '&search_mvt_label=' . $search_mvt_label;
|
$param .= '&search_mvt_label=' . $search_mvt_label;
|
||||||
}
|
}
|
||||||
if (! empty($search_direction)) {
|
if (! empty($search_direction)) {
|
||||||
$filter['t.sens'] = $search_direction;
|
$filter['t.sens'] = $search_direction;
|
||||||
$param .= '&search_direction=' . $search_direction;
|
$param .= '&search_direction=' . $search_direction;
|
||||||
}
|
}
|
||||||
if (! empty($search_ledger_code)) {
|
if (! empty($search_ledger_code)) {
|
||||||
$filter['t.code_journal'] = $search_ledger_code;
|
$filter['t.code_journal'] = $search_ledger_code;
|
||||||
$param .= '&search_ledger_code=' . $search_ledger_code;
|
$param .= '&search_ledger_code=' . $search_ledger_code;
|
||||||
}
|
}
|
||||||
if (! empty($search_mvt_num)) {
|
if (! empty($search_mvt_num)) {
|
||||||
$filter['t.piece_num'] = $search_mvt_num;
|
$filter['t.piece_num'] = $search_mvt_num;
|
||||||
$param .= '&search_mvt_num=' . $search_mvt_num;
|
$param .= '&search_mvt_num=' . $search_mvt_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delbookkeeping') {
|
if ($action == 'delbookkeeping') {
|
||||||
@ -229,16 +229,16 @@ if ($action == 'delbookkeepingyearconfirm') {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages("RecordDeleted", null, 'mesgs');
|
setEventMessages("RecordDeleted", null, 'mesgs');
|
||||||
}
|
}
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages("NoRecordDeleted", null, 'warnings');
|
setEventMessages("NoRecordDeleted", null, 'warnings');
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($action == 'delmouvconfirm') {
|
if ($action == 'delmouvconfirm') {
|
||||||
@ -248,11 +248,11 @@ if ($action == 'delmouvconfirm') {
|
|||||||
if (! empty($mvt_num)) {
|
if (! empty($mvt_num)) {
|
||||||
$result = $object->deleteMvtNum($mvt_num);
|
$result = $object->deleteMvtNum($mvt_num);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit;
|
exit;
|
||||||
@ -262,21 +262,21 @@ if ($action == 'delmouvconfirm') {
|
|||||||
// Export into a file with format defined into setup
|
// Export into a file with format defined into setup
|
||||||
if ($action == 'export_file') {
|
if ($action == 'export_file') {
|
||||||
|
|
||||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$accountancyexport = new AccountancyExport($db);
|
$accountancyexport = new AccountancyExport($db);
|
||||||
$accountancyexport->export($object->lines);
|
$accountancyexport->export($object->lines);
|
||||||
if (!empty($accountancyexport->errors)) {
|
if (!empty($accountancyexport->errors)) {
|
||||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
);
|
);
|
||||||
$form_question['deljournal'] = array (
|
$form_question['deljournal'] = array (
|
||||||
'name' => 'deljournal',
|
'name' => 'deljournal',
|
||||||
'type' => 'other', // We don't use select here, the journal_array is already a select html component
|
'type' => 'other', // We don't use select here, the journal_array is already a select html component
|
||||||
'label' => $langs->trans('DelJournal'),
|
'label' => $langs->trans('DelJournal'),
|
||||||
'value' => $journal_array,
|
'value' => $journal_array,
|
||||||
'default' => $deljournal
|
'default' => $deljournal
|
||||||
@ -340,7 +340,7 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$param=''; param started before
|
//$param=''; param started before
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
|
||||||
@ -399,28 +399,28 @@ print '</td>';
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('From').' ';
|
print $langs->trans('From').' ';
|
||||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
|
||||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
|
print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('to').' ';
|
print $langs->trans('to').' ';
|
||||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
|
||||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
|
print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -489,8 +489,8 @@ while ($i < min($num, $limit))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($num < $limit) print '<td align="left" colspan="6">'.$langs->trans("Total").'</td>';
|
if ($num < $limit) print '<td align="left" colspan="7">'.$langs->trans("Total").'</td>';
|
||||||
else print '<td align="left" colspan="6">'.$langs->trans("Totalforthispage").'</td>';
|
else print '<td align="left" colspan="7">'.$langs->trans("Totalforthispage").'</td>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print price($total_debit);
|
print price($total_debit);
|
||||||
|
|||||||
@ -196,7 +196,7 @@ llxHeader ( '', 'Compta - Grand Livre' );
|
|||||||
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
|
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
|
||||||
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
|
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
|
||||||
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
|
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
|
||||||
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
|
print_liste_field_titre("LabelAccount", "liste.php", "bk_label_compte" );
|
||||||
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
|
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
|
||||||
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
|
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
|
||||||
// print_liste_field_titre("Amount", "liste.php", "bk.montant" );
|
// print_liste_field_titre("Amount", "liste.php", "bk.montant" );
|
||||||
|
|||||||
@ -205,7 +205,7 @@ llxHeader ( '', 'Compta - Grand Livre' );
|
|||||||
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
|
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
|
||||||
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
|
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
|
||||||
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
|
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
|
||||||
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
|
print_liste_field_titre("LabelAccount", "liste.php", "bk_label_compte" );
|
||||||
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
|
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
|
||||||
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
|
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
|
||||||
print_liste_field_titre("Amount", "liste.php", "bk.montant" );
|
print_liste_field_titre("Amount", "liste.php", "bk.montant" );
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -310,6 +310,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
else print length_accountg($row[0]);
|
else print length_accountg($row[0]);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($row[0] == 'tobind')
|
if ($row[0] == 'tobind')
|
||||||
{
|
{
|
||||||
@ -317,7 +318,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
else print $row[1];
|
else print $row[1];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="left">' . $row[1] . '</td>';
|
|
||||||
for($i = 2; $i <= 12; $i ++) {
|
for($i = 2; $i <= 12; $i ++) {
|
||||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -422,7 +422,6 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_operation = $val["label"];
|
|
||||||
$bookkeeping->label_compte = $langs->trans("Bank");
|
$bookkeeping->label_compte = $langs->trans("Bank");
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
||||||
@ -433,21 +432,28 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_user_author = $user->id;
|
$bookkeeping->fk_user_author = $user->id;
|
||||||
$bookkeeping->date_create = $now;
|
$bookkeeping->date_create = $now;
|
||||||
|
|
||||||
// No subledger_account value for the bank line
|
// No subledger_account value for the bank line but add a specific label_operation
|
||||||
if ($tabtype[$key] == 'payment') {
|
if ($tabtype[$key] == 'payment') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $tabcompany[$key]['name'] . ' - ' . $ref;
|
||||||
} else if ($tabtype[$key] == 'payment_supplier') {
|
} else if ($tabtype[$key] == 'payment_supplier') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $tabcompany[$key]['name'] . ' - ' . $ref;
|
||||||
} else if ($tabtype[$key] == 'payment_expensereport') {
|
} else if ($tabtype[$key] == 'payment_expensereport') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $tabuser[$key]['name'] . ' - ' . $ref;
|
||||||
} else if ($tabtype[$key] == 'payment_salary') {
|
} else if ($tabtype[$key] == 'payment_salary') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $tabuser[$key]['name'] . ' - ' . $ref;
|
||||||
} else if ($tabtype[$key] == 'payment_vat') {
|
} else if ($tabtype[$key] == 'payment_vat') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $ref;
|
||||||
} else if ($tabtype[$key] == 'payment_donation') {
|
} else if ($tabtype[$key] == 'payment_donation') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $ref;
|
||||||
} else if ($tabtype[$key] == 'payment_various') {
|
} else if ($tabtype[$key] == 'payment_various') {
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
|
$bookkeeping->label_operation = $ref;
|
||||||
} else if ($tabtype[$key] == 'unknown') {
|
} else if ($tabtype[$key] == 'unknown') {
|
||||||
// ???
|
// ???
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
@ -484,7 +490,6 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$bookkeeping->doc_type = 'bank';
|
$bookkeeping->doc_type = 'bank';
|
||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||||
$bookkeeping->label_operation = $tabcompany[$key]['name'];
|
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
||||||
@ -495,55 +500,55 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$bookkeeping->date_create = $now;
|
$bookkeeping->date_create = $now;
|
||||||
|
|
||||||
if ($tabtype[$key] == 'payment') { // If payment is payment of customer invoice, we get ref of invoice
|
if ($tabtype[$key] == 'payment') { // If payment is payment of customer invoice, we get ref of invoice
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $tabcompany[$key]['name'] . ' - ' . $ref;
|
||||||
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
||||||
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
||||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
|
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $tabcompany[$key]['name'] . ' - ' . $ref;
|
||||||
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
||||||
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
||||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if ($tabtype[$key] == 'payment_expensereport') {
|
} else if ($tabtype[$key] == 'payment_expensereport') {
|
||||||
$bookkeeping->label_operation = $tabuser[$key]['name'];
|
$bookkeeping->label_operation = $tabuser[$key]['name'] . ' - ' . $ref;
|
||||||
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
|
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
|
||||||
$bookkeeping->subledger_label = $tabuser[$key]['name'];
|
$bookkeeping->subledger_label = $tabuser[$key]['name'];
|
||||||
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if ($tabtype[$key] == 'payment_salary') {
|
} else if ($tabtype[$key] == 'payment_salary') {
|
||||||
$bookkeeping->label_operation = $tabuser[$key]['name'];
|
$bookkeeping->label_operation = $tabuser[$key]['name'] . ' - ' . $ref;
|
||||||
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
|
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
|
||||||
$bookkeeping->subledger_label = $tabuser[$key]['name'];
|
$bookkeeping->subledger_label = $tabuser[$key]['name'];
|
||||||
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
|
} else if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $ref;
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = $objmid->labelc;
|
$bookkeeping->label_compte = $objmid->labelc;
|
||||||
} else if ($tabtype[$key] == 'payment_vat') {
|
} else if ($tabtype[$key] == 'payment_vat') {
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $ref;
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if ($tabtype[$key] == 'payment_donation') {
|
} else if ($tabtype[$key] == 'payment_donation') {
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $ref;
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if ($tabtype[$key] == 'payment_various') {
|
} else if ($tabtype[$key] == 'payment_various') {
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $ref;
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = '';
|
$bookkeeping->label_compte = '';
|
||||||
} else if ($tabtype[$key] == 'banktransfert') {
|
} else if ($tabtype[$key] == 'banktransfert') {
|
||||||
$bookkeeping->label_operation = '';
|
$bookkeeping->label_operation = $ref;
|
||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
@ -676,9 +681,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print " " . $sep;
|
print " " . $sep;
|
||||||
if ($companystatic->name == '') {
|
if ($companystatic->name == '') {
|
||||||
print '"' . $langs->trans('Bank') . " - " . utf8_decode($reflabel) . '"' . $sep;
|
print '"' . $val['bank_account_ref'] . " - " . utf8_decode($reflabel) . '"' . $sep;
|
||||||
} else {
|
} else {
|
||||||
print '"' . $langs->trans("Bank") . ' - ' . utf8_decode($companystatic->name) . '"' . $sep;
|
print '"' . $val['bank_account_ref'] . ' - ' . utf8_decode($companystatic->name) . '"' . $sep;
|
||||||
}
|
}
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
||||||
@ -720,9 +725,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . '"' . $sep;
|
print '"' . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . '"' . $sep;
|
||||||
print " " . $sep;
|
print " " . $sep;
|
||||||
if ($companystatic->name == '') {
|
if ($companystatic->name == '') {
|
||||||
print '"' . $langs->trans("Bank") . ' - ' . utf8_decode($reflabel) . '"' . $sep;
|
print '"' . $val['bank_account_ref'] . ' - ' . utf8_decode($reflabel) . '"' . $sep;
|
||||||
} else {
|
} else {
|
||||||
print '"' . $langs->trans("Bank") . ' - ' . utf8_decode($companystatic->name) . '"' . $sep;
|
print '"' . $val['bank_account_ref'] . ' - ' . utf8_decode($companystatic->name) . '"' . $sep;
|
||||||
}
|
}
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||||
@ -823,7 +828,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ObjectsRef") . ")</td>";
|
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ObjectsRef") . ")</td>";
|
||||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||||
print "<td>" . $langs->trans("Label") . "</td>";
|
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||||
print "<td>" . $langs->trans("PaymentMode") . "</td>";
|
print "<td>" . $langs->trans("PaymentMode") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -298,7 +298,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]);
|
$bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %';
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
||||||
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
||||||
@ -552,7 +552,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")</td>";
|
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")</td>";
|
||||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||||
print "<td>" . $langs->trans("Label") . "</td>";
|
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -659,7 +659,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// Subledger account
|
// Subledger account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
|
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||||
|
|||||||
@ -151,7 +151,7 @@ if ($result) {
|
|||||||
// Define array to display all VAT rates that use this accounting account $compta_tva
|
// Define array to display all VAT rates that use this accounting account $compta_tva
|
||||||
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
||||||
{
|
{
|
||||||
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
|
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
|
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
|
||||||
@ -224,7 +224,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["refsologest"];
|
||||||
$bookkeeping->date_create = $now;
|
$bookkeeping->date_create = $now;
|
||||||
$bookkeeping->doc_type = 'supplier_invoice';
|
$bookkeeping->doc_type = 'supplier_invoice';
|
||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
@ -272,7 +272,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["refsologest"];
|
||||||
$bookkeeping->date_create = $now;
|
$bookkeeping->date_create = $now;
|
||||||
$bookkeeping->doc_type = 'supplier_invoice';
|
$bookkeeping->doc_type = 'supplier_invoice';
|
||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
@ -326,7 +326,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["refsologest"];
|
||||||
$bookkeeping->date_create = $now;
|
$bookkeeping->date_create = $now;
|
||||||
$bookkeeping->doc_type = 'supplier_invoice';
|
$bookkeeping->doc_type = 'supplier_invoice';
|
||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
@ -335,7 +335,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'');
|
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'');
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
||||||
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
||||||
@ -374,8 +374,8 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
if ($error >= 10)
|
if ($error >= 10)
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
|
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
|
||||||
break; // Break in the foreach
|
break; // Break in the foreach
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -419,7 +419,6 @@ $form = new Form($db);
|
|||||||
// Export
|
// Export
|
||||||
if ($action == 'exportcsv') {
|
if ($action == 'exportcsv') {
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
@ -445,7 +444,7 @@ if ($action == 'exportcsv') {
|
|||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsuppliersologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
|
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||||
@ -465,11 +464,11 @@ if ($action == 'exportcsv') {
|
|||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsuppliersologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
|
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print " " . $sep;
|
print '""' . $sep;
|
||||||
print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
|
print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
|
||||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
@ -478,6 +477,7 @@ if ($action == 'exportcsv') {
|
|||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
$listoftax = array(0, 1, 2);
|
$listoftax = array(0, 1, 2);
|
||||||
foreach ($listoftax as $numtax) {
|
foreach ($listoftax as $numtax) {
|
||||||
@ -489,13 +489,13 @@ if ($action == 'exportcsv') {
|
|||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsuppliersologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
|
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print " " . $sep;
|
print '""' . $sep;
|
||||||
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
|
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
||||||
print '"' . $journal . '"' ;
|
print '"' . $journal . '"' ;
|
||||||
@ -531,15 +531,15 @@ if (empty($action) || $action == 'view') {
|
|||||||
|
|
||||||
// Button to write into Ledger
|
// Button to write into Ledger
|
||||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
|
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
|
||||||
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
|
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
|
||||||
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
}
|
}
|
||||||
print '<div class="tabsAction tabsActionNoBottom">';
|
print '<div class="tabsAction tabsActionNoBottom">';
|
||||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
|
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
|
||||||
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
|
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
||||||
}
|
}
|
||||||
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -565,7 +565,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print "<td></td>";
|
print "<td></td>";
|
||||||
@ -573,7 +573,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
||||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||||
print "<td>" . $langs->trans("Label") . "</td>";
|
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -625,8 +625,9 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
@ -683,7 +684,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// Subledger account
|
// Subledger account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
|
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||||
|
|||||||
@ -156,7 +156,7 @@ if ($result) {
|
|||||||
$compta_localtax2 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
$compta_localtax2 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
||||||
|
|
||||||
// Define array to display all VAT rates that use this accounting account $compta_tva
|
// Define array to display all VAT rates that use this accounting account $compta_tva
|
||||||
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
||||||
{
|
{
|
||||||
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
|
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->subledger_account = '';
|
$bookkeeping->subledger_account = '';
|
||||||
$bookkeeping->subledger_label = '';
|
$bookkeeping->subledger_label = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'');
|
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'');
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt < 0) ? -$mt : 0;
|
$bookkeeping->debit = ($mt < 0) ? -$mt : 0;
|
||||||
@ -392,8 +392,8 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
if ($error >= 10)
|
if ($error >= 10)
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
|
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
|
||||||
break; // Break in the foreach
|
break; // Break in the foreach
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,7 +441,6 @@ $form = new Form($db);
|
|||||||
if ($action == 'exportcsv') {
|
if ($action == 'exportcsv') {
|
||||||
|
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
@ -472,7 +471,7 @@ if ($action == 'exportcsv') {
|
|||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . $sell_journal . '"';
|
print '"' . $journal . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,12 +486,12 @@ if ($action == 'exportcsv') {
|
|||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print " " . $sep;
|
print '""' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . $sell_journal . '"';
|
print '"' . $journal . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,12 +511,12 @@ if ($action == 'exportcsv') {
|
|||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print " " . $sep;
|
print '""' . $sep;
|
||||||
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
|
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . ' %"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . $sell_journal . '"';
|
print '"' . $journal . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -593,7 +592,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
||||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||||
print "<td>" . $langs->trans("Label") . "</td>";
|
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -699,7 +698,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// Subledger account
|
// Subledger account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
|
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||||
|
|||||||
@ -148,7 +148,8 @@ Doctype=Type of document
|
|||||||
Docdate=Date
|
Docdate=Date
|
||||||
Docref=Reference
|
Docref=Reference
|
||||||
Code_tiers=Thirdparty
|
Code_tiers=Thirdparty
|
||||||
Labelcompte=Label account
|
LabelAccount=Label account
|
||||||
|
LabelOperation=Label operation
|
||||||
Sens=Sens
|
Sens=Sens
|
||||||
Codejournal=Journal
|
Codejournal=Journal
|
||||||
NumPiece=Piece number
|
NumPiece=Piece number
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user