Code Duplication    Length = 11-11 lines in 2 locations

includes/class-wpinv-invoice.php 2 locations

@@ 1014-1024 (lines=11) @@
1011
        $this->recalculate_total();
1012
    }
1013
1014
    private function decrease_subtotal( $amount = 0.00 ) {
1015
        $amount          = (float) $amount;
1016
        $this->subtotal -= $amount;
1017
        $this->subtotal  = wpinv_round_amount( $this->subtotal );
1018
1019
        if ( $this->subtotal < 0 ) {
1020
            $this->subtotal = 0;
1021
        }
1022
1023
        $this->recalculate_total();
1024
    }
1025
1026
    private function increase_fees( $amount = 0.00 ) {
1027
        $amount            = (float)$amount;
@@ 1034-1044 (lines=11) @@
1031
        $this->recalculate_total();
1032
    }
1033
1034
    private function decrease_fees( $amount = 0.00 ) {
1035
        $amount            = (float) $amount;
1036
        $this->fees_total -= $amount;
1037
        $this->fees_total  = wpinv_round_amount( $this->fees_total );
1038
1039
        if ( $this->fees_total < 0 ) {
1040
            $this->fees_total = 0;
1041
        }
1042
1043
        $this->recalculate_total();
1044
    }
1045
1046
    public function recalculate_total() {
1047
        global $wpi_nosave;