Code Duplication    Length = 11-11 lines in 2 locations

includes/class-wpinv-invoice.php 2 locations

@@ 1028-1038 (lines=11) @@
1025
        $this->recalculate_total();
1026
    }
1027
1028
    private function decrease_subtotal( $amount = 0.00 ) {
1029
        $amount          = (float) $amount;
1030
        $this->subtotal -= $amount;
1031
        $this->subtotal  = wpinv_round_amount( $this->subtotal );
1032
1033
        if ( $this->subtotal < 0 ) {
1034
            $this->subtotal = 0;
1035
        }
1036
1037
        $this->recalculate_total();
1038
    }
1039
1040
    private function increase_fees( $amount = 0.00 ) {
1041
        $amount            = (float)$amount;
@@ 1048-1058 (lines=11) @@
1045
        $this->recalculate_total();
1046
    }
1047
1048
    private function decrease_fees( $amount = 0.00 ) {
1049
        $amount            = (float) $amount;
1050
        $this->fees_total -= $amount;
1051
        $this->fees_total  = wpinv_round_amount( $this->fees_total );
1052
1053
        if ( $this->fees_total < 0 ) {
1054
            $this->fees_total = 0;
1055
        }
1056
1057
        $this->recalculate_total();
1058
    }
1059
1060
    public function recalculate_total() {
1061
        global $wpi_nosave;