|
|
@@ -603,21 +603,29 @@ class Order extends ActiveRecordCommon |
|
|
|
{ |
|
|
|
$html = ''; |
|
|
|
|
|
|
|
$html .= $this->getAmountWithTax(self::AMOUNT_TOTAL, true) . '<br />'; |
|
|
|
|
|
|
|
if ($this->paid_amount) { |
|
|
|
if ($this->getPaymentStatus() == Order::PAYMENT_PAID) { |
|
|
|
$html .= '<span class="label label-success">Payée</span>'; |
|
|
|
} elseif ($this->getPaymentStatus() == Order::PAYMENT_UNPAID) { |
|
|
|
$html .= '<span class="label label-danger">Non payée</span><br /> |
|
|
|
Reste <strong>' . $this->getAmount(Order::AMOUNT_REMAINING, true) . '</strong> à payer'; |
|
|
|
} elseif ($this->getPaymentStatus() == Order::PAYMENT_SURPLUS) { |
|
|
|
$html .= '<span class="label label-success">Payée</span>'; |
|
|
|
$creditActive = Producer::getConfig('credit') ; |
|
|
|
$html .= $this->getAmountWithTax(self::AMOUNT_TOTAL, true) ; |
|
|
|
|
|
|
|
if($creditActive) { |
|
|
|
$html .= '<br />' ; |
|
|
|
if ($this->paid_amount) { |
|
|
|
if ($this->getPaymentStatus() == Order::PAYMENT_PAID) { |
|
|
|
$html .= '<span class="label label-success">Payée</span>'; |
|
|
|
} |
|
|
|
elseif ($this->getPaymentStatus() == Order::PAYMENT_UNPAID) { |
|
|
|
$html .= '<span class="label label-danger">Non payée</span><br /> |
|
|
|
Reste <strong>' . $this->getAmount(Order::AMOUNT_REMAINING, true) . '</strong> à payer'; |
|
|
|
} |
|
|
|
elseif ($this->getPaymentStatus() == Order::PAYMENT_SURPLUS) { |
|
|
|
$html .= '<span class="label label-success">Payée</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
$html .= '<span class="label label-default">Non réglé</span>'; |
|
|
|
} |
|
|
|
} else { |
|
|
|
$html .= '<span class="label label-default">Non réglé</span>'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
} |
|
|
|
|