Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into mko186

This commit is contained in:
Maxime Kohlhaas 2012-10-04 15:36:47 +02:00
commit 0e17c7c063
92 changed files with 8988 additions and 6754 deletions

View File

@ -49,9 +49,10 @@ For users:
- New: Add a selection module for emailing to enter a recipient from gui.
- New: Allow to search thirds and products from barcodes directly from the permanent mini search left box.
- New: Allow to search product from barcodes directly from invoices, proposals... through AJAX.
- New: Can make one invoice for several orders.
- New: POS module can works with only one payment method (cach, chq, credit card).
New experimental modules:
- New: Add margin and commissions management module.
- New: Add holiday module.
- Fix: [ bug #499 ]: Supplier order input method not translated
- Fix: No images into product description lines as PDF generation does

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#------------------------------------------------------
# Script to purge and init a database with demo values.
# Note: "dialog" tool need to be available.
@ -11,13 +11,14 @@
#------------------------------------------------------
export dumpfile=`ls mysqldump_dolibarr_*.sql | sort | tail -n 1`
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
if [ "x$mydir" = "x" ]
then
export mydir="."
fi
export id=`id -u`;
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
export dumpfile=`basename $dumpfile`
# ----------------------------- check if root
@ -151,7 +152,7 @@ then
fi
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
echo "mysql -P$port -u$admin ***** $base < $mydir/$dumpfile"
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
echo "Dolibarr data demo has been loaded."

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

24
dev/initdata/removedemo.sh Normal file → Executable file
View File

@ -3,13 +3,29 @@
# Script to remove setup of a Dolibarr installation.
# Note: "dialog" tool need to be available.
#
# Regis Houssin - regis@dolibarr.fr
# Regis Houssin - regis@dolibarr.fr
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
# WARNING: This script erase all data of database
# WARNING: This script erase setup of instance,
# but not the database
#------------------------------------------------------
export mydir=`echo "$_" | sed -e 's/removedemo.sh//'`;
export mydir=`echo "$0" | sed -e 's/removedemo.sh//'`;
if [ "x$mydir" = "x" ]
then
export mydir="./"
fi
export id=`id -u`;
# ----------------------------- check if root
if [ "x$id" != "x0" -a "x$id" != "x1001" ]
then
echo "Script must be ran as root"
exit
fi
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
@ -34,5 +50,5 @@ rm $mydir../../htdocs/conf/conf.php 2>/dev/null
echo "Remove file $mydir../../install.lock"
rm $mydir../../install.lock 2>/dev/null
echo "Dolibarr demo has been removed (need to be installed again)."
echo "Dolibarr setup has been removed (need to be installed again. database not dropped)."
echo

View File

@ -18,11 +18,11 @@
*/
/**
* \file htdocs/contact/canvas/default/actions_adherentcard_default.class.php
* \ingroup thirdparty
* \file htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
* \ingroup member
* \brief Fichier de la classe Thirdparty adherent card controller (default canvas)
*/
include_once DOL_DOCUMENT_ROOT.'/adherent/canvas/actions_adherentcard_common.class.php';
include_once DOL_DOCUMENT_ROOT.'/adherents/canvas/actions_adherentcard_common.class.php';
/**
* \class ActionsAdherentCardDefault

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2012 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,9 +20,9 @@
*/
/**
* \file htdocs/admin/accounting.php
* \ingroup accounting
* \brief Page de configuration du module comptabilite expert
* \file htdocs/admin/accounting.php
* \ingroup compta
* \brief Page to setup accountancy module
*/
require '../main.inc.php';
@ -29,43 +32,81 @@ $langs->load('admin');
$langs->load('compta');
if (!$user->admin)
accessforbidden();
accessforbidden();
$action = GETPOST('action','alpha');
$compta_mode = defined('COMPTA_MODE')?COMPTA_MODE:'RECETTES-DEPENSES';
if ($_POST['action'] == 'setcomptamode')
if ($action == 'setcomptamode')
{
$compta_mode = $_POST['compta_mode'];
if (! dolibarr_set_const($db, 'COMPTA_MODE', $compta_mode,'chaine',0,'',$conf->entity)) { print $db->error(); }
$compta_mode = GETPOST('compta_mode','alpha');
$res = dolibarr_set_const($db, 'COMPTA_MODE', $compta_mode,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
if ($action == 'setchart')
{
$chartofaccounts = GETPOST('chartofaccounts','alpha');
$res = dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
if ($action == 'update' || $action == 'add')
{
$constname = GETPOST('constname','alpha');
$constvalue = GETPOST('constvalue','alpha');
$consttype = GETPOST('consttype','alpha');
$constnote = GETPOST('constnote','alpha');
$res = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
$form = new Form($db);
$typeconst=array('yesno','texte','chaine');
if ($_POST['action'] == 'update' || $_POST['action'] == 'add')
{
if (! dolibarr_set_const($db, $_POST['constname'], $_POST['constvalue'], $typeconst[$_POST['consttype']], 0, isset($_POST['constnote']) ? $_POST['constnote'] : '',$conf->entity));
{
print $db->error();
}
}
if ($_GET['action'] == 'delete')
/*if ($action == 'delete')
{
if (! dolibarr_del_const($db, $_GET['constname'],$conf->entity));
{
print $db->error();
print $db->error();
}
}
}*/
/*
* View
* Affichage page
*/
llxHeader();
@ -81,92 +122,162 @@ print '<br>';
print '<table class="noborder" width="100%">';
// Cas du parametre COMPTA_MODE
print '<form action="compta.php" method="post">';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setcomptamode">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('OptionMode').'</td><td>'.$langs->trans('Description').'</td>';
print '<td><input class="button" type="submit" value="'.$langs->trans('Modify').'"></td>';
print '<td align="right"><input class="button" type="submit" value="'.$langs->trans('Modify').'"></td>';
print "</tr>\n";
print '<tr '.$bc[false].'><td width="200"><input type="radio" name="compta_mode" value="RECETTES-DEPENSES"'.($compta_mode != 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeTrue').'</td>';
print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'))."</td></tr>\n";
print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'));
// Write info on way to count VAT
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
{
// print "<br>\n";
// print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
}
else
{
// print "<br>\n";
// print nl2br($langs->trans('OptionModeTrueInfoExpert'));
}
print "</td></tr>\n";
print '<tr '.$bc[true].'><td width="200"><input type="radio" name="compta_mode" value="CREANCES-DETTES"'.($compta_mode == 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeVirtual').'</td>';
print '<td colspan="2">'.$langs->trans('OptionModeVirtualDesc')."</td></tr>\n";
print '<td colspan="2">'.nl2br($langs->trans('OptionModeVirtualDesc'))."</td></tr>\n";
print '</form>';
print "</table>\n";
/*
* Define Chart of accounts
*
*/
if (! empty($conf->global->ACCOUNTING_SELECTCHART) && ! empty($conf->accounting->enabled))
{
print '<br>';
print_titre($langs->trans("Definechartofaccounts"));
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
print '<table class="noborder" width="100%">';
$var=True;
print '<tr class="liste_titre">';
print '<td>';
print '<input type="hidden" name="action" value="setchart">';
print $langs->trans("Chartofaccounts").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
$var=!$var;
print '<tr '.$bc[$var].'>';
print "<td>".$langs->trans("Selectchartofaccounts")."</td>";
print "<td>";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
print '<option value="0">'.$langs->trans("DoNotSuggestChart").'</option>';
$sql = "SELECT rowid, pcg_version, fk_pays, label, active";
$sql.= " FROM ".MAIN_DB_PREFIX."accountingsystem";
$sql.= " WHERE active = 1";
$sql.= " AND fk_pays = ".$mysoc->country_id;
$var=True;
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$var=!$var;
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected="selected"':'';
print '>'.$row[1].' - '.$row[3].'</option>';
$i++;
}
}
print "</select>";
print "</td></tr>";
print "</table>";
print "</form>";
}
print "<br>\n";
// Cas des autres param<61>tres COMPTA_*
/*
$sql ="SELECT rowid, name, value, type, note";
$sql.=" FROM ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'COMPTA_%' and name not in ('COMPTA_MODE')";
// Cas des autres parametres COMPTA_*
$list=array('COMPTA_PRODUCT_BUY_ACCOUNT','COMPTA_PRODUCT_SOLD_ACCOUNT','COMPTA_SERVICE_BUY_ACCOUNT','COMPTA_SERVICE_SOLD_ACCOUNT',
'COMPTA_VAT_ACCOUNT','COMPTA_ACCOUNT_CUSTOMER','COMPTA_ACCOUNT_SUPPLIER'
);
/*$sql = "SELECT rowid, name, value, type, note";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE name LIKE 'COMPTA_%'";
$sql.= " AND name NOT IN ('COMPTA_MODE')";
$sql.= " AND entity = ".$conf->entity;
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
$var=true;
if ($num)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans('OtherOptions').'</td>';
print "</tr>\n";
}
while ($i < $num)
{
$obj = $db->fetch_object($result);
$var=!$var;
print '<form action="compta.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="hidden" name="constname" value="'.$obj->name.'">';
print '<tr '.$bc[$var].' class="value">';
print '<td>'.stripslashes(nl2br($obj->note))."</td>\n";
print '<td>';
if ($obj->type == 'yesno')
{
print $form->selectyesno('constvalue',$obj->value,1);
}
elseif ($obj->type == 'texte')
{
print '<textarea name="constvalue" cols="35" rows="5" wrap="soft">';
print $obj->value;
print "</textarea>\n";
}
else
{
print '<input type="text" size="30" name="constvalue" value="'.stripslashes($obj->value).'">';
}
print '</td><td>';
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"> &nbsp; ';
print "</td></tr>\n";
print '</form>';
$list[$obj->name]=$obj->value;
$i++;
}
}*/
if ($num)
{
print "</table>\n";
}
$num=count($list);
if ($num)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans('OtherOptions').'</td>';
print "</tr>\n";
}
*/
foreach ($list as $key)
{
$var=!$var;
print '<form action="accounting.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="consttype" value="string">';
print '<input type="hidden" name="constname" value="'.$key.'">';
print '<tr '.$bc[$var].' class="value">';
// Param
$libelle = $langs->trans($key);
print '<td>'.$libelle;
//print ' ('.$key.')';
print "</td>\n";
// Value
print '<td>';
print '<input type="text" size="20" name="constvalue" value="'.$conf->global->$key.'">';
print '</td><td>';
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"> &nbsp; ';
print "</td></tr>\n";
print '</form>';
$i++;
}
if ($num)
{
print "</table>\n";
}
dol_htmloutput_mesg($mesg);
$db->close();
llxFooter();
?>

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
*
* 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

View File

@ -51,6 +51,7 @@ if ($action == 'set')
$res = dolibarr_del_const($db,"SYSLOG_FILE_ON",0);
$res = dolibarr_del_const($db,"SYSLOG_SYSLOG_ON",0);
$res = dolibarr_del_const($db,"SYSLOG_FIREPHP_ON",0);
$res = dolibarr_del_const($db,"SYSLOG_CHROMEPHP_ON",0);
$syslog_file_on=0;
$syslog_syslog_on=0;

View File

@ -348,7 +348,7 @@ p.titre {
height: 40px;
}
.bouton_mode_reglement {
.bouton_mode_reglement, .bouton_mode_reglement_disabled {
width: 150px;
height: 40px;
}

View File

@ -56,7 +56,7 @@ if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_BILL &&
exit;
}
if (! empty($_POST['txtUsername']) && ! empty($conf->banque->enabled) && (empty($conf_fkaccount_cash) || empty($conf_fkaccount_cheque) || empty($conf_fkaccount_cb)))
if (! empty($_POST['txtUsername']) && ! empty($conf->banque->enabled) && (empty($conf_fkaccount_cash) && empty($conf_fkaccount_cheque) && empty($conf_fkaccount_cb)))
{
$langs->load("errors");
$retour=$langs->trans("ErrorModuleSetupNotComplete");
@ -65,7 +65,6 @@ if (! empty($_POST['txtUsername']) && ! empty($conf->banque->enabled) && (empty(
}
// Check password
$auth = new Auth($db);
$retour = $auth->verif($username, $password);

View File

@ -182,9 +182,32 @@ $langs->load("cashdesk");
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("PaymentMode"); ?></legend>
<table>
<tr>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Cash"); ?>" onclick="javascript: verifClic('ESP');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("CreditCard"); ?>" onclick="javascript: verifClic('CB');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Cheque"); ?>" onclick="javascript: verifClic('CHQ');" /></td>
<?php
print '<td>';
if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) || $conf->global->CASHDESK_ID_BANKACCOUNT_CASH < 0)
{
$langs->load("errors");
print '<input class="bouton_mode_reglement_disabled" type="button" name="btnModeReglement" value="'.$langs->trans("Cash").'" title="'.dol_escape_htmltag($langs->trans("ErrorModuleSetupNotComplete")).'" />';
}
else print '<input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="'.$langs->trans("Cash").'" onclick="javascript: verifClic(\'ESP\');" />';
print '</td>';
print '<td>';
if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE) || $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE < 0)
{
$langs->load("errors");
print '<input class="bouton_mode_reglement_disabled" type="button" name="btnModeReglement" value="'.$langs->trans("CreditCard").'" title="'.dol_escape_htmltag($langs->trans("ErrorModuleSetupNotComplete")).'" />';
}
else print '<input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="'.$langs->trans("CreditCard").'" onclick="javascript: verifClic(\'CB\');" />';
print '</td>';
print '<td>';
if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB) || $conf->global->CASHDESK_ID_BANKACCOUNT_CB < 0)
{
$langs->load("errors");
print '<input class="bouton_mode_reglement_disabled" type="button" name="btnModeReglement" value="'.$langs->trans("Cheque").'" title="'.dol_escape_htmltag($langs->trans("ErrorModuleSetupNotComplete")).'" />';
}
else print '<input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="'.$langs->trans("Cheque").'" onclick="javascript: verifClic(\'CHQ\');" />';
print '</td>';
?>
</tr>
</table>
<table>

View File

@ -20,15 +20,15 @@
/**
* \file htdocs/comm/action/class/actioncomm.class.php
* \ingroup commercial
* \ingroup agenda
* \brief File of class to manage agenda events (actions)
*/
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
/** \class ActionComm
* \brief Class to manage agenda events (actions)
/**
* Class to manage agenda events (actions)
*/
class ActionComm extends CommonObject
{

View File

@ -18,14 +18,13 @@
/**
* \file htdocs/comm/action/class/cactioncomm.class.php
* \ingroup commercial
* \ingroup agenda
* \brief File of class to manage type of agenda events
*/
/**
* \class CActionComm
* \brief Class to manage different types of events
* Class to manage different types of events
*/
class CActionComm
{

View File

@ -23,6 +23,11 @@
* \ingroup agenda
* \brief File of class to parse ical calendars
*/
/**
* Class to parse ICal calendars
*/
class ICal
{
var $file_text; // Text in file

View File

@ -493,14 +493,29 @@ if ($id > 0)
if ($num > 0)
{
print '<table class="noborder" width="100%">';
// Check if there are orders billable
$sql2 = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
$sql2.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
$sql2.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql2.= ', '.MAIN_DB_PREFIX.'commande as c';
$sql2.= ' WHERE c.fk_soc = s.rowid';
$sql2.= ' AND s.rowid = '.$object->id;
// Show orders with status validated, shipping started and delivered (well any order we can bill)
$sql2.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))";
$resql2=$db->query($sql2);
$num2 = $db->num_rows($resql2);
$db->free($resql2);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' ('.$num.')</a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/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.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').'</a></td>';
print '</tr></table></td>';
print '</tr>';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' ('.$num.')</a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
if($num2 > 0) print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').'</a></td>';
else print '<td width="20px" align="right"><a href="#">'.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').'</a></td>';
print '</tr></table></td>';
print '</tr>';
}
$i = 0;

View File

@ -0,0 +1,688 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
* Copyright (C) 2012 David Rodriguez Martinez <davidrm146@gmail.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Maxime Kohlhaas <mko@atm-consulting.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/propal/propalstoorder.php
* \ingroup propal
* \brief Page to order multiple propals
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
$langs->load('orders');
$langs->load('deliveries');
$langs->load('companies');
if (! $user->rights->commande->creer)
accessforbidden();
$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility
$ref = GETPOST('ref','alpha');
$action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha');
$sref = GETPOST('sref');
$sref_client = GETPOST('sref_client');
$sall = GETPOST('sall');
$socid = GETPOST('socid','int');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
if (! $sortfield) $sortfield='p.rowid';
if (! $sortorder) $sortorder='DESC';
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
$date_starty=dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
$date_endy=dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);
$selected=GETPOST('propals_to_order');
$action=GETPOST('action','alpha');
if ($action == 'create')
{
if (! is_array($selected))
{
$mesgs[]='<div class="error">'.$langs->trans('Error_OrderNotChecked').'</div>';
}
else
{
$socid=GETPOST('socid');
$action=GETPOST('action');
$origin=GETPOST('origin');
$originid=GETPOST('originid');
}
}
$now=dol_now();
$viewstatut=GETPOST('viewstatut');
/*
* Actions
*/
if (($action == 'create' || $action == 'add') && empty($mesgs))
{
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
}
$langs->load('bills');
$langs->load('products');
$langs->load('main');
if (isset($_GET['propals_to_order']))
{
$orders_id = $_GET['propals_to_order'];
$n = count($orders_id);
$i = 0;
$originid=$orders_id[0];
$_GET['originid']=$orders_id[0];
}
if (isset($_POST['propals_to_order']))
{
$orders_id = $_POST['propals_to_order'];
$nn = count($orders_id);
$ii = 0;
$originid=$orders_id[0];
$_POST['originid']=$orders_id[0];
}
$projectid = GETPOST('projectid','int')?GETPOST('projectid','int'):0;
$lineid = GETPOST('lineid','int');
$userid = GETPOST('userid','int');
$search_ref = GETPOST('sf_ref')?GETPOST('sf_ref'):GETPOST('search_ref');
$closeOrders = GETPOST('autocloseorders') != '' ? true : false;
// Security check
$fieldid = GETPOST('ref','alpha')?'facnumber':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid);
$usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
$object=new Facture($db);
// Insert new invoice in database
if ($action == 'add' && $user->rights->facture->creer)
{
$object->socid=GETPOST('socid');
$db->begin();
$error=0;
// Standard or deposit or proforma invoice
if ($_POST['type'] == 0 )
{
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
if (empty($datefacture))
{
$datefacture = dol_mktime(12, 0, 0, date("m"), date("d"), date("Y"));
}
if (! $error)
{
// Si facture standard
$object->socid = $_POST['socid'];
$object->type = $_POST['type'];
$object->number = $_POST['facnumber'];
$object->date = $datefacture;
$object->note_public = trim($_POST['note_public']);
$object->note = trim($_POST['note']);
$object->ref_client = $_POST['ref_client'];
$object->ref_int = $_POST['ref_int'];
$object->modelpdf = $_POST['model'];
$object->fk_project = $_POST['projectid'];
$object->cond_reglement_id = ($_POST['type'] == 3?1:$_POST['cond_reglement_id']);
$object->mode_reglement_id = $_POST['mode_reglement_id'];
$object->amount = $_POST['amount'];
$object->remise_absolue = $_POST['remise_absolue'];
$object->remise_percent = $_POST['remise_percent'];
if ($_POST['origin'] && $_POST['originid'])
{
$object->origin = $_POST['origin'];
$object->origin_id = $orders_id[$ii];
$object->linked_objects = $orders_id;
$id = $object->create($user);
if ($id>0)
{
foreach($orders_id as $origin => $origin_id)
{
$origin_id = (! empty($origin_id) ? $origin_id : $object->origin_id);
$db->begin();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element (";
$sql.= "fk_source";
$sql.= ", sourcetype";
$sql.= ", fk_target";
$sql.= ", targettype";
$sql.= ") VALUES (";
$sql.= $origin_id;
$sql.= ", '".$object->origin."'";
$sql.= ", ".$id;
$sql.= ", '".$object->element."'";
$sql.= ")";
if ($db->query($sql))
{
$db->commit();
}
else
{
$db->rollback();
}
}
while ($ii < $nn)
{
dol_include_once('/commande/class/commande.class.php');
$srcobject = new Commande($db);
dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
$result=$srcobject->fetch($orders_id[$ii]);
if ($result > 0)
{
if($closeOrders) {
$srcobject->classer_facturee();
$srcobject->setStatut(3);
}
$lines = $srcobject->lines;
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
$fk_parent_line=0;
$num=count($lines);
for ($i=0;$i<$num;$i++)
{
$desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle);
if ($lines[$i]->subprice < 0)
{
// Negative line, we create a discount line
$discount = new DiscountAbsolute($db);
$discount->fk_soc=$object->socid;
$discount->amount_ht=abs($lines[$i]->total_ht);
$discount->amount_tva=abs($lines[$i]->total_tva);
$discount->amount_ttc=abs($lines[$i]->total_ttc);
$discount->tva_tx=$lines[$i]->tva_tx;
$discount->fk_user=$user->id;
$discount->description=$desc;
$discountid=$discount->create($user);
if ($discountid > 0)
{
$result=$object->insert_discount($discountid);
//$result=$discount->link_to_invoice($lineid,$id);
}
else
{
$mesgs[]=$discount->error;
$error++;
break;
}
}
else
{
// Positive line
$product_type=($lines[$i]->product_type?$lines[$i]->product_type:0);
// Date start
$date_start=false;
if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue;
if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel;
if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start;
//Date end
$date_end=false;
if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue;
if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel;
if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end;
// Reset fk_parent_line for no child products and special product
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9)
{
$fk_parent_line = 0;
}
$result = $object->addline(
$id,
$desc,
$lines[$i]->subprice,
$lines[$i]->qty,
$lines[$i]->tva_tx,
$lines[$i]->localtax1_tx,
$lines[$i]->localtax2_tx,
$lines[$i]->fk_product,
$lines[$i]->remise_percent,
$date_start,
$date_end,
0,
$lines[$i]->info_bits,
$lines[$i]->fk_remise_except,
'HT',
0,
$product_type,
$lines[$i]->rang,
$lines[$i]->special_code,
$object->origin,
$lines[$i]->rowid,
$fk_parent_line
);
if ($result > 0)
{
$lineid=$result;
}
else
{
$lineid=0;
$error++;
break;
}
// Defined the new fk_parent_line
if ($result > 0 && $lines[$i]->product_type == 9)
{
$fk_parent_line = $result;
}
}
}
}
else
{
$mesgs[]=$srcobject->error;
$error++;
}
$ii++;
}
}
else
{
$mesgs[]=$object->error;
$error++;
}
}
}
}
// End of object creation, we show it
if ($id > 0 && ! $error)
{
$db->commit();
header('Location: '.DOL_URL_ROOT.'/compta/facture.php?facid='.$id);
exit;
}
else
{
$db->rollback();
$action='create';
$_GET["origin"]=$_POST["origin"];
$_GET["originid"]=$_POST["originid"];
$mesgs[]='<div class="error">'.$object->error.'</div>';
}
}
}
/*
* View
*/
$html = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$companystatic = new Societe($db);
// Mode creation
if ($action == 'create')
{
$facturestatic=new Facture($db);
llxHeader();
print_fiche_titre($langs->trans('NewBill'));
$soc = new Societe($db);
if ($socid) $res=$soc->fetch($socid);
if ($res)
{
$cond_reglement_id = $soc->cond_reglement_id;
$mode_reglement_id = $soc->mode_reglement_id;
$remise_percent = $soc->remise_percent;
}
$remise_absolue = 0;
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
$absolute_discount=$soc->getAvailableDiscounts();
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="socid" value="'.$soc->id.'">' ."\n";
print '<input name="facnumber" type="hidden" value="provisoire">';
print '<input name="ref_client" type="hidden" value="'.$ref_client.'">';
print '<input name="ref_int" type="hidden" value="'.$ref_int.'">';
print '<input type="hidden" name="origin" value="'.GETPOST('origin').'">';
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
print '<input type="hidden" name="autocloseorders" value="'.GETPOST('autocloseorders').'">';
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
// Tiers
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td><td colspan="2">';
print $soc->getNomUrl(1);
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
print '</td>';
print '</tr>'."\n";
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
print '<table class="nobordernopadding">'."\n";
// Standard invoice
print '<tr height="18"><td width="16px" valign="middle">';
print '<input type="radio" name="type" value="0"'.(GETPOST('type')==0?' checked="true"':'').'>';
print '</td><td valign="middle">';
$desc=$html->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1);
print $desc;
print '</td></tr>'."\n";
print '</table>';
// Date invoice
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">';
$html->select_date(0,'','','','',"add",1,1);
print '</td></tr>';
// Payment term
print '<tr><td nowrap>'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
$html->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id');
print '</td></tr>';
// Payment mode
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
$html->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
print '</td></tr>';
// Project
if (! empty($conf->projet->enabled))
{
$langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
select_projects($soc->id, $projectid, 'projectid');
print '</td></tr>';
}
// Modele PDF
print '<tr><td>'.$langs->trans('Model').'</td>';
print '<td>';
include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
$liste=ModelePDFFactures::liste_modeles($db);
print $html->selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF);
print "</td></tr>";
// Public note
print '<tr>';
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
print '<td valign="top" colspan="2">';
print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">';
dol_include_once('/commande/class/commande.class.php');
$srcobject = new Commande($db);
$commandes = $langs->trans("Orders").": ";
foreach ($selected as $sel)
{
$result=$srcobject->fetch($sel);
if ($result > 0)
{
$commandes.= $srcobject->ref.", ";
}
}
print $commandes;
print '</textarea></td></tr>';
// Private note
if (! $user->societe_id)
{
print '<tr>';
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
print '<td valign="top" colspan="2">';
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">';
print '</textarea></td></tr>';
}
print '</table>';
while ($i < $n)
{
print '<input type="hidden" name="propals_to_order[]" value="'.$orders_id[$i].'">';
$i++;
}
// Button "Create Draft"
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'" /></center>';
print "</form>\n";
print '</td></tr>';
print "</table>\n";
}
//Mode liste
if (($action != 'create' && $action != 'add') || ! empty($mesgs))
{
llxHeader();
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#checkall").click(function() {
jQuery(".checkformerge").attr('checked', true);
});
jQuery("#checknone").click(function() {
jQuery(".checkformerge").attr('checked', false);
});
});
</script>
<?php
$sql = 'SELECT s.nom, s.rowid as socid, s.client, p.rowid, p.ref, p.total_ht, p.ref_client,';
$sql.= ' p.date_valid, p.fin_validite, p.fk_statut';
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql.= ', '.MAIN_DB_PREFIX.'propal as p';
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ' WHERE p.entity = '.$conf->entity;
$sql.= ' AND p.fk_soc = s.rowid';
// Show orders with status validated, shipping started and delivered (well any order we can bill)
$sql.= " AND p.fk_statut IN (1,2)";
if ($socid) $sql.= ' AND s.rowid = '.$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($sref)
{
$sql.= " AND p.ref LIKE '%".$db->escape($sref)."%'";
}
if ($sall)
{
$sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%')";
}
//Date filter
if ($date_start && $date_end) $sql.= " AND p.date_valid >= '".$db->idate($date_start)."' AND p.date_valid <= '".$db->idate($date_end)."'";
if ($date_starty && $date_endy) $sql.= " AND p.fin_validite >= '".$db->idate($date_starty)."' AND p.fin_validite <= '".$db->idate($date_endy)."'";
if (!empty($sref_client))
{
$sql.= ' AND p.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
}
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
$resql = $db->query($sql);
if ($resql)
{
if ($socid)
{
$soc = new Societe($db);
$soc->fetch($socid);
}
$title.= $langs->trans('ListOfProposals').' - '.$langs->trans('PropalStatusOpened').', '.$langs->trans("PropalStatusSigned");
$num = $db->num_rows($resql);
print_fiche_titre($title);
$i = 0;
$period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1);
$periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1);
if (! empty($socid))
{
// Company
$companystatic->id=$socid;
$companystatic->nom=$soc->nom;
print '<h3>'.$companystatic->getNomUrl(1,'customer').'</h3>';
}
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),'propalstoorder.php','p.ref','','&amp;socid='.$socid,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomerOrder'),'propalstoorder.php','p.ref_client','','&amp;socid='.$socid,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Date'),'propalstoorder.php','p.date_valid','','&amp;socid='.$socid, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('DateEndPropal'),'propalstoorder.php','p.fin_validite','','&amp;socid='.$socid, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Status'),'','','','','align="right"');
print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"');
print '</tr>';
// Lignes des champs de filtre
print '<form method="get" action="propalstoorder.php">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
//REF
print '<input class="flat" size="10" type="text" name="sref" value="'.$sref.'">';
print '</td>';
//print '<td class="liste_titre">';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
//DATE ORDER
print '<td class="liste_titre" align="center">';
print $period;
print '</td>';
//DATE DELIVERY
print '<td class="liste_titre" align="center">';
print $periodely;
print '</td>';
//SEARCH BUTTON
print '</td><td align="right" class="liste_titre">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
//ALL/NONE
print '<td class="liste_titre" align="center">';
if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
print '</td>';
print '</td></tr>';
print '</form>';
print '<form name="propals2order" action="propalstoorder.php" method="GET">';
$var=True;
$generic_propal = new Propal($db);
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">';
$generic_propal->id=$objp->rowid;
$generic_propal->ref=$objp->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding" nowrap="nowrap">';
print $generic_propal->getNomUrl(1);
print '</td>';
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->fin_validite) < ($now - $conf->propal->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
print '</td>';
print '<td width="16" align="right" class="nobordernopadding">';
$filename=dol_sanitizeFileName($objp->ref);
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
print $formfile->getDocumentsLink($generic_propal->element, $filename, $filedir);
print '</td></tr></table>';
print '</td>';
print '<td>'.$objp->ref_client.'</td>';
// Validation date
print '<td align="center" nowrap>';
print dol_print_date($db->jdate($objp->date_valid),'day');
print '</td>';
// Limit valid date
print '<td align="center" nowrap>';
print dol_print_date($db->jdate($objp->fin_validite),'day');
print '</td>';
// Statut
print '<td align="right" nowrap="nowrap">'.$generic_propal->LibStatut($objp->fk_statut,5).'</td>';
// Checkbox
print '<td align="center">';
print '<input class="flat checkformerge" type="checkbox" name="propals_to_order[]" value="'.$objp->rowid.'">';
print '</td>' ;
print '</tr>';
$total = $total + $objp->price;
$subtotal = $subtotal + $objp->price;
$i++;
}
print '</table>';
/*
* Boutons actions
*/
print '<div align="right">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print '<input type="hidden" name="action" value="create">';
print '<input type="hidden" name="origin" value="propal"><br>';
print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
print '<input type="submit" class="button" value='.$langs->trans("GenerateOrder").'>';
print '<center><br><input type="checkbox" checked="checked" name="autoclosepropals"> '.$langs->trans("ClosePropalsAutomatically");
print '</div>';
print '</form>';
$db->free($resql);
}
else
{
print dol_print_error($db);
}
}
dol_htmloutput_mesg($mesg,$mesgs);
llxFooter();
$db->close();
?>

View File

@ -2529,10 +2529,10 @@ class Commande extends CommonOrder
* Return clicable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param int $option Where point the link
* @param int $option Where point the link (0=> main card, 1,2 => shipment)
* @param int $max Max length to show
* @param int $short Use short labels
* @return string String with URL
* @return string String with URL
*/
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{

View File

@ -126,7 +126,7 @@ if ($sall)
}
if ($viewstatut <> '')
{
if ($viewstatut < 4 && $viewstatut > -2)
if ($viewstatut < 4 && $viewstatut > -3)
{
$sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee
if ($viewstatut == 3)
@ -143,6 +143,11 @@ if ($viewstatut <> '')
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
}
if ($viewstatut == -3) // To bill
{
$sql.= ' AND c.fk_statut in (1,2,3)';
$sql.= ' AND c.facture = 0'; // invoice not created
}
}
if ($ordermonth > 0)
{
@ -215,6 +220,8 @@ if ($resql)
$title.=' - '.$langs->trans('StatusOrderCanceledShort');
if ($viewstatut == -2)
$title.=' - '.$langs->trans('StatusOrderToProcessShort');
if ($viewstatut == -3)
$title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
@ -233,6 +240,7 @@ if ($resql)
// Lignes des champs de filtre
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print '<table class="noborder" width="100%">';
@ -297,7 +305,7 @@ if ($resql)
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding" nowrap="nowrap">';
print $generic_commande->getNomUrl(1,$objp->fk_statut);
print $generic_commande->getNomUrl(1,($viewstatut != 2?0:$objp->fk_statut));
print '</td>';
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';

View File

@ -152,7 +152,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
if (empty($datefacture))
{
$datefacture = dol_mktime(12, 0, 0, date("m"), date("d"), date("Y"));
$datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y"));
}
if (! $error)
{
@ -388,16 +388,21 @@ if ($action == 'create')
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
print '<input type="hidden" name="autocloseorders" value="'.GETPOST('autocloseorders').'">';
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
// Tiers
// Third party
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td><td colspan="2">';
print $soc->getNomUrl(1);
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
print '</td>';
print '</tr>'."\n";
// Type
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
print '<table class="nobordernopadding">'."\n";
// Standard invoice
print '<tr height="18"><td width="16px" valign="middle">';
print '<input type="radio" name="type" value="0"'.(GETPOST('type')==0?' checked="true"':'').'>';
@ -443,16 +448,16 @@ if ($action == 'create')
dol_include_once('/commande/class/commande.class.php');
$srcobject = new Commande($db);
$commandes = $langs->trans("Orders").": ";
$listoforders = '';
foreach ($selected as $sel)
{
$result=$srcobject->fetch($sel);
if ($result > 0)
{
$commandes.= $srcobject->ref.", ";
$listoforders .= ($listoforders?', ':'').$srcobject->ref;
}
}
print $commandes;
print $langs->trans("Orders").": ".$listoforders;
print '</textarea></td></tr>';
// Private note
@ -540,12 +545,8 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
{
$soc = new Societe($db);
$soc->fetch($socid);
$title = $langs->trans('ListOfOrders');
}
else
{
$title = $langs->trans('ListOfOrders');
}
$title = $langs->trans('ListOfOrders');
$title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
$num = $db->num_rows($resql);
print_fiche_titre($title);
@ -667,13 +668,13 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
/*
* Boutons actions
*/
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
print '<div align="right">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print '<input type="hidden" name="action" value="create">';
print '<input type="hidden" name="origin" value="commande"><br>';
print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
print '<input type="submit" class="butAction" value='.$langs->trans("GenerateBill").'>';
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
//print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
print '<input type="submit" class="butAction" value="'.$langs->trans("GenerateBill").'">';
print '</div>';
print '</form>';
$db->free($resql);

View File

@ -510,7 +510,6 @@ if ($id > 0 || ! empty($ref))
// Payment type
print "<td nowrap>";
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
// $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type);
if ($objp->fk_type == 'SOLD') $label='&nbsp;';
print $label;

View File

@ -0,0 +1,213 @@
<?php
/** a mettre dans facture.php **/
// Affichage d'autres éléments ajoutables à la facture
if($conf->global->FACTURE_MULTI_ORIGIN) include_once(DOL_DOCUMENT_ROOT.'/compta/facture_multi_origin.php');
if(empty($origin)) return 0;
else if ($origin == 'commande') {
// Show other origin objects mergeable into same invoice
print_titre($langs->trans('OtherOrders'));
// Display list of elements
// 1 - Filters
$sref = GETPOST('sref');
$sref_client = GETPOST('sref_client');
$sall = GETPOST('sall');
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
$date_starty=dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
$date_endy=dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
if (! $sortfield) $sortfield='c.rowid';
if (! $sortorder) $sortorder='DESC';
$html = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$companystatic = new Societe($db);
// 2 - Query for orders
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ' WHERE c.entity = '.$conf->entity;
$sql.= ' AND c.fk_soc = s.rowid';
// Show orders with status validated, shipping started and delivered (well any order we can bill)
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))";
if ($socid) $sql.= ' AND s.rowid = '.$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($sref)
{
$sql.= " AND c.ref LIKE '%".$db->escape($sref)."%'";
}
if ($sall)
{
$sql.= " AND (c.ref LIKE '%".$db->escape($sall)."%' OR c.note LIKE '%".$db->escape($sall)."%')";
}
if (!empty($sref_client))
{
$sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
}
// Date filter
if ($date_start && $date_end) $sql.= " AND c.date_commande >= '".$db->idate($date_start)."' AND c.date_commande <= '".$db->idate($date_end)."'";
if ($date_starty && $date_endy) $sql.= " AND c.date_livraison >= '".$db->idate($date_starty)."' AND c.date_livraison <= '".$db->idate($date_endy)."'";
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
$resql = $db->query($sql);
if ($resql)
{
if ($socid)
{
$soc = new Societe($db);
$soc->fetch($socid);
}
$num = $db->num_rows($resql);
$i = 0;
$period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1);
$periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),'orderstoinvoice.php','c.ref','','&amp;socid='.$socid,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomerOrder'),'orderstoinvoice.php','c.ref_client','','&amp;socid='.$socid,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('OrderDate'),'orderstoinvoice.php','c.date_commande','','&amp;socid='.$socid, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('DeliveryDate'),'orderstoinvoice.php','c.date_livraison','','&amp;socid='.$socid, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Status'),'','','','','align="right"');
print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"');
print '</tr>';
// Lignes des champs de filtre
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print '<input type="hidden" name="action" value="'.$action.'">';
print '<input type="hidden" name="origin" value="'.$origin.'">';
print '<input type="hidden" name="originid" value="'.$originid.'">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
//REF
print '<input class="flat" size="10" type="text" name="sref" value="'.$sref.'">';
print '</td>';
//print '<td class="liste_titre">';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
//DATE ORDER
print '<td class="liste_titre" align="center">';
print $period;
print '</td>';
//DATE DELIVERY
print '<td class="liste_titre" align="center">';
print $periodely;
print '</td>';
//SEARCH BUTTON
print '</td><td align="right" class="liste_titre">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
//ALL/NONE
print '<td class="liste_titre" align="center">';
if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
print '</td>';
print '</td></tr>';
print '</form>';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print '<input type="hidden" name="action" value="'.$action.'">';
print '<input type="hidden" name="origin" value="'.$origin.'">';
print '<input type="hidden" name="originid[]" value="'.$originid.'">';
$var=True;
$generic_commande = new Commande($db);
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">';
$generic_commande->id=$objp->rowid;
$generic_commande->ref=$objp->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding" nowrap="nowrap">';
print $generic_commande->getNomUrl(1,$objp->fk_statut);
print '</td>';
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
print '</td>';
print '<td width="16" align="right" class="nobordernopadding">';
$filename=dol_sanitizeFileName($objp->ref);
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
print '</td></tr></table>';
print '</td>';
print '<td>'.$objp->ref_client.'</td>';
// Order date
print '<td align="center" nowrap>';
print dol_print_date($db->jdate($objp->date_commande),'day');
print '</td>';
//Delivery date
print '<td align="center" nowrap>';
print dol_print_date($db->jdate($objp->date_livraison),'day');
print '</td>';
// Statut
print '<td align="right" nowrap="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).'</td>';
// Checkbox
print '<td align="center">';
print '<input class="flat checkformerge" type="checkbox" name="originid[]" value="'.$objp->rowid.'"'.true.'>';
print '</td>' ;
print '</tr>';
$total = $total + $objp->price;
$subtotal = $subtotal + $objp->price;
$i++;
}
print '</table>';
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
// Button "Create Draft"
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraftWithSelecedOrders').'"></center>';
print '</form>';
$db->free($resql);
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#checkall").click(function() {
jQuery(".checkformerge").attr('checked', true);
});
jQuery("#checknone").click(function() {
jQuery(".checkformerge").attr('checked', false);
});
});
</script>
<?php
}
else
{
print dol_print_error($db);
}
}
?>

View File

@ -247,11 +247,17 @@ if ($type == 'directory')
{
$relativepath=$ecmdir->getRelativePath();
$upload_dir = $conf->ecm->dir_output.'/'.$relativepath;
$filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','\.meta$','^temp$','^CVS$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
if ($section) $param.='&section='.$section;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")));
// If $section defined with value 0
if ($section === '0')
{
$filearray=array();
$textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
}
$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,$maxlengthname,'',$url);
}

View File

@ -235,6 +235,7 @@ class RssParser
//var_dump($opts);exit;
$context = stream_context_create($opts);
// FIXME avoid error if no connection
$str = file_get_contents($this->_urlRSS, false, $context);
}
catch (Exception $e) {

View File

@ -327,6 +327,7 @@ class Translate
/**
* Return translated value of key. Search in lang file, then into database.
* Key must be any complete entry into lang file: CurrencyEUR, ...
* If not found, return key.
* WARNING: To avoid infinite loop (getLabelFromKey->transnoentities->getTradFromKey), getLabelFromKey must
* not be called with same value than input.
@ -334,9 +335,11 @@ class Translate
* @param string $key Key to translate
* @return string Translated string
*/
function getTradFromKey($key)
private function getTradFromKey($key)
{
global $db;
//print 'xx'.$key;
$newstr=$key;
if (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i',$key,$reg))
{
@ -614,25 +617,28 @@ class Translate
/**
* Return a label for a key. Store key-label into cache variable $this->cache_labels to save SQL requests to get labels.
* This function can be used to get label in database but more often to get code from key id.
* Return a label for a key.
* Search into translation array, then into cache, then if still not found, search into database.
* Store key-label found into cache variable $this->cache_labels to save SQL requests to get labels.
*
* @param DoliBD $db Database handler
* @param string $key Key to get label (key in language file)
* @param string $tablename Table name without prefix
* @param string $fieldkey Field for key
* @param string $fieldlabel Field for label
* @return string Label in UTF8 (but without entities)
* @param DoliBD $db Database handler
* @param string $key Key to get label (key in language file)
* @param string $tablename Table name without prefix
* @param string $fieldkey Field for key
* @param string $fieldlabel Field for label
* @return string Label in UTF8 (but without entities)
*/
function getLabelFromKey($db,$key,$tablename,$fieldkey,$fieldlabel)
{
// If key empty
if ($key == '') return '';
// Check in language array
if ($this->transnoentities($key) != $key)
//print 'param: '.$key.'-'.$keydatabase.'-'.$this->trans($key); exit;
// Check if in language array (this can call getTradFromKey)
if ($this->transnoentitiesnoconv($key) != $key)
{
return $this->transnoentities($key); // Found in language array
return $this->transnoentitiesnoconv($key); // Found in language array
}
// Check in cache

View File

@ -56,6 +56,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
global $object;
dol_syslog("files.lib.php::dol_dir_list path=".$path." types=".$types." recursive=".$recursive." filter=".$filter." excludefilter=".json_encode($excludefilter));
//print 'xxx'."files.lib.php::dol_dir_list path=".$path." types=".$types." recursive=".$recursive." filter=".$filter." excludefilter=".json_encode($excludefilter);
$loaddate=($mode==1||$mode==2)?true:false;
$loadsize=($mode==1||$mode==3)?true:false;

View File

@ -951,10 +951,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
if (! empty($conf->commande->enabled))
{
$langs->load("orders");
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&amp;viewstatut=3", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&amp;viewstatut=-3", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
// if ($leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
if (isset($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL > 1)
if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
// Does this link is required now we have link into "Orders to bill" list ?
//if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
}
// Donations

View File

@ -546,7 +546,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
$oper = $outputlangs->getTradFromKey("PaymentTypeShort" . $row->code);
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $row->code);
$pdf->MultiCell(20, 3, $oper, 0, 'L', 0);
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);

View File

@ -30,8 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modAccounting
* \brief Classe de description et activation du module Comptabilite Expert
* Classe de description et activation du module Comptabilite Expert
*/
class modAccounting extends DolibarrModules
{
@ -85,47 +84,47 @@ class modAccounting extends DolibarrModules
$this->rights = array();
$this->rights_class = 'accounting';
$this->rights[1][0] = 50401;
$this->rights[1][1] = 'Lire le plan de compte';
$this->rights[1][2] = 'r';
$this->rights[1][3] = 1;
$this->rights[1][4] = 'plancompte';
$this->rights[1][5] = 'lire';
$this->rights[$r][0] = 50401;
$this->rights[$r][1] = 'Lire le plan de compte';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'plancompte';
$this->rights[$r][5] = 'lire';
$this->rights[2][0] = 50402;
$this->rights[2][1] = 'Creer/modifier un plan de compte';
$this->rights[2][2] = 'w';
$this->rights[2][3] = 0;
$this->rights[2][4] = 'plancompte';
$this->rights[2][5] = 'creer';
$this->rights[$r][0] = 50402;
$this->rights[$r][1] = 'Creer/modifier un plan de compte';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'plancompte';
$this->rights[$r][5] = 'creer';
$this->rights[3][0] = 50403;
$this->rights[3][1] = 'Cloturer plan de compte';
$this->rights[3][2] = 'w';
$this->rights[3][3] = 0;
$this->rights[3][4] = 'plancompte';
$this->rights[3][5] = 'cloturer';
$this->rights[$r][0] = 50403;
$this->rights[$r][1] = 'Cloturer plan de compte';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'plancompte';
$this->rights[$r][5] = 'cloturer';
$this->rights[4][0] = 50411;
$this->rights[4][1] = 'Lire les mouvements comptables';
$this->rights[4][2] = 'r';
$this->rights[4][3] = 1;
$this->rights[4][4] = 'mouvements';
$this->rights[4][5] = 'lire';
$this->rights[$r][0] = 50411;
$this->rights[$r][1] = 'Lire les mouvements comptables';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'mouvements';
$this->rights[$r][5] = 'lire';
$this->rights[5][0] = 50412;
$this->rights[5][1] = 'Creer/modifier/annuler les mouvements comptables';
$this->rights[5][2] = 'w';
$this->rights[5][3] = 0;
$this->rights[5][4] = 'mouvements';
$this->rights[5][5] = 'creer';
$this->rights[$r][0] = 50412;
$this->rights[$r][1] = 'Creer/modifier/annuler les mouvements comptables';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'mouvements';
$this->rights[$r][5] = 'creer';
$this->rights[6][0] = 50415;
$this->rights[6][1] = 'Lire CA, bilans, resultats, journaux, grands livres';
$this->rights[6][2] = 'r';
$this->rights[6][3] = 0;
$this->rights[6][4] = 'comptarapport';
$this->rights[6][5] = 'lire';
$this->rights[$r][0] = 50415;
$this->rights[$r][1] = 'Lire CA, bilans, resultats, journaux, grands livres';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'comptarapport';
$this->rights[$r][5] = 'lire';
}

View File

@ -26,7 +26,6 @@
* \ingroup member
* \brief File descriptor or module Member
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**

View File

@ -30,8 +30,7 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modAgenda
* \brief Classe de description et activation du module Adherent
* Classe de description et activation du module Adherent
*/
class modAgenda extends DolibarrModules
{

View File

@ -31,10 +31,8 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modBanque
* \brief Classe de description et activation du module Banque
* Classe de description et activation du module Banque
*/
class modBanque extends DolibarrModules
{

View File

@ -28,10 +28,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modBarcode
* \brief Classe de description et activation du module Barcode
* Classe de description et activation du module Barcode
*/
class modBarcode extends DolibarrModules
{

View File

@ -28,10 +28,8 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modBookmark
* \brief Classe de description et activation du module Bookmark
* Classe de description et activation du module Bookmark
*/
class modBookmark extends DolibarrModules
{

View File

@ -30,8 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modBoutique
* \brief Classe de description et activation du module OSCommerce
* Classe de description et activation du module OSCommerce
*/
class modBoutique extends DolibarrModules
{

View File

@ -26,8 +26,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modCashDesk
* \brief Class to describe and enable module Point Of Sales
* Class to describe and enable module Point Of Sales
*/
class modCashDesk extends DolibarrModules
{

View File

@ -27,8 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modCategorie
* \brief Classe de description et activation du module Categorie
* Classe de description et activation du module Categorie
*/
class modCategorie extends DolibarrModules
{

View File

@ -28,10 +28,8 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modClickToDial
* \brief Classe de description et activation du module de Click to Dial
* Classe de description et activation du module de Click to Dial
*/
class modClickToDial extends DolibarrModules
{

View File

@ -17,8 +17,8 @@
*/
/**
* \defgroup commissions Module Commissions
* \brief Example of a module descriptor.
* \defgroup commissions Module commissions
* \brief Module commissions
* \file htdocs/core/modules/modCommissions.class.php
* \ingroup commissions
* \brief Description and activation file for module Commissions

View File

@ -30,8 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modComptabilite
* \brief Classe de description et activation du module Comptabilite
* Classe de description et activation du module Comptabilite
*/
class modComptabilite extends DolibarrModules
{

View File

@ -29,10 +29,8 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
\class modContrat
\brief Classe de description et activation du module Contrat
* Classe de description et activation du module Contrat
*/
class modContrat extends DolibarrModules
{

View File

@ -27,8 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modDeplacement
* \brief Classe de description et activation du module Deplacement
* Classe de description et activation du module Deplacement
*/
class modDeplacement extends DolibarrModules
{

View File

@ -29,10 +29,8 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modDocument
* \brief Classe de description et activation du module Document
* Classe de description et activation du module Document
*/
class modDocument extends DolibarrModules
{

View File

@ -29,8 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modDon
* \brief Classe de description et activation du module Don
* Classe de description et activation du module Don
*/
class modDon extends DolibarrModules
{

View File

@ -26,8 +26,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modECM
* \brief Description and activation class for module ECM
/**
* Description and activation class for module ECM
*/
class modECM extends DolibarrModules
{

View File

@ -30,8 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modExpedition
* \brief Classe de description et activation du module Expedition
* Classe de description et activation du module Expedition
*/
class modExpedition extends DolibarrModules
{

View File

@ -27,10 +27,9 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modExport
* \brief Classe de description et activation du module export
/**
* Classe de description et activation du module export
*/
class modExport extends DolibarrModules
{

View File

@ -27,10 +27,9 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modExternalRss
* \brief Classe de description et activation du module externalrss
/**
* Classe de description et activation du module externalrss
*/
class modExternalRss extends DolibarrModules
{
@ -130,10 +129,10 @@ class modExternalRss extends DolibarrModules
function remove($options='')
{
$sql = array();
// Delete old declarations of RSS box
$this->boxes[0][1] = "box_external_rss.php";
return $this->_remove($sql,$options);
}

View File

@ -28,18 +28,17 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modExternalSite
\brief Description and activation class for module ExternalSite
*/
/**
* Description and activation class for module ExternalSite
*/
class modExternalSite extends DolibarrModules
{
/**
/**
* Constructor. Define names, constants, directories, boxes, permissions
*
* @param DoliDB $db Database handler
*/
*/
function __construct($db)
{
$this->db = $db;

View File

@ -27,8 +27,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modFTP
* \brief Description and activation class for module FTP
/**
* Description and activation class for module FTP
*/
class modFTP extends DolibarrModules
{

View File

@ -29,8 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modFckeditor
* \brief Classe de description et activation du module Fckeditor
* Classe de description et activation du module Fckeditor
*/
class modFckeditor extends DolibarrModules

View File

@ -32,8 +32,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modFicheinter
* \brief Classe de description et activation du module Ficheinter
* Classe de description et activation du module Ficheinter
*/
class modFicheinter extends DolibarrModules
{

View File

@ -26,8 +26,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modGeoIPMaxmind
* \brief Classe de description et activation du module Import
/**
* Classe de description et activation du module Import
*/
class modGeoIPMaxmind extends DolibarrModules
{

View File

@ -26,8 +26,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modGravatar
* \brief Description and activation class for module Gravatar
/**
* Description and activation class for module Gravatar
*/
class modGravatar extends DolibarrModules
{

View File

@ -20,16 +20,12 @@
*/
/**
* \defgroup holiday Payes Module holiday Payes
* \brief Module de gestion des congés payés
* \defgroup holiday Module holiday
* \brief Module de gestion des congés
* \file htdocs/includes/modules/modHoliday.class.php
* \ingroup holiday
* \brief Description and activation file for module holiday
*/
/**
* \file htdocs/includes/modules/modHoliday.class.php
* \ingroup holiday
* \brief Description and activation file for module holiday
*/
include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php");

View File

@ -27,8 +27,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modImport
* \brief Classe de description et activation du module Import
/**
* Classe de description et activation du module Import
*/
class modImport extends DolibarrModules
{

View File

@ -28,10 +28,8 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modLabel
* \brief Classe de description et activation du module Label
* Classe de description et activation du module Label
*/
class modLabel extends DolibarrModules
{

View File

@ -28,8 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modLdap
* \brief Classe de description et activation du module Ldap
* Classe de description et activation du module Ldap
*/
class modLdap extends DolibarrModules
{

View File

@ -29,8 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modMailing
* \brief Classe de description et activation du module Mailing
* Classe de description et activation du module Mailing
*/
class modMailing extends DolibarrModules
{
@ -75,35 +74,35 @@ class modMailing extends DolibarrModules
$this->rights = array();
$this->rights_class = 'mailing';
$r=0;
$r++;
$this->rights[$r][0] = 221; // id de la permission
$this->rights[$r][1] = 'Consulter les mailings'; // libelle de la permission
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
$this->rights[$r][4] = 'lire';
$r++;
$this->rights[$r][0] = 222;
$this->rights[$r][1] = 'Creer/modifier les mailings (sujet, destinataires...)';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'creer';
$r++;
$this->rights[$r][0] = 223;
$this->rights[$r][1] = 'Valider les mailings (permet leur envoi)';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'valider';
$r++;
$this->rights[$r][0] = 229;
$this->rights[$r][1] = 'Supprimer les mailings';
$this->rights[$r][2] = 'd';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'supprimer';
$r++;
$this->rights[$r][0] = 237;
$this->rights[$r][1] = 'View recipients and info';
@ -111,7 +110,7 @@ class modMailing extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'mailing_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
$this->rights[$r][5] = 'recipient';
$r++;
$this->rights[$r][0] = 238;
$this->rights[$r][1] = 'Manually send mailings';
@ -119,7 +118,7 @@ class modMailing extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'mailing_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
$this->rights[$r][5] = 'send';
$r++;
$this->rights[$r][0] = 239;
$this->rights[$r][1] = 'Delete mailings after validation and/or sent';

View File

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \defgroup margin Module Margin
/** \defgroup margin Module margin
* \brief Module to manage margins
* \file htdocs/includes/modules/modMargin.class.php
* \ingroup margin

View File

@ -23,12 +23,10 @@
* \ingroup notification
* \brief Fichier de description et activation du module Notification
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modNotification
* \brief Classe de description et activation du module Mailing
* Classe de description et activation du module Mailing
*/
class modNotification extends DolibarrModules
{

View File

@ -26,8 +26,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modPayBox
* \brief Description and activation class for module Paybox
/**
* Description and activation class for module Paybox
*/
class modPayBox extends DolibarrModules
{

View File

@ -27,8 +27,8 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** \class modPaypal
* \brief Description and activation class for module Paypal
/**
* Description and activation class for module Paypal
*/
class modPaypal extends DolibarrModules
{

View File

@ -30,8 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modPrelevement
* \brief Classe de description et activation du module Prelevement
* Classe de description et activation du module Prelevement
*/
class modPrelevement extends DolibarrModules
{

View File

@ -22,14 +22,10 @@
/**
* \defgroup produit Module products
* \brief Module to manage catalog of predefined products
*/
/**
* \file htdocs/core/modules/modProduct.class.php
* \ingroup produit
* \brief File to describe module to manage catalog of predefined products
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';

View File

@ -26,13 +26,11 @@
* \ingroup projet
* \brief Fichier de description et activation du module Projet
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modProjet
* \brief Classe de description et activation du module Projet
* Classe de description et activation du module Projet
*/
class modProjet extends DolibarrModules
{

View File

@ -27,13 +27,11 @@
* \ingroup propale
* \brief Fichier de description et activation du module Propale
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modPropale
* \brief Classe de description et activation du module Propale
* Classe de description et activation du module Propale
*/
class modPropale extends DolibarrModules
{

View File

@ -27,7 +27,6 @@
* \ingroup service
* \brief Fichier de description et activation du module Service
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';

View File

@ -26,13 +26,11 @@
* \ingroup societe
* \brief Fichier de description et activation du module Societe
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modSociete
* \brief Classe de description et activation du module Societe
* Classe de description et activation du module Societe
*/
class modSociete extends DolibarrModules
{

View File

@ -29,8 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modStock
* \brief Classe de description et activation du module Stock
* Classe de description et activation du module Stock
*/
class modStock extends DolibarrModules
{

View File

@ -27,8 +27,7 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modSyslog
* \brief Class to enable/disable module Logs
* Class to enable/disable module Logs
*/
class modSyslog extends DolibarrModules
{

View File

@ -27,13 +27,11 @@
* \ingroup tax
* \brief Fichier de description et activation du module Taxe
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modTax
* \brief Classe de description et activation du module Tax
* Classe de description et activation du module Tax
*/
class modTax extends DolibarrModules
{

View File

@ -28,8 +28,7 @@
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modUser
* \brief Classe de description et activation du module User
* Classe de description et activation du module User
*/
class modUser extends DolibarrModules
{

View File

@ -22,14 +22,11 @@
* \ingroup webservices
* \brief File to describe webservices module
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modWebServices
* \brief Class to describe a WebServices module
* Class to describe a WebServices module
*/
class modWebServices extends DolibarrModules
{

View File

@ -23,13 +23,11 @@
* \ingroup workflow
* \brief File to describe and activate module Workflow
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* \class modWorkflow
* \brief Classe de description et activation du module Workflow
* Classe de description et activation du module Workflow
*/
class modWorkflow extends DolibarrModules
{

View File

@ -765,7 +765,7 @@ if ($pageposafter > $pageposbefore) {
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
$oper = $outputlangs->getTradFromKey("PaymentTypeShort" . $row->code);
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $row->code);
$pdf->MultiCell(20, 3, $oper, 0, 'L', 0);
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);

View File

@ -272,6 +272,8 @@ ALTER TABLE llx_c_tva DROP COLUMN accountancy_code;
ALTER TABLE llx_c_tva ADD COLUMN accountancy_code_sell varchar(15) DEFAULT NULL AFTER active;
ALTER TABLE llx_c_tva ADD COLUMN accountancy_code_buy varchar(15) DEFAULT NULL AFTER accountancy_code_sell;
ALTER TABLE llx_c_chargessociales ADD COLUMN accountancy_code varchar(15) DEFAULT NULL AFTER code;
-- Tables for accountancy expert
DROP TABLE llx_accountingaccount;
DROP TABLE llx_accountingsystem;
@ -284,6 +286,8 @@ create table llx_accountingsystem
active smallint DEFAULT 0
)ENGINE=innodb;
ALTER TABLE llx_accountingsystem ADD INDEX idx_accountingsystem_pcg_version (pcg_version);
create table llx_accountingaccount
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
@ -299,6 +303,9 @@ create table llx_accountingaccount
ALTER TABLE llx_accountingaccount ADD INDEX idx_accountingaccount_fk_pcg_version (fk_pcg_version);
ALTER TABLE llx_accountingaccount ADD CONSTRAINT fk_accountingaccount_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version);
-- Data for accountancy expert
insert into llx_accountingsystem (rowid, pcg_version, fk_pays, label, active) VALUES (1,'PCG99-ABREGE', 1, 'The simple accountancy french plan', 1);
insert into llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 1,'PCG99-ABREGE','CAPIT', 'CAPITAL', '101', '1', 'Capital', '1');

View File

@ -0,0 +1,22 @@
-- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===========================================================================
ALTER TABLE llx_accountingsystem ADD INDEX idx_accountingsystem_pcg_version (pcg_version);

View File

@ -885,121 +885,8 @@ LDAPDescValues=Example values are designed for <b>OpenLDAP</b> with following lo
ForANonAnonymousAccess=For an authenticated acces (for a write access for example)
##### Products #####
ProductSetup=Ρυθμίσεις αρθρώματος προϊόντων
NumberOfProductShowInSelect=Max number of products in combos select lists (0=χωρίς όριο)
ConfirmDeleteProductLineAbility=Confirmation when removing product lines in forms
ModifyProductDescAbility=Personalization of product descriptions in forms
ViewProductDescInFormAbility=Visualization of product descriptions in the forms (otherwise as popup tooltip)
UseSearchToSelectProduct=Use a search form to choose a product (instead of using a list box).<br>Also if you have a large number of product (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
UseEcoTaxeAbility=Support Eco-Taxe (WEEE)
SetDefaultBarcodeTypeProducts=Default barcode type to use for products
SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties
##### Syslog #####
SyslogSetup=Syslog module setup
SyslogOutput=Log output
SyslogSyslog=Syslog
SyslogFacility=Facility
SyslogLevel=Level
SyslogSimpleFile=Αρχείο
SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known syslog constant
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt
##### Barcode #####
BarcodeSetup=Ρυθμίσεις Barcode
PaperFormatModule=Print format module
BarcodeEncodeModule=Barcode encoding type
UseBarcodeInProductModule=Use bar codes for products
CodeBarGenerator=Barcode generator
ChooseABarCode=No generator defined
FormatNotSupportedByGenerator=Format not supported by this generator
BarcodeDescEAN8=Barcode of type EAN8
BarcodeDescEAN13=Barcode of type EAN13
BarcodeDescUPC=Barcode of type UPC
BarcodeDescISBN=Barcode of type ISBN
BarcodeDescC39=Barcode of type C39
BarcodeDescC128=Barcode of type C128
##### Prelevements #####
WithdrawalsSetup=Withdrawal module setup
##### ExternalRSS #####
ExternalRSSSetup=External RSS imports setup
NewRSS=New RSS Feed
##### Mailing #####
MailingSetup=EMailing module setup
MailingEMailFrom=Sender EMail (From) for emails sent by emailing module
MailingEMailError=Return EMail (Errors-to) for emails with errors
##### Notification #####
NotificationSetup=Notification bu email module setup
NotificationEMailFrom=Sender EMail (From) for emails sent for notifications
##### Sendings #####
SendingsSetup=Sending module setup
SendingsReceiptModel=Sending receipt model
SendingsAbility=Support sendings sheets for customer deliveries
NoNeedForDeliveryReceipts=In most cases, sendings receipts are used both as sheets for customer deliveries (list of products to send) and sheets that is recevied and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated.
FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts
##### Deliveries #####
DeliveryOrderNumberingModules=Products deliveries receipt numbering module
DeliveryOrderModel=Products deliveries receipt model
DeliveriesOrderAbility=Support products deliveries receipts
##### FCKeditor #####
ActivateFCKeditor=Activate FCKeditor for:
FCKeditorForUsers=WYSIWIG creation/edition of user's description and note
FCKeditorForCompany=WYSIWIG creation/edition of companie's description and note
FCKeditorForProduct=WYSIWIG creation/edition of products/service's description and note
FCKeditorForMembers=WYSIWIG creation/edition of member's description and note
FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <font class="warning">Warning: Using this option for this case is seriously not recommanded as it can create problems with special characters and page formating when building PDF files.</font>
FCKeditorForProductDetailsPerso=WYSIWIG creation/edition of products personalized details lines for all entities (proposals, orders, invoices, etc...)
FCKeditorForMailing=WYSIWIG creation/edition of mailings
##### OSCommerce 1 #####
OSCommerceErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be an OSCommerce database (Key %s not found in table %s).
OSCommerceTestOk=Connection to server '%s' on database '%s' with user '%s' successfull.
OSCommerceTestKo1=Connection to server '%s' succeed but database '%s' could not be reached.
OSCommerceTestKo2=Connection to server '%s' with user '%s' failed.
##### Mantis #####
MantisSetup=Mantis link setup
MantisURL=URL for Mantis access
MantisServer=Server hosting Mantis database
MantisDatabaseName=Database name
MantisUser=User to access database
MantisSetupSaved=Mantis setup saved successfully.
MantisTestOk=Connection to server '%s' on database '%s' with user '%s' successfull.
MantisTestKo1=Connection to server '%s' succeed but database '%s' could not be reached.
MantisTestKo2=Connection to server '%s' with user '%s' failed.
MantisErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Mantis database.
##### Stock #####
StockSetup=Configuration module stock
UserWarehouse=Use user personal stocks
##### Menu #####
MenuDeleted=Menu deleted
TreeMenu=Tree menus
Menus=Menus
TreeMenuPersonalized=Personalized menus
NewMenu=New menu
MenuConf=Menus setup
Menu=Selection of menu
MenuHandler=Menu handler
MenuModule=Source module
HideUnauthorizedMenu= Hide unauthorized menus (gray)
DetailId=Id menu
DetailMenuHandler=Menu handler where to show new menu
DetailMenuModule=Module name if menu entry come from a module
DetailType=Type of menu (top or left)
DetailTitre=Menu label or label code for translation
DetailMainmenu=Group for which it belongs (obsolete)
DetailUrl=URL where menu send you (Absolute URL link or external link with http://)
DetailLeftmenu=Display condition or not (obsolete)
DetailEnabled=Condition to show or not entry
DetailRight=Condition to display unauthorized grey menus
DetailLangs=Lang file name for label code translation
DetailUser=Intern / Extern / All
DetailTarget=Target for links (_blank top open a new window)
DetailLevel=Level (-1:top menu, 0:header menu, >0 menu and sub menu)
ModifMenu=Menu change
DeleteMenu=Delete menu entry
ConfirmDeleteMenu=Are you sure you want to delete menu entry <b>%s</b> ?
DeleteLine=Delete line
ConfirmDeleteLine=Are you sure you want to delete this line ?
##### Tax #####
TaxSetup=Taxes, social contributions and dividends module setup
OptionVatMode=VAT due
@ -1011,56 +898,10 @@ SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default accordin
OnDelivery=Κατά την αποστολή
OnPayment=Κατά την πληρωμή
OnInvoice=Κατά την έκδοση τιμ/γίου
SupposedToBePaymentDate=Payment date used if delivery date not known
SupposedToBeInvoiceDate=Invoice date used
Buy=Αγορά
Sell=Πώληση
InvoiceDateUsed=Invoice date used
YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Foundation), so there is no VAT options to setup.
##### Agenda #####
AgendaSetup=Actions and agenda module setup
PasswordTogetVCalExport=Key to authorize export link
PastDelayVCalExport=Do not export event older than
##### ClickToDial #####
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
##### Point Of Sales (CashDesk) #####
CashDesk=Σημείο Πωλήσεων
CashDeskSetup=Point of sales module setup
CashDeskThirdPartyForSell=Generic third party to use for sells
CashDeskBankAccountForSell=Account to use to receive cash payments
CashDeskBankAccountForCheque= Account to use to receive payments by cheque
CashDeskBankAccountForCB= Account to use to receive cash payments by credit cards
CashDeskIdWareHouse=Warehouse to use for sells
##### Bookmark #####
BookmarkSetup=Bookmark module setup
BookmarkDesc=This module allows you to manage bookmarks. You can also add shortcuts to any Dolibarr pages or externale web sites on your left menu.
NbOfBoomarkToShow=Maximum number of bookmarks to show in left menu
##### WebServices #####
WebServicesSetup=Webservices module setup
WebServicesDesc=By enabling this module, Dolibarr become a web service server to provide miscellaneous web services.
WSDLCanBeDownloadedHere=WSDL descriptor file of provided serviceses can be download here
EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint available at Url
##### Bank #####
BankSetupModule=Bank module setup
FreeLegalTextOnChequeReceipts=Free text on cheque receipts
##### Multicompany #####
MultiCompanySetup=Multi-company module setup
##### Suppliers #####
SuppliersSetup=Supplier module setup
SuppliersCommandModel=Complete template of supplier order (logo...)
SuppliersInvoiceModel=Complete template of supplier invoice (logo...)
##### GeoIPMaxmind #####
GeoIPMaxmindSetup=GeoIP Maxmind module setup
PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.<br>Example: /usr/local/share/GeoIP/GeoIP.dat
NoteOnPathLocation=Note that your ip to country data file must be inside a directory your PHP can read (Check your PHP open_basedir setup and filesystem permissions).
YouCanDownloadFreeDatFileTo=You can download a <b>free demo version</b> of the Maxmind GeoIP country file at %s.
YouCanDownloadAdvancedDatFileTo=You can also download a more <b>complete version, with updates,</b> of the Maxmind GeoIP country file at %s.
TestGeoIPResult=Test of a conversion IP -> country
##### Projects #####
ProjectsNumberingModules=Projects numbering module
ProjectsSetup=Project module setup
ProjectsModelModule=Project's report document model
// START - Lines generated via autotranslator.php tool (2011-06-26 15:35:22).
// Reference language: en_US -> el_GR

View File

@ -15,4 +15,8 @@ MenuChequesReceipts=Cheques receipts
ChequesReceipts=Cheques receipts
ChequesArea=Cheques deposits area
ChequeDeposits=Cheques deposits
Cheques=Cheques
Cheques=Cheques
# PaymentConditions
PaymentConditionShortRECEP=Due on Receipt
PaymentConditionRECEP=Due on Receipt

View File

@ -1311,7 +1311,7 @@ CashDeskSetup=Point of sales module setup
CashDeskThirdPartyForSell=Generic third party to use for sells
CashDeskBankAccountForSell=Default account to use to receive cash payments
CashDeskBankAccountForCheque= Default account to use to receive payments by cheque
CashDeskBankAccountForCB= Default account to use to receive cash payments by credit cards
CashDeskBankAccountForCB= Default account to use to receive payments by credit cards
CashDeskIdWareHouse=Warehouse to use for sells
##### Bookmark #####
BookmarkSetup=Bookmark module setup

View File

@ -50,4 +50,6 @@ ConfirmDeleteSection=Can you confirm you want to delete the directory <b>%s</b>
ECMDirectoryForFiles=Relative directory for files
CannotRemoveDirectoryContainsFiles=Removed not possible because it contains some files
ECMFileManager=File manager
ECMSelectASection=Select a directory on left tree...
ECMSelectASection=Select a directory on left tree...
DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Refresh" button first to synchronize disk and database to get content of this directory.

View File

@ -24,7 +24,7 @@ ValidateByCP=Will be validated by
DescCP=Description
SendRequestCP=Creating demand for holidays
DelayToRequestCP=Applications for holidays must be made at least <b>%s day(s)</b> before them.
MenuConfCP=Define the holidays
MenuConfCP=Edit balance of holidays
UpdateAllCP=Update the holidays
SoldeCPUser=Your balance of holidays is <b>%s</b> days.
ErrorEndDateCP=You must select an end date greater than the start date.

View File

@ -33,6 +33,7 @@ StatusOrderSent=Shipment in process
StatusOrderOnProcessShort=Reception
StatusOrderProcessedShort=Processed
StatusOrderToBillShort=Delivered
StatusOrderToBill2Short=To bill
StatusOrderApprovedShort=Approved
StatusOrderRefusedShort=Refused
StatusOrderToProcessShort=To process
@ -44,6 +45,7 @@ StatusOrderValidated=Validated
StatusOrderOnProcess=Waiting to receive
StatusOrderProcessed=Processed
StatusOrderToBill=Delivered
StatusOrderToBill2=To bill
StatusOrderApproved=Approved
StatusOrderRefused=Refused
StatusOrderReceivedPartially=Partially received
@ -52,6 +54,7 @@ ShippingExist=A shipment exists
DraftOrWaitingApproved=Draft or approved not yet ordered
DraftOrWaitingShipped=Draft or validated not yet shipped
MenuOrdersToBill=Orders delivered
MenuOrdersToBill2=Orders to bill
SearchOrder=Search order
Sending=Sending
Sendings=Sendings
@ -154,4 +157,4 @@ OrderByPhone=Phone
CreateInvoiceForThisCustomer=Create an invoice for several orders of this customer
CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders.
NoOrdersToInvoice=No orders to invoice
NoOrdersToInvoice=No orders to invoice

View File

@ -1355,3 +1355,8 @@ TestGeoIPResult=Test de conversion IP -> Pays
ProjectsNumberingModules=Modèles de numérotation des références projets
ProjectsSetup=Configuration du module Projets
ProjectsModelModule=Modèles de document de rapport projets
#### Accountancy ####
Chartofaccounts=Plan comptable
Definechartofaccounts=Définir un plan comptable
Selectchartofaccounts=Sélection d'un plan comptable
DoNotSuggestChart=Ne pas suggérer de plan comptable

View File

@ -159,4 +159,4 @@ RemainToDivide=Reste à répartir :
WarningDepositsNotIncluded=Les factures d'accomptes ne sont pas encore prises en compte dans cette version avec ce module de comptabilité.
Pcg_version=Version du plan
Pcg_type=Classe de compte
Pcg_subtype=Sous classe de compte
Pcg_subtype=Sous classe de compte

View File

@ -50,4 +50,5 @@ ConfirmDeleteSection=Confirmez-vous la suppression du répertoire <b>%s</b> ?
ECMDirectoryForFiles=Répertoire relatif pour les fichiers
CannotRemoveDirectoryContainsFiles=Suppression impossible car des fichiers sont présents
ECMFileManager=Gestionnaire fichier
ECMSelectASection=Sélectionner un répertoire sur l'arbre de gauche...
ECMSelectASection=Sélectionner un répertoire sur l'arbre de gauche...
DirNotSynchronizedSyncFirst=Ce répertoire a été crée ou modifié en dehors du module GED. Cliquer sur le bouton "Rafraichir" afin de resyncronizer les informations sur disque et la base pour voir le contenu de ce répertoire.

View File

@ -24,7 +24,7 @@ ValidateByCP=Sera validée par
DescCP=Description
SendRequestCP=Envoyer la demande de congés
DelayToRequestCP=Les demandes de congés doivent être faites au moins <b>%s jours</b> avant la date</b> de ceux-ci.
MenuConfCP=Définir les congés
MenuConfCP=Mettre à jour solde
UpdateAllCP=Mettre à jour les congés
SoldeCPUser=Votre solde de congés est de <b>%s jours</b>.
ErrorEndDateCP=Vous devez choisir une date de fin supérieur à la date de début.

View File

@ -33,6 +33,7 @@ StatusOrderSentShort=Envoi en cours
StatusOrderSent=Envoi en cours
StatusOrderProcessedShort=Traitée
StatusOrderToBillShort=Délivrée
StatusOrderToBill2Short=A facturer
StatusOrderApprovedShort=Approuvée
StatusOrderRefusedShort=Refusée
StatusOrderToProcessShort=A traiter
@ -44,6 +45,7 @@ StatusOrderValidated=Validée
StatusOrderOnProcess=Attente réception
StatusOrderProcessed=Traitée
StatusOrderToBill=Délivrée
StatusOrderToBill2=A facturer
StatusOrderApproved=Approuvée
StatusOrderRefused=Refusée
StatusOrderReceivedPartially=Reçu partiellement
@ -53,6 +55,7 @@ DraftOrWaitingApproved=Brouillon ou approuvée pas encore commandée
DraftOrWaitingShipped=Brouillon ou validée pas encore expédiée
SearchOrder=Rechercher une commande
MenuOrdersToBill=Commandes délivrées
MenuOrdersToBill2=Commandes à facturer
Sending=Expédition
Sendings=Expéditions
ShipProduct=Expédier produit
@ -155,4 +158,4 @@ OrderByPhone=Téléphone
CreateInvoiceForThisCustomer=Créer une facture à partir de plusieurs commande de ce client
CloseProcessedOrdersAutomatically=Classer automatiquement à "Traitées" les commandes sélectionnées.
NoOrdersToInvoice=Pas de commande à facturer
NoOrdersToInvoice=Pas de commande à facturer

View File

@ -837,7 +837,8 @@ else
// Note (private, no output on invoices, propales...)
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>';
$doleditor = new DolEditor('note', GETPOST('note'), '', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
$doleditor = new DolEditor('note', GETPOST('note'), '', 180, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
$doleditor->Create();
print "</td></tr>";
@ -951,7 +952,8 @@ else
// Description (used in invoice, propal...)
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
$doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 90);
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
$doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 90);
$doleditor->Create();
print "</td></tr>";

View File

@ -101,7 +101,7 @@ if ($result)
print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("LastConnexion"),"index.php","u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),"index.php","u.status",$param,"",'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="right"',$sortfield,$sortorder);
print "</tr>\n";
$var=True;
while ($i < $num)