diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 7ce2a51c638..86b6ba5d0fd 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3390,9 +3390,6 @@ if ($action == 'create') { if (empty($reshook)) { print '
| '.$langs->trans('Ref').' | '.$langs->trans('Draft').' | |
| ';
print $desc;
@@ -3719,7 +3716,7 @@ if ($action == 'create') {
$tmp = ' ';
$text = $tmp.' ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') ';
- $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone');
+ $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', 'nowraponall', 0, 3, 'firstsituationonsmartphone');
print $desc;
print '';
}
@@ -3728,7 +3725,7 @@ if ($action == 'create') {
$tmp = ' ';
$text = $tmp.' ';
//$text .= ' ';
- $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc").' '.$langs->trans("YouMustCreateInvoiceFromThird"), 1, 'help', '', 0, 3, 'replacementonsmartphone'); + $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc").' '.$langs->trans("YouMustCreateInvoiceFromThird"), 1, 'help', 'nowraponall', 0, 3, 'replacementonsmartphone'); print $desc; print ''; } @@ -3884,12 +3881,12 @@ if ($action == 'create') { print ' | ||
| '.$langs->trans('DiscountStillRemaining').' | '; - $thirdparty = $soc; - $discount_type = 0; + $thirdparty = $soc; // used by object_discounts.tpl.php + $discount_type = 0; // used by object_discounts.tpl.php $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; @@ -3919,7 +3916,7 @@ if ($action == 'create') { print $form->getSelectConditionsPaiements($cond_reglement_id, 'cond_reglement_id', -1, 1, 0, 'maxwidth500 widthcentpercentminusx'); print ' | '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).' | '; print ''; print img_picto('', 'currency', 'class="pictofixedwidth"'); - print $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code'); + print $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth100 widthcentpercentminusx'); print ' | '; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 18f71ac2f20..e674eb079e7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9064,7 +9064,7 @@ abstract class CommonObject } $out .= ($display_type == 'card' ? '' : ''); - $out .= ($display_type == 'card' ? '' : ''); + $out .= ($display_type == 'card' ? ''."\n" : ''); $e++; } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0e779ddd9d7..ec51a50d8a5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6490,16 +6490,16 @@ class Form } /** - * Return array of currencies in user language + * Return array of currencies in user language * - * @param string $selected Preselected currency code - * @param string $htmlname Name of HTML select list - * @param integer $useempty 1=Add empty line - * @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)') - * @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available. - * true = we are in currency_rate update , we don't want to see conf->currency in select - * @param string $morecss More css - * @return string + * @param string $selected Preselected currency code + * @param string $htmlname Name of HTML select list + * @param integer $useempty 1=Add empty line + * @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)') + * @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available. + * true = we are in currency_rate update , we don't want to see conf->currency in select + * @param string $morecss More css + * @return string HTML component */ public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0, $filter = '', $excludeConfCurrency = false, $morecss = '') { diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php index 8ad7608d168..17221165344 100644 --- a/htdocs/core/tpl/object_discounts.tpl.php +++ b/htdocs/core/tpl/object_discounts.tpl.php @@ -32,10 +32,10 @@ $isInvoice = in_array($object->element, array('facture', 'invoice', 'facture_fou $isNewObject = empty($object->id) && empty($object->rowid); // Clean variables not defined -if (!isset($absolute_discount)) { +if (empty($absolute_discount)) { $absolute_discount = 0; } -if (!isset($absolute_creditnote)) { +if (empty($absolute_creditnote)) { $absolute_creditnote = 0; } @@ -52,28 +52,31 @@ if (!empty($discount_type)) { if ($fixedDiscount > 0) { $translationKey = (empty($discount_type)) ? 'CompanyHasRelativeDiscount' : 'HasRelativeDiscountFromSupplier'; - print $langs->trans($translationKey, $fixedDiscount).'.'; + print $langs->trans($translationKey, $fixedDiscount); } else { - $translationKey = (empty($discount_type)) ? 'CompanyHasNoRelativeDiscount' : 'HasNoRelativeDiscountFromSupplier'; - print ''; -} -if ($isNewObject) { - print ' '.$addrelativediscount; + if ($conf->dol_optimize_smallscreen) { + $translationKey = 'RelativeDiscount'; + } else { + $translationKey = (empty($discount_type)) ? 'CompanyHasNoRelativeDiscount' : 'HasNoRelativeDiscountFromSupplier'; + } + print ''.$langs->trans($translationKey).''; } +// Add link to edit the relative discount +print ' '.$addrelativediscount; // Is there is commercial discount or down payment available ? if ($absolute_discount > 0) { if (!empty($cannotApplyDiscount) || !$isInvoice || $isNewObject || $object->statut > $objclassname::STATUS_DRAFT || $object->type == $objclassname::TYPE_CREDIT_NOTE || $object->type == $objclassname::TYPE_DEPOSIT) { $translationKey = empty($discount_type) ? 'CompanyHasDownPaymentOrCommercialDiscount' : 'HasDownPaymentOrCommercialDiscountFromSupplier'; - $text = $langs->trans($translationKey, price($absolute_discount, 1, $outlangs, 1, -1, -1, $conf->currency)).'.'; + $text = $langs->trans($translationKey, price($absolute_discount, 1, $outlangs, 1, -1, -1, $conf->currency)); if ($isInvoice && !$isNewObject && $object->statut > $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) { $text = $form->textwithpicto($text, $langs->trans('AbsoluteDiscountUse')); } if ($isNewObject) { - $text .= $addabsolutediscount; + $text .= ' '.$addabsolutediscount; } if ($isNewObject) { @@ -94,7 +97,7 @@ if ($absolute_creditnote > 0) { // If validated, we show link "add credit note to payment" if (!empty($cannotApplyDiscount) || !$isInvoice || $isNewObject || $object->statut != $objclassname::STATUS_VALIDATED || $object->type == $objclassname::TYPE_CREDIT_NOTE) { $translationKey = empty($discount_type) ? 'CompanyHasCreditNote' : 'HasCreditNoteFromSupplier'; - $text = $langs->trans($translationKey, price($absolute_creditnote, 1, $langs, 1, -1, -1, $conf->currency)).'.'; + $text = $langs->trans($translationKey, price($absolute_creditnote, 1, $langs, 1, -1, -1, $conf->currency)); if ($isInvoice && !$isNewObject && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_DEPOSIT) { $text = $form->textwithpicto($text, $langs->trans('CreditNoteDepositUse')); @@ -117,8 +120,12 @@ if ($absolute_creditnote > 0) { } if ($absolute_discount <= 0 && $absolute_creditnote <= 0) { - $translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount'; - print '