Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 6, 2013
2 parents 81d6d5d + 4bc8cbc commit 4083d9a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
6 changes: 4 additions & 2 deletions htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -1802,7 +1802,7 @@ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocalt
$sql.= ",total_localtax1='".price2num($total_localtax1)."'";
$sql.= ",total_localtax2='".price2num($total_localtax2)."'";
$sql.= ",total_ttc='".price2num($total_ttc)."'";
$sql.= ",product_type='".$type."'";
$sql.= ",product_type=".$type;
$sql.= " WHERE rowid = ".$rowid;

dol_syslog(get_class($this)."::updateline sql=".$sql);
Expand Down Expand Up @@ -2063,7 +2063,7 @@ function fetch($rowid)
$sql.= ' cd.localtax1_tx, cd.localtax2_tx,';
$sql.= ' cd.remise, cd.remise_percent, cd.subprice,';
$sql.= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,';
$sql.= ' cd.total_localtax1, cd.local_localtax2,';
$sql.= ' cd.total_localtax1, cd.total_localtax2,';
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc';
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid';
Expand Down Expand Up @@ -2096,10 +2096,12 @@ function fetch($rowid)
$this->product_desc = $objp->product_desc;

$this->db->free($result);
return 1;
}
else
{
dol_print_error($this->db);
return -1;
}
}

Expand Down
18 changes: 14 additions & 4 deletions htdocs/fourn/commande/fiche.php
Expand Up @@ -336,10 +336,11 @@
*/
else if ($action == 'updateligne' && $user->rights->fournisseur->commande->creer && $_POST['save'] == $langs->trans('Save'))
{
$product=new Product($db);
if ($_POST["elrowid"])
{
if ($product->fetch($_POST["elrowid"]) < 0) dol_print_error($db);
$line = new CommandeFournisseurLigne($db);
$res = $line->fetch($_POST["elrowid"]);
if (!$res) dol_print_error($db);
}

$localtax1_tx=get_localtax($_POST['tva_tx'],1,$mysoc,$object->thirdparty);
Expand All @@ -356,9 +357,18 @@
$localtax2_tx,
'HT',
0,
isset($_POST["type"])?$_POST["type"]:$product->type
isset($_POST["type"])?$_POST["type"]:$line->product_type
);

unset($_POST['qty']);
unset($_POST['type']);
unset($_POST['idprodfournprice']);
unset($_POST['remmise_percent']);
unset($_POST['dp_desc']);
unset($_POST['np_desc']);
unset($_POST['pu']);
unset($_POST['tva_tx']);
unset($localtax1_tx);
unset($localtax2_tx);
if ($result >= 0)
{
$outputlangs = $langs;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/theme/bureau2crea/style.css.php
Expand Up @@ -789,7 +789,7 @@
{
padding-top: 1px;
padding-bottom: 1px;
height: 16px;
min-height: 14px;
}

div.blockvmenubookmarks
Expand Down

0 comments on commit 4083d9a

Please sign in to comment.