Merge remote-tracking branch 'origin/3.9' into develop

Conflicts:
	htdocs/accountancy/bookkeeping/listbyyear.php
	htdocs/accountancy/journal/bankjournal.php
	htdocs/compta/facture/list.php
	htdocs/filefunc.inc.php
	htdocs/fourn/facture/list.php
	htdocs/install/mysql/migration/3.9.0-4.0.0.sql
	htdocs/projet/activity/index.php
This commit is contained in:
Laurent Destailleur 2016-03-02 23:40:11 +01:00
commit 3a58613e45
50 changed files with 466 additions and 352 deletions

View File

@ -148,9 +148,9 @@ $FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
$ARCH='noarch'; $ARCH='noarch';
$newbuild = $BUILD; $newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev (fedora) $newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev (fedora)
$newbuild =~ s/beta/0.2.beta1/gi; # beta (fedora) $newbuild =~ s/beta(.?)/0.2.beta/gi; # beta (fedora) (we want beta1, beta2, betax to be same package name)
$newbuild =~ s/rc./0.3.rc1/gi; # rc (fedora) $newbuild =~ s/rc(.?)/0.3.rc/gi; # rc (fedora) (we want rc1, rc2, rcx to be same package name)
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale (fedora) if ($newbuild !~ /-/) { $newbuild.='-0.4'; } # finale (fedora)
#$newbuild =~ s/(dev|alpha)/0/gi; # dev #$newbuild =~ s/(dev|alpha)/0/gi; # dev
#$newbuild =~ s/beta/1/gi; # beta #$newbuild =~ s/beta/1/gi; # beta
#$newbuild =~ s/rc./2/gi; # rc #$newbuild =~ s/rc./2/gi; # rc
@ -162,10 +162,10 @@ $FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
# For Deb # For Deb
$newbuild = $BUILD; $newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/1/gi; # dev $newbuild =~ s/(dev|alpha)/1/gi; # dev
$newbuild =~ s/beta/2/gi; # beta $newbuild =~ s/beta(.?)/2/gi; # beta (we want beta1, beta2, betax to be same package name)
$newbuild =~ s/rc./3/gi; # rc $newbuild =~ s/rc(.?)/3/gi; # rc (we want rc1, rc2, rcx to be same package name)
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale is same than rc. if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
# now newbuild is 0-1 or 0-3 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management # now newbuild is 0-1 or 0-4 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
$build = $newbuild; $build = $newbuild;
$build =~ s/-.*$//g; $build =~ s/-.*$//g;
# now build is 0 for example # now build is 0 for example

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* 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
@ -18,7 +18,7 @@
/** /**
* \file htdocs/accountancy/admin/account.php * \file htdocs/accountancy/admin/account.php
* \ingroup Accounting Expert * \ingroup Advanced accountancy
* \brief List accounting account * \brief List accounting account
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -104,10 +104,12 @@ llxHeader('', $langs->trans("ListAccounts"));
$pcgver = $conf->global->CHARTOFACCOUNTS; $pcgver = $conf->global->CHARTOFACCOUNTS;
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active "; $sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active, ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa, " . MAIN_DB_PREFIX . "accounting_system as asy"; $sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
$sql .= " WHERE aa.fk_pcg_version = asy.pcg_version"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
$sql .= " AND asy.rowid = " . $pcgver; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON aa.account_parent = a2.rowid";
$sql .= " WHERE asy.rowid = " . $pcgver;
if (strlen(trim($search_account))) { if (strlen(trim($search_account))) {
$sql .= " AND aa.account_number like '%" . $search_account . "%'"; $sql .= " AND aa.account_number like '%" . $search_account . "%'";
@ -175,6 +177,7 @@ if ($result) {
$var = false; $var = false;
$accountstatic = new AccountingAccount($db); $accountstatic = new AccountingAccount($db);
$accountparent = new AccountingAccount($db);
while ( $i < min($num, $limit) ) { while ( $i < min($num, $limit) ) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
@ -186,7 +189,19 @@ if ($result) {
print '<tr ' . $bc[$var] . '>'; print '<tr ' . $bc[$var] . '>';
print '<td>' . $accountstatic->getNomUrl(1) . '</td>'; print '<td>' . $accountstatic->getNomUrl(1) . '</td>';
print '<td>' . $obj->label . '</td>'; print '<td>' . $obj->label . '</td>';
print '<td>' . $obj->account_parent . '</td>';
if ($obj->account_parent)
{
$accountparent->id = $obj->rowid2;
$accountparent->label = $obj->label2;
$accountparent->account_number = $obj->account_number2;
print '<td>' . $accountparent->getNomUrl(1) . '</td>';
}
else
{
print '<td>&nbsp;</td>';
}
print '<td>' . $obj->pcg_type . '</td>'; print '<td>' . $obj->pcg_type . '</td>';
print '<td>' . $obj->pcg_subtype . '</td>'; print '<td>' . $obj->pcg_subtype . '</td>';
print '<td>'; print '<td>';

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* 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
@ -19,12 +19,13 @@
/** /**
* \file htdocs/accountancy/bookkeeping/card.php * \file htdocs/accountancy/bookkeeping/card.php
* \ingroup Accounting Expert * \ingroup Advanced accountancy
* \brief Page to show account * \brief Page to show book-entry
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
// Class // Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
@ -190,6 +191,9 @@ else if ($action == "confirm_create") {
} }
} }
/*
* View
*/
llxHeader(); llxHeader();
$html = new Form($db); $html = new Form($db);
@ -237,29 +241,32 @@ if ($action == 'create') {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr>'; print '<tr>';
print '<td>' . $langs->trans("NumMvts") . '</td>'; print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
print '<td>' . $next_num_mvt . '</td>'; print '<td>' . $next_num_mvt . '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>' . $langs->trans("Docdate") . '</td>'; print '<td>' . $langs->trans("Docdate") . '</td>';
print '<td>'; print '<td>';
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>' . $langs->trans("Codejournal") . '</td>'; print '<td>' . $langs->trans("Codejournal") . '</td>';
print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>'; print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>' . $langs->trans("Docref") . '</td>'; print '<td>' . $langs->trans("Docref") . '</td>';
print '<td><input type="text" size="20" name="doc_ref" value=""/></td>'; print '<td><input type="text" size="20" name="doc_ref" value=""/></td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>' . $langs->trans("Doctype") . '</td>'; print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td><input type="text" size="20" name="doc_type" value=""/></td>'; print '<td><input type="text" size="20" name="doc_type" value=""/></td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
dol_fiche_end(); dol_fiche_end();
@ -281,7 +288,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr class="pair">'; print '<tr class="pair">';
print '<td>' . $langs->trans("NumMvts") . '</td>'; print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
print '<td>' . $book->piece_num . '</td>'; print '<td>' . $book->piece_num . '</td>';
print '</tr>'; print '</tr>';
print '<tr class="impair">'; print '<tr class="impair">';
@ -301,6 +308,7 @@ if ($action == 'create') {
print '<td>' . $book->doc_type . '</td>'; print '<td>' . $book->doc_type . '</td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
print '<br />';
$result = $book->fetch_all_per_mvt($piece_num); $result = $book->fetch_all_per_mvt($piece_num);
if ($result < 0) { if ($result < 0) {
@ -328,11 +336,11 @@ if ($action == 'create') {
print_liste_field_titre($langs->trans("Numerocompte")); print_liste_field_titre($langs->trans("Numerocompte"));
print_liste_field_titre($langs->trans("Code_tiers")); print_liste_field_titre($langs->trans("Code_tiers"));
print_liste_field_titre($langs->trans("Labelcompte")); print_liste_field_titre($langs->trans("Labelcompte"));
print_liste_field_titre($langs->trans("Debit")); print_liste_field_titre($langs->trans("Debit"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Credit")); print_liste_field_titre($langs->trans("Credit"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Amount")); print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Sens")); print_liste_field_titre($langs->trans("Sens"), "", "", "", "", 'align="center"');
print_liste_field_titre(''); print_liste_field_titre($langs->trans("Action"), "", "", "", "", 'width="60" align="center"');
print "</tr>\n"; print "</tr>\n";
@ -352,24 +360,24 @@ if ($action == 'create') {
print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers', 1); print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers', 1);
print '</td>'; print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>'; print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="6" name="debit" value="' . price($line->debit) . '"/></td>'; print '<td align="right"><input type="text" size="6" name="debit" value="' . price($line->debit) . '"/></td>';
print '<td><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>'; print '<td align="right"><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>';
print '<td>' . $line->montant . '</td>'; print '<td align="right">' . price($line->montant) . '</td>';
print '<td>' . $line->sens . '</td>'; print '<td align="center">' . $line->sens . '</td>';
print '<td>'; print '<td>';
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n"; print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">'; print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
print '</td>'; print '</td>';
} else { } else {
print '<td>' . $line->numero_compte . '</td>'; print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $line->code_tiers . '</td>'; print '<td>' . length_accounta($line->code_tiers) . '</td>';
print '<td>' . $line->label_compte . '</td>'; print '<td>' . $line->label_compte . '</td>';
print '<td>' . $line->debit . '</td>'; print '<td align="right">' . price($line->debit) . '</td>';
print '<td>' . $line->credit . '</td>'; print '<td align="right">' . price($line->credit) . '</td>';
print '<td>' . $line->montant . '</td>'; print '<td align="right">' . price($line->montant) . '</td>';
print '<td>' . $line->sens . '</td>'; print '<td align="center">' . $line->sens . '</td>';
print '<td>'; print '<td align="center">';
print '<a href="./card.php?action=update&amp;id=' . $line->id . '&amp;piece_num=' . $line->piece_num . '">'; print '<a href="./card.php?action=update&amp;id=' . $line->id . '&amp;piece_num=' . $line->piece_num . '">';
print img_edit(); print img_edit();
print '</a>&nbsp;'; print '</a>&nbsp;';
@ -400,8 +408,8 @@ if ($action == 'create') {
print $formventilation->select_auxaccount($code_tiers, 'code_tiers', 1); print $formventilation->select_auxaccount($code_tiers, 'code_tiers', 1);
print '</td>'; print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></td>'; print '<td><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></td>';
print '<td><input type="text" size="6" name="debit" value="' . price($debit) . '"/></td>'; print '<td align="right"><input type="text" size="6" name="debit" value="' . price($debit) . '"/></td>';
print '<td><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>'; print '<td align="right"><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
print '<td></td>'; print '<td></td>';
print '<td></td>'; print '<td></td>';
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '"></td>'; print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '"></td>';

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* 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
@ -20,7 +20,7 @@
/** /**
* \file htdocs/accountancy/bookkeeping/list.php * \file htdocs/accountancy/bookkeeping/list.php
* \ingroup Accounting Expert * \ingroup Advanced accountancy
* \brief List operation of book keeping * \brief List operation of book keeping
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -260,8 +260,8 @@ if ($action == 'delbookkeeping') {
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE); $date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
print $date . $sep; print $date . $sep;
print $line->doc_ref . $sep; print $line->doc_ref . $sep;
print length_accounta($line->numero_compte) . $sep; print length_accountg($line->numero_compte) . $sep;
print length_accountg($line->code_tiers) . $sep; print length_accounta($line->code_tiers) . $sep;
print price($line->debit) . $sep; print price($line->debit) . $sep;
print price($line->credit) . $sep; print price($line->credit) . $sep;
@ -277,7 +277,7 @@ if ($action == 'delbookkeeping') {
$date = dol_print_date($line->doc_date, '%d/%m/%Y'); $date = dol_print_date($line->doc_date, '%d/%m/%Y');
print $date . $sep; print $date . $sep;
print $line->code_journal . $sep; print $line->code_journal . $sep;
print length_accounta($line->numero_compte) . $sep; print length_accountg($line->numero_compte) . $sep;
print $line->piece_num . $sep; print $line->piece_num . $sep;
print $line->doc_ref . $sep; print $line->doc_ref . $sep;
print price($line->debit) . $sep; print price($line->debit) . $sep;
@ -289,6 +289,9 @@ if ($action == 'delbookkeeping') {
} }
} }
/*
* View
*/
else { else {
$title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end); $title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
@ -353,7 +356,7 @@ else {
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
print '<div class="tabsAction">' . "\n"; print '<div class="tabsAction">' . "\n";
print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>'; print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
print '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>'; print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
// print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=export_csv">' . $langs->trans("Export") . '</a>'; // print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=export_csv">' . $langs->trans("Export") . '</a>';
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>'; print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
@ -396,12 +399,12 @@ else {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">'; print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
print '<td><input type="text" name="search_mvt_num" size="8" value="' . $search_mvt_num . '"></td>'; print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print $langs->trans('From') . ': '; print $langs->trans('From') . ': ';
print $form->select_date($search_date_start, 'date_start', 0, 0, 1); print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
print '<br>'; print '<br>';
print $langs->trans('To') . ': '; print $langs->trans('to') . ': ';
print $form->select_date($search_date_end, 'date_end', 0, 0, 1); print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
// print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1); // print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1);
print '</td>'; print '</td>';
@ -412,7 +415,7 @@ else {
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, ''); print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
// print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': '; // print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': ';
print '<br>'; print '<br>';
print $langs->trans('To'); print $langs->trans('to');
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, ''); print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
print '</td>'; print '</td>';
// print '<td><input type="text" name="search_accountancy_code" size="8" value="' . $search_accountancy_code . '"></td>'; // print '<td><input type="text" name="search_accountancy_code" size="8" value="' . $search_accountancy_code . '"></td>';
@ -422,7 +425,7 @@ else {
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1); print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
// print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; // print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print '<br>'; print '<br>';
print $langs->trans('To'); print $langs->trans('to');
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1); print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
print '</td>'; print '</td>';
// print '<td><input type="text" name="search_accountancy_aux_code" size="8" value="' . $search_accountancy_aux_code . '"></td>'; // print '<td><input type="text" name="search_accountancy_aux_code" size="8" value="' . $search_accountancy_aux_code . '"></td>';
@ -468,7 +471,7 @@ else {
// print '<td align="center">' . $line->sens . '</td>'; // print '<td align="center">' . $line->sens . '</td>';
print '<td align="right">' . $line->code_journal . '</td>'; print '<td align="right">' . $line->code_journal . '</td>';
print '<td align="center">'; print '<td align="center">';
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a>'; print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a>&nbsp;';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>'; print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * 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
@ -20,7 +20,7 @@
/** /**
* \file htdocs/accountancy/bookkeeping/listbyyear.php * \file htdocs/accountancy/bookkeeping/listbyyear.php
* \ingroup Accounting Expert * \ingroup Advanced accountancy
* \brief Book keeping by year * \brief Book keeping by year
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -184,13 +184,13 @@ print '</div>';
print '<div class="liste_titre">'; print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': ';
print $formventilation->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, ''); print $formventilation->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, '');
print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': '; print $langs->trans('to') . ' ' . $langs->trans('AccountAccounting') . ': ';
print $formventilation->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, ''); print $formventilation->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, '');
print '</div>'; print '</div>';
print '<div class="liste_titre">'; print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print $formventilation->select_auxaccount($search_code_tiers_start, 'search_code_tiers_start', 1); print $formventilation->select_auxaccount($search_code_tiers_start, 'search_code_tiers_start', 1);
print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; print $langs->trans('to') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print $formventilation->select_auxaccount($search_code_tiers_end, 'searchcode_tiers_end', 1); print $formventilation->select_auxaccount($search_code_tiers_end, 'searchcode_tiers_end', 1);
print '</div>'; print '</div>';
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
@ -204,16 +204,14 @@ print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF']
print_liste_field_titre($langs->trans("ThirdPartyAccount"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("ThirdPartyAccount"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "t.montant", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "t.sens", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
print '<th class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">'; print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '"></td>';
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input type="text" size=4 class="flat" name="search_piece_num" value="' . $search_piece_num . '"/>'; print '<input type="text" size=4 class="flat" name="search_piece_num" value="' . $search_piece_num . '"/>';
print '</td>'; print '</td>';
@ -251,11 +249,11 @@ print '</td>';
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '</td>'; print '</td>';
print '<td class="liste_titre">'; print '<td class="liste_titre" align="center">';
print '<input type="text" size=2 class="flat" name="search_sens" value="' . $search_sens . '"/>'; print '<input type="text" size=2 class="flat" name="search_sens" value="' . $search_sens . '"/>';
print '</td>'; print '</td>';
print '<td class="liste_titre">'; print '<td class="liste_titre" align="center">';
print '<input type="text" size=3 class="flat" name="search_code_journal" value="' . $search_code_journal . '"/>'; print '<input type="text" size=3 class="flat" name="search_code_journal" value="' . $search_code_journal . '"/>';
print '</td>'; print '</td>';
@ -272,7 +270,6 @@ foreach ( $object->lines as $line ) {
$var = ! $var; $var = ! $var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>' . $line->piece_num . '</td>' . "\n"; print '<td>' . $line->piece_num . '</td>' . "\n";
print '<td>' . $line->doc_type . '</td>' . "\n"; print '<td>' . $line->doc_type . '</td>' . "\n";
print '<td>' . dol_print_date($line->doc_date) . '</td>'; print '<td>' . dol_print_date($line->doc_date) . '</td>';
@ -283,9 +280,9 @@ foreach ( $object->lines as $line ) {
print '<td align="right">' . price($line->debit) . '</td>'; print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>'; print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->montant) . '</td>'; print '<td align="right">' . price($line->montant) . '</td>';
print '<td>' . $line->sens . '</td>'; print '<td align="center">' . $line->sens . '</td>';
print '<td>' . $line->code_journal . '</td>'; print '<td align="right">' . $line->code_journal . '</td>';
print '<td><a href="./card.php?action=update&amp;piece_num=' . $line->piece_num . '">' . img_edit() . '</a></td>'; print '<td align="center"><a href="./card.php?action=update&amp;piece_num=' . $line->piece_num . '">' . img_edit() . '</a></td>';
print "</tr>\n"; print "</tr>\n";
} }
print "</table>"; print "</table>";

View File

@ -24,7 +24,7 @@
/** /**
* \file htdocs/accountancy/journal/bankjournal.php * \file htdocs/accountancy/journal/bankjournal.php
* \ingroup Accounting Expert * \ingroup Advanced accountancy
* \brief Page with bank journal * \brief Page with bank journal
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -72,7 +72,7 @@ $now = dol_now();
if ($user->societe_id > 0 && empty($id_bank_account)) if ($user->societe_id > 0 && empty($id_bank_account))
accessforbidden(); accessforbidden();
/* /*
* View * View
*/ */
$year_current = strftime("%Y", dol_now()); $year_current = strftime("%Y", dol_now());

View File

@ -4,9 +4,9 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.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
@ -25,7 +25,7 @@
/** /**
* \file htdocs/accountancy/journal/sellsjournal.php * \file htdocs/accountancy/journal/sellsjournal.php
* \ingroup Accounting Expert * \ingroup Advanced accountancy
* \brief Page with sells journal * \brief Page with sells journal
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -40,10 +40,10 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
// Langs // Langs
$langs->load("commercial");
$langs->load("compta"); $langs->load("compta");
$langs->load("bills"); $langs->load("bills");
$langs->load("other"); $langs->load("other");
$langs->load("main");
$langs->load("accountancy"); $langs->load("accountancy");
$date_startmonth = GETPOST('date_startmonth'); $date_startmonth = GETPOST('date_startmonth');

View File

@ -1337,17 +1337,18 @@ if ($id)
} }
// Can an entry be erased or disabled ? // Can an entry be erased or disabled ?
$iserasable=1;$isdisable=1; // true by default $iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
if (isset($obj->code) && $id != 10) if (isset($obj->code) && $id != 10)
{ {
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $isdisable = 0; } if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 0; $isdisable = 0; } else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'EF0') { $iserasable = 0; $isdisable = 0; } else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
} }
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; } if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; }
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $isdisable=0; $isdisable = 0; } if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled=0; $canbedisabled = 0; }
$canbemodified=$iserasable;
if ($obj->code == 'RECEP') $canbemodified=1;
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&amp;code='.(! empty($obj->code)?urlencode($obj->code):'').'&amp;id='.$id.'&amp;'; $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&amp;code='.(! empty($obj->code)?urlencode($obj->code):'').'&amp;id='.$id.'&amp;';
@ -1363,7 +1364,7 @@ if ($id)
// Active // Active
print '<td align="center" class="nowrap">'; print '<td align="center" class="nowrap">';
if ($isdisable) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>'; if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else else
{ {
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
@ -1374,7 +1375,7 @@ if ($id)
print "</td>"; print "</td>";
// Modify link // Modify link
if ($iserasable) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>'; if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
// Delete link // Delete link

View File

@ -1287,7 +1287,7 @@ class Categorie extends CommonObject
$sql = "SELECT ct.fk_categorie, c.label, c.rowid"; $sql = "SELECT ct.fk_categorie, c.label, c.rowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as ct, " . MAIN_DB_PREFIX . "categorie as c"; $sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as ct, " . MAIN_DB_PREFIX . "categorie as c";
$sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_" . $this->MAP_CAT_FK[$type] . " = " . $id . " AND c.type = " . $this->MAP_ID[$type]; $sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_" . $this->MAP_CAT_FK[$type] . " = " . (int) $id . " AND c.type = " . $this->MAP_ID[$type];
$sql .= " AND c.entity IN (" . getEntity( 'category', 1 ) . ")"; $sql .= " AND c.entity IN (" . getEntity( 'category', 1 ) . ")";
$res = $this->db->query($sql); $res = $this->db->query($sql);

View File

@ -556,7 +556,7 @@ if ($id > 0)
if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 ) { if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 ) {
print " ".img_warning(); print " ".img_warning();
} }
print '</td><td align="right" width="80">'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n"; print '</td><td align="right" width="80px">'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>'; print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';
print '<td align="right" style="min-width: 60px" class="nowrap">'.$propal_static->LibStatut($objp->fk_statut,5).'</td></tr>'; print '<td align="right" style="min-width: 60px" class="nowrap">'.$propal_static->LibStatut($objp->fk_statut,5).'</td></tr>';
$i++; $i++;
@ -637,7 +637,7 @@ if ($id > 0)
$commande_static->total_tva = $objp->total_tva; $commande_static->total_tva = $objp->total_tva;
$commande_static->total_ttc = $objp->total_ttc; $commande_static->total_ttc = $objp->total_ttc;
print $commande_static->getNomUrl(1); print $commande_static->getNomUrl(1);
print '</td><td align="right" width="80">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n"; print '</td><td align="right" width="80px">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n";
print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>'; print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';
print '<td align="right" style="min-width: 60px" class="nowrap">'.$commande_static->LibStatut($objp->fk_statut,$objp->facture,5).'</td></tr>'; print '<td align="right" style="min-width: 60px" class="nowrap">'.$commande_static->LibStatut($objp->fk_statut,$objp->facture,5).'</td></tr>';
$i++; $i++;
@ -700,7 +700,7 @@ if ($id > 0)
print $sendingstatic->getNomUrl(1); print $sendingstatic->getNomUrl(1);
print '</td>'; print '</td>';
if ($objp->date_creation > 0) { if ($objp->date_creation > 0) {
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->date_creation),'day').'</td>'; print '<td align="right" width="80px">'.dol_print_date($db->jdate($objp->date_creation),'day').'</td>';
} else { } else {
print '<td align="right"><b>!!!</b></td>'; print '<td align="right"><b>!!!</b></td>';
} }
@ -760,8 +760,8 @@ if ($id > 0)
print $contrat->getNomUrl(1,12); print $contrat->getNomUrl(1,12);
print "</td>\n"; print "</td>\n";
print '<td class="nowrap">'.dol_trunc($objp->refsup,12)."</td>\n"; print '<td class="nowrap">'.dol_trunc($objp->refsup,12)."</td>\n";
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n"; print '<td align="right" width="80px">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n";
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->dcon),'day')."</td>\n"; print '<td align="right" width="80px">'.dol_print_date($db->jdate($objp->dcon),'day')."</td>\n";
print '<td width="20">&nbsp;</td>'; print '<td width="20">&nbsp;</td>';
print '<td align="right" class="nowrap">'; print '<td align="right" class="nowrap">';
$contrat->fetch_lines(); $contrat->fetch_lines();
@ -818,9 +818,9 @@ if ($id > 0)
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$objp->id.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.'</a></td>'."\n"; print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$objp->id.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.'</a></td>'."\n";
//print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->startdate)).'</td>'."\n"; //print '<td align="right" width="80px">'.dol_print_date($db->jdate($objp->startdate)).'</td>'."\n";
print '<td align="right" width="120">'.convertSecondToTime($objp->duration).'</td>'."\n"; print '<td align="right" style="min-width: 60px">'.convertSecondToTime($objp->duration).'</td>'."\n";
print '<td align="right" width="100">'.$fichinter_static->getLibStatut(5).'</td>'."\n"; print '<td align="right" class="nowrap" style="min-width: 60px">'.$fichinter_static->getLibStatut(5).'</td>'."\n";
print '</tr>'; print '</tr>';
$var=!$var; $var=!$var;
$i++; $i++;
@ -869,7 +869,7 @@ if ($id > 0)
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'">'.$langs->trans("AllBills").' <span class="badge">'.$num.'</span></a></td>'; print '<td colspan="5"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'">'.$langs->trans("AllBills").' <span class="badge">'.$num.'</span></a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
print '</tr></table></td>'; print '</tr></table></td>';
print '</tr>'; print '</tr>';
@ -891,15 +891,24 @@ if ($id > 0)
print '</td>'; print '</td>';
if ($objp->df > 0) if ($objp->df > 0)
{ {
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->df),'day').'</td>'; print '<td align="right" width="80px">'.dol_print_date($db->jdate($objp->df),'day').'</td>';
} }
else else
{ {
print '<td align="right"><b>!!!</b></td>'; print '<td align="right"><b>!!!</b></td>';
} }
print '<td align="right" width="120">'.price($objp->total_ht).'</td>'; print '<td align="right" style="min-width: 60px">';
print price($objp->total_ht);
print '</td>';
print '<td align="right" class="nowrap" width="100" >'.($facturestatic->LibStatut($objp->paye,$objp->statut,5,$objp->am)).'</td>'; if (! empty($conf->global->MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES))
{
print '<td align="right" style="min-width: 60px">';
print price($objp->total_ttc);
print '</td>';
}
print '<td align="right" class="nowrap" style="min-width: 60px">'.($facturestatic->LibStatut($objp->paye,$objp->statut,5,$objp->am)).'</td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }

View File

@ -9,6 +9,7 @@
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* *
* 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
@ -46,8 +47,10 @@ $langs->load('bills');
$orderyear=GETPOST("orderyear","int"); $orderyear=GETPOST("orderyear","int");
$ordermonth=GETPOST("ordermonth","int"); $ordermonth=GETPOST("ordermonth","int");
$orderday=GETPOST("orderday","int");
$deliveryyear=GETPOST("deliveryyear","int"); $deliveryyear=GETPOST("deliveryyear","int");
$deliverymonth=GETPOST("deliverymonth","int"); $deliverymonth=GETPOST("deliverymonth","int");
$deliveryday=GETPOST("deliveryday","int");
$search_product_category=GETPOST('search_product_category','int'); $search_product_category=GETPOST('search_product_category','int');
$search_ref=GETPOST('search_ref','alpha')!=''?GETPOST('search_ref','alpha'):GETPOST('sref','alpha'); $search_ref=GETPOST('search_ref','alpha')!=''?GETPOST('search_ref','alpha'):GETPOST('sref','alpha');
$search_ref_customer=GETPOST('search_ref_customer','alpha'); $search_ref_customer=GETPOST('search_ref_customer','alpha');
@ -122,6 +125,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_total_ht=''; $search_total_ht='';
$orderyear=''; $orderyear='';
$ordermonth=''; $ordermonth='';
$orderday='';
$deliveryday='';
$deliverymonth=''; $deliverymonth='';
$deliveryyear=''; $deliveryyear='';
$viewstatut=''; $viewstatut='';
@ -195,10 +200,10 @@ if ($viewstatut <> '')
} }
if ($ordermonth > 0) if ($ordermonth > 0)
{ {
if ($orderyear > 0 && empty($day)) if ($orderyear > 0 && empty($orderday))
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($orderyear,$ordermonth,false))."' AND '".$db->idate(dol_get_last_day($orderyear,$ordermonth,false))."'"; $sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($orderyear,$ordermonth,false))."' AND '".$db->idate(dol_get_last_day($orderyear,$ordermonth,false))."'";
else if ($orderyear > 0 && ! empty($day)) else if ($orderyear > 0 && ! empty($orderday))
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $ordermonth, $day, $orderyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $ordermonth, $day, $orderyear))."'"; $sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $ordermonth, $orderday, $orderyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $ordermonth, $orderday, $orderyear))."'";
else else
$sql.= " AND date_format(c.date_commande, '%m') = '".$ordermonth."'"; $sql.= " AND date_format(c.date_commande, '%m') = '".$ordermonth."'";
} }
@ -208,10 +213,10 @@ else if ($orderyear > 0)
} }
if ($deliverymonth > 0) if ($deliverymonth > 0)
{ {
if ($deliveryyear > 0 && empty($day)) if ($deliveryyear > 0 && empty($deliveryday))
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,$deliverymonth,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,$deliverymonth,false))."'"; $sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,$deliverymonth,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,$deliverymonth,false))."'";
else if ($deliveryyear > 0 && ! empty($day)) else if ($deliveryyear > 0 && ! empty($deliveryday))
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $deliverymonth, $day, $deliveryyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $deliverymonth, $day, $deliveryyear))."'"; $sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $deliverymonth, $deliveryday, $deliveryyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $deliverymonth, $deliveryday, $deliveryyear))."'";
else else
$sql.= " AND date_format(c.date_livraison, '%m') = '".$deliverymonth."'"; $sql.= " AND date_format(c.date_livraison, '%m') = '".$deliverymonth."'";
} }
@ -270,8 +275,10 @@ if ($resql)
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($socid > 0) $param.='&socid='.$socid; if ($socid > 0) $param.='&socid='.$socid;
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut; if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
if ($orderday) $param.='&orderday='.$orderday;
if ($ordermonth) $param.='&ordermonth='.$ordermonth; if ($ordermonth) $param.='&ordermonth='.$ordermonth;
if ($orderyear) $param.='&orderyear='.$orderyear; if ($orderyear) $param.='&orderyear='.$orderyear;
if ($deliveryday) $param.='&deliveryday='.$deliveryday;
if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth; if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth;
if ($deliveryyear) $param.='&deliveryyear='.$deliveryyear; if ($deliveryyear) $param.='&deliveryyear='.$deliveryyear;
if ($search_ref) $param.='&search_ref='.$search_ref; if ($search_ref) $param.='&search_ref='.$search_ref;

View File

@ -1882,14 +1882,7 @@ $now = dol_now();
llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
// Mode creation
/**
* *******************************************************************
*
* Mode creation
*
* ********************************************************************
*/
if ($action == 'create') if ($action == 'create')
{ {
@ -2046,7 +2039,7 @@ if ($action == 'create')
else else
{ {
print '<td colspan="2">'; print '<td colspan="2">';
print $form->select_company($soc->id, 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 1); print $form->select_company($soc->id, 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 'SelectThirdParty');
// Option to reload page to retrieve customer informations. Note, this clear other input // Option to reload page to retrieve customer informations. Note, this clear other input
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE)) if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{ {

View File

@ -10,7 +10,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
* *
* 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
@ -83,6 +83,7 @@ if ($page == -1) {
$page = 0; $page = 0;
} }
$offset = $limit * $page; $offset = $limit * $page;
if (! $sortorder && ! empty($conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER) && $search_status == 1) $sortorder=$conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER;
if (! $sortorder) $sortorder='DESC'; if (! $sortorder) $sortorder='DESC';
if (! $sortfield) $sortfield='f.datef'; if (! $sortfield) $sortfield='f.datef';
$pageprev = $page - 1; $pageprev = $page - 1;
@ -542,7 +543,6 @@ if (empty($reshook))
// Do we click on purge search criteria ? // Do we click on purge search criteria ?
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{ {
$search_categ='';
$search_user=''; $search_user='';
$search_sale=''; $search_sale='';
$search_product_category=''; $search_product_category='';
@ -559,6 +559,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$toselect=''; $toselect='';
$option=''; $option='';
$filter=''; $filter='';
$day_lim='';
$year_lim='';
$month_lim='';
} }
@ -695,13 +698,18 @@ if ($resql)
$param='&socid='.$socid; $param='&socid='.$socid;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($day) $param.='&day='.$day;
if ($month) $param.='&month='.$month; if ($month) $param.='&month='.$month;
if ($year) $param.='&year=' .$year; if ($year) $param.='&year=' .$year;
if ($day_lim) $param.='&day_lim='.$day_lim;
if ($month_lim) $param.='&month_lim='.$month_lim;
if ($year_lim) $param.='&year_lim=' .$year_lim;
if ($search_ref) $param.='&search_ref=' .$search_ref; if ($search_ref) $param.='&search_ref=' .$search_ref;
if ($search_refcustomer) $param.='&search_refcustomer=' .$search_refcustomer; if ($search_refcustomer) $param.='&search_refcustomer=' .$search_refcustomer;
if ($search_societe) $param.='&search_societe=' .$search_societe; if ($search_societe) $param.='&search_societe=' .$search_societe;
if ($search_sale > 0) $param.='&search_sale=' .$search_sale; if ($search_sale > 0) $param.='&search_sale=' .$search_sale;
if ($search_user > 0) $param.='&search_user=' .$search_user; if ($search_user > 0) $param.='&search_user=' .$search_user;
if ($search_product_category > 0) $param.='$search_product_category=' .$search_product_category;
if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht; if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht;
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc; if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc;
if ($search_status != '') $param.='&search_status='.$search_status; if ($search_status != '') $param.='&search_status='.$search_status;

View File

@ -628,7 +628,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
/* /*
* Customers orders to be billed * Customers orders to be billed
*/ */
if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $user->rights->commande->lire) if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $user->rights->commande->lire && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER))
{ {
$commandestatic=new Commande($db); $commandestatic=new Commande($db);
$langs->load("orders"); $langs->load("orders");

View File

@ -1260,26 +1260,24 @@ class BonPrelevement extends CommonObject
$fileDebiteurSection = ''; $fileDebiteurSection = '';
$fileEmetteurSection = ''; $fileEmetteurSection = '';
$i = 0; $i = 0;
$j = 0;
$this->total = 0; $this->total = 0;
/* /*
* section Debiteur (sepa Debiteurs bloc lines) * section Debiteur (sepa Debiteurs bloc lines)
*/ */
$tmp_invoices = array();
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1"; $sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql) {
{ while ($objfac = $this->db->fetch_object($resql)) {
$num = $this->db->num_rows($resql); $tmp_invoices[] = $objfac->fac;
while ($j < $num)
{
$objfac = $this->db->fetch_object($resql);
$ListOfFactures = $ListOfFactures . $objfac->fac . ",";
$j++;
} }
} }
$ListOfFactures = implode($tmp_invoices);
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,"; $sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,"; $sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum"; $sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";

View File

@ -620,23 +620,23 @@ if ($result)
if (! empty($arrayfields['p.lastname']['checked'])) if (! empty($arrayfields['p.lastname']['checked']))
{ {
print '<td valign="middle">'; print '<td valign="middle">';
print $contactstatic->getNomUrl(1,'',20); print $contactstatic->getNomUrl(1,'',0);
print '</td>'; print '</td>';
} }
// Firstname // Firstname
if (! empty($arrayfields['p.firstname']['checked'])) if (! empty($arrayfields['p.firstname']['checked']))
{ {
print '<td>'.dol_trunc($obj->firstname,20).'</td>'; print '<td>'.$obj->firstname.'</td>';
} }
// Zip // Zip
if (! empty($arrayfields['p.zip']['checked'])) if (! empty($arrayfields['p.zip']['checked']))
{ {
print '<td>'.dol_trunc($obj->zip,20).'</td>'; print '<td>'.$obj->zip.'</td>';
} }
// Town // Town
if (! empty($arrayfields['p.town']['checked'])) if (! empty($arrayfields['p.town']['checked']))
{ {
print '<td>'.dol_trunc($obj->town,20).'</td>'; print '<td>'.$obj->town.'</td>';
} }
// Function // Function
if (! empty($arrayfields['p.poste']['checked'])) if (! empty($arrayfields['p.poste']['checked']))

View File

@ -1426,9 +1426,9 @@ else
print '<form name="update" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">'; print '<form name="update" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateligne">'; print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="elrowid" value="'.GETPOST('rowid').'">'; print '<input type="hidden" name="elrowid" value="'.$object->lines[$cursorline-1]->id.'">';
print '<input type="hidden" name="idprod" value="'.($objp->fk_product?$objp->fk_product:'0').'">'; print '<input type="hidden" name="idprod" value="'.(!empty($object->lines[$cursorline-1]->fk_product) ? $object->lines[$cursorline-1]->fk_product : 0).'">';
print '<input type="hidden" name="fournprice" value="'.($objp->fk_fournprice?$objp->fk_fournprice:'0').'">'; print '<input type="hidden" name="fournprice" value="'.(!empty($object->lines[$cursorline-1]->fk_fournprice) ? $object->lines[$cursorline-1]->fk_fournprice : 0).'">';
// Area with common detail of line // Area with common detail of line
print '<table class="notopnoleftnoright allwidth tableforservicepart1" width="100%">'; print '<table class="notopnoleftnoright allwidth tableforservicepart1" width="100%">';

View File

@ -895,7 +895,7 @@ class Form
* @param string $selected Preselected type * @param string $selected Preselected type
* @param string $htmlname Name of field in form * @param string $htmlname Name of field in form
* @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client IN (1,3)') * @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client IN (1,3)')
* @param string $showempty Add an empty field (Can be '1' or text to use on empty line) * @param string $showempty Add an empty field (Can be '1' or text to use on empty line like 'SelectThirdParty')
* @param int $showtype Show third party type in combolist (customer, prospect or supplier) * @param int $showtype Show third party type in combolist (customer, prospect or supplier)
* @param int $forcecombo Force to use combo box * @param int $forcecombo Force to use combo box
* @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
@ -950,7 +950,7 @@ class Form
* @param string $selected Preselected type * @param string $selected Preselected type
* @param string $htmlname Name of field in form * @param string $htmlname Name of field in form
* @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client in (1,3)') * @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client in (1,3)')
* @param string $showempty Add an empty field (Can be '1' or text to use on empty line) * @param string $showempty Add an empty field (Can be '1' or text to use on empty line like 'SelectThirdParty')
* @param int $showtype Show third party type in combolist (customer, prospect or supplier) * @param int $showtype Show third party type in combolist (customer, prospect or supplier)
* @param int $forcecombo Force to use combo box * @param int $forcecombo Force to use combo box
* @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))

View File

@ -909,27 +909,24 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
if (! empty($objMod->dictionaries)) if (! empty($objMod->dictionaries))
{ {
//var_dump($objMod->dictionaries['tabname']); //var_dump($objMod->dictionaries['tabname']);
$taborder[] = 0; $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp=0;
$tabfieldcheck[] = array(); $tabhelp[] = array(); foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = count($tabname)+1; $tabname[] = $val; }
foreach($objMod->dictionaries['tabname'] as $val) foreach($objMod->dictionaries['tablib'] as $val) { $nbtablib++; $tablib[] = $val; }
foreach($objMod->dictionaries['tabsql'] as $val) { $nbtabsql++; $tabsql[] = $val; }
foreach($objMod->dictionaries['tabsqlsort'] as $val) { $nbtabsqlsort++; $tabsqlsort[] = $val; }
foreach($objMod->dictionaries['tabfield'] as $val) { $nbtabfield++; $tabfield[] = $val; }
foreach($objMod->dictionaries['tabfieldvalue'] as $val) { $nbtabfieldvalue++; $tabfieldvalue[] = $val; }
foreach($objMod->dictionaries['tabfieldinsert'] as $val) { $nbtabfieldinsert++; $tabfieldinsert[] = $val; }
foreach($objMod->dictionaries['tabrowid'] as $val) { $nbtabrowid++; $tabrowid[] = $val; }
foreach($objMod->dictionaries['tabcond'] as $val) { $nbtabcond++; $tabcond[] = $val; }
if (! empty($objMod->dictionaries['tabhelp'])) foreach($objMod->dictionaries['tabhelp'] as $val) { $nbtabhelp++; $tabhelp[] = $val; }
if (! empty($objMod->dictionaries['tabfieldcheck'])) foreach($objMod->dictionaries['tabfieldcheck'] as $val) { $nbtabfieldcheck++; $tabfieldcheck[] = $val; }
if ($nbtabname != $nbtablib || $nbtablib != $nbtabsql || $nbtabsql != $nbtabsqlsort)
{ {
$taborder[] = count($tabname)+1; print 'Error in descriptor of module '.$const_name.'. Array ->dictionaries has not same number of record for key "tabname", "tablib", "tabsql" and "tabsqlsort"';
$tabname[] = $val; //print "$const_name: $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp\n";
} }
foreach($objMod->dictionaries['tablib'] as $val) $tablib[] = $val;
foreach($objMod->dictionaries['tabsql'] as $val) $tabsql[] = $val;
foreach($objMod->dictionaries['tabsqlsort'] as $val) $tabsqlsort[] = $val;
foreach($objMod->dictionaries['tabfield'] as $val) $tabfield[] = $val;
foreach($objMod->dictionaries['tabfieldvalue'] as $val) $tabfieldvalue[] = $val;
foreach($objMod->dictionaries['tabfieldinsert'] as $val) $tabfieldinsert[] = $val;
foreach($objMod->dictionaries['tabrowid'] as $val) $tabrowid[] = $val;
foreach($objMod->dictionaries['tabcond'] as $val) $tabcond[] = $val;
if (! empty($objMod->dictionaries['tabfieldcheck'])) foreach($objMod->dictionaries['tabfieldcheck'] as $val) $tabfieldcheck[] = $val;
if (! empty($objMod->dictionaries['tabhelp'])) foreach($objMod->dictionaries['tabhelp'] as $val) $tabhelp[] = $val;
//foreach($objMod->dictionaries['tabsqlsort'] as $val) $tablib[] = $val;
//$tabname = array_merge ($tabname, $objMod->dictionaries['tabname']);
//var_dump($tabcond);
//exit;
} }
$j++; $j++;
@ -1031,7 +1028,6 @@ function complete_elementList_with_modules(&$elementList)
if (! empty($objMod->module_parts['contactelement'])) if (! empty($objMod->module_parts['contactelement']))
{ {
$elementList[$objMod->name] = $langs->trans($objMod->name); $elementList[$objMod->name] = $langs->trans($objMod->name);
//exit;
} }
$j++; $j++;

View File

@ -79,6 +79,7 @@ $fieldstosearchall = array(
* View * View
*/ */
$form=new Form($db);
if (! empty($conf->projet->enabled)) $projectstatic=new Project($db); if (! empty($conf->projet->enabled)) $projectstatic=new Project($db);
llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones'); llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones');

View File

@ -88,6 +88,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
* View * View
*/ */
$form=new Form($db);
$companystatic=new Societe($db); $companystatic=new Societe($db);
$shipment=new Expedition($db); $shipment=new Expedition($db);

View File

@ -139,7 +139,7 @@ if ($object->id > 0)
print '<table width="100%" class="border">'; print '<table width="100%" class="border">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td class="titlefield">'.$langs->trans('AliasNameShort').'</td><td colspan="3">'; print '<tr><td class="titlefield" width="25%">'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";

View File

@ -93,6 +93,7 @@ if (empty($user->socid)) $fieldstosearchall["cf.note_private"]="NotePrivate";
* View * View
*/ */
$form=new Form($db);
$thirdpartytmp = new Fournisseur($db); $thirdpartytmp = new Fournisseur($db);
$commandestatic=new CommandeFournisseur($db); $commandestatic=new CommandeFournisseur($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);

View File

@ -1361,7 +1361,7 @@ if ($action == 'create')
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref
print '<tr><td>'.$langs->trans('Ref').'</td><td>'.$langs->trans('Draft').'</td></tr>'; print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td>'.$langs->trans('Draft').'</td></tr>';
// Third party // Third party
print '<tr><td class="fieldrequired">'.$langs->trans('Supplier').'</td>'; print '<tr><td class="fieldrequired">'.$langs->trans('Supplier').'</td>';

View File

@ -8,7 +8,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Abbes Bahfir <bafbes@gmail.com> * Copyright (C) 2015 Abbes Bahfir <bafbes@gmail.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
* *
* 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
@ -97,6 +97,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$search_status=""; $search_status="";
$year=""; $year="";
$month=""; $month="";
$day="";
$year_lim="";
$month_lim="";
$day_lim="";
} }
// List of fields to search into when doing a "search in all" // List of fields to search into when doing a "search in all"
@ -248,8 +252,12 @@ if ($resql)
} }
$param='&socid='.$socid; $param='&socid='.$socid;
if ($day) $param.='&day='.urlencode($day);
if ($month) $param.='&month='.urlencode($month); if ($month) $param.='&month='.urlencode($month);
if ($year) $param.='&year=' .urlencode($year); if ($year) $param.='&year=' .urlencode($year);
if ($day_lim) $param.='&day_lim='.urlencode($day_lim);
if ($month_lim) $param.='&month_lim='.urlencode($month_lim);
if ($year_lim) $param.='&year_lim=' .urlencode($year_lim);
if ($search_ref) $param.='&search_ref='.urlencode($search_ref); if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
if ($search_ref_supplier) $param.='&search_ref_supplier'.urlencode($search_ref_supplier); if ($search_ref_supplier) $param.='&search_ref_supplier'.urlencode($search_ref_supplier);
if ($search_label) $param.='&search_label='.urlencode($search_label); if ($search_label) $param.='&search_label='.urlencode($search_label);

View File

@ -28,7 +28,7 @@ Version: 3.5.2 Timestamp: Sat Nov 1 14:43:36 EDT 2014
.select2-container .select2-choice { .select2-container .select2-choice {
display: block; display: block;
height: 26px; height: 26px;
padding: 0 0 0 8px; padding: 0 0 0 5px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;

View File

@ -66,6 +66,8 @@ if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax dis
* View * View
*/ */
if (! is_object($form)) $form=new Form($db);
// Title // Title
$title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION; $title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE;

View File

@ -69,6 +69,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EUR'
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FKP', '[163]', 1, 'Falkland Islands (Malvinas) Pound'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FKP', '[163]', 1, 'Falkland Islands (Malvinas) Pound');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FJD', '[36]', 1, 'Fiji Dollar'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FJD', '[36]', 1, 'Fiji Dollar');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GHC', '[162]', 1, 'Ghana Cedis'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GHC', '[162]', 1, 'Ghana Cedis');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GNF', '[70,71]', 1, 'Franc Guinéen');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GIP', '[163]', 1, 'Gibraltar Pound'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GIP', '[163]', 1, 'Gibraltar Pound');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GTQ', '[81]', 1, 'Guatemala Quetzal'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GTQ', '[81]', 1, 'Guatemala Quetzal');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GGP', '[163]', 1, 'Guernsey Pound'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'GGP', '[163]', 1, 'Guernsey Pound');

View File

@ -27,11 +27,11 @@
-- de l'install et tous les sigles '--' sont supprimés. -- de l'install et tous les sigles '--' sont supprimés.
-- --
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (1,'RECEP', 1,1, 'A réception de facture','Réception de facture',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (1,'RECEP', 1,1, 'A réception de facture','Réception de facture',0,1);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (2,'30D', 2,1, '30 jours','Réglement à 30 jours',0,30); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (2,'30D', 2,1, '30 jours','Réglement à 30 jours',0,30);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (3,'30DENDMONTH', 3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (3,'30DENDMONTH', 3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (4,'60D', 4,1, '60 jours','Réglement à 60 jours',0,60); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (4,'60D', 4,1, '60 jours','Réglement à 60 jours',0,60);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER', 6,1, 'A réception de commande','A réception de commande',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER', 6,1, 'A réception de commande','A réception de commande',0,1);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,1);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050', 8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050', 8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,1);

View File

@ -597,3 +597,9 @@ ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL;
-- Fix Argentina provences -- Fix Argentina provences
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2326', 2305, '', 0, 'MISIONES', 'Misiones', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2326', 2305, '', 0, 'MISIONES', 'Misiones', 1);
UPDATE llx_c_departements SET ncc = "FORMOSA", nom = "Formosa" WHERE nom = "Formosa Misiones"; UPDATE llx_c_departements SET ncc = "FORMOSA", nom = "Formosa" WHERE nom = "Formosa Misiones";
-- MALTA VATS (id country=148)
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1481, 148, '18','0','VAT standard rate',1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1482, 148, '7','0','VAT reduced rate',1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1483, 148, '5','0','VAT super-reduced rate', 1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1484, 148, '0','0','VAT Rate 0', 1);

View File

@ -201,3 +201,4 @@ OppStatusNEGO=Negociation
OppStatusPENDING=Pending OppStatusPENDING=Pending
OppStatusWIN=Won OppStatusWIN=Won
OppStatusLOST=Lost OppStatusLOST=Lost
Budget=Budget

View File

@ -1091,7 +1091,7 @@ SendmailOptionMayHurtBuggedMTA=La funcionalidad de enviar correo electrónico a
TranslationSetup=Configuración traducción TranslationSetup=Configuración traducción
TranslationDesc=La elección del idioma mostrado en pantalla se modifica:<br>* A nivel global desde el menú <strong>Inicio - Configuración - Entorno</strong><br>* De manera específica al usuario desde la pestaña <strong>Interfaz usuario</strong> de su ficha de usuario (hacer clic en su login en la parte superior izquierda de la pantalla). TranslationDesc=La elección del idioma mostrado en pantalla se modifica:<br>* A nivel global desde el menú <strong>Inicio - Configuración - Entorno</strong><br>* De manera específica al usuario desde la pestaña <strong>Interfaz usuario</strong> de su ficha de usuario (hacer clic en su login en la parte superior izquierda de la pantalla).
TranslationOverwriteDesc=También puede sobreescribir algún valor completando/editando la tabla siguiente. Debe utilizar "%s" para el código de idioma, "%s" para la clave que encuentra en el archivo langs/xx_XX/somefile.lang y "%s" para el nuevo valor que desea utilizar como nueva traducción. TranslationOverwriteDesc=También puede sobreescribir algún valor completando/editando la tabla siguiente. Debe utilizar "%s" para el código de idioma, "%s" para la clave que encuentra en el archivo langs/xx_XX/somefile.lang y "%s" para el nuevo valor que desea utilizar como nueva traducción.
TotalNumberOfActivatedModules=Total number of activated feature modules: <b>%s</b> / <b>%s</b> TotalNumberOfActivatedModules=Número total de módulos activados: <b>%s</b> / <b>%s</b>
YouMustEnableOneModule=Debe activar al menos un módulo. YouMustEnableOneModule=Debe activar al menos un módulo.
ClassNotFoundIntoPathWarning=No se ha encontrado la clase %s en su path PHP ClassNotFoundIntoPathWarning=No se ha encontrado la clase %s en su path PHP
YesInSummer=Sí en verano YesInSummer=Sí en verano

View File

@ -45,13 +45,13 @@ BoxTitleLastModifiedProspects=Los %s últimos clientes potenciales modificados
BoxTitleLastProductsInContract=Los %s últimos productos/servicios contratados BoxTitleLastProductsInContract=Los %s últimos productos/servicios contratados
BoxTitleLastModifiedMembers=Últimos %s miembros BoxTitleLastModifiedMembers=Últimos %s miembros
BoxTitleLastFicheInter=Las %s últimas intervenciones modificadas BoxTitleLastFicheInter=Las %s últimas intervenciones modificadas
BoxTitleOldestUnpaidCustomerBills=%s facturas a clientes más antiguras pendientes de cobro BoxTitleOldestUnpaidCustomerBills=Las %s facturas a clientes más antiguras pendientes de cobro
BoxTitleOldestUnpaidSupplierBills=%s facturas de proveedores más antiguas pendientes de pago BoxTitleOldestUnpaidSupplierBills=Las %s facturas de proveedores más antiguas pendientes de pago
BoxTitleCurrentAccounts=Balance de cuentas abiertas BoxTitleCurrentAccounts=Balance de cuentas abiertas
BoxTitleSalesTurnover=Volumen de ventas realizado BoxTitleSalesTurnover=Volumen de ventas realizado
BoxTitleTotalUnpaidCustomerBills=Facturas a clientes pendientes de cobro BoxTitleTotalUnpaidCustomerBills=Facturas a clientes pendientes de cobro
BoxTitleTotalUnpaidSuppliersBills=Facturas de proveedores pendientes de pago BoxTitleTotalUnpaidSuppliersBills=Facturas de proveedores pendientes de pago
BoxTitleLastModifiedContacts=Los %s últimos contactos/direcciones modificadas BoxTitleLastModifiedContacts=Los %s últimos contactos/direcciones modificados
BoxMyLastBookmarks=Mis %s últimos marcadores BoxMyLastBookmarks=Mis %s últimos marcadores
BoxOldestExpiredServices=Servicios antiguos expirados BoxOldestExpiredServices=Servicios antiguos expirados
BoxLastExpiredServices=Los %s contratos más antiguos con servicios activos expirados BoxLastExpiredServices=Los %s contratos más antiguos con servicios activos expirados

View File

@ -266,8 +266,8 @@ CustomerRelativeDiscountShort=Descuento relativo
CustomerAbsoluteDiscountShort=Descuento fijo CustomerAbsoluteDiscountShort=Descuento fijo
CompanyHasRelativeDiscount=Este cliente tiene un descuento por defecto de <b>%s%%</b> CompanyHasRelativeDiscount=Este cliente tiene un descuento por defecto de <b>%s%%</b>
CompanyHasNoRelativeDiscount=Este cliente no tiene descuentos relativos por defecto CompanyHasNoRelativeDiscount=Este cliente no tiene descuentos relativos por defecto
CompanyHasAbsoluteDiscount=Este cliente tiene <b>%s %s</b> descuentos disponibles (descuentos, anticipos...) CompanyHasAbsoluteDiscount=Este cliente tiene <b>%s %s</b> en descuentos o anticipos disponibles
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> anticipos disponibles CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> en anticipos disponibles
CompanyHasNoAbsoluteDiscount=Este cliente no tiene más descuentos fijos disponibles CompanyHasNoAbsoluteDiscount=Este cliente no tiene más descuentos fijos disponibles
CustomerAbsoluteDiscountAllUsers=Descuentos fijos en curso (acordado por todos los usuarios) CustomerAbsoluteDiscountAllUsers=Descuentos fijos en curso (acordado por todos los usuarios)
CustomerAbsoluteDiscountMy=Descuentos fijos en curso (acordados personalmente) CustomerAbsoluteDiscountMy=Descuentos fijos en curso (acordados personalmente)

View File

@ -40,8 +40,8 @@ CronNone=Ninguna
CronDtStart=No antes de CronDtStart=No antes de
CronDtEnd=No después de CronDtEnd=No después de
CronDtNextLaunch=Sig. ejec. CronDtNextLaunch=Sig. ejec.
CronDtLastLaunch=Start date of last execution CronDtLastLaunch=Fecha inicio última ejec.
CronDtLastResult=End date of last execution CronDtLastResult=Fecha finalización última ejec.
CronFrequency=Frecuencia CronFrequency=Frecuencia
CronClass=Clase CronClass=Clase
CronMethod=Metodo CronMethod=Metodo

View File

@ -198,3 +198,4 @@ OppStatusNEGO=Negociación
OppStatusPENDING=Pendiente OppStatusPENDING=Pendiente
OppStatusWIN=Ganado OppStatusWIN=Ganado
OppStatusLOST=Perdido OppStatusLOST=Perdido
Budget=Presupuesto

View File

@ -198,3 +198,4 @@ OppStatusNEGO=Négociation
OppStatusPENDING=En attente OppStatusPENDING=En attente
OppStatusWIN=Gagné OppStatusWIN=Gagné
OppStatusLOST=Perdu OppStatusLOST=Perdu
Budget=Budget

View File

@ -1447,7 +1447,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Show menu entries // Show menu entries
print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n"; print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n";
$menumanager->atarget=$target; $menumanager->atarget=$target;
$menumanager->showmenu('top'); // This contains a \n $menumanager->showmenu('top', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // This contains a \n
print "</div>\n"; print "</div>\n";
//$form=new Form($db); //$form=new Form($db);
@ -1611,7 +1611,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
print "\n"; print "\n";
if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone') if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone' && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM))
{ {
if (! is_object($form)) $form=new Form($db); if (! is_object($form)) $form=new Form($db);
$selected=-1; $selected=-1;

View File

@ -61,7 +61,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
} }
// Clean param // Clean param
if (! empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_MULTIPRICES_LIMIT)) $conf->global->PRODUIT_MULTIPRICES_LIMIT = 5; if (! empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_MULTIPRICES_LIMIT)) {
dolibarr_set_const($db, 'PRODUIT_MULTIPRICES_LIMIT', 5, 'chaine', 0, '', $conf->entity);
}

View File

@ -46,10 +46,15 @@ $langs->load("projects");
*/ */
$now = dol_now(); $now = dol_now();
$tmp=dol_getdate($now);
$day=$tmp['mday'];
$month=$tmp['mon'];
$year=$tmp['year'];
$projectstatic=new Project($db); $projectstatic=new Project($db);
$taskstatic=new Task($db); $taskstatic=new Task($db);
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // Return all projects I have permission on because I want my tasks and some of my task may be on a public projet that is not my project $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // Return all projects I have permission on because I want my tasks and some of my task may be on a public projet that is not my project
$taskstatic=new Task($db);
$tasktmp=new Task($db); $tasktmp=new Task($db);
$title=$langs->trans("Activities"); $title=$langs->trans("Activities");
@ -104,7 +109,7 @@ print '<td width="50%">'.$langs->trans('ActivityOnProjectToday').'</td>';
print '<td width="50%" align="right">'.$langs->trans("Time").'</td>'; print '<td width="50%" align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t"; $sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt"; $sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -112,9 +117,9 @@ $sql.= " WHERE t.fk_projet = p.rowid";
$sql.= " AND p.entity = ".$conf->entity; $sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid"; $sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id; $sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND date_format(task_date,'%y-%m-%d') = '".strftime("%y-%m-%d",$now)."'"; $sql.= " AND task_date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'";
$sql.= " AND p.rowid in (".$projectsListId.")"; $sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title"; $sql.= " GROUP BY p.rowid, p.ref, p.title, p.public";
$resql = $db->query($sql); $resql = $db->query($sql);
if ( $resql ) if ( $resql )
@ -130,9 +135,10 @@ if ( $resql )
$projectstatic->id=$row->rowid; $projectstatic->id=$row->rowid;
$projectstatic->ref=$row->ref; $projectstatic->ref=$row->ref;
$projectstatic->title=$row->title; $projectstatic->title=$row->title;
$projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb).'</td>'; print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $row->nb; $total += $row->nb;
} }
@ -145,35 +151,33 @@ else
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>'; print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
// TODO Do not use date_add function to be compatible with all database
if ($db->type != 'pgsql') /* Affichage de la liste des projets d'hier */
print '<br><table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ActivityOnProjectYesterday').'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
$sql.= " WHERE t.fk_projet = p.rowid";
$sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND task_date BETWEEN '".$db->idate(dol_time_plus_duree(dol_mktime(0, 0, 0, $month, $day, $year), -1, 'd'))."' AND '".$db->idate(dol_time_plus_duree(dol_mktime(23, 59, 59, $month, $day, $year), -1, 'd'))."'";
$sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title, p.public";
$resql = $db->query($sql);
if ( $resql )
{ {
/* Affichage de la liste des projets d'hier */
print '<br><table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ActivityOnProjectYesterday').'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, sum(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
$sql.= " WHERE t.fk_projet = p.rowid";
$sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND date_format(date_add(task_date, INTERVAL 1 DAY),'%y-%m-%d') = '".strftime("%y-%m-%d",$now)."'";
$sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title";
$resql = $db->query($sql);
if ( $resql )
{
$var=true; $var=true;
$total=0; $total=0;
@ -185,40 +189,41 @@ if ($db->type != 'pgsql')
$projectstatic->id=$row->rowid; $projectstatic->id=$row->rowid;
$projectstatic->ref=$row->ref; $projectstatic->ref=$row->ref;
$projectstatic->title=$row->title; $projectstatic->title=$row->title;
$projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb).'</td>'; print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $row->nb; $total += $row->nb;
} }
$db->free($resql); $db->free($resql);
}
else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>';
print "</tr>\n";
print "</table>";
} }
else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n";
print "</table>";
// TODO Do not use week function to be compatible with all database
/*
if ($db->type != 'pgsql') if ($db->type != 'pgsql')
{ {
print '<br>'; print '<br>';
/* Affichage de la liste des projets de la semaine */ // Affichage de la liste des projets de la semaine
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>'; print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " , ".MAIN_DB_PREFIX."projet_task as t"; $sql.= " , ".MAIN_DB_PREFIX."projet_task as t";
$sql.= " , ".MAIN_DB_PREFIX."projet_task_time as tt"; $sql.= " , ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -226,7 +231,7 @@ if ($db->type != 'pgsql')
$sql.= " AND p.entity = ".$conf->entity; $sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid"; $sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id; $sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND week(task_date) = '".strftime("%W",time())."'"; $sql.= " AND task_date >= '".$db->idate(dol_get_first_day($year, $month)).'" AND ...";
$sql.= " AND p.rowid in (".$projectsListId.")"; $sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title"; $sql.= " GROUP BY p.rowid, p.ref, p.title";
@ -244,9 +249,10 @@ if ($db->type != 'pgsql')
$projectstatic->id=$row->rowid; $projectstatic->id=$row->rowid;
$projectstatic->ref=$row->ref; $projectstatic->ref=$row->ref;
$projectstatic->title=$row->title; $projectstatic->title=$row->title;
$projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb).'</td>'; print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $row->nb; $total += $row->nb;
} }
@ -259,10 +265,12 @@ if ($db->type != 'pgsql')
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>'; print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table><br>"; print "</table><br>";
} }
*/
/* Affichage de la liste des projets du mois */ /* Affichage de la liste des projets du mois */
if (! empty($conf->global->PROJECT_TASK_TIME_MONTH)) if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
@ -273,7 +281,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t"; $sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt"; $sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -281,9 +289,9 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
$sql.= " AND p.entity = ".$conf->entity; $sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid"; $sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id; $sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND date_format(task_date,'%y-%m') = '".strftime("%y-%m",$now)."'"; $sql.= " AND task_date BETWEEN '".$db->idate(dol_get_first_day($year, $month))."' AND '".$db->idate(dol_get_last_day($year, $month))."'";
$sql.= " AND p.rowid in (".$projectsListId.")"; $sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title"; $sql.= " GROUP BY p.rowid, p.ref, p.title, p.public";
$resql = $db->query($sql); $resql = $db->query($sql);
if ( $resql ) if ( $resql )
@ -299,7 +307,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
$projectstatic->title=$row->title; $projectstatic->title=$row->title;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb).'</td>'; print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$var=!$var; $var=!$var;
} }
@ -311,7 +319,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>'; print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
} }
@ -325,7 +333,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t"; $sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt"; $sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -335,7 +343,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
$sql.= " AND tt.fk_user = ".$user->id; $sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND YEAR(task_date) = '".strftime("%Y",$now)."'"; $sql.= " AND YEAR(task_date) = '".strftime("%Y",$now)."'";
$sql.= " AND p.rowid in (".$projectsListId.")"; $sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title"; $sql.= " GROUP BY p.rowid, p.ref, p.title, p.public";
$var=false; $var=false;
$resql = $db->query($sql); $resql = $db->query($sql);
@ -348,9 +356,10 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
$projectstatic->id=$row->rowid; $projectstatic->id=$row->rowid;
$projectstatic->ref=$row->ref; $projectstatic->ref=$row->ref;
$projectstatic->title=$row->title; $projectstatic->title=$row->title;
$projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb).'</td>'; print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$var=!$var; $var=!$var;
} }
@ -362,31 +371,71 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>'; print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
} }
if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA)) if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA))
{ {
// Get id of types of contacts for projects (This list never contains a lot of elements)
$listofprojectcontacttype=array();
$sql = "SELECT ctc.rowid, ctc.code FROM ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sql.= " WHERE ctc.element = '" . $projectstatic->element . "'";
$sql.= " AND ctc.source = 'internal'";
$resql = $db->query($sql);
if ($resql)
{
while($obj = $db->fetch_object($resql))
{
$listofprojectcontacttype[$obj->rowid]=$obj->code;
}
}
else dol_print_error($db);
if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0]='0'; // To avoid sql syntax error if not found
// Get id of types of contacts for tasks (This list never contains a lot of elements)
$listoftaskcontacttype=array();
$sql = "SELECT ctc.rowid, ctc.code FROM ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sql.= " WHERE ctc.element = '" . $taskstatic->element . "'";
$sql.= " AND ctc.source = 'internal'";
$resql = $db->query($sql);
if ($resql)
{
while($obj = $db->fetch_object($resql))
{
$listoftaskcontacttype[$obj->rowid]=$obj->code;
}
}
else dol_print_error($db);
if (count($listoftaskcontacttype) == 0) $listoftaskcontacttype[0]='0'; // To avoid sql syntax error if not found
// Tasks for all resources of all opened projects and time spent for each task/resource // Tasks for all resources of all opened projects and time spent for each task/resource
// This list can be very long, so we don't show it by default on task area. We prefer to use the list page. // This list can be very long, so we don't show it by default on task area. We prefer to use the list page.
// Add constant PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA to show this list // Add constant PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA to show this list
$max = (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA); $max = (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA);
$sql = "SELECT p.ref, p.title, p.rowid as projectid, p.fk_statut as status, p.fk_opp_status as opp_status, p.dateo as projdateo, p.datee as projdatee,"; $sql = "SELECT p.ref, p.title, p.rowid as projectid, p.fk_statut as status, p.fk_opp_status as opp_status, p.public, p.dateo as projdateo, p.datee as projdatee,";
$sql.= " t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent"; $sql.= " t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid";
if ($mine)
{
$sql.= ", " . MAIN_DB_PREFIX . "element_contact as ect";
}
$sql.= " WHERE p.entity = ".$conf->entity; $sql.= " WHERE p.entity = ".$conf->entity;
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; // project i have permission on
if ($mine) // this may duplicate record if we are contact twice
{
$sql.= " AND ect.fk_c_type_contact IN (".join(',',array_keys($listoftaskcontacttype)).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$user->id;
}
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
$sql.= " AND p.fk_statut=1"; $sql.= " AND p.fk_statut=1";
$sql.= " GROUP BY p.ref, p.title, p.rowid, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee"; $sql.= " GROUP BY p.ref, p.title, p.rowid, p.fk_statut, p.fk_opp_status, p.public, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee";
$sql.= " ORDER BY t.dateo desc, t.rowid desc, t.datee"; $sql.= " ORDER BY t.dateo desc, t.rowid desc, t.datee";
$sql.= $db->plimit($max+1); // We want more to know if we have more than limit $sql.= $db->plimit($max+1); // We want more to know if we have more than limit
@ -435,6 +484,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
$projectstatic->ref=$obj->ref; $projectstatic->ref=$obj->ref;
$projectstatic->title=$obj->title; $projectstatic->title=$obj->title;
$projectstatic->statut = $obj->status; $projectstatic->statut = $obj->status;
$projectstatic->public = $obj->public;
$projectstatic->dateo = $db->jdate($obj->projdateo); $projectstatic->dateo = $db->jdate($obj->projdateo);
$projectstatic->datee = $db->jdate($obj->projdatee); $projectstatic->datee = $db->jdate($obj->projdatee);
@ -468,10 +518,10 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
if ($taskstatic->hasDelay()) print img_warning($langs->trans("Late")); if ($taskstatic->hasDelay()) print img_warning($langs->trans("Late"));
print '</td>'; print '</td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">'; print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">';
print convertSecondToTime($obj->planned_workload, 'all'); print convertSecondToTime($obj->planned_workload, 'allhourmin');
print '</a></td>'; print '</a></td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">'; print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">';
print convertSecondToTime($obj->timespent, 'all'); print convertSecondToTime($obj->timespent, 'allhourmin');
print '</a></td>'; print '</a></td>';
print '<td align="right">'; print '<td align="right">';
if (! empty($obj->taskid)) if (! empty($obj->taskid))

View File

@ -465,7 +465,7 @@ if ($action == 'create' && $user->rights->projet->creer)
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
$filteronlist=''; $filteronlist='';
if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
$text=$form->select_thirdparty_list(GETPOST('socid','int'),'socid',$filteronlist,1,1); $text=$form->select_thirdparty_list(GETPOST('socid','int'),'socid',$filteronlist,'SelectThirdParty',1);
if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile))
{ {
$texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty"); $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");

View File

@ -126,7 +126,7 @@ if ($socid)
print '<table class="border centpercent">'; print '<table class="border centpercent">';
print '<tr>'; print '<tr>';
print '<td class="titlefield">'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; print '<td class="titlefield" width="25%">'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
print $object->code_client; print $object->code_client;
if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '</td>'; print '</td>';

View File

@ -124,7 +124,7 @@ print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr id="name_alias"><td class="titlefield"><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>'; print '<tr id="name_alias"><td class="titlefield" width="25%"><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
print '<td colspan="3">'.$object->name_alias.'</td></tr>'; print '<td colspan="3">'.$object->name_alias.'</td></tr>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field

View File

@ -91,7 +91,7 @@ llxHeader('',$title,$help_url);
if ($object->id) if ($object->id)
{ {
/* /*
* Affichage onglets * Show tabs
*/ */
if (! empty($conf->notification->enabled)) $langs->load("mails"); if (! empty($conf->notification->enabled)) $langs->load("mails");
$head = societe_prepare_head($object); $head = societe_prepare_head($object);
@ -117,7 +117,7 @@ if ($object->id)
print '<table class="border centpercent">'; print '<table class="border centpercent">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield" width="25%">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -145,10 +145,10 @@ if ($object->id)
print '</td></tr>'; print '</td></tr>';
} }
// Nbre fichiers // Number of files
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
//Total taille // Total size
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>'; print '</table>';

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2001-2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
@ -83,7 +83,7 @@ if ($id > 0)
print '<table class="border centpercent">'; print '<table class="border centpercent">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield" width="25%">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";

View File

@ -247,7 +247,7 @@ if ($socid && $action != 'edit' && $action != "create")
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
print '<tr><td class="titlefield">'.$langs->trans("LabelRIB").'</td>'; print '<tr><td class="titlefield" width="25%">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4">'.$account->label.'</td></tr>'; print '<td colspan="4">'.$account->label.'</td></tr>';
print '<tr><td>'.$langs->trans("BankName").'</td>'; print '<tr><td>'.$langs->trans("BankName").'</td>';
@ -466,7 +466,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>'; print '<tr><td valign="top" width="25%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4"><input size="30" type="text" name="label" value="'.$account->label.'"></td></tr>'; print '<td colspan="4"><input size="30" type="text" name="label" value="'.$account->label.'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("BankName").'</td>'; print '<tr><td class="fieldrequired">'.$langs->trans("BankName").'</td>';
@ -600,7 +600,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>'; print '<tr><td valign="top" width="25%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4"><input size="30" type="text" name="label" value="'.GETPOST('label').'"></td></tr>'; print '<td colspan="4"><input size="30" type="text" name="label" value="'.GETPOST('label').'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("Bank").'</td>'; print '<tr><td class="fieldrequired">'.$langs->trans("Bank").'</td>';

View File

@ -757,7 +757,7 @@ else
* Creation * Creation
*/ */
$private=GETPOST("private","int"); $private=GETPOST("private","int");
if (! empty($conf->global->MAIN_THIRPARTY_CREATION_INDIVIDUAL) && ! isset($_GET['private']) && ! isset($_POST['private'])) $private=1; if (! empty($conf->global->MAIN_THIRDPARTY_CREATION_INDIVIDUAL) && ! isset($_GET['private']) && ! isset($_POST['private'])) $private=1;
if (empty($private)) $private=0; if (empty($private)) $private=0;
// Load object modCodeTiers // Load object modCodeTiers
@ -987,6 +987,10 @@ else
print '<td colspan=2>&nbsp;</td></tr>'; print '<td colspan=2>&nbsp;</td></tr>';
} }
// Alias names (commercial, trademark or alias names)
print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
print '<td colspan="3"><input type="text" size="60" name="name_alias" id="name_alias_input" value="'.$object->name_alias.'" size="32"></td></tr>';
// Prospect/Customer // Prospect/Customer
print '<tr><td width="25%">'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>'; print '<tr><td width="25%">'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>';
print '<td width="25%" class="maxwidthonsmartphone"><select class="flat" name="client" id="customerprospect">'; print '<td width="25%" class="maxwidthonsmartphone"><select class="flat" name="client" id="customerprospect">';
@ -1041,10 +1045,6 @@ else
print '</td></tr>'; print '</td></tr>';
} }
// Alias names (commercial, trademark or alias names)
print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
print '<td colspan="3"><input type="text" name="name_alias" id="name_alias_input" value="'.$object->name_alias.'" size="32"></td></tr>';
// Address // Address
print '<tr><td class="tdtop">'.fieldLabel('Address','address').'</td>'; print '<tr><td class="tdtop">'.fieldLabel('Address','address').'</td>';
print '<td colspan="3"><textarea name="address" id="address" cols="80" rows="'._ROWS_2.'" wrap="soft">'; print '<td colspan="3"><textarea name="address" id="address" cols="80" rows="'._ROWS_2.'" wrap="soft">';
@ -1497,12 +1497,12 @@ else
} }
// Name // Name
print '<tr><td>'.fieldLabel('ThirdPartyName','name',1).'</td>'; print '<tr><td width="25%">'.fieldLabel('ThirdPartyName','name',1).'</td>';
print '<td colspan="3"><input type="text" size="60" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>'; print '<td colspan="3"><input type="text" size="60" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>'; print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
print '<td colspan="3"><input type="text" name="name_alias" id="name_alias_input" value="'.dol_escape_htmltag($object->name_alias).'" size="32"></td></tr>'; print '<td colspan="3"><input type="text" size="60" name="name_alias" id="name_alias_input" value="'.dol_escape_htmltag($object->name_alias).'"></td></tr>';
// Prefix // Prefix
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
@ -1933,11 +1933,6 @@ else
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
// Alias names (commercial, trademark or alias names)
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td>';
print $object->name_alias;
print "</td></tr>";
// Prospect/Customer // Prospect/Customer
print '<tr><td>'.$langs->trans('ProspectCustomer').'</td><td>'; print '<tr><td>'.$langs->trans('ProspectCustomer').'</td><td>';
print $object->getLibCustProspStatut(); print $object->getLibCustProspStatut();
@ -2177,7 +2172,7 @@ else
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
// Legal // Legal
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>'; print '<tr><td width="25%">'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>';
// Capital // Capital
print '<tr><td>'.$langs->trans('Capital').'</td><td>'; print '<tr><td>'.$langs->trans('Capital').'</td><td>';

View File

@ -4,9 +4,10 @@ Tutorial to create a new image for menu:
1) First find an image. 1) First find an image.
2) With Gimp, open image and check there is a alpha channel. If not add one. 2) With Gimp, open image and check there is a alpha channel. If not add one.
3) Convert image into back and white (Menu Image - Mode - Grey levels). 3) Convert image into back and white (Menu Image - Mode - Grey levels).
4) Use the degrade tool with option: 4) Use the degrade tool with option (Menu Tools - Paint - Degrade - CTRL+L):
* Erase color * Mode: Erase color (you can also try "Elear only")
* Opacity: 50 +/- * Opacity: 50 +/-
* Offset: 0 * Offset: 0
* Shape: Linear * Shape: Linear
* Select on image top of file and drag to bottom.
Il est possible aussi d'augmenter la transparence globale depuis le calque. Il est possible aussi d'augmenter la transparence globale depuis le calque.

View File

@ -536,10 +536,14 @@ div.myavailability {
.minwidth100 { min-width: 100px; } .minwidth100 { min-width: 100px; }
.minwidth200 { min-width: 200px; } .minwidth200 { min-width: 200px; }
.minwidth300 { min-width: 300px; } .minwidth300 { min-width: 300px; }
.minwidth400 { min-width: 400px; }
.minwidth500 { min-width: 500px; }
.maxwidth100 { max-width: 100px; } .maxwidth100 { max-width: 100px; }
.maxwidth150 { max-width: 150px; } .maxwidth150 { max-width: 150px; }
.maxwidth200 { max-width: 200px; } .maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; } .maxwidth300 { max-width: 300px; }
.maxwidth400 { max-width: 400px; }
.maxwidth500 { max-width: 500px; }
.titlefield { width: 30%; } .titlefield { width: 30%; }
<?php if (! empty($dol_optimize_smallscreen)) { ?> <?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }

View File

@ -524,10 +524,14 @@ div.myavailability {
.minwidth100 { min-width: 100px; } .minwidth100 { min-width: 100px; }
.minwidth200 { min-width: 200px; } .minwidth200 { min-width: 200px; }
.minwidth300 { min-width: 300px; } .minwidth300 { min-width: 300px; }
.minwidth400 { min-width: 400px; }
.minwidth500 { min-width: 500px; }
.maxwidth100 { max-width: 100px; } .maxwidth100 { max-width: 100px; }
.maxwidth150 { max-width: 150px; } .maxwidth150 { max-width: 150px; }
.maxwidth200 { max-width: 200px; } .maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; } .maxwidth300 { max-width: 300px; }
.maxwidth400 { max-width: 400px; }
.maxwidth500 { max-width: 500px; }
.titlefield { width: 30%; } .titlefield { width: 30%; }
<?php if (! empty($dol_optimize_smallscreen)) { ?> <?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }