Skip to content

Commit

Permalink
Use valueGreaterThanZero to prevent removing Discount with zero value
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipxe13 committed Apr 27, 2018
1 parent 27d7024 commit 75425f5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ private function putComprobanteSumas()
$this->comprobante['SubTotal'] = $this->format($this->sumas->getSubTotal());
$this->comprobante['Total'] = $this->format($this->sumas->getTotal());
$this->comprobante['Descuento'] = $this->format($this->sumas->getDescuento());
if (! $this->valueGreaterThanZero($this->sumas->getDescuento())) {
if (! $this->sumas->foundAnyConceptWithDiscount()
&& ! $this->valueGreaterThanZero($this->sumas->getDescuento())) {
unset($this->comprobante['Descuento']);
}
}
Expand Down

0 comments on commit 75425f5

Please sign in to comment.