Skip to content

Commit

Permalink
Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/product/card.php
  • Loading branch information
eldy committed Oct 3, 2019
2 parents d6198a1 + d9aa816 commit 1a66e0b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion htdocs/compta/facture/card.php
Expand Up @@ -3012,7 +3012,7 @@
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled';
if (! $optionsav && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp.=' disabled';
$tmp.= '> ';
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
Expand Down
6 changes: 6 additions & 0 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -1936,10 +1936,16 @@ public function setMulticurrencyRate($rate, $mode = 1)
{
foreach ($this->lines as &$line)
{
// Amounts in company currency will be recalculated
if($mode == 1) {
$line->subprice = 0;
}

// Amounts in foreign currency will be recalculated
if($mode == 2) {
$line->multicurrency_subprice = 0;
}

switch ($this->element) {
case 'propal':
$this->updateline(
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/discount.class.php
Expand Up @@ -139,7 +139,7 @@ public function fetch($rowid, $fk_facture_source = 0, $fk_invoice_supplier_sourc
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as sr";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON sr.fk_facture_source = f.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fsup ON sr.fk_invoice_supplier_source = fsup.rowid";
$sql.= " WHERE sr.entity = " . $conf->entity;
$sql.= " WHERE sr.entity IN (".getEntity('invoice').")";
if ($rowid) $sql.= " AND sr.rowid=".$rowid;
if ($fk_facture_source) $sql.= " AND sr.fk_facture_source=".$fk_facture_source;
if ($fk_invoice_supplier_source) $sql.= " AND sr.fk_invoice_supplier_source=".$fk_invoice_supplier_source;
Expand Down
2 changes: 2 additions & 0 deletions htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -3511,6 +3511,8 @@ public function update($notrigger = 0)

$error=0;

$this->db->begin();

// Mise a jour ligne en base
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
$sql.= " description='".$this->db->escape($this->desc)."'";
Expand Down
40 changes: 21 additions & 19 deletions htdocs/product/card.php
@@ -1,22 +1,22 @@
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
Expand Down Expand Up @@ -1605,7 +1605,9 @@
{
// TODO change for compatibility with edit in place
$typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="titlefield">'.$form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat).'</td><td colspan="2">';
print '<tr><td class="titlefield">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type');
print '</td><td colspan="2">';
print $form->editfieldval("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat);
print '</td></tr>';
}
Expand Down

0 comments on commit 1a66e0b

Please sign in to comment.