diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index f316fb47980..a24091c4f97 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1014,6 +1014,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("withdrawals"); $langs->load("banks"); $langs->load("bills"); + $langs->load('categories'); // Bank-Caisse if (! empty($conf->banque->enabled)) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 7244711bb43..19055c2001e 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -369,18 +369,12 @@ if (! empty($usemargins) && $user->rights->margins->creer) jQuery(document).ready(function() { global->DISPLAY_MARGIN_RATES)) { ?> - $('#addline').click(function (e) { - return checkFreeLine(e, "np_marginRate"); - }); $("input[name='np_marginRate']:first").blur(function(e) { return checkFreeLine(e, "np_marginRate"); }); global->DISPLAY_MARK_RATES)) { ?> - $('#addline').click(function (e) { - return checkFreeLine(e, "np_markRate"); - }); $("input[name='np_markRate']:first").blur(function(e) { return checkFreeLine(e, "np_markRate"); }); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index a1b151d9391..26d96d8e201 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -299,9 +299,6 @@ if (! empty($conf->margin->enabled)) if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { ?> - $('#savelinebutton').click(function (e) { - return checkEditLine(e, "np_marginRate"); - }); /* Disabled. We must be able to click on button 'cancel'. Check must be done only on button 'save'. $("input[name='np_marginRate']:first").blur(function(e) { return checkEditLine(e, "np_marginRate"); @@ -311,9 +308,6 @@ if (! empty($conf->margin->enabled)) if (! empty($conf->global->DISPLAY_MARK_RATES)) { ?> - $('#savelinebutton').click(function (e) { - return checkEditLine(e, "np_markRate"); - }); /* Disabled. We must be able to click on button 'cancel'. Check must be done only on button 'save'. $("input[name='np_markRate']:first").blur(function(e) { return checkEditLine(e, "np_markRate"); @@ -326,6 +320,7 @@ if (! empty($conf->margin->enabled)) /* If margin rate field empty, do nothing. */ /* Force content of price_ht to 0 or if a discount is set, recalculate it from margin rate */ + /* TODO This function seems no more used */ function checkEditLine(e, npRate) { var buying_price = $("input[name='buying_price']:first"); diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 9c4a95c7c52..f41a4b4e69a 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -666,7 +666,7 @@ class ProductFournisseur extends Product { global $langs; $langs->load("suppliers"); - $out=($showunitprice?price($this->fourn_unitprice).' '.$langs->trans("HT").' (':'').($showsuptitle?$langs->trans("Supplier").': ':'').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / '.$langs->trans("SupplierRef").': '.$this->fourn_ref.($showunitprice?')':''); + $out=($showunitprice?price($this->fourn_unitprice * (1 - $this->fourn_remise_percent/100) + $this->fourn_unitcharges - $this->fourn_remise).' '.$langs->trans("HT").' (':'').($showsuptitle?$langs->trans("Supplier").': ':'').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / '.$langs->trans("SupplierRef").': '.$this->fourn_ref.($showunitprice?')':''); return $out; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f70ca50c902..24506fb31a8 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2213,7 +2213,11 @@ else // Delete if ($action != 'edit' && $user->rights->fournisseur->facture->supprimer) { - print 'id.'&action=delete">'.$langs->trans('Delete').''; + if ($object->getSommePaiement()) { + print '
'; + } else { + print 'id.'&action=delete">'.$langs->trans('Delete').''; + } } print ''; print '