diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 798c6219356..c65b7d6cf60 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -1479,6 +1479,7 @@ if ($action=='create')
if ($societe->id > 0)
{
+/* // TODO handle supplier relative discount
// Discounts for third party
print '
| ' . $langs->trans('Discounts') . ' | ';
if ($societe->remise_percent)
@@ -1488,7 +1489,7 @@ if ($action=='create')
print ' id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditRelativeDiscount") . ')';
print '. ';
print ' ';
-
+*/
$absolute_discount = $societe->getAvailableDiscounts('', '', 0, 1);
if ($absolute_discount)
@@ -1894,11 +1895,13 @@ elseif (! empty($object->id))
$addcreditnote = 'id . '">' . $langs->trans("AddCreditNote") . '';
print ' |
| ' . $langs->trans('Discounts') . ' | ';
+/* // TODO handle supplier relative discount
if ($societe->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", $societe->remise_percent);
else
print $langs->trans("CompanyHasNoRelativeDiscount");
print '. ';
+*/
$absolute_discount = $societe->getAvailableDiscounts('', $filterabsolutediscount, 0, 1);
$absolute_creditnote = $societe->getAvailableDiscounts('', $filtercreditnote, 0, 1);
$absolute_discount = price2num($absolute_discount, 'MT');
@@ -1908,7 +1911,7 @@ elseif (! empty($object->id))
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency));
} else {
// Remise dispo de type remise fixe (not credit note)
- print ' ';
+// print ' ';
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $societe->id, $absolute_discount, $filterabsolutediscount, 0, '', 1, 1);
}
}
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index ace7ce0b1b7..255c917b6a9 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1917,6 +1917,7 @@ if ($action == 'create')
{
// Discounts for third party
print ' |
| ' . $langs->trans('Discounts') . ' | ';
+/* // TODO handle supplier relative discount
if ($societe->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", 'id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">' . $societe->remise_percent . '');
else
@@ -1924,6 +1925,7 @@ if ($action == 'create')
print ' id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditRelativeDiscount") . ')';
print '. ';
print ' ';
+*/
if ($absolute_discount)
print $langs->trans("CompanyHasAbsoluteDiscount", 'id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">' . price($absolute_discount) . '', $langs->trans("Currency" . $conf->currency));
else
@@ -2417,15 +2419,16 @@ else
print ' |
| ' . $langs->trans('Discounts');
print ' | ';
+/* // TODO handle supplier relative discount
if ($societe->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", $societe->remise_percent);
else
print $langs->trans("CompanyHasNoRelativeDiscount");
// print ' ('.$addrelativediscount.')';
-
+*/
// Is there is commercial discount or down payment available ?
if ($absolute_discount > 0) {
- print '. ';
+// print '. ';
if ($object->statut > 0 || $object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) {
if ($object->statut == 0) {
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency));
@@ -2433,7 +2436,7 @@ else
} else {
if ($object->statut < 1 || $object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) {
$text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency));
- print ' ' . $text . '. ';
+ print '' . $text . '. ';
} else {
$text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency));
$text2 = $langs->trans("AbsoluteDiscountUse");
@@ -2442,7 +2445,7 @@ else
}
} else {
// Discount available of type fixed amount (not credit note)
- print ' ';
+// print ' ';
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, GETPOST('discountid'), 'remise_id', $societe->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' (' . $addabsolutediscount . ')', 0, 1);
}
} else {
@@ -2450,10 +2453,10 @@ else
{
if ($object->statut == FactureFournisseur::STATUS_DRAFT && $object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT)
print ' (' . $addabsolutediscount . ') ';
- else
- print '. ';
+// else
+// print '. ';
} else
- print '. ';
+ print '. ';
}
// Is there credit notes availables ?
if ($absolute_creditnote > 0)
@@ -2468,7 +2471,7 @@ else
}
} else { // We can add a credit note on a down payment or standard invoice or situation invoice
// There is credit notes discounts available
- if (! $absolute_discount) print ' ';
+// if (! $absolute_discount) print ' ';
// $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $societe->id, $absolute_creditnote, $filtercreditnote, $resteapayer, '', 0, 1);
$more=' ('.$addcreditnote. (($addcreditnote && $viewabsolutediscount) ? ' - ' : '') . $viewabsolutediscount . ')';
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $societe->id, $absolute_creditnote, $filtercreditnote, 0, $more, 0, 1); // We allow credit note even if amount is higher
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index dcd15b61469..ba78c78dade 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1050,16 +1050,17 @@ if ($action == 'create')
if ($soc->id > 0)
{
+/* // TODO handle supplier relative discount
// Discounts for third party
print ' |
| ' . $langs->trans('Discounts') . ' | ';
- if ($fourn->remise_percent)
+ if ($soc->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", 'id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">' . $soc->remise_percent . '');
else
print $langs->trans("CompanyHasNoRelativeDiscount");
print ' id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditRelativeDiscount") . ')';
print '. ';
print ' ';
-
+*/
$absolute_discount = $soc->getAvailableDiscounts('', '', 0, 1);
if ($absolute_discount)
@@ -1424,11 +1425,13 @@ if ($action == 'create')
$addcreditnote = 'id . '">' . $langs->trans("AddCreditNote") . '';
print ' |
| ' . $langs->trans('Discounts') . ' | ';
+/* // TODO handle supplier relative discount
if ($soc->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
else
print $langs->trans("CompanyHasNoRelativeDiscount");
print '. ';
+*/
$absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount, 0, 1);
$absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote, 0, 1);
$absolute_discount = price2num($absolute_discount, 'MT');
@@ -1438,7 +1441,7 @@ if ($action == 'create')
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency));
} else {
// Remise dispo de type remise fixe (not credit note)
- print ' ';
+// print ' ';
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, 0, '', 1, 1);
}
}
|