|
66 | 66 | if ($absolute_discount > 0) {
|
67 | 67 | if (!empty($cannotApplyDiscount) || !$isInvoice || $isNewObject || $object->statut > $objclassname::STATUS_DRAFT || $object->type == $objclassname::TYPE_CREDIT_NOTE || $object->type == $objclassname::TYPE_DEPOSIT) {
|
68 | 68 | $translationKey = empty($discount_type) ? 'CompanyHasDownPaymentOrCommercialDiscount' : 'HasDownPaymentOrCommercialDiscountFromSupplier';
|
69 |
| - $text = $langs->trans($translationKey, price($absolute_discount), $langs->transnoentities("Currency".$conf->currency)).'.'; |
| 69 | + $text = $langs->trans($translationKey, price($absolute_discount, 1, $outlangs, 1, -1, -1, $conf->currency)).'.'; |
70 | 70 |
|
71 | 71 | if ($isInvoice && !$isNewObject && $object->statut > $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
|
72 | 72 | $text = $form->textwithpicto($text, $langs->trans('AbsoluteDiscountUse'));
|
|
93 | 93 | if ($absolute_creditnote > 0) {
|
94 | 94 | // If validated, we show link "add credit note to payment"
|
95 | 95 | if (!empty($cannotApplyDiscount) || !$isInvoice || $isNewObject || $object->statut != $objclassname::STATUS_VALIDATED || $object->type == $objclassname::TYPE_CREDIT_NOTE) {
|
96 |
| - $translationKey = !empty($discount_type) ? 'HasCreditNoteFromSupplier' : 'CompanyHasCreditNote'; |
97 |
| - $text = $langs->trans($translationKey, price($absolute_creditnote), $langs->transnoentities("Currency".$conf->currency)).'.'; |
| 96 | + $translationKey = empty($discount_type) ? 'CompanyHasCreditNote' : 'HasCreditNoteFromSupplier'; |
| 97 | + $text = $langs->trans($translationKey, price($absolute_creditnote, 1, $langs, 1, -1, -1, $conf->currency)).'.'; |
98 | 98 |
|
99 | 99 | if ($isInvoice && !$isNewObject && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_DEPOSIT) {
|
100 | 100 | $text = $form->textwithpicto($text, $langs->trans('CreditNoteDepositUse'));
|
101 | 101 | }
|
102 | 102 |
|
103 | 103 | if ($absolute_discount <= 0 || $isNewObject) {
|
104 |
| - $text .= ' ('.$addabsolutediscount.')'; |
| 104 | + $text .= ' '.$addabsolutediscount; |
105 | 105 | }
|
106 | 106 |
|
107 | 107 | if ($isNewObject) {
|
|
121 | 121 | print '<br class="hideonsmartphone"><span class="opacitymedium hideonsmartphone">'.$langs->trans($translationKey).'.</span>';
|
122 | 122 |
|
123 | 123 | if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
|
124 |
| - print ' ('.$addabsolutediscount.')'; |
| 124 | + print ' '.$addabsolutediscount; |
125 | 125 | }
|
126 | 126 | }
|
127 | 127 |
|
|
0 commit comments