Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2017-12-10 21:29:35 +01:00
commit d836d68801
18 changed files with 284 additions and 234 deletions

View File

@ -138,7 +138,6 @@ $form = new Form($db);
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
print "\n".'<script type="text/javascript" language="javascript">'."\n";
print 'jQuery(document).ready(function () {'."\n";
print ' function initfields()'."\n";
@ -187,7 +186,6 @@ print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
/*
* Main Options
*/

View File

@ -160,6 +160,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_date_creation_end = '';
$search_date_modification_start = '';
$search_date_modification_end = '';
$search_debit = '';
$search_credit = '';
}
// Must be after the remove filter action, before the export.
@ -248,6 +250,14 @@ if (! empty($search_date_modification_end)) {
$tmp=dol_getdate($search_date_modification_end);
$param .= '&date_modification_endmonth=' . $tmp['mon'] . '&date_modification_endday=' . $tmp['mday'] . '&date_modification_endyear=' . $tmp['year'];
}
if (! empty($search_debit)) {
$filter['t.debit'] = $search_debit;
$param .= '&search_debit=' . $search_debit;
}
if (! empty($search_credit)) {
$filter['t.credit'] = $search_credit;
$param .= '&search_credit=' . $search_credit;
}
if ($action == 'delbookkeeping') {
@ -507,12 +517,16 @@ if (! empty($arrayfields['t.label_operation']['checked']))
// Debit
if (! empty($arrayfields['t.debit']['checked']))
{
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
print '<input type="text" class="flat" name="search_debit" size="4" value="'.dol_escape_htmltag($search_debit).'">';
print '</td>';
}
// Credit
if (! empty($arrayfields['t.credit']['checked']))
{
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
print '<input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'">';
print '</td>';
}
// Code journal
if (! empty($arrayfields['t.code_journal']['checked']))

View File

@ -7,8 +7,9 @@
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com> MAJ QUADRATUS EXPORT 2015
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@ -43,7 +44,7 @@ class AccountancyExport
/**
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
*/
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
public static $EXPORT_TYPE_CEGID = 2;
public static $EXPORT_TYPE_COALA = 3;
public static $EXPORT_TYPE_BOB50 = 4;
@ -82,7 +83,7 @@ class AccountancyExport
$this->db = &$db;
$this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?"\n":($conf->global->ACCOUNTING_EXPORT_ENDLINE==1?"\n":"\r\n");
$this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?"\n":($conf->global->ACCOUNTING_EXPORT_ENDLINE==1?"\n":"\r\n");
}
/**
@ -104,70 +105,70 @@ class AccountancyExport
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'),
);
);
}
/**
* Array with all export type available (key + label) and parameters for config
*
* @return array of type
*/
public static function getTypeConfig() {
global $conf, $langs;
/**
* Array with all export type available (key + label) and parameters for config
*
* @return array of type
*/
public static function getTypeConfig() {
global $conf, $langs;
return array (
'param' => array(
self::$EXPORT_TYPE_NORMAL => array(
'label' => $langs->trans('Modelcsv_normal'),
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
),
self::$EXPORT_TYPE_CEGID => array(
'label' => $langs->trans('Modelcsv_CEGID'),
),
self::$EXPORT_TYPE_COALA => array(
'label' => $langs->trans('Modelcsv_COALA'),
),
self::$EXPORT_TYPE_BOB50 => array(
'label' => $langs->trans('Modelcsv_bob50'),
),
self::$EXPORT_TYPE_CIEL => array(
'label' => $langs->trans('Modelcsv_ciel'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_QUADRATUS => array(
'label' => $langs->trans('Modelcsv_quadratus'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_EBP => array(
'label' => $langs->trans('Modelcsv_ebp'),
),
self::$EXPORT_TYPE_COGILOG => array(
'label' => $langs->trans('Modelcsv_cogilog'),
),
self::$EXPORT_TYPE_AGIRIS => array(
'label' => $langs->trans('Modelcsv_agiris'),
),
self::$EXPORT_TYPE_CONFIGURABLE => array(
'label' => $langs->trans('Modelcsv_configurable'),
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
),
),
'cr'=> array (
'1' => $langs->trans("Unix"),
'2' => $langs->trans("Windows")
),
'format' => array (
'csv' => $langs->trans("csv"),
'txt' => $langs->trans("txt")
),
);
}
return array (
'param' => array(
self::$EXPORT_TYPE_NORMAL => array(
'label' => $langs->trans('Modelcsv_normal'),
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
),
self::$EXPORT_TYPE_CEGID => array(
'label' => $langs->trans('Modelcsv_CEGID'),
),
self::$EXPORT_TYPE_COALA => array(
'label' => $langs->trans('Modelcsv_COALA'),
),
self::$EXPORT_TYPE_BOB50 => array(
'label' => $langs->trans('Modelcsv_bob50'),
),
self::$EXPORT_TYPE_CIEL => array(
'label' => $langs->trans('Modelcsv_ciel'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_QUADRATUS => array(
'label' => $langs->trans('Modelcsv_quadratus'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_EBP => array(
'label' => $langs->trans('Modelcsv_ebp'),
),
self::$EXPORT_TYPE_COGILOG => array(
'label' => $langs->trans('Modelcsv_cogilog'),
),
self::$EXPORT_TYPE_AGIRIS => array(
'label' => $langs->trans('Modelcsv_agiris'),
),
self::$EXPORT_TYPE_CONFIGURABLE => array(
'label' => $langs->trans('Modelcsv_configurable'),
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
),
),
'cr'=> array (
'1' => $langs->trans("Unix"),
'2' => $langs->trans("Windows")
),
'format' => array (
'csv' => $langs->trans("csv"),
'txt' => $langs->trans("txt")
),
);
}
/**
* Download the export
@ -218,7 +219,7 @@ class AccountancyExport
case self::$EXPORT_TYPE_AGIRIS :
$this->exportAgiris($TData);
break;
case self::$EXPORT_TYPE_CONFIGURABLE :
case self::$EXPORT_TYPE_CONFIGURABLE :
$this->exportConfigurable($TData);
break;
default:
@ -261,8 +262,8 @@ class AccountancyExport
public function exportCegid($objectLines) {
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
$separator = ";";
$end_line = "\n";
$separator = ";";
$end_line = "\n";
print $date . $separator;
print $line->code_journal . $separator;
@ -286,8 +287,8 @@ class AccountancyExport
public function exportCogilog($objectLines) {
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
$separator = ";";
$end_line = "\n";
$separator = ";";
$end_line = "\n";
print $line->code_journal . $separator;
print $date . $separator;
@ -318,8 +319,8 @@ class AccountancyExport
*/
public function exportCoala($objectLines) {
// Coala export
$separator = ";";
$end_line = "\n";
$separator = ";";
$end_line = "\n";
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
@ -346,8 +347,8 @@ class AccountancyExport
public function exportBob50($objectLines) {
// Bob50
$separator = ";";
$end_line = "\n";
$separator = ";";
$end_line = "\n";
foreach ( $objectLines as $line ) {
print $line->piece_num . $separator;
@ -426,7 +427,7 @@ class AccountancyExport
$end_line ="\r\n";
//elarifr we should use dol_now function not time however this is wrong date to transfert in accounting
//We should use dol_now function not time however this is wrong date to transfert in accounting
//$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
//$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
foreach ( $TData as $data ) {
@ -440,7 +441,7 @@ class AccountancyExport
$Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
$Tab['folio'] = '000';
//elarifr we use invoice date $data->doc_date not $date_ecriture which is the transfert date
//We use invoice date $data->doc_date not $date_ecriture which is the transfert date
//maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ?
//$Tab['date_ecriture'] = $date_ecriture;
$Tab['date_ecriture'] = dol_print_date($data->doc_date, '%d%m%y');
@ -507,7 +508,7 @@ class AccountancyExport
public function exportEbp($objectLines) {
$separator = ',';
$end_line = "\n";
$end_line = "\n";
foreach ( $objectLines as $line ) {
@ -539,7 +540,7 @@ class AccountancyExport
public function exportAgiris($objectLines) {
$separator = ';';
$end_line = "\n";
$end_line = "\n";
foreach ( $objectLines as $line ) {
@ -566,35 +567,35 @@ class AccountancyExport
}
}
/**
* Export format : Configurable
*
* @param array $objectLines data
*
* @return void
*/
public function exportConfigurable($objectLines) {
global $conf;
/**
* Export format : Configurable
*
* @param array $objectLines data
*
* @return void
*/
public function exportConfigurable($objectLines) {
global $conf;
foreach ($objectLines as $line) {
$tab = array();
// export configurable
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$tab[] = $line->piece_num;
$tab[] = $date;
$tab[] = $line->doc_ref;
$tab[] = $line->label_operation;
$tab[] = length_accountg($line->numero_compte);
$tab[] = length_accounta($line->subledger_account);
$tab[] = price($line->debit);
$tab[] = price($line->credit);
$tab[] = price($line->montant);
$tab[] = $line->code_journal;
foreach ($objectLines as $line) {
$tab = array();
// export configurable
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$tab[] = $line->piece_num;
$tab[] = $date;
$tab[] = $line->doc_ref;
$tab[] = $line->label_operation;
$tab[] = length_accountg($line->numero_compte);
$tab[] = length_accounta($line->subledger_account);
$tab[] = price($line->debit);
$tab[] = price($line->credit);
$tab[] = price($line->montant);
$tab[] = $line->code_journal;
$separator = $this->separator;
print implode($separator, $tab) . $this->end_line;
}
}
$separator = $this->separator;
print implode($separator, $tab) . $this->end_line;
}
}
/**

View File

@ -536,12 +536,12 @@ if (empty($action) || $action == 'view') {
// Button to write into Ledger
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print '<br>'.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 '<br>'.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 '<div class="tabsAction tabsActionNoBottom">';
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-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 {
if ($in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
@ -571,7 +571,7 @@ if (empty($action) || $action == 'view') {
print '<br>';
$i = 0;
print '<div class="div-table-responsive">';
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* 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
@ -266,12 +266,12 @@ class PaymentVarious extends CommonObject
$this->fk_user_modif='';
}
/**
* Create in database
*
* @param User $user User that create
* @return int <0 if KO, >0 if OK
*/
/**
* Create in database
*
* @param User $user User that create
* @return int <0 if KO, >0 if OK
*/
function create($user)
{
global $conf,$langs;
@ -338,6 +338,7 @@ class PaymentVarious extends CommonObject
if ($this->note) $sql.= ", '".$this->db->escape($this->note)."'";
$sql.= ", '".$this->db->escape($this->label)."'";
$sql.= ", '".$this->db->escape($this->accountancy_code)."'";
$sql.= ", ".($this->fk_project > 0? $this->fk_project : 0);
$sql.= ", ".$user->id;
$sql.= ", '".$this->db->idate($now)."'";
$sql.= ", NULL";
@ -407,10 +408,10 @@ class PaymentVarious extends CommonObject
}
}
// Call trigger
$result=$this->call_trigger('PAYMENT_VARIOUS_CREATE',$user);
if ($result < 0) $error++;
// End call triggers
// Call trigger
$result=$this->call_trigger('PAYMENT_VARIOUS_CREATE',$user);
if ($result < 0) $error++;
// End call triggers
}
else $error++;
@ -437,8 +438,8 @@ class PaymentVarious extends CommonObject
/**
* Update link between payment various and line generate into llx_bank
*
* @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK
* @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK
*/
function update_fk_bank($id_bank)
{
@ -517,18 +518,18 @@ class PaymentVarious extends CommonObject
/**
* Send name clicable (with possibly the picto)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option link option
* @return string Chaine with URL
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option link option
* @return string Chaine with URL
*/
function getNomUrl($withpicto=0,$option='')
{
global $langs;
$result='';
$label=$langs->trans("ShowVariousPayment").': '.$this->ref;
$label=$langs->trans("ShowVariousPayment").': '.$this->ref;
$linkstart = '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkstart = '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend='</a>';
$result .= $linkstart;
@ -542,8 +543,8 @@ class PaymentVarious extends CommonObject
/**
* Information on record
*
* @param int $id Id of record
* @return void
* @param int $id Id of record
* @return void
*/
function info($id)
{

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* 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
@ -16,9 +16,9 @@
*/
/**
* \file htdocs/compta/bank/various_expenses/card.php
* \ingroup bank
* \brief Page of various expenses
* \file htdocs/compta/bank/various_expenses/card.php
* \ingroup bank
* \brief Page of various expenses
*/
require '../../../main.inc.php';
@ -40,8 +40,8 @@ $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
// Get parameters
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
$accountid=GETPOST("accountid") > 0 ? GETPOST("accountid","int") : 0;
$label=GETPOST("label","alpha");

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* 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
@ -17,9 +17,9 @@
*/
/**
* \file htdocs/compta/bank/various_payment/document.php
* \ingroup banque
* \brief Page of linked files onto various_payment
* \file htdocs/compta/bank/various_payment/document.php
* \ingroup bank
* \brief Page of linked files onto various payment
*/
require '../../../main.inc.php';
@ -28,9 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
$langs->load("other");
$langs->load("bank");
$langs->load("companies");
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
$id = GETPOST('id','int');
$ref = GETPOST('ref', 'alpha');
@ -38,9 +36,9 @@ $action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha');
// Security check
$socid = GETPOST("socid","int");
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'salaries', $id, '');
$result = restrictedArea($user, 'banque', '', '', '');
// Get parameters
$sortfield = GETPOST('sortfield','alpha');
@ -74,8 +72,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
$form = new Form($db);
llxHeader("",$langs->trans("VariousPayment"));
$title = $langs->trans("VariousPayment") . ' - ' . $langs->trans("Documents");
$help_url = '';
llxHeader("",$title,$help_url);
if ($object->id)
{
@ -83,6 +82,46 @@ if ($object->id)
dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), 0, 'payment');
$morehtmlref='<div class="refidno">';
// Project
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->tax->charges->creer)
{
if ($action != 'classify')
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref.='<input type="hidden" name="action" value="classin">';
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
$morehtmlref.='</form>';
} else {
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
}
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
$morehtmlref.=$proj->ref;
$morehtmlref.='</a>';
} else {
$morehtmlref.='';
}
}
}
$morehtmlref.='</div>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
// Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
@ -92,30 +131,22 @@ if ($object->id)
$totalsize+=$file['size'];
}
print '<table class="border" width="100%">';
print '<table class="border" width="100%">';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
print '</div>';
// Ref
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '</td></tr>';
print '<div class="clearboth"></div>';
// Societe
//print "<tr><td>".$langs->trans("Company")."</td><td>".$object->client->getNomUrl(1)."</td></tr>";
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';
print '</div>';
$modulepart = 'banque';
$permission = $user->rights->banque->modifier;
$param = '&id=' . $object->id;
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
dol_fiche_end();
$modulepart = 'banque';
$permission = $user->rights->banque->modifier;
$param = '&id=' . $object->id;
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
}
else
{

View File

@ -17,9 +17,9 @@
*/
/**
* \file htdocs/compta/bank/various_payment/index.php
* \ingroup bank
* \brief List of various payments
* \file htdocs/compta/bank/various_payment/index.php
* \ingroup bank
* \brief List of various payments
*/
require '../../../main.inc.php';
@ -92,7 +92,7 @@ $form = new Form($db);
$variousstatic = new PaymentVarious($db);
$accountstatic = new Account($db);
$sql = "SELECT v.rowid, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code,";
$sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code,";
$sql.= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number as bank_account_number, ba.fk_accountancy_journal as accountancy_journal, ba.label as blabel,";
$sql.= " pst.code as payment_code";
$sql.= " FROM ".MAIN_DB_PREFIX."payment_various as v";
@ -102,9 +102,9 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.row
$sql.= " WHERE v.entity IN (".getEntity('payment_various').")";
// Search criteria
if ($search_ref) $sql.=" AND v.rowid=".$search_ref;
if ($search_label) $sql.=natural_search(array('v.label'), $search_label);
if ($search_amount_deb) $sql.=natural_search("v.amount", $search_amount_deb, 1);
if ($search_ref) $sql.=" AND v.rowid=".$search_ref;
if ($search_label) $sql.=natural_search(array('v.label'), $search_label);
if ($search_amount_deb) $sql.=natural_search("v.amount", $search_amount_deb, 1);
if ($search_amount_cred) $sql.=natural_search("v.amount", $search_amount_cred, 1);
if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account;
if ($filtre) {

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* 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
@ -16,9 +16,9 @@
*/
/**
* \file htdocs/compta/bank/various_payment/info.php
* \ingroup salaries
* \brief Page with info about salaries contribution
* \file htdocs/compta/bank/various_payment/info.php
* \ingroup bank
* \brief Page with info about various payment
*/
require '../../../main.inc.php';
@ -26,18 +26,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load("compta");
$langs->load("bills");
$langs->load("salaries");
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
$id=GETPOST('id','int');
$action=GETPOST('action','aZ09');
// Security check
$socid = GETPOST('socid','int');
$socid = GETPOST("socid","int");
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'salaries', '', '', '');
$result = restrictedArea($user, 'banque', '', '', '');
/*
* View

View File

@ -1356,7 +1356,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/holiday/list.php?leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm');
$newmenu->add("/holiday/card.php?action=request", $langs->trans("New"), 1,$user->rights->holiday->write);
$newmenu->add("/holiday/list.php?leftmenu=hrm", $langs->trans("List"), 1,$user->rights->holiday->read);
$newmenu->add("/holiday/list.php?select_statut=2&leftmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=1&leftmenu=hrm", $langs->trans("DraftCP"), 2, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=2&leftmenu=hrm", $langs->trans("ToReviewCP"), 2, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=3&leftmenu=hrm", $langs->trans("ApprovedCP"), 2, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=4&leftmenu=hrm", $langs->trans("CancelCP"), 2, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=5&leftmenu=hrm", $langs->trans("RefuseCP"), 2, $user->rights->holiday->read);
$newmenu->add("/holiday/define_holiday.php?action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->read);
$newmenu->add("/holiday/view_log.php?action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->define_holiday);
}
@ -1378,7 +1382,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/expensereport/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport');
$newmenu->add("/expensereport/card.php?action=create&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer);
$newmenu->add("/expensereport/list.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire);
$newmenu->add("/expensereport/list.php?search_status=2&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="expensereport") $newmenu->add("/expensereport/list.php?search_status=0&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Draft"), 2, $user->rights->expensereport->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="expensereport") $newmenu->add("/expensereport/list.php?search_status=2&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Validated"), 2, $user->rights->expensereport->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="expensereport") $newmenu->add("/expensereport/list.php?search_status=5&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Approved"), 2, $user->rights->expensereport->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="expensereport") $newmenu->add("/expensereport/list.php?search_status=6&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Paid"), 2, $user->rights->expensereport->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="expensereport") $newmenu->add("/expensereport/list.php?search_status=4&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Canceled"), 2, $user->rights->expensereport->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="expensereport") $newmenu->add("/expensereport/list.php?search_status=99&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Refused"), 2, $user->rights->expensereport->lire);
$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire);
}

View File

@ -4,7 +4,7 @@
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com>
-- Copyright (C) 2015-2017 Juanjo Menent <jmenent@2byte.es>
--
@ -29,7 +29,7 @@
--
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('VT', 'Sale Journal', 2, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('AC', 'Purhcase Journal', 3, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('AC', 'Purchase Journal', 3, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('BQ', 'Bank Journal', 4, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('OD', 'Other Journal', 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('AN', 'Has new Journal', 9, 1);

View File

@ -120,7 +120,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7116,'PCG','IMMO','XXXXXX','2351',7115,'Mobilier de bureau','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7117,'PCG','IMMO','XXXXXX','2352',7115,'Matériel de bureau','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7118,'PCG','IMMO','XXXXXX','2355',7115,'Matériel Informatique','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7119,'PCG','IMMO','XXXXXX','2356',7115,'Agencement, installations et aménagements divers (de biens n'appartenant pas à l''entreprise)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7119,'PCG','IMMO','XXXXXX','2356',7115,'Agencement, installations et aménagements divers (de biens n''appartenant pas à l''entreprise)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7120,'PCG','IMMO','XXXXXX','2358',7115,'Autres mobiliers, matériel de bureau et aménagements divers','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7121,'PCG','IMMO','XXXXXX','238',7090,'Autres immobilisations corporelles','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7122,'PCG','IMMO','XXXXXX','239',7090,'Immobilisations corporelles en cours','1');
@ -648,7 +648,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7644,'PCG','EXPENSE','XXXXXX','6581',7643,'Pénalités sur marchés et dédits','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7645,'PCG','EXPENSE','XXXXXX','65811',7644,'Pénalités sur marchés','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7646,'PCG','EXPENSE','XXXXXX','65812',7644,'Dédits','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7647,'PCG','EXPENSE','XXXXXX','6582',7643,'Rappels d''impôts (autres qu'impôts sur les résultats)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7647,'PCG','EXPENSE','XXXXXX','6582',7643,'Rappels d''impôts (autres qu''impôts sur les résultats)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7648,'PCG','EXPENSE','XXXXXX','6583',7643,'Pénalités et amendes fiscales ou pénales','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7649,'PCG','EXPENSE','XXXXXX','65831',7648,'Pénalités et amendes fiscales ou pénales','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7650,'PCG','EXPENSE','XXXXXX','65833',7648,'Pénalités et amendes pénales','1');
@ -806,7 +806,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7802,'PCG','INCOME','XXXXXX','7581',7801,'Pénalités et dédits reçus','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7803,'PCG','INCOME','XXXXXX','75811',7802,'Pénalités reçus sur marché','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7804,'PCG','INCOME','XXXXXX','75812',7802,'Dédits reçus','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7805,'PCG','INCOME','XXXXXX','7582',7801,'Dégrèvements d''impôts (autres qu'impôts sur résultat)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7805,'PCG','INCOME','XXXXXX','7582',7801,'Dégrèvements d''impôts (autres qu''impôts sur résultat)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7806,'PCG','INCOME','XXXXXX','7585',7801,'Rentrées sur créances soldées','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7807,'PCG','INCOME','XXXXXX','7586',7801,'Dons, libéralités et lots reçus','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7808,'PCG','INCOME','XXXXXX','75861',7807,'Dons','1');
@ -833,11 +833,11 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7829,'PCG','INCOME','XXXXXX','7597',7812,'Transfert de charges non courantes','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7830,'PCG','INCOME','XXXXXX','7598',7812,'Reprises non courantes des exercices antérieurs','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7831,'PCG','RESU','XXXXXX','8','','Comptes de résultats','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7832,'PCG','RESU','XXXXXX','81',7831,'Résultat s'exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7832,'PCG','RESU','XXXXXX','81',7831,'Résultat d''exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7833,'PCG','RESU','XXXXXX','811',7832,'Marge brute','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7834,'PCG','RESU','XXXXXX','814',7832,'Valeur ajoutée','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7835,'PCG','RESU','XXXXXX','817',7832,'Excédent brut s'exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7836,'PCG','RESU','XXXXXX','8171',7835,'Excédent brut s'exploitation (créditeur)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7835,'PCG','RESU','XXXXXX','817',7832,'Excédent brut d''exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7836,'PCG','RESU','XXXXXX','8171',7835,'Excédent brut d''exploitation (créditeur)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7837,'PCG','RESU','XXXXXX','8179',7835,'Insuffusance brute d''exploitation (débiteur)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7838,'PCG','RESU','XXXXXX','83',7831,'Résultat financier','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7839,'PCG','RESU','XXXXXX','84',7831,'Résultat courant','1');

View File

@ -541,8 +541,8 @@ INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype,
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9536,'PCT','INCOME','XXXXXX','7','','Produits','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9537,'PCT','INCOME','XXXXXX','70',9536,'Ventes de produits fabriqués, prestations de services, marchandises','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9538,'PCT','INCOME','XXXXXX','701',9537,'Ventes de produits finis','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9539,'PCT','INCOME','XXXXXX','7011',,'Produits finis achevés','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9540,'PCT','INCOME','XXXXXX','7012',,'Produits finis non achevés (contrat de longue durée)','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9539,'PCT','INCOME','XXXXXX','7011','','Produits finis achevés','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9540,'PCT','INCOME','XXXXXX','7012','','Produits finis non achevés (contrat de longue durée)','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9541,'PCT','INCOME','XXXXXX','702',9537,'Ventes de produits intermédiaires','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9542,'PCT','INCOME','XXXXXX','703',9537,'Ventes de produits résiduels','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9543,'PCT','INCOME','XXXXXX','704',9537,'Travaux','1');

View File

@ -26,22 +26,22 @@
-- Coef expense
--
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (1,4, 1, 0.41, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (2,4, 2, 0.244, 824);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (3,4, 3, 0.286, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (1,4, 1, 0.41, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (2,4, 2, 0.244, 824);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (3,4, 3, 0.286, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (4,5, 4, 0.493, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (5,5, 5, 0.277, 1082);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (6,5, 6, 0.332, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (4,5, 4, 0.493, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (5,5, 5, 0.277, 1082);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (6,5, 6, 0.332, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (7,6, 7, 0.543, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (8,6, 8, 0.305, 1180);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (9,6, 9, 0.364, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (7,6, 7, 0.543, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (8,6, 8, 0.305, 1180);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (9,6, 9, 0.364, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (10,7, 10, 0.568, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (11,7, 11, 0.32, 1244);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (12,7, 12, 0.382, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (10,7, 10, 0.568, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (11,7, 11, 0.32, 1244);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (12,7, 12, 0.382, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (13,8, 13, 0.595, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (14,8, 14, 0.337, 1288);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (15,8, 15, 0.401, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (13,8, 13, 0.595, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (14,8, 14, 0.337, 1288);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (15,8, 15, 0.401, 0);

View File

@ -50,7 +50,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp
journal_label varchar(255), -- FEC:JournalLib
piece_num integer NOT NULL, -- FEC:EcritureNum
validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification)
date_validated datetime -- FEC:ValidDate
date_validated datetime, -- FEC:ValidDate
import_key varchar(14),
extraparams varchar(255) -- for other parameters with json format
) ENGINE=innodb;

View File

@ -26,7 +26,7 @@ CREATE TABLE llx_blockedlog
amounts double(24,8) NOT NULL,
element varchar(50),
fk_user integer,
user_fullname varchar(255);
user_fullname varchar(255),
fk_object integer,
ref_object varchar(255),
date_object datetime,

View File

@ -26,7 +26,7 @@ create table llx_user
ref_ext varchar(50), -- reference into an external system (not used by dolibarr)
ref_int varchar(50), -- reference into an internal system (deprecated)
employee tinyint DEFAULT 1, -- 1 if user is an employee
employee tinyint DEFAULT 1, -- 1 if user is an employee
fk_establishment integer DEFAULT 0,
datec datetime,
@ -34,21 +34,21 @@ create table llx_user
fk_user_creat integer,
fk_user_modif integer,
login varchar(50) NOT NULL,
pass_encoding varchar(24);
pass_encoding varchar(24),
pass varchar(128),
pass_crypted varchar(128),
pass_temp varchar(128), -- temporary password when asked for forget password
pass_temp varchar(128), -- temporary password when asked for forget password
api_key varchar(128), -- key to use REST API by this user
gender varchar(10),
civility varchar(6),
lastname varchar(50),
firstname varchar(50),
address varchar(255), -- user personal address
zip varchar(25), -- zipcode
town varchar(50), -- town
fk_state integer DEFAULT 0, --
fk_country integer DEFAULT 0, --
birth date, -- birthday
address varchar(255), -- user personal address
zip varchar(25), -- zipcode
town varchar(50), -- town
fk_state integer DEFAULT 0,
fk_country integer DEFAULT 0,
birth date, -- birthday
job varchar(128),
skype varchar(255),
office_phone varchar(20),
@ -62,7 +62,7 @@ create table llx_user
fk_soc integer,
fk_socpeople integer,
fk_member integer,
fk_user integer, -- Hierarchic parent
fk_user integer, -- Hierarchic parent
note_public text,
note text DEFAULT NULL,
model_pdf varchar(255) DEFAULT NULL,
@ -72,22 +72,22 @@ create table llx_user
ldap_sid varchar(255) DEFAULT NULL,
openid varchar(255),
statut tinyint DEFAULT 1,
photo varchar(255), -- filename or url of photo
photo varchar(255), -- filename or url of photo
lang varchar(6),
color varchar(6),
barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0,
accountancy_code varchar(32) NULL,
nb_holiday integer DEFAULT 0,
nb_holiday integer DEFAULT 0,
thm double(24,8),
tjm double(24,8),
salary double(24,8), -- denormalized value coming from llx_user_employment
salaryextra double(24,8), -- denormalized value coming from llx_user_employment
dateemployment date, -- denormalized value coming from llx_user_employment
weeklyhours double(16,8), -- denormalized value coming from llx_user_employment
salary double(24,8), -- denormalized value coming from llx_user_employment
salaryextra double(24,8), -- denormalized value coming from llx_user_employment
dateemployment date, -- denormalized value coming from llx_user_employment
weeklyhours double(16,8), -- denormalized value coming from llx_user_employment
import_key varchar(14), -- import key
import_key varchar(14), -- import key
default_range integer,
default_c_exp_tax_cat integer
)ENGINE=innodb;

View File

@ -244,7 +244,6 @@ ErrorAccountingJournalIsAlreadyUse=This journal is already use
## Export
ExportDraftJournal=Export draft journal
Modelcsv=Model of export
OptionsDeactivatedForThisExportModel=For this export model, options are deactivated
Selectmodelcsv=Select a model of export
Modelcsv_normal=Classic export
Modelcsv_CEGID=Export towards CEGID Expert Comptabilité
@ -254,7 +253,7 @@ Modelcsv_ciel=Export towards Sage Ciel Compta or Compta Evolution
Modelcsv_quadratus=Export towards Quadratus QuadraCompta
Modelcsv_ebp=Export towards EBP
Modelcsv_cogilog=Export towards Cogilog
Modelcsv_agiris=Export towards Agiris (Test)
Modelcsv_agiris=Export towards Agiris
Modelcsv_configurable=Export Configurable
ChartofaccountsId=Chart of accounts Id