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

Conflicts:
	ChangeLog
	htdocs/comm/propal.php
	htdocs/commande/fiche.php
	htdocs/compta/facture.php
	htdocs/fichinter/class/fichinter.class.php
	htdocs/fichinter/fiche.php
This commit is contained in:
Laurent Destailleur 2013-05-20 21:21:03 +02:00
commit 12681994ea
24 changed files with 1132 additions and 1052 deletions

View File

@ -69,6 +69,7 @@ For users:
- New: [ task #741 ] Add intervention box. - New: [ task #741 ] Add intervention box.
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated. - New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated.
- New: [ task #823 ] Shipping_validate email notification. - New: [ task #823 ] Shipping_validate email notification.
- New: [ task #900 ] Review code of ficheinter.class.php
For translators: For translators:
- Update language files. - Update language files.
@ -112,6 +113,7 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: Can't reset payment due date - Fix: Can't reset payment due date
- Fix: Orderstoinvoice didn't act as expected when no order was checked - Fix: Orderstoinvoice didn't act as expected when no order was checked
- Fix: Bad link to all proposals into Third party card if customer is prospect - Fix: Bad link to all proposals into Third party card if customer is prospect
- Fix: Some bugs on withdrawal rejects
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed - Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment - Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment
- Fix: [ bug #789 ] VAT not being calculated in POS - Fix: [ bug #789 ] VAT not being calculated in POS
@ -131,7 +133,7 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work - Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work
- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay - Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay
- Fix: [ bug #788 ] Date of linked interventions are not shown - Fix: [ bug #788 ] Date of linked interventions are not shown
- Fix: external users should not see costprice and margin infos
***** ChangeLog for 3.3.1 compared to 3.3 ***** ***** ChangeLog for 3.3.1 compared to 3.3 *****

View File

@ -455,7 +455,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_FREE_TEXT">'; print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_FREE_TEXT">';
print '<tr '.$bc[$var].'><td colspan="2">'; print '<tr '.$bc[$var].'><td colspan="2">';
print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')<br>'; print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')<br>';
print '<textarea name="SUPPLIER_ORDER_FREE_TEXT" class="flat" cols="120">'.$conf->global->SUPPLIER_ORDER_FREE_TEXT.'</textarea>'; print '<textarea name="SUPPLIER_ORDER_FREE_TEXT" class="flat" cols="120">'.$conf->global->SUPPLIER_ORDER_FREE_TEXT.'</textarea>';
print '</td><td align="right">'; print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';

View File

@ -1,34 +1,34 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* \file htdocs/comm/propal.php * \file htdocs/comm/propal.php
* \ingroup propale * \ingroup propale
* \brief Page of commercial proposals card and list * \brief Page of commercial proposals card and list
*/ */
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
@ -638,6 +638,7 @@ else if ($action == "addline" && $user->rights->propal->creer)
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
$price_ht = GETPOST('price_ht'); $price_ht = GETPOST('price_ht');
$tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0); $tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0);
$predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
if (empty($idprod) && GETPOST('type') < 0) if (empty($idprod) && GETPOST('type') < 0)
{ {
@ -1968,7 +1969,7 @@ else
// Show object lines // Show object lines
$result = $object->getLinesArray(); $result = $object->getLinesArray();
if (! empty($object->lines)) if (! empty($object->lines))
$ret=$object->printObjectLines($action,$mysoc,$soc,$lineid); $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1);
// Form to add new line // Form to add new line
if ($object->statut == 0 && $user->rights->propal->creer) if ($object->statut == 0 && $user->rights->propal->creer)

View File

@ -26,6 +26,7 @@
include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
/** /**
@ -49,14 +50,14 @@ class PropaleStats extends Stats
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
* @param int $socid Id third party * @param int $socid Id third party
* @param int $userid Id user for filter * @param int $userid Id user for filter (creation user)
*/ */
function __construct($db, $socid=0, $userid=0) function __construct($db, $socid=0, $userid=0)
{ {
global $user, $conf; global $user, $conf;
$this->db = $db; $this->db = $db;
$this->socid = $socid; $this->socid = ($socid > 0 ? $socid : 0);
$this->userid = $userid; $this->userid = $userid;
$object=new Propal($this->db); $object=new Propal($this->db);
@ -66,7 +67,7 @@ class PropaleStats extends Stats
$this->field='total_ht'; $this->field='total_ht';
$this->where.= " fk_statut > 0"; $this->where.= " p.fk_statut > 0";
$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity; $this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$user->societe_id) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; if (!$user->rights->societe->client->voir && !$user->societe_id) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
if($this->socid) if($this->socid)
@ -90,7 +91,7 @@ class PropaleStats extends Stats
$sql = "SELECT date_format(p.datep,'%m') as dm, count(*)"; $sql = "SELECT date_format(p.datep,'%m') as dm, count(*)";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(p.datep,'%Y') = '".$year."'"; $sql.= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -131,7 +132,7 @@ class PropaleStats extends Stats
$sql = "SELECT date_format(p.datep,'%m') as dm, sum(p.".$this->field.")"; $sql = "SELECT date_format(p.datep,'%m') as dm, sum(p.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(p.datep,'%Y') = '".$year."'"; $sql.= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -152,7 +153,7 @@ class PropaleStats extends Stats
$sql = "SELECT date_format(p.datep,'%m') as dm, avg(p.".$this->field.")"; $sql = "SELECT date_format(p.datep,'%m') as dm, avg(p.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(p.datep,'%Y') = '".$year."'"; $sql.= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');

View File

@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0; $userid=GETPOST('userid','int');
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0; $socid=GETPOST('socid','int');
// Security check // Security check
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
@ -63,7 +63,7 @@ $dir=$conf->propal->dir_temp;
dol_mkdir($dir); dol_mkdir($dir);
$stats = new PropaleStats($db, $socid, $userid); $stats = new PropaleStats($db, $socid, ($userid>0?$userid:0));
// Build graphic number of object // Build graphic number of object
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear); $data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
@ -233,12 +233,13 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print $form->select_company($socid,'socid',$filter,1); print $form->select_company($socid,'socid',$filter,1);
print '</td></tr>'; print '</td></tr>';
// User // User
print '<tr><td align="left">'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td align="left">'; print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
print $form->select_users($userid,'userid',1); print $form->select_users($userid,'userid',1);
print '</td></tr>'; print '</td></tr>';
// Year // Year
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">'; print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear;
arsort($arrayyears); arsort($arrayyears);
print $form->selectarray('year',$arrayyears,$year,0); print $form->selectarray('year',$arrayyears,$year,0);
print '</td></tr>'; print '</td></tr>';

View File

@ -26,6 +26,7 @@
include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php'; include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
/** /**
@ -49,7 +50,7 @@ class CommandeStats extends Stats
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
* @param int $socid Id third party for filter * @param int $socid Id third party for filter
* @param string $mode Option * @param string $mode Option
* @param int $userid Id user for filter * @param int $userid Id user for filter (creation user)
*/ */
function __construct($db, $socid, $mode, $userid=0) function __construct($db, $socid, $mode, $userid=0)
{ {
@ -57,7 +58,7 @@ class CommandeStats extends Stats
$this->db = $db; $this->db = $db;
$this->socid = $socid; $this->socid = ($socid > 0 ? $socid : 0);
$this->userid = $userid; $this->userid = $userid;
if ($mode == 'customer') if ($mode == 'customer')
@ -100,7 +101,7 @@ class CommandeStats extends Stats
$sql = "SELECT date_format(c.date_commande,'%m') as dm, count(*) nb"; $sql = "SELECT date_format(c.date_commande,'%m') as dm, count(*) nb";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'"; $sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -143,7 +144,7 @@ class CommandeStats extends Stats
$sql = "SELECT date_format(c.date_commande,'%m') as dm, sum(c.".$this->field.")"; $sql = "SELECT date_format(c.date_commande,'%m') as dm, sum(c.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'"; $sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -165,7 +166,7 @@ class CommandeStats extends Stats
$sql = "SELECT date_format(c.date_commande,'%m') as dm, avg(c.".$this->field.")"; $sql = "SELECT date_format(c.date_commande,'%m') as dm, avg(c.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'"; $sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');

View File

@ -36,8 +36,8 @@ $mode=GETPOST("mode")?GETPOST("mode"):'customer';
if ($mode == 'customer' && ! $user->rights->commande->lire) accessforbidden(); if ($mode == 'customer' && ! $user->rights->commande->lire) accessforbidden();
if ($mode == 'supplier' && ! $user->rights->fournisseur->commande->lire) accessforbidden(); if ($mode == 'supplier' && ! $user->rights->fournisseur->commande->lire) accessforbidden();
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0; $userid=GETPOST('userid','int');
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0; $socid=GETPOST('socid','int');
// Security check // Security check
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
@ -77,7 +77,7 @@ print_fiche_titre($title);
dol_mkdir($dir); dol_mkdir($dir);
$stats = new CommandeStats($db, $socid, $mode, $userid); $stats = new CommandeStats($db, $socid, $mode, ($userid>0?$userid:0));
// Build graphic number of object // Build graphic number of object
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear); $data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
@ -255,12 +255,13 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print $form->select_company($socid,'socid',$filter,1); print $form->select_company($socid,'socid',$filter,1);
print '</td></tr>'; print '</td></tr>';
// User // User
print '<tr><td align="left">'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td align="left">'; print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
print $form->select_users($userid,'userid',1); print $form->select_users($userid,'userid',1);
print '</td></tr>'; print '</td></tr>';
// Year // Year
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">'; print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear;
arsort($arrayyears); arsort($arrayyears);
print $form->selectarray('year',$arrayyears,$year,0); print $form->selectarray('year',$arrayyears,$year,0);
print '</td></tr>'; print '</td></tr>';

View File

@ -3292,7 +3292,7 @@ else if ($id > 0 || ! empty($ref))
foreach($extrafields->attribute_label as $key=>$label) foreach($extrafields->attribute_label as $key=>$label)
{ {
if ($action == 'edit_extras') { if ($action == 'edit_extras') {
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
} else { } else {
$value=$object->array_options["options_".$key]; $value=$object->array_options["options_".$key];
} }

View File

@ -48,12 +48,12 @@ class FactureStats extends Stats
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
* @param int $socid Id third party * @param int $socid Id third party
* @param string $mode Option * @param string $mode Option
* @param int $userid Id user for filter * @param int $userid Id user for filter (creation user)
* @return FactureStats * @return FactureStats
*/ */
function __construct($db, $socid, $mode, $userid=0) function __construct($db, $socid, $mode, $userid=0)
{ {
global $conf; global $user, $conf;
$this->db = $db; $this->db = $db;
$this->socid = ($socid > 0 ? $socid : 0); $this->socid = ($socid > 0 ? $socid : 0);
@ -62,41 +62,25 @@ class FactureStats extends Stats
if ($mode == 'customer') if ($mode == 'customer')
{ {
$object=new Facture($this->db); $object=new Facture($this->db);
$this->from = MAIN_DB_PREFIX.$object->table_element; $this->from = MAIN_DB_PREFIX.$object->table_element." as f";
$this->field='total'; $this->field='total';
} }
if ($mode == 'supplier') if ($mode == 'supplier')
{ {
$object=new FactureFournisseur($this->db); $object=new FactureFournisseur($this->db);
$this->from = MAIN_DB_PREFIX.$object->table_element; $this->from = MAIN_DB_PREFIX.$object->table_element." as f";
$this->field='total_ht'; $this->field='total_ht';
} }
$this->where = " fk_statut > 0"; $this->where = " f.fk_statut > 0";
$this->where.= " AND entity = ".$conf->entity; $this->where.= " AND f.entity = ".$conf->entity;
if ($mode == 'customer') $this->where.=" AND (fk_statut <> 3 OR close_code <> 'replaced')"; // Exclude replaced invoices as they are duplicated (we count closed invoices for other reasons) if (!$user->rights->societe->client->voir && !$user->societe_id) $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($mode == 'customer') $this->where.=" AND (f.fk_statut <> 3 OR f.close_code <> 'replaced')"; // Exclude replaced invoices as they are duplicated (we count closed invoices for other reasons)
if ($this->socid) if ($this->socid)
{ {
$this->where.=" AND fk_soc = ".$this->socid; $this->where.=" AND f.fk_soc = ".$this->socid;
} }
if ($this->userid > 0) $this->where.=' AND fk_user_author = '.$this->userid; if ($this->userid > 0) $this->where.=' AND f.fk_user_author = '.$this->userid;
}
/**
* Renvoie le nombre de facture par annee
*
* @return array Array of values
*/
function getNbByYear()
{
$sql = "SELECT YEAR(datef) as dm, COUNT(*)";
$sql.= " FROM ".$this->from;
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByYear($sql);
} }
@ -108,9 +92,10 @@ class FactureStats extends Stats
*/ */
function getNbByMonth($year) function getNbByMonth($year)
{ {
$sql = "SELECT MONTH(datef) as dm, COUNT(*)"; $sql = "SELECT MONTH(f.datef) as dm, COUNT(*)";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
$sql.= " WHERE datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -121,6 +106,24 @@ class FactureStats extends Stats
} }
/**
* Renvoie le nombre de facture par annee
*
* @return array Array of values
*/
function getNbByYear()
{
$sql = "SELECT YEAR(f.datef) as dm, COUNT(*)";
$sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByYear($sql);
}
/** /**
* Renvoie le montant de facture par mois pour une annee donnee * Renvoie le montant de facture par mois pour une annee donnee
* *
@ -129,9 +132,10 @@ class FactureStats extends Stats
*/ */
function getAmountByMonth($year) function getAmountByMonth($year)
{ {
$sql = "SELECT date_format(datef,'%m') as dm, SUM(".$this->field.")"; $sql = "SELECT date_format(datef,'%m') as dm, SUM(f.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
$sql.= " WHERE date_format(datef,'%Y') = '".$year."'"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -149,9 +153,10 @@ class FactureStats extends Stats
*/ */
function getAverageByMonth($year) function getAverageByMonth($year)
{ {
$sql = "SELECT date_format(datef,'%m') as dm, AVG(".$this->field.")"; $sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
$sql.= " WHERE datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@ -166,8 +171,9 @@ class FactureStats extends Stats
*/ */
function getAllByYear() function getAllByYear()
{ {
$sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; $sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where; $sql.= " WHERE ".$this->where;
$sql.= " GROUP BY year"; $sql.= " GROUP BY year";
$sql.= $this->db->order('year','DESC'); $sql.= $this->db->order('year','DESC');

View File

@ -233,12 +233,13 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print $form->select_company($socid,'socid',$filter,1); print $form->select_company($socid,'socid',$filter,1);
print '</td></tr>'; print '</td></tr>';
// User // User
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>'; print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
print $form->select_users($userid,'userid',1); print $form->select_users($userid,'userid',1);
print '</td></tr>'; print '</td></tr>';
// Year // Year
print '<tr><td>'.$langs->trans("Year").'</td><td>'; print '<tr><td>'.$langs->trans("Year").'</td><td>';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear;
arsort($arrayyears); arsort($arrayyears);
print $form->selectarray('year',$arrayyears,$year,0); print $form->selectarray('year',$arrayyears,$year,0);
print '</td></tr>'; print '</td></tr>';

View File

@ -2712,7 +2712,7 @@ abstract class CommonObject
*/ */
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0)
{ {
global $conf,$langs,$hookmanager; global $conf,$langs,$user,$hookmanager;
print '<tr class="liste_titre nodrag nodrop">'; print '<tr class="liste_titre nodrag nodrop">';
@ -2735,7 +2735,8 @@ abstract class CommonObject
// Reduction short // Reduction short
print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>'; print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>';
if (! empty($conf->margin->enabled)) { if (! empty($conf->margin->enabled) && empty($user->societe_id))
{
if ($conf->global->MARGIN_TYPE == "1") if ($conf->global->MARGIN_TYPE == "1")
print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>'; print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>';
else else
@ -3159,11 +3160,16 @@ abstract class CommonObject
} }
/** /**
* displayMarginInfos
* *
* @param string $force_price * @param string $force_price Force price
* @return void
*/ */
function displayMarginInfos($force_price=false) { function displayMarginInfos($force_price=false)
global $langs, $conf; {
global $langs, $conf, $user;
if (! empty($user->societe_id)) return;
$marginInfo = $this->getMarginInfos($force_price); $marginInfo = $this->getMarginInfos($force_price);
@ -3215,6 +3221,5 @@ abstract class CommonObject
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
} }
} }
?> ?>

View File

@ -80,7 +80,7 @@ class modMargin extends DolibarrModules
// New pages on tabs // New pages on tabs
$this->tabs = array( $this->tabs = array(
'product:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/productMargins.php?id=__ID__', 'product:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/productMargins.php?id=__ID__',
'thirdparty:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/thirdpartyMargins.php?socid=__ID__' 'thirdparty:+margin:Margins:margins:$conf->margin->enabled && empty($user->societe_id):/margin/tabs/thirdpartyMargins.php?socid=__ID__'
); );

View File

@ -136,22 +136,19 @@ if ($forgetpasslink || $helpcenterlink)
if ($forgetpasslink) { if ($forgetpasslink) {
echo '<a class="alogin" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam.'">('; echo '<a class="alogin" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam.'">(';
echo $langs->trans('PasswordForgotten'); echo $langs->trans('PasswordForgotten');
if (! $helpcenterlink) { if (! $helpcenterlink) echo ')';
echo ')';
}
echo '</a>'; echo '</a>';
} }
if ($forgetpasslink && $helpcenterlink) echo '&nbsp;-&nbsp;';
if ($helpcenterlink) { if ($helpcenterlink) {
$url=DOL_URL_ROOT.'/support/index.php'.$moreparam; $url=DOL_URL_ROOT.'/support/index.php'.$moreparam;
if (! empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) $url=$conf->global->MAIN_HELPCENTER_LINKTOUSE; if (! empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) $url=$conf->global->MAIN_HELPCENTER_LINKTOUSE;
echo '<a class="alogin" href="'.dol_escape_htmltag($url).'" target="_blank">'; echo '<a class="alogin" href="'.dol_escape_htmltag($url).'" target="_blank">';
if ($forgetpasslink) { if (! $forgetpasslink) echo '(';
echo '&nbsp;-&nbsp;'; echo $langs->trans('NeedHelpCenter');
} else { echo ')</a>';
echo '(';
}
echo $langs->trans('NeedHelpCenter').')</a>';
} }
echo '</div>'; echo '</div>';
} }

View File

@ -119,7 +119,7 @@
<td>&nbsp;</td> <td>&nbsp;</td>
<?php } <?php }
if (! empty($conf->margin->enabled)) { if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
?> ?>
<td align="right" class="nowrap"><?php echo price($line->pa_ht); ?></td> <td align="right" class="nowrap"><?php echo price($line->pa_ht); ?></td>
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?> <?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?>

View File

@ -1,28 +1,28 @@
<?php <?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* \file htdocs/fichinter/class/fichinter.class.php * \file htdocs/fichinter/class/fichinter.class.php
* \ingroup ficheinter * \ingroup ficheinter
* \brief Fichier de la classe des gestion des fiches interventions * \brief Fichier de la classe des gestion des fiches interventions
*/ */
require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
@ -61,7 +61,7 @@ class Fichinter extends CommonObject
* Constructor * Constructor
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) function __construct($db)
{ {
$this->db = $db; $this->db = $db;
@ -170,12 +170,13 @@ class Fichinter extends CommonObject
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if (! $resql) $error++; if (! $resql) $error++;
} }
// Add linked object // Add linked object
if (! $error && $this->origin && $this->origin_id) if (! $error && $this->origin && $this->origin_id)
{ {
$ret = $this->add_object_linked(); $ret = $this->add_object_linked();
if (! $ret) dol_print_error($this->db); if (! $ret) dol_print_error($this->db);
} }
if (! $notrigger) if (! $notrigger)
{ {
@ -318,7 +319,7 @@ class Fichinter extends CommonObject
/* /*
* Lines * Lines
*/ */
$result=$this->fetch_lines(); $result=$this->fetch_lines();
if ($result < 0) if ($result < 0)
{ {
@ -669,8 +670,8 @@ class Fichinter extends CommonObject
$this->db->begin(); $this->db->begin();
// Delete linked object // Delete linked object
$res = $this->deleteObjectLinked(); $res = $this->deleteObjectLinked();
if ($res < 0) $error++; if ($res < 0) $error++;
// Delete linked contacts // Delete linked contacts
$res = $this->delete_linked_contact(); $res = $this->delete_linked_contact();
@ -735,8 +736,9 @@ class Fichinter extends CommonObject
if ($result < 0) { if ($result < 0) {
$error++; $this->errors=$interface->errors; $error++; $this->errors=$interface->errors;
} }
// Fin appel triggers // Fin appel triggers
} }
$this->db->commit(); $this->db->commit();
return 1; return 1;
} }
@ -865,11 +867,11 @@ class Fichinter extends CommonObject
/** /**
* Initialise an instance with random values. * Initialise an instance with random values.
* Used to build previews or test instances. * Used to build previews or test instances.
* id must be 0 if object instance is a specimen. * id must be 0 if object instance is a specimen.
* *
* @return void * @return void
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
@ -894,7 +896,7 @@ class Fichinter extends CommonObject
$line->desc=$langs->trans("Description")." ".$xnbp; $line->desc=$langs->trans("Description")." ".$xnbp;
$line->datei=($now-3600*(1+$xnbp)); $line->datei=($now-3600*(1+$xnbp));
$line->duration=600; $line->duration=600;
$line->fk_fichinter=0; $line->fk_fichinter=0;
$this->lines[$xnbp]=$line; $this->lines[$xnbp]=$line;
$xnbp++; $xnbp++;

File diff suppressed because it is too large Load Diff

View File

@ -358,7 +358,7 @@ INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) V
-- Provinces Greece (id country=102) -- Provinces Greece (id country=102)
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('66', 10201, NULL, NULL, NULL, 'Αθήνα', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('66', 10201, NULL, NULL, NULL, 'Αθήνα', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('00', 10205, NULL, NULL, NULL, 'Δράμα', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('67', 10205, NULL, NULL, NULL, 'Δράμα', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('01', 10205, NULL, NULL, NULL, 'Έβρος', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('01', 10205, NULL, NULL, NULL, 'Έβρος', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('02', 10205, NULL, NULL, NULL, 'Θάσος', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('02', 10205, NULL, NULL, NULL, 'Θάσος', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('03', 10205, NULL, NULL, NULL, 'Καβάλα', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('03', 10205, NULL, NULL, NULL, 'Καβάλα', 1);

View File

@ -101,6 +101,15 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 5
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 54, 5, '5.5','0','USt. Forst', 0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 54, 5, '5.5','0','USt. Forst', 0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 55, 5, '10.7','0','USt. Landwirtschaft', 0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 55, 5, '10.7','0','USt. Landwirtschaft', 0);
-- GREECE (id country=102)
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2462, 102, 23, 0, '0', 0, '0', 0, 'Κανονικός Φ.Π.Α.', 1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2463, 102, 0, 0, '0', 0, '0', 0, 'Μηδενικό Φ.Π.Α.', 1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2464, 102, 13, 0, '0', 0, '0', 0, 'Μειωμένος Φ.Π.Α.', 1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2465, 102, 6.5, 0, '0', 0, '0', 0, 'Υπερμειωμένος Φ.Π.Α.', 1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2466, 102, 16, 0, '0', 0, '0', 0, 'Νήσων κανονικός Φ.Π.Α.', 1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2467, 102, 9, 0, '0', 0, '0', 0, 'Νήσων μειωμένος Φ.Π.Α.', 1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2468, 102, 5, 0, '0', 0, '0', 0, 'Νήσων υπερμειωμένος Φ.Π.Α.', 1);
-- ICELAND (id country=116) -- ICELAND (id country=116)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1161, 116,'25.5','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1161, 116,'25.5','0','VAT standard rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1162, 116, '7','0','VAT reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1162, 116, '7','0','VAT reduced rate',1);

View File

@ -393,6 +393,7 @@ AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be
ToMakePayment=Pay ToMakePayment=Pay
ToMakePaymentBack=Pay back ToMakePaymentBack=Pay back
ListOfYourUnpaidInvoices=List of unpaid invoices ListOfYourUnpaidInvoices=List of unpaid invoices
NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative.
RevenueStamp=Revenue stamp RevenueStamp=Revenue stamp
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice

View File

@ -390,6 +390,7 @@ AllCompletelyPayedInvoiceWillBeClosed=Toutes les factures avec un reste à payer
ToMakePayment=Payer ToMakePayment=Payer
ToMakePaymentBack=Rembourser ToMakePaymentBack=Rembourser
ListOfYourUnpaidInvoices=Liste des factures impayées ListOfYourUnpaidInvoices=Liste des factures impayées
NoteListOfYourUnpaidInvoices=Remarque: Cette liste ne contient que les factures des Tiers pour lesquels vous êtes le commercial affecté.
RevenueStamp=Timbre fiscal RevenueStamp=Timbre fiscal
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Responsable suivi facture client TypeContact_facture_internal_SALESREPFOLL=Responsable suivi facture client

View File

@ -43,8 +43,8 @@ MargeBrute=Marge brute
MargeNette=Marge nette MargeNette=Marge nette
MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT<br/>Marge nette : Prix de vente HT - Coût de revient MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT<br/>Marge nette : Prix de vente HT - Coût de revient
CostPrice=Prix ​​d'achat BuyingPrice=Prix ​​d'achat
BuyingCost=Coût de revient CostPrice=Prix de revient
UnitCharges=Charge unitaire UnitCharges=Charge unitaire
Charges=Charges Charges=Charges

View File

@ -207,7 +207,7 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresenta
else else
{ {
$allmessage.= $newlangs->transnoentities("ListOfYourUnpaidInvoices").($usehtml?"<br>\n":"\n").($usehtml?"<br>\n":"\n"); $allmessage.= $newlangs->transnoentities("ListOfYourUnpaidInvoices").($usehtml?"<br>\n":"\n").($usehtml?"<br>\n":"\n");
$allmessage.= "Note: This list contains only invoices for third parties you are linked to as a sale representative.".($usehtml?"<br>\n":"\n"); $allmessage.= $newlangs->transnoentities("NoteListOfYourUnpaidInvoices").($usehtml?"<br>\n":"\n");
} }
$allmessage.= $message.($usehtml?"<br>\n":"\n"); $allmessage.= $message.($usehtml?"<br>\n":"\n");
$allmessage.= $langs->trans("Total")." = ".price($total).($usehtml?"<br>\n":"\n"); $allmessage.= $langs->trans("Total")." = ".price($total).($usehtml?"<br>\n":"\n");