2
0
forked from Wavyzz/dolibarr

Compare commits

...

5 Commits
16.0.4 ... 10.0

Author SHA1 Message Date
Florian Mortgat
74b67eb6c6 FIX - use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165) 2024-09-29 15:57:05 +02:00
Florian Mortgat
c727bbb530 FIX: when qty is not an integer, apply price() (#31138)
* FIX: when qty is not an integer, apply price() to avoid displaying precision errors if php.ini's precision settings are too high

* Apply eldy's suggestion to use price's parameters rather than a test
2024-09-26 18:41:41 +02:00
Laurent Destailleur
34b3113bb7 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2023-08-10 10:41:20 +02:00
Laurent Destailleur
90854dc2bf FIX Use the wrong logo size on PDF 2023-07-30 19:53:56 +02:00
Laurent Destailleur
b44ddaa696 FIX Use the wrong logo size on PDF 2023-07-30 18:04:03 +02:00
6 changed files with 33 additions and 33 deletions

View File

@@ -425,7 +425,7 @@ print_liste_field_titre(
// Quantity
print '<td class="right">';
print $qty[$key];
print price($qty[$key], 1, $langs, 0, 0);
print '</td>';
// Percent;

View File

@@ -363,7 +363,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_propale['nb'];
print '</td><td class="right">';
print $product->stats_propale['qty'];
print price($product->stats_propale['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -381,7 +381,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_proposal_supplier['nb'];
print '</td><td class="right">';
print $product->stats_proposal_supplier['qty'];
print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -399,7 +399,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande['nb'];
print '</td><td class="right">';
print $product->stats_commande['qty'];
print price($product->stats_commande['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -417,7 +417,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_commande_fournisseur['qty'];
print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -435,7 +435,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture['nb'];
print '</td><td class="right">';
print $product->stats_facture['qty'];
print price($product->stats_facture['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -453,7 +453,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_facture_fournisseur['qty'];
print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -472,7 +472,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_contrat['nb'];
print '</td><td class="right">';
print $product->stats_contrat['qty'];
print price($product->stats_contrat['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}

View File

@@ -1262,12 +1262,12 @@ class pdf_einstein extends ModelePDFCommandes
{
if ($this->emetteur->logo)
{
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
$logo=$conf->mycompany->dir_output.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))
{

View File

@@ -1573,12 +1573,12 @@ class pdf_crabe extends ModelePDFFactures
{
if ($this->emetteur->logo)
{
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
$logo=$conf->mycompany->dir_output.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))
{

View File

@@ -259,7 +259,7 @@ class pdf_azur extends ModelePDFPropales
if (! $arephoto)
{
if ($conf->product->entity != $objphoto->entity) {
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
}else{
@@ -1471,12 +1471,12 @@ class pdf_azur extends ModelePDFPropales
{
if ($this->emetteur->logo)
{
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
$logo=$conf->mycompany->dir_output.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))
{

View File

@@ -1509,12 +1509,12 @@ class pdf_cyan extends ModelePDFPropales
{
if ($this->emetteur->logo)
{
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
$logo=$conf->mycompany->dir_output.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))
{