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

This commit is contained in:
Laurent Destailleur 2016-09-02 22:07:17 +02:00
commit b107b0644f
8 changed files with 18 additions and 18 deletions

View File

@ -71,7 +71,7 @@ if (! empty($conf->supplier_proposal->enabled)) $supplierproposalstatic=new Supp
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
llxHeader();
llxHeader("",$langs->trans("CommercialArea"));
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');

View File

@ -22,7 +22,7 @@
/**
* \file htdocs/compta/prelevement/class/bonprelevement.class.php
* \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';
@ -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 $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 string $code_banque code of bank withdrawal
* @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 $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 string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office
@ -182,7 +182,7 @@ class BonPrelevement extends CommonObject
if ($concat == 1)
{
/*
* On aggrege les lignes
* We aggregate the lines
*/
$sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes";
@ -205,7 +205,7 @@ class BonPrelevement extends CommonObject
else
{
/*
* Pas de d'agregation
* No aggregate
*/
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_lignes (";
$sql.= "fk_prelevement_bons";
@ -376,7 +376,7 @@ class BonPrelevement extends CommonObject
}
/*
* Fin de la procedure
* End of procedure
*/
if ($error == 0)
{
@ -478,7 +478,7 @@ class BonPrelevement extends CommonObject
$error++;
}
}
// Update prelevement line
// Update withdrawal line
// TODO: Translate to ligneprelevement.class.php
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes";
$sql.= " SET statut = 2";
@ -605,8 +605,8 @@ class BonPrelevement extends CommonObject
$arr = array();
/*
* Renvoie toutes les factures presente
* dans un bon de prelevement
* Returns all invoices presented
* within a withdrawal receipt
*/
$sql = "SELECT fk_facture";
if ($amounts) $sql .= ", SUM(pl.amount)";

View File

@ -926,7 +926,7 @@ class Product extends CommonObject
// Delete all child tables
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)
{
if (! $error)

View File

@ -10,6 +10,7 @@
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@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

@ -440,8 +440,8 @@ class MouvementStock extends CommonObject
// $sql = "UPDATE ".MAIN_DB_PREFIX."product SET pmp = ".$newpmp.", stock = ".$this->db->ifsql("stock IS NULL", 0, "stock") . " + ".$qty;
// $sql.= " WHERE rowid = ".$fk_product;
// Update pmp + denormalized fields because we change content of produt_stock. Warning: Do not use "SET p.stock", does not works with pgsql
$sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET p.pmp = ".$newpmp.", ";
$sql.= " stock=(SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock ps WHERE ps.fk_product = p.rowid)";
$sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = ".$newpmp.", ";
$sql.= " stock=(SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock as ps WHERE ps.fk_product = p.rowid)";
$sql.= " WHERE rowid = ".$fk_product;
dol_syslog(get_class($this)."::_create", LOG_DEBUG);

View File

@ -287,7 +287,7 @@ if (empty($reshook))
$object->name_alias = GETPOST('name_alias');
}
$object->address = GETPOST('address', 'alpha');
$object->address = GETPOST('address');
$object->zip = GETPOST('zipcode', 'alpha');
$object->town = GETPOST('town', 'alpha');
$object->country_id = GETPOST('country_id', 'int');

View File

@ -1192,8 +1192,8 @@ class SupplierProposal extends CommonObject
$sql = "SELECT d.rowid, d.fk_supplier_proposal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,";
$sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,";
$sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,';
$sql.= ' d.ref_fourn as ref_produit_fourn';
$sql.= ' ,d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc';
$sql.= ' d.ref_fourn as ref_produit_fourn,';
$sql.= ' d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc';
$sql.= " FROM ".MAIN_DB_PREFIX."supplier_proposaldet as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
$sql.= " WHERE d.fk_supplier_proposal = ".$this->id;

View File

@ -27,7 +27,6 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
if (! defined('NOLOGIN')) define('NOLOGIN','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');