mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge remote-tracking branch 'origin/3.7' into 3.8
Conflicts: htdocs/core/tpl/objectline_edit.tpl.php htdocs/fourn/class/fournisseur.product.class.php htdocs/fourn/facture/card.php htdocs/product/composition/card.php
This commit is contained in:
commit
8342a61ea9
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -369,18 +369,12 @@ if (! empty($usemargins) && $user->rights->margins->creer)
|
|||
jQuery(document).ready(function() {
|
||||
<?php
|
||||
if (! empty($conf->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");
|
||||
});
|
||||
<?php
|
||||
}
|
||||
if (! empty($conf->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");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2213,7 +2213,11 @@ else
|
|||
// Delete
|
||||
if ($action != 'edit' && $user->rights->fournisseur->facture->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
if ($object->getSommePaiement()) {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="' . $langs->trans("DisabledBecausePayments") . '">' . $langs->trans('Delete') . '</a></div>';
|
||||
} else {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||
$preselectedchoice=$addwarning?'no':'yes';
|
||||
|
||||
print '<br>';
|
||||
$text=$langs->trans('ConfirmSupplierPayment',$totalpayment,$langs->trans("Currency".$conf->currency));
|
||||
$text=$langs->trans('ConfirmSupplierPayment', price($totalpayment),$langs->trans("Currency".$conf->currency));
|
||||
if (GETPOST('closepaidinvoices'))
|
||||
{
|
||||
$text.='<br>'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed");
|
||||
|
|
|
|||
|
|
@ -2217,7 +2217,7 @@ class soap_transport_http extends nusoap_base {
|
|||
}
|
||||
$this->use_curl = $use_curl;
|
||||
preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);
|
||||
if (isset($rev[1])) $this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')');
|
||||
$this->setHeader('User-Agent', $this->title.'/'.$this->version.(isset($rev[1])?' ('.$rev[1].')':''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta
|
|||
$marge_tx_ret='';
|
||||
$marque_tx_ret='';
|
||||
|
||||
if ($fk_pa > 0) {
|
||||
if ($fk_pa > 0 && empty($paht)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$product = new ProductFournisseur($db);
|
||||
if ($product->fetch_product_fournisseur_price($fk_pa))
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ if ($id > 0 || ! empty($ref))
|
|||
}
|
||||
print '</td>';
|
||||
|
||||
$totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT');
|
||||
$totalline=price2num($value['nb'] * ($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent/100) + $product_fourn->fourn_unitcharges - $product_fourn->fourn_remise), 'MT');
|
||||
$total+=$totalline;
|
||||
print '<td align="right">';
|
||||
print ($notdefined?'':($value['nb']> 1 ? $value['nb'].'x' : '').price($product_fourn->fourn_unitprice,'','',0,0,-1,$conf->currency));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user