Skip to content

Commit

Permalink
Merge branch 'Upstream/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed May 30, 2014
2 parents aa4e9d5 + 39c1064 commit 27f0cbd
Show file tree
Hide file tree
Showing 408 changed files with 10,641 additions and 9,688 deletions.
4 changes: 2 additions & 2 deletions dev/deduplicatefilelinesrecursively.sh
Expand Up @@ -15,7 +15,7 @@ fi
# To detect
if [ "x$1" = "xlist" ]
then
for file in `find . -type f`
for file in `find . -type f -name *.lang`
do
if [ `sort "$file" | uniq -d | wc -l` -gt 0 ]
then
Expand All @@ -27,7 +27,7 @@ fi
# To fix
if [ "x$1" = "xfix" ]
then
for file in `find . -type f`
for file in `find . -type f -name *.lang`
do
awk -i inplace ' !x[$0]++' "$file"
done;
Expand Down
6 changes: 0 additions & 6 deletions htdocs/comm/action/fiche.php
Expand Up @@ -203,12 +203,6 @@
$action = 'create';
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")).'</div>';
}
if (! empty($datep) && GETPOST('percentage') == 0)
{
$error++;
$action = 'create';
$mesg='<div class="error">'.$langs->trans("ErrorStatusCantBeZeroIfStarted").'</div>';
}

if (! GETPOST('apyear') && ! GETPOST('adyear'))
{
Expand Down
5 changes: 4 additions & 1 deletion htdocs/comm/propal/class/propal.class.php
Expand Up @@ -546,6 +546,7 @@ function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,
$this->line->label = $label;
$this->line->desc = $desc;
$this->line->qty = $qty;
$this->line->product_type = $type;
$this->line->tva_tx = $txtva;
$this->line->localtax1_tx = $txlocaltax1;
$this->line->localtax2_tx = $txlocaltax2;
Expand Down Expand Up @@ -2783,7 +2784,7 @@ function fetch($rowid)
$sql.= ' pd.info_bits, pd.total_ht, pd.total_tva, pd.total_ttc, pd.fk_product_fournisseur_price as fk_fournprice, pd.buy_price_ht as pa_ht, pd.special_code, pd.rang,';
$sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,';
$sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,';
$sql.= ' pd.date_start, pd.date_end';
$sql.= ' pd.date_start, pd.date_end, pd.product_type';
$sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pd';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid';
$sql.= ' WHERE pd.rowid = '.$rowid;
Expand Down Expand Up @@ -2820,6 +2821,7 @@ function fetch($rowid)
$this->marque_tx = $marginInfos[2];

$this->special_code = $objp->special_code;
$this->product_type = $objp->product_type;
$this->rang = $objp->rang;

$this->ref = $objp->product_ref; // deprecated
Expand Down Expand Up @@ -3054,6 +3056,7 @@ function update($notrigger=0)
$sql = "UPDATE ".MAIN_DB_PREFIX."propaldet SET";
$sql.= " description='".$this->db->escape($this->desc)."'";
$sql.= " , label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null");
$sql.= " , product_type=".$this->product_type;
$sql.= " , tva_tx='".price2num($this->tva_tx)."'";
$sql.= " , localtax1_tx=".price2num($this->localtax1_tx);
$sql.= " , localtax2_tx=".price2num($this->localtax2_tx);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture.php
Expand Up @@ -1666,7 +1666,7 @@
// Save last template used to generate document
if (GETPOST('model'))
$object->setDocModel($user, GETPOST('model', 'alpha'));
if (GETPOST('fk_bank'))
if (GETPOST('fk_bank')) // this field may come from an external module
$object->fk_bank = GETPOST('fk_bank');

// Define output language
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/class/html.form.class.php
Expand Up @@ -1259,7 +1259,7 @@ function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclu
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
*
* @param int $selected Preselected products
* @param string $htmlname Name of HTML seletc field (must be unique in page)
* @param string $htmlname Name of HTML select field (must be unique in page)
* @param int $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param int $limit Limit on number of returned lines
* @param int $price_level Level of price to show
Expand All @@ -1268,7 +1268,7 @@ function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclu
* @param string $selected_input_value Value of preselected input text (with ajax)
* @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after)
* @param array $ajaxoptions Options for ajax_autocompleter
* @param int $socid Thridparty Id
* @param int $socid Thirdparty Id
* @return void
*/
function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(),$socid=0)
Expand Down Expand Up @@ -1320,13 +1320,13 @@ function select_produits($selected='', $htmlname='productid', $filtertype='', $l
* @param int $selected Preselected product
* @param string $htmlname Name of select html
* @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param int $limit Limite sur le nombre de lignes retournees
* @param int $limit Limit on number of returned lines
* @param int $price_level Level of price to show
* @param string $filterkey Filter on product
* @param int $status -1=Return all products, 0=Products not on sell, 1=Products on sell
* @param int $finished Filter on finished field: 2=No filter
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $socid Thridparty Id
* @param int $socid Thirdparty Id
* @return array Array of keys for json
*/
function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0)
Expand Down
1 change: 1 addition & 0 deletions htdocs/fourn/class/fournisseur.facture.class.php
Expand Up @@ -42,6 +42,7 @@ class FactureFournisseur extends CommonInvoice
public $fk_element='fk_facture_fourn';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

var $rowid;
var $ref;
var $product_ref;
var $ref_supplier;
Expand Down
2 changes: 2 additions & 0 deletions htdocs/fourn/fiche.php
Expand Up @@ -312,6 +312,7 @@
$sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut";
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
$sql.= " WHERE p.fk_soc =".$object->id;
$sql.= " AND p.entity =".$conf->entity;
$sql.= " ORDER BY p.date_commande DESC";
$sql.= " ".$db->plimit($MAXLIST);
$resql=$db->query($sql);
Expand Down Expand Up @@ -380,6 +381,7 @@
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn';
$sql.= ' WHERE f.fk_soc = '.$object->id;
$sql.= " AND f.entity =".$conf->entity;
$sql.= ' GROUP BY f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye';
$sql.= ' ORDER BY f.datef DESC';
$resql=$db->query($sql);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_commande.sql
Expand Up @@ -25,7 +25,7 @@ create table llx_commande
entity integer DEFAULT 1 NOT NULL, -- multi company id

ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr)
ref_int varchar(255), -- reference into an internal system (deprecated)
ref_client varchar(255), -- reference for customer

fk_soc integer NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_expedition.sql
Expand Up @@ -28,7 +28,7 @@ create table llx_expedition
fk_soc integer NOT NULL,

ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
ref_int varchar(30), -- reference into an internal system (used by dolibarr)
ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_customer varchar(30), -- customer number

date_creation datetime, -- date de creation
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_facture.sql
Expand Up @@ -28,7 +28,7 @@ create table llx_facture
entity integer DEFAULT 1 NOT NULL, -- multi company id

ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_client varchar(255), -- reference for customer

type smallint DEFAULT 0 NOT NULL, -- type of invoice
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_livraison.sql
Expand Up @@ -26,7 +26,7 @@ create table llx_livraison
fk_soc integer NOT NULL,

ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
ref_int varchar(30), -- reference into an internal system (used by dolibarr)
ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_customer varchar(30), -- customer number

date_creation datetime, -- date de creation
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_propal.sql
Expand Up @@ -26,7 +26,7 @@ create table llx_propal
entity integer DEFAULT 1 NOT NULL, -- multi company id

ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_client varchar(255), -- customer proposal number

fk_soc integer,
Expand Down
10 changes: 5 additions & 5 deletions htdocs/install/mysql/tables/llx_societe.sql
@@ -1,6 +1,6 @@
-- ========================================================================
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2010 Juanjo Menent <dolibarr@2byte.es>
--
Expand All @@ -22,11 +22,11 @@
create table llx_societe
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
nom varchar(60), -- company reference name
entity integer DEFAULT 1 NOT NULL, -- multi company id
nom varchar(60), -- company reference name
entity integer DEFAULT 1 NOT NULL, -- multi company id

ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
ref_int varchar(60), -- reference into an internal system (used by dolibarr)
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
ref_int varchar(60), -- reference into an internal system (deprecated)

statut tinyint DEFAULT 0, -- statut
parent integer,
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_user.sql
Expand Up @@ -24,7 +24,7 @@ create table llx_user
entity integer DEFAULT 1 NOT NULL, -- multi company id

ref_ext varchar(50), -- reference into an external system (not used by dolibarr)
ref_int varchar(50), -- reference into an internal system (used by dolibarr)
ref_int varchar(50), -- reference into an internal system (deprecated)

datec datetime,
tms timestamp,
Expand Down

0 comments on commit 27f0cbd

Please sign in to comment.