diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 7c6b3622920452543fcc67f372162b40a07914be..548cd3bb7e4beda63b4d26d8e6882b16b9a37241 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -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'); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 924d8092485f66003dcd52bb0749b07abd753be4..12195e5e05e6791e704853b6fbf5a165aebadb33 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -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)"; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index cf825a50e2824559b786a84d4e043c5bb19da672..962172c3aa6e56ee66c884e57c8a27b80653cf19 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -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) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index eabc52337bddf29fdda40361241e5d9d41b3f38b..a008821e138f59fb460c48e8864e0e5fe8faf74a 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -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 diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 7d8854eb75b9a9a099c2293820956c2b0110fc92..0a72a7ffca7e4f4f14ac1a58f660c4b56a246b07 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -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); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 46e8aa0eb9cb0f2a97c26a93818fba5aaba2caff..f6315c75833ba6f6b2ddbc07f9688787053ef321 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -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'); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 00efb287dcc0b43f971a2cc72a7bc0e78cbf257c..09fa2dc69e939a8f84e8b22b97df37b547463aba 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -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; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 38054c48c690b697066c47170f812de652d39c6e..a0f067b5d0c32e65e030cb8016f47138d5eb8d6a 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -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');