60 if (!is_null($dPrice)) {
72 $this->_blNetPriceMode = $blNetto;
108 $this->_dVat = (double) $dVat;
123 if (!$this->
isNettoMode() && $newVat != $this->_dVat) {
124 $this->_dBrutto = self::Netto2Brutto(self::Brutto2Netto($this->_dBrutto, $this->_dVat), (
double) $newVat);
126 $this->_dVat = (double) $newVat;
148 if (!is_null($dVat)) {
153 $this->_dNetto = $dPrice;
155 $this->_dBrutto = $dPrice;
226 $this->
setPrice($dPrice - self::percent($dPrice, $dValue));
260 public function add($dValue)
274 $this->
add(-$dValue);
317 if ($dBruttoPrice1 == $dBruttoPrice2) {
319 } elseif ($dBruttoPrice1 > $dBruttoPrice2) {
336 public static function percent($dValue, $dPercent)
338 return ((
double) $dValue * (
double) $dPercent) / 100.0;
361 return (
double) ((double) $dBrutto * 100.0) / (100.0 + (double) $dVat);
390 return ((
double ) $dPrice) * $oCur->rate;
402 $this->_aDiscounts[] = array(
'value' => $dValue,
'type' => $sType);
420 $this->_aDiscounts = null;
432 foreach ($aDiscounts as $aDiscount) {
434 if ($aDiscount[
'type'] ==
'abs') {
435 $dPrice = $dPrice - $aDiscount[
'value'];
437 $dPrice = $dPrice * (100 - $aDiscount[
'value']) / 100;