• Resolved amitramani

    (@amitramani)


    I noticed that the code specifically removes the Refund order total line items. Why is that?

    			// remove refund lines (shouldn't be in invoice)
    			foreach ( $totals as $key => $total ) {
    				if ( strpos($key, 'refund_') !== false ) {
    					unset( $totals[$key] );
    				}
    			}

    After disabling the above code, the refund total line item does show up. But, the Order Total does not reflect the correct amount, i.e. it is not reduced by the amount of the refund.

    I would like the invoice to reflect the refunds.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! This has a legal reason: in Europa (and many other countries) it is allowed to alter an invoice after it has been issued. If you do a refund, you will need to create a credit note (also called credit invoice) to account for the difference.

    Kind regards,
    Ewout

    Thread Starter amitramani

    (@amitramani)

    Thank you for the quick response. Here in USA, we do not have that requirement.

    Is there any way to make a setting that controls whether or not refund totals are showin on the invoice?

    I can help with the code since I am a programmer.

    My other question is why the net total still shows the total without accounting for the refund. I disabled the code that hides the refund but the net total still shows the same number.

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! The total shown is the total of the invoice, which should remain unaltered according to EU fiscal rules. The refund fixes are all hardcoded. You can remove them like you did with the lines you mentioned above, and if you want to have the total be adjusted for the refund too, you can remove the lines above that (starting from “// WC2.4 fix order_total for refunded orders”). You could also use the wpo_wcpdf_woocommerce_totals filter to add it so you wouldn’t have to alter core files but that requires a bit more work.

    Hope that helps!
    Ewout

    Hi Erwout,

    Thanks for this precision: “If you do a refund, you will need to create a credit note (also called credit invoice) to account for the difference.”. Does the the pro version of your plugin generate such form and send it?

    Plugin Contributor Ewout

    (@pomegranate)

    cool! I have to build a website to sale food. There is new regulation within EU about labelling product. Do you think it would be possible to add on the slips, below the product a field with a long description of the product or nutrition from the ?

    If yes, would it manage the language selected by the buyer and/or language of the IP location?

    Thanks for helping

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! Everything is possible, but what you’re describing would require quite a bit of customization, it’s not something that can be done out of the box.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Why are Refund totals removed from Invoice?’ is closed to new replies.