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

This commit is contained in:
Laurent Destailleur 2016-09-02 19:25:04 +02:00
commit 4fa94e3a25
3 changed files with 11 additions and 13 deletions

View File

@ -22,7 +22,7 @@
/** /**
* \file htdocs/compta/prelevement/class/bonprelevement.class.php * \file htdocs/compta/prelevement/class/bonprelevement.class.php
* \ingroup prelevement * \ingroup prelevement
* \brief Fichier de la classe des bons de prelevements * \brief File of withdrawal receipts class
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
@ -104,11 +104,11 @@ class BonPrelevement extends CommonObject
} }
/** /**
* Add facture to withdrawal * Add invoice to withdrawal
* *
* @param int $facture_id id invoice to add * @param int $facture_id id invoice to add
* @param int $client_id id invoice customer * @param int $client_id id invoice customer
* @param string $client_nom name of cliente * @param string $client_nom customer name
* @param int $amount amount of invoice * @param int $amount amount of invoice
* @param string $code_banque code of bank withdrawal * @param string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office * @param string $code_guichet code of bank's office
@ -166,7 +166,7 @@ class BonPrelevement extends CommonObject
* *
* @param int $line_id id line to add * @param int $line_id id line to add
* @param int $client_id id invoice customer * @param int $client_id id invoice customer
* @param string $client_nom name of cliente * @param string $client_nom customer name
* @param int $amount amount of invoice * @param int $amount amount of invoice
* @param string $code_banque code of bank withdrawal * @param string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office * @param string $code_guichet code of bank's office
@ -182,7 +182,7 @@ class BonPrelevement extends CommonObject
if ($concat == 1) if ($concat == 1)
{ {
/* /*
* On aggrege les lignes * We aggregate the lines
*/ */
$sql = "SELECT rowid"; $sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes"; $sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes";
@ -205,7 +205,7 @@ class BonPrelevement extends CommonObject
else else
{ {
/* /*
* Pas de d'agregation * No aggregate
*/ */
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_lignes ("; $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_lignes (";
$sql.= "fk_prelevement_bons"; $sql.= "fk_prelevement_bons";
@ -376,7 +376,7 @@ class BonPrelevement extends CommonObject
} }
/* /*
* Fin de la procedure * End of procedure
*/ */
if ($error == 0) if ($error == 0)
{ {
@ -478,7 +478,7 @@ class BonPrelevement extends CommonObject
$error++; $error++;
} }
} }
// Update prelevement line // Update withdrawal line
// TODO: Translate to ligneprelevement.class.php // TODO: Translate to ligneprelevement.class.php
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes"; $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes";
$sql.= " SET statut = 2"; $sql.= " SET statut = 2";
@ -605,8 +605,8 @@ class BonPrelevement extends CommonObject
$arr = array(); $arr = array();
/* /*
* Renvoie toutes les factures presente * Returns all invoices presented
* dans un bon de prelevement * within a withdrawal receipt
*/ */
$sql = "SELECT fk_facture"; $sql = "SELECT fk_facture";
if ($amounts) $sql .= ", SUM(pl.amount)"; if ($amounts) $sql .= ", SUM(pl.amount)";

View File

@ -926,7 +926,7 @@ class Product extends CommonObject
// Delete all child tables // Delete all child tables
if (! $error) if (! $error)
{ {
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock','product_customer_price'); $elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock','product_customer_price','product_lot');
foreach($elements as $table) foreach($elements as $table)
{ {
if (! $error) if (! $error)

View File

@ -74,8 +74,6 @@ llxHeader('', $title, $helpurl);
$form=new Form($b); $form=new Form($b);
llxHeader('', $title, $help_url);
if ($id > 0 || $ref) if ($id > 0 || $ref)
{ {
$result = $object->fetch($id,$ref); $result = $object->fetch($id,$ref);