|
@@ 1023-1033 (lines=11) @@
|
| 1020 |
|
$this->recalculate_total(); |
| 1021 |
|
} |
| 1022 |
|
|
| 1023 |
|
private function decrease_subtotal( $amount = 0.00 ) { |
| 1024 |
|
$amount = (float) $amount; |
| 1025 |
|
$this->subtotal -= $amount; |
| 1026 |
|
$this->subtotal = wpinv_format_amount( $this->subtotal, NULL, true ); |
| 1027 |
|
|
| 1028 |
|
if ( $this->subtotal < 0 ) { |
| 1029 |
|
$this->subtotal = 0; |
| 1030 |
|
} |
| 1031 |
|
|
| 1032 |
|
$this->recalculate_total(); |
| 1033 |
|
} |
| 1034 |
|
|
| 1035 |
|
private function increase_fees( $amount = 0.00 ) { |
| 1036 |
|
$amount = (float)$amount; |
|
@@ 1043-1053 (lines=11) @@
|
| 1040 |
|
$this->recalculate_total(); |
| 1041 |
|
} |
| 1042 |
|
|
| 1043 |
|
private function decrease_fees( $amount = 0.00 ) { |
| 1044 |
|
$amount = (float) $amount; |
| 1045 |
|
$this->fees_total -= $amount; |
| 1046 |
|
$this->fees_total = wpinv_format_amount( $this->fees_total, NULL, true ); |
| 1047 |
|
|
| 1048 |
|
if ( $this->fees_total < 0 ) { |
| 1049 |
|
$this->fees_total = 0; |
| 1050 |
|
} |
| 1051 |
|
|
| 1052 |
|
$this->recalculate_total(); |
| 1053 |
|
} |
| 1054 |
|
|
| 1055 |
|
public function recalculate_total() { |
| 1056 |
|
global $wpi_nosave; |