Browse Source

[Backend] Producteur : détails mise en page CA et facturation

refactoring
Guillaume Bourgeois 1 year ago
parent
commit
ad9ad0b16a
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      backend/views/producer-admin/index.php
  2. +1
    -1
      common/helpers/Price.php
  3. +2
    -2
      common/models/Producer.php

+ 1
- 1
backend/views/producer-admin/index.php View File

@@ -191,7 +191,7 @@ $this->addButton(['label' => 'Nouveau producteur <span class="glyphicon glyphico
$str .= '<li>'.Producer::$billingFrequencyArray[$model->option_billing_frequency].'</li>';

if($model->option_billing_permanent_transfer) {
$str .= '<li>Virement permanent : <strong>'.Price::format($model->option_billing_permanent_transfer_amount).'</strong></li>';
$str .= '<li>Virement permanent : <strong>'.Price::format($model->option_billing_permanent_transfer_amount, 0).'</strong></li>';
}

$str .= '</ul>';

+ 1
- 1
common/helpers/Price.php View File

@@ -76,7 +76,7 @@ class Price

public static function numberTwoDecimals($number, $decimals = 2)
{
return number_format(( ($number * 100)) / 100, $decimals) ;
return number_format(( ($number * 100)) / 100, $decimals, '.', ' ') ;
}

}

+ 2
- 2
common/models/Producer.php View File

@@ -548,7 +548,7 @@ class Producer extends ActiveRecordCommon
}

if($format) {
return Price::format($amountToBeBilled);
return Price::format($amountToBeBilled, 0);
}
else {
return $amountToBeBilled;
@@ -579,7 +579,7 @@ class Producer extends ActiveRecordCommon
if ($isBold) $text .= '<strong>';
$text .= $this->getAmountToBeBilledByTurnover($turnover, true);
if ($isBold) $text .= '</strong>';
$text .= ' / '.Price::format($turnover);
$text .= ' / '.Price::format($turnover, 0);
$text .= '<br />';
}
}

Loading…
Cancel
Save