• Resolved vitruviman

    (@vitruviman)


    Hi,

    I just wanted to let you know that there is a bug in the latest version of the plugin.

    In the edd_quaderno_create_invoice() function in /includes/invoices.php, the order fees are added to the invoice with this for loop:

    
    foreach ( $payment->fees as $fee ) {
        $item = array(
            'description' => $fee['label'],
            'quantity' => 1,
            'amount' => $fee['amount'] * (1 + $tax->rate / 100.0),
            'tax' => $tax
        );
    
        array_push( $transaction_items, $new_item );
    }
    

    Instead it should read:

    
    foreach ( $payment->fees as $fee ) {
        $new_item = array(
            'description' => $fee['label'],
            'quantity' => 1,
            'amount' => $fee['amount'] * (1 + $tax->rate / 100.0),
            'tax' => $tax
        );
    
        array_push( $transaction_items, $new_item );
    }
    

    Otherwise the Quaderno invoice will show a duplicate of the last regular cart item rather than the additional fee.

    On a related note, unfortunately the plugin does not work correctly with the EDD Discounts Pro extension (https://easydigitaldownloads.com/downloads/discounts-pro/).

    Unlike the normal EDD discount coupons, the Discounts Pro extension applies the discounts as additional order fees. The problem then is that when the products are added to the Quaderno invoice, they are added with the discounted price applied and then the discounts (fees) are also added to the invoice as additional items. This essentially results in a double discount and an incorrect total invoice amount in Quaderno. It would be great if this could be resolved in a future version of the plugin.

    Thanks very much in advance.

Viewing 1 replies (of 1 total)
  • Plugin Author polimorfico

    (@polimorfico)

    Sorry for delay. The bug was fixed in version 1.27.1. Thanks for letting us know.

    We take note of your suggestion about supporting EDD Discounts Pro.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Bug in the code’ is closed to new replies.