Code Duplication    Length = 11-11 lines in 2 locations

includes/class-wpinv-invoice.php 2 locations

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